@aquera/nile-elements 0.0.2 → 0.0.3-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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.d.ts +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.js +178 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.d.ts +70 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +494 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +315 -66
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-date-picker/index.cjs.js +2 -0
- package/dist/nile-date-picker/index.cjs.js.map +1 -0
- package/dist/nile-date-picker/index.esm.js +1 -0
- package/dist/nile-date-picker/nile-date-picker.cjs.js +2 -0
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -0
- package/dist/nile-date-picker/nile-date-picker.css.cjs.js +2 -0
- package/dist/nile-date-picker/nile-date-picker.css.cjs.js.map +1 -0
- package/dist/nile-date-picker/nile-date-picker.css.esm.js +166 -0
- package/dist/nile-date-picker/nile-date-picker.esm.js +85 -0
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-button/nile-button.d.ts +2 -2
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-date-picker/index.d.ts +1 -0
- package/dist/src/nile-date-picker/index.js +2 -0
- package/dist/src/nile-date-picker/index.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.d.ts +12 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.js +178 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +70 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +494 -0
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/nile-button/nile-button.ts +2 -2
- package/src/nile-date-picker/index.ts +1 -0
- package/src/nile-date-picker/nile-date-picker.css.ts +180 -0
- package/src/nile-date-picker/nile-date-picker.ts +588 -0
- package/src/nile-icon-button/nile-icon-button.ts +1 -1
package/dist/index.iife.js
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
!function(M){function N(M,N,D,
|
1
|
+
!function(M){function N(M,N,D,i){for(var I,j=arguments.length,g=j<3?N:null===i?i=Object.getOwnPropertyDescriptor(N,D):i,u=M.length-1;u>=0;u--)(I=M[u])&&(g=(j<3?I(g):j>3?I(N,D,g):I(N,D))||g);return j>3&&g&&Object.defineProperty(N,D,g),g
|
2
2
|
/**
|
3
3
|
* @license
|
4
4
|
* Copyright 2019 Google LLC
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
6
|
-
*/}const D=window,
|
6
|
+
*/}const D=window,i=D.ShadowRoot&&(void 0===D.ShadyCSS||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),j=new WeakMap;let g=class{constructor(M,N,D){if(this._$cssResult$=!0,D!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=M,this.t=N}get styleSheet(){let M=this.o;const N=this.t;if(i&&void 0===M){const D=void 0!==N&&1===N.length;D&&(M=j.get(N)),void 0===M&&((this.o=M=new CSSStyleSheet).replaceSync(this.cssText),D&&j.set(N,M))}return M}toString(){return this.cssText}};const u=(M,...N)=>{const D=1===M.length?M[0]:N.reduce(((N,D,i)=>N+(M=>{if(!0===M._$cssResult$)return M.cssText;if("number"==typeof M)return M;throw Error("Value passed to 'css' function must be a 'css' function result: "+M+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(D)+M[i+1]),M[0]);return new g(D,M,I)},L=i?M=>M:M=>M instanceof CSSStyleSheet?(M=>{let N="";for(const D of M.cssRules)N+=D.cssText;return(M=>new g("string"==typeof M?M:M+"",void 0,I))(N)})(M):M
|
7
7
|
/**
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/;var T;const z=window,A=z.trustedTypes,
|
11
|
+
*/;var T;const z=window,A=z.trustedTypes,t=A?A.emptyScript:"",y=z.reactiveElementPolyfillSupport,x={toAttribute(M,N){switch(N){case Boolean:M=M?t:null;break;case Object:case Array:M=null==M?M:JSON.stringify(M)}return M},fromAttribute(M,N){let D=M;switch(N){case Boolean:D=null!==M;break;case Number:D=null===M?null:Number(M);break;case Object:case Array:try{D=JSON.parse(M)}catch(M){D=null}}return D}},c=(M,N)=>N!==M&&(N==N||M==M),s={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:c};let e=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(M){var N;null!==(N=this.h)&&void 0!==N||(this.h=[]),this.h.push(M)}static get observedAttributes(){this.finalize();const M=[];return this.elementProperties.forEach(((N,D)=>{const i=this._$Ep(D,N);void 0!==i&&(this._$Ev.set(i,D),M.push(i))})),M}static createProperty(M,N=s){if(N.state&&(N.attribute=!1),this.finalize(),this.elementProperties.set(M,N),!N.noAccessor&&!this.prototype.hasOwnProperty(M)){const D="symbol"==typeof M?Symbol():"__"+M,i=this.getPropertyDescriptor(M,D,N);void 0!==i&&Object.defineProperty(this.prototype,M,i)}}static getPropertyDescriptor(M,N,D){return{get(){return this[N]},set(i){const I=this[M];this[N]=i,this.requestUpdate(M,I,D)},configurable:!0,enumerable:!0}}static getPropertyOptions(M){return this.elementProperties.get(M)||s}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const M=Object.getPrototypeOf(this);if(M.finalize(),this.elementProperties=new Map(M.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const M=this.properties,N=[...Object.getOwnPropertyNames(M),...Object.getOwnPropertySymbols(M)];for(const D of N)this.createProperty(D,M[D])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(M){const N=[];if(Array.isArray(M)){const D=new Set(M.flat(1/0).reverse());for(const M of D)N.unshift(L(M))}else void 0!==M&&N.push(L(M));return N}static _$Ep(M,N){const D=N.attribute;return!1===D?void 0:"string"==typeof D?D:"string"==typeof M?M.toLowerCase():void 0}u(){var M;this._$E_=new Promise((M=>this.enableUpdating=M)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(M=this.constructor.h)||void 0===M||M.forEach((M=>M(this)))}addController(M){var N,D;(null!==(N=this._$ES)&&void 0!==N?N:this._$ES=[]).push(M),void 0!==this.renderRoot&&this.isConnected&&(null===(D=M.hostConnected)||void 0===D||D.call(M))}removeController(M){var N;null===(N=this._$ES)||void 0===N||N.splice(this._$ES.indexOf(M)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((M,N)=>{this.hasOwnProperty(N)&&(this._$Ei.set(N,this[N]),delete this[N])}))}createRenderRoot(){var M;const N=null!==(M=this.shadowRoot)&&void 0!==M?M:this.attachShadow(this.constructor.shadowRootOptions);return((M,N)=>{i?M.adoptedStyleSheets=N.map((M=>M instanceof CSSStyleSheet?M:M.styleSheet)):N.forEach((N=>{const i=document.createElement("style"),I=D.litNonce;void 0!==I&&i.setAttribute("nonce",I),i.textContent=N.cssText,M.appendChild(i)}))})(N,this.constructor.elementStyles),N}connectedCallback(){var M;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(M=this._$ES)||void 0===M||M.forEach((M=>{var N;return null===(N=M.hostConnected)||void 0===N?void 0:N.call(M)}))}enableUpdating(M){}disconnectedCallback(){var M;null===(M=this._$ES)||void 0===M||M.forEach((M=>{var N;return null===(N=M.hostDisconnected)||void 0===N?void 0:N.call(M)}))}attributeChangedCallback(M,N,D){this._$AK(M,D)}_$EO(M,N,D=s){var i;const I=this.constructor._$Ep(M,D);if(void 0!==I&&!0===D.reflect){const j=(void 0!==(null===(i=D.converter)||void 0===i?void 0:i.toAttribute)?D.converter:x).toAttribute(N,D.type);this._$El=M,null==j?this.removeAttribute(I):this.setAttribute(I,j),this._$El=null}}_$AK(M,N){var D;const i=this.constructor,I=i._$Ev.get(M);if(void 0!==I&&this._$El!==I){const M=i.getPropertyOptions(I),j="function"==typeof M.converter?{fromAttribute:M.converter}:void 0!==(null===(D=M.converter)||void 0===D?void 0:D.fromAttribute)?M.converter:x;this._$El=I,this[I]=j.fromAttribute(N,M.type),this._$El=null}}requestUpdate(M,N,D){let i=!0;void 0!==M&&(((D=D||this.constructor.getPropertyOptions(M)).hasChanged||c)(this[M],N)?(this._$AL.has(M)||this._$AL.set(M,N),!0===D.reflect&&this._$El!==M&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(M,D))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(M){Promise.reject(M)}const M=this.scheduleUpdate();return null!=M&&await M,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var M;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((M,N)=>this[N]=M)),this._$Ei=void 0);let N=!1;const D=this._$AL;try{N=this.shouldUpdate(D),N?(this.willUpdate(D),null===(M=this._$ES)||void 0===M||M.forEach((M=>{var N;return null===(N=M.hostUpdate)||void 0===N?void 0:N.call(M)})),this.update(D)):this._$Ek()}catch(M){throw N=!1,this._$Ek(),M}N&&this._$AE(D)}willUpdate(M){}_$AE(M){var N;null===(N=this._$ES)||void 0===N||N.forEach((M=>{var N;return null===(N=M.hostUpdated)||void 0===N?void 0:N.call(M)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(M)),this.updated(M)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(M){return!0}update(M){void 0!==this._$EC&&(this._$EC.forEach(((M,N)=>this._$EO(N,this[N],M))),this._$EC=void 0),this._$Ek()}updated(M){}firstUpdated(M){}};
|
12
12
|
/**
|
13
13
|
* @license
|
14
14
|
* Copyright 2017 Google LLC
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
16
16
|
*/
|
17
|
-
var
|
17
|
+
var l;e.finalized=!0,e.elementProperties=new Map,e.elementStyles=[],e.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:e}),(null!==(T=z.reactiveElementVersions)&&void 0!==T?T:z.reactiveElementVersions=[]).push("1.4.1");const w=window,E=w.trustedTypes,a=E?E.createPolicy("lit-html",{createHTML:M=>M}):void 0,S=`lit$${(Math.random()+"").slice(9)}$`,o="?"+S,O=`<${o}>`,n=document,d=(M="")=>n.createComment(M),C=M=>null===M||"object"!=typeof M&&"function"!=typeof M,r=Array.isArray,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,k=/>/g,h=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Y=/'/g,Z=/"/g,b=/^(?:script|style|textarea|title)$/i,m=(M=>(N,...D)=>({_$litType$:M,strings:N,values:D}))(1),p=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),V=new WeakMap,v=n.createTreeWalker(n,129,null,!1);let G=class{constructor({strings:M,_$litType$:N},D){let i;this.parts=[];let I=0,j=0;const g=M.length-1,u=this.parts,[L,T]=((M,N)=>{const D=M.length-1,i=[];let I,j=2===N?"<svg>":"",g=U;for(let N=0;N<D;N++){const D=M[N];let u,L,T=-1,z=0;for(;z<D.length&&(g.lastIndex=z,L=g.exec(D),null!==L);)z=g.lastIndex,g===U?"!--"===L[1]?g=Q:void 0!==L[1]?g=k:void 0!==L[2]?(b.test(L[2])&&(I=RegExp("</"+L[2],"g")),g=h):void 0!==L[3]&&(g=h):g===h?">"===L[0]?(g=null!=I?I:U,T=-1):void 0===L[1]?T=-2:(T=g.lastIndex-L[2].length,u=L[1],g=void 0===L[3]?h:'"'===L[3]?Z:Y):g===Z||g===Y?g=h:g===Q||g===k?g=U:(g=h,I=void 0);const A=g===h&&M[N+1].startsWith("/>")?" ":"";j+=g===U?D+O:T>=0?(i.push(u),D.slice(0,T)+"$lit$"+D.slice(T)+S+A):D+S+(-2===T?(i.push(void 0),N):A)}const u=j+(M[D]||"<?>")+(2===N?"</svg>":"");if(!Array.isArray(M)||!M.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==a?a.createHTML(u):u,i]})(M,N);if(this.el=G.createElement(L,D),v.currentNode=this.el.content,2===N){const M=this.el.content,N=M.firstChild;N.remove(),M.append(...N.childNodes)}for(;null!==(i=v.nextNode())&&u.length<g;){if(1===i.nodeType){if(i.hasAttributes()){const M=[];for(const N of i.getAttributeNames())if(N.endsWith("$lit$")||N.startsWith(S)){const D=T[j++];if(M.push(N),void 0!==D){const M=i.getAttribute(D.toLowerCase()+"$lit$").split(S),N=/([.?@])?(.*)/.exec(D);u.push({type:1,index:I,name:N[2],strings:M,ctor:"."===N[1]?F:"?"===N[1]?J:"@"===N[1]?X:R})}else u.push({type:6,index:I})}for(const N of M)i.removeAttribute(N)}if(b.test(i.tagName)){const M=i.textContent.split(S),N=M.length-1;if(N>0){i.textContent=E?E.emptyScript:"";for(let D=0;D<N;D++)i.append(M[D],d()),v.nextNode(),u.push({type:2,index:++I});i.append(M[N],d())}}}else if(8===i.nodeType)if(i.data===o)u.push({type:2,index:I});else{let M=-1;for(;-1!==(M=i.data.indexOf(S,M+1));)u.push({type:7,index:I}),M+=S.length-1}I++}}static createElement(M,N){const D=n.createElement("template");return D.innerHTML=M,D}};function B(M,N,D=M,i){var I,j,g,u;if(N===p)return N;let L=void 0!==i?null===(I=D._$Co)||void 0===I?void 0:I[i]:D._$Cl;const T=C(N)?void 0:N._$litDirective$;return(null==L?void 0:L.constructor)!==T&&(null===(j=null==L?void 0:L._$AO)||void 0===j||j.call(L,!1),void 0===T?L=void 0:(L=new T(M),L._$AT(M,D,i)),void 0!==i?(null!==(g=(u=D)._$Co)&&void 0!==g?g:u._$Co=[])[i]=L:D._$Cl=L),void 0!==L&&(N=B(M,L._$AS(M,N.values),L,i)),N}let P=class{constructor(M,N,D,i){var I;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=M,this._$AB=N,this._$AM=D,this.options=i,this._$Cm=null===(I=null==i?void 0:i.isConnected)||void 0===I||I}get _$AU(){var M,N;return null!==(N=null===(M=this._$AM)||void 0===M?void 0:M._$AU)&&void 0!==N?N:this._$Cm}get parentNode(){let M=this._$AA.parentNode;const N=this._$AM;return void 0!==N&&11===M.nodeType&&(M=N.parentNode),M}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(M,N=this){M=B(this,M,N),C(M)?M===W||null==M||""===M?(this._$AH!==W&&this._$AR(),this._$AH=W):M!==this._$AH&&M!==p&&this.g(M):void 0!==M._$litType$?this.$(M):void 0!==M.nodeType?this.T(M):(M=>r(M)||"function"==typeof(null==M?void 0:M[Symbol.iterator]))(M)?this.k(M):this.g(M)}O(M,N=this._$AB){return this._$AA.parentNode.insertBefore(M,N)}T(M){this._$AH!==M&&(this._$AR(),this._$AH=this.O(M))}g(M){this._$AH!==W&&C(this._$AH)?this._$AA.nextSibling.data=M:this.T(n.createTextNode(M)),this._$AH=M}$(M){var N;const{values:D,_$litType$:i}=M,I="number"==typeof i?this._$AC(M):(void 0===i.el&&(i.el=G.createElement(i.h,this.options)),i);if((null===(N=this._$AH)||void 0===N?void 0:N._$AD)===I)this._$AH.p(D);else{const M=new class{constructor(M,N){this.u=[],this._$AN=void 0,this._$AD=M,this._$AM=N}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(M){var N;const{el:{content:D},parts:i}=this._$AD,I=(null!==(N=null==M?void 0:M.creationScope)&&void 0!==N?N:n).importNode(D,!0);v.currentNode=I;let j=v.nextNode(),g=0,u=0,L=i[0];for(;void 0!==L;){if(g===L.index){let N;2===L.type?N=new P(j,j.nextSibling,this,M):1===L.type?N=new L.ctor(j,L.name,L.strings,this,M):6===L.type&&(N=new f(j,this,M)),this.u.push(N),L=i[++u]}g!==(null==L?void 0:L.index)&&(j=v.nextNode(),g++)}return I}p(M){let N=0;for(const D of this.u)void 0!==D&&(void 0!==D.strings?(D._$AI(M,D,N),N+=D.strings.length-2):D._$AI(M[N])),N++}}(I,this),N=M.v(this.options);M.p(D),this.T(N),this._$AH=M}}_$AC(M){let N=V.get(M.strings);return void 0===N&&V.set(M.strings,N=new G(M)),N}k(M){r(this._$AH)||(this._$AH=[],this._$AR());const N=this._$AH;let D,i=0;for(const I of M)i===N.length?N.push(D=new P(this.O(d()),this.O(d()),this,this.options)):D=N[i],D._$AI(I),i++;i<N.length&&(this._$AR(D&&D._$AB.nextSibling,i),N.length=i)}_$AR(M=this._$AA.nextSibling,N){var D;for(null===(D=this._$AP)||void 0===D||D.call(this,!1,!0,N);M&&M!==this._$AB;){const N=M.nextSibling;M.remove(),M=N}}setConnected(M){var N;void 0===this._$AM&&(this._$Cm=M,null===(N=this._$AP)||void 0===N||N.call(this,M))}},R=class{constructor(M,N,D,i,I){this.type=1,this._$AH=W,this._$AN=void 0,this.element=M,this.name=N,this._$AM=i,this.options=I,D.length>2||""!==D[0]||""!==D[1]?(this._$AH=Array(D.length-1).fill(new String),this.strings=D):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(M,N=this,D,i){const I=this.strings;let j=!1;if(void 0===I)M=B(this,M,N,0),j=!C(M)||M!==this._$AH&&M!==p,j&&(this._$AH=M);else{const i=M;let g,u;for(M=I[0],g=0;g<I.length-1;g++)u=B(this,i[D+g],N,g),u===p&&(u=this._$AH[g]),j||(j=!C(u)||u!==this._$AH[g]),u===W?M=W:M!==W&&(M+=(null!=u?u:"")+I[g+1]),this._$AH[g]=u}j&&!i&&this.j(M)}j(M){M===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=M?M:"")}},F=class extends R{constructor(){super(...arguments),this.type=3}j(M){this.element[this.name]=M===W?void 0:M}};const H=E?E.emptyScript:"";let J=class extends R{constructor(){super(...arguments),this.type=4}j(M){M&&M!==W?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}},X=class extends R{constructor(M,N,D,i,I){super(M,N,D,i,I),this.type=5}_$AI(M,N=this){var D;if((M=null!==(D=B(this,M,N,0))&&void 0!==D?D:W)===p)return;const i=this._$AH,I=M===W&&i!==W||M.capture!==i.capture||M.once!==i.once||M.passive!==i.passive,j=M!==W&&(i===W||I);I&&this.element.removeEventListener(this.name,this,i),j&&this.element.addEventListener(this.name,this,M),this._$AH=M}handleEvent(M){var N,D;"function"==typeof this._$AH?this._$AH.call(null!==(D=null===(N=this.options)||void 0===N?void 0:N.host)&&void 0!==D?D:this.element,M):this._$AH.handleEvent(M)}},f=class{constructor(M,N,D){this.element=M,this.type=6,this._$AN=void 0,this._$AM=N,this.options=D}get _$AU(){return this._$AM._$AU}_$AI(M){B(this,M)}};const _=w.litHtmlPolyfillSupport;
|
18
18
|
/**
|
19
19
|
* @license
|
20
20
|
* Copyright 2017 Google LLC
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
22
22
|
*/
|
23
|
-
var $;null==_||_(G,P),(null!==(w
|
23
|
+
var $;null==_||_(G,P),(null!==(l=w.litHtmlVersions)&&void 0!==l?l:w.litHtmlVersions=[]).push("2.4.0");const K=window,q=K.trustedTypes,MM=q?q.createPolicy("lit-html",{createHTML:M=>M}):void 0,NM=`lit$${(Math.random()+"").slice(9)}$`,DM="?"+NM,iM=`<${DM}>`,IM=document,jM=(M="")=>IM.createComment(M),gM=M=>null===M||"object"!=typeof M&&"function"!=typeof M,uM=Array.isArray,LM=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,TM=/-->/g,zM=/>/g,AM=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),tM=/'/g,yM=/"/g,xM=/^(?:script|style|textarea|title)$/i,cM=(M=>(N,...D)=>({_$litType$:M,strings:N,values:D}))(1),sM=Symbol.for("lit-noChange"),eM=Symbol.for("lit-nothing"),lM=new WeakMap,wM=IM.createTreeWalker(IM,129,null,!1),EM=(M,N)=>{const D=M.length-1,i=[];let I,j=2===N?"<svg>":"",g=LM;for(let N=0;N<D;N++){const D=M[N];let u,L,T=-1,z=0;for(;z<D.length&&(g.lastIndex=z,L=g.exec(D),null!==L);)z=g.lastIndex,g===LM?"!--"===L[1]?g=TM:void 0!==L[1]?g=zM:void 0!==L[2]?(xM.test(L[2])&&(I=RegExp("</"+L[2],"g")),g=AM):void 0!==L[3]&&(g=AM):g===AM?">"===L[0]?(g=null!=I?I:LM,T=-1):void 0===L[1]?T=-2:(T=g.lastIndex-L[2].length,u=L[1],g=void 0===L[3]?AM:'"'===L[3]?yM:tM):g===yM||g===tM?g=AM:g===TM||g===zM?g=LM:(g=AM,I=void 0);const A=g===AM&&M[N+1].startsWith("/>")?" ":"";j+=g===LM?D+iM:T>=0?(i.push(u),D.slice(0,T)+"$lit$"+D.slice(T)+NM+A):D+NM+(-2===T?(i.push(void 0),N):A)}const u=j+(M[D]||"<?>")+(2===N?"</svg>":"");if(!Array.isArray(M)||!M.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==MM?MM.createHTML(u):u,i]};class aM{constructor({strings:M,_$litType$:N},D){let i;this.parts=[];let I=0,j=0;const g=M.length-1,u=this.parts,[L,T]=EM(M,N);if(this.el=aM.createElement(L,D),wM.currentNode=this.el.content,2===N){const M=this.el.content,N=M.firstChild;N.remove(),M.append(...N.childNodes)}for(;null!==(i=wM.nextNode())&&u.length<g;){if(1===i.nodeType){if(i.hasAttributes()){const M=[];for(const N of i.getAttributeNames())if(N.endsWith("$lit$")||N.startsWith(NM)){const D=T[j++];if(M.push(N),void 0!==D){const M=i.getAttribute(D.toLowerCase()+"$lit$").split(NM),N=/([.?@])?(.*)/.exec(D);u.push({type:1,index:I,name:N[2],strings:M,ctor:"."===N[1]?dM:"?"===N[1]?rM:"@"===N[1]?UM:nM})}else u.push({type:6,index:I})}for(const N of M)i.removeAttribute(N)}if(xM.test(i.tagName)){const M=i.textContent.split(NM),N=M.length-1;if(N>0){i.textContent=q?q.emptyScript:"";for(let D=0;D<N;D++)i.append(M[D],jM()),wM.nextNode(),u.push({type:2,index:++I});i.append(M[N],jM())}}}else if(8===i.nodeType)if(i.data===DM)u.push({type:2,index:I});else{let M=-1;for(;-1!==(M=i.data.indexOf(NM,M+1));)u.push({type:7,index:I}),M+=NM.length-1}I++}}static createElement(M,N){const D=IM.createElement("template");return D.innerHTML=M,D}}function SM(M,N,D=M,i){var I,j,g,u;if(N===sM)return N;let L=void 0!==i?null===(I=D._$Cl)||void 0===I?void 0:I[i]:D._$Cu;const T=gM(N)?void 0:N._$litDirective$;return(null==L?void 0:L.constructor)!==T&&(null===(j=null==L?void 0:L._$AO)||void 0===j||j.call(L,!1),void 0===T?L=void 0:(L=new T(M),L._$AT(M,D,i)),void 0!==i?(null!==(g=(u=D)._$Cl)&&void 0!==g?g:u._$Cl=[])[i]=L:D._$Cu=L),void 0!==L&&(N=SM(M,L._$AS(M,N.values),L,i)),N}class oM{constructor(M,N){this.v=[],this._$AN=void 0,this._$AD=M,this._$AM=N}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(M){var N;const{el:{content:D},parts:i}=this._$AD,I=(null!==(N=null==M?void 0:M.creationScope)&&void 0!==N?N:IM).importNode(D,!0);wM.currentNode=I;let j=wM.nextNode(),g=0,u=0,L=i[0];for(;void 0!==L;){if(g===L.index){let N;2===L.type?N=new OM(j,j.nextSibling,this,M):1===L.type?N=new L.ctor(j,L.name,L.strings,this,M):6===L.type&&(N=new QM(j,this,M)),this.v.push(N),L=i[++u]}g!==(null==L?void 0:L.index)&&(j=wM.nextNode(),g++)}return I}m(M){let N=0;for(const D of this.v)void 0!==D&&(void 0!==D.strings?(D._$AI(M,D,N),N+=D.strings.length-2):D._$AI(M[N])),N++}}class OM{constructor(M,N,D,i){var I;this.type=2,this._$AH=eM,this._$AN=void 0,this._$AA=M,this._$AB=N,this._$AM=D,this.options=i,this._$C_=null===(I=null==i?void 0:i.isConnected)||void 0===I||I}get _$AU(){var M,N;return null!==(N=null===(M=this._$AM)||void 0===M?void 0:M._$AU)&&void 0!==N?N:this._$C_}get parentNode(){let M=this._$AA.parentNode;const N=this._$AM;return void 0!==N&&11===M.nodeType&&(M=N.parentNode),M}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(M,N=this){M=SM(this,M,N),gM(M)?M===eM||null==M||""===M?(this._$AH!==eM&&this._$AR(),this._$AH=eM):M!==this._$AH&&M!==sM&&this.$(M):void 0!==M._$litType$?this.T(M):void 0!==M.nodeType?this.k(M):(M=>uM(M)||"function"==typeof(null==M?void 0:M[Symbol.iterator]))(M)?this.O(M):this.$(M)}S(M,N=this._$AB){return this._$AA.parentNode.insertBefore(M,N)}k(M){this._$AH!==M&&(this._$AR(),this._$AH=this.S(M))}$(M){this._$AH!==eM&&gM(this._$AH)?this._$AA.nextSibling.data=M:this.k(IM.createTextNode(M)),this._$AH=M}T(M){var N;const{values:D,_$litType$:i}=M,I="number"==typeof i?this._$AC(M):(void 0===i.el&&(i.el=aM.createElement(i.h,this.options)),i);if((null===(N=this._$AH)||void 0===N?void 0:N._$AD)===I)this._$AH.m(D);else{const M=new oM(I,this),N=M.p(this.options);M.m(D),this.k(N),this._$AH=M}}_$AC(M){let N=lM.get(M.strings);return void 0===N&&lM.set(M.strings,N=new aM(M)),N}O(M){uM(this._$AH)||(this._$AH=[],this._$AR());const N=this._$AH;let D,i=0;for(const I of M)i===N.length?N.push(D=new OM(this.S(jM()),this.S(jM()),this,this.options)):D=N[i],D._$AI(I),i++;i<N.length&&(this._$AR(D&&D._$AB.nextSibling,i),N.length=i)}_$AR(M=this._$AA.nextSibling,N){var D;for(null===(D=this._$AP)||void 0===D||D.call(this,!1,!0,N);M&&M!==this._$AB;){const N=M.nextSibling;M.remove(),M=N}}setConnected(M){var N;void 0===this._$AM&&(this._$C_=M,null===(N=this._$AP)||void 0===N||N.call(this,M))}}class nM{constructor(M,N,D,i,I){this.type=1,this._$AH=eM,this._$AN=void 0,this.element=M,this.name=N,this._$AM=i,this.options=I,D.length>2||""!==D[0]||""!==D[1]?(this._$AH=Array(D.length-1).fill(new String),this.strings=D):this._$AH=eM}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(M,N=this,D,i){const I=this.strings;let j=!1;if(void 0===I)M=SM(this,M,N,0),j=!gM(M)||M!==this._$AH&&M!==sM,j&&(this._$AH=M);else{const i=M;let g,u;for(M=I[0],g=0;g<I.length-1;g++)u=SM(this,i[D+g],N,g),u===sM&&(u=this._$AH[g]),j||(j=!gM(u)||u!==this._$AH[g]),u===eM?M=eM:M!==eM&&(M+=(null!=u?u:"")+I[g+1]),this._$AH[g]=u}j&&!i&&this.P(M)}P(M){M===eM?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=M?M:"")}}class dM extends nM{constructor(){super(...arguments),this.type=3}P(M){this.element[this.name]=M===eM?void 0:M}}const CM=q?q.emptyScript:"";class rM extends nM{constructor(){super(...arguments),this.type=4}P(M){M&&M!==eM?this.element.setAttribute(this.name,CM):this.element.removeAttribute(this.name)}}class UM extends nM{constructor(M,N,D,i,I){super(M,N,D,i,I),this.type=5}_$AI(M,N=this){var D;if((M=null!==(D=SM(this,M,N,0))&&void 0!==D?D:eM)===sM)return;const i=this._$AH,I=M===eM&&i!==eM||M.capture!==i.capture||M.once!==i.once||M.passive!==i.passive,j=M!==eM&&(i===eM||I);I&&this.element.removeEventListener(this.name,this,i),j&&this.element.addEventListener(this.name,this,M),this._$AH=M}handleEvent(M){var N,D;"function"==typeof this._$AH?this._$AH.call(null!==(D=null===(N=this.options)||void 0===N?void 0:N.host)&&void 0!==D?D:this.element,M):this._$AH.handleEvent(M)}}class QM{constructor(M,N,D){this.element=M,this.type=6,this._$AN=void 0,this._$AM=N,this.options=D}get _$AU(){return this._$AM._$AU}_$AI(M){SM(this,M)}}const kM=K.litHtmlPolyfillSupport;
|
24
24
|
/**
|
25
25
|
* @license
|
26
26
|
* Copyright 2017 Google LLC
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
28
28
|
*/
|
29
|
-
var YM
|
29
|
+
var hM,YM;null==kM||kM(aM,OM),(null!==($=K.litHtmlVersions)&&void 0!==$?$:K.litHtmlVersions=[]).push("2.3.1");let ZM=class extends e{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var M,N;const D=super.createRenderRoot();return null!==(M=(N=this.renderOptions).renderBefore)&&void 0!==M||(N.renderBefore=D.firstChild),D}update(M){const N=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(M),this._$Do=((M,N,D)=>{var i,I;const j=null!==(i=null==D?void 0:D.renderBefore)&&void 0!==i?i:N;let g=j._$litPart$;if(void 0===g){const M=null!==(I=null==D?void 0:D.renderBefore)&&void 0!==I?I:null;j._$litPart$=g=new OM(N.insertBefore(jM(),M),M,void 0,null!=D?D:{})}return g._$AI(M),g})(N,this.renderRoot,this.renderOptions)}connectedCallback(){var M;super.connectedCallback(),null===(M=this._$Do)||void 0===M||M.setConnected(!0)}disconnectedCallback(){var M;super.disconnectedCallback(),null===(M=this._$Do)||void 0===M||M.setConnected(!1)}render(){return sM}};ZM.finalized=!0,ZM._$litElement$=!0,null===(hM=globalThis.litElementHydrateSupport)||void 0===hM||hM.call(globalThis,{LitElement:ZM});const bM=globalThis.litElementPolyfillSupport;null==bM||bM({LitElement:ZM}),(null!==(YM=globalThis.litElementVersions)&&void 0!==YM?YM:globalThis.litElementVersions=[]).push("3.2.2");
|
30
30
|
/**
|
31
31
|
* @license
|
32
32
|
* Copyright 2017 Google LLC
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
34
34
|
*/
|
35
|
-
const mM=M=>N=>"function"==typeof N?((M,N)=>(customElements.define(M,N),N))(M,N):((M,N)=>{const{kind:D,elements:
|
35
|
+
const mM=M=>N=>"function"==typeof N?((M,N)=>(customElements.define(M,N),N))(M,N):((M,N)=>{const{kind:D,elements:i}=N;return{kind:D,elements:i,finisher(N){customElements.define(M,N)}}})(M,N)
|
36
36
|
/**
|
37
37
|
* @license
|
38
38
|
* Copyright 2017 Google LLC
|
@@ -53,7 +53,7 @@ const mM=M=>N=>"function"==typeof N?((M,N)=>(customElements.define(M,N),N))(M,N)
|
|
53
53
|
* Copyright 2017 Google LLC
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
55
55
|
*/
|
56
|
-
function vM(M,N){return(({finisher:M,descriptor:N})=>(D,
|
56
|
+
function vM(M,N){return(({finisher:M,descriptor:N})=>(D,i)=>{var I;if(void 0===i){const i=null!==(I=D.originalKey)&&void 0!==I?I:D.key,j=null!=N?{kind:"method",placement:"prototype",key:i,descriptor:N(D.key)}:{...D,key:i};return null!=M&&(j.finisher=function(N){M(N,i)}),j}{const I=D.constructor;void 0!==N&&Object.defineProperty(D,i,N(i)),null==M||M(I,i)}})({descriptor:D=>{const i={get(){var N,D;return null!==(D=null===(N=this.renderRoot)||void 0===N?void 0:N.querySelector(M))&&void 0!==D?D:null},enumerable:!0,configurable:!0};if(N){const N="symbol"==typeof D?Symbol():"__"+D;i.get=function(){var D,i;return void 0===this[N]&&(this[N]=null!==(i=null===(D=this.renderRoot)||void 0===D?void 0:D.querySelector(M))&&void 0!==i?i:null),this[N]}}return i}})}
|
57
57
|
/**
|
58
58
|
* @license
|
59
59
|
* Copyright 2021 Google LLC
|
@@ -69,7 +69,7 @@ const BM=1,PM=2,RM=3,FM=4,HM=M=>(...N)=>({_$litDirective$:M,values:N});let JM=cl
|
|
69
69
|
* @license
|
70
70
|
* Copyright 2018 Google LLC
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
72
|
-
*/const XM=HM(class extends JM{constructor(M){var N;if(super(M),M.type!==BM||"class"!==M.name||(null===(N=M.strings)||void 0===N?void 0:N.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(M){return" "+Object.keys(M).filter((N=>M[N])).join(" ")+" "}update(M,[N]){var D,
|
72
|
+
*/const XM=HM(class extends JM{constructor(M){var N;if(super(M),M.type!==BM||"class"!==M.name||(null===(N=M.strings)||void 0===N?void 0:N.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(M){return" "+Object.keys(M).filter((N=>M[N])).join(" ")+" "}update(M,[N]){var D,i;if(void 0===this.nt){this.nt=new Set,void 0!==M.strings&&(this.st=new Set(M.strings.join(" ").split(/\s/).filter((M=>""!==M))));for(const M in N)N[M]&&!(null===(D=this.st)||void 0===D?void 0:D.has(M))&&this.nt.add(M);return this.render(N)}const I=M.element.classList;this.nt.forEach((M=>{M in N||(I.remove(M),this.nt.delete(M))}));for(const M in N){const D=!!N[M];D===this.nt.has(M)||(null===(i=this.st)||void 0===i?void 0:i.has(M))||(D?(I.add(M),this.nt.add(M)):(I.remove(M),this.nt.delete(M)))}return p}});
|
73
73
|
/**
|
74
74
|
* @license
|
75
75
|
* Copyright 2017 Google LLC
|
@@ -112,23 +112,23 @@ class _M extends fM{}_M.directiveName="unsafeSVG",_M.resultType=2;const $M=HM(_M
|
|
112
112
|
.nds-icon--push {
|
113
113
|
margin-right: 12px;
|
114
114
|
}
|
115
|
-
`,N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"set",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"name",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"description",void 0),N([WM({type:String})],M.NileIcon.prototype,"customSvgPath",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"size",void 0),N([VM()],M.NileIcon.prototype,"_svg",void 0),N([WM({type:String})],M.NileIcon.prototype,"title",void 0),N([WM({reflect:!0})],M.NileIcon.prototype,"color",void 0),N([WM({type:Boolean})],M.NileIcon.prototype,"push",void 0),N([WM({reflect:!0})],M.NileIcon.prototype,"frame",void 0),M.NileIcon=N([mM("nile-icon")],M.NileIcon);const qM=new WeakMap,MN=new WeakMap,NN=new WeakSet,DN=new WeakMap;class
|
115
|
+
`,N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"set",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"name",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"description",void 0),N([WM({type:String})],M.NileIcon.prototype,"customSvgPath",void 0),N([WM({type:String,reflect:!0})],M.NileIcon.prototype,"size",void 0),N([VM()],M.NileIcon.prototype,"_svg",void 0),N([WM({type:String})],M.NileIcon.prototype,"title",void 0),N([WM({reflect:!0})],M.NileIcon.prototype,"color",void 0),N([WM({type:Boolean})],M.NileIcon.prototype,"push",void 0),N([WM({reflect:!0})],M.NileIcon.prototype,"frame",void 0),M.NileIcon=N([mM("nile-icon")],M.NileIcon);const qM=new WeakMap,MN=new WeakMap,NN=new WeakSet,DN=new WeakMap;class iN{constructor(M,N){(this.host=M).addController(this),this.options={form:M=>{if(M.hasAttribute("form")&&""!==M.getAttribute("form")){const N=M.getRootNode(),D=M.getAttribute("form");if(D)return N.getElementById(D)}return M.closest("form")},name:M=>M.name,value:M=>M.value,defaultValue:M=>M.defaultValue,disabled:M=>M.disabled??!1,reportValidity:M=>"function"!=typeof M.reportValidity||M.reportValidity(),setValue:(M,N)=>M.value=N,assumeInteractionOn:["nile-input"],...N},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleInteraction=this.handleInteraction.bind(this)}hostConnected(){const M=this.options.form(this.host);M&&this.attachForm(M),DN.set(this.host,[]),this.options.assumeInteractionOn.forEach((M=>{this.host.addEventListener(M,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),DN.delete(this.host),this.options.assumeInteractionOn.forEach((M=>{this.host.removeEventListener(M,this.handleInteraction)}))}hostUpdated(){const M=this.options.form(this.host);M||this.detachForm(),M&&this.form!==M&&(this.detachForm(),this.attachForm(M)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(M){M?(this.form=M,qM.has(this.form)?qM.get(this.form).add(this.host):qM.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),MN.has(this.form)||(MN.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(qM.get(this.form)?.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),MN.has(this.form)&&(this.form.reportValidity=MN.get(this.form),MN.delete(this.form))),this.form=void 0}handleFormData(M){const N=this.options.disabled(this.host),D=this.options.name(this.host),i=this.options.value(this.host),I="nile-button"===this.host.tagName.toLowerCase();!N&&!I&&"string"==typeof D&&D.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((N=>{M.formData.append(D,N.toString())})):M.formData.append(D,i.toString()))}handleFormSubmit(M){const N=this.options.disabled(this.host),D=this.options.reportValidity;this.form&&!this.form.noValidate&&qM.get(this.form)?.forEach((M=>{this.setUserInteracted(M,!0)})),!this.form||this.form.noValidate||N||D(this.host)||(M.preventDefault(),M.stopImmediatePropagation())}handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),DN.set(this.host,[])}handleInteraction(M){const N=DN.get(this.host);N.includes(M.type)||N.push(M.type),N.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)}reportFormValidity(){if(this.form&&!this.form.noValidate){const M=this.form.querySelectorAll("*");for(const N of M)if("function"==typeof N.reportValidity&&!N.reportValidity())return!1}return!0}setUserInteracted(M,N){N?NN.add(M):NN.delete(M),M.requestUpdate()}doAction(M,N){if(this.form){const D=document.createElement("button");D.type=M,D.style.position="absolute",D.style.width="0",D.style.height="0",D.style.clipPath="inset(50%)",D.style.overflow="hidden",D.style.whiteSpace="nowrap",N&&(D.name=N.name,D.value=N.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((M=>{N.hasAttribute(M)&&D.setAttribute(M,N.getAttribute(M))}))),this.form.append(D),D.click(),D.remove()}}getForm(){return this.form??null}reset(M){this.doAction("reset",M)}submit(M){this.doAction("submit",M)}setValidity(M){const N=this.host,D=Boolean(NN.has(N)),i=Boolean(N.required);N.toggleAttribute("data-required",i),N.toggleAttribute("data-optional",!i),N.toggleAttribute("data-invalid",!M),N.toggleAttribute("data-valid",M),N.toggleAttribute("data-user-invalid",!M&&D),N.toggleAttribute("data-user-valid",M&&D)}updateValidity(){const M=this.host;this.setValidity(M.validity.valid)}emitInvalidEvent(M){const N=new CustomEvent("nile-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});M||N.preventDefault(),this.host.dispatchEvent(N)||M?.preventDefault()}}const IN=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze({...IN,valid:!1,valueMissing:!0}),Object.freeze({...IN,valid:!1,customError:!0});class jN{constructor(M,...N){this.slotNames=[],(this.host=M).addController(this),this.slotNames=N,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some((M=>{if(M.nodeType===M.TEXT_NODE&&""!==M.textContent.trim())return!0;if(M.nodeType===M.ELEMENT_NODE){const N=M;if("nile-visually-hidden"===N.tagName.toLowerCase())return!1;if(!N.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(M){return null!==this.host.querySelector(`:scope > [slot="${M}"]`)}test(M){return"[default]"===M?this.hasDefaultSlot():this.hasNamedSlot(M)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(M){const N=M.target;(this.slotNames.includes("[default]")&&!N.name||N.name&&this.slotNames.includes(N.name))&&this.host.requestUpdate()}}
|
116
116
|
/**
|
117
117
|
* @license
|
118
118
|
* Copyright 2020 Google LLC
|
119
119
|
* SPDX-License-Identifier: BSD-3-Clause
|
120
120
|
*/
|
121
|
-
const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void 0:M._$litStatic$},LN=(M,...N)=>({_$litStatic$:N.reduce(((N,D,
|
121
|
+
const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void 0:M._$litStatic$},LN=(M,...N)=>({_$litStatic$:N.reduce(((N,D,i)=>N+(M=>{if(void 0!==M._$litStatic$)return M._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${M}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(D)+M[i+1]),M[0]),r:gN}),TN=new Map,zN=(M=>(N,...D)=>{const i=D.length;let I,j;const g=[],u=[];let L,T=0,z=!1;for(;T<i;){for(L=N[T];T<i&&void 0!==(j=D[T],I=uN(j));)L+=I+N[++T],z=!0;u.push(j),g.push(L),T++}if(T===i&&g.push(N[i]),z){const M=g.join("$$lit$$");void 0===(N=TN.get(M))&&(g.raw=g,TN.set(M,N=g)),D=u}return M(N,...D)})(m),AN=M=>null!=M?M:W;
|
122
122
|
/**
|
123
123
|
* @license
|
124
124
|
* Copyright 2018 Google LLC
|
125
125
|
* SPDX-License-Identifier: BSD-3-Clause
|
126
|
-
*/function
|
126
|
+
*/function tN(M,N){const D={waitUntilFirstUpdate:!1,...N};return(N,i)=>{const{update:I}=N,j=Array.isArray(M)?M:[M];N.update=function(M){j.forEach((N=>{const I=N;if(M.has(I)){const N=M.get(I),j=this[I];N!==j&&(D.waitUntilFirstUpdate&&!this.hasUpdated||this[i](N,j))}})),I.call(this,M)}}}
|
127
127
|
/**
|
128
128
|
* @license
|
129
129
|
* Copyright 2017 Google LLC
|
130
130
|
* SPDX-License-Identifier: BSD-3-Clause
|
131
|
-
*/console.warn("The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.");const
|
131
|
+
*/console.warn("The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.");const yN=u`
|
132
132
|
:host {
|
133
133
|
display: inline-block;
|
134
134
|
position: relative;
|
@@ -514,7 +514,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
514
514
|
pointer-events: none;
|
515
515
|
}
|
516
516
|
|
517
|
-
`;class xN extends ZM{emit(M,N){const D=new CustomEvent(M,{bubbles:!0,cancelable:!1,composed:!0,detail:N});this.dispatchEvent(D)}}M.NileButton=class extends xN{constructor(){super(...arguments),this.formControlController=new
|
517
|
+
`;class xN extends ZM{emit(M,N){const D=new CustomEvent(M,{bubbles:!0,cancelable:!1,composed:!0,detail:N});this.dispatchEvent(D)}}M.NileButton=class extends xN{constructor(){super(...arguments),this.formControlController=new iN(this,{form:M=>{if(M.hasAttribute("form")){const N=M.getRootNode(),D=M.getAttribute("form");return N.getElementById(D)}return M.closest("form")},assumeInteractionOn:["click"]}),this.hasSlotController=new jN(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="primary",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:IN}get validationMessage(){return this.isButton()?this.button.validationMessage:""}connectedCallback(){super.connectedCallback(),this.handleHostClick=this.handleHostClick.bind(this),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick)}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleHostClick(M){(this.disabled||this.loading)&&(M.preventDefault(),M.stopImmediatePropagation())}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(M){this.button.focus(M)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(M){this.isButton()&&(this.button.setCustomValidity(M),this.formControlController.updateValidity())}render(){const M=this.isLink(),N=M?LN`a`:LN`button`;return zN`
|
518
518
|
<${N}
|
519
519
|
part="base"
|
520
520
|
class=${XM({button:!0,"button--primary":"primary"===this.variant,"button--secondary":"secondary"===this.variant,"button--tertiary":"tertiary"===this.variant,"button--caution":"caution"===this.variant,"button--medium":"medium"===this.size,"button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
|
@@ -541,7 +541,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
541
541
|
${this.caret?zN` <nile-icon part="caret" class="button__caret" color="white" name="arrowdown"></nile-icon> `:""}
|
542
542
|
${this.loading?zN`<nile-spinner></nile-spinner>`:""}
|
543
543
|
</${N}>
|
544
|
-
`}},M.NileButton.styles=
|
544
|
+
`}},M.NileButton.styles=yN,N([vM(".button")],M.NileButton.prototype,"button",void 0),N([VM()],M.NileButton.prototype,"hasFocus",void 0),N([VM()],M.NileButton.prototype,"invalid",void 0),N([WM()],M.NileButton.prototype,"title",void 0),N([WM({reflect:!0})],M.NileButton.prototype,"variant",void 0),N([WM({reflect:!0})],M.NileButton.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"caret",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"disabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"loading",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"outline",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"pill",void 0),N([WM({type:Boolean,reflect:!0})],M.NileButton.prototype,"circle",void 0),N([WM()],M.NileButton.prototype,"type",void 0),N([WM()],M.NileButton.prototype,"name",void 0),N([WM()],M.NileButton.prototype,"value",void 0),N([WM()],M.NileButton.prototype,"href",void 0),N([WM()],M.NileButton.prototype,"target",void 0),N([WM()],M.NileButton.prototype,"rel",void 0),N([WM()],M.NileButton.prototype,"download",void 0),N([WM()],M.NileButton.prototype,"form",void 0),N([WM({attribute:"formaction"})],M.NileButton.prototype,"formAction",void 0),N([WM({attribute:"formenctype"})],M.NileButton.prototype,"formEnctype",void 0),N([WM({attribute:"formmethod"})],M.NileButton.prototype,"formMethod",void 0),N([WM({attribute:"formnovalidate",type:Boolean})],M.NileButton.prototype,"formNoValidate",void 0),N([WM({attribute:"formtarget"})],M.NileButton.prototype,"formTarget",void 0),N([tN("disabled",{waitUntilFirstUpdate:!0})],M.NileButton.prototype,"handleDisabledChange",null),M.NileButton=N([mM("nile-button")],M.NileButton),M.NileHeading=class extends ZM{constructor(){super(...arguments),this.name="",this.size="header-1"}render(){return cM`<slot></slot>`}},M.NileHeading.styles=u`
|
545
545
|
:host {
|
546
546
|
display: block;
|
547
547
|
border: solid 1px gray;
|
@@ -975,20 +975,20 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
975
975
|
border: none;
|
976
976
|
box-shadow: 0 0 0 0;
|
977
977
|
}
|
978
|
-
`,sN=(M="value")=>(N,D)=>{const
|
978
|
+
`,sN=(M="value")=>(N,D)=>{const i=N.constructor,I=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(N,j,g){const u=i.getPropertyOptions(M);if(N===("string"==typeof u.attribute?u.attribute:M)){const N=u.converter||x,i=("function"==typeof N?N:N?.fromAttribute??x.fromAttribute)(g,u.type);this[M]!==i&&(this[D]=i)}I.call(this,N,j,g)}}
|
979
979
|
/**
|
980
980
|
* @license
|
981
981
|
* Copyright 2020 Google LLC
|
982
982
|
* SPDX-License-Identifier: BSD-3-Clause
|
983
|
-
*/,eN={},
|
983
|
+
*/,eN={},lN=HM(class extends JM{constructor(M){if(super(M),M.type!==RM&&M.type!==BM&&M.type!==FM)throw Error("The `live` directive is not allowed on child or event bindings");if(!(M=>void 0===M.strings)(M))throw Error("`live` bindings can only contain a single expression")}render(M){return M}update(M,[N]){if(N===p||N===W)return N;const D=M.element,i=M.name;if(M.type===RM){if(N===D[i])return p}else if(M.type===FM){if(!!N===D.hasAttribute(i))return p}else if(M.type===BM&&D.getAttribute(i)===N+"")return p;return((M,N=eN)=>{M._$AH=N;
|
984
984
|
/**
|
985
985
|
* @license
|
986
986
|
* Copyright 2020 Google LLC
|
987
987
|
* SPDX-License-Identifier: BSD-3-Clause
|
988
|
-
*/})(M),N}});M.NileInput=class extends xN{constructor(){super(...arguments),this.formControlController=new
|
988
|
+
*/})(M),N}});M.NileInput=class extends xN{constructor(){super(...arguments),this.formControlController=new iN(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new jN(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.spellcheck=!0}get valueAsDate(){const M=document.createElement("input");return M.type="date",M.value=this.value,M.valueAsDate}set valueAsDate(M){const N=document.createElement("input");N.type="date",N.valueAsDate=M,this.value=N.value}get valueAsNumber(){const M=document.createElement("input");return M.type="number",M.value=this.value,M.valueAsNumber}set valueAsNumber(M){const N=document.createElement("input");N.type="number",N.valueAsNumber=M,this.value=N.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(M){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),M.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value})}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleKeyDown(M){const N=M.metaKey||M.ctrlKey||M.shiftKey||M.altKey;"Enter"!==M.key||N||setTimeout((()=>{M.defaultPrevented||M.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(M){this.input.focus(M)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(M,N,D="none"){this.input.setSelectionRange(M,N,D)}setRangeText(M,N,D,i){this.input.setRangeText(M,N,D,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(M){this.input.setCustomValidity(M),this.formControlController.updateValidity()}render(){const M=this.hasSlotController.test("label"),N=this.hasSlotController.test("help-text"),D=!!this.label||!!M,i=!!this.helpText||!!N,I=!!this.errorMessage,j=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return cM`
|
989
989
|
<div
|
990
990
|
part="form-control"
|
991
|
-
class=${XM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":D,"form-control--has-help-text":
|
991
|
+
class=${XM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":D,"form-control--has-help-text":i})}
|
992
992
|
>
|
993
993
|
<label
|
994
994
|
part="form-control-label"
|
@@ -1021,7 +1021,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1021
1021
|
min=${AN(this.min)}
|
1022
1022
|
max=${AN(this.max)}
|
1023
1023
|
step=${AN(this.step)}
|
1024
|
-
.value=${
|
1024
|
+
.value=${lN(this.value)}
|
1025
1025
|
autocapitalize=${AN(this.autocapitalize)}
|
1026
1026
|
autocomplete=${AN(this.autocomplete)}
|
1027
1027
|
autocorrect=${AN(this.autocorrect)}
|
@@ -1039,7 +1039,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1039
1039
|
@blur=${this.handleBlur}
|
1040
1040
|
/>
|
1041
1041
|
|
1042
|
-
${
|
1042
|
+
${j?cM`
|
1043
1043
|
<button
|
1044
1044
|
part="clear-button"
|
1045
1045
|
class="input__clear"
|
@@ -1089,24 +1089,24 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1089
1089
|
part="form-control-help-text"
|
1090
1090
|
id="help-text"
|
1091
1091
|
class="form-control__help-text"
|
1092
|
-
aria-hidden=${
|
1092
|
+
aria-hidden=${i?"false":"true"}
|
1093
1093
|
>
|
1094
1094
|
${this.helpText}
|
1095
1095
|
</slot>
|
1096
|
-
${
|
1096
|
+
${I?cM`
|
1097
1097
|
<slot
|
1098
1098
|
name="error-message"
|
1099
1099
|
part="form-control-error-message"
|
1100
1100
|
id="error-message"
|
1101
1101
|
class="form-control__error-message"
|
1102
|
-
aria-hidden=${
|
1102
|
+
aria-hidden=${I?"false":"true"}
|
1103
1103
|
>
|
1104
1104
|
${this.errorMessage}
|
1105
1105
|
</slot>
|
1106
1106
|
`:""}
|
1107
1107
|
</div>
|
1108
1108
|
</div>
|
1109
|
-
`}},M.NileInput.styles=cN,N([vM(".input__control")],M.NileInput.prototype,"input",void 0),N([VM()],M.NileInput.prototype,"hasFocus",void 0),N([WM()],M.NileInput.prototype,"title",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"type",void 0),N([WM()],M.NileInput.prototype,"name",void 0),N([WM()],M.NileInput.prototype,"value",void 0),N([sN()],M.NileInput.prototype,"defaultValue",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"filled",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"error",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"success",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"pill",void 0),N([WM()],M.NileInput.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileInput.prototype,"helpText",void 0),N([WM({attribute:"error-message"})],M.NileInput.prototype,"errorMessage",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"clearable",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"disabled",void 0),N([WM()],M.NileInput.prototype,"placeholder",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"readonly",void 0),N([WM({attribute:"password-toggle",type:Boolean})],M.NileInput.prototype,"passwordToggle",void 0),N([WM({attribute:"password-visible",type:Boolean})],M.NileInput.prototype,"passwordVisible",void 0),N([WM({attribute:"no-spin-buttons",type:Boolean})],M.NileInput.prototype,"noSpinButtons",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"required",void 0),N([WM()],M.NileInput.prototype,"pattern",void 0),N([WM({type:Number})],M.NileInput.prototype,"minlength",void 0),N([WM({type:Number})],M.NileInput.prototype,"maxlength",void 0),N([WM()],M.NileInput.prototype,"min",void 0),N([WM()],M.NileInput.prototype,"max",void 0),N([WM()],M.NileInput.prototype,"step",void 0),N([WM()],M.NileInput.prototype,"autocapitalize",void 0),N([WM()],M.NileInput.prototype,"autocorrect",void 0),N([WM()],M.NileInput.prototype,"autocomplete",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"autofocus",void 0),N([WM()],M.NileInput.prototype,"enterkeyhint",void 0),N([WM({type:Boolean,converter:{fromAttribute:M=>!(!M||"false"===M),toAttribute:M=>M?"true":"false"}})],M.NileInput.prototype,"spellcheck",void 0),N([WM()],M.NileInput.prototype,"inputmode",void 0),N([
|
1109
|
+
`}},M.NileInput.styles=cN,N([vM(".input__control")],M.NileInput.prototype,"input",void 0),N([VM()],M.NileInput.prototype,"hasFocus",void 0),N([WM()],M.NileInput.prototype,"title",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"type",void 0),N([WM()],M.NileInput.prototype,"name",void 0),N([WM()],M.NileInput.prototype,"value",void 0),N([sN()],M.NileInput.prototype,"defaultValue",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"filled",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"error",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"success",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"pill",void 0),N([WM()],M.NileInput.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileInput.prototype,"helpText",void 0),N([WM({attribute:"error-message"})],M.NileInput.prototype,"errorMessage",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"clearable",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"disabled",void 0),N([WM()],M.NileInput.prototype,"placeholder",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"readonly",void 0),N([WM({attribute:"password-toggle",type:Boolean})],M.NileInput.prototype,"passwordToggle",void 0),N([WM({attribute:"password-visible",type:Boolean})],M.NileInput.prototype,"passwordVisible",void 0),N([WM({attribute:"no-spin-buttons",type:Boolean})],M.NileInput.prototype,"noSpinButtons",void 0),N([WM({reflect:!0})],M.NileInput.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileInput.prototype,"required",void 0),N([WM()],M.NileInput.prototype,"pattern",void 0),N([WM({type:Number})],M.NileInput.prototype,"minlength",void 0),N([WM({type:Number})],M.NileInput.prototype,"maxlength",void 0),N([WM()],M.NileInput.prototype,"min",void 0),N([WM()],M.NileInput.prototype,"max",void 0),N([WM()],M.NileInput.prototype,"step",void 0),N([WM()],M.NileInput.prototype,"autocapitalize",void 0),N([WM()],M.NileInput.prototype,"autocorrect",void 0),N([WM()],M.NileInput.prototype,"autocomplete",void 0),N([WM({type:Boolean})],M.NileInput.prototype,"autofocus",void 0),N([WM()],M.NileInput.prototype,"enterkeyhint",void 0),N([WM({type:Boolean,converter:{fromAttribute:M=>!(!M||"false"===M),toAttribute:M=>M?"true":"false"}})],M.NileInput.prototype,"spellcheck",void 0),N([WM()],M.NileInput.prototype,"inputmode",void 0),N([tN("disabled",{waitUntilFirstUpdate:!0})],M.NileInput.prototype,"handleDisabledChange",null),N([tN("step",{waitUntilFirstUpdate:!0})],M.NileInput.prototype,"handleStepChange",null),N([tN("value",{waitUntilFirstUpdate:!0})],M.NileInput.prototype,"handleValueChange",null),M.NileInput=N([mM("nile-input")],M.NileInput),M.NileSidebar=class extends ZM{constructor(){super(...arguments),this.title="",this.showSidebar=!1}get buttonClassMap(){return{"nds-menu--active":this.showSidebar}}render(){return cM`
|
1110
1110
|
<div class="nile-menu--wrapper ${XM(this.buttonClassMap)}" >
|
1111
1111
|
<div class="nile-menu-group">
|
1112
1112
|
<a class="nile-logo" href="/">
|
@@ -1177,7 +1177,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1177
1177
|
.nds-menu--active .nile-logo {
|
1178
1178
|
display: none;
|
1179
1179
|
}
|
1180
|
-
`,N([WM()],M.NileSidebar.prototype,"title",void 0),N([WM()],M.NileSidebar.prototype,"showSidebar",void 0),M.NileSidebar=N([mM("nile-sidebar")],M.NileSidebar);const
|
1180
|
+
`,N([WM()],M.NileSidebar.prototype,"title",void 0),N([WM()],M.NileSidebar.prototype,"showSidebar",void 0),M.NileSidebar=N([mM("nile-sidebar")],M.NileSidebar);const wN=u`
|
1181
1181
|
:host {
|
1182
1182
|
display: block;
|
1183
1183
|
position: relative;
|
@@ -1192,14 +1192,14 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1192
1192
|
::slotted(nile-divider) {
|
1193
1193
|
--spacing: 0.5rem;
|
1194
1194
|
}
|
1195
|
-
`;M.NileMenu=class extends xN{connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(M){const N=M.target.closest("nile-menu-item");N&&!N.disabled&&("checkbox"===N.type&&(N.checked=!N.checked),this.emit("nile-select",{value:N.value}))}handleKeyDown(M){if("Enter"===M.key){const N=this.getCurrentItem();M.preventDefault(),N?.click()}if(" "===M.key&&M.preventDefault(),["ArrowDown","ArrowUp","Home","End"].includes(M.key)){const N=this.getAllItems(),D=this.getCurrentItem();let
|
1195
|
+
`;M.NileMenu=class extends xN{connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(M){const N=M.target.closest("nile-menu-item");N&&!N.disabled&&("checkbox"===N.type&&(N.checked=!N.checked),this.emit("nile-select",{value:N.value}))}handleKeyDown(M){if("Enter"===M.key){const N=this.getCurrentItem();M.preventDefault(),N?.click()}if(" "===M.key&&M.preventDefault(),["ArrowDown","ArrowUp","Home","End"].includes(M.key)){const N=this.getAllItems(),D=this.getCurrentItem();let i=D?N.indexOf(D):0;N.length>0&&(M.preventDefault(),"ArrowDown"===M.key?i++:"ArrowUp"===M.key?i--:"Home"===M.key?i=0:"End"===M.key&&(i=N.length-1),i<0&&(i=N.length-1),i>N.length-1&&(i=0),this.setCurrentItem(N[i]),N[i].focus())}}handleMouseDown(M){const N=M.target;this.isMenuItem(N)&&this.setCurrentItem(N)}handleSlotChange(){const M=this.getAllItems();M.length>0&&this.setCurrentItem(M[0])}isMenuItem(M){return"nile-menu-item"===M.tagName.toLowerCase()||["menuitem","menuitemcheckbox","menuitemradio"].includes(M.getAttribute("role")??"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter((M=>!!this.isMenuItem(M)))}getCurrentItem(){return this.getAllItems().find((M=>"0"===M.getAttribute("tabindex")))}setCurrentItem(M){this.getAllItems().forEach((N=>{N.setAttribute("tabindex",N===M?"0":"-1")}))}render(){return cM`
|
1196
1196
|
<slot
|
1197
1197
|
@slotchange=${this.handleSlotChange}
|
1198
1198
|
@click=${this.handleClick}
|
1199
1199
|
@keydown=${this.handleKeyDown}
|
1200
1200
|
@mousedown=${this.handleMouseDown}
|
1201
1201
|
></slot>
|
1202
|
-
`}},M.NileMenu.styles=
|
1202
|
+
`}},M.NileMenu.styles=wN,N([vM("slot")],M.NileMenu.prototype,"defaultSlot",void 0),M.NileMenu=N([mM("nile-menu")],M.NileMenu),M.NileBadge=class extends ZM{constructor(){super(...arguments),this.name=0,this.icon="",this.active=!1,this.href="/"}get buttonClassMap(){return{"nds-badge--active":this.active}}_hasSlotContent(M){const N=this.querySelector(`slot[name=${M}]`);console.log(N,"slot")}render(){return cM`
|
1203
1203
|
<a class="nds-badge ${XM(this.buttonClassMap)}">
|
1204
1204
|
<span class="nds-badge__link">${this.name}</span>
|
1205
1205
|
</a>
|
@@ -1380,7 +1380,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1380
1380
|
.nds-drawer--closed {
|
1381
1381
|
display: none;
|
1382
1382
|
}
|
1383
|
-
`,N([WM({type:Boolean,reflect:!0})],M.NileDrawer.prototype,"open",void 0),N([VM()],M.NileDrawer.prototype,"domExistence",void 0),M.NileDrawer=N([mM("nile-drawer")],M.NileDrawer);const
|
1383
|
+
`,N([WM({type:Boolean,reflect:!0})],M.NileDrawer.prototype,"open",void 0),N([VM()],M.NileDrawer.prototype,"domExistence",void 0),M.NileDrawer=N([mM("nile-drawer")],M.NileDrawer);const EN=u`
|
1384
1384
|
:host {
|
1385
1385
|
display: inline-block;
|
1386
1386
|
}
|
@@ -1497,8 +1497,8 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1497
1497
|
title=${this.title}
|
1498
1498
|
name=${this.name}
|
1499
1499
|
value=${AN(this.value)}
|
1500
|
-
.indeterminate=${
|
1501
|
-
.checked=${
|
1500
|
+
.indeterminate=${lN(this.indeterminate)}
|
1501
|
+
.checked=${lN(this.checked)}
|
1502
1502
|
.disabled=${this.disabled}
|
1503
1503
|
.required=${this.required}
|
1504
1504
|
aria-checked=${this.checked?"true":"false"}
|
@@ -1539,7 +1539,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1539
1539
|
<slot></slot>
|
1540
1540
|
</div>
|
1541
1541
|
</label>
|
1542
|
-
`}},M.NileCheckbox.styles=
|
1542
|
+
`}},M.NileCheckbox.styles=EN,N([vM('input[type="checkbox"]')],M.NileCheckbox.prototype,"input",void 0),N([VM()],M.NileCheckbox.prototype,"hasFocus",void 0),N([WM()],M.NileCheckbox.prototype,"title",void 0),N([WM()],M.NileCheckbox.prototype,"name",void 0),N([WM()],M.NileCheckbox.prototype,"value",void 0),N([WM({reflect:!0})],M.NileCheckbox.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"disabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"checked",void 0),N([WM({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"label",void 0),N([WM({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"indeterminate",void 0),N([sN("checked")],M.NileCheckbox.prototype,"defaultChecked",void 0),N([WM({reflect:!0})],M.NileCheckbox.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileCheckbox.prototype,"required",void 0),N([tN(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],M.NileCheckbox.prototype,"handleStateChange",null),M.NileCheckbox=N([mM("nile-checkbox")],M.NileCheckbox);const aN=u`
|
1543
1543
|
|
1544
1544
|
|
1545
1545
|
:host {
|
@@ -1661,7 +1661,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1661
1661
|
|
1662
1662
|
<slot part="label" class="radio__label"></slot>
|
1663
1663
|
</span>
|
1664
|
-
`}},M.NileRadio.styles=
|
1664
|
+
`}},M.NileRadio.styles=aN,N([VM()],M.NileRadio.prototype,"checked",void 0),N([VM()],M.NileRadio.prototype,"hasFocus",void 0),N([WM()],M.NileRadio.prototype,"value",void 0),N([WM({reflect:!0})],M.NileRadio.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadio.prototype,"disabled",void 0),N([tN("checked")],M.NileRadio.prototype,"handleCheckedChange",null),N([tN("disabled",{waitUntilFirstUpdate:!0})],M.NileRadio.prototype,"handleDisabledChange",null),M.NileRadio=N([mM("nile-radio")],M.NileRadio);var SN=u`
|
1665
1665
|
|
1666
1666
|
:host {
|
1667
1667
|
display: block;
|
@@ -1698,7 +1698,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1698
1698
|
white-space: nowrap;
|
1699
1699
|
border: 0;
|
1700
1700
|
}
|
1701
|
-
`;function oN(M){return M.split("-")[1]}function
|
1701
|
+
`;function oN(M){return M.split("-")[1]}function ON(M){return"y"===M?"height":"width"}function nN(M){return M.split("-")[0]}function dN(M){return["top","bottom"].includes(nN(M))?"x":"y"}function CN(M,N,D){let{reference:i,floating:I}=M;const j=i.x+i.width/2-I.width/2,g=i.y+i.height/2-I.height/2,u=dN(N),L=ON(u),T=i[L]/2-I[L]/2,z="x"===u;let A;switch(nN(N)){case"top":A={x:j,y:i.y-I.height};break;case"bottom":A={x:j,y:i.y+i.height};break;case"right":A={x:i.x+i.width,y:g};break;case"left":A={x:i.x-I.width,y:g};break;default:A={x:i.x,y:i.y}}switch(oN(N)){case"start":A[u]-=T*(D&&z?-1:1);break;case"end":A[u]+=T*(D&&z?-1:1)}return A}M.NileRadioGroup=class extends xN{constructor(){super(...arguments),this.hasSlotController=new jN(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.errorMessage="",this.defaultValue="",this.label="",this.helpText="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState()}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(M){const N=M.target.closest("nile-radio"),D=this.getAllRadios(),i=this.value;N.disabled||this.disabled||(this.value=N.value,D.forEach((M=>M.checked=M===N)),this.value!==i&&(this.emit("change",{value:this.value}),this.emit("input")))}handleDisabledChange(){this.getAllRadios().forEach((M=>{M.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((M=>{M.disabled=M.hasAttribute("disabled")?M.disabled:this.disabled}))}handleKeyDown(M){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(M.key))return;const N=this.getAllRadios().filter((M=>!M.disabled)),D=N.find((M=>M.checked))??N[0],i=" "===M.key?0:["ArrowUp","ArrowLeft"].includes(M.key)?-1:1,I=this.value;let j=N.indexOf(D)+i;j<0&&(j=N.length-1),j>N.length-1&&(j=0),this.getAllRadios().forEach((M=>{M.checked=!1,this.hasButtonGroup||(M.tabIndex=-1)})),this.value=N[j].value,N[j].checked=!0,this.hasButtonGroup?N[j].shadowRoot.querySelector("button").focus():(N[j].tabIndex=0,N[j].focus()),this.value!==I&&(this.emit("change"),this.emit("input")),M.preventDefault()}handleLabelClick(){const M=this.getAllRadios(),N=M.find((M=>M.checked)),D=N||M[0];D&&D.focus()}handleSlotChange(){const M=this.getAllRadios();if(M.forEach((M=>M.checked=M.value===this.value)),this.hasButtonGroup=M.some((M=>"nile-radio-button"===M.tagName.toLowerCase())),!M.some((M=>M.checked)))if(this.hasButtonGroup){M[0].shadowRoot.querySelector("button").tabIndex=0}else M[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group")}updateCheckedRadio(){this.getAllRadios().forEach((M=>M.checked=M.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const M=this.hasSlotController.test("label"),N=this.hasSlotController.test("help-text"),D=!!this.label||!!M,i=!!this.helpText||!!N,I=cM`
|
1702
1702
|
<slot
|
1703
1703
|
@click=${this.handleRadioClick}
|
1704
1704
|
@keydown=${this.handleKeyDown}
|
@@ -1708,7 +1708,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1708
1708
|
`;return cM`
|
1709
1709
|
<fieldset
|
1710
1710
|
part="form-control"
|
1711
|
-
class=${XM({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":D,"form-control--has-help-text":
|
1711
|
+
class=${XM({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":D,"form-control--has-help-text":i})}
|
1712
1712
|
role="radiogroup"
|
1713
1713
|
aria-labelledby="label"
|
1714
1714
|
aria-describedby="help-text"
|
@@ -1739,9 +1739,9 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1739
1739
|
</div>
|
1740
1740
|
|
1741
1741
|
${this.hasButtonGroup?cM`
|
1742
|
-
${
|
1742
|
+
${I}
|
1743
1743
|
`:cM`
|
1744
|
-
<div class="${this.labelInline?"form-control--inline-radio":""}"> ${
|
1744
|
+
<div class="${this.labelInline?"form-control--inline-radio":""}"> ${I}</div> `}
|
1745
1745
|
</div>
|
1746
1746
|
|
1747
1747
|
<slot
|
@@ -1749,12 +1749,12 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1749
1749
|
part="form-control-help-text"
|
1750
1750
|
id="help-text"
|
1751
1751
|
class="form-control__help-text"
|
1752
|
-
aria-hidden=${
|
1752
|
+
aria-hidden=${i?"false":"true"}
|
1753
1753
|
>
|
1754
1754
|
${this.helpText}
|
1755
1755
|
</slot>
|
1756
1756
|
</fieldset>
|
1757
|
-
`}},M.NileRadioGroup.styles=ON,N([vM("slot:not([name])")],M.NileRadioGroup.prototype,"defaultSlot",void 0),N([VM()],M.NileRadioGroup.prototype,"hasButtonGroup",void 0),N([VM()],M.NileRadioGroup.prototype,"errorMessage",void 0),N([VM()],M.NileRadioGroup.prototype,"defaultValue",void 0),N([WM()],M.NileRadioGroup.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileRadioGroup.prototype,"helpText",void 0),N([WM()],M.NileRadioGroup.prototype,"name",void 0),N([WM({reflect:!0})],M.NileRadioGroup.prototype,"value",void 0),N([WM({reflect:!0})],M.NileRadioGroup.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"required",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"labelInline",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"disabled",void 0),N([yN("disabled",{waitUntilFirstUpdate:!0})],M.NileRadioGroup.prototype,"handleDisabledChange",null),N([yN("value")],M.NileRadioGroup.prototype,"handleValueChange",null),M.NileRadioGroup=N([mM("nile-radio-group")],M.NileRadioGroup);function UN(M){return"number"!=typeof M?function(M){return{top:0,right:0,bottom:0,left:0,...M}}(M):{top:M,right:M,bottom:M,left:M}}function QN(M){return{...M,top:M.y,left:M.x,right:M.x+M.width,bottom:M.y+M.height}}async function rN(M,N){var D;void 0===N&&(N={});const{x:I,y:j,platform:i,rects:g,elements:u,strategy:L}=M,{boundary:T="clippingAncestors",rootBoundary:z="viewport",elementContext:A="floating",altBoundary:y=!1,padding:t=0}=N,x=UN(t),c=u[y?"floating"===A?"reference":"floating":A],s=QN(await i.getClippingRect({element:null==(D=await(null==i.isElement?void 0:i.isElement(c)))||D?c:c.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:T,rootBoundary:z,strategy:L})),e="floating"===A?{...g.floating,x:I,y:j}:g.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),E=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},l=QN(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:e,offsetParent:w,strategy:L}):e);return{top:(s.top-l.top+x.top)/E.y,bottom:(l.bottom-s.bottom+x.bottom)/E.y,left:(s.left-l.left+x.left)/E.x,right:(l.right-s.right+x.right)/E.x}}const kN=Math.min,YN=Math.max;function hN(M,N,D){return YN(M,kN(N,D))}const ZN={left:"right",right:"left",bottom:"top",top:"bottom"};function bN(M){return M.replace(/left|right|bottom|top/g,(M=>ZN[M]))}const mN={start:"end",end:"start"};function pN(M){return M.replace(/start|end/g,(M=>mN[M]))}const WN=function(M){return void 0===M&&(M={}),{name:"flip",options:M,async fn(N){var D;const{placement:I,middlewareData:j,rects:i,initialPlacement:g,platform:u,elements:L}=N,{mainAxis:T=!0,crossAxis:z=!0,fallbackPlacements:A,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:t="none",flipAlignment:x=!0,...c}=M,s=nN(I),e=nN(g)===g,w=await(null==u.isRTL?void 0:u.isRTL(L.floating)),E=A||(e||!x?[bN(g)]:function(M){const N=bN(M);return[pN(M),N,pN(N)]}(g));A||"none"===t||E.push(...function(M,N,D,I){const j=oN(M);let i=function(M,N,D){const I=["left","right"],j=["right","left"],i=["top","bottom"],g=["bottom","top"];switch(M){case"top":case"bottom":return D?N?j:I:N?I:j;case"left":case"right":return N?i:g;default:return[]}}(nN(M),"start"===D,I);return j&&(i=i.map((M=>M+"-"+j)),N&&(i=i.concat(i.map(pN)))),i}(g,x,t,w));const l=[g,...E],S=await rN(N,c),O=[];let o=(null==(D=j.flip)?void 0:D.overflows)||[];if(T&&O.push(S[s]),z){const{main:M,cross:N}=function(M,N,D){void 0===D&&(D=!1);const I=oN(M),j=dN(M),i=aN(j);let g="x"===j?I===(D?"end":"start")?"right":"left":"start"===I?"bottom":"top";return N.reference[i]>N.floating[i]&&(g=bN(g)),{main:g,cross:bN(g)}}(I,i,w);O.push(S[M],S[N])}if(o=[...o,{placement:I,overflows:O}],!O.every((M=>M<=0))){var a,n;const M=((null==(a=j.flip)?void 0:a.index)||0)+1,N=l[M];if(N)return{data:{index:M,overflows:o},reset:{placement:N}};let D=null==(n=o.filter((M=>M.overflows[0]<=0)).sort(((M,N)=>M.overflows[1]-N.overflows[1]))[0])?void 0:n.placement;if(!D)switch(y){case"bestFit":{var d;const M=null==(d=o.map((M=>[M.placement,M.overflows.filter((M=>M>0)).reduce(((M,N)=>M+N),0)])).sort(((M,N)=>M[1]-N[1]))[0])?void 0:d[0];M&&(D=M);break}case"initialPlacement":D=g}if(I!==D)return{reset:{placement:D}}}return{}}}};const VN=function(M){return void 0===M&&(M=0),{name:"offset",options:M,async fn(N){const{x:D,y:I}=N,j=await async function(M,N){const{placement:D,platform:I,elements:j}=M,i=await(null==I.isRTL?void 0:I.isRTL(j.floating)),g=nN(D),u=oN(D),L="x"===dN(D),T=["left","top"].includes(g)?-1:1,z=i&&L?-1:1,A="function"==typeof N?N(M):N;let{mainAxis:y,crossAxis:t,alignmentAxis:x}="number"==typeof A?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...A};return u&&"number"==typeof x&&(t="end"===u?-1*x:x),L?{x:t*z,y:y*T}:{x:y*T,y:t*z}}(N,M);return{x:D+j.x,y:I+j.y,data:j}}}};const vN=function(M){return void 0===M&&(M={}),{name:"size",options:M,async fn(N){const{placement:D,rects:I,platform:j,elements:i}=N,{apply:g=(()=>{}),...u}=M,L=await rN(N,u),T=nN(D),z=oN(D),A="x"===dN(D),{width:y,height:t}=I.floating;let x,c;"top"===T||"bottom"===T?(x=T,c=z===(await(null==j.isRTL?void 0:j.isRTL(i.floating))?"start":"end")?"left":"right"):(c=T,x="end"===z?"top":"bottom");const s=t-L[x],e=y-L[c],w=!N.middlewareData.shift;let E=s,l=e;if(A){const M=y-L.left-L.right;l=z||w?kN(e,M):M}else{const M=t-L.top-L.bottom;E=z||w?kN(s,M):M}if(w&&!z){const M=YN(L.left,0),N=YN(L.right,0),D=YN(L.top,0),I=YN(L.bottom,0);A?l=y-2*(0!==M||0!==N?M+N:YN(L.left,L.right)):E=t-2*(0!==D||0!==I?D+I:YN(L.top,L.bottom))}await g({...N,availableWidth:l,availableHeight:E});const S=await j.getDimensions(i.floating);return y!==S.width||t!==S.height?{reset:{rects:!0}}:{}}}};function GN(M){var N;return(null==(N=M.ownerDocument)?void 0:N.defaultView)||window}function BN(M){return GN(M).getComputedStyle(M)}function PN(M){return M instanceof GN(M).Node}function RN(M){return PN(M)?(M.nodeName||"").toLowerCase():""}let FN;function HN(){if(FN)return FN;const M=navigator.userAgentData;return M&&Array.isArray(M.brands)?(FN=M.brands.map((M=>M.brand+"/"+M.version)).join(" "),FN):navigator.userAgent}function JN(M){return M instanceof GN(M).HTMLElement}function XN(M){return M instanceof GN(M).Element}function fN(M){if("undefined"==typeof ShadowRoot)return!1;return M instanceof GN(M).ShadowRoot||M instanceof ShadowRoot}function _N(M){const{overflow:N,overflowX:D,overflowY:I,display:j}=BN(M);return/auto|scroll|overlay|hidden|clip/.test(N+I+D)&&!["inline","contents"].includes(j)}function $N(M){return["table","td","th"].includes(RN(M))}function KN(M){const N=/firefox/i.test(HN()),D=BN(M),I=D.backdropFilter||D.WebkitBackdropFilter;return"none"!==D.transform||"none"!==D.perspective||!!I&&"none"!==I||N&&"filter"===D.willChange||N&&!!D.filter&&"none"!==D.filter||["transform","perspective"].some((M=>D.willChange.includes(M)))||["paint","layout","strict","content"].some((M=>{const N=D.contain;return null!=N&&N.includes(M)}))}function qN(){return/^((?!chrome|android).)*safari/i.test(HN())}function MD(M){return["html","body","#document"].includes(RN(M))}const ND=Math.min,DD=Math.max,ID=Math.round;function jD(M){const N=BN(M);let D=parseFloat(N.width),I=parseFloat(N.height);const j=JN(M),i=j?M.offsetWidth:D,g=j?M.offsetHeight:I,u=ID(D)!==i||ID(I)!==g;return u&&(D=i,I=g),{width:D,height:I,fallback:u}}function iD(M){return XN(M)?M:M.contextElement}const gD={x:1,y:1};function uD(M){const N=iD(M);if(!JN(N))return gD;const D=N.getBoundingClientRect(),{width:I,height:j,fallback:i}=jD(N);let g=(i?ID(D.width):D.width)/I,u=(i?ID(D.height):D.height)/j;return g&&Number.isFinite(g)||(g=1),u&&Number.isFinite(u)||(u=1),{x:g,y:u}}function LD(M,N,D,I){var j,i;void 0===N&&(N=!1),void 0===D&&(D=!1);const g=M.getBoundingClientRect(),u=iD(M);let L=gD;N&&(I?XN(I)&&(L=uD(I)):L=uD(M));const T=u?GN(u):window,z=qN()&&D;let A=(g.left+(z&&(null==(j=T.visualViewport)?void 0:j.offsetLeft)||0))/L.x,y=(g.top+(z&&(null==(i=T.visualViewport)?void 0:i.offsetTop)||0))/L.y,t=g.width/L.x,x=g.height/L.y;if(u){const M=GN(u),N=I&&XN(I)?GN(I):I;let D=M.frameElement;for(;D&&I&&N!==M;){const M=uD(D),N=D.getBoundingClientRect(),I=getComputedStyle(D);N.x+=(D.clientLeft+parseFloat(I.paddingLeft))*M.x,N.y+=(D.clientTop+parseFloat(I.paddingTop))*M.y,A*=M.x,y*=M.y,t*=M.x,x*=M.y,A+=N.x,y+=N.y,D=GN(D).frameElement}}return QN({width:t,height:x,x:A,y})}function TD(M){return((PN(M)?M.ownerDocument:M.document)||window.document).documentElement}function zD(M){return XN(M)?{scrollLeft:M.scrollLeft,scrollTop:M.scrollTop}:{scrollLeft:M.pageXOffset,scrollTop:M.pageYOffset}}function AD(M){return LD(TD(M)).left+zD(M).scrollLeft}function yD(M){if("html"===RN(M))return M;const N=M.assignedSlot||M.parentNode||fN(M)&&M.host||TD(M);return fN(N)?N.host:N}function tD(M){const N=yD(M);return MD(N)?N.ownerDocument.body:JN(N)&&_N(N)?N:tD(N)}function xD(M,N){var D;void 0===N&&(N=[]);const I=tD(M),j=I===(null==(D=M.ownerDocument)?void 0:D.body),i=GN(I);return j?N.concat(i,i.visualViewport||[],_N(I)?I:[]):N.concat(I,xD(I))}function cD(M,N,D){let I;if("viewport"===N)I=function(M,N){const D=GN(M),I=TD(M),j=D.visualViewport;let i=I.clientWidth,g=I.clientHeight,u=0,L=0;if(j){i=j.width,g=j.height;const M=qN();(!M||M&&"fixed"===N)&&(u=j.offsetLeft,L=j.offsetTop)}return{width:i,height:g,x:u,y:L}}(M,D);else if("document"===N)I=function(M){const N=TD(M),D=zD(M),I=M.ownerDocument.body,j=DD(N.scrollWidth,N.clientWidth,I.scrollWidth,I.clientWidth),i=DD(N.scrollHeight,N.clientHeight,I.scrollHeight,I.clientHeight);let g=-D.scrollLeft+AD(M);const u=-D.scrollTop;return"rtl"===BN(I).direction&&(g+=DD(N.clientWidth,I.clientWidth)-j),{width:j,height:i,x:g,y:u}}(TD(M));else if(XN(N))I=function(M,N){const D=LD(M,!0,"fixed"===N),I=D.top+M.clientTop,j=D.left+M.clientLeft,i=JN(M)?uD(M):{x:1,y:1};return{width:M.clientWidth*i.x,height:M.clientHeight*i.y,x:j*i.x,y:I*i.y}}(N,D);else{const D={...N};if(qN()){var j,i;const N=GN(M);D.x-=(null==(j=N.visualViewport)?void 0:j.offsetLeft)||0,D.y-=(null==(i=N.visualViewport)?void 0:i.offsetTop)||0}I=D}return QN(I)}function sD(M,N){return JN(M)&&"fixed"!==BN(M).position?N?N(M):M.offsetParent:null}function eD(M,N){const D=GN(M);if(!JN(M))return D;let I=sD(M,N);for(;I&&$N(I)&&"static"===BN(I).position;)I=sD(I,N);return I&&("html"===RN(I)||"body"===RN(I)&&"static"===BN(I).position&&!KN(I))?D:I||function(M){let N=yD(M);for(;JN(N)&&!MD(N);){if(KN(N))return N;N=yD(N)}return null}(M)||D}function wD(M,N,D){const I=JN(N),j=TD(N),i=LD(M,!0,"fixed"===D,N);let g={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(I||!I&&"fixed"!==D)if(("body"!==RN(N)||_N(j))&&(g=zD(N)),JN(N)){const M=LD(N,!0);u.x=M.x+N.clientLeft,u.y=M.y+N.clientTop}else j&&(u.x=AD(j));return{x:i.left+g.scrollLeft-u.x,y:i.top+g.scrollTop-u.y,width:i.width,height:i.height}}const ED={getClippingRect:function(M){let{element:N,boundary:D,rootBoundary:I,strategy:j}=M;const i=[..."clippingAncestors"===D?function(M,N){const D=N.get(M);if(D)return D;let I=xD(M).filter((M=>XN(M)&&"body"!==RN(M))),j=null;const i="fixed"===BN(M).position;let g=i?yD(M):M;for(;XN(g)&&!MD(g);){const M=BN(g),N=KN(g);"fixed"===M.position&&(j=null),(i?N||j:N||"static"!==M.position||!j||!["absolute","fixed"].includes(j.position))?j=M:I=I.filter((M=>M!==g)),g=yD(g)}return N.set(M,I),I}(N,this._c):[].concat(D),I],g=i[0],u=i.reduce(((M,D)=>{const I=cD(N,D,j);return M.top=DD(I.top,M.top),M.right=ND(I.right,M.right),M.bottom=ND(I.bottom,M.bottom),M.left=DD(I.left,M.left),M}),cD(N,g,j));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(M){let{rect:N,offsetParent:D,strategy:I}=M;const j=JN(D),i=TD(D);if(D===i)return N;let g={scrollLeft:0,scrollTop:0},u={x:1,y:1};const L={x:0,y:0};if((j||!j&&"fixed"!==I)&&(("body"!==RN(D)||_N(i))&&(g=zD(D)),JN(D))){const M=LD(D);u=uD(D),L.x=M.x+D.clientLeft,L.y=M.y+D.clientTop}return{width:N.width*u.x,height:N.height*u.y,x:N.x*u.x-g.scrollLeft*u.x+L.x,y:N.y*u.y-g.scrollTop*u.y+L.y}},isElement:XN,getDimensions:function(M){return jD(M)},getOffsetParent:eD,getDocumentElement:TD,getScale:uD,async getElementRects(M){let{reference:N,floating:D,strategy:I}=M;const j=this.getOffsetParent||eD,i=this.getDimensions;return{reference:wD(N,await j(D),I),floating:{x:0,y:0,...await i(D)}}},getClientRects:M=>Array.from(M.getClientRects()),isRTL:M=>"rtl"===BN(M).direction};const lD=(M,N,D)=>{const I=new Map,j={platform:ED,...D},i={...j.platform,_c:I};return(async(M,N,D)=>{const{placement:I="bottom",strategy:j="absolute",middleware:i=[],platform:g}=D,u=i.filter(Boolean),L=await(null==g.isRTL?void 0:g.isRTL(N));let T=await g.getElementRects({reference:M,floating:N,strategy:j}),{x:z,y:A}=CN(T,I,L),y=I,t={},x=0;for(let D=0;D<u.length;D++){const{name:i,fn:c}=u[D],{x:s,y:e,data:w,reset:E}=await c({x:z,y:A,initialPlacement:I,placement:y,strategy:j,middlewareData:t,rects:T,platform:g,elements:{reference:M,floating:N}});z=null!=s?s:z,A=null!=e?e:A,t={...t,[i]:{...t[i],...w}},E&&x<=50&&(x++,"object"==typeof E&&(E.placement&&(y=E.placement),E.rects&&(T=!0===E.rects?await g.getElementRects({reference:M,floating:N,strategy:j}):E.rects),({x:z,y:A}=CN(T,y,L))),D=-1)}return{x:z,y:A,placement:y,strategy:j,middlewareData:t}})(M,N,{...j,platform:i})};function SD(M){return function(M){for(let N=M;N;N=OD(N))if(N instanceof Element&&"none"===getComputedStyle(N).display)return null;for(let N=OD(M);N;N=OD(N)){if(!(N instanceof Element))continue;const M=getComputedStyle(N);if("contents"!==M.display){if("static"!==M.position||"none"!==M.filter)return N;if("BODY"===N.tagName)return N}}return null}(M)}function OD(M){return M.assignedSlot?M.assignedSlot:M.parentNode instanceof ShadowRoot?M.parentNode.host:M.parentNode}const oD=u`
|
1757
|
+
`}},M.NileRadioGroup.styles=SN,N([vM("slot:not([name])")],M.NileRadioGroup.prototype,"defaultSlot",void 0),N([VM()],M.NileRadioGroup.prototype,"hasButtonGroup",void 0),N([VM()],M.NileRadioGroup.prototype,"errorMessage",void 0),N([VM()],M.NileRadioGroup.prototype,"defaultValue",void 0),N([WM()],M.NileRadioGroup.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileRadioGroup.prototype,"helpText",void 0),N([WM()],M.NileRadioGroup.prototype,"name",void 0),N([WM({reflect:!0})],M.NileRadioGroup.prototype,"value",void 0),N([WM({reflect:!0})],M.NileRadioGroup.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"required",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"labelInline",void 0),N([WM({type:Boolean,reflect:!0})],M.NileRadioGroup.prototype,"disabled",void 0),N([tN("disabled",{waitUntilFirstUpdate:!0})],M.NileRadioGroup.prototype,"handleDisabledChange",null),N([tN("value")],M.NileRadioGroup.prototype,"handleValueChange",null),M.NileRadioGroup=N([mM("nile-radio-group")],M.NileRadioGroup);function rN(M){return"number"!=typeof M?function(M){return{top:0,right:0,bottom:0,left:0,...M}}(M):{top:M,right:M,bottom:M,left:M}}function UN(M){return{...M,top:M.y,left:M.x,right:M.x+M.width,bottom:M.y+M.height}}async function QN(M,N){var D;void 0===N&&(N={});const{x:i,y:I,platform:j,rects:g,elements:u,strategy:L}=M,{boundary:T="clippingAncestors",rootBoundary:z="viewport",elementContext:A="floating",altBoundary:t=!1,padding:y=0}=N,x=rN(y),c=u[t?"floating"===A?"reference":"floating":A],s=UN(await j.getClippingRect({element:null==(D=await(null==j.isElement?void 0:j.isElement(c)))||D?c:c.contextElement||await(null==j.getDocumentElement?void 0:j.getDocumentElement(u.floating)),boundary:T,rootBoundary:z,strategy:L})),e="floating"===A?{...g.floating,x:i,y:I}:g.reference,l=await(null==j.getOffsetParent?void 0:j.getOffsetParent(u.floating)),w=await(null==j.isElement?void 0:j.isElement(l))&&await(null==j.getScale?void 0:j.getScale(l))||{x:1,y:1},E=UN(j.convertOffsetParentRelativeRectToViewportRelativeRect?await j.convertOffsetParentRelativeRectToViewportRelativeRect({rect:e,offsetParent:l,strategy:L}):e);return{top:(s.top-E.top+x.top)/w.y,bottom:(E.bottom-s.bottom+x.bottom)/w.y,left:(s.left-E.left+x.left)/w.x,right:(E.right-s.right+x.right)/w.x}}const kN=Math.min,hN=Math.max;function YN(M,N,D){return hN(M,kN(N,D))}const ZN={left:"right",right:"left",bottom:"top",top:"bottom"};function bN(M){return M.replace(/left|right|bottom|top/g,(M=>ZN[M]))}const mN={start:"end",end:"start"};function pN(M){return M.replace(/start|end/g,(M=>mN[M]))}const WN=function(M){return void 0===M&&(M={}),{name:"flip",options:M,async fn(N){var D;const{placement:i,middlewareData:I,rects:j,initialPlacement:g,platform:u,elements:L}=N,{mainAxis:T=!0,crossAxis:z=!0,fallbackPlacements:A,fallbackStrategy:t="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...c}=M,s=nN(i),e=nN(g)===g,l=await(null==u.isRTL?void 0:u.isRTL(L.floating)),w=A||(e||!x?[bN(g)]:function(M){const N=bN(M);return[pN(M),N,pN(N)]}(g));A||"none"===y||w.push(...function(M,N,D,i){const I=oN(M);let j=function(M,N,D){const i=["left","right"],I=["right","left"],j=["top","bottom"],g=["bottom","top"];switch(M){case"top":case"bottom":return D?N?I:i:N?i:I;case"left":case"right":return N?j:g;default:return[]}}(nN(M),"start"===D,i);return I&&(j=j.map((M=>M+"-"+I)),N&&(j=j.concat(j.map(pN)))),j}(g,x,y,l));const E=[g,...w],a=await QN(N,c),S=[];let o=(null==(D=I.flip)?void 0:D.overflows)||[];if(T&&S.push(a[s]),z){const{main:M,cross:N}=function(M,N,D){void 0===D&&(D=!1);const i=oN(M),I=dN(M),j=ON(I);let g="x"===I?i===(D?"end":"start")?"right":"left":"start"===i?"bottom":"top";return N.reference[j]>N.floating[j]&&(g=bN(g)),{main:g,cross:bN(g)}}(i,j,l);S.push(a[M],a[N])}if(o=[...o,{placement:i,overflows:S}],!S.every((M=>M<=0))){var O,n;const M=((null==(O=I.flip)?void 0:O.index)||0)+1,N=E[M];if(N)return{data:{index:M,overflows:o},reset:{placement:N}};let D=null==(n=o.filter((M=>M.overflows[0]<=0)).sort(((M,N)=>M.overflows[1]-N.overflows[1]))[0])?void 0:n.placement;if(!D)switch(t){case"bestFit":{var d;const M=null==(d=o.map((M=>[M.placement,M.overflows.filter((M=>M>0)).reduce(((M,N)=>M+N),0)])).sort(((M,N)=>M[1]-N[1]))[0])?void 0:d[0];M&&(D=M);break}case"initialPlacement":D=g}if(i!==D)return{reset:{placement:D}}}return{}}}};const VN=function(M){return void 0===M&&(M=0),{name:"offset",options:M,async fn(N){const{x:D,y:i}=N,I=await async function(M,N){const{placement:D,platform:i,elements:I}=M,j=await(null==i.isRTL?void 0:i.isRTL(I.floating)),g=nN(D),u=oN(D),L="x"===dN(D),T=["left","top"].includes(g)?-1:1,z=j&&L?-1:1,A="function"==typeof N?N(M):N;let{mainAxis:t,crossAxis:y,alignmentAxis:x}="number"==typeof A?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...A};return u&&"number"==typeof x&&(y="end"===u?-1*x:x),L?{x:y*z,y:t*T}:{x:t*T,y:y*z}}(N,M);return{x:D+I.x,y:i+I.y,data:I}}}};const vN=function(M){return void 0===M&&(M={}),{name:"size",options:M,async fn(N){const{placement:D,rects:i,platform:I,elements:j}=N,{apply:g=(()=>{}),...u}=M,L=await QN(N,u),T=nN(D),z=oN(D),A="x"===dN(D),{width:t,height:y}=i.floating;let x,c;"top"===T||"bottom"===T?(x=T,c=z===(await(null==I.isRTL?void 0:I.isRTL(j.floating))?"start":"end")?"left":"right"):(c=T,x="end"===z?"top":"bottom");const s=y-L[x],e=t-L[c],l=!N.middlewareData.shift;let w=s,E=e;if(A){const M=t-L.left-L.right;E=z||l?kN(e,M):M}else{const M=y-L.top-L.bottom;w=z||l?kN(s,M):M}if(l&&!z){const M=hN(L.left,0),N=hN(L.right,0),D=hN(L.top,0),i=hN(L.bottom,0);A?E=t-2*(0!==M||0!==N?M+N:hN(L.left,L.right)):w=y-2*(0!==D||0!==i?D+i:hN(L.top,L.bottom))}await g({...N,availableWidth:E,availableHeight:w});const a=await I.getDimensions(j.floating);return t!==a.width||y!==a.height?{reset:{rects:!0}}:{}}}};function GN(M){var N;return(null==(N=M.ownerDocument)?void 0:N.defaultView)||window}function BN(M){return GN(M).getComputedStyle(M)}function PN(M){return M instanceof GN(M).Node}function RN(M){return PN(M)?(M.nodeName||"").toLowerCase():""}let FN;function HN(){if(FN)return FN;const M=navigator.userAgentData;return M&&Array.isArray(M.brands)?(FN=M.brands.map((M=>M.brand+"/"+M.version)).join(" "),FN):navigator.userAgent}function JN(M){return M instanceof GN(M).HTMLElement}function XN(M){return M instanceof GN(M).Element}function fN(M){if("undefined"==typeof ShadowRoot)return!1;return M instanceof GN(M).ShadowRoot||M instanceof ShadowRoot}function _N(M){const{overflow:N,overflowX:D,overflowY:i,display:I}=BN(M);return/auto|scroll|overlay|hidden|clip/.test(N+i+D)&&!["inline","contents"].includes(I)}function $N(M){return["table","td","th"].includes(RN(M))}function KN(M){const N=/firefox/i.test(HN()),D=BN(M),i=D.backdropFilter||D.WebkitBackdropFilter;return"none"!==D.transform||"none"!==D.perspective||!!i&&"none"!==i||N&&"filter"===D.willChange||N&&!!D.filter&&"none"!==D.filter||["transform","perspective"].some((M=>D.willChange.includes(M)))||["paint","layout","strict","content"].some((M=>{const N=D.contain;return null!=N&&N.includes(M)}))}function qN(){return/^((?!chrome|android).)*safari/i.test(HN())}function MD(M){return["html","body","#document"].includes(RN(M))}const ND=Math.min,DD=Math.max,iD=Math.round;function ID(M){const N=BN(M);let D=parseFloat(N.width),i=parseFloat(N.height);const I=JN(M),j=I?M.offsetWidth:D,g=I?M.offsetHeight:i,u=iD(D)!==j||iD(i)!==g;return u&&(D=j,i=g),{width:D,height:i,fallback:u}}function jD(M){return XN(M)?M:M.contextElement}const gD={x:1,y:1};function uD(M){const N=jD(M);if(!JN(N))return gD;const D=N.getBoundingClientRect(),{width:i,height:I,fallback:j}=ID(N);let g=(j?iD(D.width):D.width)/i,u=(j?iD(D.height):D.height)/I;return g&&Number.isFinite(g)||(g=1),u&&Number.isFinite(u)||(u=1),{x:g,y:u}}function LD(M,N,D,i){var I,j;void 0===N&&(N=!1),void 0===D&&(D=!1);const g=M.getBoundingClientRect(),u=jD(M);let L=gD;N&&(i?XN(i)&&(L=uD(i)):L=uD(M));const T=u?GN(u):window,z=qN()&&D;let A=(g.left+(z&&(null==(I=T.visualViewport)?void 0:I.offsetLeft)||0))/L.x,t=(g.top+(z&&(null==(j=T.visualViewport)?void 0:j.offsetTop)||0))/L.y,y=g.width/L.x,x=g.height/L.y;if(u){const M=GN(u),N=i&&XN(i)?GN(i):i;let D=M.frameElement;for(;D&&i&&N!==M;){const M=uD(D),N=D.getBoundingClientRect(),i=getComputedStyle(D);N.x+=(D.clientLeft+parseFloat(i.paddingLeft))*M.x,N.y+=(D.clientTop+parseFloat(i.paddingTop))*M.y,A*=M.x,t*=M.y,y*=M.x,x*=M.y,A+=N.x,t+=N.y,D=GN(D).frameElement}}return UN({width:y,height:x,x:A,y:t})}function TD(M){return((PN(M)?M.ownerDocument:M.document)||window.document).documentElement}function zD(M){return XN(M)?{scrollLeft:M.scrollLeft,scrollTop:M.scrollTop}:{scrollLeft:M.pageXOffset,scrollTop:M.pageYOffset}}function AD(M){return LD(TD(M)).left+zD(M).scrollLeft}function tD(M){if("html"===RN(M))return M;const N=M.assignedSlot||M.parentNode||fN(M)&&M.host||TD(M);return fN(N)?N.host:N}function yD(M){const N=tD(M);return MD(N)?N.ownerDocument.body:JN(N)&&_N(N)?N:yD(N)}function xD(M,N){var D;void 0===N&&(N=[]);const i=yD(M),I=i===(null==(D=M.ownerDocument)?void 0:D.body),j=GN(i);return I?N.concat(j,j.visualViewport||[],_N(i)?i:[]):N.concat(i,xD(i))}function cD(M,N,D){let i;if("viewport"===N)i=function(M,N){const D=GN(M),i=TD(M),I=D.visualViewport;let j=i.clientWidth,g=i.clientHeight,u=0,L=0;if(I){j=I.width,g=I.height;const M=qN();(!M||M&&"fixed"===N)&&(u=I.offsetLeft,L=I.offsetTop)}return{width:j,height:g,x:u,y:L}}(M,D);else if("document"===N)i=function(M){const N=TD(M),D=zD(M),i=M.ownerDocument.body,I=DD(N.scrollWidth,N.clientWidth,i.scrollWidth,i.clientWidth),j=DD(N.scrollHeight,N.clientHeight,i.scrollHeight,i.clientHeight);let g=-D.scrollLeft+AD(M);const u=-D.scrollTop;return"rtl"===BN(i).direction&&(g+=DD(N.clientWidth,i.clientWidth)-I),{width:I,height:j,x:g,y:u}}(TD(M));else if(XN(N))i=function(M,N){const D=LD(M,!0,"fixed"===N),i=D.top+M.clientTop,I=D.left+M.clientLeft,j=JN(M)?uD(M):{x:1,y:1};return{width:M.clientWidth*j.x,height:M.clientHeight*j.y,x:I*j.x,y:i*j.y}}(N,D);else{const D={...N};if(qN()){var I,j;const N=GN(M);D.x-=(null==(I=N.visualViewport)?void 0:I.offsetLeft)||0,D.y-=(null==(j=N.visualViewport)?void 0:j.offsetTop)||0}i=D}return UN(i)}function sD(M,N){return JN(M)&&"fixed"!==BN(M).position?N?N(M):M.offsetParent:null}function eD(M,N){const D=GN(M);if(!JN(M))return D;let i=sD(M,N);for(;i&&$N(i)&&"static"===BN(i).position;)i=sD(i,N);return i&&("html"===RN(i)||"body"===RN(i)&&"static"===BN(i).position&&!KN(i))?D:i||function(M){let N=tD(M);for(;JN(N)&&!MD(N);){if(KN(N))return N;N=tD(N)}return null}(M)||D}function lD(M,N,D){const i=JN(N),I=TD(N),j=LD(M,!0,"fixed"===D,N);let g={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(i||!i&&"fixed"!==D)if(("body"!==RN(N)||_N(I))&&(g=zD(N)),JN(N)){const M=LD(N,!0);u.x=M.x+N.clientLeft,u.y=M.y+N.clientTop}else I&&(u.x=AD(I));return{x:j.left+g.scrollLeft-u.x,y:j.top+g.scrollTop-u.y,width:j.width,height:j.height}}const wD={getClippingRect:function(M){let{element:N,boundary:D,rootBoundary:i,strategy:I}=M;const j=[..."clippingAncestors"===D?function(M,N){const D=N.get(M);if(D)return D;let i=xD(M).filter((M=>XN(M)&&"body"!==RN(M))),I=null;const j="fixed"===BN(M).position;let g=j?tD(M):M;for(;XN(g)&&!MD(g);){const M=BN(g),N=KN(g);"fixed"===M.position&&(I=null),(j?N||I:N||"static"!==M.position||!I||!["absolute","fixed"].includes(I.position))?I=M:i=i.filter((M=>M!==g)),g=tD(g)}return N.set(M,i),i}(N,this._c):[].concat(D),i],g=j[0],u=j.reduce(((M,D)=>{const i=cD(N,D,I);return M.top=DD(i.top,M.top),M.right=ND(i.right,M.right),M.bottom=ND(i.bottom,M.bottom),M.left=DD(i.left,M.left),M}),cD(N,g,I));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(M){let{rect:N,offsetParent:D,strategy:i}=M;const I=JN(D),j=TD(D);if(D===j)return N;let g={scrollLeft:0,scrollTop:0},u={x:1,y:1};const L={x:0,y:0};if((I||!I&&"fixed"!==i)&&(("body"!==RN(D)||_N(j))&&(g=zD(D)),JN(D))){const M=LD(D);u=uD(D),L.x=M.x+D.clientLeft,L.y=M.y+D.clientTop}return{width:N.width*u.x,height:N.height*u.y,x:N.x*u.x-g.scrollLeft*u.x+L.x,y:N.y*u.y-g.scrollTop*u.y+L.y}},isElement:XN,getDimensions:function(M){return ID(M)},getOffsetParent:eD,getDocumentElement:TD,getScale:uD,async getElementRects(M){let{reference:N,floating:D,strategy:i}=M;const I=this.getOffsetParent||eD,j=this.getDimensions;return{reference:lD(N,await I(D),i),floating:{x:0,y:0,...await j(D)}}},getClientRects:M=>Array.from(M.getClientRects()),isRTL:M=>"rtl"===BN(M).direction};const ED=(M,N,D)=>{const i=new Map,I={platform:wD,...D},j={...I.platform,_c:i};return(async(M,N,D)=>{const{placement:i="bottom",strategy:I="absolute",middleware:j=[],platform:g}=D,u=j.filter(Boolean),L=await(null==g.isRTL?void 0:g.isRTL(N));let T=await g.getElementRects({reference:M,floating:N,strategy:I}),{x:z,y:A}=CN(T,i,L),t=i,y={},x=0;for(let D=0;D<u.length;D++){const{name:j,fn:c}=u[D],{x:s,y:e,data:l,reset:w}=await c({x:z,y:A,initialPlacement:i,placement:t,strategy:I,middlewareData:y,rects:T,platform:g,elements:{reference:M,floating:N}});z=null!=s?s:z,A=null!=e?e:A,y={...y,[j]:{...y[j],...l}},w&&x<=50&&(x++,"object"==typeof w&&(w.placement&&(t=w.placement),w.rects&&(T=!0===w.rects?await g.getElementRects({reference:M,floating:N,strategy:I}):w.rects),({x:z,y:A}=CN(T,t,L))),D=-1)}return{x:z,y:A,placement:t,strategy:I,middlewareData:y}})(M,N,{...I,platform:j})};function aD(M){return function(M){for(let N=M;N;N=SD(N))if(N instanceof Element&&"none"===getComputedStyle(N).display)return null;for(let N=SD(M);N;N=SD(N)){if(!(N instanceof Element))continue;const M=getComputedStyle(N);if("contents"!==M.display){if("static"!==M.position||"none"!==M.filter)return N;if("BODY"===N.tagName)return N}}return null}(M)}function SD(M){return M.assignedSlot?M.assignedSlot:M.parentNode instanceof ShadowRoot?M.parentNode.host:M.parentNode}const oD=u`
|
1758
1758
|
|
1759
1759
|
:host {
|
1760
1760
|
--arrow-color: hsl(240 4.8% 95.9%);
|
@@ -1793,7 +1793,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1793
1793
|
background: var(--arrow-color);
|
1794
1794
|
z-index: -1;
|
1795
1795
|
}
|
1796
|
-
`;M.NilePopup=class extends xN{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(M){super.updated(M),M.has("active")&&(this.active?this.start():this.stop()),M.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const M=this.getRootNode();this.anchorEl=M.getElementById(this.anchor)}else this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(M,N,D,
|
1796
|
+
`;M.NilePopup=class extends xN{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(M){super.updated(M),M.has("active")&&(this.active?this.start():this.stop()),M.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const M=this.getRootNode();this.anchorEl=M.getElementById(this.anchor)}else this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(M,N,D,i){void 0===i&&(i={});const{ancestorScroll:I=!0,ancestorResize:j=!0,elementResize:g=!0,animationFrame:u=!1}=i,L=I&&!u,T=L||j?[...XN(M)?xD(M):M.contextElement?xD(M.contextElement):[],...xD(N)]:[];T.forEach((M=>{L&&M.addEventListener("scroll",D,{passive:!0}),j&&M.addEventListener("resize",D)}));let z,A=null;g&&(A=new ResizeObserver((()=>{D()})),XN(M)&&!u&&A.observe(M),XN(M)||!M.contextElement||u||A.observe(M.contextElement),A.observe(N));let t=u?LD(M):null;return u&&function N(){const i=LD(M);!t||i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height||D(),t=i,z=requestAnimationFrame(N)}(),D(),()=>{var M;T.forEach((M=>{L&&M.removeEventListener("scroll",D),j&&M.removeEventListener("resize",D)})),null==(M=A)||M.disconnect(),A=null,u&&cancelAnimationFrame(z)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((M=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>M()))):M()}))}reposition(){if(!this.active||!this.anchorEl)return;const M=[VN({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?M.push(vN({apply:({rects:M})=>{const N="width"===this.sync||"both"===this.sync,D="height"===this.sync||"both"===this.sync;this.popup.style.width=N?`${M.reference.width}px`:"",this.popup.style.height=D?`${M.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&M.push(WN({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&M.push(function(M){return void 0===M&&(M={}),{name:"shift",options:M,async fn(N){const{x:D,y:i,placement:I}=N,{mainAxis:j=!0,crossAxis:g=!1,limiter:u={fn:M=>{let{x:N,y:D}=M;return{x:N,y:D}}},...L}=M,T={x:D,y:i},z=await QN(N,L),A=dN(nN(I)),t="x"===A?"y":"x";let y=T[A],x=T[t];if(j){const M="y"===A?"bottom":"right";y=YN(y+z["y"===A?"top":"left"],y,y-z[M])}if(g){const M="y"===t?"bottom":"right";x=YN(x+z["y"===t?"top":"left"],x,x-z[M])}const c=u.fn({...N,[A]:y,[t]:x});return{...c,data:{x:c.x-D,y:c.y-i}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?M.push(vN({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:M,availableHeight:N})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${N}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${M}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&M.push((M=>({name:"arrow",options:M,async fn(N){const{element:D,padding:i=0}=M||{},{x:I,y:j,placement:g,rects:u,platform:L,elements:T}=N;if(null==D)return{};const z=rN(i),A={x:I,y:j},t=dN(g),y=ON(t),x=await L.getDimensions(D),c="y"===t,s=c?"top":"left",e=c?"bottom":"right",l=c?"clientHeight":"clientWidth",w=u.reference[y]+u.reference[t]-A[t]-u.floating[y],E=A[t]-u.reference[t],a=await(null==L.getOffsetParent?void 0:L.getOffsetParent(D));let S=a?a[l]:0;S&&await(null==L.isElement?void 0:L.isElement(a))||(S=T.floating[l]||u.floating[y]);const o=w/2-E/2,O=z[s],n=S-x[y]-z[e],d=S/2-x[y]/2+o,C=YN(O,d,n),r=null!=oN(g)&&d!=C&&u.reference[y]/2-(d<O?z[s]:z[e])-x[y]/2<0;return{[t]:A[t]-(r?d<O?O-d:n-d:0),data:{[t]:C,centerOffset:d-C}}}}))({element:this.arrowEl,padding:this.arrowPadding}));const N="absolute"===this.strategy?M=>wD.getOffsetParent(M,aD):wD.getOffsetParent;ED(this.anchorEl,this.popup,{placement:this.placement,middleware:M,strategy:this.strategy,platform:{...wD,getOffsetParent:N}}).then((({x:M,y:N,middlewareData:D,placement:i})=>{const I="rtl"===getComputedStyle(this).direction,j={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${M}px`,top:`${N}px`}),this.arrow){const M=D.arrow.x,N=D.arrow.y;let i="",g="",u="",L="";if("start"===this.arrowPlacement){const D="number"==typeof M?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof N?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",g=I?D:"",L=I?"":D}else if("end"===this.arrowPlacement){const D="number"==typeof M?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";g=I?"":D,L=I?D:"",u="number"==typeof N?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(L="number"==typeof M?"calc(50% - var(--arrow-size-diagonal))":"",i="number"==typeof N?"calc(50% - var(--arrow-size-diagonal))":""):(L="number"==typeof M?`${M}px`:"",i="number"==typeof N?`${N}px`:"");Object.assign(this.arrowEl.style,{top:i,right:g,bottom:u,left:L,[j]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("reposition")}render(){return cM`
|
1797
1797
|
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
1798
1798
|
|
1799
1799
|
<div
|
@@ -1803,7 +1803,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1803
1803
|
<slot></slot>
|
1804
1804
|
${this.arrow?cM`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
1805
1805
|
</div>
|
1806
|
-
`}},M.NilePopup.styles=oD,N([vM(".popup")],M.NilePopup.prototype,"popup",void 0),N([vM(".popup__arrow")],M.NilePopup.prototype,"arrowEl",void 0),N([WM()],M.NilePopup.prototype,"anchor",void 0),N([WM({type:Boolean,reflect:!0})],M.NilePopup.prototype,"active",void 0),N([WM({reflect:!0})],M.NilePopup.prototype,"placement",void 0),N([WM({reflect:!0})],M.NilePopup.prototype,"strategy",void 0),N([WM({type:Number})],M.NilePopup.prototype,"distance",void 0),N([WM({type:Number})],M.NilePopup.prototype,"skidding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"arrow",void 0),N([WM({attribute:"arrow-placement"})],M.NilePopup.prototype,"arrowPlacement",void 0),N([WM({attribute:"arrow-padding",type:Number})],M.NilePopup.prototype,"arrowPadding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"flip",void 0),N([WM({attribute:"flip-fallback-placements",converter:{fromAttribute:M=>M.split(" ").map((M=>M.trim())).filter((M=>""!==M)),toAttribute:M=>M.join(" ")}})],M.NilePopup.prototype,"flipFallbackPlacements",void 0),N([WM({attribute:"flip-fallback-strategy"})],M.NilePopup.prototype,"flipFallbackStrategy",void 0),N([WM({type:Object})],M.NilePopup.prototype,"flipBoundary",void 0),N([WM({attribute:"flip-padding",type:Number})],M.NilePopup.prototype,"flipPadding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"shift",void 0),N([WM({type:Object})],M.NilePopup.prototype,"shiftBoundary",void 0),N([WM({attribute:"shift-padding",type:Number})],M.NilePopup.prototype,"shiftPadding",void 0),N([WM({attribute:"auto-size"})],M.NilePopup.prototype,"autoSize",void 0),N([WM()],M.NilePopup.prototype,"sync",void 0),N([WM({type:Object})],M.NilePopup.prototype,"autoSizeBoundary",void 0),N([WM({attribute:"auto-size-padding",type:Number})],M.NilePopup.prototype,"autoSizePadding",void 0),M.NilePopup=N([mM("nile-popup")],M.NilePopup);const
|
1806
|
+
`}},M.NilePopup.styles=oD,N([vM(".popup")],M.NilePopup.prototype,"popup",void 0),N([vM(".popup__arrow")],M.NilePopup.prototype,"arrowEl",void 0),N([WM()],M.NilePopup.prototype,"anchor",void 0),N([WM({type:Boolean,reflect:!0})],M.NilePopup.prototype,"active",void 0),N([WM({reflect:!0})],M.NilePopup.prototype,"placement",void 0),N([WM({reflect:!0})],M.NilePopup.prototype,"strategy",void 0),N([WM({type:Number})],M.NilePopup.prototype,"distance",void 0),N([WM({type:Number})],M.NilePopup.prototype,"skidding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"arrow",void 0),N([WM({attribute:"arrow-placement"})],M.NilePopup.prototype,"arrowPlacement",void 0),N([WM({attribute:"arrow-padding",type:Number})],M.NilePopup.prototype,"arrowPadding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"flip",void 0),N([WM({attribute:"flip-fallback-placements",converter:{fromAttribute:M=>M.split(" ").map((M=>M.trim())).filter((M=>""!==M)),toAttribute:M=>M.join(" ")}})],M.NilePopup.prototype,"flipFallbackPlacements",void 0),N([WM({attribute:"flip-fallback-strategy"})],M.NilePopup.prototype,"flipFallbackStrategy",void 0),N([WM({type:Object})],M.NilePopup.prototype,"flipBoundary",void 0),N([WM({attribute:"flip-padding",type:Number})],M.NilePopup.prototype,"flipPadding",void 0),N([WM({type:Boolean})],M.NilePopup.prototype,"shift",void 0),N([WM({type:Object})],M.NilePopup.prototype,"shiftBoundary",void 0),N([WM({attribute:"shift-padding",type:Number})],M.NilePopup.prototype,"shiftPadding",void 0),N([WM({attribute:"auto-size"})],M.NilePopup.prototype,"autoSize",void 0),N([WM()],M.NilePopup.prototype,"sync",void 0),N([WM({type:Object})],M.NilePopup.prototype,"autoSizeBoundary",void 0),N([WM({attribute:"auto-size-padding",type:Number})],M.NilePopup.prototype,"autoSizePadding",void 0),M.NilePopup=N([mM("nile-popup")],M.NilePopup);const OD=u`
|
1807
1807
|
|
1808
1808
|
:host {
|
1809
1809
|
--max-width: 20rem;
|
@@ -1852,7 +1852,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1852
1852
|
padding: 0.25rem 0.5rem;
|
1853
1853
|
pointer-events: none;
|
1854
1854
|
}
|
1855
|
-
`;function nD(M,N,D){return new Promise((
|
1855
|
+
`;function nD(M,N,D){return new Promise((i=>{if(D?.duration===1/0)throw new Error("Promise-based animations must be finite.");const I=M.animate(N,{...D,duration:CD()?0:D.duration});I.addEventListener("cancel",i,{once:!0}),I.addEventListener("finish",i,{once:!0})}))}function dD(M){return(M=M.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(M):M.indexOf("s")>-1?1e3*parseFloat(M):parseFloat(M)}function CD(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function rD(M){return Promise.all(M.getAnimations().map((M=>new Promise((N=>{const D=requestAnimationFrame(N);M.addEventListener("cancel",(()=>D),{once:!0}),M.addEventListener("finish",(()=>D),{once:!0}),M.cancel()})))))}const UD=new Map,QD=new WeakMap;function kD(M,N){return"rtl"===N.toLowerCase()?{keyframes:M.rtlKeyframes||M.keyframes,options:M.options}:M}function hD(M,N){UD.set(M,function(M){return M??{keyframes:[],options:{duration:0}}}(N))}function YD(M,N,D){const i=QD.get(M);if(i?.[N])return kD(i[N],D.dir);const I=UD.get(N);return I?kD(I,D.dir):{keyframes:[],options:{duration:0}}}function ZD(M,N){return new Promise((D=>{M.addEventListener(N,(function i(I){I.target===M&&(M.removeEventListener(N,i),D())}))}))}M.NileTooltip=class extends xN{constructor(){super(...arguments),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1}static get styles(){return[OD]}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then((()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}))}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(M){this.open&&"Escape"===M.key&&(M.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const M=dD(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),M)}}handleMouseOut(){if(this.hasTrigger("hover")){const M=dD(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),M)}}hasTrigger(M){return this.trigger.split(" ").includes(M)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("nile-show"),await rD(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:M,options:N}=YD(this,"tooltip.show",{dir:""});await nD(this.popup.popup,M,N),this.emit("nile-after-show")}else{this.emit("nile-hide"),await rD(this.body);const{keyframes:M,options:N}=YD(this,"tooltip.hide",{dir:""});await nD(this.popup.popup,M,N),this.popup.active=!1,this.body.hidden=!0,this.emit("nile-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,ZD(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,ZD(this,"nile-after-hide")}render(){return cM`
|
1856
1856
|
<nile-popup
|
1857
1857
|
part="base"
|
1858
1858
|
exportparts="
|
@@ -1881,7 +1881,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
1881
1881
|
${this.content}
|
1882
1882
|
</slot>
|
1883
1883
|
</nile-popup>
|
1884
|
-
`}},N([vM("slot:not([name])")],M.NileTooltip.prototype,"defaultSlot",void 0),N([vM(".tooltip__body")],M.NileTooltip.prototype,"body",void 0),N([vM("nile-popup")],M.NileTooltip.prototype,"popup",void 0),N([WM()],M.NileTooltip.prototype,"content",void 0),N([WM()],M.NileTooltip.prototype,"placement",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTooltip.prototype,"disabled",void 0),N([WM({type:Number})],M.NileTooltip.prototype,"distance",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTooltip.prototype,"open",void 0),N([WM({type:Number})],M.NileTooltip.prototype,"skidding",void 0),N([WM()],M.NileTooltip.prototype,"trigger",void 0),N([WM({type:Boolean})],M.NileTooltip.prototype,"hoist",void 0),N([
|
1884
|
+
`}},N([vM("slot:not([name])")],M.NileTooltip.prototype,"defaultSlot",void 0),N([vM(".tooltip__body")],M.NileTooltip.prototype,"body",void 0),N([vM("nile-popup")],M.NileTooltip.prototype,"popup",void 0),N([WM()],M.NileTooltip.prototype,"content",void 0),N([WM()],M.NileTooltip.prototype,"placement",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTooltip.prototype,"disabled",void 0),N([WM({type:Number})],M.NileTooltip.prototype,"distance",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTooltip.prototype,"open",void 0),N([WM({type:Number})],M.NileTooltip.prototype,"skidding",void 0),N([WM()],M.NileTooltip.prototype,"trigger",void 0),N([WM({type:Boolean})],M.NileTooltip.prototype,"hoist",void 0),N([tN("open",{waitUntilFirstUpdate:!0})],M.NileTooltip.prototype,"handleOpenChange",null),N([tN(["content","distance","hoist","placement","skidding"])],M.NileTooltip.prototype,"handleOptionsChange",null),N([tN("disabled")],M.NileTooltip.prototype,"handleDisabledChange",null),M.NileTooltip=N([mM("nile-tooltip")],M.NileTooltip),hD("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),hD("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});var bD=u`
|
1885
1885
|
.nile-slide-toggle {
|
1886
1886
|
display: flex;
|
1887
1887
|
align-items: center;
|
@@ -2631,7 +2631,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2631
2631
|
.icon-button__icon {
|
2632
2632
|
pointer-events: none;
|
2633
2633
|
}
|
2634
|
-
`;function BD(M,N,D="vertical",
|
2634
|
+
`;function BD(M,N,D="vertical",i="smooth"){const I=function(M,N){return{top:Math.round(M.getBoundingClientRect().top-N.getBoundingClientRect().top),left:Math.round(M.getBoundingClientRect().left-N.getBoundingClientRect().left)}}(M,N),j=I.top+N.scrollTop,g=I.left+N.scrollLeft,u=N.scrollLeft,L=N.scrollLeft+N.offsetWidth,T=N.scrollTop,z=N.scrollTop+N.offsetHeight;"horizontal"!==D&&"both"!==D||(g<u?N.scrollTo({left:g,behavior:i}):g+M.clientWidth>L&&N.scrollTo({left:g-N.offsetWidth+M.clientWidth,behavior:i})),"vertical"!==D&&"both"!==D||(j<T?N.scrollTo({top:j,behavior:i}):j+M.clientHeight>z&&N.scrollTo({top:j-N.offsetHeight+M.clientHeight,behavior:i}))}M.NileIconButton=class extends xN{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleClick(M){this.disabled&&(M.preventDefault(),M.stopPropagation())}click(){this.button.click()}focus(M){this.button.focus(M)}blur(){this.button.blur()}render(){const M=!!this.href,N=M?LN`a`:LN`button`;return zN`
|
2635
2635
|
<${N}
|
2636
2636
|
part="base"
|
2637
2637
|
class=${XM({"icon-button":!0,"icon-button--disabled":!M&&this.disabled,"icon-button--focused":this.hasFocus})}
|
@@ -2677,10 +2677,10 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2677
2677
|
></nile-icon-button>
|
2678
2678
|
`:""}
|
2679
2679
|
</span>
|
2680
|
-
`}},M.NileTag.styles=vD,N([WM({reflect:!0})],M.NileTag.prototype,"variant",void 0),N([WM({reflect:!0})],M.NileTag.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTag.prototype,"pill",void 0),N([WM({type:Boolean})],M.NileTag.prototype,"removable",void 0),M.NileTag=N([mM("nile-tag")],M.NileTag),M.NileSelect=class extends xN{constructor(){super(...arguments),this.formControlController=new
|
2680
|
+
`}},M.NileTag.styles=vD,N([WM({reflect:!0})],M.NileTag.prototype,"variant",void 0),N([WM({reflect:!0})],M.NileTag.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTag.prototype,"pill",void 0),N([WM({type:Boolean})],M.NileTag.prototype,"removable",void 0),M.NileTag=N([mM("nile-tag")],M.NileTag),M.NileSelect=class extends xN{constructor(){super(...arguments),this.formControlController=new iN(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new jN(this,"help-text","label"),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="",this.searchValue="",this.searchEnabled=!1,this.multiple=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.helpText="",this.form="",this.required=!1,this.showSelected=!1,this.noResultsMessage="No results found"}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleFooterClick(M){M.stopPropagation(),M.preventDefault()}toggleShowSelected(M){if(M.stopPropagation(),M.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((M=>{M.selected||(M.hidden=this.showSelected)})),this.requestUpdate()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((M=>{M.selected=!1,M.hidden=!1})),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name})}handleDocumentKeyDown(M){const N=M.target,D=null!==N.closest(".select__clear"),i=null!==N.closest("nile-icon-button");if(!D&&!i){if("Escape"===M.key&&this.open&&(M.preventDefault(),M.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===M.key||" "===M.key&&""===this.typeToSelectString)return M.preventDefault(),M.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(M.key)){const N=this.getAllOptions(),D=N.indexOf(this.currentOption);let i=Math.max(0,D);if(M.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===M.key?(i=D+1,i>N.length-1&&(i=0)):"ArrowUp"===M.key?(i=D-1,i<0&&(i=N.length-1)):"Home"===M.key?i=0:"End"===M.key&&(i=N.length-1),this.setCurrentOption(N[i])}if(1===M.key.length||"Backspace"===M.key){const N=this.getAllOptions();if(M.metaKey||M.ctrlKey||M.altKey)return;if(!this.open){if("Backspace"===M.key)return;this.show()}M.stopPropagation(),M.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===M.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=M.key.toLowerCase();for(const M of N){if(M.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(M);break}}}}}handleDocumentMouseDown(M){const N=M.composedPath();this&&!N.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(M){const N=M.composedPath().some((M=>M instanceof Element&&"nile-icon-button"===M.tagName.toLowerCase()));this.disabled||N||(M.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(M){M.stopPropagation(),this.handleDocumentKeyDown(M)}handleClearClick(M){M.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("nile-clear",{value:this.value,name:this.name}),this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}handleClearMouseDown(M){M.stopPropagation(),M.preventDefault()}handleOptionClick(M){const N=M.target.closest("nile-option"),D=this.value;N&&!N.disabled&&(this.multiple?this.toggleOptionSelection(N):this.setSelectedOptions(N),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==D&&this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value],D=[];customElements.get("nile-option")?(M.forEach((M=>D.push(M.value))),this.setSelectedOptions(M.filter((M=>N.includes(M.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(M,N){M.stopPropagation(),this.disabled||(this.toggleOptionSelection(N,!1),this.updateComplete.then((()=>{this.emit("nile-input",{value:this.value,name:this.name}),this.emit("nile-change",{value:this.value,name:this.name})})))}getAllOptions(){return[...this.querySelectorAll("nile-option")]}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(M){this.getAllOptions().forEach((M=>{M.current=!1,M.tabIndex=-1})),M&&(this.currentOption=M,M.current=!0,M.tabIndex=0,M.focus())}setSelectedOptions(M){const N=this.getAllOptions(),D=Array.isArray(M)?M:[M];N.forEach((M=>M.selected=!1)),D.length&&D.forEach((M=>M.selected=!0)),this.selectionChanged()}toggleOptionSelection(M,N){M.selected=!0===N||!1===N?N:!M.selected,this.selectionChanged()}selectionChanged(){this.selectedOptions=this.getAllOptions().filter((M=>M.selected)),this.multiple?(this.value=this.selectedOptions.map((M=>M.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected"):(this.value=this.selectedOptions[0]?.value??"",this.displayLabel=this.selectedOptions[0]?.getTextLabel()??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(M){this.searchValue=M.detail.value,0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}filterOptions(M){const N=this.getAllOptions(),D=M.toLowerCase();let i=[];return N.forEach((M=>{const N=M.getTextLabel().toLowerCase(),I=(M.value||"").toLowerCase();N.startsWith(D)||I.startsWith(D)?(M.hidden=!1,i.push(M)):M.hidden=!0})),i}handleInvalid(M){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(M)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const M=this.getAllOptions(),N=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(M.filter((M=>N.includes(M.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),await rD(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:M,options:N}=YD(this,"select.show",{dir:"ltr"});await nD(this.popup.popup,M,N),this.currentOption&&BD(this.currentOption,this.listbox,"vertical","auto"),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.removeOpenListeners(),await rD(this);const{keyframes:M,options:N}=YD(this,"select.hide",{dir:"ltr"});await nD(this.popup.popup,M,N),this.listbox.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide",{value:this.value,name:this.name})}}async show(){if(!this.open&&!this.disabled)return this.open=!0,ZD(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,ZD(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(M){this.valueInput.setCustomValidity(M),this.formControlController.updateValidity()}focus(M){this.displayInput.focus(M)}blur(){this.displayInput.blur()}render(){const M=this.hasSlotController.test("label"),N=this.hasSlotController.test("help-text"),D=!!this.label||!!M,i=!!this.helpText||!!N,I=this.clearable&&!this.disabled&&this.value.length>0,j=this.placeholder&&0===this.value.length,g=this.searchValue||"";return cM`
|
2681
2681
|
<div
|
2682
2682
|
part="form-control"
|
2683
|
-
class=${XM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":D,"form-control--has-help-text":
|
2683
|
+
class=${XM({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":D,"form-control--has-help-text":i})}
|
2684
2684
|
>
|
2685
2685
|
<label
|
2686
2686
|
id="label"
|
@@ -2694,7 +2694,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2694
2694
|
|
2695
2695
|
<div part="form-control-input" class="form-control-input">
|
2696
2696
|
<nile-popup
|
2697
|
-
class=${XM({select:!0,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":
|
2697
|
+
class=${XM({select:!0,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":j,"select--top":"top"===this.placement,"select--bottom":"bottom"===this.placement,"select--small":"small"===this.size,"select--medium":"medium"===this.size,"select--large":"large"===this.size})}
|
2698
2698
|
placement=${this.placement}
|
2699
2699
|
strategy=${this.hoist?"fixed":"absolute"}
|
2700
2700
|
flip
|
@@ -2755,7 +2755,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2755
2755
|
</nile-tag>
|
2756
2756
|
`:N===this.maxOptionsVisible?cM`
|
2757
2757
|
<nile-tag
|
2758
|
-
class="select__tags-count ${
|
2758
|
+
class="select__tags-count ${I?"select__tags-count-clearable":""} "
|
2759
2759
|
size=${this.size}
|
2760
2760
|
>
|
2761
2761
|
+${this.selectedOptions.length-N}
|
@@ -2776,7 +2776,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2776
2776
|
@invalid=${this.handleInvalid}
|
2777
2777
|
/>
|
2778
2778
|
|
2779
|
-
${
|
2779
|
+
${I?cM`
|
2780
2780
|
<button
|
2781
2781
|
part="clear-button"
|
2782
2782
|
class="select__clear"
|
@@ -2861,12 +2861,12 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2861
2861
|
part="form-control-help-text"
|
2862
2862
|
id="help-text"
|
2863
2863
|
class="form-control__help-text"
|
2864
|
-
aria-hidden=${
|
2864
|
+
aria-hidden=${i?"false":"true"}
|
2865
2865
|
>
|
2866
2866
|
${this.helpText}
|
2867
2867
|
</slot>
|
2868
2868
|
</div>
|
2869
|
-
`}},M.NileSelect.styles=VD,N([vM(".select")],M.NileSelect.prototype,"popup",void 0),N([vM(".select__combobox")],M.NileSelect.prototype,"combobox",void 0),N([vM(".select__display-input")],M.NileSelect.prototype,"displayInput",void 0),N([vM(".select__value-input")],M.NileSelect.prototype,"valueInput",void 0),N([vM(".select__listbox")],M.NileSelect.prototype,"listbox",void 0),N([VM()],M.NileSelect.prototype,"hasFocus",void 0),N([VM()],M.NileSelect.prototype,"displayLabel",void 0),N([VM()],M.NileSelect.prototype,"currentOption",void 0),N([VM()],M.NileSelect.prototype,"selectedOptions",void 0),N([WM()],M.NileSelect.prototype,"name",void 0),N([WM({converter:{fromAttribute:M=>M.split(" "),toAttribute:M=>M.join(" ")}})],M.NileSelect.prototype,"value",void 0),N([sN()],M.NileSelect.prototype,"defaultValue",void 0),N([WM()],M.NileSelect.prototype,"size",void 0),N([WM()],M.NileSelect.prototype,"placeholder",void 0),N([VM()],M.NileSelect.prototype,"searchValue",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"searchEnabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"multiple",void 0),N([WM({attribute:"max-options-visible",type:Number})],M.NileSelect.prototype,"maxOptionsVisible",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"disabled",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"clearable",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"open",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"hoist",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"filled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"pill",void 0),N([WM()],M.NileSelect.prototype,"label",void 0),N([WM({reflect:!0})],M.NileSelect.prototype,"placement",void 0),N([WM({attribute:"help-text"})],M.NileSelect.prototype,"helpText",void 0),N([WM({reflect:!0})],M.NileSelect.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"required",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"showSelected",void 0),N([VM()],M.NileSelect.prototype,"showNoResults",void 0),N([WM({type:String})],M.NileSelect.prototype,"noResultsMessage",void 0),N([
|
2869
|
+
`}},M.NileSelect.styles=VD,N([vM(".select")],M.NileSelect.prototype,"popup",void 0),N([vM(".select__combobox")],M.NileSelect.prototype,"combobox",void 0),N([vM(".select__display-input")],M.NileSelect.prototype,"displayInput",void 0),N([vM(".select__value-input")],M.NileSelect.prototype,"valueInput",void 0),N([vM(".select__listbox")],M.NileSelect.prototype,"listbox",void 0),N([VM()],M.NileSelect.prototype,"hasFocus",void 0),N([VM()],M.NileSelect.prototype,"displayLabel",void 0),N([VM()],M.NileSelect.prototype,"currentOption",void 0),N([VM()],M.NileSelect.prototype,"selectedOptions",void 0),N([WM()],M.NileSelect.prototype,"name",void 0),N([WM({converter:{fromAttribute:M=>M.split(" "),toAttribute:M=>M.join(" ")}})],M.NileSelect.prototype,"value",void 0),N([sN()],M.NileSelect.prototype,"defaultValue",void 0),N([WM()],M.NileSelect.prototype,"size",void 0),N([WM()],M.NileSelect.prototype,"placeholder",void 0),N([VM()],M.NileSelect.prototype,"searchValue",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"searchEnabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"multiple",void 0),N([WM({attribute:"max-options-visible",type:Number})],M.NileSelect.prototype,"maxOptionsVisible",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"disabled",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"clearable",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"open",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"hoist",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"filled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"pill",void 0),N([WM()],M.NileSelect.prototype,"label",void 0),N([WM({reflect:!0})],M.NileSelect.prototype,"placement",void 0),N([WM({attribute:"help-text"})],M.NileSelect.prototype,"helpText",void 0),N([WM({reflect:!0})],M.NileSelect.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileSelect.prototype,"required",void 0),N([WM({type:Boolean})],M.NileSelect.prototype,"showSelected",void 0),N([VM()],M.NileSelect.prototype,"showNoResults",void 0),N([WM({type:String})],M.NileSelect.prototype,"noResultsMessage",void 0),N([tN("disabled",{waitUntilFirstUpdate:!0})],M.NileSelect.prototype,"handleDisabledChange",null),N([tN("value",{waitUntilFirstUpdate:!0})],M.NileSelect.prototype,"handleValueChange",null),N([tN("open",{waitUntilFirstUpdate:!0})],M.NileSelect.prototype,"handleOpenChange",null),M.NileSelect=N([mM("nile-select")],M.NileSelect),hD("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),hD("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const PD=u`
|
2870
2870
|
:host {
|
2871
2871
|
display: block;
|
2872
2872
|
user-select: none;
|
@@ -2970,7 +2970,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
2970
2970
|
></slot>
|
2971
2971
|
<slot part="suffix" name="suffix" class="option__suffix"></slot>
|
2972
2972
|
</div>`}
|
2973
|
-
`}},M.NileOption.styles=PD,N([vM(".option__label")],M.NileOption.prototype,"defaultSlot",void 0),N([VM()],M.NileOption.prototype,"current",void 0),N([VM()],M.NileOption.prototype,"selected",void 0),N([VM()],M.NileOption.prototype,"hasHover",void 0),N([VM()],M.NileOption.prototype,"hidden",void 0),N([WM({reflect:!0})],M.NileOption.prototype,"value",void 0),N([WM({type:Boolean,reflect:!0})],M.NileOption.prototype,"disabled",void 0),N([
|
2973
|
+
`}},M.NileOption.styles=PD,N([vM(".option__label")],M.NileOption.prototype,"defaultSlot",void 0),N([VM()],M.NileOption.prototype,"current",void 0),N([VM()],M.NileOption.prototype,"selected",void 0),N([VM()],M.NileOption.prototype,"hasHover",void 0),N([VM()],M.NileOption.prototype,"hidden",void 0),N([WM({reflect:!0})],M.NileOption.prototype,"value",void 0),N([WM({type:Boolean,reflect:!0})],M.NileOption.prototype,"disabled",void 0),N([tN("disabled")],M.NileOption.prototype,"handleDisabledChange",null),N([tN("selected")],M.NileOption.prototype,"handleSelectedChange",null),N([tN("value")],M.NileOption.prototype,"handleValueChange",null),M.NileOption=N([mM("nile-option")],M.NileOption);const RD=u`
|
2974
2974
|
:host {
|
2975
2975
|
box-sizing: border-box;
|
2976
2976
|
}
|
@@ -3098,7 +3098,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3098
3098
|
<nile-icon name="arrowright" library="system" aria-hidden="true"></nile-icon>
|
3099
3099
|
</span>
|
3100
3100
|
</div>
|
3101
|
-
`}},M.NileMenuItem.styles=RD,N([vM("slot:not([name])")],M.NileMenuItem.prototype,"defaultSlot",void 0),N([vM(".menu-item")],M.NileMenuItem.prototype,"menuItem",void 0),N([WM()],M.NileMenuItem.prototype,"type",void 0),N([WM({type:Boolean,reflect:!0})],M.NileMenuItem.prototype,"checked",void 0),N([WM()],M.NileMenuItem.prototype,"value",void 0),N([WM({type:Boolean,reflect:!0})],M.NileMenuItem.prototype,"disabled",void 0),N([
|
3101
|
+
`}},M.NileMenuItem.styles=RD,N([vM("slot:not([name])")],M.NileMenuItem.prototype,"defaultSlot",void 0),N([vM(".menu-item")],M.NileMenuItem.prototype,"menuItem",void 0),N([WM()],M.NileMenuItem.prototype,"type",void 0),N([WM({type:Boolean,reflect:!0})],M.NileMenuItem.prototype,"checked",void 0),N([WM()],M.NileMenuItem.prototype,"value",void 0),N([WM({type:Boolean,reflect:!0})],M.NileMenuItem.prototype,"disabled",void 0),N([tN("checked")],M.NileMenuItem.prototype,"handleCheckedChange",null),N([tN("disabled")],M.NileMenuItem.prototype,"handleDisabledChange",null),N([tN("type")],M.NileMenuItem.prototype,"handleTypeChange",null),M.NileMenuItem=N([mM("nile-menu-item")],M.NileMenuItem);const FD=u`
|
3102
3102
|
:host {
|
3103
3103
|
display: inline-block;
|
3104
3104
|
}
|
@@ -3145,7 +3145,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3145
3145
|
max-width: var(--auto-size-available-width) !important;
|
3146
3146
|
max-height: var(--auto-size-available-height) !important;
|
3147
3147
|
}
|
3148
|
-
`;function HD(M){const N=M.tagName.toLowerCase();return"-1"!==M.getAttribute("tabindex")&&(!M.hasAttribute("disabled")&&((!M.hasAttribute("aria-disabled")||"false"===M.getAttribute("aria-disabled"))&&(!("input"===N&&"radio"===M.getAttribute("type")&&!M.hasAttribute("checked"))&&(null!==M.offsetParent&&("hidden"!==window.getComputedStyle(M).visibility&&(!("audio"!==N&&"video"!==N||!M.hasAttribute("controls"))||(!!M.hasAttribute("tabindex")||(!(!M.hasAttribute("contenteditable")||"false"===M.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(N)))))))))}M.NileDropdown=class extends xN{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const M=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof M?.focus&&M.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((M=>"nile-menu"===M.tagName.toLowerCase()))}handleKeyDown(M){this.open&&"Escape"===M.key&&(M.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(M){if("Escape"===M.key&&this.open)return M.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===M.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return M.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const M=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;this.containingElement&&M?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement||this.hide()}))}}handleDocumentMouseDown(M){const N=M.composedPath();this.containingElement&&!N.includes(this.containingElement)&&this.hide()}handlePanelSelect(M){const N=M.target;this.stayOpenOnSelect||"nile-menu"!==N.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(M){const N=this.getMenu();if(N){const D=N.getAllItems(),
|
3148
|
+
`;function HD(M){const N=M.tagName.toLowerCase();return"-1"!==M.getAttribute("tabindex")&&(!M.hasAttribute("disabled")&&((!M.hasAttribute("aria-disabled")||"false"===M.getAttribute("aria-disabled"))&&(!("input"===N&&"radio"===M.getAttribute("type")&&!M.hasAttribute("checked"))&&(null!==M.offsetParent&&("hidden"!==window.getComputedStyle(M).visibility&&(!("audio"!==N&&"video"!==N||!M.hasAttribute("controls"))||(!!M.hasAttribute("tabindex")||(!(!M.hasAttribute("contenteditable")||"false"===M.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(N)))))))))}M.NileDropdown=class extends xN{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const M=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof M?.focus&&M.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((M=>"nile-menu"===M.tagName.toLowerCase()))}handleKeyDown(M){this.open&&"Escape"===M.key&&(M.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(M){if("Escape"===M.key&&this.open)return M.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===M.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return M.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const M=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;this.containingElement&&M?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement||this.hide()}))}}handleDocumentMouseDown(M){const N=M.composedPath();this.containingElement&&!N.includes(this.containingElement)&&this.hide()}handlePanelSelect(M){const N=M.target;this.stayOpenOnSelect||"nile-menu"!==N.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(M){const N=this.getMenu();if(N){const D=N.getAllItems(),i=D[0],I=D[D.length-1];["ArrowDown","ArrowUp","Home","End"].includes(M.key)&&(M.preventDefault(),this.open||this.show(),D.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==M.key&&"Home"!==M.key||(N.setCurrentItem(i),i.focus()),"ArrowUp"!==M.key&&"End"!==M.key||(N.setCurrentItem(I),I.focus())})))}}handleTriggerKeyUp(M){" "===M.key&&M.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const M=this.trigger.assignedElements({flatten:!0}).find((M=>function(M){const N=[];return function M(D){D instanceof HTMLElement&&(N.push(D),null!==D.shadowRoot&&"open"===D.shadowRoot.mode&&M(D.shadowRoot)),[...D.children].forEach((N=>M(N)))}(M),{start:N.find((M=>HD(M)))??null,end:N.reverse().find((M=>HD(M)))??null}}(M).start));let N;if(M){switch(M.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":N=M.button;break;default:N=M}N.setAttribute("aria-haspopup","true"),N.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,ZD(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,ZD(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("nile-show"),this.addOpenListeners(),await rD(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:M,options:N}=YD(this,"dropdown.show",{dir:""});await nD(this.popup.popup,M,N),this.emit("nile-after-show")}else{this.emit("nile-hide"),this.removeOpenListeners(),await rD(this);const{keyframes:M,options:N}=YD(this,"dropdown.hide",{dir:""});await nD(this.popup.popup,M,N),this.panel.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide")}}render(){return cM`
|
3149
3149
|
<nile-popup
|
3150
3150
|
part="base"
|
3151
3151
|
id="dropdown"
|
@@ -3177,7 +3177,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3177
3177
|
aria-labelledby="dropdown"
|
3178
3178
|
></slot>
|
3179
3179
|
</nile-popup>
|
3180
|
-
`}},M.NileDropdown.styles=FD,N([vM(".dropdown")],M.NileDropdown.prototype,"popup",void 0),N([vM(".dropdown__trigger")],M.NileDropdown.prototype,"trigger",void 0),N([vM(".dropdown__panel")],M.NileDropdown.prototype,"panel",void 0),N([WM({type:Boolean,reflect:!0})],M.NileDropdown.prototype,"open",void 0),N([WM({reflect:!0})],M.NileDropdown.prototype,"placement",void 0),N([WM({type:Boolean,reflect:!0})],M.NileDropdown.prototype,"disabled",void 0),N([WM({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],M.NileDropdown.prototype,"stayOpenOnSelect",void 0),N([WM({attribute:!1})],M.NileDropdown.prototype,"containingElement",void 0),N([WM({type:Number})],M.NileDropdown.prototype,"distance",void 0),N([WM({type:Boolean})],M.NileDropdown.prototype,"noOpenOnClick",void 0),N([WM({type:Number})],M.NileDropdown.prototype,"skidding",void 0),N([WM({type:Boolean})],M.NileDropdown.prototype,"hoist",void 0),N([
|
3180
|
+
`}},M.NileDropdown.styles=FD,N([vM(".dropdown")],M.NileDropdown.prototype,"popup",void 0),N([vM(".dropdown__trigger")],M.NileDropdown.prototype,"trigger",void 0),N([vM(".dropdown__panel")],M.NileDropdown.prototype,"panel",void 0),N([WM({type:Boolean,reflect:!0})],M.NileDropdown.prototype,"open",void 0),N([WM({reflect:!0})],M.NileDropdown.prototype,"placement",void 0),N([WM({type:Boolean,reflect:!0})],M.NileDropdown.prototype,"disabled",void 0),N([WM({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],M.NileDropdown.prototype,"stayOpenOnSelect",void 0),N([WM({attribute:!1})],M.NileDropdown.prototype,"containingElement",void 0),N([WM({type:Number})],M.NileDropdown.prototype,"distance",void 0),N([WM({type:Boolean})],M.NileDropdown.prototype,"noOpenOnClick",void 0),N([WM({type:Number})],M.NileDropdown.prototype,"skidding",void 0),N([WM({type:Boolean})],M.NileDropdown.prototype,"hoist",void 0),N([tN("open",{waitUntilFirstUpdate:!0})],M.NileDropdown.prototype,"handleOpenChange",null),M.NileDropdown=N([mM("nile-dropdown")],M.NileDropdown),hD("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),hD("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const JD=u`
|
3181
3181
|
:host {
|
3182
3182
|
}
|
3183
3183
|
|
@@ -3188,7 +3188,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3188
3188
|
.nile-auto-complete--input {
|
3189
3189
|
width: 100%;
|
3190
3190
|
}
|
3191
|
-
`;function XD(M,N){const D={waitUntilFirstUpdate:!1,...N};return(N,
|
3191
|
+
`;function XD(M,N){const D={waitUntilFirstUpdate:!1,...N};return(N,i)=>{const{update:I}=N,j=Array.isArray(M)?M:[M];N.update=function(M){j.forEach((N=>{const I=N;if(M.has(I)){const N=M.get(I),j=this[I];N!==j&&(D.waitUntilFirstUpdate&&!this.hasUpdated||this[i](N,j))}})),I.call(this,M)}}}M.NileAutoComplete=class extends xN{constructor(){super(...arguments),this.isDropdownOpen=!1,this.openOnFocus=!1,this.value="",this.placeholder="Type here ..",this.noBorder=!1,this.menuItems=[],this.allMenuItems=[]}connectedCallback(){super.connectedCallback(),this.menuItems=[...this.allMenuItems]}handleAllMenuItemsChange(){this.menuItems=[...this.allMenuItems]}async handleValueChange(){await this.updateComplete,this.menuItems=this.allMenuItems.filter((M=>M.toLowerCase().includes(this.value?.toLowerCase())))}handleSelect(M){this.value=M.detail.value,this.emit("nile-complete",{value:M.detail.value}),this.isDropdownOpen=!1,this.dropdownElement?.hide()}handleSearch(M){const N=M.detail.value.toLowerCase();this.value=N,this.menuItems=this.allMenuItems.filter((M=>M?.toLowerCase().includes(N))),this.isDropdownOpen=this.menuItems.length>0,this.isDropdownOpen&&this.dropdownElement?.show()}handleFocus(){this.openOnFocus&&setTimeout((()=>{this.isDropdownOpen=!0,this.dropdownElement?.show()}),300)}handleClick(){this.isDropdownOpen=!0,this.dropdownElement?.show()}render(){return cM`
|
3192
3192
|
<nile-dropdown class="nile-dropdown--input" ?open=${this.isDropdownOpen} noOpenOnCLick>
|
3193
3193
|
<nile-input class="nile-auto-complete--input"
|
3194
3194
|
?no-border=${this.noBorder}
|
@@ -3355,10 +3355,10 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3355
3355
|
.nile-chip__tags {
|
3356
3356
|
margin: 0.05rem;
|
3357
3357
|
}
|
3358
|
-
`;M.NileChip=class extends xN{constructor(){super(...arguments),this.hasSlotController=new
|
3358
|
+
`;M.NileChip=class extends xN{constructor(){super(...arguments),this.hasSlotController=new jN(this,"help-text","label"),this.tags=[],this.inputValue="",this.isDropdownOpen=!1,this.warning=!1,this.error=!1,this.success=!1,this.noDuplicates=!1,this.label="",this.acceptUserInput=!1,this.clearable=!1,this.placeholder="type here...",this.readonly=!1,this.disabled=!1,this.helpText="",this.autoCompleteOptions=[],this.filteredAutoCompleteOptions=[],this.value=[],this.noWrap=!1}static get styles(){return[fD]}onAutoCompleteOptionsChanged(){this.filteredAutoCompleteOptions=[...this.autoCompleteOptions],this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((M=>!this.value.includes(M))))}onValueChanged(){this.tags=[...this.value],this.onTagsChanged()}onTagsChanged(){this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((M=>!this.tags.includes(M))))}connectedCallback(){super.connectedCallback(),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter((M=>!this.value.includes(M))))}handleSelect(M){this.noDuplicates&&this.tags.includes(M.detail.value)||(this.tags=[...this.tags,M.detail.value],this.emit("nile-chip-change",{value:this.tags}),this.resetInput())}handleRemove(M){this.tags=this.tags.filter((N=>N!==M)),this.noDuplicates&&this.autoCompleteOptions.includes(M)&&(this.filteredAutoCompleteOptions=[...this.filteredAutoCompleteOptions,M]),this.emit("nile-chip-change",{value:this.tags})}handleInputChange(M){this.inputValue=M.detail.value}handleInputKeydown(M){this.acceptUserInput&&("Enter"!==M.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(this.tags=[...this.tags,this.inputValue],this.resetInput(),this.emit("nile-chip-change",{value:this.tags})))}handleFocus(){this.isDropdownOpen=!0}resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus()}render(){const M=this.hasSlotController.test("label"),N=this.hasSlotController.test("help-text"),D=!!this.label||!!M,i=!!this.helpText||!!N;return cM`
|
3359
3359
|
<div
|
3360
3360
|
part="form-control"
|
3361
|
-
class=${XM({"form-control":!0,"form-control--medium":!0,"form-control--has-label":D,"form-control--has-help-text":
|
3361
|
+
class=${XM({"form-control":!0,"form-control--medium":!0,"form-control--has-label":D,"form-control--has-help-text":i,"nile-chip--disabled":this.disabled})}
|
3362
3362
|
>
|
3363
3363
|
<label
|
3364
3364
|
part="form-control-label"
|
@@ -3401,13 +3401,13 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3401
3401
|
part="form-control-help-text"
|
3402
3402
|
id="help-text"
|
3403
3403
|
class="form-control__help-text"
|
3404
|
-
aria-hidden=${
|
3404
|
+
aria-hidden=${i?"false":"true"}
|
3405
3405
|
>
|
3406
3406
|
${this.helpText}
|
3407
3407
|
</slot>
|
3408
3408
|
</div>
|
3409
3409
|
</div>
|
3410
|
-
`}},N([VM()],M.NileChip.prototype,"tags",void 0),N([VM()],M.NileChip.prototype,"inputValue",void 0),N([VM()],M.NileChip.prototype,"isDropdownOpen",void 0),N([vM("nile-auto-complete")],M.NileChip.prototype,"autoComplete",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"error",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"success",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"noDuplicates",void 0),N([WM()],M.NileChip.prototype,"label",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"acceptUserInput",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"clearable",void 0),N([WM()],M.NileChip.prototype,"placeholder",void 0),N([WM({type:Boolean,reflect:!0})],M.NileChip.prototype,"readonly",void 0),N([WM({type:Boolean,reflect:!0})],M.NileChip.prototype,"disabled",void 0),N([WM({attribute:"help-text"})],M.NileChip.prototype,"helpText",void 0),N([WM({type:Array})],M.NileChip.prototype,"autoCompleteOptions",void 0),N([WM({type:Array})],M.NileChip.prototype,"filteredAutoCompleteOptions",void 0),N([WM({type:Array})],M.NileChip.prototype,"value",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"noWrap",void 0),N([
|
3410
|
+
`}},N([VM()],M.NileChip.prototype,"tags",void 0),N([VM()],M.NileChip.prototype,"inputValue",void 0),N([VM()],M.NileChip.prototype,"isDropdownOpen",void 0),N([vM("nile-auto-complete")],M.NileChip.prototype,"autoComplete",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"error",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"success",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"noDuplicates",void 0),N([WM()],M.NileChip.prototype,"label",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"acceptUserInput",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"clearable",void 0),N([WM()],M.NileChip.prototype,"placeholder",void 0),N([WM({type:Boolean,reflect:!0})],M.NileChip.prototype,"readonly",void 0),N([WM({type:Boolean,reflect:!0})],M.NileChip.prototype,"disabled",void 0),N([WM({attribute:"help-text"})],M.NileChip.prototype,"helpText",void 0),N([WM({type:Array})],M.NileChip.prototype,"autoCompleteOptions",void 0),N([WM({type:Array})],M.NileChip.prototype,"filteredAutoCompleteOptions",void 0),N([WM({type:Array})],M.NileChip.prototype,"value",void 0),N([WM({type:Boolean})],M.NileChip.prototype,"noWrap",void 0),N([tN("autoCompleteOptions")],M.NileChip.prototype,"onAutoCompleteOptionsChanged",null),N([tN("value")],M.NileChip.prototype,"onValueChanged",null),N([tN("tags")],M.NileChip.prototype,"onTagsChanged",null),M.NileChip=N([mM("nile-chip")],M.NileChip);const _D=u`
|
3411
3411
|
.form-control .form-control__label {
|
3412
3412
|
display: none;
|
3413
3413
|
}
|
@@ -3596,10 +3596,10 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3596
3596
|
.textarea--standard.textarea--success {
|
3597
3597
|
border-color: var(--nile-colors-green-500);
|
3598
3598
|
}
|
3599
|
-
`;M.NileTextarea=class extends xN{constructor(){super(...arguments),this.hasSlotController=new
|
3599
|
+
`;M.NileTextarea=class extends xN{constructor(){super(...arguments),this.hasSlotController=new jN(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.errorMessage="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.warning=!1,this.error=!1,this.success=!1,this.spellcheck=!0,this.defaultValue=""}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.setTextareaHeight())),this.updateComplete.then((()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)}))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.input)}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("nile-change",{value:this.value})}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value})}handleInput(){this.value=this.input.value,this.emit("nile-input",{value:this.value})}setTextareaHeight(){"auto"===this.resize?(this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=void 0}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.setTextareaHeight()}focus(M){this.input.focus(M)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(M){return M?("number"==typeof M.top&&(this.input.scrollTop=M.top),void("number"==typeof M.left&&(this.input.scrollLeft=M.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(M,N,D="none"){this.input.setSelectionRange(M,N,D)}setRangeText(M,N,D,i){this.input.setRangeText(M,N,D,i),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}render(){const M=this.hasSlotController.test("label"),N=this.hasSlotController.test("help-text"),D=!!this.label||!!M,i=!!this.helpText||!!N;return cM`
|
3600
3600
|
<div
|
3601
3601
|
part="form-control"
|
3602
|
-
class=${XM({"form-control":!0,"form-control--medium":"medium"===this.size,"form-control--has-label":D,"form-control--has-help-text":
|
3602
|
+
class=${XM({"form-control":!0,"form-control--medium":"medium"===this.size,"form-control--has-label":D,"form-control--has-help-text":i})}
|
3603
3603
|
>
|
3604
3604
|
<label
|
3605
3605
|
part="form-control-label"
|
@@ -3621,7 +3621,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3621
3621
|
class="textarea__control"
|
3622
3622
|
title=${this.title}
|
3623
3623
|
name=${AN(this.name)}
|
3624
|
-
.value=${
|
3624
|
+
.value=${lN(this.value)}
|
3625
3625
|
?disabled=${this.disabled}
|
3626
3626
|
?readonly=${this.readonly}
|
3627
3627
|
?required=${this.required}
|
@@ -3649,7 +3649,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3649
3649
|
part="form-control-help-text"
|
3650
3650
|
id="help-text"
|
3651
3651
|
class="form-control__help-text"
|
3652
|
-
aria-hidden=${
|
3652
|
+
aria-hidden=${i?"false":"true"}
|
3653
3653
|
>
|
3654
3654
|
${this.helpText}
|
3655
3655
|
</slot>
|
@@ -3662,7 +3662,256 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3662
3662
|
${this.errorMessage}
|
3663
3663
|
</slot>
|
3664
3664
|
</div>
|
3665
|
-
`}},M.NileTextarea.styles=_D,N([vM(".textarea__control")],M.NileTextarea.prototype,"input",void 0),N([VM()],M.NileTextarea.prototype,"hasFocus",void 0),N([WM()],M.NileTextarea.prototype,"title",void 0),N([WM()],M.NileTextarea.prototype,"name",void 0),N([WM()],M.NileTextarea.prototype,"value",void 0),N([WM({reflect:!0})],M.NileTextarea.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"filled",void 0),N([WM()],M.NileTextarea.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileTextarea.prototype,"helpText",void 0),N([WM({attribute:"error-message"})],M.NileTextarea.prototype,"errorMessage",void 0),N([WM()],M.NileTextarea.prototype,"placeholder",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"rows",void 0),N([WM()],M.NileTextarea.prototype,"resize",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"disabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"readonly",void 0),N([WM({reflect:!0})],M.NileTextarea.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"required",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"minlength",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"maxlength",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"error",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"success",void 0),N([WM()],M.NileTextarea.prototype,"autocapitalize",void 0),N([WM()],M.NileTextarea.prototype,"autocorrect",void 0),N([WM()],M.NileTextarea.prototype,"autocomplete",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"autofocus",void 0),N([WM()],M.NileTextarea.prototype,"enterkeyhint",void 0),N([WM({type:Boolean,converter:{fromAttribute:M=>!(!M||"false"===M),toAttribute:M=>M?"true":"false"}})],M.NileTextarea.prototype,"spellcheck",void 0),N([WM()],M.NileTextarea.prototype,"inputmode",void 0),N([sN()],M.NileTextarea.prototype,"defaultValue",void 0),N([
|
3665
|
+
`}},M.NileTextarea.styles=_D,N([vM(".textarea__control")],M.NileTextarea.prototype,"input",void 0),N([VM()],M.NileTextarea.prototype,"hasFocus",void 0),N([WM()],M.NileTextarea.prototype,"title",void 0),N([WM()],M.NileTextarea.prototype,"name",void 0),N([WM()],M.NileTextarea.prototype,"value",void 0),N([WM({reflect:!0})],M.NileTextarea.prototype,"size",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"filled",void 0),N([WM()],M.NileTextarea.prototype,"label",void 0),N([WM({attribute:"help-text"})],M.NileTextarea.prototype,"helpText",void 0),N([WM({attribute:"error-message"})],M.NileTextarea.prototype,"errorMessage",void 0),N([WM()],M.NileTextarea.prototype,"placeholder",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"rows",void 0),N([WM()],M.NileTextarea.prototype,"resize",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"disabled",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"readonly",void 0),N([WM({reflect:!0})],M.NileTextarea.prototype,"form",void 0),N([WM({type:Boolean,reflect:!0})],M.NileTextarea.prototype,"required",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"minlength",void 0),N([WM({type:Number})],M.NileTextarea.prototype,"maxlength",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"warning",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"error",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"success",void 0),N([WM()],M.NileTextarea.prototype,"autocapitalize",void 0),N([WM()],M.NileTextarea.prototype,"autocorrect",void 0),N([WM()],M.NileTextarea.prototype,"autocomplete",void 0),N([WM({type:Boolean})],M.NileTextarea.prototype,"autofocus",void 0),N([WM()],M.NileTextarea.prototype,"enterkeyhint",void 0),N([WM({type:Boolean,converter:{fromAttribute:M=>!(!M||"false"===M),toAttribute:M=>M?"true":"false"}})],M.NileTextarea.prototype,"spellcheck",void 0),N([WM()],M.NileTextarea.prototype,"inputmode",void 0),N([sN()],M.NileTextarea.prototype,"defaultValue",void 0),N([tN("rows",{waitUntilFirstUpdate:!0})],M.NileTextarea.prototype,"handleRowsChange",null),N([tN("value",{waitUntilFirstUpdate:!0})],M.NileTextarea.prototype,"handleValueChange",null),M.NileTextarea=N([mM("nile-textarea")],M.NileTextarea);const $D=u`
|
3666
|
+
:host {
|
3667
|
+
}
|
3668
|
+
|
3669
|
+
.calendar-container {
|
3670
|
+
font-family: Colfax-regular;
|
3671
|
+
width: 365px;
|
3672
|
+
height: auto;
|
3673
|
+
text-align: center;
|
3674
|
+
background: white;
|
3675
|
+
}
|
3676
|
+
|
3677
|
+
.calendar-container.with-margin {
|
3678
|
+
margin-right: 20px;
|
3679
|
+
}
|
3680
|
+
|
3681
|
+
.calendar-header {
|
3682
|
+
display: flex;
|
3683
|
+
justify-content: space-between;
|
3684
|
+
padding: 10px;
|
3685
|
+
padding: 22px 20px;
|
3686
|
+
font-size: 14px;
|
3687
|
+
font-weight: 600;
|
3688
|
+
line-height: 14px;
|
3689
|
+
letter-spacing: 0.2px;
|
3690
|
+
}
|
3691
|
+
|
3692
|
+
.divider {
|
3693
|
+
width: 100%;
|
3694
|
+
height: 1px;
|
3695
|
+
background: #c7ced4;
|
3696
|
+
}
|
3697
|
+
|
3698
|
+
.day-names {
|
3699
|
+
font-size: 14px;
|
3700
|
+
font-weight: 600;
|
3701
|
+
line-height: 14px;
|
3702
|
+
letter-spacing: 0.2px;
|
3703
|
+
height: 50px;
|
3704
|
+
margin-top: 10px;
|
3705
|
+
}
|
3706
|
+
|
3707
|
+
.day-names,
|
3708
|
+
.days {
|
3709
|
+
display: flex;
|
3710
|
+
flex-wrap: wrap;
|
3711
|
+
justify-content: flex-start;
|
3712
|
+
height: auto;
|
3713
|
+
align-items: center;
|
3714
|
+
}
|
3715
|
+
|
3716
|
+
.days {
|
3717
|
+
height: auto;
|
3718
|
+
}
|
3719
|
+
|
3720
|
+
.day {
|
3721
|
+
flex-basis: calc(100% / 7);
|
3722
|
+
box-sizing: border-box;
|
3723
|
+
width: 48px;
|
3724
|
+
align-items: center;
|
3725
|
+
padding: 10px;
|
3726
|
+
height: 32px;
|
3727
|
+
margin-top: 6px;
|
3728
|
+
margin-bottom: 6px;
|
3729
|
+
display: flex;
|
3730
|
+
justify-content: center;
|
3731
|
+
align-items: center;
|
3732
|
+
}
|
3733
|
+
|
3734
|
+
.filler {
|
3735
|
+
color: grey;
|
3736
|
+
}
|
3737
|
+
|
3738
|
+
.selected-date {
|
3739
|
+
color: white;
|
3740
|
+
border-radius: 4px;
|
3741
|
+
background: #a5d3f3;
|
3742
|
+
}
|
3743
|
+
|
3744
|
+
|
3745
|
+
|
3746
|
+
.calendar-wrapper {
|
3747
|
+
background: white;
|
3748
|
+
display: flex;
|
3749
|
+
justify-content: space-between;
|
3750
|
+
width: auto;
|
3751
|
+
}
|
3752
|
+
|
3753
|
+
.selected-date,
|
3754
|
+
.range-start,
|
3755
|
+
.range-end {
|
3756
|
+
border-radius: 4px;
|
3757
|
+
background: #a5d3f3;
|
3758
|
+
color: white;
|
3759
|
+
}
|
3760
|
+
|
3761
|
+
|
3762
|
+
.range-start {
|
3763
|
+
background: #a5d3f3;
|
3764
|
+
border-radius: 4px 0 0 4px;
|
3765
|
+
color: white;
|
3766
|
+
}
|
3767
|
+
|
3768
|
+
.range-end {
|
3769
|
+
background: #a5d3f3;
|
3770
|
+
border-radius: 0 4px 4px 0;
|
3771
|
+
color: white;
|
3772
|
+
}
|
3773
|
+
|
3774
|
+
.range-middle {
|
3775
|
+
background: #a5d3f3;
|
3776
|
+
color: white;
|
3777
|
+
border-radius: 0;
|
3778
|
+
}
|
3779
|
+
|
3780
|
+
.day.selected {
|
3781
|
+
background: #a5d3f3;
|
3782
|
+
color: white;
|
3783
|
+
border-radius: 4px;
|
3784
|
+
}
|
3785
|
+
|
3786
|
+
.day.in-range {
|
3787
|
+
background: #a5d3f3;
|
3788
|
+
color: white;
|
3789
|
+
}
|
3790
|
+
|
3791
|
+
.selected-date {
|
3792
|
+
color: white;
|
3793
|
+
border-radius: 4px;
|
3794
|
+
background: #a5d3f3;
|
3795
|
+
}
|
3796
|
+
|
3797
|
+
.base {
|
3798
|
+
background-color: white;
|
3799
|
+
border-radius: 4px;
|
3800
|
+
padding-bottom: 20px
|
3801
|
+
}
|
3802
|
+
|
3803
|
+
.calender-input{
|
3804
|
+
padding: 20px;
|
3805
|
+
padding-bottom: 0px;
|
3806
|
+
}
|
3807
|
+
|
3808
|
+
.from {
|
3809
|
+
display: flex;
|
3810
|
+
justify-content: space-between;
|
3811
|
+
gap: 20px;
|
3812
|
+
}
|
3813
|
+
|
3814
|
+
.manual-input{
|
3815
|
+
width:100%;
|
3816
|
+
}
|
3817
|
+
|
3818
|
+
.manual-input-label{
|
3819
|
+
font-size: 12px;
|
3820
|
+
font-style: normal;
|
3821
|
+
font-weight: 500;
|
3822
|
+
margin-bottom: 10px;
|
3823
|
+
}
|
3824
|
+
|
3825
|
+
.apply-button {
|
3826
|
+
text-align: right;
|
3827
|
+
display: block;
|
3828
|
+
padding-top: 20px;
|
3829
|
+
}
|
3830
|
+
`;M.NileDatePicker=class extends xN{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1}static get styles(){return[$D]}valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const M=this.value.getTimezoneOffset(),N=new Date(this.value.getTime()-60*M*1e3);isNaN(N.getTime())||(this.valueAttribute=N.toISOString().split("T")[0],this.formattedDate=`${String(N.getDate()).padStart(2,"0")}/${String(N.getMonth()+1).padStart(2,"0")}/${N.getFullYear()}`)}}updated(M){if(super.updated(M),M.has("valueAttribute")){const M=new Date(this.valueAttribute||"");if(!isNaN(M.getTime())){const N=M.getTimezoneOffset();this.value=new Date(M.getTime()-60*N*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(M,N,D){"value"===M?(this.valueAttribute=D,this.initializeValue()):"range"===M&&(this.range=null!==D)}initializeValue(){if(this.range)try{const M=JSON.parse(this.valueAttribute||"");this.startDate=new Date(M.startDate),this.endDate=new Date(M.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(M){console.error("Invalid range value")}else if(this.valueAttribute){let M;M=new Date(this.valueAttribute),M=new Date(M.getTime()-6e4*M.getTimezoneOffset()),isNaN(M.getTime())||(this.value=M,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const M=new Date(this.valueAttribute);isNaN(M.getTime())||(this.value=M,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}}getDaysArray(M,N){const D=new Date(M,N+1,0).getDate();return Array.from({length:D},((M,N)=>N+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(M,N,D){const i=new Date(D,N,M);this.range?(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart?(this.startDate=i,this.endDate&&i>this.endDate&&(this.endDate=null),this.isSelectingStart=!1):(this.isSelectingStart=!0,this.startDate&&i<this.startDate?(this.startDate=i,this.endDate=null,this.isSelectingStart=!1):this.endDate=i)):(this.value=i,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide()),this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&(this.emit("nile-range-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}renderMonth(M,N,D){const i=new Date(M,N,1).getDay(),I=new Date(M,N+1,0).getDay(),j=this.getDaysArray(0===N?M-1:M,0===N?11:N-1),g=this.getDaysArray(11===N?M+1:M,11===N?0:N+1),u=j.slice(j.length-i),L=g.slice(0,6-I),T=[...u,...D,...L],z=(M,N,D,i)=>{if(!i)return"";if(!this.range&&this.value){if(M===this.value.getDate()&&N===this.value.getMonth()&&D===this.value.getFullYear())return"selected-date"}const I=this.startDate&&M===this.startDate.getDate()&&N===this.startDate.getMonth()&&D===this.startDate.getFullYear(),j=this.endDate&&M===this.endDate.getDate()&&N===this.endDate.getMonth()&&D===this.endDate.getFullYear();return I?"range-start":j?"range-end":""},A=(M,N,D,i)=>{if(!i)return!1;if(this.startDate&&this.endDate){const i=new Date(D,N,M);return i>=this.startDate&&i<=this.endDate}return!1};return cM`
|
3831
|
+
<div class="calendar">
|
3832
|
+
<div class="calendar-header">
|
3833
|
+
<nile-icon name="arrowleft" color="black" @click="${this.prevMonth}">
|
3834
|
+
</nile-icon>
|
3835
|
+
<span
|
3836
|
+
>${new Date(M,N).toLocaleString("default",{month:"long"})}
|
3837
|
+
${M}</span
|
3838
|
+
>
|
3839
|
+
<nile-icon name="arrowright" color="black" @click="${this.nextMonth}">
|
3840
|
+
</nile-icon>
|
3841
|
+
</div>
|
3842
|
+
<div class="day-names">
|
3843
|
+
<div class="day">Sun</div>
|
3844
|
+
<div class="day">Mon</div>
|
3845
|
+
<div class="day">Tue</div>
|
3846
|
+
<div class="day">Wed</div>
|
3847
|
+
<div class="day">Thu</div>
|
3848
|
+
<div class="day">Fri</div>
|
3849
|
+
<div class="day">Sat</div>
|
3850
|
+
</div>
|
3851
|
+
<div class="days">
|
3852
|
+
${T.map(((i,I)=>{const j=I>=u.length&&I<u.length+D.length;return cM` <div
|
3853
|
+
class="day ${z(i,N,M,j)} ${A(i,N,M,j)?"in-range":""} ${j?"":"filler"}"
|
3854
|
+
@click="${()=>{j&&this.selectDate(i,N,M)}}"
|
3855
|
+
>
|
3856
|
+
${i}
|
3857
|
+
</div>`}))}
|
3858
|
+
</div>
|
3859
|
+
</div>
|
3860
|
+
`}formatDate(M){if(!M)return"";return`${String(M.getDate()).padStart(2,"0")}/${String(M.getMonth()+1).padStart(2,"0")}/${M.getFullYear()}`}formatDateRange(M){return M?M.startDate&&M.endDate?`${this.formatDate(M.startDate)} - ${this.formatDate(M.endDate)}`:"":M}handleStartDateInput(M){const N=this.parseDate(M.detail.value);this.isValidDateInput(N)||(this.startDate=null),N&&(!this.endDate||N<=this.endDate)?this.startDate=N:(this.startDate=null,this.endDate=null),this.requestUpdate()}handleEndDateInput(M){const N=this.parseDate(M.detail.value);this.isValidDateInput(N)||(this.endDate=null),N&&(!this.startDate||N>=this.startDate)?this.endDate=N:this.endDate=null,this.requestUpdate()}parseDate(M){const[N,D,i]=M.split("/").map(Number),I=new Date(i,D-1,N);return isNaN(I.getTime())?null:I}isValidDateInput(M){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(M)}formatTime(M){if(!M)return"";return`${String(M.getHours()).padStart(2,"0")}:${String(M.getMinutes()).padStart(2,"0")}:${String(M.getSeconds()).padStart(2,"0")}`}isValidTimeInput(M){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(M)}parseTime(M,N){if(!this.isValidTimeInput(M))return null;const[D,i,I]=M.split(":").map(Number),j=new Date(N.getTime());return j.setHours(D,i,I),j}handleStartTimeInput(M){if(!this.startDate)return void(this.startDate=null);const N=this.parseTime(M.detail.value,this.startDate);N?this.startDate=N:this.startDate.setHours(0,0,0),this.requestUpdate()}handleEndTimeInput(M){if(!this.endDate)return void(this.endDate=null);const N=this.parseTime(M.detail.value,this.endDate);N?this.endDate=N:this.endDate.setHours(0,0,0),this.requestUpdate()}render(){this.getDaysArray(this.currentYear,this.currentMonth);const M=(this.currentMonth+1)%12,N=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(N,M),cM`
|
3861
|
+
<nile-dropdown>
|
3862
|
+
${this.range?cM`
|
3863
|
+
<nile-input
|
3864
|
+
slot="trigger"
|
3865
|
+
label="Choose a date range"
|
3866
|
+
readonly
|
3867
|
+
value="${this.formatDateRange(this.rangeValue)}"
|
3868
|
+
>
|
3869
|
+
<nile-icon name="calendar" slot="suffix"> </nile-icon>
|
3870
|
+
</nile-input>
|
3871
|
+
`:cM`
|
3872
|
+
<nile-input
|
3873
|
+
slot="trigger"
|
3874
|
+
label="Choose a date"
|
3875
|
+
readonly
|
3876
|
+
value="${this.formatDate(this.value)}"
|
3877
|
+
>
|
3878
|
+
<nile-icon name="calendar" slot="suffix"> </nile-icon>
|
3879
|
+
</nile-input>
|
3880
|
+
`}
|
3881
|
+
|
3882
|
+
<div class="base">
|
3883
|
+
<div class="calendar-wrapper">
|
3884
|
+
<div class="calendar-container ${this.range?"with-margin":""}">
|
3885
|
+
${this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth))}
|
3886
|
+
</div>
|
3887
|
+
${this.range?cM`
|
3888
|
+
<div class="calendar-container">
|
3889
|
+
${this.renderMonth(this.currentYear,(this.currentMonth+1)%12,this.getDaysArray(this.currentYear,(this.currentMonth+1)%12))}
|
3890
|
+
</div>
|
3891
|
+
`:""}
|
3892
|
+
</div>
|
3893
|
+
${this.range?cM`
|
3894
|
+
<div class="calender-input">
|
3895
|
+
<span class="manual-input-label">From </span>
|
3896
|
+
<div class="from">
|
3897
|
+
<nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}"></nile-input>
|
3898
|
+
<nile-input class="manual-input" value="${this.formatTime(this.startDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleStartTimeInput}"> </nile-input>
|
3899
|
+
|
3900
|
+
</div>
|
3901
|
+
<br>
|
3902
|
+
<span class="manual-input-label">To </span>
|
3903
|
+
<div class="from">
|
3904
|
+
<nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>
|
3905
|
+
<nile-input class="manual-input" value="${this.formatTime(this.endDate)}" placeholder="HH:MM:SS" @nile-change="${this.handleEndTimeInput}"> </nile-input>
|
3906
|
+
</div>
|
3907
|
+
<nile-button class="apply-button" ?disabled="${!this.startDate||!this.endDate}" @click="${this.confimRange}"> Apply</nile-button>
|
3908
|
+
|
3909
|
+
</div>
|
3910
|
+
</div>
|
3911
|
+
`:""}
|
3912
|
+
</div>
|
3913
|
+
</nile-dropdown>
|
3914
|
+
`}},N([vM("nile-dropdown")],M.NileDatePicker.prototype,"dropdown",void 0),N([WM({type:Boolean,reflect:!0})],M.NileDatePicker.prototype,"dropDownOpened",void 0),N([WM({type:Object})],M.NileDatePicker.prototype,"value",void 0),N([WM({type:Object})],M.NileDatePicker.prototype,"rangeValue",void 0),N([WM({type:String,attribute:"value"})],M.NileDatePicker.prototype,"valueAttribute",void 0),N([WM({type:String,attribute:"value"})],M.NileDatePicker.prototype,"formattedDate",void 0),N([WM({type:Object})],M.NileDatePicker.prototype,"startDate",void 0),N([WM({type:Object})],M.NileDatePicker.prototype,"endDate",void 0),N([WM({type:Boolean})],M.NileDatePicker.prototype,"isSelectingStart",void 0),N([WM({type:Boolean})],M.NileDatePicker.prototype,"range",void 0),N([tN("value")],M.NileDatePicker.prototype,"valueChanged",null),M.NileDatePicker=N([mM("nile-date-picker")],M.NileDatePicker);const KD=u`
|
3666
3915
|
:host {
|
3667
3916
|
width:100%;
|
3668
3917
|
}
|
@@ -3735,7 +3984,7 @@ const gN=Symbol.for(""),uN=M=>{if((null==M?void 0:M.r)===gN)return null==M?void
|
|
3735
3984
|
.nile-error-message__expandable.expanded .nile-error-message__arrow {
|
3736
3985
|
transform: rotate(90deg);
|
3737
3986
|
}
|
3738
|
-
`;M.NileErrorMessage=class extends ZM{constructor(){super(...arguments),this.errorMessages=[],this.expandedIndex=null}static get styles(){return[
|
3987
|
+
`;M.NileErrorMessage=class extends ZM{constructor(){super(...arguments),this.errorMessages=[],this.expandedIndex=null}static get styles(){return[KD]}expandText(M,N){const D=N.querySelector(".nile-error-message__summary"),i=D.clientHeight;D.style.whiteSpace="normal",D.style.height="auto";const I=Math.min(D.clientHeight,66);D.style.height=i+"px",requestAnimationFrame((()=>{D.style.height=I+"px"}))}collapseText(M){const N=M.querySelector(".nile-error-message__summary"),D=N.clientHeight;N.style.height=D+"px",requestAnimationFrame((()=>{N.style.height="14px",N.style.whiteSpace="nowrap"}))}toggleExpand(M,N){if(this.shadowRoot&&null!==this.expandedIndex&&this.expandedIndex!==M){const M=this.shadowRoot.querySelectorAll(".nile-error-message__expandable")[this.expandedIndex];M&&this.collapseText(M)}this.expandedIndex===M?(this.expandedIndex=null,this.collapseText(N.currentTarget)):(this.expandedIndex=M,this.expandText(M,N.currentTarget))}render(){return cM`
|
3739
3988
|
<div class="nile-error-message">
|
3740
3989
|
<div class="nile-error-message__info">
|
3741
3990
|
<nile-icon
|