@nysds/components 1.4.4 → 1.4.6

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
@@ -245,7 +245,7 @@ var U1 = Object.defineProperty, P1 = Object.getOwnPropertyDescriptor, D = (l, e,
245
245
  };
246
246
  let O1 = 0;
247
247
  var J;
248
- const L = (J = class extends u {
248
+ const k = (J = class extends u {
249
249
  constructor() {
250
250
  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;
251
251
  }
@@ -368,44 +368,44 @@ const L = (J = class extends u {
368
368
  ], J);
369
369
  D([
370
370
  r({ type: String })
371
- ], L.prototype, "id", 2);
371
+ ], k.prototype, "id", 2);
372
372
  D([
373
373
  r({ type: String })
374
- ], L.prototype, "heading", 2);
374
+ ], k.prototype, "heading", 2);
375
375
  D([
376
376
  r({ type: String })
377
- ], L.prototype, "icon", 2);
377
+ ], k.prototype, "icon", 2);
378
378
  D([
379
379
  r({ type: Boolean, reflect: !0 })
380
- ], L.prototype, "dismissible", 2);
380
+ ], k.prototype, "dismissible", 2);
381
381
  D([
382
382
  r({ type: Number, reflect: !0 })
383
- ], L.prototype, "duration", 2);
383
+ ], k.prototype, "duration", 2);
384
384
  D([
385
385
  r({ type: String })
386
- ], L.prototype, "text", 2);
386
+ ], k.prototype, "text", 2);
387
387
  D([
388
388
  r({ type: String })
389
- ], L.prototype, "primaryAction", 2);
389
+ ], k.prototype, "primaryAction", 2);
390
390
  D([
391
391
  r({ type: String })
392
- ], L.prototype, "secondaryAction", 2);
392
+ ], k.prototype, "secondaryAction", 2);
393
393
  D([
394
394
  r({ type: String })
395
- ], L.prototype, "primaryLabel", 2);
395
+ ], k.prototype, "primaryLabel", 2);
396
396
  D([
397
397
  r({ type: String })
398
- ], L.prototype, "secondaryLabel", 2);
398
+ ], k.prototype, "secondaryLabel", 2);
399
399
  D([
400
400
  O()
401
- ], L.prototype, "_alertClosed", 2);
401
+ ], k.prototype, "_alertClosed", 2);
402
402
  D([
403
403
  O()
404
- ], L.prototype, "_slotHasContent", 2);
404
+ ], k.prototype, "_slotHasContent", 2);
405
405
  D([
406
406
  r({ reflect: !0 })
407
- ], L.prototype, "type", 1);
408
- let R1 = L;
407
+ ], k.prototype, "type", 1);
408
+ let R1 = k;
409
409
  customElements.get("nys-alert") || customElements.define("nys-alert", R1);
410
410
  const T1 = g`
411
411
  :host {
@@ -1098,8 +1098,8 @@ var X1 = Object.defineProperty, Q1 = Object.getOwnPropertyDescriptor, v = (l, e,
1098
1098
  return o && s && X1(e, t, s), s;
1099
1099
  };
1100
1100
  let J1 = 0;
1101
- var x;
1102
- const f = (x = class extends u {
1101
+ var w;
1102
+ const f = (w = class extends u {
1103
1103
  // allows use of elementInternals' API
1104
1104
  constructor() {
1105
1105
  super(), this.id = "", this.name = "", this._size = "md", this.fullWidth = !1, this._variant = "filled", this.inverted = !1, this.label = "", this.ariaLabel = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = "", this.value = "", this.ariaDescription = "", this._type = "button", this.onClick = () => {
@@ -1109,7 +1109,7 @@ const f = (x = class extends u {
1109
1109
  return this._size;
1110
1110
  }
1111
1111
  set size(e) {
1112
- this._size = x.VALID_SIZES.includes(
1112
+ this._size = w.VALID_SIZES.includes(
1113
1113
  e
1114
1114
  ) ? e : "md";
1115
1115
  }
@@ -1117,7 +1117,7 @@ const f = (x = class extends u {
1117
1117
  return this._variant;
1118
1118
  }
1119
1119
  set variant(e) {
1120
- this._variant = x.VALID_VARIANTS.includes(
1120
+ this._variant = w.VALID_VARIANTS.includes(
1121
1121
  e
1122
1122
  ) ? e : "filled";
1123
1123
  }
@@ -1125,7 +1125,7 @@ const f = (x = class extends u {
1125
1125
  return this._type;
1126
1126
  }
1127
1127
  set type(e) {
1128
- this._type = x.VALID_TYPES.includes(
1128
+ this._type = w.VALID_TYPES.includes(
1129
1129
  e
1130
1130
  ) ? e : "button";
1131
1131
  }
@@ -1133,7 +1133,7 @@ const f = (x = class extends u {
1133
1133
  return this._target;
1134
1134
  }
1135
1135
  set target(e) {
1136
- this._target = x.VALID_TARGETS.includes(
1136
+ this._target = w.VALID_TARGETS.includes(
1137
1137
  e
1138
1138
  ) ? e : "_self";
1139
1139
  }
@@ -1249,18 +1249,18 @@ const f = (x = class extends u {
1249
1249
  `}
