@hotosm/ui 0.3.1-b4 → 0.3.1-b5
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/README.md +10 -8
- package/dist/chunks/chunk.2MK55PUE.js +700 -0
- package/dist/chunks/{callout.USQGOL5A.js → chunk.3NBBS2A2.js} +2 -2
- package/dist/chunks/{chunk.4YLAIDAG.js → chunk.7RJ72M75.js} +3 -3
- package/dist/chunks/{chunk.OVCI43FD.js → chunk.MIYFUINI.js} +2 -2
- package/dist/chunks/{chunk.NQHNA5TA.js → chunk.PDLGEB7T.js} +3 -3
- package/dist/chunks/chunk.V7FZQXWL.js +667 -0
- package/dist/components/consent/consent.component.d.ts +3 -0
- package/dist/components/consent/consent.component.js +1 -1
- package/dist/components/consent/consent.js +1 -1
- package/dist/components/header/header.component.d.ts +4 -0
- package/dist/components/header/header.component.js +1 -1
- package/dist/components/header/header.js +1 -1
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/logo/logo.js +1 -1
- package/dist/components/tracking/tracking.component.d.ts +3 -0
- package/dist/components/tracking/tracking.component.js +1 -1
- package/dist/components/tracking/tracking.js +1 -1
- package/dist/hotosm-ui.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/button.QMPBLQB7.js +0 -1
- package/dist/chunks/chunk.7VBX4GII.js +0 -1
- package/dist/chunks/chunk.FIQQYKEP.js +0 -14
- package/dist/chunks/chunk.I26W4NHZ.js +0 -460
- package/dist/chunks/chunk.OHRBDQCO.js +0 -45
- package/dist/chunks/chunk.TFICHQZE.js +0 -186
- package/dist/chunks/chunk.XAMKQWQ3.js +0 -92
- package/dist/chunks/dialog.ZJLYCG4P.js +0 -217
- package/dist/chunks/icon.ZB6BUFKB.js +0 -1
- package/dist/chunks/tab-group.M6XGU33J.js +0 -360
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@awesome.me/webawesome/dist/components/callout/callout.js';
|
|
2
|
+
import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|
3
|
+
import '@awesome.me/webawesome/dist/components/button/button.js';
|
|
1
4
|
import { LitElement } from "lit";
|
|
2
5
|
import type { CSSResultGroup } from 'lit';
|
|
3
6
|
export declare class Consent extends LitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.MIYFUINI.js";import"../../chunks/chunk.3NBBS2A2.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Consent,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as t,b as e}from"../../chunks/chunk.MIYFUINI.js";import"../../chunks/chunk.3NBBS2A2.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var n=e;customElements.define("hot-consent",e);export{t as Consent,n as default};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import '@awesome.me/webawesome/dist/components/tab-group/tab-group.js';
|
|
2
|
+
import '@awesome.me/webawesome/dist/components/dialog/dialog.js';
|
|
3
|
+
import '@awesome.me/webawesome/dist/components/button/button.js';
|
|
4
|
+
import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|
1
5
|
import { LitElement } from "lit";
|
|
2
6
|
import { type sizes } from './header.styles.js';
|
|
3
7
|
import type { CSSResultGroup } from 'lit';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.V7FZQXWL.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Header,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b as e}from"../../chunks/chunk.
|
|
1
|
+
import{a,b as e}from"../../chunks/chunk.V7FZQXWL.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var t=e;customElements.define("hot-header",e);export{a as Header,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.7RJ72M75.js";import"../../chunks/chunk.UTSKEKTV.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Logo,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as o}from"../../chunks/chunk.
|
|
1
|
+
import{a as e,b as o}from"../../chunks/chunk.7RJ72M75.js";import"../../chunks/chunk.UTSKEKTV.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var l=o;customElements.define("hot-logo",o);export{e as Logo,l as default};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@awesome.me/webawesome/dist/components/callout/callout.js';
|
|
2
|
+
import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|
3
|
+
import '@awesome.me/webawesome/dist/components/button/button.js';
|
|
1
4
|
import { LitElement } from "lit";
|
|
2
5
|
declare global {
|
|
3
6
|
interface Window {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.PDLGEB7T.js";import"../../chunks/chunk.3NBBS2A2.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as MatomoTracking,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as t,b as e}from"../../chunks/chunk.PDLGEB7T.js";import"../../chunks/chunk.3NBBS2A2.js";import"../../chunks/chunk.2MK55PUE.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";var o=e;customElements.define("hot-tracking",e);export{t as MatomoTracking,o as default};
|
package/dist/hotosm-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./chunks/chunk.
|
|
1
|
+
import{b as t}from"./chunks/chunk.7RJ72M75.js";import"./chunks/chunk.UTSKEKTV.js";import{b as e}from"./chunks/chunk.PDLGEB7T.js";import{b as r}from"./chunks/chunk.MIYFUINI.js";import"./chunks/chunk.3NBBS2A2.js";import"./chunks/chunk.T4GALJJA.js";import{b as o}from"./chunks/chunk.V7FZQXWL.js";import"./chunks/chunk.2MK55PUE.js";import"./chunks/chunk.6ZDEZIWM.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.IG27I42A.js";import"./chunks/chunk.U4P7XQR4.js";import"./chunks/chunk.NI7UJOOZ.js";export{r as Consent,o as Header,t as Logo,e as Tracking};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as t}from"./chunk.I26W4NHZ.js";import"./chunk.OHRBDQCO.js";import"./chunk.TFICHQZE.js";import"./chunk.FIQQYKEP.js";import"./chunk.6ZDEZIWM.js";import"./chunk.U4P7XQR4.js";import"./chunk.NI7UJOOZ.js";export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function m(o,t){return{top:Math.round(o.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(o.getBoundingClientRect().left-t.getBoundingClientRect().left)}}var n=new Set;function g(){let o=document.documentElement.clientWidth;return Math.abs(window.innerWidth-o)}function p(){let o=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(o)||!o?0:o}function h(o){if(n.add(o),!document.documentElement.classList.contains("wa-scroll-lock")){let t=g()+p(),l=getComputedStyle(document.documentElement).scrollbarGutter;(!l||l==="auto")&&(l="stable"),t<2&&(l=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",l),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${t}px`)}}function a(o){n.delete(o),n.size===0&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function y(o,t,l="vertical",e="smooth"){let d=m(o,t),c=d.top+t.scrollTop,s=d.left+t.scrollLeft,i=t.scrollLeft,f=t.scrollLeft+t.offsetWidth,u=t.scrollTop,r=t.scrollTop+t.offsetHeight;(l==="horizontal"||l==="both")&&(s<i?t.scrollTo({left:s,behavior:e}):s+o.clientWidth>f&&t.scrollTo({left:s-t.offsetWidth+o.clientWidth,behavior:e})),(l==="vertical"||l==="both")&&(c<u?t.scrollTo({top:c,behavior:e}):c+o.clientHeight>r&&t.scrollTo({top:c-t.offsetHeight+o.clientHeight,behavior:e}))}export{h as a,a as b,y as c};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk.6ZDEZIWM.js";import{a as c,k as f}from"./chunk.U4P7XQR4.js";import{a as p}from"./chunk.NI7UJOOZ.js";var m=Object.defineProperty,w=Object.getOwnPropertyDescriptor,u=e=>{throw TypeError(e)},n=(e,t,s,r)=>{for(var i=r>1?void 0:r?w(t,s):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(i=(r?h(t,s,i):h(i))||i);return r&&i&&m(t,s,i),i},v=(e,t,s)=>t.has(e)||u("Cannot "+s),_=(e,t,s)=>(v(e,t,"read from private field"),s?s.call(e):t.get(e)),y=(e,t,s)=>t.has(e)?u("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),S=(e,t,s,r)=>(v(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s);var b=`:host {
|
|
2
|
-
box-sizing: border-box !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:host *,
|
|
6
|
-
:host *::before,
|
|
7
|
-
:host *::after {
|
|
8
|
-
box-sizing: inherit !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[hidden] {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
`,o,d=class extends f{constructor(){super(),y(this,o,!1),this.initialReflectedProperties=new Map,this.didSSR=!1||!!this.shadowRoot,this.customStates={set:(t,s)=>{var r;(r=this.internals)!=null&&r.states&&(s?this.internals.states.add(t):this.internals.states.delete(t))},has:t=>{var s;return(s=this.internals)!=null&&s.states?this.internals.states.has(t):!1}};try{this.internals=this.attachInternals()}catch(t){console.error("Element internals are not supported in your browser. Consider using a polyfill")}this.customStates.set("wa-defined",!0);let e=this.constructor;for(let[t,s]of e.elementProperties)s.default==="inherit"&&s.initial!==void 0&&typeof t=="string"&&this.customStates.set(`initial-${t}-${s.initial}`,!0)}static get styles(){let e=Array.isArray(this.css)?this.css:this.css?[this.css]:[];return[b,...e].map(t=>typeof t=="string"?c(t):t)}attributeChangedCallback(e,t,s){_(this,o)||(this.constructor.elementProperties.forEach((r,i)=>{r.reflect&&this[i]!=null&&this.initialReflectedProperties.set(i,this[i])}),S(this,o,!0)),super.attributeChangedCallback(e,t,s)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,s)=>{e.has(s)&&this[s]==null&&(this[s]=t)})}firstUpdated(e){var t;super.firstUpdated(e),this.didSSR&&((t=this.shadowRoot)==null||t.querySelectorAll("slot").forEach(s=>{s.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}update(e){try{super.update(e)}catch(t){if(this.didSSR&&!this.hasUpdated){let s=new Event("lit-hydration-error",{bubbles:!0,composed:!0,cancelable:!1});s.error=t,this.dispatchEvent(s)}throw t}}relayNativeEvent(e,t){e.stopImmediatePropagation(),this.dispatchEvent(new e.constructor(e.type,p(p({},e),t)))}};o=new WeakMap;n([a()],d.prototype,"dir",2);n([a()],d.prototype,"lang",2);n([a({type:Boolean,reflect:!0,attribute:"did-ssr"})],d.prototype,"didSSR",2);export{n as a,d as b};
|
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunk.OHRBDQCO.js";import{a as F,b as j}from"./chunk.TFICHQZE.js";import{a,b as y}from"./chunk.FIQQYKEP.js";import{a as w,b as s,c as x,d as $}from"./chunk.6ZDEZIWM.js";import{e as g,f as z,g as M,h as O,i as U}from"./chunk.U4P7XQR4.js";var S=new Set,b=new Map,f,V="ltr",T="en",H=typeof MutationObserver!="undefined"&&typeof document!="undefined"&&typeof document.documentElement!="undefined";if(H){let t=new MutationObserver(W);V=document.documentElement.dir||"ltr",T=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function v(...t){t.map(e=>{let r=e.$code.toLowerCase();b.has(r)?b.set(r,Object.assign(Object.assign({},b.get(r)),e)):b.set(r,e),f||(f=e)}),W()}function W(){H&&(V=document.documentElement.dir||"ltr",T=document.documentElement.lang||navigator.language),[...S.keys()].map(t=>{typeof t.requestUpdate=="function"&&t.requestUpdate()})}var E=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){S.add(this.host)}hostDisconnected(){S.delete(this.host)}dir(){return`${this.host.dir||V}`.toLowerCase()}lang(){return`${this.host.lang||T}`.toLowerCase()}getTranslationData(e){var r,n;let i=new Intl.Locale(e.replace(/_/g,"-")),o=i==null?void 0:i.language.toLowerCase(),d=(n=(r=i==null?void 0:i.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&n!==void 0?n:"",c=b.get(`${o}-${d}`),m=b.get(o);return{locale:i,language:o,region:d,primary:c,secondary:m}}exists(e,r){var n;let{primary:i,secondary:o}=this.getTranslationData((n=r.lang)!==null&&n!==void 0?n:this.lang());return r=Object.assign({includeFallback:!1},r),!!(i&&i[e]||o&&o[e]||r.includeFallback&&f&&f[e])}term(e,...r){let{primary:n,secondary:i}=this.getTranslationData(this.lang()),o;if(n&&n[e])o=n[e];else if(i&&i[e])o=i[e];else if(f&&f[e])o=f[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof o=="function"?o(...r):o}date(e,r){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),r).format(e)}number(e,r){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),r).format(e)}relativeTime(e,r,n){return new Intl.RelativeTimeFormat(this.lang(),n).format(e,r)}};var K={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>t===0?"No options selected":t===1?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollableRegion:"Scrollable region",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format",zoomIn:"Zoom in",zoomOut:"Zoom out"};v(K);var P=K;var _=class extends E{};v(P);var X=()=>({checkValidity(t){let e=t.input,r={message:"",isValid:!0,invalidKeys:[]};if(!e)return r;let n=!0;if("checkValidity"in e&&(n=e.checkValidity()),n)return r;if(r.isValid=!1,"validationMessage"in e&&(r.message=e.validationMessage),!("validity"in e))return r.invalidKeys.push("customError"),r;for(let i in e.validity){if(i==="valid")continue;let o=i;e.validity[o]&&r.invalidKeys.push(o)}return r}});var A=class extends Event{constructor(){super("wa-invalid",{bubbles:!0,cancelable:!1,composed:!0})}},et=()=>({observedAttributes:["custom-error"],checkValidity(t){let e={message:"",isValid:!0,invalidKeys:[]};return t.customError&&(e.message=t.customError,e.isValid=!1,e.invalidKeys=["customError"]),e}}),h=class extends y{constructor(){super(),this.name=null,this.disabled=!1,this.required=!1,this.assumeInteractionOn=["input"],this.validators=[],this.valueHasChanged=!1,this.hasInteracted=!1,this.customError=null,this.emittedEvents=[],this.emitInvalid=t=>{t.target===this&&(this.hasInteracted=!0,this.dispatchEvent(new A))},this.handleInteraction=t=>{var r;let e=this.emittedEvents;e.includes(t.type)||e.push(t.type),e.length===((r=this.assumeInteractionOn)==null?void 0:r.length)&&(this.hasInteracted=!0)},!1||this.addEventListener("invalid",this.emitInvalid)}static get validators(){return[et()]}static get observedAttributes(){let t=new Set(super.observedAttributes||[]);for(let e of this.validators)if(e.observedAttributes)for(let r of e.observedAttributes)t.add(r);return[...t]}connectedCallback(){super.connectedCallback(),this.updateValidity(),this.assumeInteractionOn.forEach(t=>{this.addEventListener(t,this.handleInteraction)})}firstUpdated(...t){super.firstUpdated(...t),this.updateValidity()}willUpdate(t){if(!!1&&t.has("customError")&&(this.customError||(this.customError=null),this.setCustomValidity(this.customError||"")),t.has("value")||t.has("disabled")){let e=this.value;if(Array.isArray(e)){if(this.name){let r=new FormData;for(let n of e)r.append(this.name,n);this.setValue(r,r)}}else this.setValue(e,e)}t.has("disabled")&&(this.customStates.set("disabled",this.disabled),(this.hasAttribute("disabled")||!!1&&!this.matches(":disabled"))&&this.toggleAttribute("disabled",this.disabled)),this.updateValidity(),super.willUpdate(t)}get labels(){return this.internals.labels}getForm(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}get validationMessage(){return this.internals.validationMessage}checkValidity(){return this.updateValidity(),this.internals.checkValidity()}reportValidity(){return this.updateValidity(),this.hasInteracted=!0,this.internals.reportValidity()}get validationTarget(){return this.input||void 0}setValidity(...t){let e=t[0],r=t[1],n=t[2];n||(n=this.validationTarget),this.internals.setValidity(e,r,n||void 0),this.requestUpdate("validity"),this.setCustomStates()}setCustomStates(){let t=!!this.required,e=this.internals.validity.valid,r=this.hasInteracted;this.customStates.set("required",t),this.customStates.set("optional",!t),this.customStates.set("invalid",!e),this.customStates.set("valid",e),this.customStates.set("user-invalid",!e&&r),this.customStates.set("user-valid",e&&r)}setCustomValidity(t){if(!t){this.customError=null,this.setValidity({});return}this.customError=t,this.setValidity({customError:!0},t,this.validationTarget)}formResetCallback(){this.resetValidity(),this.hasInteracted=!1,this.valueHasChanged=!1,this.emittedEvents=[],this.updateValidity()}formDisabledCallback(t){this.disabled=t,this.updateValidity()}formStateRestoreCallback(t,e){this.value=t,e==="restore"&&this.resetValidity(),this.updateValidity()}setValue(...t){let[e,r]=t;this.internals.setFormValue(e,r)}get allValidators(){let t=this.constructor.validators||[],e=this.validators||[];return[...t,...e]}resetValidity(){this.setCustomValidity(""),this.setValidity({})}updateValidity(){if(this.disabled||this.hasAttribute("disabled")||!this.willValidate){this.resetValidity();return}let t=this.allValidators;if(!(t!=null&&t.length))return;let e={customError:!!this.customError},r=this.validationTarget||this.input||void 0,n="";for(let i of t){let{isValid:o,message:d,invalidKeys:c}=i.checkValidity(this);o||(n||(n=d),(c==null?void 0:c.length)>=0&&c.forEach(m=>e[m]=!0))}n||(n=this.validationMessage),this.setValidity(e,n,r)}};h.formAssociated=!0;a([s({reflect:!0})],h.prototype,"name",2);a([s({type:Boolean})],h.prototype,"disabled",2);a([s({state:!0,attribute:!1})],h.prototype,"valueHasChanged",2);a([s({state:!0,attribute:!1})],h.prototype,"hasInteracted",2);a([s({attribute:"custom-error",reflect:!0})],h.prototype,"customError",2);a([s({attribute:!1,state:!0,type:Object})],h.prototype,"validity",1);var Z=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=r=>{let n=r.target;(this.slotNames.includes("[default]")&&!n.name||n.name&&this.slotNames.includes(n.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(e.tagName.toLowerCase()==="wa-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};var G={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Y=t=>(...e)=>({_$litDirective$:t,values:e}),k=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var J=Y(class extends k{constructor(t){var e;if(super(t),t.type!==G.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var n,i;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in e)e[o]&&!((n=this.nt)!=null&&n.has(o))&&this.st.add(o);return this.render(e)}let r=t.element.classList;for(let o of this.st)o in e||(r.remove(o),this.st.delete(o));for(let o in e){let d=!!e[o];d===this.st.has(o)||(i=this.nt)!=null&&i.has(o)||(d?(r.add(o),this.st.add(o)):(r.remove(o),this.st.delete(o)))}return O}});var u=t=>t!=null?t:U;var tt=Symbol.for(""),rt=t=>{if((t==null?void 0:t.r)===tt)return t==null?void 0:t._$litStatic$};var L=(t,...e)=>({_$litStatic$:e.reduce((r,n,i)=>r+(o=>{if(o._$litStatic$!==void 0)return o._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${o}. Use 'unsafeStatic' to pass non-literal values, but
|
|
2
|
-
take care to ensure page security.`)})(n)+t[i+1],t[0]),r:tt}),Q=new Map,N=t=>(e,...r)=>{let n=r.length,i,o,d=[],c=[],m,p=0,D=!1;for(;p<n;){for(m=e[p];p<n&&(o=r[p],(i=rt(o))!==void 0);)m+=i+e[++p],D=!0;p!==n&&c.push(o),d.push(m),p++}if(p===n&&d.push(e[n]),D){let B=d.join("$$lit$$");(e=Q.get(B))===void 0&&(d.raw=d,Q.set(B,e=d)),r=c}return t(e,...r)},C=N(g),Dt=N(z),Bt=N(M);var nt=`@layer wa-component {
|
|
3
|
-
:host {
|
|
4
|
-
display: inline-block;
|
|
5
|
-
position: relative;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.button {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
text-decoration: none;
|
|
14
|
-
user-select: none;
|
|
15
|
-
-webkit-user-select: none;
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
vertical-align: middle;
|
|
18
|
-
transition-property: background, border, box-shadow, color;
|
|
19
|
-
transition-duration: var(--wa-transition-fast);
|
|
20
|
-
transition-timing-function: var(--wa-transition-easing);
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
padding: 0 var(--wa-form-control-padding-inline);
|
|
23
|
-
font-family: inherit;
|
|
24
|
-
font-size: inherit;
|
|
25
|
-
font-weight: var(--wa-font-weight-action);
|
|
26
|
-
line-height: calc(var(--wa-form-control-height) - var(--border-width) * 2);
|
|
27
|
-
height: var(--wa-form-control-height);
|
|
28
|
-
width: 100%;
|
|
29
|
-
|
|
30
|
-
background-color: var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud));
|
|
31
|
-
border-color: transparent;
|
|
32
|
-
color: var(--wa-color-on-loud, var(--wa-color-neutral-on-loud));
|
|
33
|
-
border-radius: var(--wa-form-control-border-radius);
|
|
34
|
-
border-style: var(--wa-border-style);
|
|
35
|
-
border-width: var(--wa-border-width-s);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* Appearance modifiers */
|
|
39
|
-
:host([appearance~='plain']) {
|
|
40
|
-
.button {
|
|
41
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
border-color: transparent;
|
|
44
|
-
}
|
|
45
|
-
@media (hover: hover) {
|
|
46
|
-
.button:not(.disabled):not(.loading):hover {
|
|
47
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
48
|
-
background-color: var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.button:not(.disabled):not(.loading):active {
|
|
52
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
53
|
-
background-color: color-mix(
|
|
54
|
-
in oklab,
|
|
55
|
-
var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet)),
|
|
56
|
-
var(--wa-color-mix-active)
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host([appearance~='outlined']) {
|
|
62
|
-
.button {
|
|
63
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
64
|
-
background-color: transparent;
|
|
65
|
-
border-color: var(--wa-color-border-loud, var(--wa-color-neutral-border-loud));
|
|
66
|
-
}
|
|
67
|
-
@media (hover: hover) {
|
|
68
|
-
.button:not(.disabled):not(.loading):hover {
|
|
69
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
70
|
-
background-color: var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.button:not(.disabled):not(.loading):active {
|
|
74
|
-
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
|
75
|
-
background-color: color-mix(
|
|
76
|
-
in oklab,
|
|
77
|
-
var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet)),
|
|
78
|
-
var(--wa-color-mix-active)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([appearance~='filled']) {
|
|
84
|
-
.button {
|
|
85
|
-
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
|
|
86
|
-
background-color: var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal));
|
|
87
|
-
border-color: transparent;
|
|
88
|
-
}
|
|
89
|
-
@media (hover: hover) {
|
|
90
|
-
.button:not(.disabled):not(.loading):hover {
|
|
91
|
-
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
|
|
92
|
-
background-color: color-mix(
|
|
93
|
-
in oklab,
|
|
94
|
-
var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal)),
|
|
95
|
-
var(--wa-color-mix-hover)
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
.button:not(.disabled):not(.loading):active {
|
|
100
|
-
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
|
|
101
|
-
background-color: color-mix(
|
|
102
|
-
in oklab,
|
|
103
|
-
var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal)),
|
|
104
|
-
var(--wa-color-mix-active)
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:host([appearance~='outlined']) .button {
|
|
109
|
-
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([appearance~='accent']) {
|
|
114
|
-
.button {
|
|
115
|
-
color: var(--wa-color-on-loud, var(--wa-color-neutral-on-loud));
|
|
116
|
-
background-color: var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud));
|
|
117
|
-
border-color: transparent;
|
|
118
|
-
}
|
|
119
|
-
@media (hover: hover) {
|
|
120
|
-
.button:not(.disabled):not(.loading):hover {
|
|
121
|
-
background-color: color-mix(
|
|
122
|
-
in oklab,
|
|
123
|
-
var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud)),
|
|
124
|
-
var(--wa-color-mix-hover)
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
.button:not(.disabled):not(.loading):active {
|
|
129
|
-
background-color: color-mix(
|
|
130
|
-
in oklab,
|
|
131
|
-
var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud)),
|
|
132
|
-
var(--wa-color-mix-active)
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Focus states */
|
|
138
|
-
.button:focus {
|
|
139
|
-
outline: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.button:focus-visible {
|
|
143
|
-
outline: var(--wa-focus-ring);
|
|
144
|
-
outline-offset: var(--wa-focus-ring-offset);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/* Disabled state */
|
|
148
|
-
.button.disabled {
|
|
149
|
-
opacity: 0.5;
|
|
150
|
-
cursor: not-allowed;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* When disabled, prevent mouse events from bubbling up from children */
|
|
154
|
-
.button.disabled * {
|
|
155
|
-
pointer-events: none;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* Keep it last so Safari doesn't stop parsing this block */
|
|
159
|
-
.button::-moz-focus-inner {
|
|
160
|
-
border: 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* Icon buttons */
|
|
164
|
-
.button.is-icon-button {
|
|
165
|
-
outline-offset: 2px;
|
|
166
|
-
width: var(--wa-form-control-height);
|
|
167
|
-
aspect-ratio: 1;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* Pill modifier */
|
|
171
|
-
:host([pill]) .button {
|
|
172
|
-
border-radius: var(--wa-border-radius-pill);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/*
|
|
176
|
-
* Label
|
|
177
|
-
*/
|
|
178
|
-
|
|
179
|
-
.start,
|
|
180
|
-
.end {
|
|
181
|
-
flex: 0 0 auto;
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
pointer-events: none;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.label {
|
|
188
|
-
display: flex;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.label::slotted(wa-icon) {
|
|
192
|
-
align-self: center;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/*
|
|
196
|
-
* Caret modifier
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
wa-icon[part~='caret'] {
|
|
200
|
-
display: flex;
|
|
201
|
-
align-self: center;
|
|
202
|
-
align-items: center;
|
|
203
|
-
|
|
204
|
-
&::part(svg) {
|
|
205
|
-
width: 0.875em;
|
|
206
|
-
height: 0.875em;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.button:has(&) .end {
|
|
210
|
-
display: none;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/*
|
|
215
|
-
* Loading modifier
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
.loading {
|
|
219
|
-
position: relative;
|
|
220
|
-
cursor: wait;
|
|
221
|
-
|
|
222
|
-
.start,
|
|
223
|
-
.label,
|
|
224
|
-
.end,
|
|
225
|
-
.caret {
|
|
226
|
-
visibility: hidden;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
wa-spinner {
|
|
230
|
-
--indicator-color: currentColor;
|
|
231
|
-
--track-color: color-mix(in oklab, currentColor, transparent 90%);
|
|
232
|
-
|
|
233
|
-
position: absolute;
|
|
234
|
-
font-size: 1em;
|
|
235
|
-
height: 1em;
|
|
236
|
-
width: 1em;
|
|
237
|
-
top: calc(50% - 0.5em);
|
|
238
|
-
left: calc(50% - 0.5em);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/*
|
|
243
|
-
* Badges
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
button ::slotted(wa-badge) {
|
|
247
|
-
border-color: var(--wa-color-surface-default);
|
|
248
|
-
position: absolute;
|
|
249
|
-
inset-block-start: 0;
|
|
250
|
-
inset-inline-end: 0;
|
|
251
|
-
translate: 50% -50%;
|
|
252
|
-
pointer-events: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
:host(:dir(rtl)) ::slotted(wa-badge) {
|
|
256
|
-
translate: -50% -50%;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/*
|
|
260
|
-
* Button spacing
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
slot[name='start']::slotted(*) {
|
|
264
|
-
margin-inline-end: 0.75em;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
slot[name='end']::slotted(*),
|
|
268
|
-
.button:not(.visually-hidden-label) [part~='caret'] {
|
|
269
|
-
margin-inline-start: 0.75em;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/*
|
|
273
|
-
* Button group border radius modifications
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
/* Remove border radius from all grouped buttons by default */
|
|
277
|
-
:host(.wa-button-group__button) .button {
|
|
278
|
-
border-radius: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/* Horizontal orientation */
|
|
282
|
-
:host(.wa-button-group__horizontal.wa-button-group__button-first) .button {
|
|
283
|
-
border-start-start-radius: var(--wa-form-control-border-radius);
|
|
284
|
-
border-end-start-radius: var(--wa-form-control-border-radius);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
:host(.wa-button-group__horizontal.wa-button-group__button-last) .button {
|
|
288
|
-
border-start-end-radius: var(--wa-form-control-border-radius);
|
|
289
|
-
border-end-end-radius: var(--wa-form-control-border-radius);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/* Vertical orientation */
|
|
293
|
-
:host(.wa-button-group__vertical) {
|
|
294
|
-
flex: 1 1 auto;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
:host(.wa-button-group__vertical) .button {
|
|
298
|
-
width: 100%;
|
|
299
|
-
justify-content: start;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
:host(.wa-button-group__vertical.wa-button-group__button-first) .button {
|
|
303
|
-
border-start-start-radius: var(--wa-form-control-border-radius);
|
|
304
|
-
border-start-end-radius: var(--wa-form-control-border-radius);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
:host(.wa-button-group__vertical.wa-button-group__button-last) .button {
|
|
308
|
-
border-end-start-radius: var(--wa-form-control-border-radius);
|
|
309
|
-
border-end-end-radius: var(--wa-form-control-border-radius);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/* Handle pill modifier for button groups */
|
|
313
|
-
:host([pill]) .wa-button-group__horizontal.wa-button-group__button-first {
|
|
314
|
-
border-start-start-radius: var(--wa-border-radius-pill);
|
|
315
|
-
border-end-start-radius: var(--wa-border-radius-pill);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
:host([pill]) .wa-button-group__horizontal.wa-button-group__button-last {
|
|
319
|
-
border-start-end-radius: var(--wa-border-radius-pill);
|
|
320
|
-
border-end-end-radius: var(--wa-border-radius-pill);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
:host([pill]) .wa-button-group__vertical.wa-button-group__button-first {
|
|
324
|
-
border-start-start-radius: var(--wa-border-radius-pill);
|
|
325
|
-
border-start-end-radius: var(--wa-border-radius-pill);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
:host([pill]) .wa-button-group__vertical.wa-button-group__button-last {
|
|
329
|
-
border-end-start-radius: var(--wa-border-radius-pill);
|
|
330
|
-
border-end-end-radius: var(--wa-border-radius-pill);
|
|
331
|
-
}
|
|
332
|
-
`,l=class extends h{constructor(){super(...arguments),this.assumeInteractionOn=["click"],this.hasSlotController=new Z(this,"[default]","start","end"),this.localize=new _(this),this.invalid=!1,this.isIconButton=!1,this.title="",this.variant="neutral",this.appearance="accent",this.size="medium",this.withCaret=!1,this.disabled=!1,this.loading=!1,this.pill=!1,this.type="button",this.form=null}static get validators(){return[...super.validators,X()]}constructLightDOMButton(){let t=document.createElement("button");return t.type=this.type,t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.clipPath="inset(50%)",t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.name&&(t.name=this.name),t.value=this.value||"",["form","formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(e=>{this.hasAttribute(e)&&t.setAttribute(e,this.getAttribute(e))}),t}handleClick(){var r;if(!this.getForm())return;let e=this.constructLightDOMButton();(r=this.parentElement)==null||r.append(e),e.click(),e.remove()}handleInvalid(){this.dispatchEvent(new A)}handleLabelSlotChange(){let t=this.labelSlot.assignedNodes({flatten:!0}),e=!1,r=!1,n="";[...t].forEach(i=>{i.nodeType===Node.ELEMENT_NODE&&i.localName==="wa-icon"&&(r=!0,e||(e=i.hasAttribute("label"))),i.nodeType===Node.TEXT_NODE&&(n+=i.textContent)}),this.isIconButton=n.trim()===""&&r,this.isIconButton&&!e&&console.warn('Icon buttons must have a label for screen readers. Add <wa-icon label="..."> to remove this warning.',this)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.updateValidity()}setValue(...t){}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t=this.isLink(),e=t?L`a`:L`button`;return C`
|
|
333
|
-
<${e}
|
|
334
|
-
part="base"
|
|
335
|
-
class=${J({button:!0,caret:this.withCaret,disabled:this.disabled,loading:this.loading,rtl:this.localize.dir()==="rtl","has-label":this.hasSlotController.test("[default]"),"has-start":this.hasSlotController.test("start"),"has-end":this.hasSlotController.test("end"),"is-icon-button":this.isIconButton})}
|
|
336
|
-
?disabled=${u(t?void 0:this.disabled)}
|
|
337
|
-
type=${u(t?void 0:this.type)}
|
|
338
|
-
title=${this.title}
|
|
339
|
-
name=${u(t?void 0:this.name)}
|
|
340
|
-
value=${u(t?void 0:this.value)}
|
|
341
|
-
href=${u(t?this.href:void 0)}
|
|
342
|
-
target=${u(t?this.target:void 0)}
|
|
343
|
-
download=${u(t?this.download:void 0)}
|
|
344
|
-
rel=${u(t&&this.rel?this.rel:void 0)}
|
|
345
|
-
role=${u(t?void 0:"button")}
|
|
346
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
347
|
-
tabindex=${this.disabled?"-1":"0"}
|
|
348
|
-
@invalid=${this.isButton()?this.handleInvalid:null}
|
|
349
|
-
@click=${this.handleClick}
|
|
350
|
-
>
|
|
351
|
-
<slot name="start" part="start" class="start"></slot>
|
|
352
|
-
<slot part="label" class="label" @slotchange=${this.handleLabelSlotChange}></slot>
|
|
353
|
-
<slot name="end" part="end" class="end"></slot>
|
|
354
|
-
${this.withCaret?C`
|
|
355
|
-
<wa-icon part="caret" class="caret" library="system" name="chevron-down" variant="solid"></wa-icon>
|
|
356
|
-
`:""}
|
|
357
|
-
${this.loading?C`<wa-spinner part="spinner"></wa-spinner>`:""}
|
|
358
|
-
</${e}>
|
|
359
|
-
`}};l.css=[nt,j,F];a([$(".button")],l.prototype,"button",2);a([$("slot:not([name])")],l.prototype,"labelSlot",2);a([x()],l.prototype,"invalid",2);a([x()],l.prototype,"isIconButton",2);a([s()],l.prototype,"title",2);a([s({reflect:!0})],l.prototype,"variant",2);a([s({reflect:!0})],l.prototype,"appearance",2);a([s({reflect:!0})],l.prototype,"size",2);a([s({attribute:"with-caret",type:Boolean,reflect:!0})],l.prototype,"withCaret",2);a([s({type:Boolean})],l.prototype,"disabled",2);a([s({type:Boolean,reflect:!0})],l.prototype,"loading",2);a([s({type:Boolean,reflect:!0})],l.prototype,"pill",2);a([s()],l.prototype,"type",2);a([s({reflect:!0})],l.prototype,"name",2);a([s({reflect:!0})],l.prototype,"value",2);a([s({reflect:!0})],l.prototype,"href",2);a([s()],l.prototype,"target",2);a([s()],l.prototype,"rel",2);a([s()],l.prototype,"download",2);a([s({reflect:!0})],l.prototype,"form",2);a([s({attribute:"formaction"})],l.prototype,"formAction",2);a([s({attribute:"formenctype"})],l.prototype,"formEnctype",2);a([s({attribute:"formmethod"})],l.prototype,"formMethod",2);a([s({attribute:"formnovalidate",type:Boolean})],l.prototype,"formNoValidate",2);a([s({attribute:"formtarget"})],l.prototype,"formTarget",2);a([R("disabled",{waitUntilFirstUpdate:!0})],l.prototype,"handleDisabledChange",1);l=a([w("wa-button")],l);var ot=`:host {
|
|
360
|
-
--track-width: 2px;
|
|
361
|
-
--track-color: var(--wa-color-neutral-fill-normal);
|
|
362
|
-
--indicator-color: var(--wa-color-brand-fill-loud);
|
|
363
|
-
--speed: 2s;
|
|
364
|
-
|
|
365
|
-
/* Resizing a spinner element using anything but font-size will break the animation because the animation uses em units.
|
|
366
|
-
Therefore, if a spinner is used in a flex container without \`flex: none\` applied, the spinner can grow/shrink and
|
|
367
|
-
break the animation. The use of \`flex: none\` on the host element prevents this by always having the spinner sized
|
|
368
|
-
according to its actual dimensions.
|
|
369
|
-
*/
|
|
370
|
-
flex: none;
|
|
371
|
-
display: inline-flex;
|
|
372
|
-
width: 1em;
|
|
373
|
-
height: 1em;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
svg {
|
|
377
|
-
width: 100%;
|
|
378
|
-
height: 100%;
|
|
379
|
-
aspect-ratio: 1;
|
|
380
|
-
animation: spin var(--speed) linear infinite;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.track {
|
|
384
|
-
stroke: var(--track-color);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.indicator {
|
|
388
|
-
stroke: var(--indicator-color);
|
|
389
|
-
stroke-dasharray: 75, 100;
|
|
390
|
-
stroke-dashoffset: -5;
|
|
391
|
-
animation: dash 1.5s ease-in-out infinite;
|
|
392
|
-
stroke-linecap: round;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
@keyframes spin {
|
|
396
|
-
0% {
|
|
397
|
-
transform: rotate(0deg);
|
|
398
|
-
}
|
|
399
|
-
100% {
|
|
400
|
-
transform: rotate(360deg);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
@keyframes dash {
|
|
405
|
-
0% {
|
|
406
|
-
stroke-dasharray: 1, 150;
|
|
407
|
-
stroke-dashoffset: 0;
|
|
408
|
-
}
|
|
409
|
-
50% {
|
|
410
|
-
stroke-dasharray: 90, 150;
|
|
411
|
-
stroke-dashoffset: -35;
|
|
412
|
-
}
|
|
413
|
-
100% {
|
|
414
|
-
stroke-dasharray: 90, 150;
|
|
415
|
-
stroke-dashoffset: -124;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
`,q=class extends y{constructor(){super(...arguments),this.localize=new _(this)}render(){return g`
|
|
419
|
-
<svg
|
|
420
|
-
part="base"
|
|
421
|
-
role="progressbar"
|
|
422
|
-
aria-label=${this.localize.term("loading")}
|
|
423
|
-
fill="none"
|
|
424
|
-
viewBox="0 0 50 50"
|
|
425
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
426
|
-
>
|
|
427
|
-
<circle class="track" cx="25" cy="25" r="20" fill="none" stroke-width="5" />
|
|
428
|
-
<circle class="indicator" cx="25" cy="25" r="20" fill="none" stroke-width="5" />
|
|
429
|
-
</svg>
|
|
430
|
-
`}};q.css=ot;q=a([w("wa-spinner")],q);export{_ as a,J as b,Z as c,l as d};
|
|
431
|
-
/*! Bundled license information:
|
|
432
|
-
|
|
433
|
-
lit-html/directive.js:
|
|
434
|
-
(**
|
|
435
|
-
* @license
|
|
436
|
-
* Copyright 2017 Google LLC
|
|
437
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
438
|
-
*)
|
|
439
|
-
|
|
440
|
-
lit-html/directives/class-map.js:
|
|
441
|
-
(**
|
|
442
|
-
* @license
|
|
443
|
-
* Copyright 2018 Google LLC
|
|
444
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
445
|
-
*)
|
|
446
|
-
|
|
447
|
-
lit-html/directives/if-defined.js:
|
|
448
|
-
(**
|
|
449
|
-
* @license
|
|
450
|
-
* Copyright 2018 Google LLC
|
|
451
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
452
|
-
*)
|
|
453
|
-
|
|
454
|
-
lit-html/static.js:
|
|
455
|
-
(**
|
|
456
|
-
* @license
|
|
457
|
-
* Copyright 2020 Google LLC
|
|
458
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
459
|
-
*)
|
|
460
|
-
*/
|