@nysds/components 1.10.1 → 1.11.1
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 +1620 -1688
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +272 -257
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-alert/src/nys-alert.d.ts +1 -1
- package/dist/packages/nys-button/src/nys-button.d.ts +8 -1
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +1 -1
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +1 -1
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +1 -1
- package/dist/packages/nys-label/src/nys-label.d.ts +1 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +1 -1
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +1 -1
- package/dist/packages/nys-select/src/nys-select.d.ts +1 -1
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +2 -2
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +1 -1
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +1 -1
- package/package.json +33 -39
package/dist/nysds.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* New York State Design System (v1.
|
|
1
|
+
(function(u,pe){typeof exports=="object"&&typeof module<"u"?pe(exports):typeof define=="function"&&define.amd?define(["exports"],pe):(u=typeof globalThis<"u"?globalThis:u||self,pe(u.NYSDS={}))})(this,(function(u){"use strict";/*!
|
|
2
|
+
* New York State Design System (v1.11.1)
|
|
3
3
|
* Description: A design system for New York State's digital products.
|
|
4
4
|
* Repository: https://github.com/its-hcd/nysds
|
|
5
5
|
* License: MIT
|
|
@@ -7,37 +7,37 @@
|
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright 2019 Google LLC
|
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/var
|
|
10
|
+
*/var _e,I,j,le,ce,Ce,me,de,m,he,K,X,ye;const pe=globalThis,at=pe.ShadowRoot&&(pe.ShadyCSS===void 0||pe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol(),Vt=new WeakMap;let Ht=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(at&&e===void 0){const o=t!==void 0&&t.length===1;o&&(e=Vt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Vt.set(t,e))}return e}toString(){return this.cssText}};const u1=a=>new Ht(typeof a=="string"?a:a+"",void 0,lt),g=(a,...e)=>{const t=a.length===1?a[0]:e.reduce(((o,s,r)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+a[r+1]),a[0]);return new Ht(t,a,lt)},p1=(a,e)=>{if(at)a.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const o=document.createElement("style"),s=pe.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=t.cssText,a.appendChild(o)}},Bt=at?a=>a:a=>a instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return u1(t)})(a):a;/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright 2017 Google LLC
|
|
13
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
-
*/const{is:
|
|
14
|
+
*/const{is:v1,defineProperty:f1,getOwnPropertyDescriptor:g1,getOwnPropertyNames:b1,getOwnPropertySymbols:_1,getPrototypeOf:C1}=Object,Qe=globalThis,It=Qe.trustedTypes,m1=It?It.emptyScript:"",x1=Qe.reactiveElementPolyfillSupport,Ze=(a,e)=>a,Je={toAttribute(a,e){switch(e){case Boolean:a=a?m1:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,e){let t=a;switch(e){case Boolean:t=a!==null;break;case Number:t=a===null?null:Number(a);break;case Object:case Array:try{t=JSON.parse(a)}catch{t=null}}return t}},ct=(a,e)=>!v1(a,e),Pt={attribute:!0,type:String,converter:Je,reflect:!1,useDefault:!1,hasChanged:ct};Symbol.metadata??=Symbol("metadata"),Qe.litPropertyMetadata??=new WeakMap;let ze=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Pt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const o=Symbol(),s=this.getPropertyDescriptor(e,o,t);s!==void 0&&f1(this.prototype,e,s)}}static getPropertyDescriptor(e,t,o){const{get:s,set:r}=g1(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:s,set(n){const c=s?.call(this);r?.call(this,n),this.requestUpdate(e,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Pt}static _$Ei(){if(this.hasOwnProperty(Ze("elementProperties")))return;const e=C1(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ze("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ze("properties"))){const t=this.properties,o=[...b1(t),..._1(t)];for(const s of o)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[o,s]of t)this.elementProperties.set(o,s)}this._$Eh=new Map;for(const[t,o]of this.elementProperties){const s=this._$Eu(t,o);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const s of o)t.unshift(Bt(s))}else e!==void 0&&t.push(Bt(e));return t}static _$Eu(e,t){const o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return p1(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){const o=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,o);if(s!==void 0&&o.reflect===!0){const r=(o.converter?.toAttribute!==void 0?o.converter:Je).toAttribute(t,o.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){const o=this.constructor,s=o._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const r=o.getPropertyOptions(s),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Je;this._$Em=s;const c=n.fromAttribute(t,r.type);this[s]=c??this._$Ej?.get(s)??c,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){const s=this.constructor,r=this[e];if(o??=s.getPropertyOptions(e),!((o.hasChanged??ct)(r,t)||o.useDefault&&o.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:s,wrapped:r},n){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),r!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o){const{wrapped:n}=r,c=this[s];n!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,r,c)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((o=>o.hostUpdate?.())),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ze.elementStyles=[],ze.shadowRootOptions={mode:"open"},ze[Ze("elementProperties")]=new Map,ze[Ze("finalized")]=new Map,x1?.({ReactiveElement:ze}),(Qe.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/const
|
|
19
|
-
\f\r]`,
|
|
20
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
18
|
+
*/const dt=globalThis,et=dt.trustedTypes,Ot=et?et.createPolicy("lit-html",{createHTML:a=>a}):void 0,Zt="$lit$",ve=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+ve,w1=`<${Ut}>`,xe=document,Ue=()=>xe.createComment(""),qe=a=>a===null||typeof a!="object"&&typeof a!="function",ht=Array.isArray,k1=a=>ht(a)||typeof a?.[Symbol.iterator]=="function",yt=`[
|
|
19
|
+
\f\r]`,Te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qt=/-->/g,Tt=/>/g,we=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
|
|
20
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Nt=/'/g,Rt=/"/g,Ft=/^(?:script|style|textarea|title)$/i,$1=a=>(e,...t)=>({_$litType$:a,strings:e,values:t}),l=$1(1),Ve=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),jt=new WeakMap,ke=xe.createTreeWalker(xe,129);function Gt(a,e){if(!ht(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ot!==void 0?Ot.createHTML(e):e}const S1=(a,e)=>{const t=a.length-1,o=[];let s,r=e===2?"<svg>":e===3?"<math>":"",n=Te;for(let c=0;c<t;c++){const d=a[c];let h,f,v=-1,w=0;for(;w<d.length&&(n.lastIndex=w,f=n.exec(d),f!==null);)w=n.lastIndex,n===Te?f[1]==="!--"?n=qt:f[1]!==void 0?n=Tt:f[2]!==void 0?(Ft.test(f[2])&&(s=RegExp("</"+f[2],"g")),n=we):f[3]!==void 0&&(n=we):n===we?f[0]===">"?(n=s??Te,v=-1):f[1]===void 0?v=-2:(v=n.lastIndex-f[2].length,h=f[1],n=f[3]===void 0?we:f[3]==='"'?Rt:Nt):n===Rt||n===Nt?n=we:n===qt||n===Tt?n=Te:(n=we,s=void 0);const q=n===we&&a[c+1].startsWith("/>")?" ":"";r+=n===Te?d+w1:v>=0?(o.push(h),d.slice(0,v)+Zt+d.slice(v)+ve+q):d+ve+(v===-2?c:q)}return[Gt(a,r+(a[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]};class Ne{constructor({strings:e,_$litType$:t},o){let s;this.parts=[];let r=0,n=0;const c=e.length-1,d=this.parts,[h,f]=S1(e,t);if(this.el=Ne.createElement(h,o),ke.currentNode=this.el.content,t===2||t===3){const v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(s=ke.nextNode())!==null&&d.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(const v of s.getAttributeNames())if(v.endsWith(Zt)){const w=f[n++],q=s.getAttribute(v).split(ve),ue=/([.?@])?(.*)/.exec(w);d.push({type:1,index:r,name:ue[2],strings:q,ctor:ue[1]==="."?E1:ue[1]==="?"?A1:ue[1]==="@"?D1:tt}),s.removeAttribute(v)}else v.startsWith(ve)&&(d.push({type:6,index:r}),s.removeAttribute(v));if(Ft.test(s.tagName)){const v=s.textContent.split(ve),w=v.length-1;if(w>0){s.textContent=et?et.emptyScript:"";for(let q=0;q<w;q++)s.append(v[q],Ue()),ke.nextNode(),d.push({type:2,index:++r});s.append(v[w],Ue())}}}else if(s.nodeType===8)if(s.data===Ut)d.push({type:2,index:r});else{let v=-1;for(;(v=s.data.indexOf(ve,v+1))!==-1;)d.push({type:7,index:r}),v+=ve.length-1}r++}}static createElement(e,t){const o=xe.createElement("template");return o.innerHTML=e,o}}function He(a,e,t=a,o){if(e===Ve)return e;let s=o!==void 0?t._$Co?.[o]:t._$Cl;const r=qe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(a),s._$AT(a,t,o)),o!==void 0?(t._$Co??=[])[o]=s:t._$Cl=s),s!==void 0&&(e=He(a,s._$AS(a,e.values),s,o)),e}class L1{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:o}=this._$AD,s=(e?.creationScope??xe).importNode(t,!0);ke.currentNode=s;let r=ke.nextNode(),n=0,c=0,d=o[0];for(;d!==void 0;){if(n===d.index){let h;d.type===2?h=new Re(r,r.nextSibling,this,e):d.type===1?h=new d.ctor(r,d.name,d.strings,this,e):d.type===6&&(h=new M1(r,this,e)),this._$AV.push(h),d=o[++c]}n!==d?.index&&(r=ke.nextNode(),n++)}return ke.currentNode=xe,s}p(e){let t=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}}class Re{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,s){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=He(this,e,t),qe(e)?e===S||e==null||e===""?(this._$AH!==S&&this._$AR(),this._$AH=S):e!==this._$AH&&e!==Ve&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):k1(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==S&&qe(this._$AH)?this._$AA.nextSibling.data=e:this.T(xe.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Ne.createElement(Gt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(t);else{const r=new L1(s,this),n=r.u(this.options);r.p(t),this.T(n),this._$AH=r}}_$AC(e){let t=jt.get(e.strings);return t===void 0&&jt.set(e.strings,t=new Ne(e)),t}k(e){ht(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let o,s=0;for(const r of e)s===t.length?t.push(o=new Re(this.O(Ue()),this.O(Ue()),this,this.options)):o=t[s],o._$AI(r),s++;s<t.length&&(this._$AR(o&&o._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,s,r){this.type=1,this._$AH=S,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=S}_$AI(e,t=this,o,s){const r=this.strings;let n=!1;if(r===void 0)e=He(this,e,t,0),n=!qe(e)||e!==this._$AH&&e!==Ve,n&&(this._$AH=e);else{const c=e;let d,h;for(e=r[0],d=0;d<r.length-1;d++)h=He(this,c[o+d],t,d),h===Ve&&(h=this._$AH[d]),n||=!qe(h)||h!==this._$AH[d],h===S?e=S:e!==S&&(e+=(h??"")+r[d+1]),this._$AH[d]=h}n&&!s&&this.j(e)}j(e){e===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class E1 extends tt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===S?void 0:e}}class A1 extends tt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==S)}}class D1 extends tt{constructor(e,t,o,s,r){super(e,t,o,s,r),this.type=5}_$AI(e,t=this){if((e=He(this,e,t,0)??S)===Ve)return;const o=this._$AH,s=e===S&&o!==S||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,r=e!==S&&(o===S||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class M1{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){He(this,e)}}const z1=dt.litHtmlPolyfillSupport;z1?.(Ne,Re),(dt.litHtmlVersions??=[]).push("3.3.1");const V1=(a,e,t)=>{const o=t?.renderBefore??e;let s=o._$litPart$;if(s===void 0){const r=t?.renderBefore??null;o._$litPart$=s=new Re(e.insertBefore(Ue(),r),r,void 0,t??{})}return s._$AI(a),s};/**
|
|
21
21
|
* @license
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
|
-
*/
|
|
24
|
+
*/const ut=globalThis;class p extends ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=V1(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ve}}p._$litElement$=!0,p.finalized=!0,ut.litElementHydrateSupport?.({LitElement:p});const H1=ut.litElementPolyfillSupport;H1?.({LitElement:p}),(ut.litElementVersions??=[]).push("4.2.1");/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const
|
|
28
|
+
*/const B1={attribute:!0,type:String,converter:Je,reflect:!1,hasChanged:ct},I1=(a=B1,e,t)=>{const{kind:o,metadata:s}=t;let r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),o==="setter"&&((a=Object.create(a)).wrapped=!0),r.set(t.name,a),o==="accessor"){const{name:n}=t;return{set(c){const d=e.get.call(this);e.set.call(this,c),this.requestUpdate(n,d,a)},init(c){return c!==void 0&&this.C(n,void 0,a,c),c}}}if(o==="setter"){const{name:n}=t;return function(c){const d=this[n];e.call(this,c),this.requestUpdate(n,d,a)}}throw Error("Unsupported decorator location: "+o)};function i(a){return(e,t)=>typeof t=="object"?I1(a,e,t):((o,s,r)=>{const n=s.hasOwnProperty(r);return s.constructor.createProperty(r,o),n?Object.getOwnPropertyDescriptor(s,r):void 0})(a,e,t)}/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/function
|
|
32
|
+
*/function M(a){return i({...a,state:!0,attribute:!1})}/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
35
35
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/const
|
|
36
|
+
*/const P1=(a,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(a,e,t),t);/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/function
|
|
40
|
+
*/function O1(a,e){return(t,o,s)=>{const r=n=>n.renderRoot?.querySelector(a)??null;return P1(t,o,{get(){return r(this)}})}}const Wt=g`
|
|
41
41
|
:host {
|
|
42
42
|
/* Anything that can be overridden should be defined here */
|
|
43
43
|
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
flex-direction: column;
|
|
183
183
|
gap: var(--_nys-accordion-gap);
|
|
184
184
|
}
|
|
185
|
-
`;var
|
|
185
|
+
`;var Z1=Object.defineProperty,Fe=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Z1(e,t,s),s};let U1=0;const gt=class gt extends p{constructor(){super(),this.id="",this.heading="",this.expanded=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id||(this.id=this._generateUniqueId())}firstUpdated(){const e=this.shadowRoot?.querySelector("slot");this.expanded&&e&&e.addEventListener("slotchange",()=>{this._updateHeight()})}updated(e){e.has("expanded")&&this._updateHeight()}_generateUniqueId(){return`nys-accordionitem-${Date.now()}-${U1++}`}_dispatchEvent(){this.dispatchEvent(new CustomEvent("nys-accordionitem-toggle",{detail:{id:this.id,heading:this.heading,expanded:this.expanded},bubbles:!0,composed:!0}))}_handleExpand(){this.expanded=!this.expanded,this._updateHeight(),this._dispatchEvent()}_handleKeydown(e){(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._handleExpand())}_updateHeight(){if(this._contentContainer)if(this.expanded){const e=this._contentContainer.scrollHeight;this._contentContainer.style.height=`${e}px`}else this._contentContainer.style.height="0",this._contentContainer.style.overflow="hidden"}render(){const e=`${this.id}-content`;return l`
|
|
186
186
|
<div id=${this.id} class="nys-accordionitem">
|
|
187
187
|
<button
|
|
188
188
|
class="nys-accordionitem__heading"
|
|
@@ -203,13 +203,13 @@
|
|
|
203
203
|
</div>
|
|
204
204
|
</div>
|
|
205
205
|
</div>
|
|
206
|
-
</div>`}};
|
|
206
|
+
</div>`}};gt.styles=Wt;let te=gt;Fe([i({type:String})],te.prototype,"id"),Fe([i({type:String})],te.prototype,"heading"),Fe([i({type:Boolean,reflect:!0})],te.prototype,"expanded"),Fe([i({type:Boolean,reflect:!0})],te.prototype,"bordered"),Fe([O1(".nys-accordionitem__content")],te.prototype,"_contentContainer"),customElements.get("nys-accordionitem")||customElements.define("nys-accordionitem",te);var q1=Object.defineProperty,pt=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&q1(e,t,s),s};let T1=0;const bt=class bt extends p{constructor(){super(),this.id="",this.singleSelect=!1,this.bordered=!1}connectedCallback(){super.connectedCallback(),this.id||(this.id=this._generateUniqueId())}updated(e){e.has("bordered")&&this._applyBordered()}_generateUniqueId(){return`nys-accordionitem-${Date.now()}-${T1++}`}_getAccordions(){return(this.shadowRoot?.querySelector("slot")?.assignedElements()||[]).filter(o=>o.tagName.toLowerCase()==="nys-accordionitem")}_onAccordionToggle(e){if(!this.singleSelect)return;const t=e.detail.id;e.detail.expanded&&this._getAccordions().forEach(s=>{s.id!==t&&s.expanded&&(s.expanded=!1)})}_applyBordered(){this._getAccordions().forEach(e=>{e.bordered=this.bordered})}render(){return l`<div
|
|
207
207
|
id=${this.id}
|
|
208
208
|
class="nys-accordion"
|
|
209
209
|
@nys-accordionitem-toggle=${this._onAccordionToggle}
|
|
210
210
|
>
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</div>`}};
|
|
212
|
+
</div>`}};bt.styles=Wt;let $e=bt;pt([i({type:String})],$e.prototype,"id"),pt([i({type:Boolean,reflect:!0})],$e.prototype,"singleSelect"),pt([i({type:Boolean,reflect:!0})],$e.prototype,"bordered"),customElements.get("nys-accordion")||customElements.define("nys-accordion",$e);const N1=g`
|
|
213
213
|
:host {
|
|
214
214
|
/* Global Alert Styles */
|
|
215
215
|
--_nys-alert-border-width: var(--nys-border-width-lg, 4px);
|
|
@@ -449,11 +449,11 @@
|
|
|
449
449
|
* @license
|
|
450
450
|
* Copyright 2018 Google LLC
|
|
451
451
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
452
|
-
*/const
|
|
453
|
-
${this._alertClosed?"":
|
|
452
|
+
*/const y=a=>a??S;var R1=Object.defineProperty,F1=Object.getOwnPropertyDescriptor,T=(a,e,t,o)=>{for(var s=o>1?void 0:o?F1(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&R1(e,t,s),s};let j1=0;const P=(_e=class extends p{constructor(){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}get type(){return this._type}set type(e){this._type=_e.VALID_TYPES.includes(e)?e:"base"}get ariaAttributes(){const e=this.type==="danger"||this.type==="emergency"?"alert":this.type==="success"?"status":"region",t=e==="region"?`${this.type} alert`:"";return{role:e,ariaLabel:t}}connectedCallback(){super.connectedCallback(),this.id||(this.id=this._generateUniqueId()),this.duration>0&&(this._timeoutId=setTimeout(()=>{this._closeAlert()},this.duration))}disconnectedCallback(){this._timeoutId&&clearTimeout(this._timeoutId),super.disconnectedCallback()}firstUpdated(){this._checkSlotContent()}_generateUniqueId(){return`nys-alert-${Date.now()}-${j1++}`}_getIconName(){return this.icon?this.icon:this._checkAltNaming()}_checkAltNaming(){return this.type==="success"?"check_circle":this.type==="base"?"info":this.type==="danger"?"error":this.type==="emergency"?"emergency_home":this.type}_closeAlert(){this._alertClosed=!0,this.dispatchEvent(new CustomEvent("nys-close",{detail:{id:this.id,type:this.type,label:this.heading},bubbles:!0,composed:!0}))}async _checkSlotContent(){const e=this.shadowRoot?.querySelector("slot");if(e){const t=e.assignedNodes({flatten:!0}).filter(o=>o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE&&o.textContent?.trim());await Promise.resolve(),this._slotHasContent=t.length>0}else await Promise.resolve(),this._slotHasContent=!1}render(){const{role:e,ariaLabel:t}=this.ariaAttributes;return l`
|
|
453
|
+
${this._alertClosed?"":l` <div
|
|
454
454
|
id=${this.id}
|
|
455
|
-
class="nys-alert__container ${this._slotHasContent||
|
|
456
|
-
aria-label=${
|
|
455
|
+
class="nys-alert__container ${this._slotHasContent||this.text?.trim().length>0?"":"nys-alert--centered"}"
|
|
456
|
+
aria-label=${y(t.trim()!==""?t:void 0)}
|
|
457
457
|
>
|
|
458
458
|
<div part="nys-alert__icon" class="nys-alert__icon">
|
|
459
459
|
<nys-icon
|
|
@@ -464,23 +464,23 @@
|
|
|
464
464
|
</div>
|
|
465
465
|
<div class="nys-alert__texts" role=${e}>
|
|
466
466
|
<p class="nys-alert__header">${this.heading}</p>
|
|
467
|
-
${this._slotHasContent?
|
|
468
|
-
${this.primaryAction||this.secondaryAction?
|
|
469
|
-
${this.primaryAction?
|
|
470
|
-
href=${
|
|
467
|
+
${this._slotHasContent?l`<slot></slot>`:this.text?.trim().length>0?l`<p class="nys-alert__text">${this.text}</p>`:""}
|
|
468
|
+
${this.primaryAction||this.secondaryAction?l`<div class="nys-alert__actions">
|
|
469
|
+
${this.primaryAction?l`<a
|
|
470
|
+
href=${y(this.primaryAction||void 0)}
|
|
471
471
|
class="nys-alert__action nys-alert__primary"
|
|
472
472
|
>
|
|
473
473
|
${this.primaryLabel}
|
|
474
474
|
</a>`:""}
|
|
475
|
-
${this.secondaryAction?
|
|
476
|
-
href=${
|
|
475
|
+
${this.secondaryAction?l`<a
|
|
476
|
+
href=${y(this.secondaryAction||void 0)}
|
|
477
477
|
class="nys-alert__action nys-alert__secondary"
|
|
478
478
|
>
|
|
479
479
|
${this.secondaryLabel}
|
|
480
480
|
</a>`:""}
|
|
481
481
|
</div> `:""}
|
|
482
482
|
</div>
|
|
483
|
-
${this.dismissible?
|
|
483
|
+
${this.dismissible?l` <nys-button
|
|
484
484
|
id="dismiss-btn"
|
|
485
485
|
variant="ghost"
|
|
486
486
|
circle
|
|
@@ -488,10 +488,10 @@
|
|
|
488
488
|
size="sm"
|
|
489
489
|
?inverted=${this.type==="emergency"}
|
|
490
490
|
ariaLabel="${this.heading}, alert, Close"
|
|
491
|
-
|
|
491
|
+
@nys-click=${this._closeAlert}
|
|
492
492
|
></nys-button>`:""}
|
|
493
493
|
</div>`}
|
|
494
|
-
`}},
|
|
494
|
+
`}},_e.styles=N1,_e.VALID_TYPES=["base","info","success","warning","danger","emergency"],_e);T([i({type:String})],P.prototype,"id",2),T([i({type:String})],P.prototype,"heading",2),T([i({type:String})],P.prototype,"icon",2),T([i({type:Boolean,reflect:!0})],P.prototype,"dismissible",2),T([i({type:Number,reflect:!0})],P.prototype,"duration",2),T([i({type:String})],P.prototype,"text",2),T([i({type:String})],P.prototype,"primaryAction",2),T([i({type:String})],P.prototype,"secondaryAction",2),T([i({type:String})],P.prototype,"primaryLabel",2),T([i({type:String})],P.prototype,"secondaryLabel",2),T([M()],P.prototype,"_alertClosed",2),T([M()],P.prototype,"_slotHasContent",2),T([i({reflect:!0})],P.prototype,"type",1);let Yt=P;customElements.get("nys-alert")||customElements.define("nys-alert",Yt);const G1=g`
|
|
495
495
|
:host {
|
|
496
496
|
/* Global Avatar Styles */
|
|
497
497
|
|
|
@@ -592,40 +592,40 @@
|
|
|
592
592
|
height: 100%;
|
|
593
593
|
fill: currentColor;
|
|
594
594
|
}
|
|
595
|
-
`;var
|
|
595
|
+
`;var W1=Object.defineProperty,Q=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&W1(e,t,s),s};let Y1=0;const _t=class _t extends p{constructor(){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}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-avatar-${Date.now()}-${Y1++}`)}firstUpdated(){this._checkSlotContent()}async _checkSlotContent(){const e=this.shadowRoot?.querySelector("slot");if(!e){this._slotHasContent=!1;return}await Promise.resolve();const t=e.assignedNodes({flatten:!0}).filter(o=>o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE&&o.textContent?.trim());this._slotHasContent=t.length>0}getContrastForeground(){const e="var(--nys-color-ink, #000)",t="var(--nys-color-ink-reverse, #fff)",o="var(--nys-color-text, #000)",s="var(--nys-color-text-reverse, #fff)";if(!this.color)return;const r=document.createElement("div");r.style.color=this.color,document.body.appendChild(r);const n=getComputedStyle(r).color;document.body.removeChild(r);const c=n.match(/\d+/g);if(!c)return;const d=Number(c[0]),h=Number(c[1]),f=Number(c[2]),w=(.299*d+.587*h+.114*f)/255<.5;return this.initials?.length>0?w?s:o:w?t:e}render(){return l`
|
|
596
596
|
<label class="nys-avatar" id=${this.id}>
|
|
597
597
|
<div class="nys-avatar__content">
|
|
598
598
|
<div
|
|
599
599
|
part="nys-avatar"
|
|
600
600
|
class="nys-avatar__component"
|
|
601
601
|
style=${this.color?`--_nys-avatar-background-color: ${this.color}; color: ${this.getContrastForeground()}`:""}
|
|
602
|
-
role=${
|
|
603
|
-
aria-label=${
|
|
604
|
-
tabindex=${this.interactive&&!this.disabled?
|
|
602
|
+
role=${y(this.interactive?"button":this.image?void 0:"img")}
|
|
603
|
+
aria-label=${y(this.image?void 0:this.ariaLabel?this.ariaLabel:"avatar")}
|
|
604
|
+
tabindex=${y(this.interactive&&!this.disabled?0:void 0)}
|
|
605
605
|
>
|
|
606
|
-
${
|
|
606
|
+
${this.image?.length>0?l`<img
|
|
607
607
|
part="nys-avatar__image"
|
|
608
608
|
class="nys-avatar__image"
|
|
609
609
|
src=${this.image}
|
|
610
610
|
alt=${this.ariaLabel||"avatar"}
|
|
611
611
|
loading=${this.lazy?"lazy":"eager"}
|
|
612
|
-
/>`:
|
|
612
|
+
/>`:this.initials?.length>0?l`<span
|
|
613
613
|
part="nys-avatar__initials"
|
|
614
614
|
class="nys-avatar__initials"
|
|
615
615
|
aria-hidden="true"
|
|
616
616
|
>${this.initials}</span
|
|
617
|
-
>`:this._slotHasContent?
|
|
617
|
+
>`:this._slotHasContent?l`<div part="nys-avatar__icon">
|
|
618
618
|
<slot></slot>
|
|
619
|
-
</div>`:
|
|
619
|
+
</div>`:l`<div part="nys-avatar__icon">
|
|
620
620
|
<nys-icon
|
|
621
621
|
label="nys-avatar__icon"
|
|
622
|
-
name=${
|
|
622
|
+
name=${this.icon?.length>0?this.icon:"account_circle"}
|
|
623
623
|
></nys-icon>
|
|
624
624
|
</div>`}
|
|
625
625
|
</div>
|
|
626
626
|
</div>
|
|
627
627
|
</label>
|
|
628
|
-
`}};
|
|
628
|
+
`}};_t.styles=G1;let O=_t;Q([i({type:String})],O.prototype,"id"),Q([i({type:String})],O.prototype,"ariaLabel"),Q([i({type:String})],O.prototype,"image"),Q([i({type:String})],O.prototype,"initials"),Q([i({type:String})],O.prototype,"icon"),Q([i({type:String})],O.prototype,"color"),Q([i({type:Boolean,reflect:!0})],O.prototype,"interactive"),Q([i({type:Boolean,reflect:!0})],O.prototype,"disabled"),Q([i({type:Boolean,reflect:!0})],O.prototype,"lazy"),Q([M()],O.prototype,"_slotHasContent"),customElements.get("nys-avatar")||customElements.define("nys-avatar",O);const K1=g`
|
|
629
629
|
.nys-backtotop {
|
|
630
630
|
/* These props ARE NOT publicly overridable */
|
|
631
631
|
--_nys-button-border-radius--start: var(--nys-radius-round, 1776px);
|
|
@@ -648,16 +648,16 @@
|
|
|
648
648
|
.visible {
|
|
649
649
|
display: inline-flex;
|
|
650
650
|
}
|
|
651
|
-
`;var
|
|
651
|
+
`;var X1=Object.defineProperty,st=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&X1(e,t,s),s};const Ct=class Ct extends p{constructor(){super(),this.position="right",this.visible=!1,this.isMobile=!1,this.forceVisible=!1,this._handleScroll=this._handleScroll.bind(this),this._handleResize=this._handleResize.bind(this),this.mediaQuery=window.matchMedia("(max-width: 480px)")}connectedCallback(){super.connectedCallback(),this.forceVisible=this.hasAttribute("visible"),window.addEventListener("scroll",this._handleScroll),this.mediaQuery.addEventListener("change",this._handleResize),this._handleResize()}disconnectedCallback(){window.removeEventListener("scroll",this._handleScroll),this.mediaQuery.removeEventListener("change",this._handleResize),super.disconnectedCallback()}_handleScroll(){if(this.forceVisible)return;const e=window.innerHeight,t=document.documentElement.scrollHeight;this.visible=t>=e*4&&window.scrollY>e*1.5}_scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}_handleResize(){this.isMobile=this.mediaQuery.matches}render(){const e=["nys-backtotop",this.position,this.visible?"visible":""].filter(Boolean).join(" ");return l`<nys-button
|
|
652
652
|
id="nys-backtotop"
|
|
653
653
|
prefixIcon="chevron_up"
|
|
654
654
|
variant="outline"
|
|
655
655
|
label="Back to top"
|
|
656
656
|
size="sm"
|
|
657
657
|
class="${e}"
|
|
658
|
-
.onClick=${this._scrollToTop}
|
|
659
658
|
?circle=${this.isMobile}
|
|
660
|
-
|
|
659
|
+
@nys-click=${this._scrollToTop}
|
|
660
|
+
></nys-button>`}};Ct.styles=K1;let fe=Ct;st([i({type:String})],fe.prototype,"position"),st([i({type:Boolean,reflect:!0})],fe.prototype,"visible"),st([M()],fe.prototype,"isMobile"),st([M()],fe.prototype,"forceVisible"),customElements.get("nys-backtotop")||customElements.define("nys-backtotop",fe);const Q1=g`
|
|
661
661
|
:host {
|
|
662
662
|
/* Anything that can be overridden should be defined here */
|
|
663
663
|
|
|
@@ -1316,20 +1316,20 @@
|
|
|
1316
1316
|
align-items: center;
|
|
1317
1317
|
user-select: none;
|
|
1318
1318
|
}
|
|
1319
|
-
`;var
|
|
1320
|
-
${this.href?
|
|
1319
|
+
`;var J1=Object.defineProperty,es=Object.getOwnPropertyDescriptor,x=(a,e,t,o)=>{for(var s=o>1?void 0:o?es(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&J1(e,t,s),s};let ts=0;const C=(I=class extends p{constructor(){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()}get size(){return this._size}set size(e){this._size=I.VALID_SIZES.includes(e)?e:"md"}get variant(){return this._variant}set variant(e){this._variant=I.VALID_VARIANTS.includes(e)?e:"filled"}get type(){return this._type}set type(e){this._type=I.VALID_TYPES.includes(e)?e:"button"}get target(){return this._target}set target(e){this._target=I.VALID_TARGETS.includes(e)?e:"_self"}async getButtonElement(){await this.updateComplete;const e=this.shadowRoot?.querySelector("a.nys-button")||null;if(e)return e;const t=this.shadowRoot?.querySelector("button.nys-button")||null;return t||null}connectedCallback(){super.connectedCallback(),this.id||(this.id=this._generateUniqueId())}_generateUniqueId(){return`nys-button-${Date.now()}-${ts++}`}_manageFormAction(){typeof this.onClick=="function"&&this.onClick!==null&&this.onClick(new Event("click"));const e=this._internals.form;if(e)switch(this.type){case"submit":e.requestSubmit();break;case"reset":e.reset();break}}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this.shadowRoot?.querySelector(".nys-button")?.classList.remove("active-focus"),this.dispatchEvent(new Event("nys-blur"))}_handleClick(e){if(this.disabled){e.preventDefault();return}this._manageFormAction(),this.dispatchEvent(new Event("nys-click"))}_handleKeydown(e){if(e.code==="Space"||e.code==="Enter"||e.key===" "||e.key==="Enter"){if(this.disabled)return;if(e.preventDefault(),this.href){const t=this.renderRoot.querySelector("a.nys-button");t&&t.click()}else this._handleAnyAttributeFunction(),this._handleClick(e)}}_handleAnyAttributeFunction(){const e=this.getAttribute("onClick");e&&new Function("return "+e)()}focus(e){const t=this.renderRoot.querySelector(this.href?"a.nys-button":"button.nys-button");t?t.focus(e):super.focus(e)}render(){return l`
|
|
1320
|
+
${this.href?l`
|
|
1321
1321
|
<div class="nys-button__linkwrapper">
|
|
1322
1322
|
<a
|
|
1323
1323
|
class="nys-button"
|
|
1324
|
-
id=${
|
|
1325
|
-
name=${
|
|
1324
|
+
id=${y(this.id)}
|
|
1325
|
+
name=${y(this.name?this.name:void 0)}
|
|
1326
1326
|
?disabled=${this.disabled}
|
|
1327
1327
|
aria-disabled="${this.disabled?"true":"false"}"
|
|
1328
|
-
value=${
|
|
1328
|
+
value=${y(this.value?this.value:void 0)}
|
|
1329
1329
|
href=${this.href}
|
|
1330
1330
|
target=${this.target}
|
|
1331
|
-
aria-label=${
|
|
1332
|
-
aria-description=${
|
|
1331
|
+
aria-label=${y(this.ariaLabel||this.label||(this.circle?this.icon:null)||"button")}
|
|
1332
|
+
aria-description=${y(this.ariaDescription||void 0)}
|
|
1333
1333
|
@click=${this._handleClick}
|
|
1334
1334
|
@focus="${this._handleFocus}"
|
|
1335
1335
|
@blur="${this._handleBlur}"
|
|
@@ -1337,14 +1337,14 @@
|
|
|
1337
1337
|
role="button"
|
|
1338
1338
|
tabindex="${this.disabled?-1:0}"
|
|
1339
1339
|
>
|
|
1340
|
-
${this.prefixIcon&&this.variant!=="text"?
|
|
1340
|
+
${this.prefixIcon&&this.variant!=="text"?l`<slot name="prefix-icon">
|
|
1341
1341
|
<nys-icon size="16" name=${this.prefixIcon}></nys-icon>
|
|
1342
1342
|
</slot>`:""}
|
|
1343
|
-
${this.label&&!this.circle?
|
|
1344
|
-
${this.suffixIcon&&this.variant!=="text"?
|
|
1343
|
+
${this.label&&!this.circle?l`<div class="nys-button__text">${this.label}</div>`:""}
|
|
1344
|
+
${this.suffixIcon&&this.variant!=="text"?l`<slot name="suffix-icon">
|
|
1345
1345
|
<nys-icon size="16" name=${this.suffixIcon}></nys-icon>
|
|
1346
1346
|
</slot>`:""}
|
|
1347
|
-
${this.circle&&this.icon?
|
|
1347
|
+
${this.circle&&this.icon?l`<slot name="circle-icon"
|
|
1348
1348
|
><nys-icon
|
|
1349
1349
|
size=${this.size==="sm"?"24":this.size==="lg"?"40":"32"}
|
|
1350
1350
|
name=${this.icon}
|
|
@@ -1352,33 +1352,32 @@
|
|
|
1352
1352
|
></slot>`:""}
|
|
1353
1353
|
</a>
|
|
1354
1354
|
</div>
|
|
1355
|
-
`:
|
|
1355
|
+
`:l`
|
|
1356
1356
|
<button
|
|
1357
1357
|
class="nys-button"
|
|
1358
|
-
id=${
|
|
1359
|
-
name=${
|
|
1358
|
+
id=${y(this.id)}
|
|
1359
|
+
name=${y(this.name?this.name:void 0)}
|
|
1360
1360
|
?disabled=${this.disabled}
|
|
1361
|
-
form=${
|
|
1362
|
-
value=${
|
|
1361
|
+
form=${y(this.form||void 0)}
|
|
1362
|
+
value=${y(this.value?this.value:void 0)}
|
|
1363
1363
|
type=${this.type}
|
|
1364
|
-
aria-controls=${
|
|
1365
|
-
aria-label=${
|
|
1366
|
-
aria-description=${
|
|
1367
|
-
onclick="${this.onClick}"
|
|
1364
|
+
aria-controls=${y(this.ariaControls||void 0)}
|
|
1365
|
+
aria-label=${y(this.ariaLabel||this.label||(this.circle?this.icon:null)||this.prefixIcon||this.suffixIcon||"button")}
|
|
1366
|
+
aria-description=${y(this.ariaDescription||void 0)}
|
|
1368
1367
|
@click=${this._handleClick}
|
|
1369
1368
|
@focus="${this._handleFocus}"
|
|
1370
1369
|
@blur="${this._handleBlur}"
|
|
1371
1370
|
@keydown="${this._handleKeydown}"
|
|
1372
1371
|
role="button"
|
|
1373
1372
|
>
|
|
1374
|
-
${this.prefixIcon&&this.variant!=="text"?
|
|
1373
|
+
${this.prefixIcon&&this.variant!=="text"?l`<slot name="prefix-icon">
|
|
1375
1374
|
<nys-icon size="16" name=${this.prefixIcon}></nys-icon>
|
|
1376
1375
|
</slot>`:""}
|
|
1377
|
-
${this.label&&!this.circle?
|
|
1378
|
-
${this.suffixIcon&&this.variant!=="text"?
|
|
1376
|
+
${this.label&&!this.circle?l`<div class="nys-button__text">${this.label}</div>`:""}
|
|
1377
|
+
${this.suffixIcon&&this.variant!=="text"?l`<slot name="suffix-icon">
|
|
1379
1378
|
<nys-icon size="16" name=${this.suffixIcon}></nys-icon>
|
|
1380
1379
|
</slot>`:""}
|
|
1381
|
-
${this.circle&&this.icon?
|
|
1380
|
+
${this.circle&&this.icon?l`<slot name="circle-icon">
|
|
1382
1381
|
<nys-icon
|
|
1383
1382
|
size=${this.size==="sm"?"24":this.size==="lg"?"40":"32"}
|
|
1384
1383
|
name=${this.icon}
|
|
@@ -1386,7 +1385,7 @@
|
|
|
1386
1385
|
</slot>`:""}
|
|
1387
1386
|
</button>
|
|
1388
1387
|
`}
|
|
1389
|
-
`}},
|
|
1388
|
+
`}},I.VALID_SIZES=["sm","md","lg"],I.VALID_VARIANTS=["filled","outline","ghost","text"],I.VALID_TYPES=["submit","reset","button"],I.VALID_TARGETS=["_self","_blank","_parent","_top","framename"],I.styles=Q1,I.formAssociated=!0,I);x([i({type:String})],C.prototype,"id",2),x([i({type:String,reflect:!0})],C.prototype,"name",2),x([i({reflect:!0})],C.prototype,"size",1),x([i({type:Boolean,reflect:!0})],C.prototype,"fullWidth",2),x([i({reflect:!0})],C.prototype,"variant",1),x([i({type:Boolean,reflect:!0})],C.prototype,"inverted",2),x([i({type:String})],C.prototype,"label",2),x([i({type:String})],C.prototype,"ariaLabel",2),x([i({type:String})],C.prototype,"ariaControls",2),x([i({type:String})],C.prototype,"prefixIcon",2),x([i({type:String})],C.prototype,"suffixIcon",2),x([i({type:Boolean,reflect:!0})],C.prototype,"circle",2),x([i({type:String})],C.prototype,"icon",2),x([i({type:Boolean,reflect:!0})],C.prototype,"disabled",2),x([i({type:String,reflect:!0})],C.prototype,"form",2),x([i({type:String})],C.prototype,"value",2),x([i({type:String})],C.prototype,"ariaDescription",2),x([i({reflect:!0})],C.prototype,"type",1),x([i({attribute:!1})],C.prototype,"onClick",2),x([i({type:String})],C.prototype,"href",2),x([i({reflect:!0})],C.prototype,"target",1);let Kt=C;customElements.get("nys-button")||customElements.define("nys-button",Kt);const ss=g`
|
|
1390
1389
|
:host {
|
|
1391
1390
|
/* Anything that can be overridden should be defined here */
|
|
1392
1391
|
|
|
@@ -1465,14 +1464,14 @@
|
|
|
1465
1464
|
.nys-badge__prefix {
|
|
1466
1465
|
font-weight: var(--_nys-badge-prefix-font-weight);
|
|
1467
1466
|
}
|
|
1468
|
-
`;var
|
|
1467
|
+
`;var os=Object.defineProperty,rs=Object.getOwnPropertyDescriptor,ge=(a,e,t,o)=>{for(var s=o>1?void 0:o?rs(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&os(e,t,s),s};const se=(j=class extends p{constructor(){super(...arguments),this.id="",this.name="",this._size="md",this._intent="neutral",this.prefixLabel="",this.label="",this._prefixIcon="",this._suffixIcon=""}get size(){return this._size}set size(e){this._size=j.VALID_SIZES.includes(e)?e:"md"}get intent(){return this._intent}set intent(e){this._intent=j.VALID_INTENT.includes(e)?e:"neutral"}get prefixIcon(){return this._prefixIcon}set prefixIcon(e){e===""||e===null?this._prefixIcon=!0:e==="false"||e===!1?this._prefixIcon="":this._prefixIcon=e}get suffixIcon(){return this._suffixIcon}set suffixIcon(e){e===""||e===null?this._suffixIcon=!0:e==="false"||e===!1?this._suffixIcon="":this._suffixIcon=e}connectedCallback(){super.connectedCallback();const e=this.getAttribute("prefixicon");e!==null&&this.prefixIcon===""&&(this.prefixIcon=e);const t=this.getAttribute("suffixicon");t!==null&&this.suffixIcon===""&&(this.suffixIcon=t)}resolveIcon(e){return e===!0?j.DEFAULT_ICONS[this.intent]??"info":typeof e=="string"&&e.trim()!==""?e:null}render(){const e=this.resolveIcon(this.prefixIcon),t=this.resolveIcon(this.suffixIcon);return l`
|
|
1469
1468
|
<div class="nys-badge">
|
|
1470
|
-
${e?
|
|
1471
|
-
${this.prefixLabel?
|
|
1469
|
+
${e?l`<nys-icon size="16" name=${e}></nys-icon>`:""}
|
|
1470
|
+
${this.prefixLabel?l`<div class="nys-badge__prefix">${this.prefixLabel}</div>`:""}
|
|
1472
1471
|
<div class="nys-badge__label">${this.label}</div>
|
|
1473
|
-
${t?
|
|
1472
|
+
${t?l`<nys-icon size="16" name=${t}></nys-icon>`:""}
|
|
1474
1473
|
</div>
|
|
1475
|
-
`}},j.VALID_SIZES=["sm","md"],j.VALID_INTENT=["neutral","error","success","warning"],j.styles=
|
|
1474
|
+
`}},j.VALID_SIZES=["sm","md"],j.VALID_INTENT=["neutral","error","success","warning"],j.styles=ss,j.DEFAULT_ICONS={neutral:"info",error:"emergency_home",success:"check_circle",warning:"warning"},j);ge([i({type:String})],se.prototype,"id",2),ge([i({type:String,reflect:!0})],se.prototype,"name",2),ge([i({reflect:!0})],se.prototype,"size",1),ge([i({reflect:!0})],se.prototype,"intent",1),ge([i({type:String})],se.prototype,"prefixLabel",2),ge([i({type:String})],se.prototype,"label",2),ge([i({type:String,attribute:"prefixicon"})],se.prototype,"prefixIcon",1),ge([i({type:String,attribute:"suffixicon"})],se.prototype,"suffixIcon",1);let Xt=se;customElements.get("nys-badge")||customElements.define("nys-badge",Xt);const Qt=g`
|
|
1476
1475
|
:host {
|
|
1477
1476
|
/* Anything that can be overridden should be defined here */
|
|
1478
1477
|
|
|
@@ -1854,7 +1853,7 @@
|
|
|
1854
1853
|
overflow: hidden;
|
|
1855
1854
|
border: 0;
|
|
1856
1855
|
}
|
|
1857
|
-
`;var
|
|
1856
|
+
`;var ns=Object.defineProperty,is=Object.getOwnPropertyDescriptor,Z=(a,e,t,o)=>{for(var s=o>1?void 0:o?is(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&ns(e,t,s),s};let as=0;const z=(le=class extends p{constructor(){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()}get size(){return this._size}set size(e){this._size=le.VALID_SIZES.includes(e)?e:"md"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-checkbox-${Date.now()}-${as++}`),this.addEventListener("nys-change",this._handleCheckboxChange),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("nys-change",this._handleCheckboxChange),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setGroupExist(),this._updateCheckboxSize(),this._updateCheckboxTile(),this._updateCheckboxShowError(),this._getSlotDescriptionForAria()}updated(e){e.has("required")&&this.required&&this._setupCheckboxRequired(),e.has("size")&&this._updateCheckboxSize(),e.has("tile")&&this._updateCheckboxTile(),e.has("inverted")&&this._updateCheckboxInvert(),e.has("showError")&&this._updateCheckboxShowError(),e.has("form")&&this._updateCheckboxForm()}_setGroupExist(){this.querySelectorAll("nys-checkbox").forEach(t=>{t.groupExist=!0})}async _setupCheckboxRequired(){const e=this.querySelector("nys-checkbox"),t=this.errorMessage||"This field is required",o=e?await e.getInputElement():null;this._internals.setValidity({valueMissing:!0},t,o||this)}async _manageRequire(){if(this.required){const e=this.errorMessage||"Please select at least one option.",t=this.querySelector("nys-checkbox"),o=t?await t.getInputElement().catch(()=>null):null,s=this.querySelectorAll("nys-checkbox");Array.from(s).some(n=>n.checked)?(this._internals.setValidity({}),this.showError=!1):(this._internals.setValidity({valueMissing:!0},e,o||this),this.showError=!0)}}_updateCheckboxSize(){this.querySelectorAll("nys-checkbox").forEach(t=>{t.setAttribute("size",this.size)})}_updateCheckboxTile(){this.querySelectorAll("nys-checkbox").forEach(t=>{this.tile?t.toggleAttribute("tile",!0):t.removeAttribute("tile")})}_updateCheckboxInvert(){this.querySelectorAll("nys-checkbox").forEach(t=>{this.inverted?t.toggleAttribute("inverted",!0):t.removeAttribute("inverted")})}_updateCheckboxShowError(){this.querySelectorAll("nys-checkbox").forEach(t=>{this.showError?t.setAttribute("showError",""):t.removeAttribute("showError")})}_updateCheckboxForm(){this.querySelectorAll("nys-checkbox").forEach(t=>{this.showError&&this.form!==null?t.setAttribute("form",this.form):t.removeAttribute("form")})}_getSlotDescriptionForAria(){const t=this.shadowRoot?.querySelector('slot[name="description"]')?.assignedNodes({flatten:!0})||[];this._slottedDescriptionText=t.map(o=>o.textContent?.trim()).filter(Boolean).join(", ")}async _handleInvalid(e){e.preventDefault(),this.showError=!0,this._manageRequire();const t=this.querySelector("nys-checkbox"),o=t?await t.getInputElement():null;if(o){const s=this._internals.form;s?Array.from(s.elements).find(c=>{if(c.tagName.toLowerCase()==="nys-checkboxgroup"){if(Array.from(this.querySelectorAll("nys-checkbox")).filter(f=>f.checked).length===0)return c}else return typeof c.checkValidity=="function"&&!c.checkValidity()})===this&&o.focus():o.focus()}}_handleCheckboxChange(e){const t=e,{name:o}=t.detail,r=Array.from(this.querySelectorAll("nys-checkbox")).filter(n=>n.checked).map(n=>n.value);this.name=o,this._internals.setFormValue(r.join(", ")),this._manageRequire()}render(){return l`
|
|
1858
1857
|
<div class="nys-checkboxgroup">
|
|
1859
1858
|
<nys-label
|
|
1860
1859
|
for=${this.id}
|
|
@@ -1862,7 +1861,7 @@
|
|
|
1862
1861
|
description=${this.description}
|
|
1863
1862
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
1864
1863
|
tooltip=${this._tooltip}
|
|
1865
|
-
?
|
|
1864
|
+
?inverted=${this.inverted}
|
|
1866
1865
|
>
|
|
1867
1866
|
<slot name="description" slot="description">${this.description}</slot>
|
|
1868
1867
|
</nys-label>
|
|
@@ -1880,19 +1879,19 @@
|
|
|
1880
1879
|
.showDivider=${!this.tile}
|
|
1881
1880
|
></nys-errormessage>
|
|
1882
1881
|
</div>
|
|
1883
|
-
`}},
|
|
1882
|
+
`}},le.VALID_SIZES=["sm","md"],le.styles=Qt,le.formAssociated=!0,le);Z([i({type:String})],z.prototype,"id",2),Z([i({type:String,reflect:!0})],z.prototype,"name",2),Z([i({type:Boolean,reflect:!0})],z.prototype,"required",2),Z([i({type:Boolean,reflect:!0})],z.prototype,"optional",2),Z([i({type:Boolean,reflect:!0})],z.prototype,"showError",2),Z([i({type:String})],z.prototype,"errorMessage",2),Z([i({type:String})],z.prototype,"label",2),Z([i({type:String})],z.prototype,"description",2),Z([i({type:Boolean,reflect:!0})],z.prototype,"tile",2),Z([i({type:String})],z.prototype,"_tooltip",2),Z([i({type:Boolean,reflect:!0})],z.prototype,"inverted",2),Z([i({type:String,reflect:!0})],z.prototype,"form",2),Z([M()],z.prototype,"_slottedDescriptionText",2),Z([i({reflect:!0})],z.prototype,"size",1);let Jt=z;customElements.get("nys-checkboxgroup")||customElements.define("nys-checkboxgroup",Jt);var ls=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,V=(a,e,t,o)=>{for(var s=o>1?void 0:o?cs(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&ls(e,t,s),s};let ds=0;const E=(ce=class extends p{constructor(){super(),this.checked=!1,this.disabled=!1,this.required=!1,this.label="",this.description="",this.id="",this.name="",this.value="",this.form=null,this.showError=!1,this.errorMessage="",this.groupExist=!1,this.tile=!1,this.inverted=!1,this._size="md",this._manageLabelClick=()=>{const e=this.shadowRoot?.querySelector("nys-label"),t=this.shadowRoot?.querySelector("input");e&&t&&e.addEventListener("click",()=>t.click())},this._internals=this.attachInternals()}get size(){return this._size}set size(e){this._size=ce.VALID_SIZES.includes(e)?e:"md"}async getInputElement(){return await this.updateComplete,this.shadowRoot?.querySelector("input")||null}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-checkbox-${Date.now()}-${ds++}`),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setValue(),this._manageRequire(),this._manageLabelClick()}formResetCallback(){this.checked=!1}_setValue(){this.groupExist||this._internals.setFormValue(this.checked?this.value:null)}_manageRequire(){const e=this.shadowRoot?.querySelector("input"),t=this.errorMessage||"This field is required";e&&(this.required&&!this.checked?(this._internals.ariaRequired="true",this._internals.setValidity({valueMissing:!0},t,e)):this._internals.setValidity({}))}_setValidityMessage(e=""){const t=this.shadowRoot?.querySelector("input");t&&(this.showError=!!e,this.errorMessage?.trim()&&e!==""&&(e=this.errorMessage),this._internals.setValidity(e?{customError:!0}:{},e,t))}_validate(){const e=this.shadowRoot?.querySelector("input");if(!e)return;const t=e.validity;let o="";t.valueMissing&&(o="This field is required"),this._setValidityMessage(o)}checkValidity(){if(this.required&&!this.checked)return!1;const e=this.shadowRoot?.querySelector("input");return e?e.checkValidity():!0}_handleInvalid(e){e.preventDefault(),this.showError=!0,this._validate();const t=this.shadowRoot?.querySelector("input");if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&t.focus():t.focus()}}_emitChangeEvent(){this.dispatchEvent(new CustomEvent("nys-change",{detail:{id:this.id,checked:this.checked,name:this.name,value:this.value},bubbles:!0,composed:!0}))}_handleChange(e){const{checked:t}=e.target;this.checked=t,this.groupExist||this._internals.setFormValue(this.checked?this.value:null),this._validate(),this._emitChangeEvent()}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this.dispatchEvent(new Event("nys-blur"))}async _handleKeydown(e){e.code==="Space"&&(e.preventDefault(),this.disabled||(this.checked=!this.checked,this._internals.setFormValue(this.checked?this.value:null),await this.updateComplete,this._validate(),this._emitChangeEvent()))}render(){return l`
|
|
1884
1883
|
<label class="nys-checkbox">
|
|
1885
1884
|
<div class="nys-checkbox__checkboxwrapper">
|
|
1886
1885
|
<input
|
|
1887
1886
|
id="${this.id}"
|
|
1888
1887
|
class="nys-checkbox__checkbox"
|
|
1889
1888
|
type="checkbox"
|
|
1890
|
-
name="${
|
|
1889
|
+
name="${y(this.name?this.name:void 0)}"
|
|
1891
1890
|
.checked=${this.checked}
|
|
1892
1891
|
?disabled=${this.disabled}
|
|
1893
1892
|
.value=${this.value}
|
|
1894
1893
|
?required="${this.required}"
|
|
1895
|
-
form=${
|
|
1894
|
+
form=${y(this.form||void 0)}
|
|
1896
1895
|
aria-checked="${this.checked}"
|
|
1897
1896
|
aria-disabled="${this.disabled?"true":"false"}"
|
|
1898
1897
|
aria-required="${this.required}"
|
|
@@ -1903,20 +1902,20 @@
|
|
|
1903
1902
|
@keydown="${this._handleKeydown}"
|
|
1904
1903
|
aria-label="${this.label}"
|
|
1905
1904
|
/>
|
|
1906
|
-
${this.checked?
|
|
1905
|
+
${this.checked?l`<nys-icon
|
|
1907
1906
|
for="${this.id}"
|
|
1908
1907
|
name="check"
|
|
1909
1908
|
size="${this.size==="md"?"4xl":this.size==="sm"?"2xl":"xl"}"
|
|
1910
1909
|
class="nys-checkbox__icon"
|
|
1911
1910
|
></nys-icon>`:""}
|
|
1912
1911
|
</div>
|
|
1913
|
-
${this.label&&
|
|
1912
|
+
${this.label&&l`
|
|
1914
1913
|
<nys-label
|
|
1915
1914
|
for=${this.id}
|
|
1916
1915
|
label=${this.label}
|
|
1917
|
-
description=${
|
|
1918
|
-
flag=${
|
|
1919
|
-
?
|
|
1916
|
+
description=${y(this.description??void 0)}
|
|
1917
|
+
flag=${y(this.required?"required":void 0)}
|
|
1918
|
+
?inverted=${this.inverted}
|
|
1920
1919
|
>
|
|
1921
1920
|
<slot name="description" slot="description"
|
|
1922
1921
|
>${this.description}</slot
|
|
@@ -1924,19 +1923,19 @@
|
|
|
1924
1923
|
</nys-label>
|
|
1925
1924
|
`}
|
|
1926
1925
|
</label>
|
|
1927
|
-
${
|
|
1926
|
+
${this.parentElement?.tagName.toLowerCase()!=="nys-checkboxgroup"?l`<nys-errormessage
|
|
1928
1927
|
id="single-error-message"
|
|
1929
1928
|
?showError=${this.showError}
|
|
1930
1929
|
errorMessage=${this._internals.validationMessage||this.errorMessage}
|
|
1931
1930
|
.showDivider=${!this.tile}
|
|
1932
1931
|
></nys-errormessage>`:""}
|
|
1933
|
-
`}},
|
|
1932
|
+
`}},ce.VALID_SIZES=["sm","md"],ce.styles=Qt,ce.formAssociated=!0,ce);V([i({type:Boolean,reflect:!0})],E.prototype,"checked",2),V([i({type:Boolean,reflect:!0})],E.prototype,"disabled",2),V([i({type:Boolean,reflect:!0})],E.prototype,"required",2),V([i({type:String})],E.prototype,"label",2),V([i({type:String})],E.prototype,"description",2),V([i({type:String})],E.prototype,"id",2),V([i({type:String,reflect:!0})],E.prototype,"name",2),V([i({type:String})],E.prototype,"value",2),V([i({type:String,reflect:!0})],E.prototype,"form",2),V([i({type:Boolean,reflect:!0})],E.prototype,"showError",2),V([i({type:String})],E.prototype,"errorMessage",2),V([i({type:Boolean})],E.prototype,"groupExist",2),V([i({type:Boolean,reflect:!0})],E.prototype,"tile",2),V([i({type:Boolean,reflect:!0})],E.prototype,"inverted",2),V([i({reflect:!0})],E.prototype,"size",1);let e1=E;customElements.get("nys-checkbox")||customElements.define("nys-checkbox",e1);const hs=g`
|
|
1934
1933
|
:host {
|
|
1935
1934
|
/* Anything that can be overridden should be defined here */
|
|
1936
1935
|
|
|
1937
1936
|
/* Global Divider Styles */
|
|
1938
1937
|
--_nys-divider-size: var(--nys-size-1px, 1px);
|
|
1939
|
-
--_nys-divider-color: var(--nys-color-neutral-
|
|
1938
|
+
--_nys-divider-color: var(--nys-color-neutral-500, #797c7f);
|
|
1940
1939
|
--_nys-divider-width: 100%;
|
|
1941
1940
|
}
|
|
1942
1941
|
/* Inverted */
|
|
@@ -1952,7 +1951,7 @@
|
|
|
1952
1951
|
margin: 0;
|
|
1953
1952
|
border: none;
|
|
1954
1953
|
}
|
|
1955
|
-
`;var
|
|
1954
|
+
`;var ys=Object.defineProperty,us=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&ys(e,t,s),s};const mt=class mt extends p{constructor(){super(),this.inverted=!1}render(){return l`<hr class="nys-divider" />`}};mt.styles=hs;let je=mt;us([i({type:Boolean,reflect:!0})],je.prototype,"inverted"),customElements.get("nys-divider")||customElements.define("nys-divider",je);const ps=g`
|
|
1956
1955
|
:host {
|
|
1957
1956
|
--_nys-errormessage-font-family: var(
|
|
1958
1957
|
--nys-font-family-ui,
|
|
@@ -2001,10 +2000,10 @@
|
|
|
2001
2000
|
border-top: var(--_nys-errormessage-width--divider) solid
|
|
2002
2001
|
var(--_nys-errormessage-color);
|
|
2003
2002
|
}
|
|
2004
|
-
`;var
|
|
2003
|
+
`;var vs=Object.defineProperty,vt=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&vs(e,t,s),s};const nt=class nt extends p{constructor(){super(),this.showError=!1,this.errorMessage="",this.showDivider=!1,this._internals=this.attachInternals()}render(){return l`${this.showError?l`<div class="nys-errormessage" ?showDivider=${this.showDivider}>
|
|
2005
2004
|
<nys-icon name="error" size="2xl"></nys-icon>
|
|
2006
2005
|
${this._internals.validationMessage||this.errorMessage}
|
|
2007
|
-
</div>`:""}`}};
|
|
2006
|
+
</div>`:""}`}};nt.styles=ps,nt.formAssociated=!0;let Se=nt;vt([i({type:Boolean})],Se.prototype,"showError"),vt([i({type:String})],Se.prototype,"errorMessage"),vt([i({type:Boolean,reflect:!0})],Se.prototype,"showDivider"),customElements.get("nys-errormessage")||customElements.define("nys-errormessage",Se);async function fs(a,e){if(!e||e.trim()==="")return!0;const t=e.toLowerCase().split(",").map(r=>r.trim()),o=a.name.toLowerCase(),s=o.includes(".")?o.split(".").pop():"";for(const r of t)if(r.startsWith(".")&&r.slice(1)===s||r.endsWith("/*")&&a.type.startsWith(r.slice(0,-1))||a.type===r)return!0;return!1}const gs=g`
|
|
2008
2007
|
:host {
|
|
2009
2008
|
/* Global Fileinput Styles */
|
|
2010
2009
|
--_nys-fileinput-gap: var(--nys-space-100, 8px);
|
|
@@ -2137,7 +2136,7 @@
|
|
|
2137
2136
|
progress::-webkit-progress-bar {
|
|
2138
2137
|
background-color: var(--_nys-fileinput-progress-background);
|
|
2139
2138
|
}
|
|
2140
|
-
`,
|
|
2139
|
+
`,bs=g`
|
|
2141
2140
|
:host {
|
|
2142
2141
|
/* Global fileitem Styles */
|
|
2143
2142
|
--_nys-fileitem-border-radius: var(--nys-radius-md, 4px);
|
|
@@ -2282,7 +2281,7 @@
|
|
|
2282
2281
|
transform: rotate(360deg);
|
|
2283
2282
|
}
|
|
2284
2283
|
}
|
|
2285
|
-
`;var
|
|
2284
|
+
`;var _s=Object.defineProperty,ot=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&_s(e,t,s),s};const xt=class xt extends p{constructor(){super(...arguments),this.filename="",this.status="pending",this.progress=0,this.errorMessage=""}_handleRemove(){this.dispatchEvent(new CustomEvent("nys-fileRemove",{detail:{filename:this.filename},bubbles:!0,composed:!0}))}splitFilename(e){const t=e.lastIndexOf("."),o=t!==-1?e.slice(t):"",s=t!==-1?e.slice(0,t):e,r=s.slice(0,s.length-3),n=s.slice(-3);return{startPart:r,endPart:n,extension:o}}render(){const{startPart:e,endPart:t,extension:o}=this.splitFilename(this.filename);return l`
|
|
2286
2285
|
<div
|
|
2287
2286
|
class="file-item ${this.status}"
|
|
2288
2287
|
aria-busy=${this.status==="processing"?"true":"false"}
|
|
@@ -2301,7 +2300,7 @@
|
|
|
2301
2300
|
>${t}${o}</span
|
|
2302
2301
|
>
|
|
2303
2302
|
</div>
|
|
2304
|
-
${this.errorMessage?
|
|
2303
|
+
${this.errorMessage?l`<p
|
|
2305
2304
|
class="file-item__error"
|
|
2306
2305
|
role="alert"
|
|
2307
2306
|
aria-live="assertive"
|
|
@@ -2318,11 +2317,11 @@
|
|
|
2318
2317
|
ariaLabel="close button"
|
|
2319
2318
|
size="sm"
|
|
2320
2319
|
variant="ghost"
|
|
2321
|
-
|
|
2320
|
+
@nys-click=${this._handleRemove}
|
|
2322
2321
|
ariaLabel="Remove file: ${this.filename}"
|
|
2323
2322
|
></nys-button>
|
|
2324
2323
|
</div>
|
|
2325
|
-
${this.status==="processing"?
|
|
2324
|
+
${this.status==="processing"?l`<div
|
|
2326
2325
|
class="file-item__progress-container"
|
|
2327
2326
|
role="progressbar"
|
|
2328
2327
|
aria-valuemin="0"
|
|
@@ -2333,7 +2332,7 @@
|
|
|
2333
2332
|
<progress value=${this.progress} max="100"></progress>
|
|
2334
2333
|
</div>`:null}
|
|
2335
2334
|
</div>
|
|
2336
|
-
`}};
|
|
2335
|
+
`}};xt.styles=bs;let Le=xt;ot([i({type:String})],Le.prototype,"filename"),ot([i({type:String})],Le.prototype,"status"),ot([i({type:Number})],Le.prototype,"progress"),ot([i({type:String})],Le.prototype,"errorMessage"),customElements.define("nys-fileitem",Le);var Cs=Object.defineProperty,A=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Cs(e,t,s),s};let ms=0;const it=class it extends p{constructor(){super(),this.id="",this.name="",this.label="",this.description="",this.multiple=!1,this.form=null,this._tooltip="",this.accept="",this.disabled=!1,this.required=!1,this.optional=!1,this.showError=!1,this.errorMessage="",this.dropzone=!1,this.width="full",this.inverted=!1,this._selectedFiles=[],this._dragActive=!1,this._internals=this.attachInternals()}get _isDropDisabled(){return this.disabled||!this.multiple&&this._selectedFiles.length>0}get _buttonAriaLabel(){return this._selectedFiles.length===0?this.multiple?"Choose files: ":"Choose file: ":this.multiple?"Change files: ":"Change file: "}get _buttonAriaDescription(){if(this._selectedFiles.length===0)return`${this.label+" "+this.description}`;const e=this._selectedFiles.some(s=>s.status==="error");let t="";if(this._selectedFiles.length===1)t=`You have selected ${this._selectedFiles[0].file.name}.`;else{const s=this._selectedFiles.map(r=>r.file.name).join(", ");t=`You have selected ${this._selectedFiles.length} files: ${s}`}return`${t}${e?" Error: One or more files are not valid file types.":""}`}get _innerNysButton(){return this.renderRoot.querySelector('[name="file-btn"]')?.shadowRoot?.querySelector("button")}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-fileinput-${Date.now()}-${ms++}`),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setValue()}_setValue(){if(this.multiple){const e=this._selectedFiles.map(t=>t.file);if(e.length>0){const t=new FormData;e.forEach(o=>{t.append(this.name,o)}),this._internals.setFormValue(t)}else this._internals.setFormValue(null)}else{const e=this._selectedFiles[0]?.file||null;this._internals.setFormValue(e)}this._manageRequire()}_manageRequire(){const e=this.shadowRoot?.querySelector("input");if(!e)return;const t=this.errorMessage||"Please upload a file.";this.required&&this._selectedFiles.length==0?(this._internals.ariaRequired="true",this._internals.setValidity({valueMissing:!0},t,e)):(this._internals.ariaRequired="false",this._internals.setValidity({},"",e))}_setValidityMessage(e=""){const t=this.shadowRoot?.querySelector("input");t&&(this.showError=e===(this.errorMessage||"Please upload a file."),this.errorMessage?.trim()&&e!==""&&(e=this.errorMessage),this._internals.setValidity(e?{customError:!0}:{},e,t))}_validate(){const e=this._selectedFiles.some(s=>s.status==="error"),t=this.required&&this._selectedFiles.length===0;let o="";t?o=this.errorMessage||"Please upload a file.":e&&(o="One or more files are invalid."),this._setValidityMessage(o)}checkValidity(){const e=this.shadowRoot?.querySelector("input");return e?e.checkValidity():!0}_handleInvalid(e){e.preventDefault(),this._validate();const t=this._innerNysButton;if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&(t.focus(),t.classList.add("active-focus")):(t.focus(),t.classList.add("active-focus"))}}async _saveSelectedFiles(e){if(this._selectedFiles.some(s=>s.file.name==e.name)||!this.multiple&&this._selectedFiles.length>=1)return;const o={file:e,progress:0,status:"pending"};this._selectedFiles.push(o),await this._processFile(o),this._setValue(),this._validate()}async _processFile(e){e.status="processing";try{if(!await fs(e.file,this.accept)){e.status="error",e.errorMsg="File type is invalid.",this.requestUpdate();return}const o=new FileReader;o.onprogress=s=>{if(s.lengthComputable){const r=Math.round(s.loaded*100/s.total);e.progress=r,this.requestUpdate()}},o.onload=()=>{e.progress=100,e.status="done",this.requestUpdate()},o.onerror=()=>{e.status="error",e.errorMsg="Failed to load file.",this.requestUpdate()},o.readAsArrayBuffer(e.file)}catch{e.status="error",e.errorMsg="Error validating file.",this.requestUpdate()}}_dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("nys-change",{detail:{id:this.id,files:this._selectedFiles},bubbles:!0,composed:!0}))}_openFileDialog(){this.renderRoot.querySelector(".hidden-file-input")?.click()}_handlePostFileSelectionFocus(){if(this.multiple){const e=this._innerNysButton;e&&e.focus()}else this._focusFirstFileItemIfSingleMode()}async _focusFirstFileItemIfSingleMode(){if(!this.multiple){await this.updateComplete;const t=this.renderRoot.querySelector("nys-fileitem")?.shadowRoot?.querySelector(".file-item");t&&(t.setAttribute("tabindex","-1"),t.focus())}}_handleFileChange(e){const o=e.target.files;(o?Array.from(o):[]).map(r=>{this._saveSelectedFiles(r)}),this.requestUpdate(),this._dispatchChangeEvent(),this._handlePostFileSelectionFocus()}_handleFileRemove(e){const t=e.detail.filename;if(this._selectedFiles=this._selectedFiles.filter(o=>o.file.name!==t),this._selectedFiles.length===0){const o=this.shadowRoot?.querySelector("input");o&&(o.value="")}this._setValue(),this._validate(),this.requestUpdate(),this._dispatchChangeEvent()}_onDragOver(e){this.disabled||(e.stopPropagation(),e.preventDefault(),this._dragActive||(this._dragActive=!0,this.requestUpdate()))}_onDragLeave(e){this.disabled||(e.stopPropagation(),e.preventDefault(),e.currentTarget===e.target&&(this._dragActive=!1,this.requestUpdate()))}_onDrop(e){if(this.disabled)return;e.preventDefault(),this._dragActive=!1,this.requestUpdate();const t=e.dataTransfer?.files;if(!t)return;const o=Array.from(t);this.multiple?o.forEach(s=>{this._saveSelectedFiles(s)}):this._saveSelectedFiles(o[0]),this.requestUpdate(),this._dispatchChangeEvent()}render(){return l`<div
|
|
2337
2336
|
class="nys-fileinput"
|
|
2338
2337
|
@nys-fileRemove=${this._handleFileRemove}
|
|
2339
2338
|
>
|
|
@@ -2343,7 +2342,7 @@
|
|
|
2343
2342
|
description=${this.description}
|
|
2344
2343
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
2345
2344
|
_tooltip=${this._tooltip}
|
|
2346
|
-
?
|
|
2345
|
+
?inverted=${this.inverted}
|
|
2347
2346
|
>
|
|
2348
2347
|
<slot name="description" slot="description">${this.description}</slot>
|
|
2349
2348
|
</nys-label>
|
|
@@ -2354,7 +2353,7 @@
|
|
|
2354
2353
|
type="file"
|
|
2355
2354
|
name=${this.name}
|
|
2356
2355
|
accept=${this.accept}
|
|
2357
|
-
form=${
|
|
2356
|
+
form=${y(this.form||void 0)}
|
|
2358
2357
|
?multiple=${this.multiple}
|
|
2359
2358
|
?required=${this.required}
|
|
2360
2359
|
?disabled=${this.disabled||!this.multiple&&this._selectedFiles.length>0}
|
|
@@ -2364,7 +2363,7 @@
|
|
|
2364
2363
|
hidden
|
|
2365
2364
|
/>
|
|
2366
2365
|
|
|
2367
|
-
${this.dropzone?
|
|
2366
|
+
${this.dropzone?l`<div
|
|
2368
2367
|
class="nys-fileinput__dropzone
|
|
2369
2368
|
${this._dragActive?"drag-active":""}
|
|
2370
2369
|
${this._isDropDisabled?"disabled":""}
|
|
@@ -2376,36 +2375,37 @@
|
|
|
2376
2375
|
@drop=${this._isDropDisabled?null:this._onDrop}
|
|
2377
2376
|
aria-label="Drag files here or choose from folder"
|
|
2378
2377
|
>
|
|
2379
|
-
${this._dragActive?
|
|
2380
|
-
id
|
|
2378
|
+
${this._dragActive?l`<p>Drop file to upload</p>`:l` <nys-button
|
|
2379
|
+
id="choose-files-btn-drag"
|
|
2381
2380
|
name="file-btn"
|
|
2382
2381
|
label=${this.multiple?"Choose files":"Choose file"}
|
|
2383
2382
|
variant="outline"
|
|
2384
2383
|
ariaLabel=${this._buttonAriaLabel}
|
|
2385
2384
|
ariaDescription=${this._buttonAriaDescription}
|
|
2386
2385
|
?disabled=${this._isDropDisabled}
|
|
2387
|
-
|
|
2386
|
+
@nys-click=${e=>{e.stopPropagation(),this._openFileDialog()}}
|
|
2387
|
+
@click=${e=>e.stopPropagation()}
|
|
2388
2388
|
></nys-button>
|
|
2389
2389
|
<p>or drag here</p>`}
|
|
2390
|
-
</div>`:
|
|
2391
|
-
id
|
|
2390
|
+
</div>`:l`<nys-button
|
|
2391
|
+
id="choose-files-btn"
|
|
2392
2392
|
name="file-btn"
|
|
2393
2393
|
label=${this.multiple?"Choose files":"Choose file"}
|
|
2394
2394
|
variant="outline"
|
|
2395
2395
|
ariaLabel=${this._buttonAriaLabel}
|
|
2396
2396
|
ariaDescription=${this._buttonAriaDescription}
|
|
2397
2397
|
?disabled=${this.disabled||!this.multiple&&this._selectedFiles.length>0}
|
|
2398
|
-
|
|
2398
|
+
@nys-click=${this._openFileDialog}
|
|
2399
2399
|
></nys-button>`}
|
|
2400
|
-
${this.showError?
|
|
2400
|
+
${this.showError?l`
|
|
2401
2401
|
<nys-errormessage
|
|
2402
2402
|
?showError=${this.showError}
|
|
2403
2403
|
errorMessage=${this._internals.validationMessage||this.errorMessage}
|
|
2404
2404
|
></nys-errormessage>
|
|
2405
2405
|
`:null}
|
|
2406
|
-
${this._selectedFiles.length>0?
|
|
2406
|
+
${this._selectedFiles.length>0?l`
|
|
2407
2407
|
<ul>
|
|
2408
|
-
${this._selectedFiles.map(e=>
|
|
2408
|
+
${this._selectedFiles.map(e=>l`<li>
|
|
2409
2409
|
<nys-fileitem
|
|
2410
2410
|
filename=${e.file.name}
|
|
2411
2411
|
status=${e.status}
|
|
@@ -2415,7 +2415,7 @@
|
|
|
2415
2415
|
</li>`)}
|
|
2416
2416
|
</ul>
|
|
2417
2417
|
`:null}
|
|
2418
|
-
</div>`}};
|
|
2418
|
+
</div>`}};it.styles=gs,it.formAssociated=!0;let k=it;A([i({type:String})],k.prototype,"id"),A([i({type:String,reflect:!0})],k.prototype,"name"),A([i({type:String})],k.prototype,"label"),A([i({type:String})],k.prototype,"description"),A([i({type:Boolean})],k.prototype,"multiple"),A([i({type:String,reflect:!0})],k.prototype,"form"),A([i({type:String})],k.prototype,"_tooltip"),A([i({type:String})],k.prototype,"accept"),A([i({type:Boolean,reflect:!0})],k.prototype,"disabled"),A([i({type:Boolean,reflect:!0})],k.prototype,"required"),A([i({type:Boolean,reflect:!0})],k.prototype,"optional"),A([i({type:Boolean,reflect:!0})],k.prototype,"showError"),A([i({type:String})],k.prototype,"errorMessage"),A([i({type:Boolean})],k.prototype,"dropzone"),A([i({type:String,reflect:!0})],k.prototype,"width"),A([i({type:Boolean,reflect:!0})],k.prototype,"inverted"),customElements.get("nys-fileinput")||customElements.define("nys-fileinput",k);const xs={account_circle:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
2419
2419
|
<mask id="mask0_12372_781" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
|
|
2420
2420
|
<rect width="24" height="24" fill="#D9D9D9"/>
|
|
2421
2421
|
</mask>
|
|
@@ -2939,7 +2939,7 @@
|
|
|
2939
2939
|
<g mask="url(#mask0_12372_621)">
|
|
2940
2940
|
<path d="M6.30002 22.7751C5.43369 22.7751 4.69211 22.4667 4.07527 21.8498C3.45844 21.2328 3.15002 20.4913 3.15002 19.6251V10.2251C3.15002 9.35893 3.45844 8.61735 4.07527 8.00035C4.69211 7.38351 5.43369 7.0751 6.30002 7.0751H6.62502V5.8001C6.62502 4.28343 7.14586 2.99593 8.18752 1.9376C9.22919 0.879264 10.5 0.350098 12 0.350098C13.5 0.350098 14.7709 0.879264 15.8125 1.9376C16.8542 2.99593 17.375 4.28343 17.375 5.8001V7.0751H17.7C18.5662 7.0751 19.3078 7.38351 19.9248 8.00035C20.5416 8.61735 20.85 9.35893 20.85 10.2251V19.6251C20.85 20.4913 20.5416 21.2328 19.9248 21.8498C19.3078 22.4667 18.5662 22.7751 17.7 22.7751H6.30002ZM12 16.9251C12.55 16.9251 13.0209 16.7293 13.4125 16.3376C13.8042 15.9459 14 15.4751 14 14.9251C14 14.3751 13.8042 13.9043 13.4125 13.5126C13.0209 13.1209 12.55 12.9251 12 12.9251C11.45 12.9251 10.9792 13.1209 10.5875 13.5126C10.1959 13.9043 10 14.3751 10 14.9251C10 15.4751 10.1959 15.9459 10.5875 16.3376C10.9792 16.7293 11.45 16.9251 12 16.9251ZM9.77502 7.0751H14.225V5.8001C14.225 5.16126 14.0125 4.61818 13.5875 4.17085C13.1625 3.72368 12.6334 3.5001 12 3.5001C11.3667 3.5001 10.8375 3.72368 10.4125 4.17085C9.98752 4.61818 9.77502 5.16126 9.77502 5.8001V7.0751Z" fill="var(--nys-icon-color, currentcolor)"/>
|
|
2941
2941
|
</g>
|
|
2942
|
-
</svg>`},
|
|
2942
|
+
</svg>`},ws=g`
|
|
2943
2943
|
:host {
|
|
2944
2944
|
display: inline-block;
|
|
2945
2945
|
--_nys-icon-size: var(
|
|
@@ -2965,39 +2965,39 @@
|
|
|
2965
2965
|
}
|
|
2966
2966
|
|
|
2967
2967
|
/* Relative Sizes */
|
|
2968
|
-
.nys-icon--
|
|
2968
|
+
.nys-icon--xs {
|
|
2969
2969
|
width: calc(var(--_nys-icon-size) * 0.75);
|
|
2970
2970
|
height: calc(var(--_nys-icon-size) * 0.75);
|
|
2971
2971
|
}
|
|
2972
|
-
.nys-icon--
|
|
2972
|
+
.nys-icon--sm {
|
|
2973
2973
|
width: calc(var(--_nys-icon-size) * 0.875);
|
|
2974
2974
|
height: calc(var(--_nys-icon-size) * 0.875);
|
|
2975
2975
|
}
|
|
2976
|
-
.nys-icon--
|
|
2976
|
+
.nys-icon--md {
|
|
2977
2977
|
width: var(--_nys-icon-size);
|
|
2978
2978
|
height: var(--_nys-icon-size);
|
|
2979
2979
|
}
|
|
2980
|
-
.nys-icon--
|
|
2980
|
+
.nys-icon--lg {
|
|
2981
2981
|
width: calc(var(--_nys-icon-size) * 1.125);
|
|
2982
2982
|
height: calc(var(--_nys-icon-size) * 1.125);
|
|
2983
2983
|
}
|
|
2984
|
-
.nys-icon--
|
|
2984
|
+
.nys-icon--xl {
|
|
2985
2985
|
width: calc(var(--_nys-icon-size) * 1.25);
|
|
2986
2986
|
height: calc(var(--_nys-icon-size) * 1.25);
|
|
2987
2987
|
}
|
|
2988
|
-
.nys-icon--
|
|
2988
|
+
.nys-icon--2xl {
|
|
2989
2989
|
width: calc(var(--_nys-icon-size) * 1.5);
|
|
2990
2990
|
height: calc(var(--_nys-icon-size) * 1.5);
|
|
2991
2991
|
}
|
|
2992
|
-
.nys-icon--
|
|
2992
|
+
.nys-icon--3xl {
|
|
2993
2993
|
width: calc(var(--_nys-icon-size) * 1.875);
|
|
2994
2994
|
height: calc(var(--_nys-icon-size) * 1.875);
|
|
2995
2995
|
}
|
|
2996
|
-
.nys-icon--
|
|
2996
|
+
.nys-icon--4xl {
|
|
2997
2997
|
width: calc(var(--_nys-icon-size) * 2.25);
|
|
2998
2998
|
height: calc(var(--_nys-icon-size) * 2.25);
|
|
2999
2999
|
}
|
|
3000
|
-
.nys-icon--
|
|
3000
|
+
.nys-icon--5xl {
|
|
3001
3001
|
width: calc(var(--_nys-icon-size) * 3);
|
|
3002
3002
|
height: calc(var(--_nys-icon-size) * 3);
|
|
3003
3003
|
}
|
|
@@ -3007,10 +3007,22 @@
|
|
|
3007
3007
|
width: 0.75rem;
|
|
3008
3008
|
height: 0.75rem;
|
|
3009
3009
|
}
|
|
3010
|
+
.nys-icon--14 {
|
|
3011
|
+
width: 0.875rem;
|
|
3012
|
+
height: 0.875rem;
|
|
3013
|
+
}
|
|
3010
3014
|
.nys-icon--16 {
|
|
3011
3015
|
width: 1rem;
|
|
3012
3016
|
height: 1rem;
|
|
3013
3017
|
}
|
|
3018
|
+
.nys-icon--18 {
|
|
3019
|
+
width: 1.125rem;
|
|
3020
|
+
height: 1.125rem;
|
|
3021
|
+
}
|
|
3022
|
+
.nys-icon--20 {
|
|
3023
|
+
width: 1.25rem;
|
|
3024
|
+
height: 1.25rem;
|
|
3025
|
+
}
|
|
3014
3026
|
.nys-icon--24 {
|
|
3015
3027
|
width: 1.5rem;
|
|
3016
3028
|
height: 1.5rem;
|
|
@@ -3023,13 +3035,9 @@
|
|
|
3023
3035
|
width: 2.5rem;
|
|
3024
3036
|
height: 2.5rem;
|
|
3025
3037
|
}
|
|
3026
|
-
.nys-icon--
|
|
3027
|
-
width:
|
|
3028
|
-
height:
|
|
3029
|
-
}
|
|
3030
|
-
.nys-icon--64 {
|
|
3031
|
-
width: 4rem;
|
|
3032
|
-
height: 4rem;
|
|
3038
|
+
.nys-icon--50 {
|
|
3039
|
+
width: 3.125rem;
|
|
3040
|
+
height: 3.125rem;
|
|
3033
3041
|
}
|
|
3034
3042
|
|
|
3035
3043
|
/* Flipping Icons */
|
|
@@ -3042,7 +3050,7 @@
|
|
|
3042
3050
|
.nys-icon--flip-both {
|
|
3043
3051
|
transform: scale(-1, -1);
|
|
3044
3052
|
}
|
|
3045
|
-
`;var
|
|
3053
|
+
`;var ks=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Be=(a,e,t,o)=>{for(var s=o>1?void 0:o?$s(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&ks(e,t,s),s};const Ee=(Ce=class extends p{constructor(){super(...arguments),this.name="",this.ariaLabel="",this.rotate="0",this.flip="",this.color="",this._size="md"}get size(){return this._size}set size(e){this._size=Ce.VALID_TYPES.includes(e)?e:"md"}getIcon(){const e=xs[this.name];if(!e)return null;const s=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;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}render(){const e=this.getIcon();return e?l`${e}`:null}},Ce.styles=ws,Ce.VALID_TYPES=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","12","14","16","18","20","24","32","40","50"],Ce);Be([i({type:String,reflect:!0})],Ee.prototype,"name",2),Be([i({type:String})],Ee.prototype,"ariaLabel",2),Be([i({type:String})],Ee.prototype,"rotate",2),Be([i({type:String})],Ee.prototype,"flip",2),Be([i({type:String})],Ee.prototype,"color",2),Be([i({reflect:!0})],Ee.prototype,"size",1);let t1=Ee;customElements.get("nys-icon")||customElements.define("nys-icon",t1);const Ss=g`
|
|
3046
3054
|
:host {
|
|
3047
3055
|
/* Label Typography */
|
|
3048
3056
|
--_nys-label-font-family: var(
|
|
@@ -3132,25 +3140,25 @@
|
|
|
3132
3140
|
.nys-label.invert .nys-label__label,
|
|
3133
3141
|
.nys-label.invert .nys-label__description,
|
|
3134
3142
|
.nys-label.invert .nys-label__optional {
|
|
3135
|
-
color: var(--nys-color-text-
|
|
3143
|
+
color: var(--nys-color-text-reverse, #fff);
|
|
3136
3144
|
}
|
|
3137
3145
|
|
|
3138
3146
|
.nys-label.invert .nys-label__tooltip-icon {
|
|
3139
|
-
color: var(--nys-color-ink-
|
|
3147
|
+
color: var(--nys-color-ink-reverse, #fff);
|
|
3140
3148
|
}
|
|
3141
|
-
`;var
|
|
3142
|
-
<div class="nys-label ${this.
|
|
3149
|
+
`;var Ls=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ie=(a,e,t,o)=>{for(var s=o>1?void 0:o?Es(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Ls(e,t,s),s};const wt=class wt extends p{constructor(){super(...arguments),this.for="",this.label="",this.description="",this.flag="",this.inverted=!1,this._tooltip=""}get tooltip(){return this._tooltip}set tooltip(e){this._tooltip=e}render(){return l`
|
|
3150
|
+
<div class="nys-label ${this.inverted?"invert":""}">
|
|
3143
3151
|
<div class="nys-label__tooltip-wrapper">
|
|
3144
3152
|
<label for=${this.for} class="nys-label__label"
|
|
3145
3153
|
>${this.label}
|
|
3146
|
-
${this.flag==="required"?
|
|
3147
|
-
${this.flag==="optional"?
|
|
3154
|
+
${this.flag==="required"?l`<div class="nys-label__required">*</div>`:""}
|
|
3155
|
+
${this.flag==="optional"?l`<div class="nys-label__optional">(Optional)</div>`:""}</label
|
|
3148
3156
|
>
|
|
3149
|
-
${this._tooltip?
|
|
3157
|
+
${this._tooltip?l`<nys-tooltip
|
|
3150
3158
|
text="${this._tooltip}"
|
|
3151
3159
|
position="top"
|
|
3152
3160
|
focusable
|
|
3153
|
-
?inverted=${this.
|
|
3161
|
+
?inverted=${this.inverted}
|
|
3154
3162
|
>
|
|
3155
3163
|
<div class="nys-label__tooltip-icon">
|
|
3156
3164
|
<nys-icon name="info" size="3xl"></nys-icon>
|
|
@@ -3161,7 +3169,7 @@
|
|
|
3161
3169
|
<slot name="description">${this.description}</slot>
|
|
3162
3170
|
</label>
|
|
3163
3171
|
</div>
|
|
3164
|
-
`}};
|
|
3172
|
+
`}};wt.styles=Ss;let J=wt;Ie([i({type:String})],J.prototype,"for",2),Ie([i({type:String})],J.prototype,"label",2),Ie([i({type:String})],J.prototype,"description",2),Ie([i({type:String})],J.prototype,"flag",2),Ie([i({type:Boolean,reflect:!0})],J.prototype,"inverted",2),Ie([i({type:String})],J.prototype,"tooltip",1),customElements.get("nys-label")||customElements.define("nys-label",J);const As=g`
|
|
3165
3173
|
:host {
|
|
3166
3174
|
/* Global Modal Styles */
|
|
3167
3175
|
--_nys-modal-width: 480px;
|
|
@@ -3312,7 +3320,7 @@
|
|
|
3312
3320
|
align-items: center;
|
|
3313
3321
|
}
|
|
3314
3322
|
}
|
|
3315
|
-
`;var
|
|
3323
|
+
`;var Ds=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,be=(a,e,t,o)=>{for(var s=o>1?void 0:o?Ms(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Ds(e,t,s),s};let zs=0;const oe=(me=class extends p{constructor(){super(),this.id="",this.heading="",this.subheading="",this.open=!1,this.mandatory=!1,this._width="md",this._actionButtonSlot=null,this._prevFocusedElement=null,this._originalBodyOverflow=null,this.hasBodySlots=!1,this.hasActionSlots=!1}get width(){return this._width}set width(e){this._width=me.VALID_WIDTHS.includes(e)?e:"md"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-{{componentName}}-${Date.now()}-${zs++}`),window.addEventListener("resize",()=>this._updateSlottedButtonWidth()),window.addEventListener("keydown",e=>this._handleKeydown(e))}disconnectedCallback(){super.disconnectedCallback(),this._restoreBodyScroll(),window.removeEventListener("keydown",e=>this._handleKeydown(e))}firstUpdated(){this._handleBodySlotChange(),this._handleActionSlotChange()}async updated(e){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()))}_hideBodyScroll(){this._originalBodyOverflow===null&&(this._originalBodyOverflow=document.body.style.overflow),document.body.style.overflow="hidden"}_restoreBodyScroll(){this._originalBodyOverflow!==null&&(document.body.style.overflow=this._originalBodyOverflow,this._originalBodyOverflow=null)}_savePrevFocused(){this._prevFocusedElement=document.activeElement}_focusOnModal(){this.shadowRoot?.querySelector(".nys-modal")?.focus()}async _restorePrevFocused(){const e=this._prevFocusedElement;if(e&&e.tagName.toLowerCase()==="nys-button"){const o=await e.getButtonElement();if(o){o.focus();return}}else this._prevFocusedElement?.focus();this._prevFocusedElement=null}async _handleBodySlotChange(){const e=this.shadowRoot?.querySelector("slot");e&&(this.hasBodySlots=e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.ELEMENT_NODE||t.textContent?.trim()))}async _handleActionSlotChange(){const e=this.shadowRoot?.querySelector('slot[name="actions"]');e&&(this.hasActionSlots=e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.ELEMENT_NODE||t.textContent?.trim()),this._actionButtonSlot=e,this._updateSlottedButtonWidth())}_updateSlottedButtonWidth(){if(!this._actionButtonSlot)return;const e=window.innerWidth<=480;this._actionButtonSlot.assignedElements().forEach(t=>{t.querySelectorAll("nys-button").forEach(o=>{e?o?.setAttribute("fullWidth",""):o?.removeAttribute("fullWidth")})})}_dispatchOpenEvent(){this.dispatchEvent(new CustomEvent("nys-open",{detail:{id:this.id},bubbles:!0,composed:!0}))}_dispatchCloseEvent(){this.dispatchEvent(new CustomEvent("nys-close",{detail:{id:this.id},bubbles:!0,composed:!0}))}_getAriaDescribedBy(){const e=[];return this.subheading&&e.push(`${this.id}-subheading`),this.hasBodySlots&&e.push(`${this.id}-desc`),e.join(" ")}_updateDismissAria(){const e=this.shadowRoot?.querySelector("nys-button");e&&(e.setAttribute("ariaLabel"," "),this.open&&setTimeout(()=>{e.setAttribute("ariaLabel","Close this window")},100))}async _handleKeydown(e){if(this.open&&(e.key==="Escape"&&!this.mandatory&&(e.preventDefault(),this._closeModal()),e.key==="Tab")){const t=this.shadowRoot?.querySelector(".nys-modal");if(!t)return;const o='a[href], area[href], button:not([disabled]), details, iframe, object, input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [contentEditable="true"], [tabindex]:not([tabindex^="-"])',s=[],r=t.querySelector("nys-button");r&&s.push(r);const n=Array.from(t.querySelectorAll("slot"));for(const c of n){const d=c.assignedElements({flatten:!0});for(const h of d)h instanceof HTMLElement&&h.matches(o)&&s.push(h),h.querySelectorAll("nys-button").forEach(f=>{s.push(f)})}if(s.length>0){const c=s[0],d=s[s.length-1];let h=document.activeElement,f=s.indexOf(h);if(e.shiftKey){e.preventDefault();let v=f-1;v<0&&(v=s.length-1);const w=s[v];s[v].tagName.toLowerCase()==="nys-button"?(await w.getButtonElement())?.focus():w.focus()}else h===d&&(e.preventDefault(),c.tagName.toLowerCase()==="nys-button"?(await c.getButtonElement())?.focus():c.focus())}}}_closeModal(){this.open=!1,this._dispatchCloseEvent()}render(){return this.open?l`<div
|
|
3316
3324
|
id=${this.id}
|
|
3317
3325
|
class="nys-modal-overlay"
|
|
3318
3326
|
role="dialog"
|
|
@@ -3324,14 +3332,15 @@
|
|
|
3324
3332
|
<div class="nys-modal_header">
|
|
3325
3333
|
<div class="nys-modal_header-inner">
|
|
3326
3334
|
<h2 id="${this.id}-heading">${this.heading}</h2>
|
|
3327
|
-
${this.mandatory?"":
|
|
3335
|
+
${this.mandatory?"":l`<nys-button
|
|
3336
|
+
id="dismiss-modal"
|
|
3328
3337
|
circle
|
|
3329
3338
|
icon="close"
|
|
3330
3339
|
variant="ghost"
|
|
3331
|
-
|
|
3340
|
+
@nys-click=${this._closeModal}
|
|
3332
3341
|
></nys-button>`}
|
|
3333
3342
|
</div>
|
|
3334
|
-
${this.subheading?
|
|
3343
|
+
${this.subheading?l`<p id="${this.id}-subheading">${this.subheading}</p>`:""}
|
|
3335
3344
|
</div>
|
|
3336
3345
|
|
|
3337
3346
|
<div
|
|
@@ -3352,7 +3361,7 @@
|
|
|
3352
3361
|
></slot>
|
|
3353
3362
|
</div>
|
|
3354
3363
|
</div>
|
|
3355
|
-
</div>`:""}},
|
|
3364
|
+
</div>`:""}},me.VALID_WIDTHS=["sm","md","lg"],me.styles=As,me);be([i({type:String})],oe.prototype,"id",2),be([i({type:String})],oe.prototype,"heading",2),be([i({type:String})],oe.prototype,"subheading",2),be([i({type:Boolean,reflect:!0})],oe.prototype,"open",2),be([i({type:Boolean,reflect:!0})],oe.prototype,"mandatory",2),be([i({reflect:!0})],oe.prototype,"width",1),be([M()],oe.prototype,"hasBodySlots",2),be([M()],oe.prototype,"hasActionSlots",2);let s1=oe;customElements.get("nys-modal")||customElements.define("nys-modal",s1);const Vs=g`
|
|
3356
3365
|
:host {
|
|
3357
3366
|
/* Anything that can be overridden should be defined here */
|
|
3358
3367
|
|
|
@@ -3493,20 +3502,20 @@
|
|
|
3493
3502
|
display: none;
|
|
3494
3503
|
}
|
|
3495
3504
|
}
|
|
3496
|
-
`;var
|
|
3505
|
+
`;var Hs=Object.defineProperty,Ge=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Hs(e,t,s),s};let Bs=0;const kt=class kt extends p{constructor(){super(),this.id="",this.name="",this.currentPage=1,this.totalPages=1,this._twoBeforeLast=!1}updated(e){super.updated(e),this.currentPage=this._clampPage(this.currentPage),this._twoBeforeLast=this.currentPage===this.totalPages-2}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-pagination-${Date.now()}-${Bs++}`)}_clampPage(e){return e<1?1:e>this.totalPages?this.totalPages:e}renderPageButtons(){const e=[],t=(d,h)=>{e.push(l`
|
|
3497
3506
|
<nys-button
|
|
3498
|
-
label=${String(
|
|
3499
|
-
ariaLabel="Page ${
|
|
3500
|
-
id=${
|
|
3501
|
-
variant=${this.currentPage===
|
|
3502
|
-
@nys-click="${()=>this._handlePageClick(
|
|
3507
|
+
label=${String(d)}
|
|
3508
|
+
ariaLabel="Page ${d}"
|
|
3509
|
+
id=${y(h)}
|
|
3510
|
+
variant=${this.currentPage===d?"filled":"outline"}
|
|
3511
|
+
@nys-click="${()=>this._handlePageClick(d)}"
|
|
3503
3512
|
></nys-button>
|
|
3504
|
-
`)},o=
|
|
3513
|
+
`)},o=d=>{e.push(l`<nys-button
|
|
3505
3514
|
label="..."
|
|
3506
3515
|
class="spacer"
|
|
3507
3516
|
tabindex="-1"
|
|
3508
|
-
id=${
|
|
3509
|
-
></nys-button>`)},r=this.totalPages,n=this.currentPage-1,
|
|
3517
|
+
id=${d}
|
|
3518
|
+
></nys-button>`)},r=this.totalPages,n=this.currentPage-1,c=this.currentPage+1;return t(1),this.currentPage>2&&o("first-spacer"),n>1&&t(n,"prev-page"),this.currentPage!==1&&this.currentPage!==r&&t(this.currentPage,"current-page"),c<r&&t(c,"next-page"),this.currentPage<r-1&&o("last-spacer"),r>1&&t(r),e}_handlePageClick(e){this.currentPage=this._clampPage(e),this.dispatchEvent(new CustomEvent("nys-change",{detail:{page:this.currentPage},bubbles:!0,composed:!0}))}render(){return this.totalPages<=1?null:l`<div class="nys-pagination">
|
|
3510
3519
|
<nys-button
|
|
3511
3520
|
id="previous"
|
|
3512
3521
|
label="Previous"
|
|
@@ -3540,7 +3549,7 @@
|
|
|
3540
3549
|
?disabled=${this.currentPage===this.totalPages}
|
|
3541
3550
|
@nys-click="${()=>this._handlePageClick(this.currentPage+1)}"
|
|
3542
3551
|
></nys-button>
|
|
3543
|
-
</div>`}};
|
|
3552
|
+
</div>`}};kt.styles=Vs;let re=kt;Ge([i({type:String})],re.prototype,"id"),Ge([i({type:String,reflect:!0})],re.prototype,"name"),Ge([i({type:Number,reflect:!0})],re.prototype,"currentPage"),Ge([i({type:Number,reflect:!0})],re.prototype,"totalPages"),Ge([i({type:Boolean,reflect:!0})],re.prototype,"_twoBeforeLast"),customElements.get("nys-pagination")||customElements.define("nys-pagination",re);const o1=g`
|
|
3544
3553
|
:host {
|
|
3545
3554
|
/* Global Radiobutton Styles */
|
|
3546
3555
|
--_nys-radiobutton-size: var(--nys-size-400, 32px);
|
|
@@ -3899,14 +3908,14 @@
|
|
|
3899
3908
|
overflow: hidden;
|
|
3900
3909
|
border: 0;
|
|
3901
3910
|
}
|
|
3902
|
-
`;var
|
|
3911
|
+
`;var Is=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,H=(a,e,t,o)=>{for(var s=o>1?void 0:o?Ps(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Is(e,t,s),s};let Os=0;const D=(de=class extends p{constructor(){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()}get size(){return this._size}set size(e){this._size=de.VALID_SIZES.includes(e)?e:"md"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-radiogroup-${Date.now()}-${Os++}`),this.addEventListener("nys-change",this._handleRadioButtonChange),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("nys-change",this._handleRadioButtonChange),this.removeEventListener("invalid",this._handleInvalid)}async firstUpdated(){this._initializeCheckedRadioValue(),this._setValue(),this._setRadioButtonRequire(),this._updateRadioButtonsSize(),this._updateRadioButtonsTile(),this._updateRadioButtonsShowError(),this._getSlotDescriptionForAria(),await this.updateComplete,this._initializeChildAttributes(),this._updateGroupTabIndex()}updated(e){(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()}formResetCallback(){this.querySelectorAll("nys-radiobutton").forEach(t=>{t.formResetUpdate()})}_setValue(){this._internals.setFormValue(this.selectedValue)}_setRadioButtonRequire(){this.querySelectorAll("nys-radiobutton").forEach((t,o)=>{this.required&&o===0&&t.setAttribute("required","required")})}async _manageRequire(){const e=this.errorMessage||"Please select an option.",o=Array.from(this.querySelectorAll("nys-radiobutton"))[0];o&&(this.required&&!this.selectedValue?this._internals.setValidity({valueMissing:!0},e,o):(this.showError=!1,this._internals.setValidity({},"",o)))}checkValidity(){const e=Array.from(this.querySelectorAll("nys-radiobutton"));return!this.required||e.some(o=>o.checked)}_initializeCheckedRadioValue(){const e=this.querySelector("nys-radiobutton[checked]");e&&(this.selectedValue=e.getAttribute("value"),this._internals.setFormValue(this.selectedValue))}_getAllRadios(){return Array.from(this.querySelectorAll("nys-radiobutton"))}async _handleKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," ","Enter"].includes(e.key))return;e.preventDefault();const o=this._getAllRadios().filter(h=>!h.disabled),s=o.find(h=>h.checked)||o[0],r=e.key===" "||e.key==="Enter"?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=o.indexOf(s)+r;n<0&&(n=o.length-1),n>=o.length&&(n=0);const c=o[n];(await c.getInputElement())?.click(),this._updateGroupTabIndex(),c.focus()}_updateGroupTabIndex(){const e=this._getAllRadios(),t=e.find(o=>o.checked)||e[0];e.forEach(o=>{o.disabled?o.tabIndex=-1:o.tabIndex=o===t?0:-1,o.setAttribute("aria-checked",o.checked?"true":"false"),o.setAttribute("aria-disabled",o.disabled?"true":"false"),o.setAttribute("aria-required",this.required?"true":"false")})}_initializeChildAttributes(){this._getAllRadios().forEach(t=>{t.setAttribute("role","radio"),t.setAttribute("aria-checked",String(t.checked)),t.setAttribute("aria-required",String(t.required)),t.setAttribute("aria-disabled",String(t.disabled)),t.setAttribute("tabindex","-1")})}_updateRadioButtonsSize(){this.querySelectorAll("nys-radiobutton").forEach(t=>{t.setAttribute("size",this.size)})}_updateRadioButtonsTile(){this.querySelectorAll("nys-radiobutton").forEach(t=>{this.tile?t.toggleAttribute("tile",!0):t.removeAttribute("tile")})}_updateRadioButtonsInvert(){this.querySelectorAll("nys-radiobutton").forEach(t=>{this.inverted?t.toggleAttribute("inverted",!0):t.removeAttribute("inverted")})}_updateRadioButtonsShowError(){this.querySelectorAll("nys-radiobutton").forEach(t=>{this.showError?t.setAttribute("showError",""):t.removeAttribute("showError")})}_updateRadioButtonsForm(){this.querySelectorAll("nys-radiobutton").forEach(t=>{this.showError&&this.form!==null?t.setAttribute("form",this.form):t.removeAttribute("form")})}_getSlotDescriptionForAria(){const t=this.shadowRoot?.querySelector('slot[name="description"]')?.assignedNodes({flatten:!0})||[];this._slottedDescriptionText=t.map(o=>o.textContent?.trim()).filter(Boolean).join(", ")}_handleRadioButtonChange(e){const t=e,{name:o,value:s}=t.detail;this.name=o,this.selectedValue=s,this._internals.setFormValue(this.selectedValue),this._updateGroupTabIndex()}async _handleInvalid(e){if(e.preventDefault(),this._internals.validity.valueMissing){this.showError=!0,this._manageRequire();const t=this.querySelector("nys-radiobutton");if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&(t.focus(),t.classList.add("active-focus")):(t.focus(),t.classList.add("active-focus"))}}}render(){return l`<div class="nys-radiogroup">
|
|
3903
3912
|
<nys-label
|
|
3904
3913
|
for=${this.id}
|
|
3905
3914
|
label=${this.label}
|
|
3906
3915
|
description=${this.description}
|
|
3907
3916
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
3908
3917
|
_tooltip=${this._tooltip}
|
|
3909
|
-
?
|
|
3918
|
+
?inverted=${this.inverted}
|
|
3910
3919
|
>
|
|
3911
3920
|
<slot name="description" slot="description">${this.description}</slot>
|
|
3912
3921
|
</nys-label>
|
|
@@ -3923,16 +3932,16 @@
|
|
|
3923
3932
|
errorMessage=${this._internals.validationMessage||this.errorMessage}
|
|
3924
3933
|
.showDivider=${!this.tile}
|
|
3925
3934
|
></nys-errormessage>
|
|
3926
|
-
</div>`}},
|
|
3935
|
+
</div>`}},de.VALID_SIZES=["sm","md"],de.styles=o1,de.formAssociated=!0,de);H([i({type:String})],D.prototype,"id",2),H([i({type:String,reflect:!0})],D.prototype,"name",2),H([i({type:Boolean,reflect:!0})],D.prototype,"required",2),H([i({type:Boolean,reflect:!0})],D.prototype,"optional",2),H([i({type:Boolean,reflect:!0})],D.prototype,"showError",2),H([i({type:String})],D.prototype,"errorMessage",2),H([i({type:String})],D.prototype,"label",2),H([i({type:String})],D.prototype,"description",2),H([i({type:Boolean,reflect:!0})],D.prototype,"tile",2),H([i({type:String})],D.prototype,"_tooltip",2),H([i({type:Boolean,reflect:!0})],D.prototype,"inverted",2),H([i({type:String,reflect:!0})],D.prototype,"form",2),H([M()],D.prototype,"selectedValue",2),H([M()],D.prototype,"_slottedDescriptionText",2),H([i({reflect:!0})],D.prototype,"size",1);let r1=D;customElements.get("nys-radiogroup")||customElements.define("nys-radiogroup",r1);var Zs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,R=(a,e,t,o)=>{for(var s=o>1?void 0:o?Us(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Zs(e,t,s),s};let qs=0;const N=(m=class extends p{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.required=!1,this.label="",this.description="",this.id="",this.name="",this.value="",this.inverted=!1,this.form=null,this._size="md",this.tile=!1}get size(){return this._size}set size(e){this._size=m.VALID_SIZES.includes(e)?e:"md"}async getInputElement(){return await this.updateComplete,this.shadowRoot?.querySelector("input")||null}formResetUpdate(){this.checked=!1}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-radiobutton-${Date.now()}-${qs++}`),this.checked&&(m.buttonGroup[this.name]&&(m.buttonGroup[this.name].checked=!1,m.buttonGroup[this.name].requestUpdate()),m.buttonGroup[this.name]=this),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur),this.addEventListener("click",this._handleChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}updated(e){e.has("checked")&&this.checked&&m.buttonGroup[this.name]!==this&&(m.buttonGroup[this.name]&&(m.buttonGroup[this.name].checked=!1,m.buttonGroup[this.name].requestUpdate()),m.buttonGroup[this.name]=this)}checkValidity(){if(this.required&&!this.checked)return!1;const e=this.shadowRoot?.querySelector("input");return e?e.checkValidity():!0}_emitChangeEvent(){this.dispatchEvent(new CustomEvent("nys-change",{detail:{id:this.id,checked:this.checked,name:this.name,value:this.value},bubbles:!0,composed:!0}))}_handleChange(){this.classList.remove("active-focus"),!this.checked&&!this.disabled&&(m.buttonGroup[this.name]&&(m.buttonGroup[this.name].checked=!1,m.buttonGroup[this.name].requestUpdate()),m.buttonGroup[this.name]=this,this.checked=!0,this._emitChangeEvent())}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this.classList.remove("active-focus"),this.dispatchEvent(new Event("nys-blur"))}_callInputHandling(){if(this.disabled)return;const e=this.shadowRoot?.querySelector('input[type="radio"]');e&&(e.focus(),e.click())}render(){return l`
|
|
3927
3936
|
<input
|
|
3928
3937
|
id="${this.id}"
|
|
3929
3938
|
type="radio"
|
|
3930
|
-
name="${
|
|
3939
|
+
name="${y(this.name?this.name:void 0)}"
|
|
3931
3940
|
.checked=${this.checked}
|
|
3932
3941
|
?disabled=${this.disabled}
|
|
3933
3942
|
.value=${this.value}
|
|
3934
3943
|
?required="${this.required}"
|
|
3935
|
-
form=${
|
|
3944
|
+
form=${y(this.form||void 0)}
|
|
3936
3945
|
@change="${this._handleChange}"
|
|
3937
3946
|
hidden
|
|
3938
3947
|
aria-hidden="true"
|
|
@@ -3944,16 +3953,16 @@
|
|
|
3944
3953
|
aria-label=${this.label}
|
|
3945
3954
|
>
|
|
3946
3955
|
<span class="nys-radiobutton__radio"></span>
|
|
3947
|
-
${this.label&&
|
|
3956
|
+
${this.label&&l`<nys-label
|
|
3948
3957
|
for=${this.id}
|
|
3949
3958
|
label=${this.label}
|
|
3950
|
-
description=${
|
|
3951
|
-
?
|
|
3959
|
+
description=${y(this.description||void 0)}
|
|
3960
|
+
?inverted=${this.inverted}
|
|
3952
3961
|
>
|
|
3953
3962
|
<slot name="description" slot="description">${this.description}</slot>
|
|
3954
3963
|
</nys-label> `}
|
|
3955
3964
|
</label>
|
|
3956
|
-
`}},m.VALID_SIZES=["sm","md"],m.buttonGroup={},m.styles=
|
|
3965
|
+
`}},m.VALID_SIZES=["sm","md"],m.buttonGroup={},m.styles=o1,m);R([i({type:Boolean,reflect:!0})],N.prototype,"checked",2),R([i({type:Boolean,reflect:!0})],N.prototype,"disabled",2),R([i({type:Boolean,reflect:!0})],N.prototype,"required",2),R([i({type:String})],N.prototype,"label",2),R([i({type:String})],N.prototype,"description",2),R([i({type:String})],N.prototype,"id",2),R([i({type:String,reflect:!0})],N.prototype,"name",2),R([i({type:String})],N.prototype,"value",2),R([i({type:Boolean,reflect:!0})],N.prototype,"inverted",2),R([i({type:String,reflect:!0})],N.prototype,"form",2),R([i({reflect:!0})],N.prototype,"size",1),R([i({type:Boolean,reflect:!0})],N.prototype,"tile",2);let n1=N;customElements.get("nys-radiobutton")||customElements.define("nys-radiobutton",n1);const Ts=g`
|
|
3957
3966
|
:host {
|
|
3958
3967
|
/* Global Select Styles */
|
|
3959
3968
|
--_nys-select-width: 100%;
|
|
@@ -4017,6 +4026,7 @@
|
|
|
4017
4026
|
.nys-select__select {
|
|
4018
4027
|
color: var(--_nys-select-color);
|
|
4019
4028
|
font-weight: var(--_nys-select-font-weight);
|
|
4029
|
+
font-family: var(--_nys-select-font-family);
|
|
4020
4030
|
border-radius: var(--_nys-select-border-radius);
|
|
4021
4031
|
border: solid var(--_nys-select-border-width)
|
|
4022
4032
|
var(--_nys-select-border-color);
|
|
@@ -4096,7 +4106,7 @@
|
|
|
4096
4106
|
--_nys-select-border-default: var(--nys-border-width-sm, 1px) solid
|
|
4097
4107
|
var(--_nys-select-color--error);
|
|
4098
4108
|
}
|
|
4099
|
-
`;var
|
|
4109
|
+
`;var Ns=Object.defineProperty,We=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Ns(e,t,s),s};class ne extends p{constructor(){super(...arguments),this.disabled=!1,this.selected=!1,this.value="",this.label="",this.hidden=!1}firstUpdated(){const e=this.shadowRoot?.querySelector("slot");e&&e.addEventListener("slotchange",()=>{const t=e.assignedNodes({flatten:!0});t.length>0&&(this.label=t[0].textContent?.trim()||"")})}render(){return l`
|
|
4100
4110
|
<option
|
|
4101
4111
|
?disabled=${this.disabled}
|
|
4102
4112
|
?selected=${this.selected}
|
|
@@ -4106,7 +4116,7 @@
|
|
|
4106
4116
|
>
|
|
4107
4117
|
<slot>${this.label}</slot>
|
|
4108
4118
|
</option>
|
|
4109
|
-
`}}
|
|
4119
|
+
`}}We([i({type:Boolean,reflect:!0})],ne.prototype,"disabled"),We([i({type:Boolean,reflect:!0})],ne.prototype,"selected"),We([i({type:String})],ne.prototype,"value"),We([i({type:String})],ne.prototype,"label"),We([i({type:Boolean,reflect:!0})],ne.prototype,"hidden"),customElements.define("nys-option",ne);var Rs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,U=(a,e,t,o)=>{for(var s=o>1?void 0:o?Fs(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Rs(e,t,s),s};let js=0;const B=(he=class extends p{constructor(){super(),this.id="",this.name="",this.label="",this.description="",this.value="",this.disabled=!1,this.required=!1,this.optional=!1,this._tooltip="",this.form=null,this.inverted=!1,this.showError=!1,this.errorMessage="",this._width="full",this._hasUserInteracted=!1,this._internals=this.attachInternals()}get width(){return this._width}set width(e){this._width=he.VALID_WIDTHS.includes(e)?e:"full"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-select-${Date.now()}-${js++}`),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setValue()}formResetCallback(){this.value=""}_handleSlotChange(){const e=this.shadowRoot?.querySelector('slot:not([name="description"])'),t=this.shadowRoot?.querySelector("select");if(!e||!t)return;Array.from(t.children).forEach(s=>{s.hasAttribute("data-native")||s.remove()}),e.assignedElements({flatten:!0}).forEach(s=>{if(s instanceof ne){const r=document.createElement("option");r.value=s.value,r.textContent=s.label||s.textContent?.trim()||"",r.disabled=s.disabled,r.selected=s.selected,t.appendChild(r);return}if(s.tagName==="OPTION"){const r=s.cloneNode(!0);r.setAttribute("data-native","true"),t.appendChild(r);return}if(s.tagName==="OPTGROUP"){const r=document.createElement("optgroup");r.label=s.label,s.disabled&&(r.disabled=!0),Array.from(s.children).forEach(n=>{if(n instanceof ne){const c=document.createElement("option");c.value=n.value,c.textContent=n.label||n.textContent?.trim()||"",c.disabled=n.disabled,c.selected=n.selected,r.appendChild(c)}else if(n.tagName==="OPTION"){const c=n.cloneNode(!0);r.appendChild(c)}}),t.appendChild(r);return}})}_setValue(){this._internals.setFormValue(this.value),this._manageRequire()}_manageRequire(){const e=this.shadowRoot?.querySelector("select");if(!e)return;const t=this.errorMessage||"Please select an option.";this.required&&!this.value?(this._internals.ariaRequired="true",this._internals.setValidity({valueMissing:!0},t,e)):(this._internals.ariaRequired="false",this._internals.setValidity({}),this._hasUserInteracted=!1)}_setValidityMessage(e=""){const t=this.shadowRoot?.querySelector("select");t&&(this.showError=!!e,this.errorMessage?.trim()&&e!==""&&(e=this.errorMessage),this._internals.setValidity(e?{customError:!0}:{},e,t))}_validate(){const e=this.shadowRoot?.querySelector("select");if(!e)return;let t=e.validationMessage;this._manageRequire(),this._setValidityMessage(t)}checkValidity(){const e=this.shadowRoot?.querySelector("select");return e?e.checkValidity():!0}_handleInvalid(e){e.preventDefault(),this._hasUserInteracted=!0,this._validate(),this.showError=!0;const t=this.shadowRoot?.querySelector("select");if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&t.focus():t.focus()}}_handleChange(e){const t=e.target;this.value=t.value,this._internals.setFormValue(this.value),this._hasUserInteracted&&this._validate(),this.dispatchEvent(new CustomEvent("nys-change",{detail:{id:this.id,value:this.value},bubbles:!0,composed:!0}))}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this._hasUserInteracted||(this._hasUserInteracted=!0),this._validate(),this.dispatchEvent(new Event("nys-blur"))}updated(e){if(super.updated(e),e.has("value")){const t=this.shadowRoot?.querySelector("select");t&&(t.value=this.value)}}render(){return l`
|
|
4110
4120
|
<div class="nys-select">
|
|
4111
4121
|
<nys-label
|
|
4112
4122
|
for=${this.id}
|
|
@@ -4114,7 +4124,7 @@
|
|
|
4114
4124
|
description=${this.description}
|
|
4115
4125
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
4116
4126
|
_tooltip=${this._tooltip}
|
|
4117
|
-
?
|
|
4127
|
+
?inverted=${this.inverted}
|
|
4118
4128
|
>
|
|
4119
4129
|
<slot name="description" slot="description">${this.description}</slot>
|
|
4120
4130
|
</nys-label>
|
|
@@ -4123,7 +4133,7 @@
|
|
|
4123
4133
|
class="nys-select__select"
|
|
4124
4134
|
name=${this.name}
|
|
4125
4135
|
id=${this.id}
|
|
4126
|
-
form=${
|
|
4136
|
+
form=${y(this.form||void 0)}
|
|
4127
4137
|
?disabled=${this.disabled}
|
|
4128
4138
|
?required=${this.required}
|
|
4129
4139
|
aria-disabled="${this.disabled}"
|
|
@@ -4150,7 +4160,7 @@
|
|
|
4150
4160
|
errorMessage=${this._internals.validationMessage||this.errorMessage}
|
|
4151
4161
|
></nys-errormessage>
|
|
4152
4162
|
</div>
|
|
4153
|
-
`}},
|
|
4163
|
+
`}},he.VALID_WIDTHS=["sm","md","lg","full"],he.styles=Ts,he.formAssociated=!0,he);U([i({type:String})],B.prototype,"id",2),U([i({type:String,reflect:!0})],B.prototype,"name",2),U([i({type:String})],B.prototype,"label",2),U([i({type:String})],B.prototype,"description",2),U([i({type:String})],B.prototype,"value",2),U([i({type:Boolean,reflect:!0})],B.prototype,"disabled",2),U([i({type:Boolean,reflect:!0})],B.prototype,"required",2),U([i({type:Boolean,reflect:!0})],B.prototype,"optional",2),U([i({type:String})],B.prototype,"_tooltip",2),U([i({type:String,reflect:!0})],B.prototype,"form",2),U([i({type:Boolean,reflect:!0})],B.prototype,"inverted",2),U([i({type:Boolean,reflect:!0})],B.prototype,"showError",2),U([i({type:String})],B.prototype,"errorMessage",2),U([i({reflect:!0})],B.prototype,"width",1);let i1=B;customElements.get("nys-select")||customElements.define("nys-select",i1);const Gs=g`
|
|
4154
4164
|
:host {
|
|
4155
4165
|
/* Global Skipnav Styles */
|
|
4156
4166
|
--_nys-skipnav-padding--y: var(--nys-space-100, 8px);
|
|
@@ -4219,7 +4229,7 @@
|
|
|
4219
4229
|
left: auto;
|
|
4220
4230
|
outline: none;
|
|
4221
4231
|
}
|
|
4222
|
-
`;var
|
|
4232
|
+
`;var Ws=Object.defineProperty,a1=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Ws(e,t,s),s};const $t=class $t extends p{constructor(){super(),this.id="",this.href=""}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-skipnav-${Date.now()}`)}_handleFocus(){this.shadowRoot?.querySelector(".nys-skipnav__link")?.classList.add("show")}_handleBlur(){this.shadowRoot?.querySelector(".nys-skipnav__link")?.classList.remove("show")}_handleClick(){const e=(this.href||"#main-content").replace("#",""),t=document.getElementById(e);t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none")}render(){return l`
|
|
4223
4233
|
<div class="nys-skipnav">
|
|
4224
4234
|
<a
|
|
4225
4235
|
id=${this.id}
|
|
@@ -4233,7 +4243,7 @@
|
|
|
4233
4243
|
Skip to main content
|
|
4234
4244
|
</a>
|
|
4235
4245
|
</div>
|
|
4236
|
-
`}}
|
|
4246
|
+
`}};$t.styles=Gs;let Pe=$t;a1([i({type:String})],Pe.prototype,"id"),a1([i({type:String})],Pe.prototype,"href"),customElements.get("nys-skipnav")||customElements.define("nys-skipnav",Pe);const l1=g`
|
|
4237
4247
|
:host {
|
|
4238
4248
|
/* Anything that can be overridden should be defined here */
|
|
4239
4249
|
|
|
@@ -4586,7 +4596,7 @@
|
|
|
4586
4596
|
pointer-events: all;
|
|
4587
4597
|
}
|
|
4588
4598
|
}
|
|
4589
|
-
`;var
|
|
4599
|
+
`;var Ys=Object.defineProperty,Ae=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Ys(e,t,s),s};const St=class St extends p{constructor(){super(...arguments),this.selected=!1,this.current=!1,this.label="",this.href="",this.isCompactExpanded=!1,this.stepNumber=0}_handleActivate(e){typeof this.onClick=="function"&&this.onClick(e);const t=new CustomEvent("nys-step-click",{bubbles:!0,composed:!0,cancelable:!0,detail:{href:this.href,label:this.label}});(this.hasAttribute("previous")||this.current)&&!this.selected&&(this.dispatchEvent(t),!t.defaultPrevented&&this.href&&(window.location.href=this.href))}_handleKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleActivate(e))}render(){return l`
|
|
4590
4600
|
<div class="nys-step">
|
|
4591
4601
|
<div class="nys-step__linewrapper">
|
|
4592
4602
|
<div class="nys-step__line"></div>
|
|
@@ -4613,7 +4623,7 @@
|
|
|
4613
4623
|
</div>
|
|
4614
4624
|
</div>
|
|
4615
4625
|
</div>
|
|
4616
|
-
`}};
|
|
4626
|
+
`}};St.styles=l1;let G=St;Ae([i({type:Boolean,reflect:!0})],G.prototype,"selected"),Ae([i({type:Boolean,reflect:!0})],G.prototype,"current"),Ae([i({type:String})],G.prototype,"label"),Ae([i({type:String})],G.prototype,"href"),Ae([i({type:Boolean})],G.prototype,"isCompactExpanded"),Ae([i({attribute:!1})],G.prototype,"onClick"),Ae([i({type:Number})],G.prototype,"stepNumber"),customElements.get("nys-step")||customElements.define("nys-step",G);var Ks=Object.defineProperty,Ye=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Ks(e,t,s),s};const Lt=class Lt extends p{constructor(){super(),this.id="",this.name="",this.label="",this.counterText="initial",this.isCompactExpanded=!1,this._stepsNumbered=!1,this._onStepClick=async e=>{const t=e.composedPath().find(n=>n instanceof HTMLElement&&n.tagName.toLowerCase()==="nys-step");if(!t)return;const o=Array.from(this.querySelectorAll("nys-step")),s=o.findIndex(n=>n.hasAttribute("current")),r=o.indexOf(t);s!==-1&&r>s||t.hasAttribute("selected")||(o.forEach(n=>n.removeAttribute("selected")),t.setAttribute("selected",""),this._updateCounter(),this.isCompactExpanded=!1)}}connectedCallback(){super.connectedCallback(),this.addEventListener("nys-step-click",this._onStepClick),requestAnimationFrame(()=>this._validateSteps())}disconnectedCallback(){this.removeEventListener("nys-step-click",this._onStepClick),super.disconnectedCallback()}_validateSteps(){Array.from(this.children).forEach(e=>{const t=e instanceof HTMLElement&&e.tagName.toLowerCase()==="nys-step",o=e instanceof HTMLElement&&e.hasAttribute("slot")&&e.getAttribute("slot")==="actions";!t&&!o&&(console.warn("Only <nys-step> elements or the <div slot='actions'> container are allowed as direct children of <nys-stepper>. Removing:",e),e.remove())})}_validateButtonSlot(e){const o=e.target.assignedElements();if(o.length!==1||o[0].tagName.toLowerCase()!=="div"){console.warn("The 'actions' slot must have exactly one <div> as a direct child.");return}const s=o[0];Array.from(s.children).forEach(r=>{r instanceof HTMLElement&&r.tagName.toLowerCase()==="nys-button"?(r.setAttribute("size","sm"),r.hasAttribute("fullWidth")&&(r.style.flex="1 1 0")):(console.warn("The <div> inside 'actions' slot only accepts <nys-button> elements. Removing invalid node:",r),r.remove())})}_updateCounter(){if(this.isCompactExpanded){this.counterText="Back to Form",this.style.height="-webkit-fit-content",this.style.height="-moz-fit-content",this.style.height="fit-content";return}else this.style.height="auto";const e=this.querySelectorAll("nys-step"),t=Array.from(e).findIndex(s=>s.hasAttribute("selected")),o=e.length;this.counterText=t>=0?`Step ${t+1} of ${o}`:`Step 1 of ${o}`}updated(){const e=this.querySelectorAll("nys-step");this._stepsNumbered||(e.forEach((r,n)=>{r.stepNumber=n+1}),this._stepsNumbered=!0);let t=!1,o=!1,s=!1;e.forEach((r,n)=>{r.hasAttribute("current")&&(s?r.removeAttribute("current"):s=!0),n===0?r.setAttribute("first",""):r.removeAttribute("first"),r.hasAttribute("current")?(t=!0,r.removeAttribute("previous")):t?r.removeAttribute("previous"):r.setAttribute("previous",""),r.hasAttribute("selected")&&(t||o?r.removeAttribute("selected"):o=!0),this.hasAttribute("isCompactExpanded")?r.setAttribute("isCompactExpanded",""):r.removeAttribute("isCompactExpanded")}),o||(s?e.forEach(r=>{r.hasAttribute("current")&&!o&&(r.setAttribute("selected",""),o=!0)}):e.length>0&&(e[0].setAttribute("current",""),e[0].setAttribute("selected",""))),this._updateCounter()}_toggleCompact(){this.isCompactExpanded=!this.isCompactExpanded}_handleCounterKeydown(e){(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._toggleCompact())}render(){return l`
|
|
4617
4627
|
<div class="nys-stepper" id=${this.id} name=${this.name}>
|
|
4618
4628
|
<div class="nys-stepper__header">
|
|
4619
4629
|
<slot name="actions" @slotchange=${this._validateButtonSlot}></slot>
|
|
@@ -4634,7 +4644,7 @@
|
|
|
4634
4644
|
</div>
|
|
4635
4645
|
<slot class="nys-stepper__steps"></slot>
|
|
4636
4646
|
</div>
|
|
4637
|
-
`}};
|
|
4647
|
+
`}};Lt.styles=l1;let ie=Lt;Ye([i({type:String})],ie.prototype,"id"),Ye([i({type:String,reflect:!0})],ie.prototype,"name"),Ye([i({type:String})],ie.prototype,"label"),Ye([i({type:String})],ie.prototype,"counterText"),Ye([i({type:Boolean,reflect:!0})],ie.prototype,"isCompactExpanded"),customElements.get("nys-stepper")||customElements.define("nys-stepper",ie);const Xs=g`
|
|
4638
4648
|
:host {
|
|
4639
4649
|
/* Anything that can be overridden should be defined here */
|
|
4640
4650
|
|
|
@@ -4773,7 +4783,7 @@
|
|
|
4773
4783
|
color: var(--_nys-textarea-color--disabled);
|
|
4774
4784
|
cursor: not-allowed;
|
|
4775
4785
|
}
|
|
4776
|
-
`;var
|
|
4786
|
+
`;var Qs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,L=(a,e,t,o)=>{for(var s=o>1?void 0:o?Js(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&Qs(e,t,s),s};let eo=0;const $=(K=class extends p{constructor(){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()}get resize(){return this._resize}set resize(e){this._resize=K.VALID_RESIZE.includes(e)?e:"vertical"}async updated(e){await Promise.resolve(),e.has("width")&&(this.width=K.VALID_WIDTHS.includes(this.width)?this.width:"full"),e.has("rows")&&(this.rows=this.rows??4)}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-textarea-${Date.now()}-${eo++}`),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setValue()}formResetCallback(){this.value=""}_setValue(){this._internals.setFormValue(this.value),this._manageRequire()}_manageRequire(){const e=this.shadowRoot?.querySelector("textarea");if(!e)return;const t=this.errorMessage||"This field is required";this.required&&!this.value?(this._internals.ariaRequired="true",this._internals.setValidity({valueMissing:!0},t,e)):(this._internals.ariaRequired="false",this._internals.setValidity({}),this._hasUserInteracted=!1)}_setValidityMessage(e=""){const t=this.shadowRoot?.querySelector("textarea");t&&(this.showError=!!e,this.errorMessage?.trim()&&e!==""&&(e=this.errorMessage),this._internals.setValidity(e?{customError:!0}:{},e,t))}_validate(){const e=this.shadowRoot?.querySelector("textarea");if(!e)return;let t=e.validationMessage;this._setValidityMessage(t)}checkValidity(){const e=this.shadowRoot?.querySelector("textarea");return e?e.checkValidity():!0}_handleInvalid(e){e.preventDefault(),this._hasUserInteracted=!0,this._validate();const t=this.shadowRoot?.querySelector("textarea");if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&t.focus():t.focus()}}_handleInput(e){const t=e.target;this.value=t.value,this._internals.setFormValue(this.value),this._hasUserInteracted&&this._validate(),this.dispatchEvent(new CustomEvent("nys-input",{detail:{id:this.id,value:this.value},bubbles:!0,composed:!0}))}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this._hasUserInteracted||(this._hasUserInteracted=!0),this._validate(),this.dispatchEvent(new Event("nys-blur"))}_handleSelect(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("nys-select",{detail:{value:this.value},bubbles:!0,composed:!0}))}_handleSelectionChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("nys-selectionchange",{detail:{id:this.id,value:this.value},bubbles:!0,composed:!0}))}render(){return l`
|
|
4777
4787
|
<label class="nys-textarea">
|
|
4778
4788
|
<nys-label
|
|
4779
4789
|
for=${this.id}
|
|
@@ -4781,7 +4791,7 @@
|
|
|
4781
4791
|
description=${this.description}
|
|
4782
4792
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
4783
4793
|
_tooltip=${this._tooltip}
|
|
4784
|
-
?
|
|
4794
|
+
?inverted=${this.inverted}
|
|
4785
4795
|
>
|
|
4786
4796
|
<slot name="description" slot="description">${this.description}</slot>
|
|
4787
4797
|
</nys-label>
|
|
@@ -4792,14 +4802,14 @@
|
|
|
4792
4802
|
?disabled=${this.disabled}
|
|
4793
4803
|
?required=${this.required}
|
|
4794
4804
|
?readonly=${this.readonly}
|
|
4795
|
-
aria-disabled=${
|
|
4796
|
-
aria-required=${
|
|
4797
|
-
aria-label=${
|
|
4798
|
-
aria-description=${
|
|
4799
|
-
placeholder=${
|
|
4800
|
-
maxlength=${
|
|
4805
|
+
aria-disabled=${y(this.disabled?"true":void 0)}
|
|
4806
|
+
aria-required=${y(this.required?"true":void 0)}
|
|
4807
|
+
aria-label=${y(this.label||void 0)}
|
|
4808
|
+
aria-description=${y(this.description||void 0)}
|
|
4809
|
+
placeholder=${y(this.placeholder?this.placeholder:void 0)}
|
|
4810
|
+
maxlength=${y(this.maxlength??void 0)}
|
|
4801
4811
|
.rows=${this.rows}
|
|
4802
|
-
form=${
|
|
4812
|
+
form=${y(this.form||void 0)}
|
|
4803
4813
|
@input=${this._handleInput}
|
|
4804
4814
|
@focus="${this._handleFocus}"
|
|
4805
4815
|
@blur="${this._handleBlur}"
|
|
@@ -4813,7 +4823,7 @@ ${this.value}</textarea
|
|
|
4813
4823
|
errorMessage=${this._internals.validationMessage||this.errorMessage}
|
|
4814
4824
|
></nys-errormessage>
|
|
4815
4825
|
</label>
|
|
4816
|
-
`}},K.VALID_WIDTHS=["sm","md","lg","full"],K.VALID_RESIZE=["vertical","none"],K.styles=
|
|
4826
|
+
`}},K.VALID_WIDTHS=["sm","md","lg","full"],K.VALID_RESIZE=["vertical","none"],K.styles=Xs,K.formAssociated=!0,K);L([i({type:String})],$.prototype,"id",2),L([i({type:String,reflect:!0})],$.prototype,"name",2),L([i({type:String})],$.prototype,"label",2),L([i({type:String})],$.prototype,"description",2),L([i({type:String})],$.prototype,"placeholder",2),L([i({type:String})],$.prototype,"value",2),L([i({type:Boolean,reflect:!0})],$.prototype,"disabled",2),L([i({type:Boolean,reflect:!0})],$.prototype,"readonly",2),L([i({type:Boolean,reflect:!0})],$.prototype,"required",2),L([i({type:Boolean,reflect:!0})],$.prototype,"optional",2),L([i({type:String})],$.prototype,"_tooltip",2),L([i({type:Boolean,reflect:!0})],$.prototype,"inverted",2),L([i({type:String,reflect:!0})],$.prototype,"form",2),L([i({type:Number})],$.prototype,"maxlength",2),L([i({reflect:!0})],$.prototype,"width",2),L([i({type:Number})],$.prototype,"rows",2),L([i({reflect:!0})],$.prototype,"resize",1),L([i({type:Boolean,reflect:!0})],$.prototype,"showError",2),L([i({type:String})],$.prototype,"errorMessage",2);let c1=$;customElements.get("nys-textarea")||customElements.define("nys-textarea",c1);const to=g`
|
|
4817
4827
|
:host {
|
|
4818
4828
|
/* Anything that can be overridden should be defined here */
|
|
4819
4829
|
|
|
@@ -5051,7 +5061,7 @@ ${this.value}</textarea
|
|
|
5051
5061
|
color: var(--_nys-textinput-color--disabled);
|
|
5052
5062
|
cursor: not-allowed;
|
|
5053
5063
|
}
|
|
5054
|
-
`;var
|
|
5064
|
+
`;var so=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,_=(a,e,t,o)=>{for(var s=o>1?void 0:o?oo(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&so(e,t,s),s};let ro=0;const b=(X=class extends p{constructor(){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={tel:"(___) ___-____"},this._internals=this.attachInternals()}get type(){return this._type}set type(e){this._type=X.VALID_TYPES.includes(e)?e:"text"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-textinput-${Date.now()}-${ro++}`),this._originalErrorMessage=this.errorMessage??"",this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._setValue()}async updated(e){if(e.has("width")&&(await Promise.resolve(),this.width=X.VALID_WIDTHS.includes(this.width)?this.width:"full"),e.has("disabled")&&(this._validateButtonSlot("startButton"),this._validateButtonSlot("endButton")),e.has("type")){const t=this._maskPatterns[this.type],o=this.shadowRoot?.querySelector("input");if(o)if(t)o.maxLength=t.length,this._updateOverlay(o.value,t);else{o.removeAttribute("maxLength");const s=this.shadowRoot?.querySelector(".nys-textinput__mask-overlay");s&&(s.textContent="")}}}formResetCallback(){this.value=""}_setValue(){this._internals.setFormValue(this.value),this._manageRequire()}_manageRequire(){const e=this.shadowRoot?.querySelector("input");if(!e)return;const t=this.errorMessage||"This field is required";this.required&&(!this.value||this.value?.trim()==="")?(this._internals.ariaRequired="true",this._internals.setValidity({valueMissing:!0},t,e)):(this._internals.ariaRequired="false",this._internals.setValidity({}),this._hasUserInteracted=!1)}_setValidityMessage(e=""){const t=this.shadowRoot?.querySelector("input");if(!t)return;this.showError=!!e,this._originalErrorMessage?.trim()&&e!==""?this.errorMessage=this._originalErrorMessage:this.errorMessage=e;const o=e?{customError:!0}:{};this._internals.setValidity(o,this.errorMessage,t)}_validate(){const e=this.shadowRoot?.querySelector("input");if(!e)return;const t=e.validity;let o="";t.valueMissing?o="This field is required":t.typeMismatch?o="Invalid format for this type":t.patternMismatch?o="Invalid format":t.tooShort?o=`Value is too short. Minimum length is ${e.minLength}`:t.tooLong?o=`Value is too long. Maximum length is ${e.maxLength}`:t.rangeUnderflow?o=`Value must be at least ${e.min}`:t.rangeOverflow?o=`Value must be at most ${e.max}`:t.stepMismatch?o="Invalid step value":o=e.validationMessage,this._setValidityMessage(o)}checkValidity(){const e=this.shadowRoot?.querySelector("input");return e?e.checkValidity():!0}_handleInvalid(e){e.preventDefault(),this._hasUserInteracted=!0,this._validate();const t=this.shadowRoot?.querySelector("input");if(t){const o=this._internals.form;o?Array.from(o.elements).find(n=>typeof n.checkValidity=="function"&&!n.checkValidity())===this&&t.focus():t.focus()}}_togglePasswordVisibility(){this.showPassword=!this.showPassword}_updateOverlay(e,t){const o=this.shadowRoot?.querySelector(".nys-textinput__mask-overlay");if(!o)return;const s=e,r=t.slice(s.length);o.textContent=s+r}_applyMask(e,t){const o=e.replace(/\D/g,"");let s="";if(this.type==="tel")return o.length>0&&(s="("+o.substring(0,3)),o.length>=4&&(s+=") "+o.substring(3,6)),o.length>6&&(s+="-"+o.substring(6,10)),s;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="_"||t[n].match(/[d9]/i))if(r<o.length)s+=o[r++];else break;else s+=t[n];return s}_handleInput(e){const t=e.target;let o=t.value;const s=this._maskPatterns[this.type];s&&(o=this._applyMask(o,s),t.value=o,this._updateOverlay(o,s)),this.value=o,this._internals.setFormValue(this.value),this._hasUserInteracted&&this._validate(),this.dispatchEvent(new CustomEvent("nys-input",{detail:{id:this.id,value:this.value},bubbles:!0,composed:!0}))}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this._hasUserInteracted||(this._hasUserInteracted=!0),this._validate(),this.dispatchEvent(new Event("nys-blur"))}_validateButtonSlot(e){const t=this.shadowRoot?.querySelector('slot[name="'+e+'"]'),o=this.shadowRoot?.querySelector(".nys-textinput__buttoncontainer");if(!t||!o)return;const s=t.assignedElements();let r=!1;s.forEach(n=>{n instanceof HTMLElement&&n.tagName.toLowerCase()==="nys-button"&&!r?(r=!0,n.setAttribute("size","sm"),n.setAttribute("variant","primary"),this.disabled?n.setAttribute("disabled","true"):n.removeAttribute("disabled")):(console.warn("The '"+e+"' slot only accepts a single <nys-button> element. Removing invalid or extra node:",n),n.remove())}),e==="startButton"?o.classList.toggle("has-start-button",r):e==="endButton"&&o.classList.toggle("has-end-button",r)}render(){return l`
|
|
5055
5065
|
<div class="nys-textinput">
|
|
5056
5066
|
<nys-label
|
|
5057
5067
|
for=${this.id}
|
|
@@ -5059,7 +5069,7 @@ ${this.value}</textarea
|
|
|
5059
5069
|
description=${this.description}
|
|
5060
5070
|
flag=${this.required?"required":this.optional?"optional":""}
|
|
5061
5071
|
_tooltip=${this._tooltip}
|
|
5062
|
-
?
|
|
5072
|
+
?inverted=${this.inverted}
|
|
5063
5073
|
>
|
|
5064
5074
|
<slot name="description" slot="description">${this.description}</slot>
|
|
5065
5075
|
</nys-label>
|
|
@@ -5082,25 +5092,25 @@ ${this.value}</textarea
|
|
|
5082
5092
|
aria-disabled="${this.disabled}"
|
|
5083
5093
|
aria-label="${[this.label,this.description].filter(Boolean).join(" ")}"
|
|
5084
5094
|
.value=${this.value}
|
|
5085
|
-
placeholder=${
|
|
5086
|
-
pattern=${
|
|
5087
|
-
min=${
|
|
5088
|
-
maxlength=${
|
|
5089
|
-
step=${
|
|
5090
|
-
max=${
|
|
5091
|
-
form=${
|
|
5095
|
+
placeholder=${y(this.placeholder?this.placeholder:void 0)}
|
|
5096
|
+
pattern=${y(this.pattern?this.pattern:void 0)}
|
|
5097
|
+
min=${y(this.min!==null?this.min:void 0)}
|
|
5098
|
+
maxlength=${y(this.maxlength!==null?this.maxlength:void 0)}
|
|
5099
|
+
step=${y(this.step!==null?this.step:void 0)}
|
|
5100
|
+
max=${y(this.max!==null?this.max:void 0)}
|
|
5101
|
+
form=${y(this.form||void 0)}
|
|
5092
5102
|
@input=${this._handleInput}
|
|
5093
5103
|
@focus="${this._handleFocus}"
|
|
5094
5104
|
@blur="${this._handleBlur}"
|
|
5095
5105
|
/>
|
|
5096
|
-
${this.type==="password"?
|
|
5106
|
+
${this.type==="password"?l` <nys-button
|
|
5097
5107
|
class="eye-icon"
|
|
5098
5108
|
id="password-toggle"
|
|
5099
5109
|
suffixIcon="slotted"
|
|
5100
5110
|
ariaLabel="password toggle"
|
|
5101
|
-
.onClick=${()=>!this.disabled&&this._togglePasswordVisibility()}
|
|
5102
5111
|
variant="ghost"
|
|
5103
5112
|
size="sm"
|
|
5113
|
+
@nys-click=${()=>!this.disabled&&this._togglePasswordVisibility()}
|
|
5104
5114
|
>
|
|
5105
5115
|
<nys-icon
|
|
5106
5116
|
slot="suffix-icon"
|
|
@@ -5119,7 +5129,7 @@ ${this.value}</textarea
|
|
|
5119
5129
|
errorMessage=${this.errorMessage}
|
|
5120
5130
|
></nys-errormessage>
|
|
5121
5131
|
</div>
|
|
5122
|
-
`}},X.VALID_TYPES=["email","number","password","search","tel","text","url"],X.VALID_WIDTHS=["sm","md","lg","full"],X.styles=
|
|
5132
|
+
`}},X.VALID_TYPES=["email","number","password","search","tel","text","url"],X.VALID_WIDTHS=["sm","md","lg","full"],X.styles=to,X.formAssociated=!0,X);_([i({type:String})],b.prototype,"id",2),_([i({type:String,reflect:!0})],b.prototype,"name",2),_([i({reflect:!0})],b.prototype,"type",1),_([i({type:String})],b.prototype,"label",2),_([i({type:String})],b.prototype,"description",2),_([i({type:String})],b.prototype,"placeholder",2),_([i({type:String})],b.prototype,"value",2),_([i({type:Boolean,reflect:!0})],b.prototype,"disabled",2),_([i({type:Boolean,reflect:!0})],b.prototype,"readonly",2),_([i({type:Boolean,reflect:!0})],b.prototype,"required",2),_([i({type:Boolean,reflect:!0})],b.prototype,"optional",2),_([i({type:String})],b.prototype,"_tooltip",2),_([i({type:String,reflect:!0})],b.prototype,"form",2),_([i({type:String})],b.prototype,"pattern",2),_([i({type:Number})],b.prototype,"maxlength",2),_([i({reflect:!0})],b.prototype,"width",2),_([i({type:Number})],b.prototype,"step",2),_([i({type:Number})],b.prototype,"min",2),_([i({type:Number})],b.prototype,"max",2),_([i({type:Boolean,reflect:!0})],b.prototype,"inverted",2),_([i({type:Boolean,reflect:!0})],b.prototype,"showError",2),_([i({type:String})],b.prototype,"errorMessage",2),_([M()],b.prototype,"showPassword",2);let d1=b;customElements.get("nys-textinput")||customElements.define("nys-textinput",d1);const no=g`
|
|
5123
5133
|
:host {
|
|
5124
5134
|
/* Global Toggle Styles */
|
|
5125
5135
|
--_nys-toggle-width: var(--nys-font-size-8xl, 44px);
|
|
@@ -5389,16 +5399,16 @@ ${this.value}</textarea
|
|
|
5389
5399
|
--toggle-transition-duration: 0s; /* Disable animation */
|
|
5390
5400
|
}
|
|
5391
5401
|
}
|
|
5392
|
-
`;var
|
|
5402
|
+
`;var io=Object.defineProperty,ao=Object.getOwnPropertyDescriptor,W=(a,e,t,o)=>{for(var s=o>1?void 0:o?ao(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&io(e,t,s),s};let lo=0;const F=(ye=class extends p{constructor(){super(),this.id="",this.name="",this.value="",this.label="",this.description="",this.form=null,this.checked=!1,this.disabled=!1,this.noIcon=!1,this.inverted=!1,this._size="md",this._internals=this.attachInternals()}get size(){return this._size}set size(e){this._size=ye.VALID_SIZES.includes(e)?e:"md"}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-toggle-${Date.now()}-${lo++}`)}updated(e){(e.has("checked")||e.has("value"))&&this._internals.setFormValue(this.checked?this.value:null)}_emitChangeEvent(){this.dispatchEvent(new CustomEvent("nys-change",{detail:{id:this.id,checked:this.checked},bubbles:!0,composed:!0}))}_handleFocus(){this.dispatchEvent(new Event("nys-focus"))}_handleBlur(){this.dispatchEvent(new Event("nys-blur"))}_handleChange(e){const{checked:t}=e.target;this.checked=t,this._emitChangeEvent()}_handleKeyDown(e){!this.disabled&&(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this.checked=!this.checked,this._emitChangeEvent())}render(){return l`
|
|
5393
5403
|
<label class="nys-toggle">
|
|
5394
5404
|
<div class="nys-toggle__content">
|
|
5395
5405
|
<div class="nys-toggle__toggle">
|
|
5396
5406
|
<input
|
|
5397
5407
|
id="${this.id}"
|
|
5398
5408
|
type="checkbox"
|
|
5399
|
-
name="${
|
|
5409
|
+
name="${y(this.name?this.name:void 0)}"
|
|
5400
5410
|
.value=${this.value}
|
|
5401
|
-
form=${
|
|
5411
|
+
form=${y(this.form||void 0)}
|
|
5402
5412
|
.checked=${this.checked}
|
|
5403
5413
|
?disabled=${this.disabled}
|
|
5404
5414
|
role="switch"
|
|
@@ -5411,7 +5421,7 @@ ${this.value}</textarea
|
|
|
5411
5421
|
/>
|
|
5412
5422
|
<span class="slider">
|
|
5413
5423
|
<div class="knob">
|
|
5414
|
-
${this.noIcon?"":
|
|
5424
|
+
${this.noIcon?"":l`<nys-icon
|
|
5415
5425
|
class="toggle-icon"
|
|
5416
5426
|
name="${this.checked?"check":"close"}"
|
|
5417
5427
|
size="2xl"
|
|
@@ -5419,13 +5429,13 @@ ${this.value}</textarea
|
|
|
5419
5429
|
</div>
|
|
5420
5430
|
</span>
|
|
5421
5431
|
</div>
|
|
5422
|
-
<div class="nys-toggle__text ${this.
|
|
5432
|
+
<div class="nys-toggle__text ${this.inverted?"invert":""}">
|
|
5423
5433
|
<div class="nys-toggle__label">${this.label}</div>
|
|
5424
5434
|
<slot name="description">${this.description}</slot>
|
|
5425
5435
|
</div>
|
|
5426
5436
|
</div>
|
|
5427
5437
|
</label>
|
|
5428
|
-
`}},
|
|
5438
|
+
`}},ye.VALID_SIZES=["sm","md"],ye.styles=no,ye.formAssociated=!0,ye);W([i({type:String})],F.prototype,"id",2),W([i({type:String,reflect:!0})],F.prototype,"name",2),W([i({type:String})],F.prototype,"value",2),W([i({type:String})],F.prototype,"label",2),W([i({type:String})],F.prototype,"description",2),W([i({type:String,reflect:!0})],F.prototype,"form",2),W([i({type:Boolean,reflect:!0})],F.prototype,"checked",2),W([i({type:Boolean,reflect:!0})],F.prototype,"disabled",2),W([i({type:Boolean})],F.prototype,"noIcon",2),W([i({type:Boolean,reflect:!0})],F.prototype,"inverted",2),W([i({reflect:!0})],F.prototype,"size",1);let h1=F;customElements.get("nys-toggle")||customElements.define("nys-toggle",h1);const co=g`
|
|
5429
5439
|
:host {
|
|
5430
5440
|
/* Global Tooltip Styles */
|
|
5431
5441
|
--_nys-tooltip-color: var(--nys-color-text-reverse, #ffffff);
|
|
@@ -5581,7 +5591,7 @@ ${this.value}</textarea
|
|
|
5581
5591
|
); /* 2rem = 32px = 16px margin on each side */
|
|
5582
5592
|
}
|
|
5583
5593
|
}
|
|
5584
|
-
`;var
|
|
5594
|
+
`;var ho=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,Oe=(a,e,t,o)=>{for(var s=o>1?void 0:o?yo(e,t):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&ho(e,t,s),s};let uo=0;const Et=class Et extends p{constructor(){super(),this.id="",this.text="",this.inverted=!1,this.focusable=!1,this._active=!1,this._userHasSetPosition=!1,this._originalUserPosition=null,this._internallyUpdatingPosition=!1,this._position=null,this._handleTooltipEnter=()=>{if(this._active=!0,this._addScrollListeners(),this._userHasSetPosition&&this._originalUserPosition&&this._doesPositionFit(this._originalUserPosition)){this.position=this._originalUserPosition,this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelector(".nys-tooltip__content");e&&this._shiftTooltipIntoViewport(e)});return}this.autoPositionTooltip()},this._handleBlurOrMouseLeave=()=>{this._active=!1,this._removeScrollListeners();const e=this.shadowRoot?.querySelector(".nys-tooltip__content");e&&this._resetTooltipPositioningStyles(e)},this._handleScrollOrResize=()=>{this._active&&(this._userHasSetPosition&&this._originalUserPosition?this._doesPositionFit(this._originalUserPosition)?(this._setInternalPosition(this._originalUserPosition),this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelector(".nys-tooltip__content");e&&this._shiftTooltipIntoViewport(e)})):this.autoPositionTooltip():this.autoPositionTooltip())},this._handleEscapeKey=e=>{if(e.key==="Escape"&&this._active){this._active=!1,this._removeScrollListeners();const t=this.shadowRoot?.querySelector(".nys-tooltip__content");t&&this._resetTooltipPositioningStyles(t)}}}get position(){return this._position}set position(e){const t=this._position;this._position=e,this.requestUpdate("position",t),this._internallyUpdatingPosition||(this._userHasSetPosition=e!==null,this._originalUserPosition=e)}connectedCallback(){super.connectedCallback(),this.id||(this.id=`nys-tooltip-${Date.now()}-${uo++}`),window.addEventListener("keydown",this._handleEscapeKey)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._handleEscapeKey)}get _firstAssignedEl(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})[0]}firstUpdated(){const e=this.shadowRoot?.querySelector("slot");e&&e.addEventListener("slotchange",()=>{const t=this._firstAssignedEl;t&&this._applyFocusBehavior(t)})}updated(e){super.updated(e);const t=this._firstAssignedEl;t&&(e.has("text")&&this._passAria(t),e.has("focusable")&&this._applyFocusBehavior(t))}_addScrollListeners(){window.addEventListener("scroll",this._handleScrollOrResize,!0),window.addEventListener("resize",this._handleScrollOrResize)}_removeScrollListeners(){window.removeEventListener("scroll",this._handleScrollOrResize,!0),window.removeEventListener("resize",this._handleScrollOrResize)}_passAria(e){const t=e.tagName.toLowerCase();if(t.startsWith("nys-"))if(t==="nys-icon"){const o=e.getAttribute("ariaLabel")||"",s=o?`${o}, ${this.text}`:this.text;e.setAttribute("ariaLabel",s)}else e.setAttribute("ariaDescription",this.text)}async _applyFocusBehavior(e){if(!this.focusable)return;if(e.tagName.toLowerCase()==="nys-icon"){"updateComplete"in e&&await e.updateComplete;const o=e.shadowRoot?.querySelector("svg");o&&o.setAttribute("tabindex","0")}else e.setAttribute("tabindex","0")}_doesPositionFit(e){const t=this.shadowRoot?.querySelector(".nys-tooltip__wrapper"),o=this.shadowRoot?.querySelector(".nys-tooltip__content");if(!t||!o||e==null)return;const s=t.getBoundingClientRect(),r=o.getBoundingClientRect(),n=8,c={top:s.top-n,left:s.left-n,bottom:window.innerHeight-s.bottom-n,right:window.innerWidth-s.right-n};return{top:c.top>=r.height,bottom:c.bottom>=r.height,left:c.left>=r.width,right:c.right>=r.width}[e]}async autoPositionTooltip(){const e=this.shadowRoot?.querySelector(".nys-tooltip__wrapper"),t=this.shadowRoot?.querySelector(".nys-tooltip__content");if(!e||!t)return;const o=e.getBoundingClientRect(),s=8,r={top:o.top-s,left:o.left-s,bottom:window.innerHeight-o.bottom-s,right:window.innerWidth-o.right-s};let n=["top","bottom","right","left"];if(this._userHasSetPosition&&this._originalUserPosition){const h=this._originalUserPosition;h==="left"?n=["left","right","top","bottom"]:h==="right"?n=["right","left","top","bottom"]:h==="top"?n=["top","bottom","right","left"]:h==="bottom"&&(n=["bottom","top","right","left"])}for(const h of n)if(this._doesPositionFit(h)){this._setInternalPosition(h),await this.updateComplete,this._shiftTooltipIntoViewport(t);return}let c="top",d=r.top;for(const h of n)r[h]>d&&(d=r[h],c=h);this._setInternalPosition(c),await this.updateComplete,this._shiftTooltipIntoViewport(t)}_setInternalPosition(e){this._internallyUpdatingPosition=!0,this.position=e,this._internallyUpdatingPosition=!1}_shiftTooltipIntoViewport(e){const o=(this.shadowRoot?.querySelector(".nys-tooltip__wrapper")).getBoundingClientRect(),s=e.getBoundingClientRect(),r=o.left+o.width/2,n=s.left<0,c=s.right>window.innerWidth;this._resetTooltipPositioningStyles(e),n?(e.style.left="0px",e.style.transform="none"):c&&(e.style.right="0px",e.style.left="auto",e.style.transform="none");const d=e.getBoundingClientRect(),h=(r-d.left)/d.width,f=Math.max(0,Math.min(1,h))*100;e.style.setProperty("--arrow-offset-x",`${f}%`)}_resetTooltipPositioningStyles(e){e.style.left="",e.style.right="",e.style.transform=""}render(){return l`
|
|
5585
5595
|
<div class="nys-tooltip__main">
|
|
5586
5596
|
<div
|
|
5587
5597
|
class="nys-tooltip__wrapper"
|
|
@@ -5594,7 +5604,7 @@ ${this.value}</textarea
|
|
|
5594
5604
|
<slot></slot>
|
|
5595
5605
|
</span>
|
|
5596
5606
|
</div>
|
|
5597
|
-
${
|
|
5607
|
+
${this.text?.trim()?l`<div
|
|
5598
5608
|
id=${this.id}
|
|
5599
5609
|
class="nys-tooltip__content"
|
|
5600
5610
|
role="tooltip"
|
|
@@ -5605,7 +5615,7 @@ ${this.value}</textarea
|
|
|
5605
5615
|
<span class="nys-tooltip__arrow"></span>
|
|
5606
5616
|
</div>`:""}
|
|
5607
5617
|
</div>
|
|
5608
|
-
`}};
|
|
5618
|
+
`}};Et.styles=co;let ee=Et;Oe([i({type:String})],ee.prototype,"id",2),Oe([i({type:String})],ee.prototype,"text",2),Oe([i({type:Boolean,reflect:!0})],ee.prototype,"inverted",2),Oe([i({type:Boolean,reflect:!0})],ee.prototype,"focusable",2),Oe([M()],ee.prototype,"_active",2),Oe([i({type:String,reflect:!0})],ee.prototype,"position",1),customElements.get("nys-tooltip")||customElements.define("nys-tooltip",ee);const po=g`
|
|
5609
5619
|
:host {
|
|
5610
5620
|
/* Global Unav Header Styles */
|
|
5611
5621
|
--_nys-unavheader-padding--gutter: var(--nys-gutter-xs, 20px);
|
|
@@ -5824,7 +5834,8 @@ ${this.value}</textarea
|
|
|
5824
5834
|
max-width: var(--nys-form-width-lg, 384px);
|
|
5825
5835
|
}
|
|
5826
5836
|
|
|
5827
|
-
#nys-unavheader__translate,
|
|
5837
|
+
#nys-unavheader__translate--desktop,
|
|
5838
|
+
#nys-unavheader__translate--mobile,
|
|
5828
5839
|
#nys-unavheader__searchbutton {
|
|
5829
5840
|
/* These props ARE publicly overridable */
|
|
5830
5841
|
--nys-button-color: var(--nys-color-state-blue-700, #154973);
|
|
@@ -5905,7 +5916,7 @@ ${this.value}</textarea
|
|
|
5905
5916
|
flex-direction: column;
|
|
5906
5917
|
}
|
|
5907
5918
|
|
|
5908
|
-
#nys-unavheader__translate
|
|
5919
|
+
#nys-unavheader__translate--desktop,
|
|
5909
5920
|
#nys-unavheader__searchbar {
|
|
5910
5921
|
display: none;
|
|
5911
5922
|
}
|
|
@@ -5925,7 +5936,7 @@ ${this.value}</textarea
|
|
|
5925
5936
|
flex-direction: column;
|
|
5926
5937
|
}
|
|
5927
5938
|
|
|
5928
|
-
#nys-unavheader__translate
|
|
5939
|
+
#nys-unavheader__translate--desktop,
|
|
5929
5940
|
#nys-unavheader__searchbar {
|
|
5930
5941
|
display: none;
|
|
5931
5942
|
}
|
|
@@ -5941,7 +5952,7 @@ ${this.value}</textarea
|
|
|
5941
5952
|
display: none;
|
|
5942
5953
|
}
|
|
5943
5954
|
|
|
5944
|
-
#nys-unavheader__translate
|
|
5955
|
+
#nys-unavheader__translate--desktop,
|
|
5945
5956
|
#nys-unavheader__searchbar {
|
|
5946
5957
|
display: none;
|
|
5947
5958
|
}
|
|
@@ -5960,7 +5971,7 @@ ${this.value}</textarea
|
|
|
5960
5971
|
display: none;
|
|
5961
5972
|
}
|
|
5962
5973
|
|
|
5963
|
-
#nys-unavheader__translate
|
|
5974
|
+
#nys-unavheader__translate--mobile,
|
|
5964
5975
|
#nys-unavheader__searchbutton[circle] {
|
|
5965
5976
|
display: none;
|
|
5966
5977
|
}
|
|
@@ -5987,7 +5998,7 @@ ${this.value}</textarea
|
|
|
5987
5998
|
display: none;
|
|
5988
5999
|
}
|
|
5989
6000
|
|
|
5990
|
-
#nys-unavheader__translate
|
|
6001
|
+
#nys-unavheader__translate--mobile,
|
|
5991
6002
|
#nys-unavheader__searchbutton[circle] {
|
|
5992
6003
|
display: none;
|
|
5993
6004
|
}
|
|
@@ -6004,7 +6015,7 @@ ${this.value}</textarea
|
|
|
6004
6015
|
order: 2;
|
|
6005
6016
|
}
|
|
6006
6017
|
}
|
|
6007
|
-
`,
|
|
6018
|
+
`,vo=`<svg xmlns="http://www.w3.org/2000/svg" width="91" height="55" viewBox="0 0 91 55" fill="none">
|
|
6008
6019
|
<path d="M55.1158 7.50499L58.2905 12.6494V7.5189C58.2905 7.5189 58.6487 7.26356 59.5098 7.26356C60.3708 7.26356 60.7378 7.5189 60.7378 7.5189V16.4327C60.7378 16.4327 60.3942 16.689 59.5215 16.689C58.6487 16.689 58.3295 16.4605 58.3295 16.4605L55.1421 11.3171V16.4337C55.1421 16.4337 54.7848 16.69 53.9111 16.69C53.0374 16.69 52.7065 16.4337 52.7065 16.4337V7.51989C52.7065 7.51989 53.0384 7.26456 53.9248 7.26456C54.8112 7.26456 55.1148 7.50697 55.1148 7.50697L55.1158 7.50499Z" fill="#457AA5"/>
|
|
6009
6020
|
<path d="M67.2209 12.5948H64.9063V14.8709H68.2538C68.2538 14.8709 68.5047 15.1531 68.5047 15.772C68.5047 16.391 68.2538 16.688 68.2538 16.688H62.4589V7.26257H67.9892C67.9892 7.26257 68.2538 7.54572 68.2538 8.17859C68.2538 8.81146 67.9892 9.09362 67.9892 9.09362H64.9063V10.7637H67.2209C67.2209 10.7637 67.4728 11.0598 67.4728 11.6787C67.4728 12.2977 67.2209 12.5948 67.2209 12.5948Z" fill="#457AA5"/>
|
|
6010
6021
|
<path d="M71.4802 16.4327L68.9791 7.5189C68.9791 7.5189 69.3491 7.26356 70.2101 7.26356C71.0711 7.26356 71.4275 7.5189 71.4275 7.5189L72.6839 12.0434C72.7766 12.3802 72.8166 12.6365 72.8557 12.7845C72.8557 12.7428 72.9221 12.3663 73.0011 12.0573L74.0984 7.5189C74.0984 7.5189 74.5211 7.26356 75.1176 7.26356C75.7141 7.26356 76.084 7.5189 76.084 7.5189L77.3004 12.7845C77.3004 12.6623 77.3795 12.3255 77.4586 12.0573L78.756 7.5189C78.7686 7.5189 79.1132 7.26356 79.9596 7.26356C80.806 7.26356 81.1897 7.5189 81.1897 7.5189L78.6496 16.4327C78.6496 16.4327 78.2922 16.6751 77.4859 16.689C76.5468 16.689 76.2158 16.4327 76.2158 16.4327L75.223 12.2987C75.1449 11.9887 75.0902 11.6529 75.0785 11.5844L74.9184 12.2987L73.9266 16.4327C73.9266 16.4327 73.583 16.689 72.7092 16.689C71.8355 16.689 71.4802 16.4327 71.4802 16.4327Z" fill="#457AA5"/>
|
|
@@ -6020,11 +6031,11 @@ ${this.value}</textarea
|
|
|
6020
6031
|
<path d="M51.7107 54.9999C51.577 54.9999 51.4335 54.974 51.2939 54.8965C51.085 54.7803 50.9395 54.5876 50.8858 54.3551C50.8233 54.0868 50.8936 53.7868 51.082 53.5116L51.1426 53.4202C51.2041 53.3268 51.2685 53.2354 51.3407 53.1519C51.4218 53.0595 51.5047 52.995 51.5741 52.9493C51.5243 52.6691 51.5418 52.4267 51.5682 52.2061C51.5877 52.0233 51.6346 51.8683 51.6726 51.7451C51.6892 51.6925 51.7058 51.6388 51.7185 51.5812C51.8201 51.145 51.8855 50.7397 51.9206 50.3453C51.9528 49.9916 51.947 49.9846 51.8864 49.9061C51.7 49.6707 51.3847 49.5018 51.0498 49.3229C50.8878 49.2365 50.7286 49.1491 50.5754 49.0557C49.607 48.4536 48.6376 47.8505 47.6701 47.2465L47.3294 47.0339C47.2513 46.9862 47.1147 46.9156 46.9516 46.8282C45.8817 46.2659 45.172 45.8526 45.0539 45.2595C45.0363 45.173 44.9465 44.9644 44.884 44.864C44.8411 44.8611 44.7307 44.8521 44.6546 44.8471C44.3032 44.8183 43.7711 44.7726 43.3484 44.3196C43.2635 44.2272 43.1786 44.1408 43.1005 44.0583C42.5098 43.4443 42.0003 42.9148 41.9329 41.5993C41.9241 41.4275 41.9251 41.2506 41.928 41.0728C41.9339 40.5283 41.927 40.1836 41.7103 39.962C41.6078 39.8567 41.435 39.7862 41.2349 39.7037C40.9889 39.6034 40.7097 39.4881 40.45 39.2686C40.37 39.2 40.2792 39.1007 40.1776 38.9854C40.0712 38.8602 39.9082 38.6724 39.7969 38.6337C38.974 38.3436 37.986 38.3178 36.96 38.3178L3.07245 38.2909C2.85964 38.2909 2.66927 38.3138 2.48477 38.3347C2.07378 38.3823 1.60812 38.437 1.2313 38.0962C0.866192 37.7664 0.815429 37.2607 0.814452 36.8076L0.8125 34.3993C0.8125 34.2722 0.847644 34.147 0.913051 34.0387C1.22544 33.529 1.83265 33.2558 2.3686 33.0144C2.56872 32.924 2.77666 32.8316 2.88795 32.7571C3.17593 32.5623 3.43561 32.302 3.7109 32.0248C3.91688 31.8182 4.13068 31.6046 4.36887 31.4059C4.69786 31.1317 5.07078 30.931 5.43296 30.7372C5.74535 30.5703 6.03821 30.4124 6.24127 30.2395C6.38575 30.1173 6.49216 29.9146 6.61906 29.6792C6.75476 29.4238 6.90998 29.1337 7.15208 28.8804C7.41273 28.6081 7.7427 28.4194 8.03263 28.2535C8.69744 27.871 8.68182 27.8322 8.57736 27.5769C8.52855 27.4577 8.48072 27.3553 8.43972 27.2639C8.24447 26.8357 8.07754 26.4681 8.19078 25.7051C8.2025 25.6306 8.21616 25.5521 8.22983 25.4706C8.25619 25.3325 8.30305 25.0772 8.27571 25.0037C8.27571 25.0037 8.26204 24.9927 8.23471 24.9778C8.21128 24.9659 8.12928 24.9669 8.06875 24.9679C7.87448 24.9659 7.51914 24.9768 7.2497 24.6689C6.98124 24.3629 6.99686 23.9555 7.03982 23.6356C7.08179 23.3127 7.06032 23.1051 7.03982 22.9223C6.95684 22.1453 7.21358 21.7817 8.10097 21.424C10.7524 20.351 12.901 19.9884 14.8613 20.2805C14.9775 20.2974 15.1356 20.2656 15.3182 20.2269C15.5944 20.1702 15.9351 20.1017 16.312 20.1752L18.3952 20.5766C19.2475 20.7415 19.6653 20.9054 20.3047 21.4995C20.6327 21.8046 20.7655 21.7718 21.3327 21.5661C21.6168 21.4638 21.9399 21.3485 22.3323 21.2949C22.9727 21.2084 23.5731 21.2661 24.153 21.3227C24.4136 21.3475 24.6762 21.3734 24.9408 21.3843C25.2356 21.3952 25.6085 21.2561 25.9717 21.121C26.1318 21.0614 26.2889 21.0028 26.4412 20.9541C26.78 20.8468 27.0973 20.7991 27.4038 20.7514C27.5551 20.7266 27.7064 20.7037 27.8607 20.6729C27.8714 20.6531 27.8821 20.6332 27.8939 20.6113C27.9417 20.5249 27.9944 20.4345 28.0598 20.3411C28.3419 19.9497 28.7471 19.7003 29.0722 19.4966L29.2078 19.4122C29.5564 19.1916 29.8629 18.9879 30.105 18.7386C30.5423 18.2796 31.1232 18.3114 31.5108 18.3312C31.6455 18.3392 31.8495 18.3481 31.91 18.3223C32.1678 18.207 31.9413 17.3993 31.8065 16.9165C31.7119 16.5777 31.6299 16.2846 31.6133 16.0183C31.5664 15.2642 31.9764 14.7317 32.3064 14.3045C32.5651 13.9687 32.7213 13.7481 32.7164 13.5355C32.7164 13.4948 32.7027 13.4382 32.6851 13.3845C32.4587 13.4948 32.0955 13.6369 31.6796 13.4421C31.0129 13.1302 30.6468 12.0264 30.8508 11.3985C31.0197 10.8779 31.54 10.5421 31.9198 10.2957L32.0565 10.2053C32.3806 9.98471 32.7242 9.79792 33.0542 9.6181C33.5159 9.36873 33.9513 9.13227 34.2949 8.82726C34.4404 8.69711 34.5761 8.56994 34.7089 8.44376C35.0076 8.1626 35.3161 7.8715 35.6792 7.61319C35.7056 7.5188 35.728 7.34096 35.7437 7.22571C35.7729 7.00714 35.8022 6.78062 35.8803 6.5849C36.2513 5.64304 37.1592 4.90884 37.9597 4.25908C38.2252 4.04448 38.4771 3.84081 38.6743 3.65602C38.7992 3.53878 38.9222 3.42055 39.0452 3.30332C39.6388 2.73701 40.2509 2.15084 40.9967 1.68289C41.601 1.30536 42.3898 0.833439 43.1249 0.552274C44.0972 0.1807 44.5579 0.208518 45.4766 0.262168L45.6474 0.27111C47.3607 0.371455 49.1384 0.32476 50.8575 0.281045C51.7205 0.258194 52.5796 0.235343 53.4347 0.230376C53.6651 0.230376 54.0156 0.185667 54.3836 0.138972C55.6078 -0.0140291 56.994 -0.188888 57.7818 0.503592C58.1118 0.792705 58.2924 1.19806 58.3031 1.67594C58.311 2.05248 58.1567 2.33464 58.0435 2.54129C58.0064 2.60686 57.9527 2.7082 57.9458 2.74297C57.9488 2.73205 57.9849 2.78768 58.0103 2.82742C58.1362 3.01718 58.3686 3.37088 58.2748 3.89843C58.2397 4.10111 58.1811 4.3167 58.1216 4.53528C58.0464 4.81147 57.9693 5.09761 57.9624 5.31419C57.9498 5.69073 57.6335 5.99376 57.2703 5.97289C56.9013 5.95998 56.6104 5.64603 56.6231 5.26849C56.6367 4.89195 56.7392 4.50944 56.831 4.17264C56.8788 3.9948 56.9276 3.82094 56.9569 3.65502C56.9481 3.65502 56.9218 3.62323 56.8993 3.58746C56.791 3.42254 56.6065 3.14535 56.6065 2.73701C56.6065 2.36345 56.7607 2.08328 56.873 1.87862C56.9072 1.81702 56.9589 1.72462 56.9657 1.69084C56.9608 1.58354 56.9267 1.55274 56.9072 1.53685C56.5694 1.23979 55.2544 1.40372 54.5496 1.49313C54.1386 1.5438 53.752 1.59348 53.4435 1.59547C52.5971 1.60043 51.7439 1.62229 50.8907 1.64315C49.1442 1.68886 47.3382 1.73654 45.5722 1.63421L45.3985 1.62328C44.5345 1.57162 44.3022 1.55871 43.5964 1.82894C42.9618 2.07235 42.2101 2.5244 41.7006 2.84431C41.0699 3.23973 40.533 3.75338 39.9648 4.29683C39.8379 4.41804 39.712 4.53925 39.5831 4.65947C39.3479 4.87804 39.0794 5.09661 38.7953 5.32611C38.1237 5.87056 37.3642 6.48555 37.1231 7.09457C37.1065 7.14425 37.085 7.30221 37.0713 7.40753C37.0147 7.84666 36.9424 8.3931 36.5041 8.69016C36.1927 8.90277 35.9145 9.16704 35.6187 9.44523C35.4771 9.57935 35.3317 9.71546 35.1774 9.85257C34.7186 10.2629 34.1924 10.548 33.6838 10.8222C33.3675 10.9931 33.0698 11.1541 32.8033 11.3369C32.7554 11.3707 32.6978 11.4064 32.6373 11.4462C32.5114 11.5276 32.2332 11.7065 32.1346 11.8217C32.1424 11.8992 32.1726 12.0115 32.2117 12.1009C32.3757 12.0214 32.6041 11.924 32.8804 11.9459C33.6633 12.0135 34.0401 12.8937 34.0558 13.4988C34.0743 14.2191 33.677 14.7337 33.3587 15.145C33.0971 15.4868 32.9351 15.7074 32.9487 15.9319C32.9565 16.0511 33.0288 16.3114 33.0932 16.5419C33.3314 17.3933 33.7746 18.978 32.4479 19.5701C32.0965 19.7281 31.7314 19.7082 31.4375 19.6933C31.3126 19.6864 31.1046 19.6764 31.047 19.7023C30.7171 20.051 30.3227 20.3113 29.9166 20.5706L29.7692 20.663C29.5212 20.816 29.2654 20.976 29.1405 21.1488C29.1083 21.1935 29.0819 21.2412 29.0585 21.2859C28.9345 21.5085 28.7256 21.884 28.174 21.9993C27.9827 22.04 27.7943 22.0708 27.6059 22.0996C27.3364 22.1414 27.0807 22.1811 26.8386 22.2566C26.7087 22.2993 26.5711 22.35 26.4334 22.4017C25.9697 22.5745 25.4435 22.7732 24.8871 22.7474C24.5981 22.7355 24.3131 22.7087 24.027 22.6808C23.4989 22.6282 22.9981 22.5805 22.511 22.6481C22.2572 22.6828 22.0258 22.7653 21.7817 22.8537C21.1716 23.0733 20.3369 23.3733 19.4046 22.508C18.9927 22.1265 18.8267 22.049 18.1473 21.9178L16.065 21.5164C15.942 21.4936 15.775 21.5264 15.5818 21.5651C15.3289 21.6168 15.0136 21.6784 14.6719 21.6297C12.9508 21.3724 11.0218 21.7112 8.59689 22.6928C8.49829 22.7325 8.42703 22.7643 8.37431 22.7891C8.39579 22.9779 8.42312 23.2491 8.39091 23.6217C8.53343 23.6416 8.69353 23.6843 8.86047 23.7737C9.81228 24.2834 9.63461 25.256 9.5487 25.724C9.53601 25.7876 9.52528 25.8511 9.51551 25.9127C9.4628 26.2694 9.49501 26.3429 9.65511 26.6917C9.70392 26.798 9.75664 26.9162 9.81326 27.0543C10.3941 28.4681 9.28415 29.1039 8.68865 29.4447C8.46705 29.5719 8.23764 29.701 8.11268 29.8331C7.99944 29.9524 7.89987 30.1372 7.79541 30.3329C7.62945 30.6448 7.44104 30.9975 7.10522 31.2847C6.79088 31.5529 6.41894 31.7536 6.05871 31.9454C5.74144 32.1153 5.44077 32.2762 5.21623 32.464C5.02782 32.6219 4.84527 32.8048 4.65295 32.9985C4.34252 33.3085 4.02524 33.6294 3.62499 33.8976C3.41901 34.0347 3.17203 34.147 2.9104 34.2652C2.69661 34.3606 2.33443 34.5225 2.14992 34.6626L2.15383 36.8096C2.15383 36.8881 2.15578 36.9527 2.15871 37.0023C2.21533 36.9974 2.27586 36.9904 2.32662 36.9835C2.5287 36.9606 2.77959 36.9308 3.06952 36.9308L36.9581 36.9566C38.0573 36.9566 39.2141 36.9884 40.2304 37.3471C40.6755 37.5021 40.9801 37.8538 41.1812 38.0853C41.2281 38.1399 41.2681 38.1896 41.3052 38.2234C41.4018 38.3048 41.5551 38.3674 41.7328 38.441C42.0129 38.5562 42.3615 38.7003 42.6572 39.0043C43.2811 39.6411 43.2713 40.4469 43.2645 41.0927C43.2606 41.2417 43.2606 41.3897 43.2664 41.5328C43.3084 42.3326 43.5261 42.5581 44.0532 43.1055C44.1372 43.1929 44.2251 43.2853 44.3188 43.3847C44.3842 43.4542 44.5287 43.4701 44.761 43.491C45.0412 43.5138 45.3897 43.5417 45.6953 43.7751C46.0291 44.0275 46.2546 44.5888 46.3376 44.8809C46.5455 45.0846 47.2777 45.4711 47.5647 45.6211C47.7639 45.7264 47.9298 45.8158 48.0265 45.8754L48.3672 46.088C49.3346 46.6891 50.3011 47.2922 51.2705 47.8943C51.3993 47.9727 51.533 48.0463 51.6707 48.1188C52.0924 48.3443 52.5698 48.6006 52.9291 49.0567C53.3215 49.5544 53.2942 50.0045 53.259 50.4029C53.3156 50.2936 53.3781 50.1893 53.4513 50.0879C53.5841 49.8982 53.7393 49.7541 53.877 49.626C54.0136 49.4998 54.1073 49.4104 54.1396 49.3388C54.1132 49.2772 54.0527 49.1739 54.0117 49.1034C53.8487 48.8232 53.6271 48.4387 53.7315 47.9857C53.7725 47.8108 53.8789 47.6588 54.0283 47.5634C54.0849 47.5276 54.205 47.4591 54.3631 47.3717C54.5818 47.2495 55.1373 46.9405 55.475 46.71C54.9723 45.5913 55.1392 44.2163 55.2886 42.9843C55.3345 42.6038 55.3784 42.2451 55.3989 41.9222C55.4204 41.5467 55.7337 41.2606 56.1076 41.2834C56.4776 41.3063 56.7588 41.6301 56.7353 42.0057C56.7148 42.3693 56.667 42.7498 56.6182 43.1522C56.4776 44.3166 56.3165 45.637 56.833 46.3911C56.954 46.5669 56.994 46.7895 56.9452 47.0021C56.8417 47.4502 56.3898 47.7879 55.1958 48.4606C55.352 48.7308 55.5395 49.0904 55.4731 49.5167C55.4623 49.5812 55.4487 49.6428 55.4321 49.7015C55.766 49.5793 56.1154 49.464 56.4845 49.3577C57.8775 48.9543 59.3409 48.7745 61.225 48.7745C62.0587 48.7745 62.8006 48.5053 63.5874 48.2211C64.2103 47.9946 64.8546 47.7621 65.576 47.6508C66.1852 47.5555 66.5005 47.7562 66.7728 47.9688C66.8636 48.0403 66.93 48.09 67.0442 48.1357C67.3625 48.2619 67.7325 48.2211 68.1601 48.1754C68.5925 48.1277 69.0836 48.0731 69.5844 48.2042C69.8821 48.2837 70.09 48.5579 70.0861 48.8709C70.0744 50.0571 68.5076 50.5459 67.7549 50.7814L67.0384 51.0099C66.4985 51.1848 65.9567 51.3586 65.41 51.5176C65.1631 51.5881 64.918 51.6587 64.672 51.7223C64.3889 51.7948 64.099 51.9597 63.7944 52.1316C63.481 52.3094 63.1579 52.4922 62.786 52.6174C62.1426 52.83 61.4837 52.9413 60.6471 52.9761C60.4069 52.987 60.1746 53.0943 59.9295 53.2056C59.5674 53.3735 59.1154 53.5801 58.6107 53.4132C58.3949 53.3864 57.5534 53.6775 57.1502 53.8196C56.832 53.9289 56.5577 54.0242 56.3419 54.0759C55.598 54.2528 54.8415 54.3918 54.1103 54.527L53.5968 54.6223C53.1516 54.7058 52.7035 54.7922 52.2613 54.8926L52.2076 54.9085C52.0797 54.9482 51.9021 55.0038 51.7078 55.0038L51.7107 54.9999ZM53.0735 51.6746C53.0569 51.7471 53.0403 51.8196 53.0237 51.8941C53.0032 51.9806 52.9788 52.064 52.9544 52.1455C52.9281 52.2359 52.9066 52.3055 52.8988 52.3651C52.8793 52.5379 52.8773 52.6313 52.8978 52.7247C52.9495 52.9791 52.9388 53.1907 52.8949 53.3645C53.0482 53.3347 53.2024 53.3049 53.3566 53.2751L53.875 53.1808C54.5896 53.0486 55.3296 52.9125 56.0412 52.7436C56.1906 52.7078 56.4483 52.6194 56.7217 52.525C57.7721 52.1604 58.4994 51.9359 59.0295 52.1127C59.0646 52.1058 59.2559 52.0173 59.3828 51.9597C59.7001 51.8137 60.0945 51.6328 60.5924 51.611C61.3021 51.5812 61.8498 51.4908 62.372 51.3169C62.622 51.2345 62.8748 51.0914 63.1442 50.9374C63.5123 50.7298 63.892 50.5142 64.3469 50.3969C64.5793 50.3373 64.8136 50.2707 65.0459 50.2042C65.5789 50.0482 66.11 49.8773 66.6362 49.7064L67.1253 49.5514C66.9388 49.5246 66.7504 49.4779 66.56 49.4014C66.2672 49.2862 66.0836 49.1411 65.9616 49.0457C65.9313 49.0229 65.906 48.999 65.8757 48.9812C65.8737 48.9851 65.8405 48.9851 65.7781 48.9941C65.1845 49.0855 64.6281 49.2862 64.0394 49.4998C63.1794 49.8107 62.293 50.1326 61.2279 50.1326C59.4717 50.1326 58.1235 50.2966 56.8535 50.6642C55.7142 50.992 54.7868 51.3984 54.0166 51.9031C53.7901 52.0521 53.5001 52.0481 53.2776 51.8951C53.1917 51.8365 53.1214 51.76 53.0735 51.6716V51.6746Z" fill="#154973"/>
|
|
6021
6032
|
<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"/>
|
|
6022
6033
|
<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"/>
|
|
6023
|
-
</svg>`;var
|
|
6034
|
+
</svg>`;var fo=Object.defineProperty,De=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&fo(e,t,s),s};const At=class At extends p{constructor(){super(...arguments),this.trustbarVisible=!1,this.searchDropdownVisible=!1,this.languageVisible=!1,this.isSearchFocused=!1,this.hideTranslate=!1,this.hideSearch=!1,this.languages=[["English",""],["Español","es"],["中文","zh"],["繁體中文","zh-traditional"],["Русский","ru"],["יידיש","yi"],["বাংলা","bn"],["한국어","ko"],["Kreyòl Ayisyen","ht"],["Italiano","it"],["العربية","ar"],["Polski","pl"],["Français","fr"],["اردو","ur"]]}_getNysLogo(){return new DOMParser().parseFromString(vo,"image/svg+xml").documentElement}_toggleTrustbar(e){if(this.trustbarVisible=!this.trustbarVisible,this.trustbarVisible&&(this.languageVisible=!1,this.searchDropdownVisible=!1),e==="no focus")return;if(e==="nys-unavheader__know--inline"||!e){const o=this.trustbarVisible?"nys-unavheader__closetrustbar":"nys-unavheader__know--inline";this.updateComplete.then(()=>{this.shadowRoot?.getElementById(o)?.focus()})}}_toggleLanguageList(){this.languageVisible=!this.languageVisible,this.languageVisible&&(this.trustbarVisible=!1,this.searchDropdownVisible=!1)}_toggleSearchDropdown(){this.searchDropdownVisible=!this.searchDropdownVisible,this.searchDropdownVisible&&(this.trustbarVisible=!1,this.languageVisible=!1)}_handleSearchFocus(){this.isSearchFocused=!0,this.trustbarVisible=!1,this.languageVisible=!1}_handleSearchBlur(){this.isSearchFocused=!1}_handleSearchKeyup(e){if(e.key==="Escape"&&(this._handleSearchBlur(),e.target.blur()),e.key==="Enter"){const t=e.target.value?.trim();t!==""&&this._handleSearch(t)}}_handleSearchButton(e){const o=(this.shadowRoot?.getElementById(e)).value?.trim();o!==""&&this._handleSearch(o)}_handleSearch(e){window.location.href=`https://search.its.ny.gov/search/search.html?btnG=Search&client=default_frontend&output=xml_no_dtd&proxystylesheet=default_frontend&ulang=en&sort=date:D:L:d1&entqr=3&entqrm=0&wc=200&wc_mc=1&oe=UTF-8&ie=UTF-8&ud=1&site=default_collection&q=${e}+inurl:${window.location.hostname}&site=default_collection`}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){return l`
|
|
6024
6035
|
<header class="nys-unavheader">
|
|
6025
6036
|
<div
|
|
6026
6037
|
class="nys-unavheader__trustbar wrapper"
|
|
6027
|
-
@click="${this._toggleTrustbar}"
|
|
6038
|
+
@click="${e=>{e.target.closest("nys-button")||this._toggleTrustbar("no focus")}}"
|
|
6028
6039
|
>
|
|
6029
6040
|
<div class="content">
|
|
6030
6041
|
<label id="nys-unavheader__official"
|
|
@@ -6037,7 +6048,7 @@ ${this.value}</textarea
|
|
|
6037
6048
|
variant="ghost"
|
|
6038
6049
|
size="sm"
|
|
6039
6050
|
suffixIcon="slotted"
|
|
6040
|
-
@
|
|
6051
|
+
@nys-click="${e=>{e.preventDefault(),e.stopPropagation(),this._toggleTrustbar("nys-unavheader__know")}}"
|
|
6041
6052
|
>
|
|
6042
6053
|
<nys-icon
|
|
6043
6054
|
slot="suffix-icon"
|
|
@@ -6060,7 +6071,7 @@ ${this.value}</textarea
|
|
|
6060
6071
|
icon="close"
|
|
6061
6072
|
size="sm"
|
|
6062
6073
|
ariaLabel="Close this notice"
|
|
6063
|
-
|
|
6074
|
+
@nys-click="${()=>this._toggleTrustbar("nys-unavheader__know--inline")}"
|
|
6064
6075
|
></nys-button>
|
|
6065
6076
|
<div class="nys-unavheader__messagewrapper">
|
|
6066
6077
|
<div
|
|
@@ -6110,7 +6121,7 @@ ${this.value}</textarea
|
|
|
6110
6121
|
variant="ghost"
|
|
6111
6122
|
size="sm"
|
|
6112
6123
|
suffixIcon="slotted"
|
|
6113
|
-
|
|
6124
|
+
@nys-click="${()=>this._toggleTrustbar("nys-unavheader__know--inline")}"
|
|
6114
6125
|
>
|
|
6115
6126
|
<nys-icon
|
|
6116
6127
|
slot="suffix-icon"
|
|
@@ -6120,15 +6131,15 @@ ${this.value}</textarea
|
|
|
6120
6131
|
</nys-button>
|
|
6121
6132
|
</div>
|
|
6122
6133
|
<div class="nys-unavheader__spacer"></div>
|
|
6123
|
-
${this.hideTranslate?null:
|
|
6134
|
+
${this.hideTranslate?null:l`<div class="nys-unavheader__translatewrapper">
|
|
6124
6135
|
<nys-button
|
|
6125
6136
|
variant="ghost"
|
|
6126
6137
|
circle
|
|
6127
6138
|
icon="slotted"
|
|
6128
6139
|
ariaLabel=${this.languageVisible?"Translate expanded":"Translate collapsed"}
|
|
6129
|
-
id="nys-unavheader__translate"
|
|
6140
|
+
id="nys-unavheader__translate--mobile"
|
|
6130
6141
|
class="nys-unavheader__iconbutton"
|
|
6131
|
-
|
|
6142
|
+
@nys-click=${this._toggleLanguageList}
|
|
6132
6143
|
>
|
|
6133
6144
|
<nys-icon
|
|
6134
6145
|
slot="circle-icon"
|
|
@@ -6137,22 +6148,22 @@ ${this.value}</textarea
|
|
|
6137
6148
|
></nys-icon>
|
|
6138
6149
|
</nys-button>
|
|
6139
6150
|
|
|
6140
|
-
${this.isSearchFocused?null:
|
|
6151
|
+
${this.isSearchFocused?null:l`
|
|
6141
6152
|
<nys-button
|
|
6142
6153
|
variant="ghost"
|
|
6143
6154
|
label="Translate"
|
|
6144
6155
|
size="sm"
|
|
6145
|
-
prefixIcon="
|
|
6156
|
+
prefixIcon="language"
|
|
6146
6157
|
suffixIcon=${this.languageVisible?"chevron_up":"chevron_down"}
|
|
6147
6158
|
ariaLabel=${this.languageVisible?"Translate expanded":"Translate collapsed"}
|
|
6148
|
-
id="nys-unavheader__translate"
|
|
6149
|
-
|
|
6159
|
+
id="nys-unavheader__translate--desktop"
|
|
6160
|
+
@nys-click="${this._toggleLanguageList}"
|
|
6150
6161
|
></nys-button>
|
|
6151
6162
|
`}
|
|
6152
6163
|
<div
|
|
6153
6164
|
class="nys-unavheader__languagelist ${this.languageVisible?"show":"hide"}"
|
|
6154
6165
|
>
|
|
6155
|
-
${this.languages.map(([e,t])=>
|
|
6166
|
+
${this.languages.map(([e,t])=>l`<a
|
|
6156
6167
|
class="nys-unavheader__languagelink"
|
|
6157
6168
|
target="_self"
|
|
6158
6169
|
href="https://${t?t+".":""}${window.location.hostname}"
|
|
@@ -6160,7 +6171,7 @@ ${this.value}</textarea
|
|
|
6160
6171
|
>`)}
|
|
6161
6172
|
</div>
|
|
6162
6173
|
</div>`}
|
|
6163
|
-
${this.hideSearch?null:
|
|
6174
|
+
${this.hideSearch?null:l`
|
|
6164
6175
|
<nys-button
|
|
6165
6176
|
variant="ghost"
|
|
6166
6177
|
circle
|
|
@@ -6168,7 +6179,7 @@ ${this.value}</textarea
|
|
|
6168
6179
|
ariaLabel=${this.searchDropdownVisible?"Search expanded":"Search collapsed"}
|
|
6169
6180
|
id="nys-unavheader__searchbutton"
|
|
6170
6181
|
class="nys-unavheader__iconbutton"
|
|
6171
|
-
|
|
6182
|
+
@nys-click=${this._toggleSearchDropdown}
|
|
6172
6183
|
>
|
|
6173
6184
|
<nys-icon
|
|
6174
6185
|
slot="circle-icon"
|
|
@@ -6186,11 +6197,12 @@ ${this.value}</textarea
|
|
|
6186
6197
|
@keyup="${this._handleSearchKeyup}"
|
|
6187
6198
|
>
|
|
6188
6199
|
<nys-button
|
|
6200
|
+
id="nys-unavheader__searchbar--button"
|
|
6189
6201
|
slot="endButton"
|
|
6190
6202
|
type="submit"
|
|
6191
6203
|
prefixIcon="search"
|
|
6192
6204
|
ariaLabel="Search Button"
|
|
6193
|
-
|
|
6205
|
+
@nys-click=${()=>{this._handleSearchButton("nys-unavheader__searchbar")}}
|
|
6194
6206
|
></nys-button>
|
|
6195
6207
|
</nys-textinput>
|
|
6196
6208
|
`}
|
|
@@ -6210,17 +6222,18 @@ ${this.value}</textarea
|
|
|
6210
6222
|
@keyup="${this._handleSearchKeyup}"
|
|
6211
6223
|
>
|
|
6212
6224
|
<nys-button
|
|
6225
|
+
id="nys-unavheader__searchbardropdown--button"
|
|
6213
6226
|
slot="endButton"
|
|
6214
6227
|
type="submit"
|
|
6215
6228
|
prefixIcon="search"
|
|
6216
6229
|
ariaLabel="Search Button"
|
|
6217
|
-
|
|
6230
|
+
@nys-click=${()=>{this._handleSearchButton("nys-unavheader__searchbardropdown")}}
|
|
6218
6231
|
></nys-button
|
|
6219
6232
|
></nys-textinput>
|
|
6220
6233
|
</div>
|
|
6221
6234
|
</div>
|
|
6222
6235
|
</header>
|
|
6223
|
-
`}};
|
|
6236
|
+
`}};At.styles=po;let Y=At;De([i({type:Boolean})],Y.prototype,"trustbarVisible"),De([i({type:Boolean})],Y.prototype,"searchDropdownVisible"),De([i({type:Boolean})],Y.prototype,"languageVisible"),De([i({type:Boolean})],Y.prototype,"isSearchFocused"),De([i({type:Boolean})],Y.prototype,"hideTranslate"),De([i({type:Boolean})],Y.prototype,"hideSearch"),De([i({type:Array,reflect:!0})],Y.prototype,"languages"),customElements.get("nys-unavheader")||customElements.define("nys-unavheader",Y);const go=g`
|
|
6224
6237
|
:host {
|
|
6225
6238
|
/* Global Header Styles */
|
|
6226
6239
|
--_nys-globalheader-color: var(
|
|
@@ -6367,7 +6380,7 @@ ${this.value}</textarea
|
|
|
6367
6380
|
font-weight: var(--_nys-globalheader-font-weight);
|
|
6368
6381
|
line-height: var(--_nys-globalheader-line-height);
|
|
6369
6382
|
letter-spacing: var(--_nys-globalheader-letter-spacing);
|
|
6370
|
-
text-wrap: wrap;
|
|
6383
|
+
overflow-wrap: break-word; /* note: we use this bc text-wrap: wrap; is not a standard CSS property (yet). */
|
|
6371
6384
|
}
|
|
6372
6385
|
|
|
6373
6386
|
.nys-globalheader__agencyName {
|
|
@@ -6528,10 +6541,10 @@ ${this.value}</textarea
|
|
|
6528
6541
|
var(--nys-space-800, 64px) 0;
|
|
6529
6542
|
}
|
|
6530
6543
|
}
|
|
6531
|
-
`;var
|
|
6544
|
+
`;var bo=Object.defineProperty,Ke=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&bo(e,t,s),s};const Dt=class Dt extends p{constructor(){super(...arguments),this.appName="",this.agencyName="",this.homepageLink="",this.slotHasContent=!0,this.isMobileMenuOpen=!1}firstUpdated(){this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this._handleSlotChange()),this._handleSlotChange(),this._listenLinkClicks()}async _handleSlotChange(){const e=this.shadowRoot?.querySelector("slot");if(!e)return;const t=e?.assignedNodes({flatten:!0}).filter(r=>r.nodeType===Node.ELEMENT_NODE);await Promise.resolve(),this.slotHasContent=t.length>0;const o=this.shadowRoot?.querySelector(".nys-globalheader__content"),s=this.shadowRoot?.querySelector(".nys-globalheader__content-mobile");if(o&&s){o.innerHTML="",s.innerHTML="";const r=this._normalizePath(window.location.pathname+window.location.hash);t.forEach(n=>{if(n.nodeType===Node.ELEMENT_NODE){const c=n.cloneNode(!0),d=n.cloneNode(!0);["script","iframe","object","embed, img"].forEach(v=>{c.querySelectorAll(v).forEach(w=>w.remove())});const f=v=>{const w=Array.from(v.querySelectorAll("a"));let q={li:null,length:0};w.forEach(ue=>{const y1=ue.getAttribute("href"),Xe=this._normalizePath(y1);Xe&&(Xe==="/"&&r==="/"?q={li:ue.closest("li"),length:1}:r?.startsWith(Xe)&&Xe.length>q.length&&(q={li:ue.closest("li"),length:Xe.length}),w.forEach(wo=>wo.closest("li")?.classList.remove("active")),q.li?.classList.add("active"))})};f(c),f(d),o.appendChild(c),s.appendChild(d),n.remove()}})}}_normalizePath(e){if(e)return e.startsWith("/")||(e="/"+e),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.toLowerCase()}_toggleMobileMenu(){this.isMobileMenuOpen=!this.isMobileMenuOpen}_listenLinkClicks(){this.shadowRoot?.querySelectorAll(".nys-globalheader__content, .nys-globalheader__content-mobile")?.forEach(t=>{t?.addEventListener("click",o=>{const r=o.target.closest("a");if(!r)return;t.querySelectorAll("li.active").forEach(c=>c.classList.remove("active"));const n=r.closest("li");n&&n.classList.add("active")})})}render(){return l`
|
|
6532
6545
|
<header class="nys-globalheader">
|
|
6533
6546
|
<div class="nys-globalheader__main-container">
|
|
6534
|
-
${this.slotHasContent?
|
|
6547
|
+
${this.slotHasContent?l` <div class="nys-globalheader__button-container">
|
|
6535
6548
|
<button
|
|
6536
6549
|
class="nys-globalheader__mobile-menu-button"
|
|
6537
6550
|
@click="${this._toggleMobileMenu}"
|
|
@@ -6546,37 +6559,37 @@ ${this.value}</textarea
|
|
|
6546
6559
|
>
|
|
6547
6560
|
</button>
|
|
6548
6561
|
</div>`:""}
|
|
6549
|
-
${
|
|
6562
|
+
${this.homepageLink?.trim()?l`<a
|
|
6550
6563
|
class="nys-globalheader__name-container-link"
|
|
6551
|
-
href=${
|
|
6564
|
+
href=${this.homepageLink?.trim()}
|
|
6552
6565
|
>
|
|
6553
6566
|
<div class="nys-globalheader__name-container">
|
|
6554
|
-
${
|
|
6567
|
+
${this.appName?.trim().length>0?l`<div
|
|
6555
6568
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
6556
6569
|
>
|
|
6557
6570
|
${this.appName}
|
|
6558
6571
|
</div> `:""}
|
|
6559
|
-
${
|
|
6560
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${
|
|
6572
|
+
${this.agencyName?.trim().length>0?l`<div
|
|
6573
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${this.appName?.trim().length>0?"":"main"}"
|
|
6561
6574
|
>
|
|
6562
6575
|
${this.agencyName}
|
|
6563
6576
|
</div> `:""}
|
|
6564
6577
|
</div>
|
|
6565
|
-
</a>`:
|
|
6578
|
+
</a>`:l`
|
|
6566
6579
|
<div class="nys-globalheader__name-container">
|
|
6567
|
-
${
|
|
6580
|
+
${this.appName?.trim().length>0?l`<div
|
|
6568
6581
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
6569
6582
|
>
|
|
6570
6583
|
${this.appName}
|
|
6571
6584
|
</div> `:""}
|
|
6572
|
-
${
|
|
6573
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${
|
|
6585
|
+
${this.agencyName?.trim().length>0?l`<div
|
|
6586
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${this.appName?.trim().length>0?"":"main"}"
|
|
6574
6587
|
>
|
|
6575
6588
|
${this.agencyName}
|
|
6576
6589
|
</div> `:""}
|
|
6577
6590
|
</div>
|
|
6578
6591
|
`}
|
|
6579
|
-
${this.slotHasContent?
|
|
6592
|
+
${this.slotHasContent?l`<div class="nys-globalheader__content">
|
|
6580
6593
|
<slot
|
|
6581
6594
|
style="display: hidden"
|
|
6582
6595
|
@slotchange="${this._handleSlotChange}"
|
|
@@ -6587,7 +6600,7 @@ ${this.value}</textarea
|
|
|
6587
6600
|
<div
|
|
6588
6601
|
class="nys-globalheader__content-mobile ${this.isMobileMenuOpen?"":"close"}"
|
|
6589
6602
|
></div>
|
|
6590
|
-
`}};
|
|
6603
|
+
`}};Dt.styles=go;let ae=Dt;Ke([i({type:String})],ae.prototype,"appName"),Ke([i({type:String})],ae.prototype,"agencyName"),Ke([i({type:String})],ae.prototype,"homepageLink"),Ke([M()],ae.prototype,"slotHasContent"),Ke([M()],ae.prototype,"isMobileMenuOpen"),customElements.get("nys-globalheader")||customElements.define("nys-globalheader",ae);const _o=g`
|
|
6591
6604
|
:host {
|
|
6592
6605
|
/* Global Footer Styles */
|
|
6593
6606
|
--_nys-globalfooter-color: var(
|
|
@@ -6740,34 +6753,36 @@ ${this.value}</textarea
|
|
|
6740
6753
|
}
|
|
6741
6754
|
|
|
6742
6755
|
/** Column Menus **/
|
|
6743
|
-
.nys-globalfooter__content ul li:has(span
|
|
6744
|
-
flex: 1
|
|
6756
|
+
.nys-globalfooter__content ul li:has(span ~ ul) {
|
|
6757
|
+
flex: 1;
|
|
6745
6758
|
display: flex;
|
|
6746
6759
|
flex-direction: column;
|
|
6747
|
-
gap: var(--nys-space-300, 24px);
|
|
6748
6760
|
}
|
|
6749
6761
|
|
|
6750
|
-
.nys-globalfooter__content ul
|
|
6751
|
-
|
|
6752
|
-
display: block;
|
|
6753
|
-
height: 1px;
|
|
6754
|
-
width: 100%;
|
|
6755
|
-
background: var(--_nys-globalfooter-background--divider);
|
|
6756
|
-
margin-top: var(--_nys-globalfooter-margin--divider);
|
|
6762
|
+
.nys-globalfooter__content ul:has(li > span ~ ul) {
|
|
6763
|
+
--_nys-globalfooter-column-gap: var(--nys-space-500, 40px);
|
|
6757
6764
|
}
|
|
6758
6765
|
|
|
6759
|
-
.nys-globalfooter__content ul li > span
|
|
6766
|
+
.nys-globalfooter__content ul li > span ~ ul {
|
|
6760
6767
|
display: flex;
|
|
6761
6768
|
flex-direction: column;
|
|
6762
6769
|
gap: var(--nys-space-200, 16px);
|
|
6763
6770
|
}
|
|
6764
6771
|
|
|
6772
|
+
.divider {
|
|
6773
|
+
margin-top: var(--_nys-globalfooter-margin--divider);
|
|
6774
|
+
margin-bottom: var(--nys-space-300, 24px);
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6765
6777
|
/* Breakpoints using NYSDS Guidelines (Menu Links) */
|
|
6766
6778
|
@media (min-width: 768px) {
|
|
6767
6779
|
/* Tablet (MD - Above 768px) */
|
|
6768
6780
|
.nys-globalfooter__content ul {
|
|
6769
6781
|
flex-direction: row;
|
|
6770
6782
|
}
|
|
6783
|
+
.nys-globalfooter__content ul li:has(span ~ ul) {
|
|
6784
|
+
flex: 1 0 205px;
|
|
6785
|
+
}
|
|
6771
6786
|
:host {
|
|
6772
6787
|
--_nys-globalfooter-padding--gutter: var(--nys-gutter-lg, 32px);
|
|
6773
6788
|
--_nys-globalfooter-row-gap: var(--nys-space-600, 48px);
|
|
@@ -6780,13 +6795,13 @@ ${this.value}</textarea
|
|
|
6780
6795
|
--_nys-globalfooter-padding--gutter: var(--nys-gutter-xl, 64px);
|
|
6781
6796
|
}
|
|
6782
6797
|
}
|
|
6783
|
-
`;var
|
|
6798
|
+
`;var Co=Object.defineProperty,ft=(a,e,t,o)=>{for(var s=void 0,r=a.length-1,n;r>=0;r--)(n=a[r])&&(s=n(e,t,s)||s);return s&&Co(e,t,s),s};const Mt=class Mt extends p{constructor(){super(...arguments),this.agencyName="",this.homepageLink="",this.slotHasContent=!0}firstUpdated(){this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this._handleSlotChange()),this._handleSlotChange()}async _handleSlotChange(){const e=this.shadowRoot?.querySelector("slot");if(!e)return;const t=e?.assignedNodes({flatten:!0}).filter(r=>r.nodeType===Node.ELEMENT_NODE);await Promise.resolve(),this.slotHasContent=t.length>0;const o=this.shadowRoot?.querySelector(".nys-globalfooter__content"),s=t?.some(r=>r.tagName==="H4");o&&(o.classList.toggle("columns",s),o.classList.toggle("small",!s),o.innerHTML="",t.forEach(n=>{if(n.nodeType===Node.ELEMENT_NODE){const c=n.cloneNode(!0);["script","iframe","object","embed","img"].forEach(h=>{c.querySelectorAll(h).forEach(f=>f.remove())}),o.appendChild(c),n.remove()}}),o.querySelectorAll("span").forEach(n=>{const c=document.createElement("nys-divider");c.classList.add("divider"),n.insertAdjacentElement("afterend",c)}))}render(){return l`
|
|
6784
6799
|
<footer class="nys-globalfooter">
|
|
6785
6800
|
<div class="nys-globalfooter__main-container">
|
|
6786
|
-
${
|
|
6787
|
-
<
|
|
6788
|
-
</a>`:
|
|
6789
|
-
${this.slotHasContent?
|
|
6801
|
+
${this.homepageLink?.trim()?l`<a href=${this.homepageLink?.trim()}>
|
|
6802
|
+
<h2 class="nys-globalfooter__name">${this.agencyName}</h2>
|
|
6803
|
+
</a>`:l`<h2 class="nys-globalfooter__name">${this.agencyName}</h2>`}
|
|
6804
|
+
${this.slotHasContent?l`<div class="nys-globalfooter__content">
|
|
6790
6805
|
<slot
|
|
6791
6806
|
style="display: hidden"
|
|
6792
6807
|
@slotchange="${this._handleSlotChange}"
|
|
@@ -6794,7 +6809,7 @@ ${this.value}</textarea
|
|
|
6794
6809
|
</div>`:""}
|
|
6795
6810
|
</div>
|
|
6796
6811
|
</footer>
|
|
6797
|
-
`}};
|
|
6812
|
+
`}};Mt.styles=_o;let Me=Mt;ft([i({type:String})],Me.prototype,"agencyName"),ft([i({type:String})],Me.prototype,"homepageLink"),ft([M()],Me.prototype,"slotHasContent"),customElements.get("nys-globalfooter")||customElements.define("nys-globalfooter",Me);const mo=g`
|
|
6798
6813
|
:host {
|
|
6799
6814
|
/* Global Footer Styles */
|
|
6800
6815
|
--_nys-unavfooter-color: var(
|
|
@@ -6943,7 +6958,7 @@ ${this.value}</textarea
|
|
|
6943
6958
|
--_nys-unavfooter-padding--gutter: var(--nys-gutter-xl, 64px);
|
|
6944
6959
|
}
|
|
6945
6960
|
}
|
|
6946
|
-
`,
|
|
6961
|
+
`,xo=`<svg xmlns="http://www.w3.org/2000/svg" width="91" height="55" viewBox="0 0 91 55" fill="none">
|
|
6947
6962
|
<path d="M55.1158 7.50499L58.2905 12.6494V7.5189C58.2905 7.5189 58.6487 7.26356 59.5098 7.26356C60.3708 7.26356 60.7378 7.5189 60.7378 7.5189V16.4327C60.7378 16.4327 60.3942 16.689 59.5215 16.689C58.6487 16.689 58.3295 16.4605 58.3295 16.4605L55.1421 11.3171V16.4337C55.1421 16.4337 54.7848 16.69 53.9111 16.69C53.0374 16.69 52.7065 16.4337 52.7065 16.4337V7.51989C52.7065 7.51989 53.0384 7.26456 53.9248 7.26456C54.8112 7.26456 55.1148 7.50697 55.1148 7.50697L55.1158 7.50499Z" fill="white"/>
|
|
6948
6963
|
<path d="M67.2209 12.5948H64.9063V14.8709H68.2538C68.2538 14.8709 68.5047 15.1531 68.5047 15.772C68.5047 16.391 68.2538 16.688 68.2538 16.688H62.4589V7.26257H67.9892C67.9892 7.26257 68.2538 7.54572 68.2538 8.17859C68.2538 8.81146 67.9892 9.09362 67.9892 9.09362H64.9063V10.7637H67.2209C67.2209 10.7637 67.4728 11.0598 67.4728 11.6787C67.4728 12.2977 67.2209 12.5948 67.2209 12.5948Z" fill="white"/>
|
|
6949
6964
|
<path d="M71.4802 16.4327L68.9791 7.5189C68.9791 7.5189 69.3491 7.26356 70.2101 7.26356C71.0711 7.26356 71.4275 7.5189 71.4275 7.5189L72.6839 12.0434C72.7766 12.3802 72.8166 12.6365 72.8557 12.7845C72.8557 12.7428 72.9221 12.3663 73.0011 12.0573L74.0984 7.5189C74.0984 7.5189 74.5211 7.26356 75.1176 7.26356C75.7141 7.26356 76.084 7.5189 76.084 7.5189L77.3004 12.7845C77.3004 12.6623 77.3795 12.3255 77.4586 12.0573L78.756 7.5189C78.7686 7.5189 79.1132 7.26356 79.9596 7.26356C80.806 7.26356 81.1897 7.5189 81.1897 7.5189L78.6496 16.4327C78.6496 16.4327 78.2922 16.6751 77.4859 16.689C76.5468 16.689 76.2158 16.4327 76.2158 16.4327L75.223 12.2987C75.1449 11.9887 75.0902 11.6529 75.0785 11.5844L74.9184 12.2987L73.9266 16.4327C73.9266 16.4327 73.583 16.689 72.7092 16.689C71.8355 16.689 71.4802 16.4327 71.4802 16.4327Z" fill="white"/>
|
|
@@ -6959,7 +6974,7 @@ ${this.value}</textarea
|
|
|
6959
6974
|
<path d="M51.7107 54.9999C51.577 54.9999 51.4335 54.974 51.2939 54.8965C51.085 54.7803 50.9395 54.5876 50.8858 54.3551C50.8233 54.0868 50.8936 53.7868 51.082 53.5116L51.1426 53.4202C51.2041 53.3268 51.2685 53.2354 51.3407 53.1519C51.4218 53.0595 51.5047 52.995 51.5741 52.9493C51.5243 52.6691 51.5418 52.4267 51.5682 52.2061C51.5877 52.0233 51.6346 51.8683 51.6726 51.7451C51.6892 51.6925 51.7058 51.6388 51.7185 51.5812C51.8201 51.145 51.8855 50.7397 51.9206 50.3453C51.9528 49.9916 51.947 49.9846 51.8864 49.9061C51.7 49.6707 51.3847 49.5018 51.0498 49.3229C50.8878 49.2365 50.7286 49.1491 50.5754 49.0557C49.607 48.4536 48.6376 47.8505 47.6701 47.2465L47.3294 47.0339C47.2513 46.9862 47.1147 46.9156 46.9516 46.8282C45.8817 46.2659 45.172 45.8526 45.0539 45.2595C45.0363 45.173 44.9465 44.9644 44.884 44.864C44.8411 44.8611 44.7307 44.8521 44.6546 44.8471C44.3032 44.8183 43.7711 44.7726 43.3484 44.3196C43.2635 44.2272 43.1786 44.1408 43.1005 44.0583C42.5098 43.4443 42.0003 42.9148 41.9329 41.5993C41.9241 41.4275 41.9251 41.2506 41.928 41.0728C41.9339 40.5283 41.927 40.1836 41.7103 39.962C41.6078 39.8567 41.435 39.7862 41.2349 39.7037C40.9889 39.6034 40.7097 39.4881 40.45 39.2686C40.37 39.2 40.2792 39.1007 40.1776 38.9854C40.0712 38.8602 39.9082 38.6724 39.7969 38.6337C38.974 38.3436 37.986 38.3178 36.96 38.3178L3.07245 38.2909C2.85964 38.2909 2.66927 38.3138 2.48477 38.3347C2.07378 38.3823 1.60812 38.437 1.2313 38.0962C0.866192 37.7664 0.815429 37.2607 0.814452 36.8076L0.8125 34.3993C0.8125 34.2722 0.847644 34.147 0.913051 34.0387C1.22544 33.529 1.83265 33.2558 2.3686 33.0144C2.56872 32.924 2.77666 32.8316 2.88795 32.7571C3.17593 32.5623 3.43561 32.302 3.7109 32.0248C3.91688 31.8182 4.13068 31.6046 4.36887 31.4059C4.69786 31.1317 5.07078 30.931 5.43296 30.7372C5.74535 30.5703 6.03821 30.4124 6.24127 30.2395C6.38575 30.1173 6.49216 29.9146 6.61906 29.6792C6.75476 29.4238 6.90998 29.1337 7.15208 28.8804C7.41273 28.6081 7.7427 28.4194 8.03263 28.2535C8.69744 27.871 8.68182 27.8322 8.57736 27.5769C8.52855 27.4577 8.48072 27.3553 8.43972 27.2639C8.24447 26.8357 8.07754 26.4681 8.19078 25.7051C8.2025 25.6306 8.21616 25.5521 8.22983 25.4706C8.25619 25.3325 8.30305 25.0772 8.27571 25.0037C8.27571 25.0037 8.26204 24.9927 8.23471 24.9778C8.21128 24.9659 8.12928 24.9669 8.06875 24.9679C7.87448 24.9659 7.51914 24.9768 7.2497 24.6689C6.98124 24.3629 6.99686 23.9555 7.03982 23.6356C7.08179 23.3127 7.06032 23.1051 7.03982 22.9223C6.95684 22.1453 7.21358 21.7817 8.10097 21.424C10.7524 20.351 12.901 19.9884 14.8613 20.2805C14.9775 20.2974 15.1356 20.2656 15.3182 20.2269C15.5944 20.1702 15.9351 20.1017 16.312 20.1752L18.3952 20.5766C19.2475 20.7415 19.6653 20.9054 20.3047 21.4995C20.6327 21.8046 20.7655 21.7718 21.3327 21.5661C21.6168 21.4638 21.9399 21.3485 22.3323 21.2949C22.9727 21.2084 23.5731 21.2661 24.153 21.3227C24.4136 21.3475 24.6762 21.3734 24.9408 21.3843C25.2356 21.3952 25.6085 21.2561 25.9717 21.121C26.1318 21.0614 26.2889 21.0028 26.4412 20.9541C26.78 20.8468 27.0973 20.7991 27.4038 20.7514C27.5551 20.7266 27.7064 20.7037 27.8607 20.6729C27.8714 20.6531 27.8821 20.6332 27.8939 20.6113C27.9417 20.5249 27.9944 20.4345 28.0598 20.3411C28.3419 19.9497 28.7471 19.7003 29.0722 19.4966L29.2078 19.4122C29.5564 19.1916 29.8629 18.9879 30.105 18.7386C30.5423 18.2796 31.1232 18.3114 31.5108 18.3312C31.6455 18.3392 31.8495 18.3481 31.91 18.3223C32.1678 18.207 31.9413 17.3993 31.8065 16.9165C31.7119 16.5777 31.6299 16.2846 31.6133 16.0183C31.5664 15.2642 31.9764 14.7317 32.3064 14.3045C32.5651 13.9687 32.7213 13.7481 32.7164 13.5355C32.7164 13.4948 32.7027 13.4382 32.6851 13.3845C32.4587 13.4948 32.0955 13.6369 31.6796 13.4421C31.0129 13.1302 30.6468 12.0264 30.8508 11.3985C31.0197 10.8779 31.54 10.5421 31.9198 10.2957L32.0565 10.2053C32.3806 9.98471 32.7242 9.79792 33.0542 9.6181C33.5159 9.36873 33.9513 9.13227 34.2949 8.82726C34.4404 8.69711 34.5761 8.56994 34.7089 8.44376C35.0076 8.1626 35.3161 7.8715 35.6792 7.61319C35.7056 7.5188 35.728 7.34096 35.7437 7.22571C35.7729 7.00714 35.8022 6.78062 35.8803 6.5849C36.2513 5.64304 37.1592 4.90884 37.9597 4.25908C38.2252 4.04448 38.4771 3.84081 38.6743 3.65602C38.7992 3.53878 38.9222 3.42055 39.0452 3.30332C39.6388 2.73701 40.2509 2.15084 40.9967 1.68289C41.601 1.30536 42.3898 0.833439 43.1249 0.552274C44.0972 0.1807 44.5579 0.208518 45.4766 0.262168L45.6474 0.27111C47.3607 0.371455 49.1384 0.32476 50.8575 0.281045C51.7205 0.258194 52.5796 0.235343 53.4347 0.230376C53.6651 0.230376 54.0156 0.185667 54.3836 0.138972C55.6078 -0.0140291 56.994 -0.188888 57.7818 0.503592C58.1118 0.792705 58.2924 1.19806 58.3031 1.67594C58.311 2.05248 58.1567 2.33464 58.0435 2.54129C58.0064 2.60686 57.9527 2.7082 57.9458 2.74297C57.9488 2.73205 57.9849 2.78768 58.0103 2.82742C58.1362 3.01718 58.3686 3.37088 58.2748 3.89843C58.2397 4.10111 58.1811 4.3167 58.1216 4.53528C58.0464 4.81147 57.9693 5.09761 57.9624 5.31419C57.9498 5.69073 57.6335 5.99376 57.2703 5.97289C56.9013 5.95998 56.6104 5.64603 56.6231 5.26849C56.6367 4.89195 56.7392 4.50944 56.831 4.17264C56.8788 3.9948 56.9276 3.82094 56.9569 3.65502C56.9481 3.65502 56.9218 3.62323 56.8993 3.58746C56.791 3.42254 56.6065 3.14535 56.6065 2.73701C56.6065 2.36345 56.7607 2.08328 56.873 1.87862C56.9072 1.81702 56.9589 1.72462 56.9657 1.69084C56.9608 1.58354 56.9267 1.55274 56.9072 1.53685C56.5694 1.23979 55.2544 1.40372 54.5496 1.49313C54.1386 1.5438 53.752 1.59348 53.4435 1.59547C52.5971 1.60043 51.7439 1.62229 50.8907 1.64315C49.1442 1.68886 47.3382 1.73654 45.5722 1.63421L45.3985 1.62328C44.5345 1.57162 44.3022 1.55871 43.5964 1.82894C42.9618 2.07235 42.2101 2.5244 41.7006 2.84431C41.0699 3.23973 40.533 3.75338 39.9648 4.29683C39.8379 4.41804 39.712 4.53925 39.5831 4.65947C39.3479 4.87804 39.0794 5.09661 38.7953 5.32611C38.1237 5.87056 37.3642 6.48555 37.1231 7.09457C37.1065 7.14425 37.085 7.30221 37.0713 7.40753C37.0147 7.84666 36.9424 8.3931 36.5041 8.69016C36.1927 8.90277 35.9145 9.16704 35.6187 9.44523C35.4771 9.57935 35.3317 9.71546 35.1774 9.85257C34.7186 10.2629 34.1924 10.548 33.6838 10.8222C33.3675 10.9931 33.0698 11.1541 32.8033 11.3369C32.7554 11.3707 32.6978 11.4064 32.6373 11.4462C32.5114 11.5276 32.2332 11.7065 32.1346 11.8217C32.1424 11.8992 32.1726 12.0115 32.2117 12.1009C32.3757 12.0214 32.6041 11.924 32.8804 11.9459C33.6633 12.0135 34.0401 12.8937 34.0558 13.4988C34.0743 14.2191 33.677 14.7337 33.3587 15.145C33.0971 15.4868 32.9351 15.7074 32.9487 15.9319C32.9565 16.0511 33.0288 16.3114 33.0932 16.5419C33.3314 17.3933 33.7746 18.978 32.4479 19.5701C32.0965 19.7281 31.7314 19.7082 31.4375 19.6933C31.3126 19.6864 31.1046 19.6764 31.047 19.7023C30.7171 20.051 30.3227 20.3113 29.9166 20.5706L29.7692 20.663C29.5212 20.816 29.2654 20.976 29.1405 21.1488C29.1083 21.1935 29.0819 21.2412 29.0585 21.2859C28.9345 21.5085 28.7256 21.884 28.174 21.9993C27.9827 22.04 27.7943 22.0708 27.6059 22.0996C27.3364 22.1414 27.0807 22.1811 26.8386 22.2566C26.7087 22.2993 26.5711 22.35 26.4334 22.4017C25.9697 22.5745 25.4435 22.7732 24.8871 22.7474C24.5981 22.7355 24.3131 22.7087 24.027 22.6808C23.4989 22.6282 22.9981 22.5805 22.511 22.6481C22.2572 22.6828 22.0258 22.7653 21.7817 22.8537C21.1716 23.0733 20.3369 23.3733 19.4046 22.508C18.9927 22.1265 18.8267 22.049 18.1473 21.9178L16.065 21.5164C15.942 21.4936 15.775 21.5264 15.5818 21.5651C15.3289 21.6168 15.0136 21.6784 14.6719 21.6297C12.9508 21.3724 11.0218 21.7112 8.59689 22.6928C8.49829 22.7325 8.42703 22.7643 8.37431 22.7891C8.39579 22.9779 8.42312 23.2491 8.39091 23.6217C8.53343 23.6416 8.69353 23.6843 8.86047 23.7737C9.81228 24.2834 9.63461 25.256 9.5487 25.724C9.53601 25.7876 9.52528 25.8511 9.51551 25.9127C9.4628 26.2694 9.49501 26.3429 9.65511 26.6917C9.70392 26.798 9.75664 26.9162 9.81326 27.0543C10.3941 28.4681 9.28415 29.1039 8.68865 29.4447C8.46705 29.5719 8.23764 29.701 8.11268 29.8331C7.99944 29.9524 7.89987 30.1372 7.79541 30.3329C7.62945 30.6448 7.44104 30.9975 7.10522 31.2847C6.79088 31.5529 6.41894 31.7536 6.05871 31.9454C5.74144 32.1153 5.44077 32.2762 5.21623 32.464C5.02782 32.6219 4.84527 32.8048 4.65295 32.9985C4.34252 33.3085 4.02524 33.6294 3.62499 33.8976C3.41901 34.0347 3.17203 34.147 2.9104 34.2652C2.69661 34.3606 2.33443 34.5225 2.14992 34.6626L2.15383 36.8096C2.15383 36.8881 2.15578 36.9527 2.15871 37.0023C2.21533 36.9974 2.27586 36.9904 2.32662 36.9835C2.5287 36.9606 2.77959 36.9308 3.06952 36.9308L36.9581 36.9566C38.0573 36.9566 39.2141 36.9884 40.2304 37.3471C40.6755 37.5021 40.9801 37.8538 41.1812 38.0853C41.2281 38.1399 41.2681 38.1896 41.3052 38.2234C41.4018 38.3048 41.5551 38.3674 41.7328 38.441C42.0129 38.5562 42.3615 38.7003 42.6572 39.0043C43.2811 39.6411 43.2713 40.4469 43.2645 41.0927C43.2606 41.2417 43.2606 41.3897 43.2664 41.5328C43.3084 42.3326 43.5261 42.5581 44.0532 43.1055C44.1372 43.1929 44.2251 43.2853 44.3188 43.3847C44.3842 43.4542 44.5287 43.4701 44.761 43.491C45.0412 43.5138 45.3897 43.5417 45.6953 43.7751C46.0291 44.0275 46.2546 44.5888 46.3376 44.8809C46.5455 45.0846 47.2777 45.4711 47.5647 45.6211C47.7639 45.7264 47.9298 45.8158 48.0265 45.8754L48.3672 46.088C49.3346 46.6891 50.3011 47.2922 51.2705 47.8943C51.3993 47.9727 51.533 48.0463 51.6707 48.1188C52.0924 48.3443 52.5698 48.6006 52.9291 49.0567C53.3215 49.5544 53.2942 50.0045 53.259 50.4029C53.3156 50.2936 53.3781 50.1893 53.4513 50.0879C53.5841 49.8982 53.7393 49.7541 53.877 49.626C54.0136 49.4998 54.1073 49.4104 54.1396 49.3388C54.1132 49.2772 54.0527 49.1739 54.0117 49.1034C53.8487 48.8232 53.6271 48.4387 53.7315 47.9857C53.7725 47.8108 53.8789 47.6588 54.0283 47.5634C54.0849 47.5276 54.205 47.4591 54.3631 47.3717C54.5818 47.2495 55.1373 46.9405 55.475 46.71C54.9723 45.5913 55.1392 44.2163 55.2886 42.9843C55.3345 42.6038 55.3784 42.2451 55.3989 41.9222C55.4204 41.5467 55.7337 41.2606 56.1076 41.2834C56.4776 41.3063 56.7588 41.6301 56.7353 42.0057C56.7148 42.3693 56.667 42.7498 56.6182 43.1522C56.4776 44.3166 56.3165 45.637 56.833 46.3911C56.954 46.5669 56.994 46.7895 56.9452 47.0021C56.8417 47.4502 56.3898 47.7879 55.1958 48.4606C55.352 48.7308 55.5395 49.0904 55.4731 49.5167C55.4623 49.5812 55.4487 49.6428 55.4321 49.7015C55.766 49.5793 56.1154 49.464 56.4845 49.3577C57.8775 48.9543 59.3409 48.7745 61.225 48.7745C62.0587 48.7745 62.8006 48.5053 63.5874 48.2211C64.2103 47.9946 64.8546 47.7621 65.576 47.6508C66.1852 47.5555 66.5005 47.7562 66.7728 47.9688C66.8636 48.0403 66.93 48.09 67.0442 48.1357C67.3625 48.2619 67.7325 48.2211 68.1601 48.1754C68.5925 48.1277 69.0836 48.0731 69.5844 48.2042C69.8821 48.2837 70.09 48.5579 70.0861 48.8709C70.0744 50.0571 68.5076 50.5459 67.7549 50.7814L67.0384 51.0099C66.4985 51.1848 65.9567 51.3586 65.41 51.5176C65.1631 51.5881 64.918 51.6587 64.672 51.7223C64.3889 51.7948 64.099 51.9597 63.7944 52.1316C63.481 52.3094 63.1579 52.4922 62.786 52.6174C62.1426 52.83 61.4837 52.9413 60.6471 52.9761C60.4069 52.987 60.1746 53.0943 59.9295 53.2056C59.5674 53.3735 59.1154 53.5801 58.6107 53.4132C58.3949 53.3864 57.5534 53.6775 57.1502 53.8196C56.832 53.9289 56.5577 54.0242 56.3419 54.0759C55.598 54.2528 54.8415 54.3918 54.1103 54.527L53.5968 54.6223C53.1516 54.7058 52.7035 54.7922 52.2613 54.8926L52.2076 54.9085C52.0797 54.9482 51.9021 55.0038 51.7078 55.0038L51.7107 54.9999ZM53.0735 51.6746C53.0569 51.7471 53.0403 51.8196 53.0237 51.8941C53.0032 51.9806 52.9788 52.064 52.9544 52.1455C52.9281 52.2359 52.9066 52.3055 52.8988 52.3651C52.8793 52.5379 52.8773 52.6313 52.8978 52.7247C52.9495 52.9791 52.9388 53.1907 52.8949 53.3645C53.0482 53.3347 53.2024 53.3049 53.3566 53.2751L53.875 53.1808C54.5896 53.0486 55.3296 52.9125 56.0412 52.7436C56.1906 52.7078 56.4483 52.6194 56.7217 52.525C57.7721 52.1604 58.4994 51.9359 59.0295 52.1127C59.0646 52.1058 59.2559 52.0173 59.3828 51.9597C59.7001 51.8137 60.0945 51.6328 60.5924 51.611C61.3021 51.5812 61.8498 51.4908 62.372 51.3169C62.622 51.2345 62.8748 51.0914 63.1442 50.9374C63.5123 50.7298 63.892 50.5142 64.3469 50.3969C64.5793 50.3373 64.8136 50.2707 65.0459 50.2042C65.5789 50.0482 66.11 49.8773 66.6362 49.7064L67.1253 49.5514C66.9388 49.5246 66.7504 49.4779 66.56 49.4014C66.2672 49.2862 66.0836 49.1411 65.9616 49.0457C65.9313 49.0229 65.906 48.999 65.8757 48.9812C65.8737 48.9851 65.8405 48.9851 65.7781 48.9941C65.1845 49.0855 64.6281 49.2862 64.0394 49.4998C63.1794 49.8107 62.293 50.1326 61.2279 50.1326C59.4717 50.1326 58.1235 50.2966 56.8535 50.6642C55.7142 50.992 54.7868 51.3984 54.0166 51.9031C53.7901 52.0521 53.5001 52.0481 53.2776 51.8951C53.1917 51.8365 53.1214 51.76 53.0735 51.6716V51.6746Z" fill="white"/>
|
|
6960
6975
|
<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="white"/>
|
|
6961
6976
|
<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="white"/>
|
|
6962
|
-
</svg>`,
|
|
6977
|
+
</svg>`,zt=class zt extends p{_getNysLogo(){return new DOMParser().parseFromString(xo,"image/svg+xml").documentElement}render(){return l`
|
|
6963
6978
|
<footer class="nys-unavfooter">
|
|
6964
6979
|
<div class="nys-unavfooter__main-container">
|
|
6965
6980
|
<div class="nys-unavfooter__container_menu">
|
|
@@ -6987,5 +7002,5 @@ ${this.value}</textarea
|
|
|
6987
7002
|
</div>
|
|
6988
7003
|
</div>
|
|
6989
7004
|
</footer>
|
|
6990
|
-
`}};
|
|
7005
|
+
`}};zt.styles=mo;let rt=zt;customElements.get("nys-unavfooter")||customElements.define("nys-unavfooter",rt),u.NysAccordion=$e,u.NysAccordionItem=te,u.NysAlert=Yt,u.NysAvatar=O,u.NysBacktotop=fe,u.NysBadge=Xt,u.NysButton=Kt,u.NysCheckbox=e1,u.NysCheckboxgroup=Jt,u.NysDivider=je,u.NysErrorMessage=Se,u.NysFileinput=k,u.NysGlobalFooter=Me,u.NysGlobalHeader=ae,u.NysIcon=t1,u.NysLabel=J,u.NysModal=s1,u.NysOption=ne,u.NysPagination=re,u.NysRadiobutton=n1,u.NysRadiogroup=r1,u.NysSelect=i1,u.NysSkipnav=Pe,u.NysStep=G,u.NysStepper=ie,u.NysTextarea=c1,u.NysTextinput=d1,u.NysToggle=h1,u.NysTooltip=ee,u.NysUnavFooter=rt,u.NysUnavHeader=Y,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
|
|
6991
7006
|
//# sourceMappingURL=nysds.js.map
|