1250
1250
  `;
1251
1251
  }
1252
- }, x.VALID_SIZES = ["sm", "md", "lg"], x.VALID_VARIANTS = [
1252
+ }, w.VALID_SIZES = ["sm", "md", "lg"], w.VALID_VARIANTS = [
1253
1253
  "filled",
1254
1254
  "outline",
1255
1255
  "ghost",
1256
1256
  "text"
1257
- ], x.VALID_TYPES = ["submit", "reset", "button"], x.VALID_TARGETS = [
1257
+ ], w.VALID_TYPES = ["submit", "reset", "button"], w.VALID_TARGETS = [
1258
1258
  "_self",
1259
1259
  "_blank",
1260
1260
  "_parent",
1261
1261
  "_top",
1262
1262
  "framename"
1263
- ], x.styles = K1, x.formAssociated = !0, x);
1263
+ ], w.styles = K1, w.formAssociated = !0, w);
1264
1264
  v([
1265
1265
  r({ type: String })
1266
1266
  ], f.prototype, "id", 2);
@@ -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
- (w) => w.checked
1732
+ ($) => $.checked
1733
1733
  ).length === 0)
1734
1734
  return c;
1735
1735
  } else
@@ -1834,14 +1834,14 @@ 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, V = (l, e, t, o) => {
1837
+ var ne = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, M = (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;
1841
1841
  };
1842
1842
  let ae = 0;
1843
1843
  var G;
1844
- const S = (G = class extends u {
1844
+ const L = (G = class extends u {
1845
1845
  // allows use of elementInternals' API
1846
1846
  constructor() {
1847
1847
  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();
@@ -1999,46 +1999,46 @@ const S = (G = class extends u {
1999
1999
  `;
2000
2000
  }
2001
2001
  }, G.VALID_SIZES = ["sm", "md"], G.styles = H1, G.formAssociated = !0, G);
2002
- V([
2002
+ M([
2003
2003
  r({ type: Boolean, reflect: !0 })
2004
- ], S.prototype, "checked", 2);
2005
- V([
2004
+ ], L.prototype, "checked", 2);
2005
+ M([
2006
2006
  r({ type: Boolean, reflect: !0 })
2007
- ], S.prototype, "disabled", 2);
2008
- V([
2007
+ ], L.prototype, "disabled", 2);
2008
+ M([
2009
2009
  r({ type: Boolean, reflect: !0 })
2010
- ], S.prototype, "required", 2);
2011
- V([
2010
+ ], L.prototype, "required", 2);
2011
+ M([
2012
2012
  r({ type: String })
2013
- ], S.prototype, "label", 2);
2014
- V([
2013
+ ], L.prototype, "label", 2);
2014
+ M([
2015
2015
  r({ type: String })
2016
- ], S.prototype, "description", 2);
2017
- V([
2016
+ ], L.prototype, "description", 2);
2017
+ M([
2018
2018
  r({ type: String })
2019
- ], S.prototype, "id", 2);
2020
- V([
2019
+ ], L.prototype, "id", 2);
2020
+ M([
2021
2021
  r({ type: String, reflect: !0 })
2022
- ], S.prototype, "name", 2);
2023
- V([
2022
+ ], L.prototype, "name", 2);
2023
+ M([
2024
2024
  r({ type: String })
2025
- ], S.prototype, "value", 2);
2026
- V([
2025
+ ], L.prototype, "value", 2);
2026
+ M([
2027
2027
  r({ type: Boolean, reflect: !0 })
2028
- ], S.prototype, "showError", 2);
2029
- V([
2028
+ ], L.prototype, "showError", 2);
2029
+ M([
2030
2030
  r({ type: String })
2031
- ], S.prototype, "errorMessage", 2);
2032
- V([
2031
+ ], L.prototype, "errorMessage", 2);
2032
+ M([
2033
2033
  r({ type: Boolean })
2034
- ], S.prototype, "groupExist", 2);
2035
- V([
2034
+ ], L.prototype, "groupExist", 2);
2035
+ M([
2036
2036
  r({ type: Boolean, reflect: !0 })
2037
- ], S.prototype, "tile", 2);
2038
- V([
2037
+ ], L.prototype, "tile", 2);
2038
+ M([
2039
2039
  r({ reflect: !0 })
2040
- ], S.prototype, "size", 1);
2041
- let le = S;
2040
+ ], L.prototype, "size", 1);
2041
+ let le = L;
2042
2042
  customElements.get("nys-checkbox") || customElements.define("nys-checkbox", le);
2043
2043
  const ce = g`
2044
2044
  :host {
@@ -2479,7 +2479,7 @@ v1([
2479
2479
  r({ type: String })
2480
2480
  ], r1.prototype, "errorMessage");
2481
2481
  customElements.define("nys-fileitem", r1);
2482
- var ge = Object.defineProperty, M = (l, e, t, o) => {
2482
+ var ge = Object.defineProperty, V = (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;
@@ -2778,47 +2778,47 @@ const C1 = class C1 extends u {
2778
2778
  }
2779
2779
  };
2780
2780
  C1.styles = ye, C1.formAssociated = !0;
2781
- let m = C1;
2782
- M([
2781
+ let x = C1;
2782
+ V([
2783
2783
  r({ type: String })
2784
- ], m.prototype, "id");
2785
- M([
2784
+ ], x.prototype, "id");
2785
+ V([
2786
2786
  r({ type: String, reflect: !0 })
2787
- ], m.prototype, "name");
2788
- M([
2787
+ ], x.prototype, "name");
2788
+ V([
2789
2789
  r({ type: String })
2790
- ], m.prototype, "label");
2791
- M([
2790
+ ], x.prototype, "label");
2791
+ V([
2792
2792
  r({ type: String })
2793
- ], m.prototype, "description");
2794
- M([
2793
+ ], x.prototype, "description");
2794
+ V([
2795
2795
  r({ type: Boolean })
2796
- ], m.prototype, "multiple");
2797
- M([
2796
+ ], x.prototype, "multiple");
2797
+ V([
2798
2798
  r({ type: String })
2799
- ], m.prototype, "accept");
2800
- M([
2799
+ ], x.prototype, "accept");
2800
+ V([
2801
2801
  r({ type: Boolean, reflect: !0 })
2802
- ], m.prototype, "disabled");
2803
- M([
2802
+ ], x.prototype, "disabled");
2803
+ V([
2804
2804
  r({ type: Boolean, reflect: !0 })
2805
- ], m.prototype, "required");
2806
- M([
2805
+ ], x.prototype, "required");
2806
+ V([
2807
2807
  r({ type: Boolean, reflect: !0 })
2808
- ], m.prototype, "optional");
2809
- M([
2808
+ ], x.prototype, "optional");
2809
+ V([
2810
2810
  r({ type: Boolean, reflect: !0 })
2811
- ], m.prototype, "showError");
2812
- M([
2811
+ ], x.prototype, "showError");
2812
+ V([
2813
2813
  r({ type: String })
2814
- ], m.prototype, "errorMessage");
2815
- M([
2814
+ ], x.prototype, "errorMessage");
2815
+ V([
2816
2816
  r({ type: Boolean })
2817
- ], m.prototype, "dropzone");
2818
- M([
2817
+ ], x.prototype, "dropzone");
2818
+ V([
2819
2819
  r({ type: String, reflect: !0 })
2820
- ], m.prototype, "width");
2821
- customElements.get("nys-fileinput") || customElements.define("nys-fileinput", m);
2820
+ ], x.prototype, "width");
2821
+ customElements.get("nys-fileinput") || customElements.define("nys-fileinput", x);
2822
2822
  const Ce = {
2823
2823
  // --------- UX Team Main Library (below) --------- //
2824
2824
  // *** CORE *** //
@@ -4147,12 +4147,12 @@ B([
4147
4147
  ], E.prototype, "tile", 2);
4148
4148
  let $e = E;
4149
4149
  customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", $e);
4150
- var De = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, F = (l, e, t, o) => {
4151
- for (var s = o > 1 ? void 0 : o ? Ve(e, t) : e, n = l.length - 1, i; n >= 0; n--)
4150
+ var De = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, F = (l, e, t, o) => {
4151
+ for (var s = o > 1 ? void 0 : o ? Me(e, t) : e, n = l.length - 1, i; n >= 0; n--)
4152
4152
  (i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
4153
4153
  return o && s && De(e, t, s), s;
4154
4154
  };
4155
- let Me = 0;
4155
+ let Ve = 0;
4156
4156
  var y;
4157
4157
  const q = (y = class extends u {
4158
4158
  constructor() {
@@ -4177,7 +4177,7 @@ const q = (y = class extends u {
4177
4177
  /********************** Lifecycle updates **********************/
4178
4178
  // Generate a unique ID if one is not provided
4179
4179
  connectedCallback() {
4180
- 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);
4180
+ super.connectedCallback(), this.id || (this.id = `nys-radiobutton-${Date.now()}-${Ve++}`), this.checked && (y.buttonGroup[this.name] && (y.buttonGroup[this.name].checked = !1, y.buttonGroup[this.name].requestUpdate()), y.buttonGroup[this.name] = this);
4181
4181
  }
4182
4182
  updated(e) {
4183
4183
  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);
@@ -4955,7 +4955,7 @@ const Pe = g`
4955
4955
  cursor: not-allowed;
4956
4956
  }
4957
4957
  `;
4958
- var Oe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, _ = (l, e, t, o) => {
4958
+ var Oe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, m = (l, e, t, o) => {
4959
4959
  for (var s = o > 1 ? void 0 : o ? Re(e, t) : e, n = l.length - 1, i; n >= 0; n--)
4960
4960
  (i = l[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
4961
4961
  return o && s && Oe(e, t, s), s;
@@ -5123,55 +5123,55 @@ ${this.value}</textarea
5123
5123
  `;
5124
5124
  }
5125
5125
  }, Z.VALID_WIDTHS = ["sm", "md", "lg", "full"], Z.VALID_RESIZE = ["vertical", "none"], Z.styles = Pe, Z.formAssociated = !0, Z);
5126
- _([
5126
+ m([
5127
5127
  r({ type: String })
5128
5128
  ], b.prototype, "id", 2);
5129
- _([
5129
+ m([
5130
5130
  r({ type: String, reflect: !0 })
5131
5131
  ], b.prototype, "name", 2);
5132
- _([
5132
+ m([
5133
5133
  r({ type: String })
5134
5134
  ], b.prototype, "label", 2);
5135
- _([
5135
+ m([
5136
5136
  r({ type: String })
5137
5137
  ], b.prototype, "description", 2);
5138
- _([
5138
+ m([
5139
5139
  r({ type: String })
5140
5140
  ], b.prototype, "placeholder", 2);
5141
- _([
5141
+ m([
5142
5142
  r({ type: String })
5143
5143
  ], b.prototype, "value", 2);
5144
- _([
5144
+ m([
5145
5145
  r({ type: Boolean, reflect: !0 })
5146
5146
  ], b.prototype, "disabled", 2);
5147
- _([
5147
+ m([
5148
5148
  r({ type: Boolean, reflect: !0 })
5149
5149
  ], b.prototype, "readonly", 2);
5150
- _([
5150
+ m([
5151
5151
  r({ type: Boolean, reflect: !0 })
5152
5152
  ], b.prototype, "required", 2);
5153
- _([
5153
+ m([
5154
5154
  r({ type: Boolean, reflect: !0 })
5155
5155
  ], b.prototype, "optional", 2);
5156
- _([
5156
+ m([
5157
5157
  r({ type: String })
5158
5158
  ], b.prototype, "form", 2);
5159
- _([
5159
+ m([
5160
5160
  r({ type: Number })
5161
5161
  ], b.prototype, "maxlength", 2);
5162
- _([
5162
+ m([
5163
5163
  r({ reflect: !0 })
5164
5164
  ], b.prototype, "width", 2);
5165
- _([
5165
+ m([
5166
5166
  r({ type: Number })
5167
5167
  ], b.prototype, "rows", 2);
5168
- _([
5168
+ m([
5169
5169
  r({ reflect: !0 })
5170
5170
  ], b.prototype, "resize", 1);
5171
- _([
5171
+ m([
5172
5172
  r({ type: Boolean, reflect: !0 })
5173
5173
  ], b.prototype, "showError", 2);
5174
- _([
5174
+ m([
5175
5175
  r({ type: String })
5176
5176
  ], b.prototype, "errorMessage", 2);
5177
5177
  let Fe = b;
@@ -6067,7 +6067,17 @@ const tt = g`
6067
6067
  --_nys-tooltip-color: var(--nys-color-text-reverse, #ffffff);
6068
6068
  --_nys-tooltip-background: var(--nys-color-ink, #1b1b1b);
6069
6069
  --_nys-tooltip-border-radius: var(--nys-radius-md, 4px);
6070
- --_nys-tooltip-font-family: var(--nys-type-family-ui, "Proxima Nova");
6070
+ --_nys-tooltip-font-family: var(
6071
+ --nys-font-family-ui,
6072
+ var(
6073
+ --nys-font-family-sans,
6074
+ "Proxima Nova",
6075
+ "Helvetica Neue",
6076
+ "Helvetica",
6077
+ "Arial",
6078
+ sans-serif
6079
+ )
6080
+ );
6071
6081
  --_nys-tooltip-font-size: var(--nys-type-size-ui-sm, 14px);
6072
6082
  --_nys-tooltip-letterspacing: var(--nys-font-letterspacing-ui-sm, 0.044px);
6073
6083
  --_nys-tooltip-lineheight: var(--nys-font-lineheight-ui-sm, 24px);
@@ -6280,7 +6290,7 @@ const D1 = class D1 extends u {
6280
6290
  updated(e) {
6281
6291
  super.updated(e);
6282
6292
  const t = this._firstAssignedEl;
6283
- t && e.has("text") && this._passAriaDescription(t);
6293
+ t && e.has("text") && this._passAria(t);
6284
6294
  }
6285
6295
  // Listen to window scroll so a focus tooltip can auto position even when user move across the page
6286
6296
  _addScrollListeners() {
@@ -6290,9 +6300,15 @@ const D1 = class D1 extends u {
6290
6300
  window.removeEventListener("scroll", this._handleScrollOrResize, !0), window.removeEventListener("resize", this._handleScrollOrResize);
6291
6301
  }
6292
6302
  /******************** Functions ********************/
6293
- // We need to pass `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text
6294
- _passAriaDescription(e) {
6295
- e.tagName.toLowerCase().startsWith("nys-") && e.setAttribute("ariaDescription", this.text);
6303
+ // We need to pass `ariaLabel` or `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text
6304
+ _passAria(e) {
6305
+ const t = e.tagName.toLowerCase();
6306
+ if (t.startsWith("nys-"))
6307
+ if (t === "nys-icon") {
6308
+ const o = e.getAttribute("ariaLabel") || "", s = o ? `${o}, ${this.text}` : this.text;
6309
+ e.setAttribute("ariaLabel", s);
6310
+ } else
6311
+ e.setAttribute("ariaDescription", this.text);
6296
6312
  }
6297
6313
  async _applyFocusBehavior(e) {
6298
6314
  var o;
@@ -6306,8 +6322,8 @@ const D1 = class D1 extends u {
6306
6322
  }
6307
6323
  // Checks if user's set position fit with current viewport (Does not account for overflow texts at this moment)
6308
6324
  _doesPositionFit(e) {
6309
- var $, w;
6310
- const t = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(".nys-tooltip__wrapper"), o = (w = this.shadowRoot) == null ? void 0 : w.querySelector(".nys-tooltip__content");
6325
+ var S, $;
6326
+ const t = (S = this.shadowRoot) == null ? void 0 : S.querySelector(".nys-tooltip__wrapper"), o = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(".nys-tooltip__content");
6311
6327
  if (!t || !o || e == null) return;
6312
6328
  const s = t.getBoundingClientRect(), n = o.getBoundingClientRect(), i = 8, c = {
6313
6329
  top: s.top - i,
@@ -6324,10 +6340,10 @@ const D1 = class D1 extends u {
6324
6340
  }
6325
6341
  // Calculates the best placement based on available space (flips placement if it doesn't fit)
6326
6342
  async autoPositionTooltip() {
6327
- var $, w;
6328
- const e = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(
6343
+ var S, $;
6344
+ const e = (S = this.shadowRoot) == null ? void 0 : S.querySelector(
6329
6345
  ".nys-tooltip__wrapper"
6330
- ), t = (w = this.shadowRoot) == null ? void 0 : w.querySelector(
6346
+ ), t = ($ = this.shadowRoot) == null ? void 0 : $.querySelector(
6331
6347
  ".nys-tooltip__content"
6332
6348
  );
6333
6349
  if (!e || !t) return;
@@ -6344,17 +6360,17 @@ const D1 = class D1 extends u {
6344
6360
  "left"
6345
6361
  ];
6346
6362
  if (this._userHasSetPosition && this._originalUserPosition) {
6347
- const k = this._originalUserPosition;
6348
- k === "left" ? i = ["left", "right", "top", "bottom"] : k === "right" ? i = ["right", "left", "top", "bottom"] : k === "top" ? i = ["top", "bottom", "right", "left"] : k === "bottom" && (i = ["bottom", "top", "right", "left"]);
6363
+ const _ = this._originalUserPosition;
6364
+ _ === "left" ? i = ["left", "right", "top", "bottom"] : _ === "right" ? i = ["right", "left", "top", "bottom"] : _ === "top" ? i = ["top", "bottom", "right", "left"] : _ === "bottom" && (i = ["bottom", "top", "right", "left"]);
6349
6365
  }
6350
- for (const k of i)
6351
- if (this._doesPositionFit(k)) {
6352
- this._setInternalPosition(k), await this.updateComplete, this._shiftTooltipIntoViewport(t);
6366
+ for (const _ of i)
6367
+ if (this._doesPositionFit(_)) {
6368
+ this._setInternalPosition(_), await this.updateComplete, this._shiftTooltipIntoViewport(t);
6353
6369
  return;
6354
6370
  }
6355
6371
  let c = "top", d = n.top;
6356
- for (const k of i)
6357
- n[k] > d && (d = n[k], c = k);
6372
+ for (const _ of i)
6373
+ n[_] > d && (d = n[_], c = _);
6358
6374
  this._setInternalPosition(c), await this.updateComplete, this._shiftTooltipIntoViewport(t);
6359
6375
  }
6360
6376
  // Sets flag to distinguish to position's setter that we are updating "position" prop internally
@@ -6363,13 +6379,13 @@ const D1 = class D1 extends u {
6363
6379
  }
6364
6380
  // Determines if text of tooltip over-extends outside of viewport edge and adjust tooltip for horizontal overflow
6365
6381
  _shiftTooltipIntoViewport(e) {
6366
- var w;
6367
- const t = e.getBoundingClientRect(), s = ((w = this.shadowRoot) == null ? void 0 : w.querySelector(
6382
+ var _;
6383
+ const o = ((_ = this.shadowRoot) == null ? void 0 : _.querySelector(
6368
6384
  ".nys-tooltip__wrapper"
6369
- )).getBoundingClientRect(), n = s.left + s.width / 2, i = t.left < 0, c = t.right > window.innerWidth;
6385
+ )).getBoundingClientRect(), s = e.getBoundingClientRect(), n = o.left + o.width / 2, i = s.left < 0, c = s.right > window.innerWidth;
6370
6386
  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");
6371
- const d = e.getBoundingClientRect(), $ = n - d.left;
6372
- e.style.setProperty("--arrow-offset-x", `${$}px`);
6387
+ const d = e.getBoundingClientRect(), S = (n - d.left) / d.width, $ = Math.max(0, Math.min(1, S)) * 100;
6388
+ e.style.setProperty("--arrow-offset-x", `${$}%`);
6373
6389
  }
6374
6390
  // Reposition tooltip back to original set position (e.g. top, left, bottom, right) to avoid positioning issue base on last position
6375
6391
  _resetTooltipPositioningStyles(e) {
@@ -6794,7 +6810,7 @@ var at = Object.defineProperty, l1 = (l, e, t, o) => {
6794
6810
  (i = l[n]) && (s = i(e, t, s) || s);
6795
6811
  return s && at(e, t, s), s;
6796
6812
  };
6797
- const V1 = class V1 extends u {
6813
+ const M1 = class M1 extends u {
6798
6814
  constructor() {
6799
6815
  super(...arguments), this.trustbarVisible = !1, this.searchDropdownVisible = !1, this.languageVisible = !1, this.isSearchFocused = !1, this.hideTranslate = !1, this.hideSearch = !1, this.languages = [
6800
6816
  ["English", ""],
@@ -7069,8 +7085,8 @@ const V1 = class V1 extends u {
7069
7085
  `;
7070
7086
  }
7071
7087
  };
7072
- V1.styles = nt;
7073
- let P = V1;
7088
+ M1.styles = nt;
7089
+ let P = M1;
7074
7090
  l1([
7075
7091
  r({ type: Boolean })
7076
7092
  ], P.prototype, "trustbarVisible");
@@ -7379,7 +7395,7 @@ var ct = Object.defineProperty, g1 = (l, e, t, o) => {
7379
7395
  (i = l[n]) && (s = i(e, t, s) || s);
7380
7396
  return s && ct(e, t, s), s;
7381
7397
  };
7382
- const M1 = class M1 extends u {
7398
+ const V1 = class V1 extends u {
7383
7399
  constructor() {
7384
7400
  super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink = "", this.slotHasContent = !0, this.isMobileMenuOpen = !1;
7385
7401
  }
@@ -7404,10 +7420,10 @@ const M1 = class M1 extends u {
7404
7420
  );
7405
7421
  o && s && (o.innerHTML = "", s.innerHTML = "", t.forEach((d) => {
7406
7422
  if (d.nodeType === Node.ELEMENT_NODE) {
7407
- const $ = d.cloneNode(!0), w = d.cloneNode(!0);
7423
+ const S = d.cloneNode(!0), $ = d.cloneNode(!0);
7408
7424
  ["script", "iframe", "object", "embed, img"].forEach((A1) => {
7409
- $.querySelectorAll(A1).forEach((B1) => B1.remove());
7410
- }), o.appendChild($), s.appendChild(w), d.remove();
7425
+ S.querySelectorAll(A1).forEach((B1) => B1.remove());
7426
+ }), o.appendChild(S), s.appendChild($), d.remove();
7411
7427
  }
7412
7428
  }));
7413
7429
  }
@@ -7478,8 +7494,8 @@ const M1 = class M1 extends u {
7478
7494
  `;
7479
7495
  }
7480
7496
  };
7481
- M1.styles = lt;
7482
- let s1 = M1;
7497
+ V1.styles = lt;
7498
+ let s1 = V1;
7483
7499
  g1([
7484
7500
  r({ type: String })
7485
7501
  ], s1.prototype, "appName");
@@ -7683,8 +7699,8 @@ const z1 = class z1 extends u {
7683
7699
  o && (o.classList.toggle("columns", s), o.classList.toggle("small", !s), o.innerHTML = "", t.forEach((c) => {
7684
7700
  if (c.nodeType === Node.ELEMENT_NODE) {
7685
7701
  const d = c.cloneNode(!0);
7686
- ["script", "iframe", "object", "embed", "img"].forEach((w) => {
7687
- d.querySelectorAll(w).forEach((k) => k.remove());
7702
+ ["script", "iframe", "object", "embed", "img"].forEach(($) => {
7703
+ d.querySelectorAll($).forEach((_) => _.remove());
7688
7704
  }), o.appendChild(d), c.remove();
7689
7705
  }
7690
7706
  }));
@@ -7940,7 +7956,7 @@ export {
7940
7956
  le as NysCheckbox,
7941
7957
  re as NysCheckboxgroup,
7942
7958
  d1 as NysErrorMessage,
7943
- m as NysFileinput,
7959
+ x as NysFileinput,
7944
7960
  h1 as NysGlobalFooter,
7945
7961
  s1 as NysGlobalHeader,
7946
7962
  me as NysIcon,