@umbraco-ui/uui 1.17.0-rc.2 → 1.17.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/uui.min.js +387 -867
- package/dist/uui.min.js.map +1 -1
- package/package.json +85 -85
package/dist/uui.min.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(n,We){typeof exports=="object"&&typeof module<"u"?We(exports):typeof define=="function"&&define.amd?define(["exports"],We):(n=typeof globalThis<"u"?globalThis:n||self,We(n.uui={}))})(this,(function(n){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const We=window,gr=We.ShadowRoot&&(We.ShadyCSS===void 0||We.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fr=Symbol(),Us=new WeakMap;let ks=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==fr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(gr&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Us.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Us.set(t,e))}return e}toString(){return this.cssText}};const qe=i=>new ks(typeof i=="string"?i:i+"",void 0,fr),b=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((r,o,s)=>r+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[s+1]),i[0]);return new ks(t,i,fr)},Tu=(i,e)=>{gr?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((t=>{const r=document.createElement("style"),o=We.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,i.appendChild(r)}))},Es=gr?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return qe(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var yr;const lo=window,xs=lo.trustedTypes,Bu=xs?xs.emptyScript:"",Is=lo.reactiveElementPolyfillSupport,wr={toAttribute(i,e){switch(e){case Boolean:i=i?Bu:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Cs=(i,e)=>e!==i&&(e==e||i==i),$r={attribute:!0,type:String,converter:wr,reflect:!1,hasChanged:Cs},_r="finalized";let Ct=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const o=this._$Ep(r,t);o!==void 0&&(this._$Ev.set(o,r),e.push(o))})),e}static createProperty(e,t=$r){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,r,t);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(o){const s=this[e];this[t]=o,this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||$r}static finalize(){if(this.hasOwnProperty(_r))return!1;this[_r]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of r)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)t.unshift(Es(o))}else e!==void 0&&t.push(Es(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach((t=>t(this)))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Tu(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach((t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach((t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=$r){var o;const s=this.constructor._$Ep(e,r);if(s!==void 0&&r.reflect===!0){const a=(((o=r.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?r.converter:wr).toAttribute(t,r.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,t){var r;const o=this.constructor,s=o._$Ev.get(e);if(s!==void 0&&this._$El!==s){const a=o.getPropertyOptions(s),u=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?a.converter:wr;this._$El=s,this[s]=u.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,r){let o=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||Cs)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((o,s)=>this[s]=o)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach((o=>{var s;return(s=o.hostUpdate)===null||s===void 0?void 0:s.call(o)})),this.update(r)):this._$Ek()}catch(o){throw t=!1,this._$Ek(),o}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach((r=>{var o;return(o=r.hostUpdated)===null||o===void 0?void 0:o.call(r)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach(((t,r)=>this._$EO(r,this[r],t))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Ct[_r]=!0,Ct.elementProperties=new Map,Ct.elementStyles=[],Ct.shadowRootOptions={mode:"open"},Is?.({ReactiveElement:Ct}),((yr=lo.reactiveElementVersions)!==null&&yr!==void 0?yr:lo.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var Ur;const uo=window,St=uo.trustedTypes,Ss=St?St.createPolicy("lit-html",{createHTML:i=>i}):void 0,kr="$lit$",Ke=`lit$${(Math.random()+"").slice(9)}$`,As="?"+Ke,Du=`<${As}>`,st=document,co=()=>st.createComment(""),fi=i=>i===null||typeof i!="object"&&typeof i!="function",Ps=Array.isArray,Vu=i=>Ps(i)||typeof i?.[Symbol.iterator]=="function",Er=`[
|
|
14
|
+
\f\r]`,yi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zs=/-->/g,Os=/>/g,at=RegExp(`>|${Er}(?:([^\\s"'>=/]+)(${Er}*=${Er}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ls=/'/g,Ms=/"/g,Ns=/^(?:script|style|textarea|title)$/i,Hu=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),ju=Hu(1),J=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),Ts=new WeakMap,lt=st.createTreeWalker(st,129,null,!1);function Bs(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ss!==void 0?Ss.createHTML(e):e}const Ru=(i,e)=>{const t=i.length-1,r=[];let o,s=e===2?"<svg>":"",a=yi;for(let u=0;u<t;u++){const c=i[u];let d,m,v=-1,y=0;for(;y<c.length&&(a.lastIndex=y,m=a.exec(c),m!==null);)y=a.lastIndex,a===yi?m[1]==="!--"?a=zs:m[1]!==void 0?a=Os:m[2]!==void 0?(Ns.test(m[2])&&(o=RegExp("</"+m[2],"g")),a=at):m[3]!==void 0&&(a=at):a===at?m[0]===">"?(a=o??yi,v=-1):m[1]===void 0?v=-2:(v=a.lastIndex-m[2].length,d=m[1],a=m[3]===void 0?at:m[3]==='"'?Ms:Ls):a===Ms||a===Ls?a=at:a===zs||a===Os?a=yi:(a=at,o=void 0);const U=a===at&&i[u+1].startsWith("/>")?" ":"";s+=a===yi?c+Du:v>=0?(r.push(d),c.slice(0,v)+kr+c.slice(v)+Ke+U):c+Ke+(v===-2?(r.push(void 0),u):U)}return[Bs(i,s+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let xr=class Ou{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,a=0;const u=e.length-1,c=this.parts,[d,m]=Ru(e,t);if(this.el=Ou.createElement(d,r),lt.currentNode=this.el.content,t===2){const v=this.el.content,y=v.firstChild;y.remove(),v.append(...y.childNodes)}for(;(o=lt.nextNode())!==null&&c.length<u;){if(o.nodeType===1){if(o.hasAttributes()){const v=[];for(const y of o.getAttributeNames())if(y.endsWith(kr)||y.startsWith(Ke)){const U=m[a++];if(v.push(y),U!==void 0){const x=o.getAttribute(U.toLowerCase()+kr).split(Ke),A=/([.?@])?(.*)/.exec(U);c.push({type:1,index:s,name:A[2],strings:x,ctor:A[1]==="."?Gu:A[1]==="?"?qu:A[1]==="@"?Ku:ho})}else c.push({type:6,index:s})}for(const y of v)o.removeAttribute(y)}if(Ns.test(o.tagName)){const v=o.textContent.split(Ke),y=v.length-1;if(y>0){o.textContent=St?St.emptyScript:"";for(let U=0;U<y;U++)o.append(v[U],co()),lt.nextNode(),c.push({type:2,index:++s});o.append(v[y],co())}}}else if(o.nodeType===8)if(o.data===As)c.push({type:2,index:s});else{let v=-1;for(;(v=o.data.indexOf(Ke,v+1))!==-1;)c.push({type:7,index:s}),v+=Ke.length-1}s++}}static createElement(e,t){const r=st.createElement("template");return r.innerHTML=e,r}};function At(i,e,t=i,r){var o,s,a,u;if(e===J)return e;let c=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=fi(e)?void 0:e._$litDirective$;return c?.constructor!==d&&((s=c?._$AO)===null||s===void 0||s.call(c,!1),d===void 0?c=void 0:(c=new d(i),c._$AT(i,t,r)),r!==void 0?((a=(u=t)._$Co)!==null&&a!==void 0?a:u._$Co=[])[r]=c:t._$Cl=c),c!==void 0&&(e=At(i,c._$AS(i,e.values),c,r)),e}let Fu=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:o}=this._$AD,s=((t=e?.creationScope)!==null&&t!==void 0?t:st).importNode(r,!0);lt.currentNode=s;let a=lt.nextNode(),u=0,c=0,d=o[0];for(;d!==void 0;){if(u===d.index){let m;d.type===2?m=new Ir(a,a.nextSibling,this,e):d.type===1?m=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(m=new Xu(a,this,e)),this._$AV.push(m),d=o[++c]}u!==d?.index&&(a=lt.nextNode(),u++)}return lt.currentNode=st,s}v(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Ir=class Lu{constructor(e,t,r,o){var s;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(s=o?.isConnected)===null||s===void 0||s}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=At(this,e,t),fi(e)?e===N||e==null||e===""?(this._$AH!==N&&this._$AR(),this._$AH=N):e!==this._$AH&&e!==J&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Vu(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==N&&fi(this._$AH)?this._$AA.nextSibling.data=e:this.$(st.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=xr.createElement(Bs(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(r);else{const a=new Fu(s,this),u=a.u(this.options);a.v(r),this.$(u),this._$AH=a}}_$AC(e){let t=Ts.get(e.strings);return t===void 0&&Ts.set(e.strings,t=new xr(e)),t}T(e){Ps(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const s of e)o===t.length?t.push(r=new Lu(this.k(co()),this.k(co()),this,this.options)):r=t[o],r._$AI(s),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},ho=class{constructor(e,t,r,o,s){this.type=1,this._$AH=N,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,o){const s=this.strings;let a=!1;if(s===void 0)e=At(this,e,t,0),a=!fi(e)||e!==this._$AH&&e!==J,a&&(this._$AH=e);else{const u=e;let c,d;for(e=s[0],c=0;c<s.length-1;c++)d=At(this,u[r+c],t,c),d===J&&(d=this._$AH[c]),a||(a=!fi(d)||d!==this._$AH[c]),d===N?e=N:e!==N&&(e+=(d??"")+s[c+1]),this._$AH[c]=d}a&&!o&&this.j(e)}j(e){e===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Gu=class extends ho{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===N?void 0:e}};const Wu=St?St.emptyScript:"";let qu=class extends ho{constructor(){super(...arguments),this.type=4}j(e){e&&e!==N?this.element.setAttribute(this.name,Wu):this.element.removeAttribute(this.name)}},Ku=class extends ho{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){var r;if((e=(r=At(this,e,t,0))!==null&&r!==void 0?r:N)===J)return;const o=this._$AH,s=e===N&&o!==N||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==N&&(o===N||s);s&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},Xu=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){At(this,e)}};const Yu={I:Ir},Ds=uo.litHtmlPolyfillSupport;Ds?.(xr,Ir),((Ur=uo.litHtmlVersions)!==null&&Ur!==void 0?Ur:uo.litHtmlVersions=[]).push("2.8.0");/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
20
|
-
\f\r]`,
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
19
|
+
*/var Cr;const po=window,Pt=po.trustedTypes,Vs=Pt?Pt.createPolicy("lit-html",{createHTML:i=>i}):void 0,Sr="$lit$",Xe=`lit$${(Math.random()+"").slice(9)}$`,Hs="?"+Xe,Zu=`<${Hs}>`,ut=document,wi=()=>ut.createComment(""),$i=i=>i===null||typeof i!="object"&&typeof i!="function",js=Array.isArray,Qu=i=>js(i)||typeof i?.[Symbol.iterator]=="function",Ar=`[
|
|
20
|
+
\f\r]`,_i=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rs=/-->/g,Fs=/>/g,ct=RegExp(`>|${Ar}(?:([^\\s"'>=/]+)(${Ar}*=${Ar}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gs=/'/g,Ws=/"/g,qs=/^(?:script|style|textarea|title)$/i,Ks=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),h=Ks(1),f=Ks(2),zt=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),Xs=new WeakMap,ht=ut.createTreeWalker(ut,129,null,!1);function Ys(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vs!==void 0?Vs.createHTML(e):e}const Ju=(i,e)=>{const t=i.length-1,r=[];let o,s=e===2?"<svg>":"",a=_i;for(let u=0;u<t;u++){const c=i[u];let d,m,v=-1,y=0;for(;y<c.length&&(a.lastIndex=y,m=a.exec(c),m!==null);)y=a.lastIndex,a===_i?m[1]==="!--"?a=Rs:m[1]!==void 0?a=Fs:m[2]!==void 0?(qs.test(m[2])&&(o=RegExp("</"+m[2],"g")),a=ct):m[3]!==void 0&&(a=ct):a===ct?m[0]===">"?(a=o??_i,v=-1):m[1]===void 0?v=-2:(v=a.lastIndex-m[2].length,d=m[1],a=m[3]===void 0?ct:m[3]==='"'?Ws:Gs):a===Ws||a===Gs?a=ct:a===Rs||a===Fs?a=_i:(a=ct,o=void 0);const U=a===ct&&i[u+1].startsWith("/>")?" ":"";s+=a===_i?c+Zu:v>=0?(r.push(d),c.slice(0,v)+Sr+c.slice(v)+Xe+U):c+Xe+(v===-2?(r.push(void 0),u):U)}return[Ys(i,s+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let Pr=class Mu{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,a=0;const u=e.length-1,c=this.parts,[d,m]=Ju(e,t);if(this.el=Mu.createElement(d,r),ht.currentNode=this.el.content,t===2){const v=this.el.content,y=v.firstChild;y.remove(),v.append(...y.childNodes)}for(;(o=ht.nextNode())!==null&&c.length<u;){if(o.nodeType===1){if(o.hasAttributes()){const v=[];for(const y of o.getAttributeNames())if(y.endsWith(Sr)||y.startsWith(Xe)){const U=m[a++];if(v.push(y),U!==void 0){const x=o.getAttribute(U.toLowerCase()+Sr).split(Xe),A=/([.?@])?(.*)/.exec(U);c.push({type:1,index:s,name:A[2],strings:x,ctor:A[1]==="."?tc:A[1]==="?"?oc:A[1]==="@"?rc:bo})}else c.push({type:6,index:s})}for(const y of v)o.removeAttribute(y)}if(qs.test(o.tagName)){const v=o.textContent.split(Xe),y=v.length-1;if(y>0){o.textContent=Pt?Pt.emptyScript:"";for(let U=0;U<y;U++)o.append(v[U],wi()),ht.nextNode(),c.push({type:2,index:++s});o.append(v[y],wi())}}}else if(o.nodeType===8)if(o.data===Hs)c.push({type:2,index:s});else{let v=-1;for(;(v=o.data.indexOf(Xe,v+1))!==-1;)c.push({type:7,index:s}),v+=Xe.length-1}s++}}static createElement(e,t){const r=ut.createElement("template");return r.innerHTML=e,r}};function Ot(i,e,t=i,r){var o,s,a,u;if(e===zt)return e;let c=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=$i(e)?void 0:e._$litDirective$;return c?.constructor!==d&&((s=c?._$AO)===null||s===void 0||s.call(c,!1),d===void 0?c=void 0:(c=new d(i),c._$AT(i,t,r)),r!==void 0?((a=(u=t)._$Co)!==null&&a!==void 0?a:u._$Co=[])[r]=c:t._$Cl=c),c!==void 0&&(e=Ot(i,c._$AS(i,e.values),c,r)),e}let ec=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:o}=this._$AD,s=((t=e?.creationScope)!==null&&t!==void 0?t:ut).importNode(r,!0);ht.currentNode=s;let a=ht.nextNode(),u=0,c=0,d=o[0];for(;d!==void 0;){if(u===d.index){let m;d.type===2?m=new zr(a,a.nextSibling,this,e):d.type===1?m=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(m=new nc(a,this,e)),this._$AV.push(m),d=o[++c]}u!==d?.index&&(a=ht.nextNode(),u++)}return ht.currentNode=ut,s}v(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},zr=class Nu{constructor(e,t,r,o){var s;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(s=o?.isConnected)===null||s===void 0||s}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ot(this,e,t),$i(e)?e===C||e==null||e===""?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==zt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Qu(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==C&&$i(this._$AH)?this._$AA.nextSibling.data=e:this.$(ut.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Pr.createElement(Ys(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(r);else{const a=new ec(s,this),u=a.u(this.options);a.v(r),this.$(u),this._$AH=a}}_$AC(e){let t=Xs.get(e.strings);return t===void 0&&Xs.set(e.strings,t=new Pr(e)),t}T(e){js(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const s of e)o===t.length?t.push(r=new Nu(this.k(wi()),this.k(wi()),this,this.options)):r=t[o],r._$AI(s),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},bo=class{constructor(e,t,r,o,s){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,o){const s=this.strings;let a=!1;if(s===void 0)e=Ot(this,e,t,0),a=!$i(e)||e!==this._$AH&&e!==zt,a&&(this._$AH=e);else{const u=e;let c,d;for(e=s[0],c=0;c<s.length-1;c++)d=Ot(this,u[r+c],t,c),d===zt&&(d=this._$AH[c]),a||(a=!$i(d)||d!==this._$AH[c]),d===C?e=C:e!==C&&(e+=(d??"")+s[c+1]),this._$AH[c]=d}a&&!o&&this.j(e)}j(e){e===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},tc=class extends bo{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}};const ic=Pt?Pt.emptyScript:"";let oc=class extends bo{constructor(){super(...arguments),this.type=4}j(e){e&&e!==C?this.element.setAttribute(this.name,ic):this.element.removeAttribute(this.name)}},rc=class extends bo{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){var r;if((e=(r=Ot(this,e,t,0))!==null&&r!==void 0?r:C)===zt)return;const o=this._$AH,s=e===C&&o!==C||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==C&&(o===C||s);s&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},nc=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ot(this,e)}};const Zs=po.litHtmlPolyfillSupport;Zs?.(Pr,zr),((Cr=po.litHtmlVersions)!==null&&Cr!==void 0?Cr:po.litHtmlVersions=[]).push("2.8.0");const sc=(i,e,t)=>{var r,o;const s=(r=t?.renderBefore)!==null&&r!==void 0?r:e;let a=s._$litPart$;if(a===void 0){const u=(o=t?.renderBefore)!==null&&o!==void 0?o:null;s._$litPart$=a=new zr(e.insertBefore(wi(),u),u,void 0,t??{})}return a._$AI(i),a};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var
|
|
25
|
+
*/var Or,Lr;let g=class extends Ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=sc(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return zt}};g.finalized=!0,g._$litElement$=!0,(Or=globalThis.litElementHydrateSupport)===null||Or===void 0||Or.call(globalThis,{LitElement:g});const Qs=globalThis.litElementPolyfillSupport;Qs?.({LitElement:g}),((Lr=globalThis.litElementVersions)!==null&&Lr!==void 0?Lr:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const
|
|
29
|
+
*/const ac=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},lc=(i,e,t)=>{e.constructor.createProperty(t,i)};function l(i){return(e,t)=>t!==void 0?lc(i,e,t):ac(i,e)}/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/const
|
|
37
|
+
*/const Mr=({finisher:i,descriptor:e})=>(t,r)=>{var o;if(r===void 0){const s=(o=t.originalKey)!==null&&o!==void 0?o:t.key,a=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(t.key)}:{...t,key:s};return i!=null&&(a.finisher=function(u){i(u,s)}),a}{const s=t.constructor;e!==void 0&&Object.defineProperty(t,r,e(r)),i?.(s,r)}};/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/function S(i,e){return
|
|
41
|
+
*/function S(i,e){return Mr({descriptor:t=>({get(){var o,s;return(s=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(i))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0})})}/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function
|
|
45
|
+
*/function uc(i){return Mr({descriptor:e=>({get(){var t,r;return(r=(t=this.renderRoot)===null||t===void 0?void 0:t.querySelectorAll(i))!==null&&r!==void 0?r:[]},enumerable:!0,configurable:!0})})}/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2021 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/var
|
|
49
|
+
*/var Nr;const cc=((Nr=window.HTMLSlotElement)===null||Nr===void 0?void 0:Nr.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function Pe(i){const{slot:e,selector:t}=i??{};return Mr({descriptor:r=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(s),u=a!=null?cc(a,i):[];return t?u.filter((c=>c.matches(t))):u},enumerable:!0,configurable:!0})})}var hc=`.uui-h1,
|
|
50
50
|
.uui-h2,
|
|
51
51
|
.uui-h3,
|
|
52
52
|
.uui-h4,
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
margin-top: var(--uui-size-layout-1,24px);
|
|
246
246
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
247
247
|
}
|
|
248
|
-
`;const
|
|
248
|
+
`;const Lt=qe(hc),dc=b`
|
|
249
249
|
@keyframes uui-blink {
|
|
250
250
|
0%,
|
|
251
251
|
100% {
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
opacity: 1;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,pc=qe("uui-blink 0.9s infinite both"),bc=b`
|
|
259
259
|
@keyframes pulse {
|
|
260
260
|
0% {
|
|
261
261
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
opacity: 0;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
`,
|
|
276
|
+
`,mc=qe("pulse 0.8s ease-in-out infinite both"),vc=b`
|
|
277
277
|
@keyframes uui-horizontal-shake {
|
|
278
278
|
10%,
|
|
279
279
|
90% {
|
|
@@ -296,14 +296,14 @@
|
|
|
296
296
|
transform: translateX(2px);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
`,
|
|
299
|
+
`,gc=qe("uui-horizontal-shake 600ms ease backwards");let Tr=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},dt=class extends Tr{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Ui=class extends Tr{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var fc=Object.defineProperty,yc=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&fc(e,t,o),o};const wc=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return yc([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var $c=Object.defineProperty,Js=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&$c(e,t,o),o};const _c=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return h`
|
|
300
300
|
${this._labelSlotHasContent===!1?h`<span class="label">${this.label}</span>`:""}
|
|
301
301
|
<slot
|
|
302
302
|
class="label"
|
|
303
303
|
style=${this._labelSlotHasContent?"":"display: none"}
|
|
304
304
|
name=${i||""}
|
|
305
305
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
306
|
-
`}}return
|
|
306
|
+
`}}return Js([l({type:String})],t.prototype,"label"),Js([w()],t.prototype,"_labelSlotHasContent"),t};var Uc=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,ea=(i,e,t,r)=>{for(var o=r>1?void 0:r?kc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Uc(e,t,o),o};const Ec=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const u=a.tagName;return u==="A"||u==="BUTTON"||u==="INPUT"||u==="TEXTAREA"||u==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new Ui(Ui.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new Ui(Ui.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return ea([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),ea([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var xc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,Cc=(i,e,t,r)=>{for(var o=Ic(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&xc(e,t,o),o};const Sc=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return Cc([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};var Ac=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,pt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ac(e,t,o),o};const zc=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],Oc=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const u={flagKey:o,getMessageMethod:s,checkMethod:a,weight:zc.indexOf(o)};return this.#r.push(u),this.#r.sort((c,d)=>c.weight>d.weight?1:d.weight>c.weight?-1:0),u}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(dt.INVALID,()=>{this._runValidators()}),o.addEventListener(dt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(u=>u.checkMethod()?(this.#e[u.flagKey]=!0,o=u.getMessageMethod(),!0):!1),o||this.#o.some(u=>{let c;for(c in u.validity)if(c!=="valid"&&u.validity[c])return this.#e[c]=!0,o=u.validationMessage,s??=u,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new dt(dt.VALID)):this.dispatchEvent(new dt(dt.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return pt([l({type:String})],t.prototype,"name",2),pt([l()],t.prototype,"value",1),pt([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),pt([l({type:Boolean,reflect:!0})],t.prototype,"required",2),pt([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),pt([l({type:Boolean,reflect:!0})],t.prototype,"error",2),pt([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t};let Lc=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const Mc=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},Nc=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,u=s.left+a.scrollX,c=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const m=d.pageX-u,v=d.pageY-c;e?.onMove&&e.onMove(m,v)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},Tc=(i,e,t)=>Math.min(Math.max(i,e),t),Bc=(i,e,t)=>t+e-i,Dc=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},ta=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function Vc(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var Hc=Object.defineProperty,jc=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Hc(e,t,o),o};const Rc=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=ta(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return jc([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};function Fc(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}const Gc=["default","primary","secondary","outline","placeholder"],Wc=["default","positive","warning","danger","invalid"],qc=["h1","h2","h3","h4","h5","h6"];function p(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}var Kc=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIButtonGroupElement=class extends g{render(){return h`<slot></slot>`}},n.UUIButtonGroupElement.styles=[b`
|
|
307
307
|
:host {
|
|
308
308
|
display: inline-flex;
|
|
309
309
|
align-items: stretch;
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
::slotted(*:hover) {
|
|
334
334
|
z-index: 1;
|
|
335
335
|
}
|
|
336
|
-
`],
|
|
336
|
+
`],n.UUIButtonGroupElement=Kc([p("uui-button-group")],n.UUIButtonGroupElement);var Xc=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,b`
|
|
337
337
|
::slotted(*) {
|
|
338
338
|
--uui-button-padding-left-factor: 0.5;
|
|
339
339
|
--uui-button-padding-right-factor: 0.5;
|
|
@@ -375,10 +375,10 @@
|
|
|
375
375
|
--uui-button-padding-left-factor: 1.5;
|
|
376
376
|
--uui-button-padding-right-factor: 1.5;
|
|
377
377
|
}
|
|
378
|
-
`],
|
|
378
|
+
`],n.UUIActionBarElement=Xc([p("uui-action-bar")],n.UUIActionBarElement);var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,mo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Yc(e,t,o),o};n.UUIAvatarGroupElement=class extends g{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return h`
|
|
379
379
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
380
380
|
${this._isLimitExceeded()?h`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}
|
|
381
|
-
`}},
|
|
381
|
+
`}},n.UUIAvatarGroupElement.styles=[b`
|
|
382
382
|
:host {
|
|
383
383
|
display: inline-flex;
|
|
384
384
|
align-items: center;
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
#overflow-indication {
|
|
396
396
|
margin-left: 6px;
|
|
397
397
|
}
|
|
398
|
-
`],
|
|
398
|
+
`],mo([Pe({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),mo([w()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),mo([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=mo([p("uui-avatar-group")],n.UUIAvatarGroupElement);var Qc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,Mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Qc(e,t,o),o};n.UUIAvatarElement=class extends g{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this.name=""}get _initials(){return this.initials?.substring(0,3)||this.createInitials(this.name)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=[...e.matchAll(/(?:^|\s)(.)/g)].map(o=>o[1]).join("");return r?.length?(t=r[0].charAt(0),r.length>1&&(t+=r[r.length-1].charAt(0)),t.toUpperCase()):t}renderImage(){return h` <img
|
|
399
399
|
src="${this.imgSrc}"
|
|
400
400
|
srcset="${this.imgSrcset}"
|
|
401
401
|
alt="${this._initials}"
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
${this.imgSrc?this.renderImage():""}
|
|
404
404
|
${this.imgSrc?"":this._initials}
|
|
405
405
|
<slot></slot>
|
|
406
|
-
`}},
|
|
406
|
+
`}},n.UUIAvatarElement.styles=[b`
|
|
407
407
|
:host {
|
|
408
408
|
display: inline-flex;
|
|
409
409
|
align-items: center;
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
overflow: hidden;
|
|
435
435
|
border-radius: 50%;
|
|
436
436
|
}
|
|
437
|
-
`],
|
|
437
|
+
`],Mt([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),Mt([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),Mt([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),Mt([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",2),Mt([l({type:String})],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=Mt([p("uui-avatar")],n.UUIAvatarElement);var eh=Object.defineProperty,th=Object.getOwnPropertyDescriptor,vo=(i,e,t,r)=>{for(var o=r>1?void 0:r?th(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&eh(e,t,o),o};n.UUIBadgeElement=class extends g{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return h` <slot></slot> `}},n.UUIBadgeElement.styles=[b`
|
|
438
438
|
:host {
|
|
439
439
|
position: var(--uui-badge-position, absolute);
|
|
440
440
|
display: flex;
|
|
@@ -565,14 +565,14 @@
|
|
|
565
565
|
animation: none;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
`],
|
|
568
|
+
`],vo([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),vo([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),vo([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=vo([p("uui-badge")],n.UUIBadgeElement);var ih=Object.defineProperty,oh=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&ih(e,t,o),o};const ki=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return oh([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var rh=Object.defineProperty,ia=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&rh(e,t,o),o};const ye=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return h`
|
|
569
569
|
${this._labelSlotHasContent===!1?h`<span class="label">${this.label}</span>`:""}
|
|
570
570
|
<slot
|
|
571
571
|
class="label"
|
|
572
572
|
style=${this._labelSlotHasContent?"":"display: none"}
|
|
573
573
|
name=${i||""}
|
|
574
574
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
575
|
-
`}}return Sa([l({type:String})],t.prototype,"label"),Sa([w()],t.prototype,"_labelSlotHasContent"),t};let Vh=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Oo=class extends Vh{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Dh=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,Aa=(i,e,t,r)=>{for(var o=r>1?void 0:r?jh(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Dh(e,t,o),o};const Xt=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const n=o.composedPath();this.#e===this&&n.some(a=>{const u=a.tagName;return u==="A"||u==="BUTTON"||u==="INPUT"||u==="TEXTAREA"||u==="SELECT"})||n.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new Oo(Oo.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new Oo(Oo.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return Aa([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Aa([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Hh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,Fh=(i,e,t,r)=>{for(var o=Rh(e,t),n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(e,t,o)||o);return o&&Hh(e,t,o),o};const To=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return Fh([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};let Pa=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Yt=class extends Pa{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Kg=class extends Pa{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Wh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,Et=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gh(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wh(e,t,o),o};const qh=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],xe=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const n=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",n)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(n=>n.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,n,a){const u={flagKey:o,getMessageMethod:n,checkMethod:a,weight:qh.indexOf(o)};return this.#r.push(u),this.#r.sort((c,d)=>c.weight>d.weight?1:d.weight>c.weight?-1:0),u}removeValidator(o){const n=this.#r.indexOf(o);n!==-1&&this.#r.splice(n,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(Yt.INVALID,()=>{this._runValidators()}),o.addEventListener(Yt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,n;this.#r.some(u=>u.checkMethod()?(this.#e[u.flagKey]=!0,o=u.getMessageMethod(),!0):!1),o||this.#o.some(u=>{let c;for(c in u.validity)if(c!=="valid"&&u.validity[c])return this.#e[c]=!0,o=u.validationMessage,n??=u,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,n??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new Yt(Yt.VALID)):this.dispatchEvent(new Yt(Yt.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Et([l({type:String})],t.prototype,"name",2),Et([l()],t.prototype,"value",1),Et([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Et([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Et([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Et([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Et([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},Kh=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,n=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(n)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var Xh=Object.defineProperty,Yh=(i,e,t,r)=>{for(var o=void 0,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(e,t,o)||o);return o&&Xh(e,t,o),o};const Zh=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=Kh(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return Yh([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};let M=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},No=class extends M{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Zt=class extends M{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}},nn=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Qt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jh(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Qh(e,t,o),o};let ve=class extends xe(Ee("",f),""){constructor(e="checkbox"){super(),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keydown",this.#e)}get value(){return this._value}set value(e){const t=super.value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}#e(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),t.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),t.addEventListener("mouseup",()=>{r=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new nn(nn.CHANGE))}render(){return h`
|
|
575
|
+
`}}return ia([l({type:String})],t.prototype,"label"),ia([w()],t.prototype,"_labelSlotHasContent"),t};let nh=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},go=class extends nh{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var sh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,oa=(i,e,t,r)=>{for(var o=r>1?void 0:r?ah(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sh(e,t,o),o};const Nt=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const u=a.tagName;return u==="A"||u==="BUTTON"||u==="INPUT"||u==="TEXTAREA"||u==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new go(go.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new go(go.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return oa([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),oa([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var lh=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,ch=(i,e,t,r)=>{for(var o=uh(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&lh(e,t,o),o};const fo=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return ch([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};let ra=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Tt=class extends ra{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Rv=class extends ra{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var hh=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,bt=(i,e,t,r)=>{for(var o=r>1?void 0:r?dh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hh(e,t,o),o};const ph=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],we=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const u={flagKey:o,getMessageMethod:s,checkMethod:a,weight:ph.indexOf(o)};return this.#r.push(u),this.#r.sort((c,d)=>c.weight>d.weight?1:d.weight>c.weight?-1:0),u}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(Tt.INVALID,()=>{this._runValidators()}),o.addEventListener(Tt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(u=>u.checkMethod()?(this.#e[u.flagKey]=!0,o=u.getMessageMethod(),!0):!1),o||this.#o.some(u=>{let c;for(c in u.validity)if(c!=="valid"&&u.validity[c])return this.#e[c]=!0,o=u.validationMessage,s??=u,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new Tt(Tt.VALID)):this.dispatchEvent(new Tt(Tt.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return bt([l({type:String})],t.prototype,"name",2),bt([l()],t.prototype,"value",1),bt([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),bt([l({type:Boolean,reflect:!0})],t.prototype,"required",2),bt([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),bt([l({type:Boolean,reflect:!0})],t.prototype,"error",2),bt([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},bh=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var mh=Object.defineProperty,vh=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&mh(e,t,o),o};const gh=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=bh(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return vh([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};let z=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},yo=class extends z{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Bt=class extends z{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}},Br=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var fh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,Dt=(i,e,t,r)=>{for(var o=r>1?void 0:r?yh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fh(e,t,o),o};let ce=class extends we(ye("",g),""){constructor(e="checkbox"){super(),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keydown",this.#e)}get value(){return this._value}set value(e){const t=super.value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}#e(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),t.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),t.addEventListener("mouseup",()=>{r=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new Br(Br.CHANGE))}render(){return h`
|
|
576
576
|
<label>
|
|
577
577
|
<input
|
|
578
578
|
id="input"
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
role="${this.inputRole}" />
|
|
587
587
|
${this.renderCheckbox()} ${this.renderLabel()}
|
|
588
588
|
</label>
|
|
589
|
-
`}static{this.styles=[
|
|
589
|
+
`}static{this.styles=[b`
|
|
590
590
|
:host {
|
|
591
591
|
display: inline-block;
|
|
592
592
|
}
|
|
@@ -639,27 +639,27 @@
|
|
|
639
639
|
span.label:empty {
|
|
640
640
|
display: none;
|
|
641
641
|
}
|
|
642
|
-
`]}};
|
|
642
|
+
`]}};Dt([l({type:String,attribute:"label-position",reflect:!0})],ce.prototype,"labelPosition",2),Dt([l({type:Boolean})],ce.prototype,"checked",1),Dt([l({type:Boolean,reflect:!0})],ce.prototype,"indeterminate",2),Dt([l({type:Boolean,reflect:!0})],ce.prototype,"disabled",2),Dt([l({type:Boolean,reflect:!0})],ce.prototype,"readonly",2),Dt([S("#input")],ce.prototype,"_input",2);/**
|
|
643
643
|
* @license
|
|
644
644
|
* Copyright 2020 Google LLC
|
|
645
645
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
646
|
-
*/const
|
|
646
|
+
*/const na=Symbol.for(""),wh=i=>{if(i?.r===na)return i?._$litStatic$},sa=i=>({_$litStatic$:i,r:na}),aa=new Map,$h=i=>(e,...t)=>{const r=t.length;let o,s;const a=[],u=[];let c,d=0,m=!1;for(;d<r;){for(c=e[d];d<r&&(s=t[d],(o=wh(s))!==void 0);)c+=o+e[++d],m=!0;d!==r&&u.push(s),a.push(c),d++}if(d===r&&a.push(e[r]),m){const v=a.join("$$lit$$");(e=aa.get(v))===void 0&&(a.raw=a,aa.set(v,e=a)),t=u}return i(e,...t)},la=$h(ju);var _h=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Uh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&_h(e,t,o),o};function Dr(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}n.UUIBoxElement=class extends g{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag="h5",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=Dr(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=Dr(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=Dr(e.target)}}set headlineVariant(e){this._headlineVariantTag=e}get headlineVariant(){return this._headlineVariantTag}renderHeader(){return la`<div
|
|
647
647
|
id="header"
|
|
648
648
|
class="uui-text"
|
|
649
649
|
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
650
|
-
<${
|
|
650
|
+
<${sa(this._headlineVariantTag)}
|
|
651
651
|
id="headline"
|
|
652
652
|
class="uui-h5"
|
|
653
653
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
654
654
|
${this.headline}
|
|
655
655
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
656
|
-
</${
|
|
656
|
+
</${sa(this._headlineVariantTag)}>
|
|
657
657
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
658
658
|
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
659
|
-
</div>`}render(){return
|
|
659
|
+
</div>`}render(){return la`
|
|
660
660
|
${this.renderHeader()}
|
|
661
661
|
<slot></slot>
|
|
662
|
-
`}},
|
|
662
|
+
`}},n.UUIBoxElement.styles=[Lt,b`
|
|
663
663
|
:host {
|
|
664
664
|
display: block;
|
|
665
665
|
border: var(--uui-box-border-width, 0) solid
|
|
@@ -689,19 +689,19 @@
|
|
|
689
689
|
display: block;
|
|
690
690
|
margin-left: auto;
|
|
691
691
|
}
|
|
692
|
-
`],
|
|
692
|
+
`],mt([l({type:String})],n.UUIBoxElement.prototype,"headline",2),mt([l({attribute:"headline-variant"})],n.UUIBoxElement.prototype,"headlineVariant",1),mt([w()],n.UUIBoxElement.prototype,"_headlineVariantTag",2),mt([w()],n.UUIBoxElement.prototype,"_headlineSlotHasContent",2),mt([w()],n.UUIBoxElement.prototype,"_headerSlotHasContent",2),mt([w()],n.UUIBoxElement.prototype,"_headerActionsSlotHasContent",2),n.UUIBoxElement=mt([p("uui-box")],n.UUIBoxElement);let kh=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const _=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},ua=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,u=s.left+a.scrollX,c=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const m=d.pageX-u,v=d.pageY-c;e?.onMove&&e.onMove(m,v)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},O=(i,e,t)=>Math.min(Math.max(i,e),t),ca=(i,e,t)=>t+e-i,Eh=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function xh(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}/**
|
|
693
693
|
* @license
|
|
694
694
|
* Copyright 2017 Google LLC
|
|
695
695
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
696
|
-
*/const
|
|
696
|
+
*/const he={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Vt=i=>(...e)=>({_$litDirective$:i,values:e});let Ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
697
697
|
* @license
|
|
698
698
|
* Copyright 2020 Google LLC
|
|
699
699
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
700
|
-
*/const{I:
|
|
700
|
+
*/const{I:Ih}=Yu,ha=i=>i.strings===void 0,da=()=>document.createComment(""),Ei=(i,e,t)=>{var r;const o=i._$AA.parentNode,s=e===void 0?i._$AB:e._$AA;if(t===void 0){const a=o.insertBefore(da(),s),u=o.insertBefore(da(),s);t=new Ih(a,u,i,i.options)}else{const a=t._$AB.nextSibling,u=t._$AM,c=u!==i;if(c){let d;(r=t._$AQ)===null||r===void 0||r.call(t,i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==u._$AU&&t._$AP(d)}if(a!==s||c){let d=t._$AA;for(;d!==a;){const m=d.nextSibling;o.insertBefore(d,s),d=m}}}return t},vt=(i,e,t=i)=>(i._$AI(e,t),i),Ch={},pa=(i,e=Ch)=>i._$AH=e,Sh=i=>i._$AH,Vr=i=>{var e;(e=i._$AP)===null||e===void 0||e.call(i,!1,!0);let t=i._$AA;const r=i._$AB.nextSibling;for(;t!==r;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
701
701
|
* @license
|
|
702
702
|
* Copyright 2017 Google LLC
|
|
703
703
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
704
|
-
*/const
|
|
704
|
+
*/const ba=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},wo=Vt(class extends Ht{constructor(i){if(super(i),i.type!==he.CHILD)throw Error("repeat() can only be used in text expressions")}ct(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const o=[],s=[];let a=0;for(const u of i)o[a]=r?r(u,a):a,s[a]=t(u,a),a++;return{values:s,keys:o}}render(i,e,t){return this.ct(i,e,t).values}update(i,[e,t,r]){var o;const s=Sh(i),{values:a,keys:u}=this.ct(e,t,r);if(!Array.isArray(s))return this.ut=u,a;const c=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],d=[];let m,v,y=0,U=s.length-1,x=0,A=a.length-1;for(;y<=U&&x<=A;)if(s[y]===null)y++;else if(s[U]===null)U--;else if(c[y]===u[x])d[x]=vt(s[y],a[x]),y++,x++;else if(c[U]===u[A])d[A]=vt(s[U],a[A]),U--,A--;else if(c[y]===u[A])d[A]=vt(s[y],a[A]),Ei(i,d[A+1],s[y]),y++,A--;else if(c[U]===u[x])d[x]=vt(s[U],a[x]),Ei(i,s[y],s[U]),U--,x++;else if(m===void 0&&(m=ba(u,x,A),v=ba(c,y,U)),m.has(c[y]))if(m.has(c[U])){const Z=v.get(u[x]),Fe=Z!==void 0?s[Z]:null;if(Fe===null){const Ge=Ei(i,s[y]);vt(Ge,a[x]),d[x]=Ge}else d[x]=vt(Fe,a[x]),Ei(i,s[y],Fe),s[Z]=null;x++}else Vr(s[U]),U--;else Vr(s[y]),y++;for(;x<=A;){const Z=Ei(i,d[A+1]);vt(Z,a[x]),d[x++]=Z}for(;y<=U;){const Z=s[y++];Z!==null&&Vr(Z)}return this.ut=u,pa(i,d),J}}),Ah=b`
|
|
705
705
|
@keyframes uui-blink {
|
|
706
706
|
0%,
|
|
707
707
|
100% {
|
|
@@ -711,7 +711,7 @@
|
|
|
711
711
|
opacity: 1;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
`,
|
|
714
|
+
`,Ph=qe("uui-blink 0.9s infinite both"),zh=b`
|
|
715
715
|
@keyframes pulse {
|
|
716
716
|
0% {
|
|
717
717
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -729,7 +729,7 @@
|
|
|
729
729
|
opacity: 0;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
|
|
732
|
+
`;qe("pulse 0.8s ease-in-out infinite both");const $o=b`
|
|
733
733
|
@keyframes uui-horizontal-shake {
|
|
734
734
|
10%,
|
|
735
735
|
90% {
|
|
@@ -752,29 +752,22 @@
|
|
|
752
752
|
transform: translateX(2px);
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
`,ud=be("uui-horizontal-shake 600ms ease backwards");var cd=Object.defineProperty,Da=(i,e,t,r)=>{for(var o=void 0,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(e,t,o)||o);return o&&cd(e,t,o),o};const hd=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return h`
|
|
756
|
-
${this._labelSlotHasContent===!1?h`<span class="label">${this.label}</span>`:""}
|
|
757
|
-
<slot
|
|
758
|
-
class="label"
|
|
759
|
-
style=${this._labelSlotHasContent?"":"display: none"}
|
|
760
|
-
name=${""}
|
|
761
|
-
@slotchange=${this.labelSlotChanged}></slot>
|
|
762
|
-
`}}return Da([l({type:String})],t.prototype,"label"),Da([w()],t.prototype,"_labelSlotHasContent"),t};let dd=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}};(class extends dd{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}});class ja extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}}class ii extends ja{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}}class Xg extends ja{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}}var pd=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,Ct=(i,e,t,r)=>{for(var o=r>1?void 0:r?bd(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pd(e,t,o),o};const vd=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],md=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const n=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",n)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(n=>n.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,n,a){const u={flagKey:o,getMessageMethod:n,checkMethod:a,weight:vd.indexOf(o)};return this.#r.push(u),this.#r.sort((c,d)=>c.weight>d.weight?1:d.weight>c.weight?-1:0),u}removeValidator(o){const n=this.#r.indexOf(o);n!==-1&&this.#r.splice(n,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(ii.INVALID,()=>{this._runValidators()}),o.addEventListener(ii.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,n;this.#r.some(u=>u.checkMethod()?(this.#e[u.flagKey]=!0,o=u.getMessageMethod(),!0):!1),o||this.#o.some(u=>{let c;for(c in u.validity)if(c!=="valid"&&u.validity[c])return this.#e[c]=!0,o=u.validationMessage,n??=u,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,n??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new ii(ii.VALID)):this.dispatchEvent(new ii(ii.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Ct([l({type:String})],t.prototype,"name",2),Ct([l()],t.prototype,"value",1),Ct([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Ct([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Ct([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Ct([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Ct([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},gd=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,n=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(n)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var fd=Object.defineProperty,yd=(i,e,t,r)=>{for(var o=void 0,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(e,t,o)||o);return o&&fd(e,t,o),o};const wd=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=gd(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return yd([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`;const _d=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`;const $d=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;/**
|
|
755
|
+
`,_o=qe("uui-horizontal-shake 600ms ease backwards");f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`;const Uo=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`;const Oh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`;const Lh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`;const Mh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`;const Hr=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`;const Nh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`;const Th=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`;const Bh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,Dh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`;f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`;const Vh=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;/**
|
|
763
756
|
* @license
|
|
764
757
|
* Copyright 2018 Google LLC
|
|
765
758
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
766
|
-
*/const
|
|
759
|
+
*/const $=i=>i??N;var Hh=Object.defineProperty,jh=Object.getOwnPropertyDescriptor,ma=i=>{throw TypeError(i)},ie=(i,e,t,r)=>{for(var o=r>1?void 0:r?jh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Hh(e,t,o),o},va=(i,e,t)=>e.has(i)||ma("Cannot "+t),Rh=(i,e,t)=>(va(i,e,"read from private field"),e.get(i)),Fh=(i,e,t)=>e.has(i)?ma("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Gh=(i,e,t,r)=>(va(i,e,"write to private field"),e.set(i,t),t),ko;n.UUIButtonElement=class extends we(ye("",gh(g))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",Fh(this,ko),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(Rh(this,ko)),(this.state==="success"||this.state==="failed")&&Gh(this,ko,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":_(this,"uui-loader-circle"),e=h`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":_(this,"uui-icon"),e=h`<uui-icon
|
|
767
760
|
name="check"
|
|
768
|
-
.fallback=${
|
|
761
|
+
.fallback=${Uo.strings[0]}></uui-icon>`;break;case"failed":_(this,"uui-icon"),e=h`<uui-icon
|
|
769
762
|
name="wrong"
|
|
770
|
-
.fallback=${
|
|
763
|
+
.fallback=${Vh.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${e}</div>`}render(){return this.href?h`
|
|
771
764
|
<a
|
|
772
765
|
id="button"
|
|
773
|
-
aria-label=${
|
|
774
|
-
title=${
|
|
775
|
-
href=${
|
|
776
|
-
target=${
|
|
777
|
-
rel=${
|
|
766
|
+
aria-label=${$(this.label)}
|
|
767
|
+
title=${$(this.title===""?void 0:this.title)}
|
|
768
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
769
|
+
target=${$(this.target||void 0)}
|
|
770
|
+
rel=${$(this.rel||$(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
778
771
|
${this.renderState()} ${this.renderLabel()}
|
|
779
772
|
<slot name="extra"></slot>
|
|
780
773
|
</a>
|
|
@@ -783,12 +776,12 @@
|
|
|
783
776
|
id="button"
|
|
784
777
|
type=${this.type}
|
|
785
778
|
?disabled=${this.disabled}
|
|
786
|
-
aria-label=${
|
|
787
|
-
title=${
|
|
779
|
+
aria-label=${$(this.label)}
|
|
780
|
+
title=${$(this.title===""?void 0:this.title)}>
|
|
788
781
|
${this.renderState()} ${this.renderLabel()}
|
|
789
782
|
<slot name="extra"></slot>
|
|
790
783
|
</button>
|
|
791
|
-
`}}
|
|
784
|
+
`}},ko=new WeakMap,n.UUIButtonElement.styles=[$o,b`
|
|
792
785
|
:host {
|
|
793
786
|
position: relative;
|
|
794
787
|
display: inline-flex;
|
|
@@ -884,12 +877,16 @@
|
|
|
884
877
|
}
|
|
885
878
|
|
|
886
879
|
#button:focus-visible {
|
|
887
|
-
outline: 2px solid
|
|
880
|
+
outline: 2px solid
|
|
881
|
+
var(
|
|
882
|
+
--uui-focus-outline-color,
|
|
883
|
+
var(--color-emphasis, var(--uui-color-focus,#3879ff))
|
|
884
|
+
);
|
|
888
885
|
}
|
|
889
886
|
|
|
890
887
|
button[disabled]:active,
|
|
891
888
|
a:not([href]):active {
|
|
892
|
-
animation: ${
|
|
889
|
+
animation: ${_o};
|
|
893
890
|
}
|
|
894
891
|
|
|
895
892
|
/* ANIMATIONS */
|
|
@@ -973,30 +970,30 @@
|
|
|
973
970
|
--color-contrast: var(--uui-color-warning-contrast,#000);
|
|
974
971
|
}
|
|
975
972
|
:host([color='danger']) #button {
|
|
976
|
-
--color: var(--uui-color-danger,#
|
|
973
|
+
--color: var(--uui-color-danger,#c31d4c);
|
|
977
974
|
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
975
|
+
174,
|
|
976
|
+
30,
|
|
977
|
+
71
|
|
981
978
|
));
|
|
982
979
|
--color-emphasis: var(--uui-color-danger-emphasis,rgb(
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
980
|
+
223,
|
|
981
|
+
42,
|
|
982
|
+
93
|
|
986
983
|
));
|
|
987
984
|
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
988
985
|
}
|
|
989
986
|
:host([color='invalid']) #button {
|
|
990
|
-
--color: var(--uui-color-invalid,#
|
|
987
|
+
--color: var(--uui-color-invalid,#c31d4c);
|
|
991
988
|
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
989
|
+
174,
|
|
990
|
+
30,
|
|
991
|
+
71
|
|
995
992
|
));
|
|
996
993
|
--color-emphasis: var(--uui-color-invalid-emphasis,rgb(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
994
|
+
223,
|
|
995
|
+
42,
|
|
996
|
+
93
|
|
1000
997
|
));
|
|
1001
998
|
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
1002
999
|
}
|
|
@@ -1157,7 +1154,7 @@
|
|
|
1157
1154
|
var(--color-standalone)
|
|
1158
1155
|
);
|
|
1159
1156
|
}
|
|
1160
|
-
`],
|
|
1157
|
+
`],ie([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),ie([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),ie([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),ie([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),ie([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),ie([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),ie([l({type:String})],n.UUIButtonElement.prototype,"href",2),ie([l({type:String})],n.UUIButtonElement.prototype,"target",2),ie([l({type:String})],n.UUIButtonElement.prototype,"rel",2),ie([l({type:String})],n.UUIButtonElement.prototype,"title",2),ie([S("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=ie([p("uui-button")],n.UUIButtonElement);var Wh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,ga=i=>{throw TypeError(i)},gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?qh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wh(e,t,o),o},jr=(i,e,t)=>e.has(i)||ga("Cannot "+t),L=(i,e,t)=>(jr(i,e,"read from private field"),t?t.call(i):e.get(i)),ze=(i,e,t)=>e.has(i)?ga("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),xi=(i,e,t,r)=>(jr(i,e,"write to private field"),e.set(i,t),t),Ye=(i,e,t)=>(jr(i,e,"access private method"),t),Oe,Ze,ft,Ii,Rr,Le,Ci,Fr,$e,Gr,fa,Wr,ya,qr;n.UUIPopoverContainerElement=class extends g{constructor(){super(),ze(this,$e),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,ze(this,Oe,null),ze(this,Ze,[]),ze(this,ft,null),ze(this,Ii,{width:0,height:0}),ze(this,Rr,e=>{this._open=e.newState==="open",xi(this,Oe,Eh(this,"popovertarget",this.id)),L(this,Oe)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),this._open?(Ye(this,$e,ya).call(this),Ye(this,$e,fa).call(this),requestAnimationFrame(()=>{L(this,Le).call(this)})):Ye(this,$e,Wr).call(this)}),ze(this,Le,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",L(this,Ci).call(this,3))}),ze(this,Ci,e=>{if(L(this,Fr).call(this),e--,L(this,Oe)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,s=this._actualPlacement.indexOf("right")!==-1,a=this._actualPlacement.indexOf("-start")!==-1,u=this._actualPlacement.indexOf("-end")!==-1,c=L(this,Oe).getBoundingClientRect(),d=this.getBoundingClientRect();let m=0,v=0;r&&(m=c.top+c.height,a&&(v=c.left),u&&(v=c.left+c.width-d.width),!a&&!u&&(v=c.left+c.width/2-d.width/2)),t&&(m=c.top-d.height,a&&(v=c.left),u&&(v=c.left+c.width-d.width),!a&&!u&&(v=c.left+c.width/2-d.width/2)),o&&(v=c.left-d.width,a&&(m=c.top),u&&(m=c.top+c.height-d.height),!a&&!u&&(m=c.top+c.height/2-d.height/2)),s&&(v=c.left+c.width,a&&(m=c.top),u&&(m=c.top+c.height-d.height),!a&&!u&&(m=c.top+c.height/2-d.height/2));const y=window.innerWidth,U=window.innerHeight,x=Math.min(0,c.top+c.height),A=Math.max(Math.min(m,U-d.height),c.top-d.height);if(Math.max(x,A)!==m&&(t||r)&&e>0){Ye(this,$e,Gr).call(this),L(this,Ci).call(this,e);return}m=Math.max(x,A);const Z=Math.min(0,c.left+c.width),Fe=Math.max(Math.min(v,y-d.width),c.left-d.width),Ge=Math.max(Z,Fe);if(Ge!==v&&(o||s)&&e>0){Ye(this,$e,Gr).call(this),L(this,Ci).call(this,e);return}v=Ge,(m+d.height<0||m>U||v+d.width<0||v>y)&&this.hidePopover(),this.style.transform=`translate(${v}px, ${m}px)`,this.style.opacity="1"}),ze(this,Fr,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`}),this.addEventListener("beforetoggle",L(this,Rr),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,L(this,Le).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),L(this,ft)||(xi(this,ft,new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,o=t.contentRect.height;r===L(this,Ii).width&&o===L(this,Ii).height||(xi(this,Ii,{width:r,height:o}),L(this,Le).call(this))})),L(this,ft).observe(this))}disconnectedCallback(){super.disconnectedCallback(),Ye(this,$e,Wr).call(this),L(this,ft)?.disconnect(),xi(this,ft,null)}_getScrollParents(){return L(this,Ze)}render(){return h`<slot></slot>`}},Oe=new WeakMap,Ze=new WeakMap,ft=new WeakMap,Ii=new WeakMap,Rr=new WeakMap,Le=new WeakMap,Ci=new WeakMap,Fr=new WeakMap,$e=new WeakSet,Gr=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},fa=function(){L(this,Ze).forEach(i=>{i.addEventListener("scroll",L(this,Le),{passive:!0})}),document.addEventListener("scroll",L(this,Le),{passive:!0})},Wr=function(){L(this,Ze).forEach(i=>{i.removeEventListener("scroll",L(this,Le))}),document.removeEventListener("scroll",L(this,Le))},ya=function(){if(xi(this,Ze,[]),!L(this,Oe))return;let i=getComputedStyle(L(this,Oe));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=L(this,Oe);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=Ye(this,$e,qr).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&L(this,Ze).push(r),i.position==="fixed")return;r=Ye(this,$e,qr).call(this,r)}L(this,Ze).push(document.body)},qr=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},n.UUIPopoverContainerElement.styles=[b`
|
|
1161
1158
|
:host {
|
|
1162
1159
|
margin: 0;
|
|
1163
1160
|
width: fit-content;
|
|
@@ -1170,11 +1167,11 @@
|
|
|
1170
1167
|
overflow: visible;
|
|
1171
1168
|
color: var(--uui-color-text,#060606);
|
|
1172
1169
|
}
|
|
1173
|
-
`],
|
|
1170
|
+
`],gt([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),gt([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),gt([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),gt([w()],n.UUIPopoverContainerElement.prototype,"_placement",2),gt([w()],n.UUIPopoverContainerElement.prototype,"_open",2),gt([w()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=gt([p("uui-popover-container")],n.UUIPopoverContainerElement);var Kh=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolMoreElement=class extends g{render(){return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
1174
1171
|
<circle cx="17" cy="50" r="9"></circle>
|
|
1175
1172
|
<circle cx="50" cy="50" r="9"></circle>
|
|
1176
1173
|
<circle cx="83" cy="50" r="9"></circle>
|
|
1177
|
-
</svg>`}}
|
|
1174
|
+
</svg>`}},n.UUISymbolMoreElement.styles=[b`
|
|
1178
1175
|
:host {
|
|
1179
1176
|
display: inline-block;
|
|
1180
1177
|
vertical-align: bottom;
|
|
@@ -1185,7 +1182,7 @@
|
|
|
1185
1182
|
svg {
|
|
1186
1183
|
fill: currentColor;
|
|
1187
1184
|
}
|
|
1188
|
-
`],
|
|
1185
|
+
`],n.UUISymbolMoreElement=Kh([p("uui-symbol-more")],n.UUISymbolMoreElement);var Xh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,wa=i=>{throw TypeError(i)},jt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xh(e,t,o),o},Kr=(i,e,t)=>e.has(i)||wa("Cannot "+t),I=(i,e,t)=>(Kr(i,e,"read from private field"),t?t.call(i):e.get(i)),_e=(i,e,t)=>e.has(i)?wa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Me=(i,e,t,r)=>(Kr(i,e,"write to private field"),e.set(i,t),t),Ue=(i,e,t)=>(Kr(i,e,"access private method"),t),ke,de,Ne,Qe,Eo,Si,Ai,Pi,oe,$a,_a,Xr,Yr,Zr,Qr,Rt;n.UUIResponsiveContainerElement=class extends g{constructor(){super(...arguments),_e(this,oe),this.collapse="end",_e(this,ke,[]),_e(this,de,[]),_e(this,Ne,new Map),_e(this,Qe,[]),_e(this,Eo,new ResizeObserver(Ue(this,oe,_a).bind(this))),_e(this,Si,[]),_e(this,Ai,!1),_e(this,Pi,!1),_e(this,Rt,e=>{const t=e.currentTarget,r=I(this,Ne).get(t);r&&(this._popoverContainerElement?.hidePopover(),r.click())})}connectedCallback(){super.connectedCallback(),Me(this,Pi,!0),Ue(this,oe,$a).call(this)}disconnectedCallback(){super.disconnectedCallback(),Me(this,Pi,!1),I(this,Eo).disconnect(),Ue(this,oe,Yr).call(this)}render(){const e=h`
|
|
1189
1186
|
<uui-button
|
|
1190
1187
|
popovertarget="popover-container"
|
|
1191
1188
|
style="display: none"
|
|
@@ -1200,7 +1197,7 @@
|
|
|
1200
1197
|
<div id="main">
|
|
1201
1198
|
${this.collapse==="start"?e:""}
|
|
1202
1199
|
<div id="items-container">
|
|
1203
|
-
<slot @slotchange=${
|
|
1200
|
+
<slot @slotchange=${Ue(this,oe,Xr)}></slot>
|
|
1204
1201
|
</div>
|
|
1205
1202
|
${this.collapse==="end"?e:""}
|
|
1206
1203
|
</div>
|
|
@@ -1209,10 +1206,10 @@
|
|
|
1209
1206
|
popover
|
|
1210
1207
|
placement=${this.collapse==="start"?"bottom-start":"bottom-end"}>
|
|
1211
1208
|
<div id="dropdown-container">
|
|
1212
|
-
${
|
|
1209
|
+
${wo(I(this,de),t=>h`${t}`)}
|
|
1213
1210
|
</div>
|
|
1214
1211
|
</uui-popover-container>
|
|
1215
|
-
`}},
|
|
1212
|
+
`}},ke=new WeakMap,de=new WeakMap,Ne=new WeakMap,Qe=new WeakMap,Eo=new WeakMap,Si=new WeakMap,Ai=new WeakMap,Pi=new WeakMap,oe=new WeakSet,$a=async function(){_(this,"uui-button"),_(this,"uui-popover-container"),_(this,"uui-symbol-more"),await this.updateComplete,I(this,Eo).observe(this._mainElement),requestAnimationFrame(()=>{Ue(this,oe,Xr).call(this)})},_a=function(i){const e=i[0].contentBoxSize[0].inlineSize;Ue(this,oe,Qr).call(this,e)},Xr=function(){I(this,Pi)&&(Ue(this,oe,Yr).call(this),Me(this,ke,this._slottedNodes?[...this._slottedNodes]:[]),I(this,ke).forEach(i=>{const e=new ResizeObserver(Ue(this,oe,Zr).bind(this));e.observe(i),I(this,Si).push(e)}),Ue(this,oe,Zr).call(this))},Yr=function(){I(this,Si).forEach(i=>i.disconnect()),Me(this,Si,[]),Me(this,Qe,[]),I(this,de).forEach(i=>{i.removeEventListener("click",I(this,Rt))}),Me(this,de,[]),I(this,Ne).clear()},Zr=async function(){if(I(this,Ai))return;Me(this,Ai,!0),await this.updateComplete;const i=Number.parseFloat(getComputedStyle(this).getPropertyValue("--uui-responsive-container-gap")),e=Number.isNaN(i)?8:i;let t=0;for(let o=0;o<I(this,ke).length;o++)I(this,ke)[o].style.display="",t+=I(this,ke)[o].offsetWidth,I(this,Qe)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",Ue(this,oe,Qr).call(this,this._mainElement.offsetWidth),Me(this,Ai,!1)},Qr=function(i){const e=this._moreButtonElement?.offsetWidth||40,t=i-e;I(this,de).forEach(o=>{o.removeEventListener("click",I(this,Rt))}),Me(this,de,[]),I(this,Ne).clear();const r=I(this,Qe).length;if(this.collapse==="end")for(let o=0;o<r;o++){const s=I(this,Qe)[o],a=I(this,ke)[o],u=o===r-1?i:t;if(s<=u)a.style.display="";else{a.style.display="none";const c=a.cloneNode(!0);c.style.display="",c.addEventListener("click",I(this,Rt)),I(this,Ne).set(c,a),I(this,Ne).set(a,c),I(this,de).push(c)}}else{const o=I(this,Qe)[r-1]||0;for(let s=0;s<r;s++){const a=I(this,ke)[s],u=o-(s>0?I(this,Qe)[s-1]:0),c=(s===0||I(this,ke)[s-1].style.display==="none")&&I(this,de).length===0?i:t;if(u<=c)a.style.display="";else{a.style.display="none";const d=a.cloneNode(!0);d.style.display="",d.addEventListener("click",I(this,Rt)),I(this,Ne).set(d,a),I(this,Ne).set(a,d),I(this,de).push(d)}}}I(this,de).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement?.hidePopover()):this._moreButtonElement.style.display="",this.requestUpdate()},Rt=new WeakMap,n.UUIResponsiveContainerElement.styles=[b`
|
|
1216
1213
|
:host {
|
|
1217
1214
|
display: flex;
|
|
1218
1215
|
min-width: 0;
|
|
@@ -1256,7 +1253,7 @@
|
|
|
1256
1253
|
padding: var(--uui-size-space-2,6px);
|
|
1257
1254
|
gap: var(--uui-size-space-1,3px);
|
|
1258
1255
|
}
|
|
1259
|
-
`],
|
|
1256
|
+
`],jt([S("#more-button")],n.UUIResponsiveContainerElement.prototype,"_moreButtonElement",2),jt([S("#popover-container")],n.UUIResponsiveContainerElement.prototype,"_popoverContainerElement",2),jt([S("#main")],n.UUIResponsiveContainerElement.prototype,"_mainElement",2),jt([l({type:String,reflect:!0})],n.UUIResponsiveContainerElement.prototype,"collapse",2),jt([Pe({flatten:!0})],n.UUIResponsiveContainerElement.prototype,"_slottedNodes",2),n.UUIResponsiveContainerElement=jt([p("uui-responsive-container")],n.UUIResponsiveContainerElement);var Zh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,Jr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zh(e,t,o),o};n.UUIBreadcrumbItemElement=class extends g{constructor(){super(...arguments),this.lastItem=!1}connectedCallback(){super.connectedCallback()}renderLinkAndSeparator(){const e=this.href?h`<a id="link" href=${this.href}><slot></slot></a>`:h`<span id="link"><slot></slot></span>`;return h`${e}<span part="separator"></span>`}renderCurrent(){return h`<span id="last-item"><slot></slot></span>`}render(){return h`${this.lastItem?this.renderCurrent():this.renderLinkAndSeparator()}`}},n.UUIBreadcrumbItemElement.styles=[b`
|
|
1260
1257
|
:host {
|
|
1261
1258
|
font-size: var(--uui-type-small-size,12px);
|
|
1262
1259
|
color: currentColor;
|
|
@@ -1295,14 +1292,14 @@
|
|
|
1295
1292
|
overflow: hidden;
|
|
1296
1293
|
text-overflow: ellipsis;
|
|
1297
1294
|
}
|
|
1298
|
-
`],
|
|
1295
|
+
`],Jr([l()],n.UUIBreadcrumbItemElement.prototype,"href",2),Jr([l({type:Boolean,attribute:"last-item"})],n.UUIBreadcrumbItemElement.prototype,"lastItem",2),n.UUIBreadcrumbItemElement=Jr([p("uui-breadcrumb-item")],n.UUIBreadcrumbItemElement);var Jh=Object.defineProperty,ed=Object.getOwnPropertyDescriptor,Ua=(i,e,t,r)=>{for(var o=r>1?void 0:r?ed(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Jh(e,t,o),o};n.UUIBreadcrumbsElement=class extends g{elementIsBreadcrumbItem(e){return e instanceof n.UUIBreadcrumbItemElement}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation"),_(this,"uui-responsive-container")}handleSlotChange(){if(this.slotNodes.length>0){const e=this.slotNodes[this.slotNodes.length-1];e.setAttribute("aria-current","page"),this.elementIsBreadcrumbItem(e)&&(e.lastItem=!0)}}render(){return h`<uui-responsive-container
|
|
1299
1296
|
id="breadcrumbs-list"
|
|
1300
1297
|
collapse="start">
|
|
1301
1298
|
<span slot="trigger-content">
|
|
1302
1299
|
<span class="ellipsis">…</span> <span class="separator">/</span>
|
|
1303
1300
|
</span>
|
|
1304
1301
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1305
|
-
</uui-responsive-container>`}},
|
|
1302
|
+
</uui-responsive-container>`}},n.UUIBreadcrumbsElement.styles=[b`
|
|
1306
1303
|
:host {
|
|
1307
1304
|
display: flex;
|
|
1308
1305
|
}
|
|
@@ -1333,65 +1330,14 @@
|
|
|
1333
1330
|
color: var(--uui-color-border,#d8d7d9); /* Matches breadcrumb separator */
|
|
1334
1331
|
margin-left: var(--uui-size-2,6px);
|
|
1335
1332
|
}
|
|
1336
|
-
`],
|
|
1337
|
-
@keyframes uui-blink {
|
|
1338
|
-
0%,
|
|
1339
|
-
100% {
|
|
1340
|
-
opacity: 0.5;
|
|
1341
|
-
}
|
|
1342
|
-
50% {
|
|
1343
|
-
opacity: 1;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
`,Hd=be("uui-blink 0.9s infinite both"),Rd=v`
|
|
1347
|
-
@keyframes pulse {
|
|
1348
|
-
0% {
|
|
1349
|
-
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
1350
|
-
transform: translate(-50%, -50%) scale(0.2);
|
|
1351
|
-
opacity: 0.9;
|
|
1352
|
-
}
|
|
1353
|
-
80% {
|
|
1354
|
-
-webkit-transform: translate(-50%, -50%) scale(1.2);
|
|
1355
|
-
transform: translate(-50%, -50%) scale(1.2);
|
|
1356
|
-
opacity: 0;
|
|
1357
|
-
}
|
|
1358
|
-
100% {
|
|
1359
|
-
-webkit-transform: translate(-50%, -50%) scale(2.2);
|
|
1360
|
-
transform: translate(-50%, -50%) scale(2.2);
|
|
1361
|
-
opacity: 0;
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
`;be("pulse 0.8s ease-in-out infinite both");const Ho=v`
|
|
1365
|
-
@keyframes uui-horizontal-shake {
|
|
1366
|
-
10%,
|
|
1367
|
-
90% {
|
|
1368
|
-
transform: translateX(-1px);
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
20%,
|
|
1372
|
-
80% {
|
|
1373
|
-
transform: translateX(1px);
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
30%,
|
|
1377
|
-
50%,
|
|
1378
|
-
70% {
|
|
1379
|
-
transform: translateX(-2px);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
40%,
|
|
1383
|
-
60% {
|
|
1384
|
-
transform: translateX(2px);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
`,Ro=be("uui-horizontal-shake 600ms ease backwards");/**
|
|
1333
|
+
`],Ua([Pe({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],n.UUIBreadcrumbsElement.prototype,"slotNodes",2),n.UUIBreadcrumbsElement=Ua([p("uui-breadcrumbs")],n.UUIBreadcrumbsElement);/**
|
|
1388
1334
|
* @license
|
|
1389
1335
|
* Copyright 2018 Google LLC
|
|
1390
1336
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1391
|
-
*/const
|
|
1337
|
+
*/const ka="important",td=" !"+ka,Te=Vt(class extends Ht{constructor(i){var e;if(super(i),i.type!==he.ATTRIBUTE||i.name!=="style"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ht===void 0){this.ht=new Set;for(const r in e)this.ht.add(r);return this.render(e)}this.ht.forEach((r=>{e[r]==null&&(this.ht.delete(r),r.includes("-")?t.removeProperty(r):t[r]="")}));for(const r in e){const o=e[r];if(o!=null){this.ht.add(r);const s=typeof o=="string"&&o.endsWith(td);r.includes("-")||s?t.setProperty(r,s?o.slice(0,-11):o,s?ka:""):t[r]=o}}return J}});let en=class extends z{static{this.CLICK="click"}constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};var id=Object.defineProperty,od=Object.getOwnPropertyDescriptor,Ea=i=>{throw TypeError(i)},yt=(i,e,t,r)=>{for(var o=r>1?void 0:r?od(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&id(e,t,o),o},rd=(i,e,t)=>e.has(i)||Ea("Cannot "+t),nd=(i,e,t)=>e.has(i)?Ea("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),xo=(i,e,t)=>(rd(i,e,"access private method"),t),Ft,tn,xa,Ia;n.UUIButtonInlineCreateElement=class extends g{constructor(){super(...arguments),nd(this,Ft),this._position=0,this.vertical=!1}_onMouseMove(e){this._position=(this.vertical?e.offsetY:e.offsetX)-5}_handleClick(e){e.preventDefault(),e.stopImmediatePropagation(),e.target?.blur?.(),this.dispatchEvent(new en(en.CLICK))}render(){return this.href?xo(this,Ft,xa).call(this):xo(this,Ft,Ia).call(this)}},Ft=new WeakSet,tn=function(){return h`
|
|
1392
1338
|
<div
|
|
1393
1339
|
id="plus"
|
|
1394
|
-
style=${
|
|
1340
|
+
style=${Te({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}>
|
|
1395
1341
|
<svg
|
|
1396
1342
|
id="plus-icon"
|
|
1397
1343
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1400,23 +1346,23 @@
|
|
|
1400
1346
|
d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z" />
|
|
1401
1347
|
</svg>
|
|
1402
1348
|
</div>
|
|
1403
|
-
`},
|
|
1349
|
+
`},xa=function(){return h`<a
|
|
1404
1350
|
id="button-wrapper"
|
|
1405
1351
|
@mousemove=${this._onMouseMove}
|
|
1406
|
-
href=${
|
|
1407
|
-
target=${
|
|
1408
|
-
rel=${
|
|
1352
|
+
href=${$(this.href)}
|
|
1353
|
+
target=${$(this.target||void 0)}
|
|
1354
|
+
rel=${$(this.rel||$(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
1409
1355
|
aria-label=${this.label?this.label:"create new element"}>
|
|
1410
|
-
${
|
|
1411
|
-
</a>`},
|
|
1356
|
+
${xo(this,Ft,tn).call(this)}
|
|
1357
|
+
</a>`},Ia=function(){return h`
|
|
1412
1358
|
<button
|
|
1413
1359
|
id="button-wrapper"
|
|
1414
1360
|
@mousemove=${this._onMouseMove}
|
|
1415
1361
|
@click=${this._handleClick}
|
|
1416
1362
|
aria-label=${this.label?this.label:"create new element"}>
|
|
1417
|
-
${
|
|
1363
|
+
${xo(this,Ft,tn).call(this)}
|
|
1418
1364
|
</button>
|
|
1419
|
-
`},
|
|
1365
|
+
`},n.UUIButtonInlineCreateElement.styles=[Ah,b`
|
|
1420
1366
|
:host {
|
|
1421
1367
|
display: flex;
|
|
1422
1368
|
position: relative;
|
|
@@ -1470,7 +1416,7 @@
|
|
|
1470
1416
|
:host(:focus) #button-wrapper:before,
|
|
1471
1417
|
:host(:focus-within) #button-wrapper:before,
|
|
1472
1418
|
:host(:hover) #button-wrapper:before {
|
|
1473
|
-
animation: ${
|
|
1419
|
+
animation: ${Ph};
|
|
1474
1420
|
background-color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
1475
1421
|
border-color: var(--uui-color-surface,#fff) !important;
|
|
1476
1422
|
}
|
|
@@ -1573,415 +1519,17 @@
|
|
|
1573
1519
|
#button-wrapper:active #plus {
|
|
1574
1520
|
transform: scale(1.1);
|
|
1575
1521
|
}
|
|
1576
|
-
`],Pt([w()],s.UUIButtonInlineCreateElement.prototype,"_position",2),Pt([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"label",2),Pt([l({type:Boolean,reflect:!0})],s.UUIButtonInlineCreateElement.prototype,"vertical",2),Pt([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"href",2),Pt([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"target",2),Pt([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"rel",2),s.UUIButtonInlineCreateElement=Pt([m("uui-button-inline-create")],s.UUIButtonInlineCreateElement),p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`;const Wo=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`;const Xd=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`;const Yd=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`;const Zd=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`;const kn=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`;const Qd=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`;const Jd=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`;const ep=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,tp=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`;p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`;const ip=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;var op=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,ol=i=>{throw TypeError(i)},se=(i,e,t,r)=>{for(var o=r>1?void 0:r?rp(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&op(e,t,o),o},rl=(i,e,t)=>e.has(i)||ol("Cannot "+t),np=(i,e,t)=>(rl(i,e,"read from private field"),e.get(i)),sp=(i,e,t)=>e.has(i)?ol("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ap=(i,e,t,r)=>(rl(i,e,"write to private field"),e.set(i,t),t),Go;s.UUIButtonElement=class extends xe(Ee("",Zh(f))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",sp(this,Go),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(np(this,Go)),(this.state==="success"||this.state==="failed")&&ap(this,Go,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":k(this,"uui-loader-circle"),e=h`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":k(this,"uui-icon"),e=h`<uui-icon
|
|
1577
|
-
name="check"
|
|
1578
|
-
.fallback=${Wo.strings[0]}></uui-icon>`;break;case"failed":k(this,"uui-icon"),e=h`<uui-icon
|
|
1579
|
-
name="wrong"
|
|
1580
|
-
.fallback=${ip.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${e}</div>`}render(){return this.href?h`
|
|
1581
|
-
<a
|
|
1582
|
-
id="button"
|
|
1583
|
-
aria-label=${_(this.label)}
|
|
1584
|
-
title=${_(this.title===""?void 0:this.title)}
|
|
1585
|
-
href=${_(this.disabled?void 0:this.href)}
|
|
1586
|
-
target=${_(this.target||void 0)}
|
|
1587
|
-
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1588
|
-
${this.renderState()} ${this.renderLabel()}
|
|
1589
|
-
<slot name="extra"></slot>
|
|
1590
|
-
</a>
|
|
1591
|
-
`:h`
|
|
1592
|
-
<button
|
|
1593
|
-
id="button"
|
|
1594
|
-
type=${this.type}
|
|
1595
|
-
?disabled=${this.disabled}
|
|
1596
|
-
aria-label=${_(this.label)}
|
|
1597
|
-
title=${_(this.title===""?void 0:this.title)}>
|
|
1598
|
-
${this.renderState()} ${this.renderLabel()}
|
|
1599
|
-
<slot name="extra"></slot>
|
|
1600
|
-
</button>
|
|
1601
|
-
`}},Go=new WeakMap,s.UUIButtonElement.styles=[Ho,v`
|
|
1602
|
-
:host {
|
|
1603
|
-
position: relative;
|
|
1604
|
-
display: inline-flex;
|
|
1605
|
-
margin-left: calc(var(--uui-button-merge-border-left, 0) * -1px);
|
|
1606
|
-
--uui-button-padding-left-factor: 3;
|
|
1607
|
-
--uui-button-padding-right-factor: 3;
|
|
1608
|
-
--uui-button-padding-top-factor: 1;
|
|
1609
|
-
--uui-button-padding-bottom-factor: 1;
|
|
1610
|
-
|
|
1611
|
-
min-height: var(--uui-button-height, var(--uui-size-11,33px));
|
|
1612
|
-
max-height: 100%;
|
|
1613
|
-
cursor: pointer;
|
|
1614
|
-
|
|
1615
|
-
text-align: center;
|
|
1616
|
-
font-size: var(--uui-button-font-size, inherit);
|
|
1617
|
-
font-weight: var(--uui-button-font-weight, 500);
|
|
1618
|
-
transition:
|
|
1619
|
-
background-color 80ms,
|
|
1620
|
-
border-color 80ms,
|
|
1621
|
-
color 80ms;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
:host([compact]) {
|
|
1625
|
-
--uui-button-padding-left-factor: 1;
|
|
1626
|
-
--uui-button-padding-right-factor: 1;
|
|
1627
|
-
--uui-button-padding-top-factor: 0;
|
|
1628
|
-
--uui-button-padding-bottom-factor: 0;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
.label {
|
|
1632
|
-
line-height: 1; /** needed to reset 'a > span' */
|
|
1633
|
-
transition: opacity 120ms;
|
|
1634
|
-
display: flex;
|
|
1635
|
-
gap: var(--uui-size-1,3px);
|
|
1636
|
-
align-items: center;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
:host([state]:not([state=''])) .label {
|
|
1640
|
-
opacity: 0;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
#state {
|
|
1644
|
-
position: absolute;
|
|
1645
|
-
opacity: 0;
|
|
1646
|
-
animation-name: fadeIn;
|
|
1647
|
-
animation-delay: 40ms;
|
|
1648
|
-
animation-duration: 360ms;
|
|
1649
|
-
animation-fill-mode: forwards;
|
|
1650
|
-
display: flex;
|
|
1651
|
-
justify-content: center;
|
|
1652
|
-
width: 100%;
|
|
1653
|
-
height: 100%;
|
|
1654
|
-
align-items: center;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
#button {
|
|
1658
|
-
width: 100%;
|
|
1659
|
-
background-color: transparent;
|
|
1660
|
-
color: inherit;
|
|
1661
|
-
font-size: inherit;
|
|
1662
|
-
border-radius: inherit;
|
|
1663
|
-
font-family: inherit;
|
|
1664
|
-
font-weight: inherit;
|
|
1665
|
-
text-align: inherit;
|
|
1666
|
-
border: none;
|
|
1667
|
-
cursor: inherit;
|
|
1668
|
-
|
|
1669
|
-
display: inline-flex;
|
|
1670
|
-
align-items: center;
|
|
1671
|
-
justify-content: var(--uui-button-content-align, center);
|
|
1672
|
-
|
|
1673
|
-
/* for anchor tag: */
|
|
1674
|
-
text-decoration: none;
|
|
1675
|
-
color: currentColor;
|
|
1676
|
-
line-height: inherit;
|
|
1677
|
-
|
|
1678
|
-
border-width: var(--uui-button-border-width, 1px);
|
|
1679
|
-
border-style: solid;
|
|
1680
|
-
border-radius: var(
|
|
1681
|
-
--uui-button-border-radius,
|
|
1682
|
-
var(--uui-border-radius,3px)
|
|
1683
|
-
);
|
|
1684
|
-
cursor: pointer;
|
|
1685
|
-
|
|
1686
|
-
padding: calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor))
|
|
1687
|
-
calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor))
|
|
1688
|
-
calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor))
|
|
1689
|
-
calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));
|
|
1690
|
-
|
|
1691
|
-
box-shadow: none;
|
|
1692
|
-
|
|
1693
|
-
transition: var(--uui-button-transition, none);
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
#button:focus-visible {
|
|
1697
|
-
outline: 2px solid
|
|
1698
|
-
var(
|
|
1699
|
-
--uui-focus-outline-color,
|
|
1700
|
-
var(--color-emphasis, var(--uui-color-focus,#3879ff))
|
|
1701
|
-
);
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
button[disabled]:active,
|
|
1705
|
-
a:not([href]):active {
|
|
1706
|
-
animation: ${Ro};
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
/* ANIMATIONS */
|
|
1710
|
-
@keyframes fadeIn {
|
|
1711
|
-
0% {
|
|
1712
|
-
opacity: 0;
|
|
1713
|
-
}
|
|
1714
|
-
100% {
|
|
1715
|
-
opacity: 1;
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
@keyframes fadeOut {
|
|
1720
|
-
0% {
|
|
1721
|
-
opacity: 1;
|
|
1722
|
-
}
|
|
1723
|
-
100% {
|
|
1724
|
-
opacity: 0;
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
#icon-check,
|
|
1729
|
-
#icon-wrong {
|
|
1730
|
-
display: grid;
|
|
1731
|
-
place-items: center;
|
|
1732
|
-
width: 1.5em;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
#loader {
|
|
1736
|
-
font-size: 1.5em;
|
|
1737
|
-
}
|
|
1738
|
-
:host([look]:not([look=''])) #loader {
|
|
1739
|
-
color: inherit;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
/* edge case for default color */
|
|
1743
|
-
:host(:not([color]):not([look='primary'])),
|
|
1744
|
-
:host([color='']:not([look='primary'])),
|
|
1745
|
-
:host([color='default']:not([look='primary'])) {
|
|
1746
|
-
--uui-button-contrast-hover: var(--uui-color-default-emphasis,#3544b1);
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
:host([color='warning'][look='outline']) #button,
|
|
1750
|
-
:host([color='warning'][look='placeholder']) #button {
|
|
1751
|
-
--uui-button-contrast-hover: var(--color-standalone);
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
/** Button color attribute: */
|
|
1755
|
-
#button {
|
|
1756
|
-
--color: var(--uui-color-default,#1b264f);
|
|
1757
|
-
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
1758
|
-
28,
|
|
1759
|
-
35,
|
|
1760
|
-
59
|
|
1761
|
-
));
|
|
1762
|
-
--color-emphasis: var(--uui-color-default-emphasis,#3544b1);
|
|
1763
|
-
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
1764
|
-
}
|
|
1765
|
-
:host([color='positive']) #button {
|
|
1766
|
-
--color: var(--uui-color-positive,#0b8152);
|
|
1767
|
-
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
1768
|
-
10,
|
|
1769
|
-
115,
|
|
1770
|
-
73
|
|
1771
|
-
));
|
|
1772
|
-
--color-emphasis: var(--uui-color-positive-emphasis,rgb(
|
|
1773
|
-
13,
|
|
1774
|
-
155,
|
|
1775
|
-
98
|
|
1776
|
-
));
|
|
1777
|
-
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
1778
|
-
}
|
|
1779
|
-
:host([color='warning']) #button {
|
|
1780
|
-
--color: var(--uui-color-warning,#fbd142);
|
|
1781
|
-
--color-standalone: var(--uui-color-warning-standalone,#a17700);
|
|
1782
|
-
--color-emphasis: var(--uui-color-warning-emphasis,rgb(
|
|
1783
|
-
251,
|
|
1784
|
-
224,
|
|
1785
|
-
101
|
|
1786
|
-
));
|
|
1787
|
-
--color-contrast: var(--uui-color-warning-contrast,#000);
|
|
1788
|
-
}
|
|
1789
|
-
:host([color='danger']) #button {
|
|
1790
|
-
--color: var(--uui-color-danger,#c31d4c);
|
|
1791
|
-
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
1792
|
-
174,
|
|
1793
|
-
30,
|
|
1794
|
-
71
|
|
1795
|
-
));
|
|
1796
|
-
--color-emphasis: var(--uui-color-danger-emphasis,rgb(
|
|
1797
|
-
223,
|
|
1798
|
-
42,
|
|
1799
|
-
93
|
|
1800
|
-
));
|
|
1801
|
-
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
1802
|
-
}
|
|
1803
|
-
:host([color='invalid']) #button {
|
|
1804
|
-
--color: var(--uui-color-invalid,#c31d4c);
|
|
1805
|
-
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
1806
|
-
174,
|
|
1807
|
-
30,
|
|
1808
|
-
71
|
|
1809
|
-
));
|
|
1810
|
-
--color-emphasis: var(--uui-color-invalid-emphasis,rgb(
|
|
1811
|
-
223,
|
|
1812
|
-
42,
|
|
1813
|
-
93
|
|
1814
|
-
));
|
|
1815
|
-
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
1816
|
-
}
|
|
1817
|
-
:host([disabled]) #button {
|
|
1818
|
-
--color: var(--uui-color-disabled,#f3f3f5);
|
|
1819
|
-
--color-standalone: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1820
|
-
--color-emphasis: var(--uui-color-disabled,#f3f3f5);
|
|
1821
|
-
--color-contrast: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1822
|
-
|
|
1823
|
-
cursor: default;
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
/** Button look attribute: */
|
|
1827
|
-
/* DEFAULT */
|
|
1828
|
-
#button {
|
|
1829
|
-
background-color: var(--uui-button-background-color, transparent);
|
|
1830
|
-
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1831
|
-
border-color: var(--uui-button-border-color, transparent);
|
|
1832
|
-
}
|
|
1833
|
-
:host(:not([disabled]):hover) #button {
|
|
1834
|
-
background-color: var(
|
|
1835
|
-
--uui-button-background-color-hover,
|
|
1836
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
1837
|
-
250,
|
|
1838
|
-
250,
|
|
1839
|
-
250
|
|
1840
|
-
))
|
|
1841
|
-
);
|
|
1842
|
-
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1843
|
-
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1844
|
-
}
|
|
1845
|
-
:host([disabled]) #button {
|
|
1846
|
-
background-color: var(
|
|
1847
|
-
--uui-button-background-color-disabled,
|
|
1848
|
-
transparent
|
|
1849
|
-
);
|
|
1850
|
-
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1851
|
-
border-color: var(--uui-button-border-color-disabled, transparent);
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
/* PRIMARY */
|
|
1855
|
-
:host([look='primary']) #button {
|
|
1856
|
-
background-color: var(--uui-button-background-color, var(--color));
|
|
1857
|
-
color: var(--uui-button-contrast, var(--color-contrast));
|
|
1858
|
-
border-color: var(--uui-button-border-color, transparent);
|
|
1859
|
-
|
|
1860
|
-
/* special for primary: */
|
|
1861
|
-
font-weight: var(--uui-button-font-weight, 700);
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
:host([look='primary']:hover) #button {
|
|
1865
|
-
background-color: var(
|
|
1866
|
-
--uui-button-background-color-hover,
|
|
1867
|
-
var(--color-emphasis)
|
|
1868
|
-
);
|
|
1869
|
-
color: var(--uui-button-contrast-hover, var(--color-contrast));
|
|
1870
|
-
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
/* special outline offset tof primary style so you can see the outline */
|
|
1874
|
-
:host([look='primary']) #button:focus-visible {
|
|
1875
|
-
outline-offset: 2px;
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
:host([look='primary'][disabled]) #button {
|
|
1879
|
-
background-color: var(
|
|
1880
|
-
--uui-button-background-color-disabled,
|
|
1881
|
-
var(--color)
|
|
1882
|
-
);
|
|
1883
|
-
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1884
|
-
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
1885
|
-
}
|
|
1886
|
-
/* SECONDARY */
|
|
1887
|
-
:host([look='secondary']) #button {
|
|
1888
|
-
background-color: var(
|
|
1889
|
-
--uui-button-background-color,
|
|
1890
|
-
var(--uui-color-surface-alt,#f3f3f5)
|
|
1891
|
-
);
|
|
1892
|
-
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1893
|
-
border-color: var(--uui-button-border-color, transparent);
|
|
1894
|
-
|
|
1895
|
-
/* special for secondary: */
|
|
1896
|
-
font-weight: var(--uui-button-font-weight, 700);
|
|
1897
|
-
}
|
|
1898
|
-
:host([look='secondary']:hover) #button {
|
|
1899
|
-
background-color: var(
|
|
1900
|
-
--uui-button-background-color-hover,
|
|
1901
|
-
var(--uui-color-surface-emphasis,rgb(
|
|
1902
|
-
250,
|
|
1903
|
-
250,
|
|
1904
|
-
250
|
|
1905
|
-
))
|
|
1906
|
-
);
|
|
1907
|
-
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1908
|
-
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1909
|
-
}
|
|
1910
|
-
:host([look='secondary'][disabled]) #button {
|
|
1911
|
-
background-color: var(
|
|
1912
|
-
--uui-button-background-color-disabled,
|
|
1913
|
-
var(--color)
|
|
1914
|
-
);
|
|
1915
|
-
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1916
|
-
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
/* OUTLINE */
|
|
1920
|
-
:host([look='outline']) #button {
|
|
1921
|
-
background-color: var(--uui-button-background-color, transparent);
|
|
1922
|
-
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1923
|
-
border-color: var(
|
|
1924
|
-
--uui-button-border-color,
|
|
1925
|
-
var(--uui-color-border-standalone,#c2c2c2)
|
|
1926
|
-
);
|
|
1927
|
-
|
|
1928
|
-
/* special for outline: */
|
|
1929
|
-
font-weight: var(--uui-button-font-weight, 700);
|
|
1930
|
-
}
|
|
1931
|
-
:host([look='outline']:not([disabled]):hover) #button {
|
|
1932
|
-
background-color: var(--uui-button-background-color-hover, transparent);
|
|
1933
|
-
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1934
|
-
border-color: var(--uui-button-border-color-hover);
|
|
1935
|
-
}
|
|
1936
|
-
:host([look='outline'][disabled]) #button {
|
|
1937
|
-
background-color: var(
|
|
1938
|
-
--uui-button-background-color-disabled,
|
|
1939
|
-
transparent
|
|
1940
|
-
);
|
|
1941
|
-
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
1942
|
-
border-color: var(
|
|
1943
|
-
--uui-button-border-color-disabled,
|
|
1944
|
-
var(--color-standalone)
|
|
1945
|
-
);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
/* PLACEHOLDER */
|
|
1949
|
-
:host([look='placeholder']) #button {
|
|
1950
|
-
border-style: dashed;
|
|
1951
|
-
background-color: var(--uui-button-background-color, transparent);
|
|
1952
|
-
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1953
|
-
border-color: var(
|
|
1954
|
-
--uui-button-border-color,
|
|
1955
|
-
var(--uui-color-border-standalone,#c2c2c2)
|
|
1956
|
-
);
|
|
1957
|
-
}
|
|
1958
|
-
:host([look='placeholder']:not([disabled]):hover) #button {
|
|
1959
|
-
background-color: var(--uui-button-background-color-hover, transparent);
|
|
1960
|
-
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1961
|
-
border-color: var(--uui-button-border-color-hover);
|
|
1962
|
-
}
|
|
1963
|
-
:host([look='placeholder'][disabled]) #button {
|
|
1964
|
-
background-color: var(
|
|
1965
|
-
--uui-button-background-color-disabled,
|
|
1966
|
-
var(--color)
|
|
1967
|
-
);
|
|
1968
|
-
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
1969
|
-
border-color: var(
|
|
1970
|
-
--uui-button-border-color-disabled,
|
|
1971
|
-
var(--color-standalone)
|
|
1972
|
-
);
|
|
1973
|
-
}
|
|
1974
|
-
`],se([l({type:String,reflect:!0})],s.UUIButtonElement.prototype,"type",2),se([l({type:Boolean,reflect:!0})],s.UUIButtonElement.prototype,"disabled",2),se([l({reflect:!0})],s.UUIButtonElement.prototype,"look",2),se([l({reflect:!0})],s.UUIButtonElement.prototype,"color",2),se([l({type:Boolean,reflect:!0})],s.UUIButtonElement.prototype,"compact",2),se([l({type:String,reflect:!0})],s.UUIButtonElement.prototype,"state",2),se([l({type:String})],s.UUIButtonElement.prototype,"href",2),se([l({type:String})],s.UUIButtonElement.prototype,"target",2),se([l({type:String})],s.UUIButtonElement.prototype,"rel",2),se([l({type:String})],s.UUIButtonElement.prototype,"title",2),se([S("#button")],s.UUIButtonElement.prototype,"_button",2),s.UUIButtonElement=se([m("uui-button")],s.UUIButtonElement);let qi=class extends M{constructor(){super(...arguments),this.text=null}static{this.COPIED="copied"}static{this.COPYING="copying"}};var lp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,nl=i=>{throw TypeError(i)},qo=(i,e,t,r)=>{for(var o=r>1?void 0:r?up(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&lp(e,t,o),o},sl=(i,e,t)=>e.has(i)||nl("Cannot "+t),Un=(i,e,t)=>(sl(i,e,"read from private field"),t?t.call(i):e.get(i)),al=(i,e,t)=>e.has(i)?nl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),cp=(i,e,t,r)=>(sl(i,e,"write to private field"),e.set(i,t),t),Ki,En;s.UUIButtonCopyTextElement=class extends s.UUIButtonElement{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,al(this,Ki),al(this,En,async()=>{this.state="waiting";let e=this.text;if(this.copyFrom){const r=document.getElementById(this.copyFrom);if(r)"value"in r?e=r.value:e=r.textContent??r.innerText??"";else{console.error(`Element ID ${this.copyFrom} not found to copy from`),this.state="failed";return}}const t=new qi(qi.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const r=new qi(qi.COPIED);r.text=e,this.dispatchEvent(r),cp(this,Ki,setTimeout(()=>{this.state="success"},this.animationStateDelay))}catch(r){this.state="failed",console.error("Error copying to clipboard",r)}}),k(this,"uui-icon"),this.addEventListener("click",Un(this,En))}disconnectedCallback(){super.disconnectedCallback(),Un(this,Ki)&&clearTimeout(Un(this,Ki))}renderLabel(){return h`
|
|
1522
|
+
`],yt([w()],n.UUIButtonInlineCreateElement.prototype,"_position",2),yt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),yt([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),yt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"href",2),yt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"target",2),yt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"rel",2),n.UUIButtonInlineCreateElement=yt([p("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let zi=class extends z{constructor(){super(...arguments),this.text=null}static{this.COPIED="copied"}static{this.COPYING="copying"}};var sd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,Ca=i=>{throw TypeError(i)},Io=(i,e,t,r)=>{for(var o=r>1?void 0:r?ad(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sd(e,t,o),o},Sa=(i,e,t)=>e.has(i)||Ca("Cannot "+t),on=(i,e,t)=>(Sa(i,e,"read from private field"),t?t.call(i):e.get(i)),Aa=(i,e,t)=>e.has(i)?Ca("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ld=(i,e,t,r)=>(Sa(i,e,"write to private field"),e.set(i,t),t),Oi,rn;n.UUIButtonCopyTextElement=class extends n.UUIButtonElement{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,Aa(this,Oi),Aa(this,rn,async()=>{this.state="waiting";let e=this.text;if(this.copyFrom){const r=document.getElementById(this.copyFrom);if(r)"value"in r?e=r.value:e=r.textContent??r.innerText??"";else{console.error(`Element ID ${this.copyFrom} not found to copy from`),this.state="failed";return}}const t=new zi(zi.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const r=new zi(zi.COPIED);r.text=e,this.dispatchEvent(r),ld(this,Oi,setTimeout(()=>{this.state="success"},this.animationStateDelay))}catch(r){this.state="failed",console.error("Error copying to clipboard",r)}}),_(this,"uui-icon"),this.addEventListener("click",on(this,rn))}disconnectedCallback(){super.disconnectedCallback(),on(this,Oi)&&clearTimeout(on(this,Oi))}renderLabel(){return h`
|
|
1975
1523
|
<slot class="label">
|
|
1976
1524
|
<uui-icon name="copy"></uui-icon>
|
|
1977
1525
|
</slot>
|
|
1978
|
-
`}},
|
|
1526
|
+
`}},Oi=new WeakMap,rn=new WeakMap,n.UUIButtonCopyTextElement.styles=n.UUIButtonElement.styles,Io([l({type:String})],n.UUIButtonCopyTextElement.prototype,"text",2),Io([l({type:String,attribute:"copy-from"})],n.UUIButtonCopyTextElement.prototype,"copyFrom",2),Io([l({type:Number,attribute:"animation-state-delay"})],n.UUIButtonCopyTextElement.prototype,"animationStateDelay",2),n.UUIButtonCopyTextElement=Io([p("uui-button-copy-text")],n.UUIButtonCopyTextElement);var ud=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUICheckboxElement=class extends ce{renderCheckbox(){return h`
|
|
1979
1527
|
<div id="ticker">
|
|
1980
1528
|
<div id="icon-check">
|
|
1981
|
-
${this.indeterminate?
|
|
1529
|
+
${this.indeterminate?Th:Uo}
|
|
1982
1530
|
</div>
|
|
1983
1531
|
</div>
|
|
1984
|
-
`}},
|
|
1532
|
+
`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...ce.styles,$o,b`
|
|
1985
1533
|
:host {
|
|
1986
1534
|
--uui-checkbox-size: 18px;
|
|
1987
1535
|
}
|
|
@@ -2177,13 +1725,13 @@
|
|
|
2177
1725
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2178
1726
|
}
|
|
2179
1727
|
:host([disabled]) label:active #ticker {
|
|
2180
|
-
animation: ${
|
|
1728
|
+
animation: ${_o};
|
|
2181
1729
|
}
|
|
2182
1730
|
:host([disabled]) input:checked + #ticker #icon-check,
|
|
2183
1731
|
:host([disabled]) input:indeterminate + #ticker #icon-check {
|
|
2184
1732
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2185
1733
|
}
|
|
2186
|
-
`],
|
|
1734
|
+
`],n.UUICheckboxElement=ud([p("uui-checkbox")],n.UUICheckboxElement);let Li=class extends z{static{this.OPEN="open"}};var cd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,Gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?hd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&cd(e,t,o),o};n.UUICardElement=class extends fo(Nt(g)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new Li(Li.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new Li(Li.OPEN)))}renderCheckbox(){if(this.selectable)return h`
|
|
2187
1735
|
<uui-checkbox
|
|
2188
1736
|
id="select-checkbox"
|
|
2189
1737
|
label="select"
|
|
@@ -2193,7 +1741,7 @@
|
|
|
2193
1741
|
@change=${()=>this.click()}>
|
|
2194
1742
|
</uui-checkbox>
|
|
2195
1743
|
`}render(){return h`<slot id="open-part"></slot>
|
|
2196
|
-
<div id="select-border"></div>`}},
|
|
1744
|
+
<div id="select-border"></div>`}},n.UUICardElement.styles=[Lt,b`
|
|
2197
1745
|
:host {
|
|
2198
1746
|
position: relative;
|
|
2199
1747
|
display: flex;
|
|
@@ -2355,41 +1903,41 @@
|
|
|
2355
1903
|
#select-checkbox[checked] {
|
|
2356
1904
|
opacity: 1;
|
|
2357
1905
|
}
|
|
2358
|
-
`],
|
|
2359
|
-
${
|
|
2360
|
-
${this.href?
|
|
1906
|
+
`],Gt([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),Gt([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),Gt([l({type:String})],n.UUICardElement.prototype,"href",2),Gt([l({type:String})],n.UUICardElement.prototype,"target",2),Gt([l({type:String})],n.UUICardElement.prototype,"rel",2),n.UUICardElement=Gt([p("uui-card")],n.UUICardElement);var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Pa=i=>{throw TypeError(i)},Co=(i,e,t,r)=>{for(var o=r>1?void 0:r?pd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&dd(e,t,o),o},bd=(i,e,t)=>e.has(i)||Pa("Cannot "+t),md=(i,e,t)=>e.has(i)?Pa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Mi=(i,e,t)=>(bd(i,e,"access private method"),t),wt,za,Oa,La,nn;n.UUICardBlockTypeElement=class extends n.UUICardElement{constructor(){super(...arguments),md(this,wt),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return h`
|
|
1907
|
+
${Mi(this,wt,La).call(this)}
|
|
1908
|
+
${this.href?Mi(this,wt,Oa).call(this):Mi(this,wt,za).call(this)}
|
|
2361
1909
|
<!-- Select border must be right after #open-part -->
|
|
2362
1910
|
<div id="select-border"></div>
|
|
2363
1911
|
${this.selectable?this.renderCheckbox():C}
|
|
2364
1912
|
<slot name="tag"></slot>
|
|
2365
1913
|
<slot name="actions"></slot>
|
|
2366
|
-
`}},
|
|
1914
|
+
`}},wt=new WeakSet,za=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2367
1915
|
<button
|
|
2368
1916
|
id="open-part"
|
|
2369
1917
|
class="uui-text"
|
|
2370
|
-
tabindex=${
|
|
1918
|
+
tabindex=${$(i)}
|
|
2371
1919
|
@click=${this.handleOpenClick}
|
|
2372
1920
|
@keydown=${this.handleOpenKeydown}>
|
|
2373
|
-
${
|
|
1921
|
+
${Mi(this,wt,nn).call(this)}
|
|
2374
1922
|
</button>
|
|
2375
|
-
`},
|
|
1923
|
+
`},Oa=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2376
1924
|
<a
|
|
2377
1925
|
id="open-part"
|
|
2378
1926
|
class="uui-text"
|
|
2379
|
-
tabindex=${
|
|
2380
|
-
href=${
|
|
2381
|
-
target=${
|
|
2382
|
-
rel=${
|
|
2383
|
-
${
|
|
1927
|
+
tabindex=${$(i)}
|
|
1928
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
1929
|
+
target=${$(this.target||void 0)}
|
|
1930
|
+
rel=${$(this.rel||e)}>
|
|
1931
|
+
${Mi(this,wt,nn).call(this)}
|
|
2384
1932
|
</a>
|
|
2385
|
-
`},
|
|
1933
|
+
`},La=function(){return h`<div id="portrait">
|
|
2386
1934
|
<slot></slot>
|
|
2387
|
-
</div> `},
|
|
1935
|
+
</div> `},nn=function(){return h`
|
|
2388
1936
|
<div id="content">
|
|
2389
1937
|
<span title="${this.name}" id="name">${this.name}</span>
|
|
2390
|
-
<small title="${
|
|
1938
|
+
<small title="${$(this.description)}">${this.description}<slot name="description"></slot></small>
|
|
2391
1939
|
</div></div>
|
|
2392
|
-
`},
|
|
1940
|
+
`},n.UUICardBlockTypeElement.styles=[...n.UUICardElement.styles,b`
|
|
2393
1941
|
:host {
|
|
2394
1942
|
background-color: var(--uui-color-surface-alt,#f3f3f5);
|
|
2395
1943
|
}
|
|
@@ -2531,7 +2079,7 @@
|
|
|
2531
2079
|
calc(var(--uui-size-space-4,12px) * -1);
|
|
2532
2080
|
top: 0;
|
|
2533
2081
|
}
|
|
2534
|
-
`],
|
|
2082
|
+
`],Co([l({type:String})],n.UUICardBlockTypeElement.prototype,"name",2),Co([l({type:String})],n.UUICardBlockTypeElement.prototype,"description",2),Co([l({type:String,attribute:"background"})],n.UUICardBlockTypeElement.prototype,"background",1),n.UUICardBlockTypeElement=Co([p("uui-card-block-type")],n.UUICardBlockTypeElement);var vd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,Ma=i=>{throw TypeError(i)},So=(i,e,t,r)=>{for(var o=r>1?void 0:r?gd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&vd(e,t,o),o},fd=(i,e,t)=>e.has(i)||Ma("Cannot "+t),yd=(i,e,t)=>e.has(i)?Ma("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ao=(i,e,t)=>(fd(i,e,"access private method"),t),Wt,sn,Na,Ta;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),yd(this,Wt),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
2535
2083
|
xmlns="http://www.w3.org/2000/svg"
|
|
2536
2084
|
viewBox="0 0 24 24"
|
|
2537
2085
|
fill="none"
|
|
@@ -2542,16 +2090,16 @@
|
|
|
2542
2090
|
id="icon">
|
|
2543
2091
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
2544
2092
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
2545
|
-
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return
|
|
2093
|
+
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return _(this,"uui-icon"),h`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}renderDetail(){return h`<small id="detail"
|
|
2546
2094
|
>${this.detail}<slot name="detail"></slot></small
|
|
2547
2095
|
><slot id="default"></slot>`}render(){return h`
|
|
2548
|
-
${this.href?
|
|
2096
|
+
${this.href?Ao(this,Wt,Ta).call(this):Ao(this,Wt,Na).call(this)}
|
|
2549
2097
|
<!-- Select border must be right after #open-part -->
|
|
2550
2098
|
<div id="select-border"></div>
|
|
2551
2099
|
${this.selectable?this.renderCheckbox():C}
|
|
2552
2100
|
<slot name="tag"></slot>
|
|
2553
2101
|
<slot name="actions"></slot>
|
|
2554
|
-
`}},
|
|
2102
|
+
`}},Wt=new WeakSet,sn=function(){return h`
|
|
2555
2103
|
<span id="content" class="uui-text">
|
|
2556
2104
|
<span id="item">
|
|
2557
2105
|
<span id="icon">
|
|
@@ -2564,24 +2112,24 @@
|
|
|
2564
2112
|
</span>
|
|
2565
2113
|
${this.renderDetail()}
|
|
2566
2114
|
</span>
|
|
2567
|
-
`},
|
|
2115
|
+
`},Na=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2568
2116
|
<button
|
|
2569
2117
|
id="open-part"
|
|
2570
|
-
tabindex=${
|
|
2118
|
+
tabindex=${$(i)}
|
|
2571
2119
|
@click=${this.handleOpenClick}
|
|
2572
2120
|
@keydown=${this.handleOpenKeydown}>
|
|
2573
|
-
${
|
|
2121
|
+
${Ao(this,Wt,sn).call(this)}
|
|
2574
2122
|
</button>
|
|
2575
|
-
`},
|
|
2123
|
+
`},Ta=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2576
2124
|
<a
|
|
2577
2125
|
id="open-part"
|
|
2578
|
-
tabindex=${
|
|
2579
|
-
href=${
|
|
2580
|
-
target=${
|
|
2581
|
-
rel=${
|
|
2582
|
-
${
|
|
2126
|
+
tabindex=${$(i)}
|
|
2127
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
2128
|
+
target=${$(this.target||void 0)}
|
|
2129
|
+
rel=${$(this.rel||e)}>
|
|
2130
|
+
${Ao(this,Wt,sn).call(this)}
|
|
2583
2131
|
</a>
|
|
2584
|
-
`},
|
|
2132
|
+
`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,b`
|
|
2585
2133
|
:host {
|
|
2586
2134
|
min-width: 250px;
|
|
2587
2135
|
flex-direction: column;
|
|
@@ -2688,33 +2236,33 @@
|
|
|
2688
2236
|
top: var(--uui-size-5,15px);
|
|
2689
2237
|
left: var(--uui-size-6,18px);
|
|
2690
2238
|
}
|
|
2691
|
-
`],
|
|
2239
|
+
`],So([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),So([l({type:String})],n.UUICardContentNodeElement.prototype,"detail",2),So([w()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=So([p("uui-card-content-node")],n.UUICardContentNodeElement);var wd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,Ba=i=>{throw TypeError(i)},Ni=(i,e,t,r)=>{for(var o=r>1?void 0:r?$d(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&wd(e,t,o),o},_d=(i,e,t)=>e.has(i)||Ba("Cannot "+t),Ud=(i,e,t)=>e.has(i)?Ba("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Po=(i,e,t)=>(_d(i,e,"access private method"),t),qt,Da,Va,an;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),Ud(this,qt),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?h`<uui-symbol-folder id="entity-symbol"></uui-symbol-folder>`:h`<uui-symbol-file
|
|
2692
2240
|
id="entity-symbol"
|
|
2693
2241
|
type="${this.fileExt}"></uui-symbol-file>`}render(){return h` ${this.renderMedia()}
|
|
2694
2242
|
<slot @slotchange=${this.queryPreviews}></slot>
|
|
2695
|
-
${this.href?
|
|
2243
|
+
${this.href?Po(this,qt,Va).call(this):Po(this,qt,Da).call(this)}
|
|
2696
2244
|
<!-- Select border must be right after .open-part -->
|
|
2697
2245
|
<div id="select-border"></div>
|
|
2698
2246
|
${this.selectable?this.renderCheckbox():C}
|
|
2699
2247
|
<slot name="tag"></slot>
|
|
2700
|
-
<slot name="actions"></slot>`}},
|
|
2248
|
+
<slot name="actions"></slot>`}},qt=new WeakSet,Da=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2701
2249
|
<button
|
|
2702
2250
|
id="open-part"
|
|
2703
|
-
tabindex=${
|
|
2251
|
+
tabindex=${$(i)}
|
|
2704
2252
|
@click=${this.handleOpenClick}
|
|
2705
2253
|
@keydown=${this.handleOpenKeydown}>
|
|
2706
|
-
${
|
|
2254
|
+
${Po(this,qt,an).call(this)}
|
|
2707
2255
|
</button>
|
|
2708
|
-
`},
|
|
2256
|
+
`},Va=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2709
2257
|
<a
|
|
2710
2258
|
id="open-part"
|
|
2711
|
-
tabindex=${
|
|
2712
|
-
href=${
|
|
2713
|
-
target=${
|
|
2714
|
-
rel=${
|
|
2715
|
-
${
|
|
2259
|
+
tabindex=${$(i)}
|
|
2260
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
2261
|
+
target=${$(this.target||void 0)}
|
|
2262
|
+
rel=${$(this.rel||e)}>
|
|
2263
|
+
${Po(this,qt,an).call(this)}
|
|
2716
2264
|
</a>
|
|
2717
|
-
`},
|
|
2265
|
+
`},an=function(){return h`
|
|
2718
2266
|
<div id="content" class="uui-text">
|
|
2719
2267
|
<!--
|
|
2720
2268
|
TODO: Implement info box when pop-out is ready
|
|
@@ -2722,7 +2270,7 @@
|
|
|
2722
2270
|
<span id="name" title="${this.name}">${this.name}</span>
|
|
2723
2271
|
<small id="detail">${this.detail}<slot name="detail"></slot></small>
|
|
2724
2272
|
</div>
|
|
2725
|
-
`},
|
|
2273
|
+
`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,b`
|
|
2726
2274
|
#entity-symbol {
|
|
2727
2275
|
align-self: center;
|
|
2728
2276
|
width: 60%;
|
|
@@ -2861,31 +2409,31 @@
|
|
|
2861
2409
|
height: var(--uui-size-8);
|
|
2862
2410
|
}
|
|
2863
2411
|
*/
|
|
2864
|
-
`],
|
|
2865
|
-
${this.href?
|
|
2412
|
+
`],Ni([l({type:String})],n.UUICardMediaElement.prototype,"name",2),Ni([l({type:String})],n.UUICardMediaElement.prototype,"detail",2),Ni([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),Ni([w()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=Ni([p("uui-card-media")],n.UUICardMediaElement);var kd=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,Ha=i=>{throw TypeError(i)},ln=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ed(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&kd(e,t,o),o},xd=(i,e,t)=>e.has(i)||Ha("Cannot "+t),Id=(i,e,t)=>e.has(i)?Ha("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),zo=(i,e,t)=>(xd(i,e,"access private method"),t),Kt,ja,Ra,un;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),Id(this,Kt),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=xh(e.target)}}connectedCallback(){super.connectedCallback(),_(this,"uui-avatar")}render(){return h`
|
|
2413
|
+
${this.href?zo(this,Kt,Ra).call(this):zo(this,Kt,ja).call(this)}
|
|
2866
2414
|
<!-- Select border must be right after #open-part -->
|
|
2867
2415
|
<div id="select-border"></div>
|
|
2868
2416
|
${this.selectable?this.renderCheckbox():C}
|
|
2869
2417
|
<slot name="tag"></slot>
|
|
2870
2418
|
<slot name="actions"></slot>
|
|
2871
|
-
`}},
|
|
2419
|
+
`}},Kt=new WeakSet,ja=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2872
2420
|
<div
|
|
2873
2421
|
id="open-part"
|
|
2874
|
-
tabindex=${
|
|
2422
|
+
tabindex=${$(i)}
|
|
2875
2423
|
@click=${this.handleOpenClick}
|
|
2876
2424
|
@keydown=${this.handleOpenKeydown}>
|
|
2877
|
-
${
|
|
2425
|
+
${zo(this,Kt,un).call(this)}
|
|
2878
2426
|
</div>
|
|
2879
|
-
`},
|
|
2427
|
+
`},Ra=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2880
2428
|
<a
|
|
2881
2429
|
id="open-part"
|
|
2882
|
-
tabindex=${
|
|
2883
|
-
href=${
|
|
2884
|
-
target=${
|
|
2885
|
-
rel=${
|
|
2886
|
-
${
|
|
2430
|
+
tabindex=${$(i)}
|
|
2431
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
2432
|
+
target=${$(this.target||void 0)}
|
|
2433
|
+
rel=${$(this.rel||e)}>
|
|
2434
|
+
${zo(this,Kt,un).call(this)}
|
|
2887
2435
|
</a>
|
|
2888
|
-
`},
|
|
2436
|
+
`},un=function(){return h`
|
|
2889
2437
|
<div id="content">
|
|
2890
2438
|
${this._avatarSlotHasContent?C:h`<uui-avatar
|
|
2891
2439
|
class="avatar"
|
|
@@ -2898,7 +2446,7 @@
|
|
|
2898
2446
|
<span title="${this.name}">${this.name}</span>
|
|
2899
2447
|
<slot></slot>
|
|
2900
2448
|
</div>
|
|
2901
|
-
`},
|
|
2449
|
+
`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,b`
|
|
2902
2450
|
:host {
|
|
2903
2451
|
min-width: 250px;
|
|
2904
2452
|
}
|
|
@@ -2984,7 +2532,7 @@
|
|
|
2984
2532
|
margin-top: var(--uui-size-space-1,3px);
|
|
2985
2533
|
margin-bottom: var(--uui-size-space-2,6px);
|
|
2986
2534
|
}
|
|
2987
|
-
`],
|
|
2535
|
+
`],ln([l({type:String})],n.UUICardUserElement.prototype,"name",2),ln([w()],n.UUICardUserElement.prototype,"_avatarSlotHasContent",2),n.UUICardUserElement=ln([p("uui-card-user")],n.UUICardUserElement);var Cd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,Fa=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Cd(e,t,o),o};n.UUICaretElement=class extends g{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return h`<svg
|
|
2988
2536
|
xmlns="http://www.w3.org/2000/svg"
|
|
2989
2537
|
viewBox="0 0 24 24"
|
|
2990
2538
|
fill="none"
|
|
@@ -2993,7 +2541,7 @@
|
|
|
2993
2541
|
stroke-linecap="round"
|
|
2994
2542
|
stroke-linejoin="round">
|
|
2995
2543
|
<path d="m4 9 8 8 8-8"></path>
|
|
2996
|
-
</svg>`}},
|
|
2544
|
+
</svg>`}},n.UUICaretElement.styles=[b`
|
|
2997
2545
|
:host {
|
|
2998
2546
|
display: inline-block;
|
|
2999
2547
|
width: 12px;
|
|
@@ -3007,27 +2555,27 @@
|
|
|
3007
2555
|
:host([open]) svg {
|
|
3008
2556
|
transform: rotate(180deg);
|
|
3009
2557
|
}
|
|
3010
|
-
`],
|
|
2558
|
+
`],Fa([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=Fa([p("uui-caret")],n.UUICaretElement);/**
|
|
3011
2559
|
* @license
|
|
3012
2560
|
* Copyright 2018 Google LLC
|
|
3013
2561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3014
|
-
*/const
|
|
2562
|
+
*/const cn=Vt(class extends Ht{constructor(i){var e;if(super(i),i.type!==he.ATTRIBUTE||i.name!=="class"||((e=i.strings)===null||e===void 0?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(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){var t,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!(!((t=this.nt)===null||t===void 0)&&t.has(s))&&this.it.add(s);return this.render(e)}const o=i.element.classList;this.it.forEach((s=>{s in e||(o.remove(s),this.it.delete(s))}));for(const s in e){const a=!!e[s];a===this.it.has(s)||!((r=this.nt)===null||r===void 0)&&r.has(s)||(a?(o.add(s),this.it.add(s)):(o.remove(s),this.it.delete(s)))}return J}});var Ad={grad:.9,turn:360,rad:360/(2*Math.PI)},Be=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},j=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},re=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Ga=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Wa=function(i){return{r:re(i.r,0,255),g:re(i.g,0,255),b:re(i.b,0,255),a:re(i.a)}},hn=function(i){return{r:j(i.r),g:j(i.g),b:j(i.b),a:j(i.a,3)}},Pd=/^#([0-9a-f]{3,8})$/i,Oo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},qa=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),u=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(u<0?u+6:u),s:s?a/s*100:0,v:s/255*100,a:o}},Ka=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),u=r*(1-(e-s)*t),c=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,u,a,a,c,r][d],g:255*[c,r,r,u,a,a][d],b:255*[a,a,c,r,r,u][d],a:o}},Xa=function(i){return{h:Ga(i.h),s:re(i.s,0,100),l:re(i.l,0,100),a:re(i.a)}},Ya=function(i){return{h:j(i.h),s:j(i.s),l:j(i.l),a:j(i.a,3)}},Za=function(i){return Ka((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Ti=function(i){return{h:(e=qa(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},zd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Od=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Md=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qa={string:[[function(i){var e=Pd.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?j(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?j(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Ld.exec(i)||Md.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wa({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=zd.exec(i)||Od.exec(i);if(!e)return null;var t,r,o=Xa({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Ad[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Za(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Be(e)&&Be(t)&&Be(r)?Wa({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Be(e)||!Be(t)||!Be(r))return null;var a=Xa({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return Za(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Be(e)||!Be(t)||!Be(r))return null;var a=(function(u){return{h:Ga(u.h),s:re(u.s,0,100),v:re(u.v,0,100),a:re(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return Ka(a)},"hsv"]]},Ja=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Nd=function(i){return typeof i=="string"?Ja(i.trim(),Qa.string):typeof i=="object"&&i!==null?Ja(i,Qa.object):[null,void 0]},dn=function(i,e){var t=Ti(i);return{h:t.h,s:re(t.s+100*e,0,100),l:t.l,a:t.a}},pn=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},el=function(i,e){var t=Ti(i);return{h:t.h,s:t.s,l:re(t.l+100*e,0,100),a:t.a}},tl=(function(){function i(e){this.parsed=Nd(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return j(pn(this.rgba),2)},i.prototype.isDark=function(){return pn(this.rgba)<.5},i.prototype.isLight=function(){return pn(this.rgba)>=.5},i.prototype.toHex=function(){return e=hn(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?Oo(j(255*s)):"","#"+Oo(t)+Oo(r)+Oo(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return hn(this.rgba)},i.prototype.toRgbString=function(){return e=hn(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return Ya(Ti(this.rgba))},i.prototype.toHslString=function(){return e=Ya(Ti(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=qa(this.rgba),{h:j(e.h),s:j(e.s),v:j(e.v),a:j(e.a,3)};var e},i.prototype.invert=function(){return ne({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),ne(dn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ne(dn(this.rgba,-e))},i.prototype.grayscale=function(){return ne(dn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ne(el(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ne(el(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?ne({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):j(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Ti(this.rgba);return typeof e=="number"?ne({h:e,s:t.s,l:t.l,a:t.a}):j(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ne(e).toHex()},i})(),ne=function(i){return i instanceof tl?i:new tl(i)};let bn=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Td=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,Ee=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Td(e,t,o),o};n.UUIColorAreaElement=class extends g{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.disabled=!1,this.readonly=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000"}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=ne(e);if(r.isValid()){const{h:o,s,l:a,a:u}=r.toHsl();o!==0&&(this.hue=o),this.lightness=a,this.saturation=s,this.brightness=this.getBrightness(a),this.alpha=u*100}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled||this.readonly)return;const t=this.shadowRoot.querySelector(".color-area"),r=t.querySelector(".color-area__handle"),{width:o,height:s}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,ua(t,{onMove:(a,u)=>{isNaN(a)||isNaN(u)||(this.saturation=O(a/o*100,0,100),this.brightness=O(100-u/s*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=O(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=O(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=O(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=O(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return O(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return O((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=ne({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new bn(bn.CHANGE))}getHexString(e,t,r,o=100){const s=ne(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return h`
|
|
3015
2563
|
<div
|
|
3016
2564
|
part="grid"
|
|
3017
2565
|
class="color-area"
|
|
3018
|
-
style=${
|
|
2566
|
+
style=${Te({backgroundColor:this.getHexString(this.hue,100,50)})}
|
|
3019
2567
|
@mousedown=${this.handleGridDrag}
|
|
3020
2568
|
@touchstart=${this.handleGridDrag}>
|
|
3021
2569
|
<span
|
|
3022
2570
|
part="grid-handle"
|
|
3023
|
-
class=${
|
|
3024
|
-
style=${
|
|
2571
|
+
class=${cn({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}
|
|
2572
|
+
style=${Te({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}
|
|
3025
2573
|
role="application"
|
|
3026
|
-
tabindex=${
|
|
2574
|
+
tabindex=${$(this.disabled?void 0:"0")}
|
|
3027
2575
|
aria-label="HSB"
|
|
3028
2576
|
@keydown=${this.handleGridKeyDown}></span>
|
|
3029
2577
|
</div>
|
|
3030
|
-
`}},
|
|
2578
|
+
`}},n.UUIColorAreaElement.styles=[b`
|
|
3031
2579
|
:host {
|
|
3032
2580
|
display: inline-block;
|
|
3033
2581
|
width: 280px;
|
|
@@ -3083,13 +2631,13 @@
|
|
|
3083
2631
|
.color-area__handle--empty {
|
|
3084
2632
|
display: none;
|
|
3085
2633
|
}
|
|
3086
|
-
`],
|
|
2634
|
+
`],Ee([w()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),Ee([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),Ee([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"readonly",2),Ee([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),Ee([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),Ee([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),Ee([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),Ee([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),Ee([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),n.UUIColorAreaElement=Ee([p("uui-color-area")],n.UUIColorAreaElement);/**
|
|
3087
2635
|
* @license
|
|
3088
2636
|
* Copyright 2020 Google LLC
|
|
3089
2637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3090
|
-
*/const jp=ei(class extends ti{constructor(i){if(super(i),i.type!==me.PROPERTY&&i.type!==me.ATTRIBUTE&&i.type!==me.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ta(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===te||e===N)return e;const t=i.element,r=i.name;if(i.type===me.PROPERTY){if(e===t[r])return te}else if(i.type===me.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return te}else if(i.type===me.ATTRIBUTE&&t.getAttribute(r)===e+"")return te;return Ba(i),e}});var Hp={grad:.9,turn:360,rad:360/(2*Math.PI)},qe=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},F=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ue=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},zl=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Ll=function(i){return{r:ue(i.r,0,255),g:ue(i.g,0,255),b:ue(i.b,0,255),a:ue(i.a)}},Tn=function(i){return{r:F(i.r),g:F(i.g),b:F(i.b),a:F(i.a,3)}},Rp=/^#([0-9a-f]{3,8})$/i,er=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Ol=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,n=Math.max(e,t,r),a=n-Math.min(e,t,r),u=a?n===e?(t-r)/a:n===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(u<0?u+6:u),s:n?a/n*100:0,v:n/255*100,a:o}},Tl=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var n=Math.floor(e),a=r*(1-t),u=r*(1-(e-n)*t),c=r*(1-(1-e+n)*t),d=n%6;return{r:255*[r,u,a,a,c,r][d],g:255*[c,r,r,u,a,a][d],b:255*[a,a,c,r,r,u][d],a:o}},Nl=function(i){return{h:zl(i.h),s:ue(i.s,0,100),l:ue(i.l,0,100),a:ue(i.a)}},Bl=function(i){return{h:F(i.h),s:F(i.s),l:F(i.l),a:F(i.a,3)}},Vl=function(i){return Tl((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Ji=function(i){return{h:(e=Ol(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Fp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nn={string:[[function(i){var e=Rp.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?F(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?F(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Gp.exec(i)||qp.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ll({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Fp.exec(i)||Wp.exec(i);if(!e)return null;var t,r,o=Nl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Hp[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Vl(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,n=o===void 0?1:o;return qe(e)&&qe(t)&&qe(r)?Ll({r:Number(e),g:Number(t),b:Number(r),a:Number(n)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,n=o===void 0?1:o;if(!qe(e)||!qe(t)||!qe(r))return null;var a=Nl({h:Number(e),s:Number(t),l:Number(r),a:Number(n)});return Vl(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,n=o===void 0?1:o;if(!qe(e)||!qe(t)||!qe(r))return null;var a=(function(u){return{h:zl(u.h),s:ue(u.s,0,100),v:ue(u.v,0,100),a:ue(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(n)});return Tl(a)},"hsv"]]},Dl=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Kp=function(i){return typeof i=="string"?Dl(i.trim(),Nn.string):typeof i=="object"&&i!==null?Dl(i,Nn.object):[null,void 0]},Bn=function(i,e){var t=Ji(i);return{h:t.h,s:ue(t.s+100*e,0,100),l:t.l,a:t.a}},Vn=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},jl=function(i,e){var t=Ji(i);return{h:t.h,s:t.s,l:ue(t.l+100*e,0,100),a:t.a}},tr=(function(){function i(e){this.parsed=Kp(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return F(Vn(this.rgba),2)},i.prototype.isDark=function(){return Vn(this.rgba)<.5},i.prototype.isLight=function(){return Vn(this.rgba)>=.5},i.prototype.toHex=function(){return e=Tn(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?er(F(255*n)):"","#"+er(t)+er(r)+er(o)+a;var e,t,r,o,n,a},i.prototype.toRgb=function(){return Tn(this.rgba)},i.prototype.toRgbString=function(){return e=Tn(this.rgba),t=e.r,r=e.g,o=e.b,(n=e.a)<1?"rgba("+t+", "+r+", "+o+", "+n+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,n},i.prototype.toHsl=function(){return Bl(Ji(this.rgba))},i.prototype.toHslString=function(){return e=Bl(Ji(this.rgba)),t=e.h,r=e.s,o=e.l,(n=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+n+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,n},i.prototype.toHsv=function(){return e=Ol(this.rgba),{h:F(e.h),s:F(e.s),v:F(e.v),a:F(e.a,3)};var e},i.prototype.invert=function(){return fe({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),fe(Bn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),fe(Bn(this.rgba,-e))},i.prototype.grayscale=function(){return fe(Bn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),fe(jl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),fe(jl(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?fe({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):F(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Ji(this.rgba);return typeof e=="number"?fe({h:e,s:t.s,l:t.l,a:t.a}):F(t.h)},i.prototype.isEqual=function(e){return this.toHex()===fe(e).toHex()},i})(),fe=function(i){return i instanceof tr?i:new tr(i)},Hl=[],Xp=function(i){i.forEach(function(e){Hl.indexOf(e)<0&&(e(tr,Nn),Hl.push(e))})};function Yp(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var n={};i.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,d=r[this.toHex()];if(d)return d;if(a?.closest){var b=this.toRgb(),g=1/0,y="black";if(!n.length)for(var $ in t)n[$]=new i(t[$]).toRgb();for(var x in t){var A=(u=b,c=n[x],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));A<g&&(g=A,y=x)}return y}},e.string.push([function(a){var u=a.toLowerCase(),c=u==="transparent"?"#0000":t[u];return c?new i(c).toRgb():null},"name"])}let eo=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Zp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,D=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qp(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zp(e,t,o),o};Xp([Yp]);const Rl="EyeDropper"in window;s.UUIColorPickerElement=class extends Ee("label",f){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=fe("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),k(this,"uui-icon"),k(this,"uui-icon-registry-essential"),k(this,"uui-input"),k(this,"uui-button"),k(this,"uui-button-group"),k(this,"uui-color-swatches"),k(this,"uui-color-swatch"),k(this,"uui-color-area"),k(this,"uui-color-slider"),k(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:n,g:a,b:u}=this._colord.toRgb(),{h:c,s:d,l:b}=this._colord.toHsl(),{v:g}=this._colord.toHsv(),y=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${n}, ${a}, ${u})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${c}, ${d}%, ${b}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${c}, ${d}%, ${b}%)`);case"hsva":return this.setLetterCase(`hsva(${c}, ${d}%, ${g}%, ${y})`);default:return""}}getBrightness(e){return L(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return L((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(r)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(t)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(r)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){Rl&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=100,this.inputValue="",this._value=e,this.dispatchEvent(new eo(eo.CHANGE)),!0;const t=new tr(e),{h:r,s:o,l:n,a}=t.toHsl();this.hue=r,this.saturation=o,this.lightness=n,this.alpha=this.opacity?a*100:100;const u=e;return u&&u.h&&(this.hue=u.h),this._colord=t,this._syncValues(),this.dispatchEvent(new eo(eo.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const n=fe(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return n.isValid()?n.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return h`
|
|
2638
|
+
*/const Dd=Vt(class extends Ht{constructor(i){if(super(i),i.type!==he.PROPERTY&&i.type!==he.ATTRIBUTE&&i.type!==he.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ha(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===J||e===N)return e;const t=i.element,r=i.name;if(i.type===he.PROPERTY){if(e===t[r])return J}else if(i.type===he.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return J}else if(i.type===he.ATTRIBUTE&&t.getAttribute(r)===e+"")return J;return pa(i),e}});var Vd={grad:.9,turn:360,rad:360/(2*Math.PI)},De=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},R=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},se=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},il=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ol=function(i){return{r:se(i.r,0,255),g:se(i.g,0,255),b:se(i.b,0,255),a:se(i.a)}},mn=function(i){return{r:R(i.r),g:R(i.g),b:R(i.b),a:R(i.a,3)}},Hd=/^#([0-9a-f]{3,8})$/i,Lo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},rl=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),u=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(u<0?u+6:u),s:s?a/s*100:0,v:s/255*100,a:o}},nl=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),u=r*(1-(e-s)*t),c=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,u,a,a,c,r][d],g:255*[c,r,r,u,a,a][d],b:255*[a,a,c,r,r,u][d],a:o}},sl=function(i){return{h:il(i.h),s:se(i.s,0,100),l:se(i.l,0,100),a:se(i.a)}},al=function(i){return{h:R(i.h),s:R(i.s),l:R(i.l),a:R(i.a,3)}},ll=function(i){return nl((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Bi=function(i){return{h:(e=rl(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},jd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vn={string:[[function(i){var e=Hd.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?R(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?R(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Fd.exec(i)||Gd.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ol({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=jd.exec(i)||Rd.exec(i);if(!e)return null;var t,r,o=sl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Vd[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ll(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return De(e)&&De(t)&&De(r)?ol({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!De(e)||!De(t)||!De(r))return null;var a=sl({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return ll(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!De(e)||!De(t)||!De(r))return null;var a=(function(u){return{h:il(u.h),s:se(u.s,0,100),v:se(u.v,0,100),a:se(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return nl(a)},"hsv"]]},ul=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Wd=function(i){return typeof i=="string"?ul(i.trim(),vn.string):typeof i=="object"&&i!==null?ul(i,vn.object):[null,void 0]},gn=function(i,e){var t=Bi(i);return{h:t.h,s:se(t.s+100*e,0,100),l:t.l,a:t.a}},fn=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},cl=function(i,e){var t=Bi(i);return{h:t.h,s:t.s,l:se(t.l+100*e,0,100),a:t.a}},Mo=(function(){function i(e){this.parsed=Wd(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return R(fn(this.rgba),2)},i.prototype.isDark=function(){return fn(this.rgba)<.5},i.prototype.isLight=function(){return fn(this.rgba)>=.5},i.prototype.toHex=function(){return e=mn(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?Lo(R(255*s)):"","#"+Lo(t)+Lo(r)+Lo(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return mn(this.rgba)},i.prototype.toRgbString=function(){return e=mn(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return al(Bi(this.rgba))},i.prototype.toHslString=function(){return e=al(Bi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=rl(this.rgba),{h:R(e.h),s:R(e.s),v:R(e.v),a:R(e.a,3)};var e},i.prototype.invert=function(){return pe({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),pe(gn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),pe(gn(this.rgba,-e))},i.prototype.grayscale=function(){return pe(gn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),pe(cl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),pe(cl(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?pe({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):R(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Bi(this.rgba);return typeof e=="number"?pe({h:e,s:t.s,l:t.l,a:t.a}):R(t.h)},i.prototype.isEqual=function(e){return this.toHex()===pe(e).toHex()},i})(),pe=function(i){return i instanceof Mo?i:new Mo(i)},hl=[],qd=function(i){i.forEach(function(e){hl.indexOf(e)<0&&(e(Mo,vn),hl.push(e))})};function Kd(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var s={};i.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,d=r[this.toHex()];if(d)return d;if(a?.closest){var m=this.toRgb(),v=1/0,y="black";if(!s.length)for(var U in t)s[U]=new i(t[U]).toRgb();for(var x in t){var A=(u=m,c=s[x],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));A<v&&(v=A,y=x)}return y}},e.string.push([function(a){var u=a.toLowerCase(),c=u==="transparent"?"#0000":t[u];return c?new i(c).toRgb():null},"name"])}let Di=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Xd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,D=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xd(e,t,o),o};qd([Kd]);const dl="EyeDropper"in window;n.UUIColorPickerElement=class extends ye("label",g){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=pe("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-icon-registry-essential"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-button-group"),_(this,"uui-color-swatches"),_(this,"uui-color-swatch"),_(this,"uui-color-area"),_(this,"uui-color-slider"),_(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:s,g:a,b:u}=this._colord.toRgb(),{h:c,s:d,l:m}=this._colord.toHsl(),{v}=this._colord.toHsv(),y=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${s}, ${a}, ${u})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${c}, ${d}%, ${m}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${c}, ${d}%, ${m}%)`);case"hsva":return this.setLetterCase(`hsva(${c}, ${d}%, ${v}%, ${y})`);default:return""}}getBrightness(e){return O(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return O((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(r)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(t)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(r)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){dl&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=100,this.inputValue="",this._value=e,this.dispatchEvent(new Di(Di.CHANGE)),!0;const t=new Mo(e),{h:r,s:o,l:s,a}=t.toHsl();this.hue=r,this.saturation=o,this.lightness=s,this.alpha=this.opacity?a*100:100;const u=e;return u&&u.h&&(this.hue=u.h),this._colord=t,this._syncValues(),this.dispatchEvent(new Di(Di.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const s=pe(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return h`
|
|
3091
2639
|
<div
|
|
3092
|
-
class=${
|
|
2640
|
+
class=${cn({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}
|
|
3093
2641
|
aria-disabled=${this.disabled?"true":"false"}>
|
|
3094
2642
|
<uui-color-area
|
|
3095
2643
|
.value="${this.value}"
|
|
@@ -3129,7 +2677,7 @@
|
|
|
3129
2677
|
class="color-picker__preview color-picker__transparent-bg"
|
|
3130
2678
|
title="Copy"
|
|
3131
2679
|
aria-label="Copy"
|
|
3132
|
-
style=${
|
|
2680
|
+
style=${Te({"--preview-color":e})}
|
|
3133
2681
|
@click=${this.handleCopy}></button>
|
|
3134
2682
|
</div>
|
|
3135
2683
|
<div class="color-picker__user-input" aria-live="polite">
|
|
@@ -3141,7 +2689,7 @@
|
|
|
3141
2689
|
autocomplete="off"
|
|
3142
2690
|
autocapitalize="off"
|
|
3143
2691
|
spellcheck="false"
|
|
3144
|
-
.value=${
|
|
2692
|
+
.value=${Dd(this.inputValue)}
|
|
3145
2693
|
?disabled=${this.disabled}
|
|
3146
2694
|
?readonly=${this.readonly}
|
|
3147
2695
|
@keydown=${this.handleInputKeyDown}
|
|
@@ -3156,7 +2704,7 @@
|
|
|
3156
2704
|
compact>
|
|
3157
2705
|
<span>${this.format}</span>
|
|
3158
2706
|
</uui-button>`}
|
|
3159
|
-
${
|
|
2707
|
+
${dl?h`<uui-button
|
|
3160
2708
|
label="Select a color"
|
|
3161
2709
|
?disabled=${this.disabled||this.readonly}
|
|
3162
2710
|
@click=${this.handleEyeDropper}
|
|
@@ -3182,15 +2730,15 @@
|
|
|
3182
2730
|
type="button"
|
|
3183
2731
|
part="trigger"
|
|
3184
2732
|
aria-label="${this.label||"Open Color picker"}"
|
|
3185
|
-
class=${
|
|
3186
|
-
style=${
|
|
2733
|
+
class=${cn({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}
|
|
2734
|
+
style=${Te({"--preview-color":e})}
|
|
3187
2735
|
?disabled=${this.disabled}
|
|
3188
2736
|
aria-haspopup="true"
|
|
3189
2737
|
aria-expanded="false"
|
|
3190
2738
|
popovertarget="color-picker-popover"></button>
|
|
3191
2739
|
<uui-popover-container id="color-picker-popover">
|
|
3192
2740
|
${this._renderColorPicker()}
|
|
3193
|
-
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},
|
|
2741
|
+
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},n.UUIColorPickerElement.styles=[b`
|
|
3194
2742
|
:host {
|
|
3195
2743
|
--uui-look-outline-border: #ddd;
|
|
3196
2744
|
--uui-look-outline-border-hover: #aaa;
|
|
@@ -3341,7 +2889,7 @@
|
|
|
3341
2889
|
uui-color-area {
|
|
3342
2890
|
width: 100%;
|
|
3343
2891
|
}
|
|
3344
|
-
`],D([S('[part="input"]')],s.UUIColorPickerElement.prototype,"_input",2),D([S(".color-picker__preview")],s.UUIColorPickerElement.prototype,"_previewButton",2),D([S("#swatches")],s.UUIColorPickerElement.prototype,"_swatches",2),D([w()],s.UUIColorPickerElement.prototype,"inputValue",2),D([w()],s.UUIColorPickerElement.prototype,"hue",2),D([w()],s.UUIColorPickerElement.prototype,"saturation",2),D([w()],s.UUIColorPickerElement.prototype,"lightness",2),D([w()],s.UUIColorPickerElement.prototype,"alpha",2),D([w()],s.UUIColorPickerElement.prototype,"_colord",2),D([l()],s.UUIColorPickerElement.prototype,"value",1),D([l()],s.UUIColorPickerElement.prototype,"format",2),D([l()],s.UUIColorPickerElement.prototype,"name",2),D([l()],s.UUIColorPickerElement.prototype,"size",2),D([l({attribute:"no-format-toggle",type:Boolean})],s.UUIColorPickerElement.prototype,"noFormatToggle",2),D([l({type:Boolean,reflect:!0})],s.UUIColorPickerElement.prototype,"inline",2),D([l({type:Boolean,reflect:!0})],s.UUIColorPickerElement.prototype,"disabled",2),D([l({type:Boolean})],s.UUIColorPickerElement.prototype,"opacity",2),D([l({type:Boolean,reflect:!0})],s.UUIColorPickerElement.prototype,"readonly",2),D([l({type:Boolean})],s.UUIColorPickerElement.prototype,"uppercase",2),D([l({attribute:!1})],s.UUIColorPickerElement.prototype,"swatches",2),s.UUIColorPickerElement=D([m("uui-color-picker")],s.UUIColorPickerElement);var Jp={grad:.9,turn:360,rad:360/(2*Math.PI)},Ke=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},W=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ce=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Fl=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Wl=function(i){return{r:ce(i.r,0,255),g:ce(i.g,0,255),b:ce(i.b,0,255),a:ce(i.a)}},Dn=function(i){return{r:W(i.r),g:W(i.g),b:W(i.b),a:W(i.a,3)}},eb=/^#([0-9a-f]{3,8})$/i,ir=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Gl=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,n=Math.max(e,t,r),a=n-Math.min(e,t,r),u=a?n===e?(t-r)/a:n===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(u<0?u+6:u),s:n?a/n*100:0,v:n/255*100,a:o}},ql=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var n=Math.floor(e),a=r*(1-t),u=r*(1-(e-n)*t),c=r*(1-(1-e+n)*t),d=n%6;return{r:255*[r,u,a,a,c,r][d],g:255*[c,r,r,u,a,a][d],b:255*[a,a,c,r,r,u][d],a:o}},Kl=function(i){return{h:Fl(i.h),s:ce(i.s,0,100),l:ce(i.l,0,100),a:ce(i.a)}},Xl=function(i){return{h:W(i.h),s:W(i.s),l:W(i.l),a:W(i.a,3)}},Yl=function(i){return ql((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},to=function(i){return{h:(e=Gl(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},tb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ib=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ob=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zl={string:[[function(i){var e=eb.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?W(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?W(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=ob.exec(i)||rb.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wl({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=tb.exec(i)||ib.exec(i);if(!e)return null;var t,r,o=Kl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Jp[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Yl(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,n=o===void 0?1:o;return Ke(e)&&Ke(t)&&Ke(r)?Wl({r:Number(e),g:Number(t),b:Number(r),a:Number(n)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,n=o===void 0?1:o;if(!Ke(e)||!Ke(t)||!Ke(r))return null;var a=Kl({h:Number(e),s:Number(t),l:Number(r),a:Number(n)});return Yl(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,n=o===void 0?1:o;if(!Ke(e)||!Ke(t)||!Ke(r))return null;var a=(function(u){return{h:Fl(u.h),s:ce(u.s,0,100),v:ce(u.v,0,100),a:ce(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(n)});return ql(a)},"hsv"]]},Ql=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},nb=function(i){return typeof i=="string"?Ql(i.trim(),Zl.string):typeof i=="object"&&i!==null?Ql(i,Zl.object):[null,void 0]},jn=function(i,e){var t=to(i);return{h:t.h,s:ce(t.s+100*e,0,100),l:t.l,a:t.a}},Hn=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Jl=function(i,e){var t=to(i);return{h:t.h,s:t.s,l:ce(t.l+100*e,0,100),a:t.a}},Rn=(function(){function i(e){this.parsed=nb(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return W(Hn(this.rgba),2)},i.prototype.isDark=function(){return Hn(this.rgba)<.5},i.prototype.isLight=function(){return Hn(this.rgba)>=.5},i.prototype.toHex=function(){return e=Dn(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?ir(W(255*n)):"","#"+ir(t)+ir(r)+ir(o)+a;var e,t,r,o,n,a},i.prototype.toRgb=function(){return Dn(this.rgba)},i.prototype.toRgbString=function(){return e=Dn(this.rgba),t=e.r,r=e.g,o=e.b,(n=e.a)<1?"rgba("+t+", "+r+", "+o+", "+n+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,n},i.prototype.toHsl=function(){return Xl(to(this.rgba))},i.prototype.toHslString=function(){return e=Xl(to(this.rgba)),t=e.h,r=e.s,o=e.l,(n=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+n+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,n},i.prototype.toHsv=function(){return e=Gl(this.rgba),{h:W(e.h),s:W(e.s),v:W(e.v),a:W(e.a,3)};var e},i.prototype.invert=function(){return Xe({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),Xe(jn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Xe(jn(this.rgba,-e))},i.prototype.grayscale=function(){return Xe(jn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Xe(Jl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Xe(Jl(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?Xe({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):W(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=to(this.rgba);return typeof e=="number"?Xe({h:e,s:t.s,l:t.l,a:t.a}):W(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Xe(e).toHex()},i})(),Xe=function(i){return i instanceof Rn?i:new Rn(i)};let Fn=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var sb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,ye=(i,e,t,r)=>{for(var o=r>1?void 0:r?ab(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sb(e,t,o),o};s.UUIColorSliderElement=class extends Ee("label",f){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.readonly=!1,this.disabled=!1,this.hideValueLabel=!1}willUpdate(e){if(e.has("type")&&(this.type==="hue"?this.max=360:this.type==="saturation"?this.max=100:this.type==="lightness"?this.max=100:this.type==="opacity"&&(this.max=this.max??100),this.precision=this.precision??1,this.color)){const t=new Rn(this.color),{h:r,s:o,l:n}=t.toHsl(),{r:a,g:u,b:c}=t.toRgb(),d=this.type==="saturation"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, 0%, ${n}%), hsl(${r}, 100%, ${n}%))`:this.type==="lightness"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, ${o}%, 0%), hsl(${r}, ${o}%, 100%))`:null,b=this.type==="opacity"?`linear-gradient(to ${this.vertical?"top":"right"}, transparent 0%, rgba(${a}, ${u}, ${c}, ${this.max}%) 100%)`:null;this.style.setProperty("--uui-slider-background-image",d),this.style.setProperty("--uui-slider-hue-color",b)}}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||this.readonly||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),Ya(this.container,{onMove:(o,n)=>{this.vertical?this.value=Za(L(n/r*this.max,this.min,this.max),this.min,this.max):this.value=L(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||this.readonly||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=L(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=L(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=L(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=L(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return L(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return L(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new Fn(Fn.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Za(this.value,this.min,this.max):this.max/this.value)}render(){return h`<div
|
|
2892
|
+
`],D([S('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),D([S(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),D([S("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),D([w()],n.UUIColorPickerElement.prototype,"inputValue",2),D([w()],n.UUIColorPickerElement.prototype,"hue",2),D([w()],n.UUIColorPickerElement.prototype,"saturation",2),D([w()],n.UUIColorPickerElement.prototype,"lightness",2),D([w()],n.UUIColorPickerElement.prototype,"alpha",2),D([w()],n.UUIColorPickerElement.prototype,"_colord",2),D([l()],n.UUIColorPickerElement.prototype,"value",1),D([l()],n.UUIColorPickerElement.prototype,"format",2),D([l()],n.UUIColorPickerElement.prototype,"name",2),D([l()],n.UUIColorPickerElement.prototype,"size",2),D([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),D([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),D([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),D([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),D([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"readonly",2),D([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),D([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=D([p("uui-color-picker")],n.UUIColorPickerElement);var Zd={grad:.9,turn:360,rad:360/(2*Math.PI)},Ve=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},F=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ae=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},pl=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},bl=function(i){return{r:ae(i.r,0,255),g:ae(i.g,0,255),b:ae(i.b,0,255),a:ae(i.a)}},yn=function(i){return{r:F(i.r),g:F(i.g),b:F(i.b),a:F(i.a,3)}},Qd=/^#([0-9a-f]{3,8})$/i,No=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ml=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),u=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(u<0?u+6:u),s:s?a/s*100:0,v:s/255*100,a:o}},vl=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),u=r*(1-(e-s)*t),c=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,u,a,a,c,r][d],g:255*[c,r,r,u,a,a][d],b:255*[a,a,c,r,r,u][d],a:o}},gl=function(i){return{h:pl(i.h),s:ae(i.s,0,100),l:ae(i.l,0,100),a:ae(i.a)}},fl=function(i){return{h:F(i.h),s:F(i.s),l:F(i.l),a:F(i.a,3)}},yl=function(i){return vl((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},Vi=function(i){return{h:(e=ml(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Jd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ep=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ip=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wl={string:[[function(i){var e=Qd.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?F(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?F(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=tp.exec(i)||ip.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:bl({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Jd.exec(i)||ep.exec(i);if(!e)return null;var t,r,o=gl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Zd[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return yl(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Ve(e)&&Ve(t)&&Ve(r)?bl({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Ve(e)||!Ve(t)||!Ve(r))return null;var a=gl({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return yl(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ve(e)||!Ve(t)||!Ve(r))return null;var a=(function(u){return{h:pl(u.h),s:ae(u.s,0,100),v:ae(u.v,0,100),a:ae(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return vl(a)},"hsv"]]},$l=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},op=function(i){return typeof i=="string"?$l(i.trim(),wl.string):typeof i=="object"&&i!==null?$l(i,wl.object):[null,void 0]},wn=function(i,e){var t=Vi(i);return{h:t.h,s:ae(t.s+100*e,0,100),l:t.l,a:t.a}},$n=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},_l=function(i,e){var t=Vi(i);return{h:t.h,s:t.s,l:ae(t.l+100*e,0,100),a:t.a}},_n=(function(){function i(e){this.parsed=op(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return F($n(this.rgba),2)},i.prototype.isDark=function(){return $n(this.rgba)<.5},i.prototype.isLight=function(){return $n(this.rgba)>=.5},i.prototype.toHex=function(){return e=yn(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?No(F(255*s)):"","#"+No(t)+No(r)+No(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return yn(this.rgba)},i.prototype.toRgbString=function(){return e=yn(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return fl(Vi(this.rgba))},i.prototype.toHslString=function(){return e=fl(Vi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=ml(this.rgba),{h:F(e.h),s:F(e.s),v:F(e.v),a:F(e.a,3)};var e},i.prototype.invert=function(){return He({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),He(wn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),He(wn(this.rgba,-e))},i.prototype.grayscale=function(){return He(wn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),He(_l(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),He(_l(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?He({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):F(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Vi(this.rgba);return typeof e=="number"?He({h:e,s:t.s,l:t.l,a:t.a}):F(t.h)},i.prototype.isEqual=function(e){return this.toHex()===He(e).toHex()},i})(),He=function(i){return i instanceof _n?i:new _n(i)};let Un=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var rp=Object.defineProperty,np=Object.getOwnPropertyDescriptor,be=(i,e,t,r)=>{for(var o=r>1?void 0:r?np(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&rp(e,t,o),o};n.UUIColorSliderElement=class extends ye("label",g){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.readonly=!1,this.disabled=!1,this.hideValueLabel=!1}willUpdate(e){if(e.has("type")&&(this.type==="hue"?this.max=360:this.type==="saturation"?this.max=100:this.type==="lightness"?this.max=100:this.type==="opacity"&&(this.max=this.max??100),this.precision=this.precision??1,this.color)){const t=new _n(this.color),{h:r,s:o,l:s}=t.toHsl(),{r:a,g:u,b:c}=t.toRgb(),d=this.type==="saturation"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, 0%, ${s}%), hsl(${r}, 100%, ${s}%))`:this.type==="lightness"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, ${o}%, 0%), hsl(${r}, ${o}%, 100%))`:null,m=this.type==="opacity"?`linear-gradient(to ${this.vertical?"top":"right"}, transparent 0%, rgba(${a}, ${u}, ${c}, ${this.max}%) 100%)`:null;this.style.setProperty("--uui-slider-background-image",d),this.style.setProperty("--uui-slider-hue-color",m)}}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||this.readonly||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),ua(this.container,{onMove:(o,s)=>{this.vertical?this.value=ca(O(s/r*this.max,this.min,this.max),this.min,this.max):this.value=O(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||this.readonly||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=O(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=O(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=O(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=O(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return O(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return O(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new Un(Un.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/ca(this.value,this.min,this.max):this.max/this.value)}render(){return h`<div
|
|
3345
2893
|
part="slider"
|
|
3346
2894
|
id="color-slider"
|
|
3347
2895
|
role="slider"
|
|
@@ -3356,15 +2904,15 @@
|
|
|
3356
2904
|
@keydown=${this.handleKeyDown}>
|
|
3357
2905
|
${this.type==="opacity"?h`<div
|
|
3358
2906
|
id="current-hue"
|
|
3359
|
-
style=${
|
|
2907
|
+
style=${Te({backgroundImage:"var(--uui-slider-hue-color)"})}></div>`:""}
|
|
3360
2908
|
<!-- <slot name="detail"> </slot> -->
|
|
3361
2909
|
<span
|
|
3362
2910
|
id="color-slider__handle"
|
|
3363
2911
|
style="--current-value: ${this.cssPropCurrentValue}%;"
|
|
3364
|
-
tabindex=${
|
|
2912
|
+
tabindex=${$(this.disabled?void 0:"0")}>
|
|
3365
2913
|
</span>
|
|
3366
2914
|
</div>
|
|
3367
|
-
${this.hideValueLabel?null:Math.round(this.value)}`}},
|
|
2915
|
+
${this.hideValueLabel?null:Math.round(this.value)}`}},n.UUIColorSliderElement.styles=[b`
|
|
3368
2916
|
:host {
|
|
3369
2917
|
--uui-slider-height: 15px;
|
|
3370
2918
|
--uui-slider-handle-size: 17px;
|
|
@@ -3478,14 +3026,14 @@
|
|
|
3478
3026
|
position: absolute;
|
|
3479
3027
|
inset: 0 0 0 0;
|
|
3480
3028
|
}
|
|
3481
|
-
`],
|
|
3029
|
+
`],be([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),be([l()],n.UUIColorSliderElement.prototype,"color",2),be([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),be([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),be([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),be([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),be([l({type:Number})],n.UUIColorSliderElement.prototype,"value",2),be([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"readonly",2),be([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),be([l({type:Boolean,attribute:"hide-value-label",reflect:!0})],n.UUIColorSliderElement.prototype,"hideValueLabel",2),n.UUIColorSliderElement=be([p("uui-color-slider")],n.UUIColorSliderElement);/**
|
|
3482
3030
|
* @license
|
|
3483
3031
|
* Copyright 2017 Google LLC
|
|
3484
3032
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3485
|
-
*/const
|
|
3033
|
+
*/const Hi=(i,e)=>{var t,r;const o=i._$AN;if(o===void 0)return!1;for(const s of o)(r=(t=s)._$AO)===null||r===void 0||r.call(t,e,!1),Hi(s,e);return!0},To=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},Ul=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),lp(e)}};function sp(i){this._$AN!==void 0?(To(this),this._$AM=i,Ul(this)):this._$AM=i}function ap(i,e=!1,t=0){const r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(r))for(let s=t;s<r.length;s++)Hi(r[s],!1),To(r[s]);else r!=null&&(Hi(r,!1),To(r));else Hi(this,i)}const lp=i=>{var e,t,r,o;i.type==he.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=ap),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=sp))};let up=class extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Ul(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,o;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)===null||r===void 0||r.call(this):(o=this.disconnected)===null||o===void 0||o.call(this)),t&&(Hi(this,e),To(this))}setValue(e){if(ha(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};const kn=new WeakMap,Bo=Vt(class extends up{render(i){return N}update(i,[e]){var t;const r=e!==this.G;return r&&this.G!==void 0&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=e,this.dt=(t=i.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=i.element)),N}ot(i){var e;if(typeof this.G=="function"){const t=(e=this.dt)!==null&&e!==void 0?e:globalThis;let r=kn.get(t);r===void 0&&(r=new WeakMap,kn.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.dt,void 0),r.set(this.G,i),i!==void 0&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,e,t;return typeof this.G=="function"?(e=kn.get((i=this.dt)!==null&&i!==void 0?i:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var cp=Object.defineProperty,hp=Object.getOwnPropertyDescriptor,kl=i=>{throw TypeError(i)},Xt=(i,e,t,r)=>{for(var o=r>1?void 0:r?hp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&cp(e,t,o),o},dp=(i,e,t)=>e.has(i)||kl("Cannot "+t),pp=(i,e,t)=>e.has(i)?kl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),bp=(i,e,t)=>(dp(i,e,"access private method"),t),En,El;n.UUIColorSwatchElement=class extends ye("label",Nt(ki(g))){constructor(){super(),pp(this,En),this.disabled=!1,this.readonly=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){return this._value??""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){(e.has("disabled")||e.has("readonly"))&&this.selectable&&(this.selectable=!this.disabled&&!this.readonly,this.deselectable=!this.disabled&&!this.readonly),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}focus(e){this.selectableTarget?.focus(e)}render(){return h`
|
|
3486
3034
|
<button
|
|
3487
3035
|
id="swatch"
|
|
3488
|
-
${
|
|
3036
|
+
${Bo(bp(this,En,El))}
|
|
3489
3037
|
aria-label=${this.label}
|
|
3490
3038
|
?disabled="${this.disabled}"
|
|
3491
3039
|
title="${this.label}">
|
|
@@ -3496,7 +3044,7 @@
|
|
|
3496
3044
|
<div
|
|
3497
3045
|
class="color-swatch__check"
|
|
3498
3046
|
style="color: var(--uui-swatch-color, ${this.color??this.value})">
|
|
3499
|
-
${
|
|
3047
|
+
${Uo}
|
|
3500
3048
|
</div>
|
|
3501
3049
|
</div>
|
|
3502
3050
|
${this._renderWithLabel()}
|
|
@@ -3504,7 +3052,7 @@
|
|
|
3504
3052
|
`}_renderWithLabel(){return this.showLabel?h`<div class="color-swatch__label">
|
|
3505
3053
|
<strong>${this.renderLabel()}</strong>
|
|
3506
3054
|
${this.value}
|
|
3507
|
-
</div>`:C}},
|
|
3055
|
+
</div>`:C}},En=new WeakSet,El=function(i){this.selectableTarget=i||this},n.UUIColorSwatchElement.styles=[b`
|
|
3508
3056
|
:host {
|
|
3509
3057
|
position: relative;
|
|
3510
3058
|
display: inline-flex;
|
|
@@ -3667,19 +3215,19 @@
|
|
|
3667
3215
|
white-space: nowrap;
|
|
3668
3216
|
box-sizing: border-box;
|
|
3669
3217
|
}
|
|
3670
|
-
`],
|
|
3218
|
+
`],Xt([l()],n.UUIColorSwatchElement.prototype,"value",1),Xt([l()],n.UUIColorSwatchElement.prototype,"color",1),Xt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),Xt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"readonly",2),Xt([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=Xt([p("uui-color-swatch")],n.UUIColorSwatchElement);let ji=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var mp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,Ri=(i,e,t,r)=>{for(var o=r>1?void 0:r?vp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&mp(e,t,o),o};n.UUIColorSwatchesElement=class extends ye("label",g){constructor(){super(),this.value="",this.disabled=!1,this.readonly=!1,this._onSelected=e=>{const t=e.target;this._swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new ji(ji.CHANGE)))},this._onDeselected=e=>{const t=e.target;this._swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new ji(ji.CHANGE))))},this.addEventListener(Bt.SELECTED,this._onSelected),this.addEventListener(Bt.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this._swatches||this._swatches.length===0||this._swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.readonly&&e.setAttribute("readonly",""),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this._swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return h`<slot @slotchange=${this._handleSlotChange}></slot>`}},n.UUIColorSwatchesElement.styles=[b`
|
|
3671
3219
|
:host {
|
|
3672
3220
|
display: flex;
|
|
3673
3221
|
flex-wrap: wrap;
|
|
3674
3222
|
gap: 0.4rem;
|
|
3675
3223
|
}
|
|
3676
|
-
`],
|
|
3224
|
+
`],Ri([l()],n.UUIColorSwatchesElement.prototype,"value",2),Ri([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),Ri([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"readonly",2),Ri([Pe({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"_swatches",2),n.UUIColorSwatchesElement=Ri([p("uui-color-swatches")],n.UUIColorSwatchesElement);let me=class extends z{static{this.CHANGE="change"}static{this.INNER_SLOT_CHANGE="inner-slot-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var gp=Object.defineProperty,fp=Object.getOwnPropertyDescriptor,xl=i=>{throw TypeError(i)},Je=(i,e,t,r)=>{for(var o=r>1?void 0:r?fp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&gp(e,t,o),o},yp=(i,e,t)=>e.has(i)||xl("Cannot "+t),wp=(i,e,t)=>e.has(i)?xl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Il=(i,e,t)=>(yp(i,e,"access private method"),t),Do,xn;n.UUIComboboxListElement=class extends g{constructor(){super(...arguments),wp(this,Do),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{Il(this,Do,xn).call(this),this._updateSelection(),this.dispatchEvent(new me(me.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new me(me.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new me(me.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{if(!(this._options.length<=0))switch(e.code){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),this._getActiveElement?.click();break}case"Space":{e.preventDefault(),e.stopPropagation(),this._getActiveElement?.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(Bt.SELECTED,this._onSelected),this.addEventListener(Bt.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Bt.SELECTED,this._onSelected),this.removeEventListener(Bt.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(e=>e.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(e=>e.value===this._activeElementValue)}_goToIndex(e){if(this._options.length===0)return;e=Math.min(Math.max(e,0),this._options.length-1);const t=this._options[e];this._activeElementValue=t.value,Il(this,Do,xn).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return h` <slot @slotchange=${this._onSlotChange}></slot> `}},Do=new WeakSet,xn=function(){for(let e=0;e<this._activeOptions.length;e++)this._activeOptions[e].active=!1;const i=this._getActiveElement;i?i.active=!0:this._goToIndex(0)},n.UUIComboboxListElement.styles=[b`
|
|
3677
3225
|
:host {
|
|
3678
3226
|
display: flex;
|
|
3679
3227
|
flex-direction: column;
|
|
3680
3228
|
box-sizing: border-box;
|
|
3681
3229
|
}
|
|
3682
|
-
`],
|
|
3230
|
+
`],Je([l()],n.UUIComboboxListElement.prototype,"value",1),Je([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Je([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Je([Pe({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Je([Pe({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Je([w()],n.UUIComboboxListElement.prototype,"_value",2),Je([w()],n.UUIComboboxListElement.prototype,"_activeElementValue",2),n.UUIComboboxListElement=Je([p("uui-combobox-list")],n.UUIComboboxListElement);var $p=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,Yt=(i,e,t,r)=>{for(var o=r>1?void 0:r?_p(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&$p(e,t,o),o};n.UUIComboboxListOptionElement=class extends Nt(ki(g)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){return this._value?this._value:this.textContent?.trim()||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){return this._displayValue?this._displayValue:this.textContent?.trim()||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return h`<slot></slot>`}},n.UUIComboboxListOptionElement.styles=[b`
|
|
3683
3231
|
:host {
|
|
3684
3232
|
position: relative;
|
|
3685
3233
|
cursor: pointer;
|
|
@@ -3761,7 +3309,7 @@
|
|
|
3761
3309
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
3762
3310
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
3763
3311
|
}
|
|
3764
|
-
`],
|
|
3312
|
+
`],Yt([w()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),Yt([w()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),Yt([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),Yt([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),Yt([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=Yt([p("uui-combobox-list-option")],n.UUIComboboxListOptionElement);let ve=class extends z{static{this.SEARCH="search"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Up=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,Cl=i=>{throw TypeError(i)},q=(i,e,t,r)=>{for(var o=r>1?void 0:r?kp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Up(e,t,o),o},In=(i,e,t)=>e.has(i)||Cl("Cannot "+t),E=(i,e,t)=>(In(i,e,"read from private field"),t?t.call(i):e.get(i)),W=(i,e,t)=>e.has(i)?Cl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Sl=(i,e,t,r)=>(In(i,e,"write to private field"),e.set(i,t),t),Vo=(i,e,t)=>(In(i,e,"access private method"),t),Q,Zt,Qt,Al,Fi,Ho,jo,Ro,Cn,Fo,Go,Sn,Gi,Jt,An,Wo,qo,Pn,Ko;n.UUIComboboxElement=class extends we(g,""){constructor(){super(...arguments),W(this,Qt),this.closeLabel="Close",this.disabled=!1,this.hideExpandSymbol=!1,this.readonly=!1,this.placeholder="",W(this,Q),W(this,Zt),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,W(this,Fi,()=>{this._isPhone=E(this,Zt).matches}),W(this,jo,()=>requestAnimationFrame(()=>this._input.focus())),W(this,Ro,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||E(this,Jt).call(this)})),W(this,Cn,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new ve(ve.SEARCH)),E(this,Gi).call(this)}),W(this,Fo,()=>{this.value&&this.value!==E(this,Q)?.value&&Vo(this,Qt,Ho).call(this)}),W(this,Go,()=>{this.value=E(this,Q)?.value||"",this.search=this.value?this.search:"",E(this,Jt).call(this),this.dispatchEvent(new ve(ve.CHANGE))}),W(this,Sn,()=>{this.readonly||(this.open=!this.open)}),W(this,Gi,()=>{this.open||this.readonly||(this.open=!0)}),W(this,Jt,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new ve(ve.SEARCH)))}),W(this,An,e=>{if(this.open===!1&&e.code==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.code==="ArrowUp"||e.code==="ArrowDown")&&E(this,Gi).call(this),e.code==="Space"){if(this._isOpen)return;e.preventDefault(),e.stopImmediatePropagation(),E(this,Gi).call(this)}(e.code==="Escape"||e.code==="Enter")&&E(this,Jt).call(this)}),W(this,Wo,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._input.value=this._displayValue,this._input.focus(),this.dispatchEvent(new ve(ve.SEARCH)),this.dispatchEvent(new ve(ve.CHANGE)))}),W(this,qo,()=>h`<uui-input
|
|
3765
3313
|
slot="trigger"
|
|
3766
3314
|
id="combobox-input"
|
|
3767
3315
|
label="combobox-input"
|
|
@@ -3772,44 +3320,44 @@
|
|
|
3772
3320
|
.disabled=${this.disabled}
|
|
3773
3321
|
.readonly=${this.readonly}
|
|
3774
3322
|
popovertarget="combobox-popover"
|
|
3775
|
-
@click=${E(this,
|
|
3776
|
-
@input=${E(this,
|
|
3777
|
-
@keydown=${E(this,
|
|
3323
|
+
@click=${E(this,Sn)}
|
|
3324
|
+
@input=${E(this,Cn)}
|
|
3325
|
+
@keydown=${E(this,An)}>
|
|
3778
3326
|
<slot name="input-prepend" slot="prepend"></slot>
|
|
3779
|
-
${E(this,
|
|
3327
|
+
${E(this,Pn).call(this)}
|
|
3780
3328
|
${this.hideExpandSymbol?C:h`<div id="expand-symbol-wrapper" slot="append">
|
|
3781
3329
|
<uui-symbol-expand .open=${this._isOpen}></uui-symbol-expand>
|
|
3782
3330
|
</div>`}
|
|
3783
3331
|
<slot name="input-append" slot="append"></slot>
|
|
3784
|
-
</uui-input>`),
|
|
3332
|
+
</uui-input>`),W(this,Pn,()=>this.disabled||this.readonly?C:h`<uui-button
|
|
3785
3333
|
id="clear-button"
|
|
3786
|
-
@click=${E(this,
|
|
3787
|
-
@keydown=${E(this,
|
|
3334
|
+
@click=${E(this,Wo)}
|
|
3335
|
+
@keydown=${E(this,Wo)}
|
|
3788
3336
|
label="clear"
|
|
3789
3337
|
slot="append"
|
|
3790
3338
|
compact
|
|
3791
3339
|
style="height: 100%;"
|
|
3792
3340
|
tabindex=${this.value||this.search?"":"-1"}
|
|
3793
3341
|
class=${this.value||this.search?"visible":""}>
|
|
3794
|
-
<uui-icon name="remove" .fallback=${
|
|
3795
|
-
</uui-button>`),
|
|
3342
|
+
<uui-icon name="remove" .fallback=${Hr.strings[0]}></uui-icon>
|
|
3343
|
+
</uui-button>`),W(this,Ko,()=>h`<div id="dropdown">
|
|
3796
3344
|
<uui-scroll-container tabindex="-1" id="scroll-container">
|
|
3797
|
-
<slot @slotchange=${
|
|
3345
|
+
<slot @slotchange=${Vo(this,Qt,Al)}></slot>
|
|
3798
3346
|
</uui-scroll-container>
|
|
3799
|
-
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&
|
|
3800
|
-
<uui-button label="close" look="primary" @click=${E(this,
|
|
3347
|
+
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&Vo(this,Qt,Ho).call(this)}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}get open(){return this._isOpen}set open(e){const t=e;this._isOpen=e;const r=this._comboboxPopoverElement;if(r)if(e){const o=this._input.offsetWidth;r.style.setProperty("--popover-width",`${o}px`),r.showPopover()}else r.hidePopover();this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",E(this,Ro)),this.addEventListener("mousedown",E(this,jo)),Sl(this,Zt,window.matchMedia("(max-width: 600px)")),E(this,Fi).call(this),E(this,Zt).addEventListener("change",E(this,Fi)),_(this,"uui-icon"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-combobox-list"),_(this,"uui-scroll-container"),_(this,"uui-popover-container"),_(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",E(this,Ro)),this.removeEventListener("mousedown",E(this,jo)),E(this,Zt).removeEventListener("change",E(this,Fi))}getFormElement(){return this._input}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}render(){return this._isPhone&&this.open?h`<div id="phone-wrapper">
|
|
3348
|
+
<uui-button label="close" look="primary" @click=${E(this,Jt)}>
|
|
3801
3349
|
${this.closeLabel}
|
|
3802
3350
|
</uui-button>
|
|
3803
|
-
${E(this,
|
|
3351
|
+
${E(this,qo).call(this)} ${E(this,Ko).call(this)}
|
|
3804
3352
|
</div>`:h`
|
|
3805
|
-
${E(this,
|
|
3353
|
+
${E(this,qo).call(this)}
|
|
3806
3354
|
<uui-popover-container
|
|
3807
3355
|
id="combobox-popover"
|
|
3808
3356
|
popover="manual"
|
|
3809
3357
|
placement="bottom-end">
|
|
3810
|
-
${E(this,
|
|
3358
|
+
${E(this,Ko).call(this)}
|
|
3811
3359
|
</uui-popover-container>
|
|
3812
|
-
`}},
|
|
3360
|
+
`}},Q=new WeakMap,Zt=new WeakMap,Qt=new WeakSet,Al=function(){E(this,Q)&&(E(this,Q).removeEventListener(me.CHANGE,E(this,Go)),E(this,Q).removeEventListener(me.INNER_SLOT_CHANGE,E(this,Fo)));const i=this._comboboxListElements?.[0];i&&(Sl(this,Q,i),E(this,Q).for=this,E(this,Q).addEventListener(me.CHANGE,E(this,Go)),E(this,Q).addEventListener(me.INNER_SLOT_CHANGE,E(this,Fo))),this.updateComplete.then(()=>{Vo(this,Qt,Ho).call(this)})},Fi=new WeakMap,Ho=function(){E(this,Q)&&(E(this,Q).value=this.value,requestAnimationFrame(()=>this._displayValue=E(this,Q).displayValue||""))},jo=new WeakMap,Ro=new WeakMap,Cn=new WeakMap,Fo=new WeakMap,Go=new WeakMap,Sn=new WeakMap,Gi=new WeakMap,Jt=new WeakMap,An=new WeakMap,Wo=new WeakMap,qo=new WeakMap,Pn=new WeakMap,Ko=new WeakMap,n.UUIComboboxElement.styles=[b`
|
|
3813
3361
|
:host {
|
|
3814
3362
|
display: inline-flex;
|
|
3815
3363
|
}
|
|
@@ -3889,12 +3437,12 @@
|
|
|
3889
3437
|
#phone-wrapper #scroll-container {
|
|
3890
3438
|
max-height: unset;
|
|
3891
3439
|
}
|
|
3892
|
-
`],
|
|
3440
|
+
`],q([l({attribute:"value",reflect:!0})],n.UUIComboboxElement.prototype,"value",1),q([l({type:String})],n.UUIComboboxElement.prototype,"search",1),q([l({type:Boolean})],n.UUIComboboxElement.prototype,"open",1),q([l({type:String,attribute:"close-label"})],n.UUIComboboxElement.prototype,"closeLabel",2),q([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),q([l({type:Boolean,reflect:!1,attribute:"hide-expand-symbol"})],n.UUIComboboxElement.prototype,"hideExpandSymbol",2),q([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"readonly",2),q([l()],n.UUIComboboxElement.prototype,"placeholder",2),q([S("#combobox-input")],n.UUIComboboxElement.prototype,"_input",2),q([S("#combobox-popover")],n.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),q([Pe({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),q([w()],n.UUIComboboxElement.prototype,"_displayValue",2),q([w()],n.UUIComboboxElement.prototype,"_search",2),q([w()],n.UUIComboboxElement.prototype,"_isPhone",2),q([w()],n.UUIComboboxElement.prototype,"_isOpen",2),n.UUIComboboxElement=q([p("uui-combobox")],n.UUIComboboxElement);var Ep=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,zn=(i,e,t,r)=>{for(var o=r>1?void 0:r?xp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ep(e,t,o),o};n.UUIDialogLayoutElement=class extends g{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return h` <h3
|
|
3893
3441
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
3894
3442
|
${this.headline}
|
|
3895
3443
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
3896
3444
|
</h3>`}renderContent(){return h`<slot></slot>`}renderActions(){return h`<slot id="actions" name="actions"></slot>`}render(){return h`${this.renderHeadline()} ${this.renderContent()}
|
|
3897
|
-
${this.renderActions()} `}},
|
|
3445
|
+
${this.renderActions()} `}},n.UUIDialogLayoutElement.styles=[b`
|
|
3898
3446
|
:host {
|
|
3899
3447
|
display: block;
|
|
3900
3448
|
padding: var(--uui-size-10,30px) var(--uui-size-14,42px);
|
|
@@ -3907,7 +3455,7 @@
|
|
|
3907
3455
|
justify-content: end;
|
|
3908
3456
|
gap: var(--uui-size-4,12px);
|
|
3909
3457
|
}
|
|
3910
|
-
`],
|
|
3458
|
+
`],zn([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),zn([w()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=zn([p("uui-dialog-layout")],n.UUIDialogLayoutElement);var Ip=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIDialogElement=class extends g{render(){return h`<slot></slot>`}},n.UUIDialogElement.styles=[b`
|
|
3911
3459
|
:host {
|
|
3912
3460
|
position: relative;
|
|
3913
3461
|
display: block;
|
|
@@ -3925,13 +3473,13 @@
|
|
|
3925
3473
|
calc(var(--uui-border-radius,3px) * 2)
|
|
3926
3474
|
);
|
|
3927
3475
|
}
|
|
3928
|
-
`],
|
|
3476
|
+
`],n.UUIDialogElement=Ip([p("uui-dialog")],n.UUIDialogElement);var Cp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Pl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Cp(e,t,o),o};n.UUISymbolFileDropzoneElement=class extends g{constructor(){super(...arguments),this.error=!1}render(){return h`<svg
|
|
3929
3477
|
xmlns="http://www.w3.org/2000/svg"
|
|
3930
3478
|
viewBox="0 0 512 512"
|
|
3931
3479
|
id="upload-icon">
|
|
3932
3480
|
<path
|
|
3933
3481
|
d=${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"} />
|
|
3934
|
-
</svg> `}},
|
|
3482
|
+
</svg> `}},n.UUISymbolFileDropzoneElement.styles=[b`
|
|
3935
3483
|
:host {
|
|
3936
3484
|
display: flex;
|
|
3937
3485
|
flex-direction: column;
|
|
@@ -3950,7 +3498,7 @@
|
|
|
3950
3498
|
:host([error]) #upload-icon {
|
|
3951
3499
|
fill: var(--uui-color-invalid,#c31d4c);
|
|
3952
3500
|
}
|
|
3953
|
-
`],
|
|
3501
|
+
`],Pl([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=Pl([p("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);let Wi=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Ap=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,ei=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ap(e,t,o),o};n.UUIFileDropzoneElement=class extends ye("",g){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.disallowFolderUpload=!1,this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const r=[],o=[];e.split(",").forEach(s=>{s=s.trim().toLowerCase(),/[a-z]+\/[a-z*]/s.test(s)?r.push(s):o.push(s.replace(/^\./,""))}),this._acceptedMimeTypes=r,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}async _getAllEntries(e){const t=[...e],r=[],o=[];for(const s of t){if(s?.kind!=="file")continue;const a=this._getEntry(s);if(a)if(a.isDirectory){if(!this.disallowFolderUpload&&this.multiple){const u=await this._mkdir(a);r.push(u)}}else{const u=s.getAsFile();if(!u)continue;this._isAccepted(u)&&o.push(u)}}return{files:o,folders:r}}_getEntry(e){let t=null;return"webkitGetAsEntry"in e?t=e.webkitGetAsEntry():"getAsEntry"in e&&(t=e.getAsEntry()),t}async _mkdir(e){const t=e.createReader(),r=[],o=[],s=a=>new Promise((u,c)=>{a.readEntries(async d=>{if(!d.length){u();return}for(const m of d)if(m.isFile){const v=await this._getAsFile(m);this._isAccepted(v)&&o.push(v)}else if(m.isDirectory){const v=await this._mkdir(m);r.push(v)}await s(a),u()},c)});return await s(t),{folderName:e.name,folders:r,files:o}}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),r=e.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o of this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("*","")))return!0;return!1}async _getAsFile(e){return new Promise((t,r)=>e.file(t,r))}async _onDrop(e){e.preventDefault(),this._dropzone.classList.remove("hover");const t=e.dataTransfer?.items;if(t){const r=await this._getAllEntries(t);if(this.multiple===!1&&r.files.length&&(r.files=[r.files[0]],r.folders=[]),!r.files.length&&!r.folders.length)return;this.dispatchEvent(new Wi(Wi.CHANGE,{detail:r}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.multiple===!1&&e.length>1&&e.splice(1,e.length-1);const t=e.filter(r=>this._isAccepted(r));t.length&&this.dispatchEvent(new Wi(Wi.CHANGE,{detail:{files:t,folders:[]}}))}render(){return h`
|
|
3954
3502
|
<div id="dropzone">
|
|
3955
3503
|
<uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>
|
|
3956
3504
|
${this.renderLabel()}
|
|
@@ -3964,7 +3512,7 @@
|
|
|
3964
3512
|
aria-label="${this.label}" />
|
|
3965
3513
|
<slot></slot>
|
|
3966
3514
|
</div>
|
|
3967
|
-
`}},
|
|
3515
|
+
`}},n.UUIFileDropzoneElement.styles=[b`
|
|
3968
3516
|
#dropzone {
|
|
3969
3517
|
display: flex;
|
|
3970
3518
|
flex-direction: column;
|
|
@@ -4002,7 +3550,7 @@
|
|
|
4002
3550
|
opacity: 0;
|
|
4003
3551
|
display: none;
|
|
4004
3552
|
}
|
|
4005
|
-
`],
|
|
3553
|
+
`],ei([S("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),ei([S("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),ei([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),ei([l({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],n.UUIFileDropzoneElement.prototype,"disallowFolderUpload",2),ei([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=ei([p("uui-file-dropzone")],n.UUIFileDropzoneElement);let zp=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const s=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let a=-1;const u=10**r;do e/=o,++a;while(Math.round(Math.abs(e)*u)/u>=o&&a<s.length-1);return e.toFixed(r)+" "+s[a]}};var Op=Object.defineProperty,Lp=Object.getOwnPropertyDescriptor,xe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Lp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Op(e,t,o),o};n.UUIFilePreviewElement=class extends g{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(r=>{this._src=r})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-file-thumbnail"),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?h`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?h`<uui-symbol-file-thumbnail
|
|
4006
3554
|
.src=${this._src}
|
|
4007
3555
|
.alt=${this._name}
|
|
4008
3556
|
id="file-symbol"></uui-symbol-file-thumbnail>`:h`<uui-symbol-file
|
|
@@ -4022,10 +3570,10 @@
|
|
|
4022
3570
|
<div id="file-info">
|
|
4023
3571
|
${this._renderLongName()}
|
|
4024
3572
|
<span id="file-size">
|
|
4025
|
-
${this._size&&!this._isDirectory?h`${
|
|
3573
|
+
${this._size&&!this._isDirectory?h`${zp.humanFileSize(this._size,!0)}`:""}
|
|
4026
3574
|
</span>
|
|
4027
3575
|
</div>
|
|
4028
|
-
`}},
|
|
3576
|
+
`}},n.UUIFilePreviewElement.styles=[b`
|
|
4029
3577
|
:host {
|
|
4030
3578
|
position: relative;
|
|
4031
3579
|
display: grid;
|
|
@@ -4093,7 +3641,7 @@
|
|
|
4093
3641
|
text-decoration: underline;
|
|
4094
3642
|
cursor: pointer;
|
|
4095
3643
|
}
|
|
4096
|
-
`],
|
|
3644
|
+
`],xe([w()],n.UUIFilePreviewElement.prototype,"_name",2),xe([w()],n.UUIFilePreviewElement.prototype,"_url",2),xe([w()],n.UUIFilePreviewElement.prototype,"_extension",2),xe([w()],n.UUIFilePreviewElement.prototype,"_src",2),xe([w()],n.UUIFilePreviewElement.prototype,"_size",2),xe([w()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),xe([w()],n.UUIFilePreviewElement.prototype,"_file",2),xe([w()],n.UUIFilePreviewElement.prototype,"_isImage",2),xe([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=xe([p("uui-file-preview")],n.UUIFilePreviewElement);var Mp=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Xo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Np(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Mp(e,t,o),o};n.UUIFormLayoutItemElement=class extends g{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),_(this,"uui-form-validation-message")}render(){return h`
|
|
4097
3645
|
<div id="label" style=${this._labelSlotHasContent?"":"display: none"}>
|
|
4098
3646
|
<slot name="label" @slotchange=${this._labelSlotChanged}></slot>
|
|
4099
3647
|
</div>
|
|
@@ -4109,7 +3657,7 @@
|
|
|
4109
3657
|
<slot></slot>
|
|
4110
3658
|
<slot name="message" slot="message"></slot>
|
|
4111
3659
|
</uui-form-validation-message>
|
|
4112
|
-
`}},
|
|
3660
|
+
`}},n.UUIFormLayoutItemElement.styles=[b`
|
|
4113
3661
|
:host {
|
|
4114
3662
|
position: relative;
|
|
4115
3663
|
display: block;
|
|
@@ -4128,17 +3676,17 @@
|
|
|
4128
3676
|
margin-top: -8px;
|
|
4129
3677
|
min-height: 8px;
|
|
4130
3678
|
}
|
|
4131
|
-
`],
|
|
3679
|
+
`],Xo([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),Xo([w()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),Xo([w()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=Xo([p("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
4132
3680
|
* @license
|
|
4133
3681
|
* Copyright 2017 Google LLC
|
|
4134
3682
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4135
|
-
*/class
|
|
3683
|
+
*/class On extends Ht{constructor(e){if(super(e),this.et=N,e.type!==he.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===N||e==null)return this.ft=void 0,this.et=e;if(e===J)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}On.directiveName="unsafeHTML",On.resultType=1;const Yo=Vt(On);var Tp=Object.defineProperty,Bp=Object.getOwnPropertyDescriptor,zl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Tp(e,t,o),o};n.UUIFormValidationMessageElement=class extends g{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=e=>{const t=e.composedPath()[0];t.pristine===!1?this._messages.set(t,t.validationMessage):this._messages.delete(t),this.requestUpdate("_messages")},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate("_messages")},this.for===null&&(this.for=this)}get for(){return this._for}set for(e){let t=null;typeof e=="string"?t=this.getRootNode()?.getElementById(e):e instanceof HTMLElement&&(t=e);const r=t??this,o=this._for;o!==r&&(o!==null&&(o.removeEventListener(yo.INVALID,this._onControlInvalid),o.removeEventListener(yo.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(yo.INVALID,this._onControlInvalid),this._for.addEventListener(yo.VALID,this._onControlValid))}render(){return h`
|
|
4136
3684
|
<slot></slot>
|
|
4137
3685
|
<div id="messages">
|
|
4138
|
-
${
|
|
3686
|
+
${wo(this._messages,e=>h`<div>${Yo(e[1])}</div>`)}
|
|
4139
3687
|
<slot name="message"></slot>
|
|
4140
3688
|
</div>
|
|
4141
|
-
`}},
|
|
3689
|
+
`}},n.UUIFormValidationMessageElement.styles=[b`
|
|
4142
3690
|
#messages {
|
|
4143
3691
|
color: var(--uui-color-invalid-standalone,rgb(
|
|
4144
3692
|
174,
|
|
@@ -4146,7 +3694,7 @@
|
|
|
4146
3694
|
71
|
|
4147
3695
|
));
|
|
4148
3696
|
}
|
|
4149
|
-
`],
|
|
3697
|
+
`],zl([l({reflect:!1,attribute:!0})],n.UUIFormValidationMessageElement.prototype,"for",1),n.UUIFormValidationMessageElement=zl([p("uui-form-validation-message")],n.UUIFormValidationMessageElement);var Dp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIFormElement=class extends g{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(e){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const t=e.target.assignedNodes({flatten:!0}).filter(r=>r instanceof HTMLFormElement);this._formElement=t.length>0?t[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(e){if(e.target===null)return;const t=e.target;if(!t.checkValidity()){t.setAttribute("submit-invalid","");return}t.removeAttribute("submit-invalid")}_onReset(e){e.target!==null&&e.target.removeAttribute("submit-invalid")}render(){return h`<slot @slotchange=${this._onSlotChanged}></slot>`}},n.UUIFormElement=Dp([p("uui-form")],n.UUIFormElement);let qi=class extends z{constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t}),this.icon=null}static{this.ICON_REQUEST="icon-request"}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};var Vp=Object.defineProperty,Hp=Object.getOwnPropertyDescriptor,$t=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vp(e,t,o),o};n.UUIIconElement=class extends g{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new qi(qi.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?h`<slot name="fallback"></slot>`:h`${Yo(this.fallback)}`:this._nameSvg!==null?h`${Yo(this._nameSvg)}`:this.svg!==null?h`${Yo(this.svg)}`:h`<slot></slot>`}},n.UUIIconElement.styles=[b`
|
|
4150
3698
|
:host {
|
|
4151
3699
|
vertical-align: text-bottom;
|
|
4152
3700
|
display: inline-flex;
|
|
@@ -4172,16 +3720,16 @@
|
|
|
4172
3720
|
:host-context(div[slot='append']) {
|
|
4173
3721
|
margin-right: var(--uui-size-2, 6px);
|
|
4174
3722
|
}
|
|
4175
|
-
`],zt([w()],s.UUIIconElement.prototype,"_nameSvg",2),zt([l()],s.UUIIconElement.prototype,"label",2),zt([l()],s.UUIIconElement.prototype,"name",1),zt([l({attribute:!1})],s.UUIIconElement.prototype,"svg",2),zt([l({attribute:!1})],s.UUIIconElement.prototype,"fallback",2),zt([w()],s.UUIIconElement.prototype,"_useFallback",2),s.UUIIconElement=zt([m("uui-icon")],s.UUIIconElement);let ts=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},is=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(lo.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(lo.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new ts(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new ts}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var Fb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,cu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wb(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Fb(e,t,o),o};s.UUIIconRegistryElement=class extends f{constructor(){super(),this._icons={},this._registry=new is,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return h`<slot></slot>`}},cu([l({attribute:!1})],s.UUIIconRegistryElement.prototype,"_icons",2),s.UUIIconRegistryElement=cu([m("uui-icon-registry")],s.UUIIconRegistryElement);const Gb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,qb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,Kb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,Xb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`,Yb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`,Zb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,Qb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,Jb=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,ev=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`,tv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`,iv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,ov=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,rv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,nv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,sv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,av=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,lv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,uv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`,cv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`,hv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`,dv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`,pv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`,bv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,vv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`,mv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`,gv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`,fv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`,yv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`,wv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,_v=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`,$v=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`,kv=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;let hu=class extends is{constructor(){super(),this.defineIcon("add",Gb.strings[0]),this.defineIcon("alert",qb.strings[0]),this.defineIcon("attachment",Kb.strings[0]),this.defineIcon("calendar",Xb.strings[0]),this.defineIcon("check",Yb.strings[0]),this.defineIcon("clipboard",Zb.strings[0]),this.defineIcon("code",Qb.strings[0]),this.defineIcon("colorpicker",Jb.strings[0]),this.defineIcon("copy",ev.strings[0]),this.defineIcon("delete",tv.strings[0]),this.defineIcon("document",iv.strings[0]),this.defineIcon("download",ov.strings[0]),this.defineIcon("edit",rv.strings[0]),this.defineIcon("favorite",nv.strings[0]),this.defineIcon("folder",sv.strings[0]),this.defineIcon("forbidden",av.strings[0]),this.defineIcon("info",lv.strings[0]),this.defineIcon("link",uv.strings[0]),this.defineIcon("lock",cv.strings[0]),this.defineIcon("pause",hv.strings[0]),this.defineIcon("picture",dv.strings[0]),this.defineIcon("play",pv.strings[0]),this.defineIcon("remove",bv.strings[0]),this.defineIcon("search",vv.strings[0]),this.defineIcon("see",mv.strings[0]),this.defineIcon("settings",gv.strings[0]),this.defineIcon("subtract",fv.strings[0]),this.defineIcon("sync",yv.strings[0]),this.defineIcon("unlock",wv.strings[0]),this.defineIcon("unsee",_v.strings[0]),this.defineIcon("wand",$v.strings[0]),this.defineIcon("wrong",kv.strings[0])}};var Uv=(i,e,t,r)=>{for(var o=e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(o)||o);return o};s.UUIIconRegistryEssentialElement=class extends s.UUIIconRegistryElement{constructor(){super(),this.registry=new hu}},s.UUIIconRegistryEssentialElement=Uv([m("uui-icon-registry-essential")],s.UUIIconRegistryEssentialElement);var Ev=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,mi=(i,e,t,r)=>{for(var o=r>1?void 0:r?xv(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ev(e,t,o),o};s.UUIInputFileElement=class extends xe(f){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),k(this,"uui-icon"),k(this,"uui-file-dropzone"),k(this,"uui-button"),k(this,"uui-action-bar"),k(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],n=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=n;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,n),this._updateFileWrappers([n]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const n=o instanceof File;r.append(this.name,n?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return h`<uui-file-preview .file="${e}">
|
|
3723
|
+
`],$t([w()],n.UUIIconElement.prototype,"_nameSvg",2),$t([l()],n.UUIIconElement.prototype,"label",2),$t([l()],n.UUIIconElement.prototype,"name",1),$t([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),$t([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),$t([w()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=$t([p("uui-icon")],n.UUIIconElement);let Ln=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},Mn=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(qi.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(qi.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new Ln(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Ln}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var jp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,Ol=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&jp(e,t,o),o};n.UUIIconRegistryElement=class extends g{constructor(){super(),this._icons={},this._registry=new Mn,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return h`<slot></slot>`}},Ol([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=Ol([p("uui-icon-registry")],n.UUIIconRegistryElement);const Fp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,Gp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`,Wp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" /></svg>`,qp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2" /><line x1="16" x2="16" y1="2" y2="6" /><line x1="8" x2="8" y1="2" y2="6" /><line x1="3" x2="21" y1="10" y2="10" /><path d="M8 14h.01" /><path d="M12 14h.01" /><path d="M16 14h.01" /><path d="M8 18h.01" /><path d="M12 18h.01" /><path d="M16 18h.01" /></svg>`,Kp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12" /></svg>`,Xp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></svg>`,Yp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg>`,Zp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9" /><path d="M3 21v-3l9-9" /><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" /></svg>`,Qp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z" /><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8" /><path d="M15 2v5h5" /></svg>`,Jp=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18" /><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" /><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" /></svg>`,eb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" /><polyline points="14 2 14 8 20 8" /></svg>`,tb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" x2="12" y1="15" y2="3" /></svg>`,ib=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" /><path d="m15 5 4 4" /></svg>`,ob=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z" /></svg>`,rb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" /><path d="M2 10h20" /></svg>`,nb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`,sb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,ab=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></svg>`,lb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></svg>`,ub=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4" /><rect width="4" height="16" x="14" y="4" /></svg>`,cb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>`,hb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3" /></svg>`,db=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,pb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /></svg>`,bb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" /><circle cx="12" cy="12" r="3" /></svg>`,mb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></svg>`,vb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /></svg>`,gb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /><path d="M8 16H3v5" /></svg>`,fb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" /></svg>`,yb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24" /><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" /><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" /><line x1="2" x2="22" y1="2" y2="22" /></svg>`,wb=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2" /><path d="M15 16v-2" /><path d="M8 9h2" /><path d="M20 9h2" /><path d="M17.8 11.8 19 13" /><path d="M15 9h0" /><path d="M17.8 6.2 19 5" /><path d="m3 21 9-9" /><path d="M12.2 6.2 11 5" /></svg>`,$b=f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;let Ll=class extends Mn{constructor(){super(),this.defineIcon("add",Fp.strings[0]),this.defineIcon("alert",Gp.strings[0]),this.defineIcon("attachment",Wp.strings[0]),this.defineIcon("calendar",qp.strings[0]),this.defineIcon("check",Kp.strings[0]),this.defineIcon("clipboard",Xp.strings[0]),this.defineIcon("code",Yp.strings[0]),this.defineIcon("colorpicker",Zp.strings[0]),this.defineIcon("copy",Qp.strings[0]),this.defineIcon("delete",Jp.strings[0]),this.defineIcon("document",eb.strings[0]),this.defineIcon("download",tb.strings[0]),this.defineIcon("edit",ib.strings[0]),this.defineIcon("favorite",ob.strings[0]),this.defineIcon("folder",rb.strings[0]),this.defineIcon("forbidden",nb.strings[0]),this.defineIcon("info",sb.strings[0]),this.defineIcon("link",ab.strings[0]),this.defineIcon("lock",lb.strings[0]),this.defineIcon("pause",ub.strings[0]),this.defineIcon("picture",cb.strings[0]),this.defineIcon("play",hb.strings[0]),this.defineIcon("remove",db.strings[0]),this.defineIcon("search",pb.strings[0]),this.defineIcon("see",bb.strings[0]),this.defineIcon("settings",mb.strings[0]),this.defineIcon("subtract",vb.strings[0]),this.defineIcon("sync",gb.strings[0]),this.defineIcon("unlock",fb.strings[0]),this.defineIcon("unsee",yb.strings[0]),this.defineIcon("wand",wb.strings[0]),this.defineIcon("wrong",$b.strings[0])}};var _b=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new Ll}},n.UUIIconRegistryEssentialElement=_b([p("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var Ub=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,ti=(i,e,t,r)=>{for(var o=r>1?void 0:r?kb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ub(e,t,o),o};n.UUIInputFileElement=class extends we(g){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-file-dropzone"),_(this,"uui-button"),_(this,"uui-action-bar"),_(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],s=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=s;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,s),this._updateFileWrappers([s]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const s=o instanceof File;r.append(this.name,s?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return h`<uui-file-preview .file="${e}">
|
|
4176
3724
|
<uui-action-bar slot="actions">
|
|
4177
3725
|
<uui-button
|
|
4178
3726
|
@click=${()=>this._removeFile(t)}
|
|
4179
3727
|
color="danger"
|
|
4180
3728
|
label=${`Delete ${e.name}`}>
|
|
4181
|
-
<uui-icon name="delete" .fallback=${
|
|
3729
|
+
<uui-icon name="delete" .fallback=${Oh.strings[0]}></uui-icon>
|
|
4182
3730
|
</uui-button>
|
|
4183
3731
|
</uui-action-bar>
|
|
4184
|
-
</uui-file-preview>`}_renderFiles(){return h`${
|
|
3732
|
+
</uui-file-preview>`}_renderFiles(){return h`${wo(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return h`
|
|
4185
3733
|
<uui-file-dropzone
|
|
4186
3734
|
id="dropzone"
|
|
4187
3735
|
?multiple=${this.multiple}
|
|
@@ -4196,7 +3744,7 @@
|
|
|
4196
3744
|
look="placeholder"
|
|
4197
3745
|
label="Add"></uui-button>`:C}
|
|
4198
3746
|
</div>
|
|
4199
|
-
`}},
|
|
3747
|
+
`}},n.UUIInputFileElement.styles=[b`
|
|
4200
3748
|
:host {
|
|
4201
3749
|
width: 100%;
|
|
4202
3750
|
height: 100%;
|
|
@@ -4245,7 +3793,7 @@
|
|
|
4245
3793
|
justify-content: center;
|
|
4246
3794
|
align-items: stretch;
|
|
4247
3795
|
}
|
|
4248
|
-
`],
|
|
3796
|
+
`],ti([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),ti([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),ti([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),ti([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),ti([w()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=ti([p("uui-input-file")],n.UUIInputFileElement);let Ki=class extends z{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Eb=Object.defineProperty,xb=Object.getOwnPropertyDescriptor,Ml=i=>{throw TypeError(i)},G=(i,e,t,r)=>{for(var o=r>1?void 0:r?xb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Eb(e,t,o),o},Ib=(i,e,t)=>e.has(i)||Ml("Cannot "+t),Cb=(i,e,t)=>e.has(i)?Ml("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Sb=(i,e,t)=>(Ib(i,e,"access private method"),t),Nn,Nl;n.UUIInputElement=class extends we(ye("",g),""){constructor(){super(),Cb(this,Nn),this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum ${e} characters, ${t-e} too many.`,this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="text",this.tabIndex=0,this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",Sb(this,Nn,Nl)),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&String(this.value).length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&String(this.value).length>this.maxlength),this.updateComplete.then(()=>{this.addFormControlElement(this._input)})}get type(){return this._type}set type(e){this._type=e}async blur(){await this.updateComplete,this._input.blur()}async focus(){await this.updateComplete,this._input.focus()}async select(){await this.updateComplete,this._input.select()}getFormElement(){return this.shadowRoot?.querySelector("input")}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new Ki(Ki.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Ki(Ki.CHANGE))}renderPrepend(){return h`<slot name="prepend"></slot>`}renderAppend(){return h`<slot name="append"></slot>`}render(){return h`
|
|
4249
3797
|
${this.renderPrepend()}
|
|
4250
3798
|
${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()}
|
|
4251
3799
|
${this.renderAppend()}
|
|
@@ -4256,22 +3804,22 @@
|
|
|
4256
3804
|
.type=${this.type}
|
|
4257
3805
|
.value=${this.value}
|
|
4258
3806
|
.name=${this.name}
|
|
4259
|
-
pattern=${
|
|
4260
|
-
min=${
|
|
4261
|
-
max=${
|
|
4262
|
-
step=${
|
|
3807
|
+
pattern=${$(this.pattern)}
|
|
3808
|
+
min=${$(this.min)}
|
|
3809
|
+
max=${$(this.max)}
|
|
3810
|
+
step=${$(this.step)}
|
|
4263
3811
|
spellcheck=${this.spellcheck}
|
|
4264
|
-
autocomplete=${
|
|
4265
|
-
placeholder=${
|
|
4266
|
-
aria-label=${
|
|
4267
|
-
inputmode=${
|
|
3812
|
+
autocomplete=${$(this.autocomplete)}
|
|
3813
|
+
placeholder=${$(this.placeholder)}
|
|
3814
|
+
aria-label=${$(this.label)}
|
|
3815
|
+
inputmode=${$(this.inputMode)}
|
|
4268
3816
|
?disabled=${this.disabled}
|
|
4269
3817
|
?autofocus=${this.autofocus}
|
|
4270
3818
|
?required=${this.required}
|
|
4271
3819
|
?readonly=${this.readonly}
|
|
4272
|
-
tabindex=${
|
|
3820
|
+
tabindex=${$(this.tabIndex)}
|
|
4273
3821
|
@input=${this.onInput}
|
|
4274
|
-
@change=${this.onChange} />`}renderAutoWidthBackground(){return h` <div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return h`${this.value.length>0?this.value:this.placeholder}`}},
|
|
3822
|
+
@change=${this.onChange} />`}renderAutoWidthBackground(){return h` <div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return h`${this.value.length>0?this.value:this.placeholder}`}},Nn=new WeakSet,Nl=function(i){this.type!=="color"&&i.key=="Enter"&&this.submit()},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[b`
|
|
4275
3823
|
:host {
|
|
4276
3824
|
position: relative;
|
|
4277
3825
|
display: inline-flex;
|
|
@@ -4417,16 +3965,16 @@
|
|
|
4417
3965
|
height: 100%;
|
|
4418
3966
|
--uui-input-border-width: 0;
|
|
4419
3967
|
}
|
|
4420
|
-
`],G([l()],
|
|
3968
|
+
`],G([l()],n.UUIInputElement.prototype,"min",2),G([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),G([l({attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),G([l()],n.UUIInputElement.prototype,"max",2),G([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),G([l({attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),G([l({type:Number})],n.UUIInputElement.prototype,"step",2),G([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),G([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),G([l()],n.UUIInputElement.prototype,"placeholder",2),G([l()],n.UUIInputElement.prototype,"autocomplete",2),G([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),G([l({type:String})],n.UUIInputElement.prototype,"type",1),G([l({attribute:"inputmode"})],n.UUIInputElement.prototype,"inputMode",2),G([l({type:String})],n.UUIInputElement.prototype,"pattern",2),G([l({type:Number,reflect:!1,attribute:"tabindex"})],n.UUIInputElement.prototype,"tabIndex",2),G([S("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=G([p("uui-input")],n.UUIInputElement);let Tn=class extends z{static{this.LOCK_CHANGE="lock-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Ab=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,Tl=i=>{throw TypeError(i)},Zo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ab(e,t,o),o},Bl=(i,e,t)=>e.has(i)||Tl("Cannot "+t),zb=(i,e,t)=>(Bl(i,e,"read from private field"),t?t.call(i):e.get(i)),Ob=(i,e,t)=>e.has(i)?Tl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Lb=(i,e,t,r)=>(Bl(i,e,"write to private field"),e.set(i,t),t),Qo;n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),Ob(this,Qo,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){Lb(this,Qo,e),this.readonly=e,this.tabIndex=e?-1:0}get locked(){return zb(this,Qo)}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button")}_onLockToggle(){this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new Tn(Tn.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?h`<uui-icon name="lock" .fallback=${Lh.strings[0]}></uui-icon>`:h`<uui-icon
|
|
4421
3969
|
name="unlock"
|
|
4422
|
-
.fallback=${
|
|
3970
|
+
.fallback=${Bh.strings[0]}></uui-icon>`}renderPrepend(){return h`<uui-button
|
|
4423
3971
|
.disabled=${this.disabled}
|
|
4424
3972
|
@click=${this._onLockToggle}
|
|
4425
3973
|
compact
|
|
4426
3974
|
id="lock"
|
|
4427
3975
|
label="${this.locked?this.unlockLabel:this.lockLabel}">
|
|
4428
3976
|
${this.renderIcon()}
|
|
4429
|
-
</uui-button>`}},
|
|
3977
|
+
</uui-button>`}},Qo=new WeakMap,n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,b`
|
|
4430
3978
|
#lock {
|
|
4431
3979
|
height: 100%;
|
|
4432
3980
|
|
|
@@ -4439,16 +3987,16 @@
|
|
|
4439
3987
|
cursor: not-allowed;
|
|
4440
3988
|
opacity: 0.55;
|
|
4441
3989
|
}
|
|
4442
|
-
`],
|
|
3990
|
+
`],Zo([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",1),Zo([l({type:String,reflect:!1,attribute:"unlock-label"})],n.UUIInputLockElement.prototype,"unlockLabel",2),Zo([l({type:String,reflect:!1,attribute:"lock-label"})],n.UUIInputLockElement.prototype,"lockLabel",2),n.UUIInputLockElement=Zo([p("uui-input-lock")],n.UUIInputLockElement);var Mb=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,Bn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Mb(e,t,o),o};n.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){this.passwordType=e}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?h`<uui-icon name="see" .fallback=${Nh.strings[0]}></uui-icon>`:h`<uui-icon
|
|
4443
3991
|
name="unsee"
|
|
4444
|
-
.fallback=${
|
|
3992
|
+
.fallback=${Dh.strings[0]}></uui-icon>`}renderAppend(){return h`<uui-button
|
|
4445
3993
|
.disabled=${this.disabled}
|
|
4446
3994
|
@click=${this._onPasswordToggle}
|
|
4447
3995
|
compact
|
|
4448
3996
|
label="${this.passwordType==="password"?"Show password":"Hide password"}"
|
|
4449
3997
|
id="eye">
|
|
4450
3998
|
${this.renderIcon()}
|
|
4451
|
-
</uui-button>`}},
|
|
3999
|
+
</uui-button>`}},n.UUIInputPasswordElement.styles=[...n.UUIInputElement.styles,b`
|
|
4452
4000
|
#eye {
|
|
4453
4001
|
height: 100%;
|
|
4454
4002
|
margin-left: -6px;
|
|
@@ -4457,7 +4005,7 @@
|
|
|
4457
4005
|
#clear:hover {
|
|
4458
4006
|
color: black;
|
|
4459
4007
|
}
|
|
4460
|
-
`],
|
|
4008
|
+
`],Bn([w()],n.UUIInputPasswordElement.prototype,"passwordType",2),Bn([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=Bn([p("uui-input-password")],n.UUIInputPasswordElement);var Tb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyboardShortcutElement=class extends g{render(){return h`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[b`
|
|
4461
4009
|
:host {
|
|
4462
4010
|
display: inline-block;
|
|
4463
4011
|
font-family: inherit;
|
|
@@ -4472,7 +4020,7 @@
|
|
|
4472
4020
|
::slotted(*:last-child)uui-key {
|
|
4473
4021
|
margin-right: 0px;
|
|
4474
4022
|
}
|
|
4475
|
-
`],
|
|
4023
|
+
`],n.UUIKeyboardShortcutElement=Tb([p("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var Bb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyElement=class extends g{render(){return h`<slot></slot>`}},n.UUIKeyElement.styles=[b`
|
|
4476
4024
|
:host {
|
|
4477
4025
|
background: var(--uui-color-surface,#fff);
|
|
4478
4026
|
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
@@ -4486,10 +4034,10 @@
|
|
|
4486
4034
|
user-select: none;
|
|
4487
4035
|
text-transform: lowercase;
|
|
4488
4036
|
}
|
|
4489
|
-
`],
|
|
4037
|
+
`],n.UUIKeyElement=Bb([p("uui-key")],n.UUIKeyElement);var Db=Object.defineProperty,Vb=Object.getOwnPropertyDescriptor,Jo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Db(e,t,o),o};n.UUILabelElement=class extends g{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){return typeof this.for=="string"?this.getRootNode()?.getElementById(this.for)||null:this.for||null}render(){return h`
|
|
4490
4038
|
<slot></slot>
|
|
4491
4039
|
${this.required?h`<div id="required">*</div>`:""}
|
|
4492
|
-
`}},
|
|
4040
|
+
`}},n.UUILabelElement.styles=[b`
|
|
4493
4041
|
:host {
|
|
4494
4042
|
font-weight: 700;
|
|
4495
4043
|
}
|
|
@@ -4504,7 +4052,7 @@
|
|
|
4504
4052
|
color: var(--uui-color-danger,#c31d4c);
|
|
4505
4053
|
font-weight: 900;
|
|
4506
4054
|
}
|
|
4507
|
-
`],
|
|
4055
|
+
`],Jo([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),Jo([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),Jo([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=Jo([p("uui-label")],n.UUILabelElement);var Hb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,Dn=(i,e,t,r)=>{for(var o=r>1?void 0:r?jb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Hb(e,t,o),o};n.UUILoaderBarElement=class extends g{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=O(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return h`
|
|
4508
4056
|
${this.progress?h`<div
|
|
4509
4057
|
id="bar"
|
|
4510
4058
|
style="max-width: ${this.progress.toString()}%;"></div>`:""}
|
|
@@ -4513,7 +4061,7 @@
|
|
|
4513
4061
|
class=${this.progress?"":"animate"}
|
|
4514
4062
|
style="animation-duration: ${this.animationDuration}s"></div>
|
|
4515
4063
|
<div id="bar-background"></div>
|
|
4516
|
-
`}},
|
|
4064
|
+
`}},n.UUILoaderBarElement.styles=[b`
|
|
4517
4065
|
:host {
|
|
4518
4066
|
position: relative;
|
|
4519
4067
|
display: block;
|
|
@@ -4572,7 +4120,7 @@
|
|
|
4572
4120
|
transform-origin: 175% 0%;
|
|
4573
4121
|
}
|
|
4574
4122
|
}
|
|
4575
|
-
`],
|
|
4123
|
+
`],Dn([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),Dn([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=Dn([p("uui-loader-bar")],n.UUILoaderBarElement);var Rb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,Vn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Rb(e,t,o),o};n.UUILoaderCircleElement=class extends g{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?h`<span id="progress-display">${this.progress}</span>`:""}render(){return h`
|
|
4576
4124
|
<svg
|
|
4577
4125
|
id="spinner"
|
|
4578
4126
|
class=${this.progress?"":"animate"}
|
|
@@ -4585,11 +4133,11 @@
|
|
|
4585
4133
|
cx="50%"
|
|
4586
4134
|
cy="50%"
|
|
4587
4135
|
r="16"
|
|
4588
|
-
style=${
|
|
4136
|
+
style=${Te(this._circleStyle())} />
|
|
4589
4137
|
</g>
|
|
4590
4138
|
</svg>
|
|
4591
4139
|
${this.renderProgress()}
|
|
4592
|
-
`}},
|
|
4140
|
+
`}},n.UUILoaderCircleElement.styles=[b`
|
|
4593
4141
|
:host {
|
|
4594
4142
|
vertical-align: middle;
|
|
4595
4143
|
line-height: 0;
|
|
@@ -4674,11 +4222,11 @@
|
|
|
4674
4222
|
/* Center the text */
|
|
4675
4223
|
padding-top: 0.09em;
|
|
4676
4224
|
}
|
|
4677
|
-
`],
|
|
4225
|
+
`],Vn([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),Vn([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=Vn([p("uui-loader-circle")],n.UUILoaderCircleElement);var Gb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUILoaderElement=class extends g{render(){return h`
|
|
4678
4226
|
<div></div>
|
|
4679
4227
|
<div></div>
|
|
4680
4228
|
<div></div>
|
|
4681
|
-
`}},
|
|
4229
|
+
`}},n.UUILoaderElement.styles=[b`
|
|
4682
4230
|
:host {
|
|
4683
4231
|
color: var(--uui-color-default,#1b264f);
|
|
4684
4232
|
}
|
|
@@ -4718,28 +4266,28 @@
|
|
|
4718
4266
|
background-color: currentColor;
|
|
4719
4267
|
}
|
|
4720
4268
|
}
|
|
4721
|
-
`],
|
|
4269
|
+
`],n.UUILoaderElement=Gb([p("uui-loader")],n.UUILoaderElement);let ii=class extends z{static{this.SHOW_CHILDREN="show-children"}static{this.HIDE_CHILDREN="hide-children"}static{this.CLICK_LABEL="click-label"}};var Wb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,Dl=i=>{throw TypeError(i)},le=(i,e,t,r)=>{for(var o=r>1?void 0:r?qb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wb(e,t,o),o},Kb=(i,e,t)=>e.has(i)||Dl("Cannot "+t),Xb=(i,e,t)=>e.has(i)?Dl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Hn=(i,e,t)=>(Kb(i,e,"access private method"),t),Xi,jn,Vl;n.UUIMenuItemElement=class extends fo(Nt(ki(ye("label",g)))){constructor(){super(...arguments),Xb(this,Xi),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.caretLabel="Reveal the underlying items",this.iconSlotHasContent=!1,this._labelButtonChanged=e=>{this.selectableTarget=e||this},this._iconSlotChanged=e=>{this.iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const e=this.showChildren?ii.HIDE_CHILDREN:ii.SHOW_CHILDREN,t=new ii(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),_(this,"uui-symbol-expand"),_(this,"uui-loader-bar")}async focus(){await this.updateComplete,this.shadowRoot?.querySelector("#label-button")?.focus?.()}_renderLabelInside(){return h` <slot
|
|
4722
4270
|
name="icon"
|
|
4723
4271
|
id="icon"
|
|
4724
4272
|
style=${this.iconSlotHasContent?"":"display: none;"}
|
|
4725
4273
|
@slotchange=${this._iconSlotChanged}></slot>
|
|
4726
4274
|
${this.renderLabel()}
|
|
4727
|
-
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?h` <span id="label-button" ${
|
|
4275
|
+
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?h` <span id="label-button" ${Bo(this._labelButtonChanged)}>
|
|
4728
4276
|
${this._renderLabelInside()}
|
|
4729
4277
|
</span>`:h` <a
|
|
4730
4278
|
id="label-button"
|
|
4731
|
-
${
|
|
4732
|
-
href=${
|
|
4733
|
-
target=${
|
|
4734
|
-
rel=${
|
|
4735
|
-
@click=${
|
|
4279
|
+
${Bo(this._labelButtonChanged)}
|
|
4280
|
+
href=${$(this.href)}
|
|
4281
|
+
target=${$(this.target||void 0)}
|
|
4282
|
+
rel=${$(this.rel||$(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
4283
|
+
@click=${Hn(this,Xi,jn)}
|
|
4736
4284
|
?disabled=${this.disabled}
|
|
4737
4285
|
aria-label="${this.label}">
|
|
4738
4286
|
${this._renderLabelInside()}
|
|
4739
4287
|
</a>`}_renderLabelAsButton(){return h` <button
|
|
4740
4288
|
id="label-button"
|
|
4741
|
-
${
|
|
4742
|
-
@click=${
|
|
4289
|
+
${Bo(this._labelButtonChanged)}
|
|
4290
|
+
@click=${Hn(this,Xi,jn)}
|
|
4743
4291
|
?disabled=${this.disabled}
|
|
4744
4292
|
aria-label="${this.label}">
|
|
4745
4293
|
${this._renderLabelInside()}
|
|
@@ -4750,7 +4298,7 @@
|
|
|
4750
4298
|
id="caret-button"
|
|
4751
4299
|
aria-label=${this.caretLabel}
|
|
4752
4300
|
@click=${this._onCaretClicked}>
|
|
4753
|
-
${
|
|
4301
|
+
${Hn(this,Xi,Vl).call(this)}
|
|
4754
4302
|
</button>`:""}
|
|
4755
4303
|
${this.href&&this.selectOnly!==!0&&this.selectable!==!0?this._renderLabelAsAnchor():this._renderLabelAsButton()}
|
|
4756
4304
|
|
|
@@ -4758,9 +4306,9 @@
|
|
|
4758
4306
|
${this.loading?h`<uui-loader-bar id="loader"></uui-loader-bar>`:""}
|
|
4759
4307
|
</div>
|
|
4760
4308
|
${this.showChildren?h`<slot></slot>`:""}
|
|
4761
|
-
`}},
|
|
4309
|
+
`}},Xi=new WeakSet,jn=function(){if(this.selectOnly)return;const i=new ii(ii.CLICK_LABEL);this.dispatchEvent(i)},Vl=function(){if(this.renderExpandSymbol){const i=this.renderExpandSymbol();if(i)return i}return h`<uui-symbol-expand
|
|
4762
4310
|
aria-hidden="true"
|
|
4763
|
-
?open=${this.showChildren}></uui-symbol-expand>`},
|
|
4311
|
+
?open=${this.showChildren}></uui-symbol-expand>`},n.UUIMenuItemElement.styles=[b`
|
|
4764
4312
|
:host {
|
|
4765
4313
|
box-sizing: border-box;
|
|
4766
4314
|
display: block;
|
|
@@ -5162,7 +4710,7 @@
|
|
|
5162
4710
|
opacity: 0;
|
|
5163
4711
|
animation: fadeIn 120ms ease-in 60ms forwards;
|
|
5164
4712
|
}
|
|
5165
|
-
`],
|
|
4713
|
+
`],le([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),le([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),le([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),le([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),le([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),le([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),le([l({type:String})],n.UUIMenuItemElement.prototype,"rel",2),le([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),le([l({type:String,attribute:"caret-label"})],n.UUIMenuItemElement.prototype,"caretLabel",2),le([l({attribute:!1})],n.UUIMenuItemElement.prototype,"renderExpandSymbol",2),le([w()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=le([p("uui-menu-item")],n.UUIMenuItemElement);var Yb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,oi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Yb(e,t,o),o};const Hl="uui:modal-open",ri="uui:modal-close",jl="uui:modal-close-end";let ue=class extends g{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(Hl,{cancelable:!0}),r=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(t),this.dispatchEvent(r),!(t.defaultPrevented||r.defaultPrevented)&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(ri,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this.forceClose()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=e,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(e){super.firstUpdated(e),this.isClosing||this.open()}_openModal(){this.isOpen=!0,this._dialogElement?.showModal(),this._dialogElement?.addEventListener("cancel",this.close)}forceClose(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.dispatchEvent(new CustomEvent(jl)),this.remove()}static{this.styles=[b`
|
|
5166
4714
|
dialog {
|
|
5167
4715
|
display: block;
|
|
5168
4716
|
margin: 0;
|
|
@@ -5190,9 +4738,9 @@
|
|
|
5190
4738
|
:host([index='0']) dialog::after {
|
|
5191
4739
|
opacity: 0;
|
|
5192
4740
|
}
|
|
5193
|
-
`]}};
|
|
4741
|
+
`]}};oi([S("dialog")],ue.prototype,"_dialogElement",2),oi([l({type:Boolean,reflect:!0,attribute:"is-open"})],ue.prototype,"isOpen",2),oi([l({type:Boolean,reflect:!0,attribute:"is-closing"})],ue.prototype,"isClosing",2),oi([l({type:Number,reflect:!0})],ue.prototype,"index",2),oi([l({type:Number,reflect:!0,attribute:"unique-index"})],ue.prototype,"uniqueIndex",2),oi([l({type:Number,attribute:"transition-duration"})],ue.prototype,"transitionDuration",1);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,Rl=i=>{throw TypeError(i)},Fl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Qb(e,t,o),o},em=(i,e,t)=>e.has(i)||Rl("Cannot "+t),Gl=(i,e,t)=>(em(i,e,"read from private field"),t?t.call(i):e.get(i)),tm=(i,e,t)=>e.has(i)?Rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),er,Rn;n.UUIModalSidebarElement=class extends ue{constructor(){super(...arguments),tm(this,er),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Gl(this,er,Rn)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}forceClose(){this.isClosing||(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Gl(this,er,Rn)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return h`<dialog>
|
|
5194
4742
|
<slot></slot>
|
|
5195
|
-
</dialog>`}},
|
|
4743
|
+
</dialog>`}},er=new WeakSet,Rn=function(){return this._dialogElement?.getBoundingClientRect().width??0},n.UUIModalSidebarElement.styles=[...ue.styles,b`
|
|
5196
4744
|
:host {
|
|
5197
4745
|
outline: none;
|
|
5198
4746
|
--uui-modal-sidebar-left-gap: 24px;
|
|
@@ -5234,7 +4782,7 @@
|
|
|
5234
4782
|
:host([size='small']) dialog {
|
|
5235
4783
|
max-width: min(500px, calc(100% - var(--uui-modal-sidebar-left-gap)));
|
|
5236
4784
|
}
|
|
5237
|
-
`],
|
|
4785
|
+
`],Fl([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Fl([p("uui-modal-sidebar")],n.UUIModalSidebarElement);var im=Object.defineProperty,om=Object.getOwnPropertyDescriptor,Wl=i=>{throw TypeError(i)},ni=(i,e,t,r)=>{for(var o=r>1?void 0:r?om(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&im(e,t,o),o},ql=(i,e,t)=>e.has(i)||Wl("Cannot "+t),Yi=(i,e,t)=>(ql(i,e,"read from private field"),t?t.call(i):e.get(i)),Fn=(i,e,t)=>e.has(i)?Wl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),tr=(i,e,t)=>(ql(i,e,"access private method"),t),Gn,si,ai,Wn,qn;n.UUIModalContainerElement=class extends g{constructor(){super(),Fn(this,ai),this.sidebarGap=64,this.transitionDurationMS=250,Fn(this,Gn,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof ue)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(ri,Yi(this,si))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(ri,Yi(this,si))),this._sidebars=this._modals.filter(t=>t instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}tr(this,ai,Wn).call(this),tr(this,ai,qn).call(this)}),Fn(this,si,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(ri,Yi(this,si)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}tr(this,ai,Wn).call(this),tr(this,ai,qn).call(this)}),this.addEventListener(ri,Yi(this,si))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return h`<slot @slotchange=${Yi(this,Gn)}></slot>`}},Gn=new WeakMap,si=new WeakMap,ai=new WeakSet,Wn=function(){this.setAttribute("backdrop","");const i=this._modals?.filter(e=>!e.isClosing).reverse()??[];i?.forEach((e,t)=>{e.index=t,e.transitionDuration=this.transitionDurationMS}),i?.forEach(e=>{const t=i?.filter(r=>r.constructor.name===e.constructor.name);e.uniqueIndex=t?.indexOf(e)??0})},qn=function(){requestAnimationFrame(()=>{let i=0;const e=this._sidebars?.filter(t=>!t.isClosing).reverse()??[];for(let t=0;t<e.length;t++){const r=e[t],o=e[t+1],s=i;if(r.updateComplete.then(()=>{r.style.setProperty("--uui-modal-offset",s+"px")}),o?.hasAttribute("hide"))break;const a=r.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,u=o?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=a+i+this.sidebarGap-u;i=c>0?c:0}})},n.UUIModalContainerElement.styles=b`
|
|
5238
4786
|
:host {
|
|
5239
4787
|
position: fixed;
|
|
5240
4788
|
--uui-modal-color-backdrop: rgba(0, 0, 0, 0.5);
|
|
@@ -5251,11 +4799,11 @@
|
|
|
5251
4799
|
:host([backdrop])::after {
|
|
5252
4800
|
opacity: 1;
|
|
5253
4801
|
}
|
|
5254
|
-
`,
|
|
4802
|
+
`,ni([S("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),ni([w()],n.UUIModalContainerElement.prototype,"_modals",2),ni([w()],n.UUIModalContainerElement.prototype,"_sidebars",2),ni([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),ni([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=ni([p("uui-modal-container")],n.UUIModalContainerElement);var rm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIModalDialogElement=class extends ue{render(){return h`
|
|
5255
4803
|
<dialog>
|
|
5256
4804
|
<slot></slot>
|
|
5257
4805
|
</dialog>
|
|
5258
|
-
`}},
|
|
4806
|
+
`}},n.UUIModalDialogElement.styles=[...ue.styles,b`
|
|
5259
4807
|
:host {
|
|
5260
4808
|
outline: none;
|
|
5261
4809
|
--uui-modal-dialog-background: var(--uui-color-surface,#fff);
|
|
@@ -5279,7 +4827,7 @@
|
|
|
5279
4827
|
:host(:not([index='0'])) dialog {
|
|
5280
4828
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
5281
4829
|
}
|
|
5282
|
-
`],
|
|
4830
|
+
`],n.UUIModalDialogElement=rm([p("uui-modal-dialog")],n.UUIModalDialogElement);let _t=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var nm=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,ee=(i,e,t,r)=>{for(var o=r>1?void 0:r?sm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&nm(e,t,o),o};const am=45,Kn=(i,e,t)=>Math.min(Math.max(i,e),t),lm=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);n.UUIPaginationElement=class extends g{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this.firstLabel="First",this.previousLabel="Previous",this.nextLabel="Next",this.lastLabel="Last",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),_(this,"uui-button"),_(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((o,s)=>o+s.getBoundingClientRect().width,0),r=(e-t)/am/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,r=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return lm(Kn(t,1,this.total),Kn(r,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=Kn(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new _t(_t.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new _t(_t.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new _t(_t.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return h`<uui-button
|
|
5283
4831
|
compact
|
|
5284
4832
|
look="outline"
|
|
5285
4833
|
class="nav"
|
|
@@ -5333,7 +4881,7 @@
|
|
|
5333
4881
|
${this._visiblePages.map(e=>this.renderPage(e))}
|
|
5334
4882
|
${this.renderNavigationRight()}
|
|
5335
4883
|
</uui-button-group>
|
|
5336
|
-
`}},
|
|
4884
|
+
`}},n.UUIPaginationElement.styles=[b`
|
|
5337
4885
|
uui-button-group {
|
|
5338
4886
|
width: 100%;
|
|
5339
4887
|
}
|
|
@@ -5363,7 +4911,7 @@
|
|
|
5363
4911
|
.active {
|
|
5364
4912
|
pointer-events: none;
|
|
5365
4913
|
}
|
|
5366
|
-
`],
|
|
4914
|
+
`],ee([uc("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),ee([S("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),ee([l()],n.UUIPaginationElement.prototype,"label",2),ee([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),ee([l()],n.UUIPaginationElement.prototype,"firstLabel",2),ee([l()],n.UUIPaginationElement.prototype,"previousLabel",2),ee([l()],n.UUIPaginationElement.prototype,"nextLabel",2),ee([l()],n.UUIPaginationElement.prototype,"lastLabel",2),ee([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),ee([w()],n.UUIPaginationElement.prototype,"_range",2),ee([w()],n.UUIPaginationElement.prototype,"_visiblePages",2),ee([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=ee([p("uui-pagination")],n.UUIPaginationElement);let Kl=class extends z{static{this.CLOSE="close"}};var um=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Zi=(i,e,t,r)=>{for(var o=r>1?void 0:r?cm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&um(e,t,o),o};function ir(i,e,t){return i<e?e:i>t?t:i}n.UUIPopoverElement=class extends g{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new Kl(Kl.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){this._scrollParents=[];const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const r=t.position==="absolute",o=/(auto|scroll)/;let s=e;for(;s;){if(t=getComputedStyle(s),r&&t.position==="static"){s=this._getAncestorElement(s);continue}if(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(s),t.position==="fixed")return;s=this._getAncestorElement(s)}this._scrollParents.push(document.body)}_getAncestorElement(e){return e?.parentElement?e.parentElement:e?.getRootNode()?.host}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){if(!this.shadowRoot)return;const e=this.containerElement;if(!e)return;const t=this.containerElement?.getBoundingClientRect(),r=this._trigger?.getBoundingClientRect();if(r!=null&&t!=null){const o=this._scrollParents.map(Ae=>Ae.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,t,o));let s=this._currentPlacement.indexOf("top")!==-1,a=this._currentPlacement.indexOf("bottom")!==-1,u=this._currentPlacement.indexOf("left")!==-1,c=this._currentPlacement.indexOf("right")!==-1;const d=this._currentPlacement.indexOf("-start")!==-1,m=this._currentPlacement.indexOf("-end")!==-1;let v=.5,y=.5,U=.5,x=.5,A=0,Z=0;if(this.placement==="auto"){const Ae=this._scrollParents[0],ao=Ae.clientWidth,It=Ae.clientHeight,vi=r.x-t.width,gi=ao-(r.x+r.width)-t.width,_s=r.y-t.height,br=It-(r.y+r.height)-t.height;let mr=.5,vr=.5;const jv=Math.max(vi,gi);let zu=Math.max(_s,br);br>_s&&br>this.margin&&(zu+=9999),jv>zu?(vi>gi?(mr=0,u=!0):(mr=1,c=!0),A=this.margin):(_s>br?(vr=0,s=!0):(vr=1,a=!0),Z=this.margin),v=mr,y=vr,U=1-mr,x=1-vr}else s&&(x=1,y=0),a&&(x=0,y=1),(s||a)&&(Z=this.margin,d&&(U=0,v=0),m&&(U=1,v=1)),u&&(U=1,v=0),c&&(U=0,v=1),(u||c)&&(A=this.margin,d&&(x=0,y=0),m&&(x=1,y=1));const Fe=-t.width*U+r.width*v-A*(U*2-1),Ge=-t.height*x+r.height*y-Z*(x*2-1);let Et=Fe,xt=Ge;s||a?(this._scrollParents.forEach((Ae,ao)=>{const It=Ae===document.body?0:o[ao].x,vi=-r.x+It,gi=Ae.clientWidth-r.x-r.width+Fe+It-(t.width-r.width)*(1-v);Et=ir(Et,vi,gi)}),Et=ir(Et,-t.width,r.width)):(u||c)&&(this._scrollParents.forEach((Ae,ao)=>{const It=Ae===document.body?0:o[ao].y,vi=-r.y+It,gi=Ae.clientHeight-r.y-r.height+Ge+It-(t.height-r.height)*(1-y);xt=ir(xt,vi,gi)}),xt=ir(xt,-t.height,r.height)),(this._positionX!==Et||this._positionY!==xt)&&(this._positionX=Et,this._positionY=xt,Fe===Et&&Ge===xt&&this._stopScrollListener(),e.style.left=`${this._positionX}px`,e.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),s=o[0],a=o[1]||null;let u;return this._scrollParents.some((c,d)=>{const m=c===document.body?0:r[d].x,v=c===document.body?0:r[d].y;return s==="top"&&t.y-2<=v?(u="bottom",!0):s==="bottom"&&t.y+t.height+2>=c.clientHeight+v?(u="top",!0):s==="left"&&t.x-2<=m?(u="right",!0):s==="right"&&t.x+t.width+2>=c.clientWidth+m?(u="left",!0):!1}),u?(this._startScrollListener(),u+(a?`-${a}`:"")):e}render(){return h`
|
|
5367
4915
|
<slot
|
|
5368
4916
|
id="trigger"
|
|
5369
4917
|
name="trigger"
|
|
@@ -5371,7 +4919,7 @@
|
|
|
5371
4919
|
<div id="container">
|
|
5372
4920
|
${this._open?h`<slot name="popover"></slot>`:""}
|
|
5373
4921
|
</div>
|
|
5374
|
-
`}},
|
|
4922
|
+
`}},n.UUIPopoverElement.styles=[b`
|
|
5375
4923
|
:host {
|
|
5376
4924
|
position: relative;
|
|
5377
4925
|
display: inline-block;
|
|
@@ -5398,22 +4946,9 @@
|
|
|
5398
4946
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
5399
4947
|
);
|
|
5400
4948
|
}
|
|
5401
|
-
`],
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
width: fit-content;
|
|
5405
|
-
height: fit-content;
|
|
5406
|
-
border: none;
|
|
5407
|
-
border-radius: 0;
|
|
5408
|
-
padding: 0;
|
|
5409
|
-
background-color: none;
|
|
5410
|
-
background: none;
|
|
5411
|
-
overflow: visible;
|
|
5412
|
-
color: var(--uui-color-text,#060606);
|
|
5413
|
-
}
|
|
5414
|
-
`],Ot([l({type:Number})],s.UUIPopoverContainerElement.prototype,"margin",2),Ot([l({type:Boolean})],s.UUIPopoverContainerElement.prototype,"open",1),Ot([l({type:String,reflect:!0})],s.UUIPopoverContainerElement.prototype,"placement",1),Ot([w()],s.UUIPopoverContainerElement.prototype,"_placement",2),Ot([w()],s.UUIPopoverContainerElement.prototype,"_open",2),Ot([w()],s.UUIPopoverContainerElement.prototype,"_actualPlacement",2),s.UUIPopoverContainerElement=Ot([m("uui-popover-container")],s.UUIPopoverContainerElement);var vm=Object.defineProperty,mm=Object.getOwnPropertyDescriptor,Su=(i,e,t,r)=>{for(var o=r>1?void 0:r?mm(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&vm(e,t,o),o};const gm=(i,e,t)=>Math.min(Math.max(i,e),t);s.UUIProgressBarElement=class extends f{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=gm(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return h`
|
|
5415
|
-
<div id="bar" style=${We(this._getProgressStyle())}></div>
|
|
5416
|
-
`}},s.UUIProgressBarElement.styles=[v`
|
|
4949
|
+
`],Zi([S("#container")],n.UUIPopoverElement.prototype,"containerElement",2),Zi([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),Zi([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),Zi([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=Zi([p("uui-popover")],n.UUIPopoverElement);var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Xl=(i,e,t,r)=>{for(var o=r>1?void 0:r?dm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hm(e,t,o),o};const pm=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUIProgressBarElement=class extends g{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=pm(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return h`
|
|
4950
|
+
<div id="bar" style=${Te(this._getProgressStyle())}></div>
|
|
4951
|
+
`}},n.UUIProgressBarElement.styles=[b`
|
|
5417
4952
|
:host {
|
|
5418
4953
|
width: 100%;
|
|
5419
4954
|
height: 4px;
|
|
@@ -5430,7 +4965,7 @@
|
|
|
5430
4965
|
height: 100%;
|
|
5431
4966
|
width: 0%;
|
|
5432
4967
|
}
|
|
5433
|
-
`],
|
|
4968
|
+
`],Xl([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=Xl([p("uui-progress-bar")],n.UUIProgressBarElement);let Qi=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var bm=Object.defineProperty,mm=Object.getOwnPropertyDescriptor,Yl=i=>{throw TypeError(i)},et=(i,e,t,r)=>{for(var o=r>1?void 0:r?mm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&bm(e,t,o),o},vm=(i,e,t)=>e.has(i)||Yl("Cannot "+t),gm=(i,e,t)=>e.has(i)?Yl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),fm=(i,e,t)=>(vm(i,e,"access private method"),t),Xn,Zl;n.UUIRadioElement=class extends g{constructor(){super(...arguments),gm(this,Xn),this.name="",this.value="",this.label="",this.checked=!1,this.disabled=!1,this.readonly=!1}focus(){this._inputElement.focus()}click(){this._inputElement.click()}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.removeAttribute("tabindex")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}render(){return h` <label>
|
|
5434
4969
|
<input
|
|
5435
4970
|
id="input"
|
|
5436
4971
|
type="radio"
|
|
@@ -5438,12 +4973,12 @@
|
|
|
5438
4973
|
value=${this.value}
|
|
5439
4974
|
.checked=${this.checked}
|
|
5440
4975
|
.disabled=${this.disabled||this.readonly}
|
|
5441
|
-
@change=${
|
|
4976
|
+
@change=${fm(this,Xn,Zl)} />
|
|
5442
4977
|
<div id="button"></div>
|
|
5443
4978
|
<div id="label">
|
|
5444
4979
|
${this.label?h`<span>${this.label}</span>`:h`<slot></slot>`}
|
|
5445
4980
|
</div>
|
|
5446
|
-
</label>`}}
|
|
4981
|
+
</label>`}},Xn=new WeakSet,Zl=function(i){i.stopPropagation();const e=this._inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new Qi(Qi.CHANGE))},n.UUIRadioElement.styles=[$o,b`
|
|
5447
4982
|
:host {
|
|
5448
4983
|
display: block;
|
|
5449
4984
|
box-sizing: border-box;
|
|
@@ -5560,7 +5095,7 @@
|
|
|
5560
5095
|
}
|
|
5561
5096
|
|
|
5562
5097
|
:host([disabled]:active) #button {
|
|
5563
|
-
animation: ${
|
|
5098
|
+
animation: ${_o};
|
|
5564
5099
|
}
|
|
5565
5100
|
|
|
5566
5101
|
@media (prefers-reduced-motion) {
|
|
@@ -5572,7 +5107,7 @@
|
|
|
5572
5107
|
transition: none;
|
|
5573
5108
|
}
|
|
5574
5109
|
}
|
|
5575
|
-
`],
|
|
5110
|
+
`],et([S("#input")],n.UUIRadioElement.prototype,"_inputElement",2),et([l({type:String})],n.UUIRadioElement.prototype,"name",2),et([l({type:String})],n.UUIRadioElement.prototype,"value",2),et([l({type:String})],n.UUIRadioElement.prototype,"label",2),et([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",2),et([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",2),et([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"readonly",2),n.UUIRadioElement=et([p("uui-radio")],n.UUIRadioElement);let Yn=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ym=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,Ql=i=>{throw TypeError(i)},Zn=(i,e,t,r)=>{for(var o=r>1?void 0:r?wm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ym(e,t,o),o},Qn=(i,e,t)=>e.has(i)||Ql("Cannot "+t),k=(i,e,t)=>(Qn(i,e,"read from private field"),t?t.call(i):e.get(i)),tt=(i,e,t)=>e.has(i)?Ql("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),or=(i,e,t,r)=>(Qn(i,e,"write to private field"),e.set(i,t),t),V=(i,e,t)=>(Qn(i,e,"access private method"),t),H,M,Jn,es,rr,nr,ts,T,Jl,is,os,rs,ns,Ut,eu,tu,Ji;const $m="ArrowLeft",_m="ArrowUp",Um="ArrowRight",km="ArrowDown",Em=" ",xm="Enter";n.UUIRadioGroupElement=class extends we(g,""){constructor(){super(),tt(this,T),this.disabled=!1,this.readonly=!1,tt(this,H,null),tt(this,M,[]),tt(this,Jn,e=>{k(this,M)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),tt(this,es,e=>{this.contains(e.relatedTarget)||k(this,H)===null&&k(this,M)?.forEach(t=>{t.makeFocusable()})}),tt(this,rr,()=>{this.pristine=!1}),tt(this,nr,e=>{e.target.checked===!0&&(this.value=e.target.value,V(this,T,Ji).call(this))}),tt(this,ts,e=>{switch(e.key){case $m:case _m:{e.preventDefault(),V(this,T,eu).call(this);break}case Um:case km:{e.preventDefault(),V(this,T,tu).call(this);break}case Em:{k(this,H)===null&&(this.value=V(this,T,Ut).call(this,1,!1)?.value,V(this,T,Ji).call(this));break}case xm:this.submit()}}),this.addEventListener("keydown",k(this,ts)),this.addEventListener("focusin",k(this,Jn)),this.addEventListener("focusout",k(this,es)),this.updateComplete.then(()=>{V(this,T,os).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,V(this,T,os).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&V(this,T,rs).call(this,this.disabled),e.has("readonly")&&V(this,T,ns).call(this,this.readonly),e.has("name")&&V(this,T,is).call(this,e.get("name"))}async focus(){await this.updateComplete,k(this,H)!==null?k(this,M)[k(this,H)]?.focus():V(this,T,Ut).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,k(this,H)!==null?k(this,M)[k(this,H)]?.blur():V(this,T,Ut).call(this,1,!1)?.blur()}async click(){await this.updateComplete,k(this,H)!==null?k(this,M)[k(this,H)]?.click():V(this,T,Ut).call(this,1,!1)?.click()}getFormElement(){if(k(this,M)&&k(this,H))return k(this,M)[k(this,H)]}render(){return h` <slot @slotchange=${V(this,T,Jl)}></slot> `}},H=new WeakMap,M=new WeakMap,Jn=new WeakMap,es=new WeakMap,rr=new WeakMap,nr=new WeakMap,ts=new WeakMap,T=new WeakSet,Jl=function(i){if(i.stopPropagation(),k(this,M)?.forEach(t=>{t.removeEventListener(Qi.CHANGE,k(this,nr)),t.removeEventListener("blur",k(this,rr))}),or(this,H,null),or(this,M,i.target.assignedElements({flatten:!0}).filter(t=>t instanceof n.UUIRadioElement)),k(this,M).length===0)return;k(this,M).forEach(t=>{t.addEventListener(Qi.CHANGE,k(this,nr)),t.addEventListener("blur",k(this,rr))}),V(this,T,is).call(this,this.name),this.disabled&&V(this,T,rs).call(this,!0),this.readonly&&V(this,T,ns).call(this,!0);const e=k(this,M).filter(t=>t.checked===!0);if(e.length>1&&(k(this,M).forEach(t=>{t.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),e.length===1){const t=e[0];this.value=t.value,or(this,H,k(this,M).indexOf(t))}},is=function(i){k(this,M)?.forEach(e=>e.name=i)},os=function(i){const e=[];k(this,M).forEach((t,r)=>{t.value===i?(t.checked=!0,t.makeFocusable(),or(this,H,r)):(t.checked=!1,e.push(t))}),k(this,H)!==null&&e.forEach(t=>t.makeUnfocusable())},rs=function(i){k(this,M)?.forEach(e=>e.disabled=i)},ns=function(i){k(this,M)?.forEach(e=>e.readonly=i)},Ut=function(i=1,e=!0){if(!k(this,M)||k(this,M).length===0)return null;const t=k(this,M).length;let r=k(this,H)??0;for(let o=0;o<t+1;o++){if(!e||o>0){const s=k(this,M)[r];if(!s.disabled&&!s.readonly)return s}r=(r+i+t)%t}return null},eu=function(){this.value=V(this,T,Ut).call(this,-1)?.value??"",k(this,M)[k(this,H)??0]?.focus(),V(this,T,Ji).call(this)},tu=function(){this.value=V(this,T,Ut).call(this)?.value??"",k(this,M)[k(this,H)??0]?.focus(),V(this,T,Ji).call(this)},Ji=function(){this.pristine=!1,this.dispatchEvent(new Yn(Yn.CHANGE))},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[b`
|
|
5576
5111
|
:host {
|
|
5577
5112
|
display: inline-block;
|
|
5578
5113
|
padding-right: 3px;
|
|
@@ -5589,7 +5124,7 @@
|
|
|
5589
5124
|
71
|
|
5590
5125
|
));
|
|
5591
5126
|
}
|
|
5592
|
-
`],
|
|
5127
|
+
`],Zn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),Zn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"readonly",2),n.UUIRadioGroupElement=Zn([p("uui-radio-group")],n.UUIRadioGroupElement);let it=class extends z{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Im=Object.defineProperty,Cm=Object.getOwnPropertyDescriptor,iu=i=>{throw TypeError(i)},B=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Im(e,t,o),o},ou=(i,e,t)=>e.has(i)||iu("Cannot "+t),Sm=(i,e,t)=>(ou(i,e,"read from private field"),t?t.call(i):e.get(i)),ru=(i,e,t)=>e.has(i)?iu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),li=(i,e,t)=>(ou(i,e,"access private method"),t),ot,kt,ss;const as={TOP:3,CENTER:2},eo=18,ui=3,je=12,Am=24,ls=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};n.UUIRangeSliderElement=class extends we(g,""){constructor(){super(),ru(this,ot),this.disabled=!1,this.readonly=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,ru(this,ss,e=>{e.key=="Enter"&&this.submit()}),this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const r=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled||this.readonly)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const r=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keydown",Sm(this,ss)),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{this._trackWidth=this._outerTrack?.offsetWidth})}get min(){return this._min}set min(e){this._min=e,li(this,ot,kt).call(this)}get max(){return this._max}set max(e){this._max=e,li(this,ot,kt).call(this)}get step(){return this._step}set step(e){this._step=e,li(this,ot,kt).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,li(this,ot,kt).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,li(this,ot,kt).call(this)}get value(){return super.value}set value(e){super.value=e,li(this,ot,kt).call(this)}setValueLow(e){e=O(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=O(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,r){if(r){const o=this.startPoint.high-this.startPoint.low;e=O(e,this.min,this.max-o),t=O(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}async focus(){await this.updateComplete,this.getFormElement().focus()}async blur(){await this.updateComplete,this.getFormElement().blur()}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const e=this._minGap;this._highInputValue-e<this._min?(this.setValueHigh(this._lowInputValue+e),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-e),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=t/e*100,s=100-r/e*100;this._lowValuePercentStart=O(o,0,100),this._highValuePercentEnd=O(s,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-je)/(this._trackWidth-je*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,r=e-this.startPoint.mouse,o=this._max-this._min,s=r/(t+je*2),a=Math.round(s*o/this._step)*this._step,u=this.startPoint.low+a,c=this.startPoint.high+a;this.setValue(u,c,!0),this.dispatchEvent(new it(it.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new it(it.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new it(it.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new it(it.CHANGE))}render(){return h`
|
|
5593
5128
|
<div id="range-slider">
|
|
5594
5129
|
${this._renderNativeInputs()}
|
|
5595
5130
|
<div id="inner-track">
|
|
@@ -5606,23 +5141,23 @@
|
|
|
5606
5141
|
`}_renderThumbValues(){return h`<div class="thumb-values">
|
|
5607
5142
|
<span
|
|
5608
5143
|
><span
|
|
5609
|
-
>${this._lowInputValue.toFixed(
|
|
5144
|
+
>${this._lowInputValue.toFixed(ls(this._step))}</span
|
|
5610
5145
|
></span
|
|
5611
5146
|
>
|
|
5612
5147
|
<span
|
|
5613
5148
|
><span
|
|
5614
|
-
>${this._highInputValue.toFixed(
|
|
5149
|
+
>${this._highInputValue.toFixed(ls(this._step))}</span
|
|
5615
5150
|
></span
|
|
5616
5151
|
>
|
|
5617
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-
|
|
5152
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-je*2)/e;if(t<Am||e%1!==0)return;let r=0;const o=new Array(e+1).fill(t).map(s=>s*r++);return h`<div class="step-wrapper">
|
|
5618
5153
|
<svg height="100%" width="100%">
|
|
5619
|
-
<rect x="9" y="9" height="${
|
|
5154
|
+
<rect x="9" y="9" height="${ui}" rx="2" />
|
|
5620
5155
|
${this._renderStepCircles(o)}
|
|
5621
5156
|
</svg>
|
|
5622
5157
|
${this._renderStepValues(e)}
|
|
5623
|
-
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const r=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(
|
|
5158
|
+
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const r=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(ls(this._step)));return h`<div class="step-values">
|
|
5624
5159
|
${r.map(o=>h`<span><span>${o}</span></span>`)}
|
|
5625
|
-
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return
|
|
5160
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return f`${e.map(r=>{const o=r+je,s=this._lowInputValue-this._min,a=this._highInputValue-this._min;return o/t>=s&&o/t<=a?f`<circle class="track-step filled" cx="${o}" cy="${ui*2}" r="4.5" />`:f`<circle class="track-step regular" cx="${o}" cy="${ui*2}" r="4.5" />`})}`}_renderNativeInputs(){return h` <div class="native-wrapper">
|
|
5626
5161
|
<input
|
|
5627
5162
|
id="inputLow"
|
|
5628
5163
|
class="${this._movement?"focus":""}"
|
|
@@ -5647,7 +5182,7 @@
|
|
|
5647
5182
|
?disabled="${this.disabled||this.readonly}"
|
|
5648
5183
|
@input=${this._onHighInput}
|
|
5649
5184
|
@change=${this._onHighChange} />
|
|
5650
|
-
</div>`}},
|
|
5185
|
+
</div>`}},ot=new WeakSet,kt=function(){const i=this.value.split(",");let e=Number(i[0])||0,t=Number(i[1])||0;t=O(t,this._min,this._max),e=this._min+Math.round((e-this._min)/this._step)*this._step,t=this._min+Math.round((t-this._min)/this._step)*this._step,this._lowInputValue=O(e,this._min,this._minGap?t-this._minGap:t-this._step),this._highInputValue=O(t,this._minGap?this._lowInputValue+this._minGap:this._lowInputValue+this._step,Math.min(this._maxGap?e+this._maxGap:this._max,this._max)),this._updateInnerColor(),this.requestUpdate()},ss=new WeakMap,n.UUIRangeSliderElement.formAssociated=!0,n.UUIRangeSliderElement.styles=[b`
|
|
5651
5186
|
:host {
|
|
5652
5187
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
5653
5188
|
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
@@ -5683,8 +5218,8 @@
|
|
|
5683
5218
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5684
5219
|
position: absolute;
|
|
5685
5220
|
height: 3px;
|
|
5686
|
-
left: ${
|
|
5687
|
-
right: ${
|
|
5221
|
+
left: ${je}px; /* Match TRACK_MARGIN */
|
|
5222
|
+
right: ${je}px; /* Match TRACK_MARGIN */
|
|
5688
5223
|
}
|
|
5689
5224
|
|
|
5690
5225
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -5698,10 +5233,10 @@
|
|
|
5698
5233
|
display: flex;
|
|
5699
5234
|
flex-direction: column;
|
|
5700
5235
|
justify-content: center;
|
|
5701
|
-
height: ${
|
|
5236
|
+
height: ${eo}px;
|
|
5702
5237
|
cursor: grab;
|
|
5703
5238
|
user-select: none;
|
|
5704
|
-
z-index: ${
|
|
5239
|
+
z-index: ${as.CENTER};
|
|
5705
5240
|
}
|
|
5706
5241
|
|
|
5707
5242
|
:host([disabled]) #inner-color-thumb,
|
|
@@ -5725,16 +5260,16 @@
|
|
|
5725
5260
|
}
|
|
5726
5261
|
|
|
5727
5262
|
:host(:not([readonly])) #inner-color-thumb:hover .color {
|
|
5728
|
-
height: ${
|
|
5263
|
+
height: ${ui*2}px;
|
|
5729
5264
|
background-color: var(--color-hover);
|
|
5730
|
-
transform: translateY(-${
|
|
5265
|
+
transform: translateY(-${ui/2}px);
|
|
5731
5266
|
}
|
|
5732
5267
|
|
|
5733
5268
|
.color {
|
|
5734
5269
|
user-select: none;
|
|
5735
5270
|
position: absolute;
|
|
5736
5271
|
inset-inline: 0;
|
|
5737
|
-
height: ${
|
|
5272
|
+
height: ${ui}px;
|
|
5738
5273
|
top: 50%;
|
|
5739
5274
|
transform: translateY(0);
|
|
5740
5275
|
background-color: var(--color-interactive);
|
|
@@ -5759,7 +5294,7 @@
|
|
|
5759
5294
|
|
|
5760
5295
|
/** Steps */
|
|
5761
5296
|
.step-wrapper {
|
|
5762
|
-
margin: 0 ${-1*
|
|
5297
|
+
margin: 0 ${-1*je}px;
|
|
5763
5298
|
height: 11px;
|
|
5764
5299
|
position: absolute;
|
|
5765
5300
|
left: 0;
|
|
@@ -5802,7 +5337,7 @@
|
|
|
5802
5337
|
|
|
5803
5338
|
.step-values {
|
|
5804
5339
|
box-sizing: border-box;
|
|
5805
|
-
margin: 0 ${
|
|
5340
|
+
margin: 0 ${je}px; /* Match TRACK_MARGIN */
|
|
5806
5341
|
display: flex;
|
|
5807
5342
|
justify-content: space-between;
|
|
5808
5343
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -5884,9 +5419,9 @@
|
|
|
5884
5419
|
pointer-events: all;
|
|
5885
5420
|
cursor: grab;
|
|
5886
5421
|
position: relative;
|
|
5887
|
-
z-index: ${
|
|
5888
|
-
width: ${
|
|
5889
|
-
height: ${
|
|
5422
|
+
z-index: ${as.TOP};
|
|
5423
|
+
width: ${eo}px;
|
|
5424
|
+
height: ${eo}px;
|
|
5890
5425
|
border-radius: 24px;
|
|
5891
5426
|
border: none;
|
|
5892
5427
|
background-color: var(--color-interactive);
|
|
@@ -5930,9 +5465,9 @@
|
|
|
5930
5465
|
pointer-events: all;
|
|
5931
5466
|
cursor: grab;
|
|
5932
5467
|
position: relative;
|
|
5933
|
-
z-index: ${
|
|
5934
|
-
width: ${
|
|
5935
|
-
height: ${
|
|
5468
|
+
z-index: ${as.TOP};
|
|
5469
|
+
width: ${eo}px;
|
|
5470
|
+
height: ${eo}px;
|
|
5936
5471
|
border-radius: 24px;
|
|
5937
5472
|
border: none;
|
|
5938
5473
|
background-color: var(--color-interactive);
|
|
@@ -5967,7 +5502,7 @@
|
|
|
5967
5502
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
5968
5503
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
5969
5504
|
}
|
|
5970
|
-
`],
|
|
5505
|
+
`],B([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),B([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),B([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"readonly",2),B([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),B([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),B([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),B([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),B([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),B([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),B([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),B([w()],n.UUIRangeSliderElement.prototype,"_movement",2),B([w()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),B([w()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),B([w()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),B([w()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),B([w()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),B([S("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),B([S("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),B([S("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),B([S(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),B([S("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=B([p("uui-range-slider")],n.UUIRangeSliderElement);var Pm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIRefListElement=class extends g{render(){return h`<slot></slot>`}},n.UUIRefListElement.styles=[b`
|
|
5971
5506
|
:host {
|
|
5972
5507
|
display: block;
|
|
5973
5508
|
}
|
|
@@ -5983,7 +5518,7 @@
|
|
|
5983
5518
|
right: 0;
|
|
5984
5519
|
border-top: 1px solid var(--uui-color-border,#d8d7d9);
|
|
5985
5520
|
}
|
|
5986
|
-
`],
|
|
5521
|
+
`],n.UUIRefListElement=Pm([p("uui-ref-list")],n.UUIRefListElement);let to=class extends z{static{this.OPEN="open"}};var zm=Object.defineProperty,Om=Object.getOwnPropertyDescriptor,sr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Om(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&zm(e,t,o),o};n.UUIRefElement=class extends fo(Nt(g)){constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new to(to.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new to(to.OPEN)))}},n.UUIRefElement.styles=[b`
|
|
5987
5522
|
:host {
|
|
5988
5523
|
position: relative;
|
|
5989
5524
|
display: flex;
|
|
@@ -6160,7 +5695,7 @@
|
|
|
6160
5695
|
justify-content: flex-end;
|
|
6161
5696
|
align-items: center;
|
|
6162
5697
|
}
|
|
6163
|
-
`],
|
|
5698
|
+
`],sr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"disabled",2),sr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"readonly",2),sr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"error",2),n.UUIRefElement=sr([p("uui-ref")],n.UUIRefElement);var Lm=Object.defineProperty,Mm=Object.getOwnPropertyDescriptor,nu=i=>{throw TypeError(i)},rt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Lm(e,t,o),o},Nm=(i,e,t)=>e.has(i)||nu("Cannot "+t),Tm=(i,e,t)=>e.has(i)?nu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),nt=(i,e,t)=>(Nm(i,e,"access private method"),t),Ie,su,au,ar,lu,uu,cu;n.UUIRefNodeElement=class extends n.UUIRefElement{constructor(){super(...arguments),Tm(this,Ie),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
6164
5699
|
xmlns="http://www.w3.org/2000/svg"
|
|
6165
5700
|
viewBox="0 0 24 24"
|
|
6166
5701
|
fill="none"
|
|
@@ -6171,36 +5706,36 @@
|
|
|
6171
5706
|
id="icon">
|
|
6172
5707
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
6173
5708
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
6174
|
-
</svg>`}connectedCallback(){super.connectedCallback(),
|
|
5709
|
+
</svg>`}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}async focus(){await this.updateComplete,this._openPart?.focus()}renderDetail(){return h`<small id="detail"
|
|
6175
5710
|
>${this.detail}<slot name="detail"></slot
|
|
6176
5711
|
></small>`}render(){return h`
|
|
6177
|
-
${
|
|
5712
|
+
${nt(this,Ie,cu).call(this)}
|
|
6178
5713
|
<!-- Select border must be right after #open-part -->
|
|
6179
5714
|
<div id="select-border"></div>
|
|
6180
5715
|
|
|
6181
5716
|
<slot></slot>
|
|
6182
5717
|
<slot name="tag" id="tag-container"></slot>
|
|
6183
5718
|
<slot name="actions" id="actions-container"></slot>
|
|
6184
|
-
`}},
|
|
5719
|
+
`}},Ie=new WeakSet,su=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},au=function(){return h`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},ar=function(){return h`
|
|
6185
5720
|
<span id="content" class="uui-text">
|
|
6186
5721
|
<span id="icon">
|
|
6187
|
-
<slot name="icon" @slotchange=${
|
|
6188
|
-
${this._iconSlotHasContent===!1?
|
|
5722
|
+
<slot name="icon" @slotchange=${nt(this,Ie,su)}></slot>
|
|
5723
|
+
${this._iconSlotHasContent===!1?nt(this,Ie,au).call(this):""}
|
|
6189
5724
|
</span>
|
|
6190
5725
|
<div id="info">
|
|
6191
5726
|
<div id="name">${this.name}<slot name="name"></slot></div>
|
|
6192
5727
|
${this.renderDetail()}
|
|
6193
5728
|
</div>
|
|
6194
5729
|
</span>
|
|
6195
|
-
`},
|
|
5730
|
+
`},lu=function(){return h`<a
|
|
6196
5731
|
id="open-part"
|
|
6197
5732
|
class="uui-text"
|
|
6198
5733
|
tabindex=${this.disabled?C:"0"}
|
|
6199
|
-
href=${
|
|
6200
|
-
target=${
|
|
6201
|
-
rel=${
|
|
6202
|
-
${
|
|
6203
|
-
</a>`},
|
|
5734
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
5735
|
+
target=${$(this.target||void 0)}
|
|
5736
|
+
rel=${$(this.rel||$(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
5737
|
+
${nt(this,Ie,ar).call(this)}
|
|
5738
|
+
</a>`},uu=function(){return h`
|
|
6204
5739
|
<button
|
|
6205
5740
|
type="button"
|
|
6206
5741
|
id="open-part"
|
|
@@ -6209,9 +5744,9 @@
|
|
|
6209
5744
|
@click=${this.handleOpenClick}
|
|
6210
5745
|
@keydown=${this.handleOpenKeydown}
|
|
6211
5746
|
?disabled=${this.disabled}>
|
|
6212
|
-
${
|
|
5747
|
+
${nt(this,Ie,ar).call(this)}
|
|
6213
5748
|
</button>
|
|
6214
|
-
`},
|
|
5749
|
+
`},cu=function(){return this.readonly?h`${nt(this,Ie,ar).call(this)}`:this.href?nt(this,Ie,lu).call(this):nt(this,Ie,uu).call(this)},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,b`
|
|
6215
5750
|
:host {
|
|
6216
5751
|
min-width: 250px;
|
|
6217
5752
|
padding: 1px;
|
|
@@ -6298,17 +5833,17 @@
|
|
|
6298
5833
|
:host([disabled]) #detail {
|
|
6299
5834
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
6300
5835
|
}
|
|
6301
|
-
`],
|
|
5836
|
+
`],rt([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),rt([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),rt([l({type:String})],n.UUIRefNodeElement.prototype,"href",2),rt([l({type:String})],n.UUIRefNodeElement.prototype,"target",2),rt([l({type:String})],n.UUIRefNodeElement.prototype,"rel",2),rt([S("#open-part")],n.UUIRefNodeElement.prototype,"_openPart",2),rt([w()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=rt([p("uui-ref-node")],n.UUIRefNodeElement);var Bm=Object.defineProperty,Dm=Object.getOwnPropertyDescriptor,hu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Bm(e,t,o),o};n.UUIRefNodeDataTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),h`<small id="detail"
|
|
6302
5837
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
6303
|
-
></small>`}},
|
|
5838
|
+
></small>`}},n.UUIRefNodeDataTypeElement.styles=[...n.UUIRefNodeElement.styles],hu([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=hu([p("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var Vm=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,du=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vm(e,t,o),o};n.UUIRefNodeDocumentTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),h`<small id="detail"
|
|
6304
5839
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
6305
|
-
></small>`}},
|
|
5840
|
+
></small>`}},n.UUIRefNodeDocumentTypeElement.styles=[...n.UUIRefNodeElement.styles],du([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=du([p("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var jm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIRefNodeFormElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}},n.UUIRefNodeFormElement.styles=[...n.UUIRefNodeElement.styles],n.UUIRefNodeFormElement=jm([p("uui-ref-node-form")],n.UUIRefNodeFormElement);var Rm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,pu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Rm(e,t,o),o};n.UUIRefNodeMemberElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),h`<small id="detail"
|
|
6306
5841
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
6307
|
-
></small>`}},
|
|
5842
|
+
></small>`}},n.UUIRefNodeMemberElement.styles=[...n.UUIRefNodeElement.styles],pu([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=pu([p("uui-ref-node-member")],n.UUIRefNodeMemberElement);var Gm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,us=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Gm(e,t,o),o};n.UUIRefNodePackageElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),h`<small id="detail"
|
|
6308
5843
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
6309
|
-
></small>`}},
|
|
5844
|
+
></small>`}},n.UUIRefNodePackageElement.styles=[...n.UUIRefNodeElement.styles],us([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),us([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=us([p("uui-ref-node-package")],n.UUIRefNodePackageElement);var qm=Object.defineProperty,Km=Object.getOwnPropertyDescriptor,bu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Km(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&qm(e,t,o),o};n.UUIRefNodeUserElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),h`<small id="detail"
|
|
6310
5845
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
6311
|
-
></small>`}},
|
|
5846
|
+
></small>`}},n.UUIRefNodeUserElement.styles=[...n.UUIRefNodeElement.styles],bu([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=bu([p("uui-ref-node-user")],n.UUIRefNodeUserElement);var Xm=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,mu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ym(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xm(e,t,o),o};n.UUIScrollContainerElement=class extends g{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return h`<slot></slot>`}},n.UUIScrollContainerElement.styles=[b`
|
|
6312
5847
|
:host {
|
|
6313
5848
|
display: block;
|
|
6314
5849
|
scrollbar-width: thin;
|
|
@@ -6334,7 +5869,7 @@
|
|
|
6334
5869
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
6335
5870
|
border-radius: 3px;
|
|
6336
5871
|
}
|
|
6337
|
-
`],
|
|
5872
|
+
`],mu([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=mu([p("uui-scroll-container")],n.UUIScrollContainerElement);let cs=class extends z{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Zm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,ge=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zm(e,t,o),o};n.UUISelectElement=class extends we(g,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const t=this.options.find(r=>r.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new cs(cs.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,r,o){return h`<option
|
|
6338
5873
|
value="${t}"
|
|
6339
5874
|
?selected=${r}
|
|
6340
5875
|
?disabled=${o}>
|
|
@@ -6355,7 +5890,7 @@
|
|
|
6355
5890
|
<option disabled selected value="" hidden>${this.placeholder}</option>
|
|
6356
5891
|
${this._renderGrouped()}
|
|
6357
5892
|
${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}
|
|
6358
|
-
</select>`}},
|
|
5893
|
+
</select>`}},n.UUISelectElement.styles=[b`
|
|
6359
5894
|
:host {
|
|
6360
5895
|
display: inline-block;
|
|
6361
5896
|
position: relative;
|
|
@@ -6433,7 +5968,7 @@
|
|
|
6433
5968
|
71
|
|
6434
5969
|
));
|
|
6435
5970
|
}
|
|
6436
|
-
`]
|
|
5971
|
+
`],ge([l({type:String})],n.UUISelectElement.prototype,"label",2),ge([l()],n.UUISelectElement.prototype,"placeholder",2),ge([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),ge([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"readonly",2),ge([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),ge([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),ge([w()],n.UUISelectElement.prototype,"_groups",2),ge([l()],n.UUISelectElement.prototype,"disabledGroups",2),ge([w()],n.UUISelectElement.prototype,"_disabledGroups",2),ge([S("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=ge([p("uui-select")],n.UUISelectElement);const Jm=b`
|
|
6437
5972
|
input[type='range'] {
|
|
6438
5973
|
left: 0;
|
|
6439
5974
|
position: absolute;
|
|
@@ -6540,12 +6075,12 @@
|
|
|
6540
6075
|
input[type='range']:focus::-ms-fill-upper {
|
|
6541
6076
|
background: transparent;
|
|
6542
6077
|
}
|
|
6543
|
-
`;let
|
|
6544
|
-
${this._steps.map(e=>{if(this._stepWidth>=
|
|
6078
|
+
`;let io=class extends z{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,vu=i=>{throw TypeError(i)},X=(i,e,t,r)=>{for(var o=r>1?void 0:r?tv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ev(e,t,o),o},hs=(i,e,t)=>e.has(i)||vu("Cannot "+t),gu=(i,e,t)=>(hs(i,e,"read from private field"),t?t.call(i):e.get(i)),ds=(i,e,t)=>e.has(i)?vu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),fu=(i,e,t,r)=>(hs(i,e,"write to private field"),e.set(i,t),t),iv=(i,e,t)=>(hs(i,e,"access private method"),t),lr,ur,ps,yu;const oo=12,wu=24,ov=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t),rv=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};n.UUISliderElement=class extends we(g,""){constructor(){super(),ds(this,ps),ds(this,lr,0),this.hideStepValues=!1,this.hideValueLabel=!1,this.min=0,this.max=100,ds(this,ur,1),this.disabled=!1,this.readonly=!1,this._stepWidth=0,this.onWindowResize=()=>{this._stepWidth=this._calculateStepWidth()},this._steps=[],this._sliderPosition="0%",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",iv(this,ps,yu))}get step(){return gu(this,ur)}set step(e){fu(this,ur,e),fu(this,lr,(e.toString().split(".")[1]||[]).length)}get value(){return super.value}set value(e){if(e instanceof File)return;const t=super.value;let r=e?parseFloat(e):0;r=Math.min(Math.max(r,this.min),this.max),this.step>0&&(r=Math.round(r/this.step)*this.step),super.value=r.toFixed(gu(this,lr)).toString(),this._calculateSliderPosition(),this.requestUpdate("value",t)}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.label||console.warn(this.tagName+" needs a `label`",this)}disconnectedCallback(){window.removeEventListener("resize",this.onWindowResize),super.disconnectedCallback()}firstUpdated(){this._calculateSliderPosition(),this._updateSteps()}updated(e){super.updated(e),(e.get("max")||e.get("min")||e.get("step"))&&(this.value=this.value,this._updateSteps())}_updateSteps(){this._steps=ov(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-oo*2)/(this._steps.length-1)}_calculateSliderPosition(){const e=(parseFloat(super.value||"0")-this.min)/(this.max-this.min);this._sliderPosition=`${Math.floor(e*1e5)/1e3}%`}_onInput(e){e.stopPropagation(),this.value=this._input.value,this.dispatchEvent(new io(io.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new io(io.CHANGE))}renderTrackSteps(){return f`
|
|
6079
|
+
${this._steps.map(e=>{if(this._stepWidth>=wu){const t=Math.round(oo+this._stepWidth*this._steps.indexOf(e));return f`<circle class="track-step" cx="${t}" cy="50%" r="4.5" />`}return f``})}
|
|
6545
6080
|
`}renderStepValues(){return this.hideStepValues?C:h`<div id="step-values">
|
|
6546
6081
|
${this._steps.map(e=>h` <span
|
|
6547
6082
|
><span>
|
|
6548
|
-
${this._steps.length<=20&&this._stepWidth>=
|
|
6083
|
+
${this._steps.length<=20&&this._stepWidth>=wu?e.toFixed(rv(this.step)):C}
|
|
6549
6084
|
</span></span
|
|
6550
6085
|
>`)}
|
|
6551
6086
|
</div>`}render(){return h`
|
|
@@ -6568,13 +6103,13 @@
|
|
|
6568
6103
|
</svg>
|
|
6569
6104
|
|
|
6570
6105
|
<div id="track-inner" aria-hidden="true">
|
|
6571
|
-
<div id="thumb" style=${
|
|
6106
|
+
<div id="thumb" style=${Te({left:this._sliderPosition})}>
|
|
6572
6107
|
${this.hideValueLabel?null:h`<div id="thumb-label">${this.value}</div>`}
|
|
6573
6108
|
</div>
|
|
6574
6109
|
</div>
|
|
6575
6110
|
</div>
|
|
6576
6111
|
${this.renderStepValues()}
|
|
6577
|
-
`}},
|
|
6112
|
+
`}},lr=new WeakMap,ur=new WeakMap,ps=new WeakSet,yu=function(i){i.key=="Enter"&&this.submit()},n.UUISliderElement.formAssociated=!0,n.UUISliderElement.styles=[zh,Jm,b`
|
|
6578
6113
|
:host {
|
|
6579
6114
|
display: inline-block;
|
|
6580
6115
|
width: 100%;
|
|
@@ -6623,8 +6158,8 @@
|
|
|
6623
6158
|
|
|
6624
6159
|
#track-inner {
|
|
6625
6160
|
position: absolute;
|
|
6626
|
-
left: ${
|
|
6627
|
-
right: ${
|
|
6161
|
+
left: ${oo}px; /* Match TRACK_MARGIN */
|
|
6162
|
+
right: ${oo}px; /* Match TRACK_MARGIN */
|
|
6628
6163
|
}
|
|
6629
6164
|
|
|
6630
6165
|
#thumb {
|
|
@@ -6686,7 +6221,7 @@
|
|
|
6686
6221
|
}
|
|
6687
6222
|
|
|
6688
6223
|
#step-values {
|
|
6689
|
-
margin: 0 ${
|
|
6224
|
+
margin: 0 ${oo}px; /* Match TRACK_MARGIN */
|
|
6690
6225
|
margin-top: 6px;
|
|
6691
6226
|
display: flex;
|
|
6692
6227
|
align-items: flex-end;
|
|
@@ -6735,7 +6270,7 @@
|
|
|
6735
6270
|
:host([readonly]) #thumb-label {
|
|
6736
6271
|
opacity: 1;
|
|
6737
6272
|
}
|
|
6738
|
-
`],
|
|
6273
|
+
`],X([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",2),X([l({type:Boolean,attribute:"hide-value-label"})],n.UUISliderElement.prototype,"hideValueLabel",2),X([l({type:Number})],n.UUISliderElement.prototype,"min",2),X([l({type:Number})],n.UUISliderElement.prototype,"max",2),X([l({type:Number})],n.UUISliderElement.prototype,"step",1),X([l({type:String})],n.UUISliderElement.prototype,"value",1),X([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),X([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"readonly",2),X([l({type:String})],n.UUISliderElement.prototype,"label",2),X([S("#input")],n.UUISliderElement.prototype,"_input",2),X([S("#track")],n.UUISliderElement.prototype,"_track",2),X([w()],n.UUISliderElement.prototype,"_stepWidth",2),X([w()],n.UUISliderElement.prototype,"_steps",2),X([w()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=X([p("uui-slider")],n.UUISliderElement);var nv=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,$u=(i,e,t,r)=>{for(var o=r>1?void 0:r?sv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&nv(e,t,o),o};n.UUISymbolExpandElement=class extends g{constructor(){super(...arguments),this.open=!1}render(){return h`<svg
|
|
6739
6274
|
xmlns="http://www.w3.org/2000/svg"
|
|
6740
6275
|
viewBox="0 0 24 24"
|
|
6741
6276
|
fill="none"
|
|
@@ -6744,7 +6279,7 @@
|
|
|
6744
6279
|
stroke-linecap="round"
|
|
6745
6280
|
stroke-linejoin="round">
|
|
6746
6281
|
<path d="m4 9 8 8 8-8"></path>
|
|
6747
|
-
</svg>`}},
|
|
6282
|
+
</svg>`}},n.UUISymbolExpandElement.styles=[b`
|
|
6748
6283
|
:host {
|
|
6749
6284
|
display: inline-flex;
|
|
6750
6285
|
width: 12px;
|
|
@@ -6762,9 +6297,9 @@
|
|
|
6762
6297
|
:host([open]) svg {
|
|
6763
6298
|
transform: rotate(0deg);
|
|
6764
6299
|
}
|
|
6765
|
-
`]
|
|
6300
|
+
`],$u([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=$u([p("uui-symbol-expand")],n.UUISymbolExpandElement);var av=Object.defineProperty,lv=Object.getOwnPropertyDescriptor,bs=(i,e,t,r)=>{for(var o=r>1?void 0:r?lv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&av(e,t,o),o};n.UUISymbolFileThumbnailElement=class extends g{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}render(){return this.src?h`<img src=${this.src} alt=${this.alt} />`:h`<uui-icon
|
|
6766
6301
|
name="picture"
|
|
6767
|
-
.fallback=${
|
|
6302
|
+
.fallback=${Mh.strings[0]}></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[b`
|
|
6768
6303
|
:host {
|
|
6769
6304
|
display: block;
|
|
6770
6305
|
width: 100%;
|
|
@@ -6787,7 +6322,7 @@
|
|
|
6787
6322
|
color: var(--uui-color-surface,#fff);
|
|
6788
6323
|
background: var(--uui-color-surface-alt,#f3f3f5);
|
|
6789
6324
|
}
|
|
6790
|
-
`],
|
|
6325
|
+
`],bs([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),bs([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=bs([p("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var uv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,_u=(i,e,t,r)=>{for(var o=r>1?void 0:r?cv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&uv(e,t,o),o};n.UUISymbolFileElement=class extends g{constructor(){super(...arguments),this.type=""}render(){return h`
|
|
6791
6326
|
<svg
|
|
6792
6327
|
xmlns="http://www.w3.org/2000/svg"
|
|
6793
6328
|
viewBox="0 0 24 24"
|
|
@@ -6804,7 +6339,7 @@
|
|
|
6804
6339
|
${this.type?h`<small id="file-type" class="uui-small"
|
|
6805
6340
|
>${this.type.toUpperCase()}</small
|
|
6806
6341
|
>`:""}
|
|
6807
|
-
`}},
|
|
6342
|
+
`}},n.UUISymbolFileElement.styles=[Lt,b`
|
|
6808
6343
|
:host {
|
|
6809
6344
|
position: relative;
|
|
6810
6345
|
display: block;
|
|
@@ -6830,7 +6365,7 @@
|
|
|
6830
6365
|
width: 100%;
|
|
6831
6366
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6832
6367
|
}
|
|
6833
|
-
`],
|
|
6368
|
+
`],_u([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=_u([p("uui-symbol-file")],n.UUISymbolFileElement);var hv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolFolderElement=class extends g{render(){return h`<svg
|
|
6834
6369
|
xmlns="http://www.w3.org/2000/svg"
|
|
6835
6370
|
viewBox="0 0 24 24"
|
|
6836
6371
|
fill="none"
|
|
@@ -6841,7 +6376,7 @@
|
|
|
6841
6376
|
id="icon">
|
|
6842
6377
|
<path
|
|
6843
6378
|
d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />
|
|
6844
|
-
</svg>`}},
|
|
6379
|
+
</svg>`}},n.UUISymbolFolderElement.styles=[b`
|
|
6845
6380
|
:host {
|
|
6846
6381
|
display: block;
|
|
6847
6382
|
position: relative;
|
|
@@ -6852,9 +6387,9 @@
|
|
|
6852
6387
|
width: 100%;
|
|
6853
6388
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6854
6389
|
}
|
|
6855
|
-
`],
|
|
6856
|
-
${this.open===!0?
|
|
6857
|
-
</svg>`}},
|
|
6390
|
+
`],n.UUISymbolFolderElement=hv([p("uui-symbol-folder")],n.UUISymbolFolderElement);var dv=Object.defineProperty,pv=Object.getOwnPropertyDescriptor,Uu=(i,e,t,r)=>{for(var o=r>1?void 0:r?pv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&dv(e,t,o),o};n.UUISymbolLockElement=class extends g{constructor(){super(...arguments),this.open=!1}render(){return f`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
6391
|
+
${this.open===!0?f`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:f`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}
|
|
6392
|
+
</svg>`}},n.UUISymbolLockElement.styles=[b`
|
|
6858
6393
|
:host {
|
|
6859
6394
|
display: inline-block;
|
|
6860
6395
|
vertical-align: middle;
|
|
@@ -6864,22 +6399,7 @@
|
|
|
6864
6399
|
svg {
|
|
6865
6400
|
fill: currentColor;
|
|
6866
6401
|
}
|
|
6867
|
-
`],
|
|
6868
|
-
<circle cx="17" cy="50" r="9"></circle>
|
|
6869
|
-
<circle cx="50" cy="50" r="9"></circle>
|
|
6870
|
-
<circle cx="83" cy="50" r="9"></circle>
|
|
6871
|
-
</svg>`}},s.UUISymbolMoreElement.styles=[v`
|
|
6872
|
-
:host {
|
|
6873
|
-
display: inline-block;
|
|
6874
|
-
vertical-align: bottom;
|
|
6875
|
-
width: 1.15em;
|
|
6876
|
-
height: 1.15em;
|
|
6877
|
-
}
|
|
6878
|
-
|
|
6879
|
-
svg {
|
|
6880
|
-
fill: currentColor;
|
|
6881
|
-
}
|
|
6882
|
-
`],s.UUISymbolMoreElement=fg([m("uui-symbol-more")],s.UUISymbolMoreElement);var yg=Object.defineProperty,wg=Object.getOwnPropertyDescriptor,rc=(i,e,t,r)=>{for(var o=r>1?void 0:r?wg(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&yg(e,t,o),o};s.UUISymbolSortElement=class extends Vi(f){constructor(){super(...arguments),this.descending=!1}render(){return h` <svg
|
|
6402
|
+
`],Uu([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=Uu([p("uui-symbol-lock")],n.UUISymbolLockElement);var bv=Object.defineProperty,mv=Object.getOwnPropertyDescriptor,ku=(i,e,t,r)=>{for(var o=r>1?void 0:r?mv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&bv(e,t,o),o};n.UUISymbolSortElement=class extends ki(g){constructor(){super(...arguments),this.descending=!1}render(){return h` <svg
|
|
6883
6403
|
id="up"
|
|
6884
6404
|
xmlns="http://www.w3.org/2000/svg"
|
|
6885
6405
|
width="24"
|
|
@@ -6904,7 +6424,7 @@
|
|
|
6904
6424
|
stroke-linecap="round"
|
|
6905
6425
|
stroke-linejoin="round">
|
|
6906
6426
|
<path d="m4 9 8 8 8-8"></path>
|
|
6907
|
-
</svg>`}},
|
|
6427
|
+
</svg>`}},n.UUISymbolSortElement.styles=[b`
|
|
6908
6428
|
:host {
|
|
6909
6429
|
position: relative;
|
|
6910
6430
|
display: inline-block;
|
|
@@ -6963,7 +6483,7 @@
|
|
|
6963
6483
|
:host([active][descending]) #down {
|
|
6964
6484
|
opacity: calc(0.25 * var(--uui-symbol-sort-hover, 0));
|
|
6965
6485
|
}
|
|
6966
|
-
`],
|
|
6486
|
+
`],ku([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=ku([p("uui-symbol-sort")],n.UUISymbolSortElement);var vv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableElement=class extends g{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return h`<slot></slot>`}},n.UUITableElement.styles=[b`
|
|
6967
6487
|
:host {
|
|
6968
6488
|
display: table;
|
|
6969
6489
|
width: 100%;
|
|
@@ -6971,7 +6491,7 @@
|
|
|
6971
6491
|
background-color: var(--uui-color-surface,#fff);
|
|
6972
6492
|
cursor: default;
|
|
6973
6493
|
}
|
|
6974
|
-
`],
|
|
6494
|
+
`],n.UUITableElement=vv([p("uui-table")],n.UUITableElement);var gv=Object.defineProperty,fv=Object.getOwnPropertyDescriptor,cr=(i,e,t,r)=>{for(var o=r>1?void 0:r?fv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&gv(e,t,o),o};n.UUITableCellElement=class extends g{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return h` <slot @slotchange=${this._detectOverflow}></slot>`}},n.UUITableCellElement.styles=[b`
|
|
6975
6495
|
:host {
|
|
6976
6496
|
position: relative;
|
|
6977
6497
|
display: table-cell;
|
|
@@ -7005,20 +6525,20 @@
|
|
|
7005
6525
|
:host([no-padding]) {
|
|
7006
6526
|
padding: 0;
|
|
7007
6527
|
}
|
|
7008
|
-
`],
|
|
6528
|
+
`],cr([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),cr([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),cr([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=cr([p("uui-table-cell")],n.UUITableCellElement);var yv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableColumnElement=class extends g{},n.UUITableColumnElement.styles=[b`
|
|
7009
6529
|
:host {
|
|
7010
6530
|
display: table-column;
|
|
7011
6531
|
}
|
|
7012
|
-
`],
|
|
6532
|
+
`],n.UUITableColumnElement=yv([p("uui-table-column")],n.UUITableColumnElement);var wv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,b`
|
|
7013
6533
|
:host {
|
|
7014
6534
|
border-top: none;
|
|
7015
6535
|
}
|
|
7016
|
-
`],
|
|
6536
|
+
`],n.UUITableHeadCellElement=wv([p("uui-table-head-cell")],n.UUITableHeadCellElement);var $v=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadElement=class extends g{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return h`<slot></slot>`}},n.UUITableHeadElement.styles=[b`
|
|
7017
6537
|
:host {
|
|
7018
6538
|
display: table-header-group;
|
|
7019
6539
|
font-weight: bold;
|
|
7020
6540
|
}
|
|
7021
|
-
`],
|
|
6541
|
+
`],n.UUITableHeadElement=$v([p("uui-table-head")],n.UUITableHeadElement);var _v=Object.defineProperty,Uv=Object.getOwnPropertyDescriptor,Eu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Uv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&_v(e,t,o),o};n.UUITableRowElement=class extends fo(Nt(g)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{e.disableChildInteraction!==void 0&&(e.disableChildInteraction=this.selectOnly)})}render(){return h` <slot @slotchanged=${this.updateChildSelectOnly}></slot> `}},n.UUITableRowElement.styles=[b`
|
|
7022
6542
|
:host {
|
|
7023
6543
|
display: table-row;
|
|
7024
6544
|
position: relative;
|
|
@@ -7041,12 +6561,12 @@
|
|
|
7041
6561
|
:host([selected]:focus) {
|
|
7042
6562
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
7043
6563
|
}
|
|
7044
|
-
`],
|
|
6564
|
+
`],Eu([Pe({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=Eu([p("uui-table-row")],n.UUITableRowElement);var kv=Object.defineProperty,Ev=Object.getOwnPropertyDescriptor,ci=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ev(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&kv(e,t,o),o};n.UUITabElement=class extends ki(ye("",g)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?h`
|
|
7045
6565
|
<a
|
|
7046
6566
|
id="button"
|
|
7047
|
-
href=${
|
|
7048
|
-
target=${
|
|
7049
|
-
rel=${
|
|
6567
|
+
href=${$(this.disabled?void 0:this.href)}
|
|
6568
|
+
target=${$(this.target||void 0)}
|
|
6569
|
+
rel=${$(this.rel||$(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
7050
6570
|
role="tab">
|
|
7051
6571
|
<slot name="icon"></slot>
|
|
7052
6572
|
${this.renderLabel()}
|
|
@@ -7062,7 +6582,7 @@
|
|
|
7062
6582
|
${this.renderLabel()}
|
|
7063
6583
|
<slot name="extra"></slot>
|
|
7064
6584
|
</button>
|
|
7065
|
-
`}},
|
|
6585
|
+
`}},n.UUITabElement.styles=[b`
|
|
7066
6586
|
:host {
|
|
7067
6587
|
color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
|
|
7068
6588
|
font-family: inherit;
|
|
@@ -7192,10 +6712,10 @@
|
|
|
7192
6712
|
:host([orientation='vertical']) slot.label {
|
|
7193
6713
|
text-align: left;
|
|
7194
6714
|
}
|
|
7195
|
-
`],
|
|
6715
|
+
`],ci([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),ci([l({type:String})],n.UUITabElement.prototype,"href",2),ci([l({type:String})],n.UUITabElement.prototype,"target",2),ci([l({type:String})],n.UUITabElement.prototype,"rel",2),ci([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=ci([p("uui-tab")],n.UUITabElement);var xv=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,xu=i=>{throw TypeError(i)},hi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Iv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&xv(e,t,o),o},ms=(i,e,t)=>e.has(i)||xu("Cannot "+t),P=(i,e,t)=>(ms(i,e,"read from private field"),t?t.call(i):e.get(i)),Ce=(i,e,t)=>e.has(i)?xu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ro=(i,e,t,r)=>(ms(i,e,"write to private field"),e.set(i,t),t),te=(i,e,t)=>(ms(i,e,"access private method"),t),hr,Se,Re,di,pi,dr,no,so,Y,Iu,Cu,vs,Su,bi,pr,Au,gs,fs;n.UUITabGroupElement=class extends g{constructor(){super(...arguments),Ce(this,Y),Ce(this,hr,0),this.dropdownContentDirection="vertical",Ce(this,Se,[]),Ce(this,Re,[]),Ce(this,di,new Map),Ce(this,pi,[]),Ce(this,dr,new ResizeObserver(te(this,Y,Cu).bind(this))),Ce(this,no,[]),Ce(this,so,!1),Ce(this,bi,e=>{const t=e.currentTarget;if(te(this,Y,fs).call(this,t)){t.active=!0;const r=P(this,di).get(t);r&&(r.active=!0),[...P(this,Se),...P(this,Re)].filter(o=>o!==t&&o!==r).forEach(o=>{te(this,Y,fs).call(this,o)&&(o.active=!1)}),P(this,Re).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),te(this,Y,Iu).call(this)}disconnectedCallback(){super.disconnectedCallback(),P(this,dr).unobserve(this),te(this,Y,vs).call(this)}render(){return h`
|
|
7196
6716
|
<div id="main">
|
|
7197
6717
|
<div id="grid" role="tablist">
|
|
7198
|
-
<slot @slotchange=${
|
|
6718
|
+
<slot @slotchange=${te(this,Y,Su)}></slot>
|
|
7199
6719
|
</div>
|
|
7200
6720
|
<uui-button
|
|
7201
6721
|
popovertarget="popover-container"
|
|
@@ -7211,10 +6731,10 @@
|
|
|
7211
6731
|
popover
|
|
7212
6732
|
placement="bottom-end">
|
|
7213
6733
|
<div id="hidden-tabs-container" role="tablist">
|
|
7214
|
-
${
|
|
6734
|
+
${wo(P(this,Re),e=>h`${e}`)}
|
|
7215
6735
|
</div>
|
|
7216
6736
|
</uui-popover-container>
|
|
7217
|
-
`}},
|
|
6737
|
+
`}},hr=new WeakMap,Se=new WeakMap,Re=new WeakMap,di=new WeakMap,pi=new WeakMap,dr=new WeakMap,no=new WeakMap,so=new WeakMap,Y=new WeakSet,Iu=async function(){_(this,"uui-button"),_(this,"uui-popover-container"),_(this,"uui-symbol-more"),await this.updateComplete,P(this,dr).observe(this._mainElement)},Cu=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==P(this,hr)?te(this,Y,pr).call(this):te(this,Y,gs).call(this,i[0].contentBoxSize[0].inlineSize)},vs=function(){P(this,Se).forEach(i=>{i.removeEventListener("click",P(this,bi)),P(this,no).forEach(e=>e.disconnect())}),P(this,no).length=0,P(this,pi).length=0},Su=function(){te(this,Y,vs).call(this),te(this,Y,Au).call(this),P(this,Se).forEach(i=>{i.addEventListener("click",P(this,bi));const e=new ResizeObserver(te(this,Y,pr).bind(this));e.observe(i),P(this,no).push(e)})},bi=new WeakMap,pr=async function(){if(P(this,so))return;ro(this,so,!0),requestAnimationFrame(()=>{ro(this,so,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;ro(this,hr,e);let t=0;for(let o=0;o<P(this,Se).length;o++)P(this,Se)[o].style.display="",t+=P(this,Se)[o].offsetWidth,P(this,pi)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",te(this,Y,gs).call(this,this._mainElement.offsetWidth)},Au=function(){ro(this,Se,this._slottedNodes?this._slottedNodes:[]),te(this,Y,pr).call(this)},gs=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);P(this,Re).forEach(s=>{s.removeEventListener("click",P(this,bi))}),ro(this,Re,[]),P(this,di).clear();let r=!1;const o=P(this,pi).length;for(let s=0;s<o;s++){const a=P(this,pi)[s],u=P(this,Se)[s];if(a<=(s===o-1?i:t))u.style.display="";else{const c=u.cloneNode(!0);c.addEventListener("click",P(this,bi)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,P(this,di).set(c,u),P(this,di).set(u,c),P(this,Re).push(c),u.style.display="none",u.active&&(r=!0)}}P(this,Re).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement.hidePopover()):this._moreButtonElement.style.display="",r?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},fs=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},n.UUITabGroupElement.styles=[b`
|
|
7218
6738
|
:host {
|
|
7219
6739
|
min-width: 0;
|
|
7220
6740
|
display: flex;
|
|
@@ -7302,7 +6822,7 @@
|
|
|
7302
6822
|
opacity 120ms,
|
|
7303
6823
|
height ease-out 120ms;
|
|
7304
6824
|
}
|
|
7305
|
-
`],
|
|
6825
|
+
`],hi([S("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),hi([S("#popover-container")],n.UUITabGroupElement.prototype,"_popoverContainerElement",2),hi([S("#main")],n.UUITabGroupElement.prototype,"_mainElement",2),hi([Pe({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),hi([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=hi([p("uui-tab-group")],n.UUITabGroupElement);class Cv extends z{}class Sv extends z{}var Av=Object.defineProperty,Pv=Object.getOwnPropertyDescriptor,ys=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Av(e,t,o),o};n.UUITagElement=class extends g{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return h`<slot></slot>`}},n.UUITagElement.styles=[b`
|
|
7306
6826
|
:host {
|
|
7307
6827
|
display: inline-block;
|
|
7308
6828
|
font-size: var(--uui-tag-font-size, var(--uui-type-small-size,12px));
|
|
@@ -7392,14 +6912,14 @@
|
|
|
7392
6912
|
color: var(--color-standalone);
|
|
7393
6913
|
border-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
7394
6914
|
}
|
|
7395
|
-
`],
|
|
6915
|
+
`],ys([l({reflect:!0})],n.UUITagElement.prototype,"color",2),ys([l({reflect:!0})],n.UUITagElement.prototype,"look",2),n.UUITagElement=ys([p("uui-tag")],n.UUITagElement);class ws extends z{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}}var zv=Object.defineProperty,Ov=Object.getOwnPropertyDescriptor,K=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ov(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&zv(e,t,o),o};n.UUITextareaElement=class extends we(g,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum ${e} characters, ${t-e} too many.`,this.autoHeight=!1,this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&this.value.length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&this.value.length>this.maxlength)}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this),this.autoHeight&&requestAnimationFrame(()=>{this.autoUpdateHeight()})}async focus(){await this.updateComplete,this._textarea.focus()}async blur(){await this.updateComplete,this._textarea.blur()}async click(){await this.updateComplete,this._textarea.click()}getFormElement(){return this._textarea}onInput(e){this.value=e.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new ws(ws.CHANGE))}autoUpdateHeight(){const e=this.shadowRoot.host,t=this._textarea,r=e.scrollTop,o=getComputedStyle(e).height;e.style.display="block",e.style.height=o,t.style.height="auto",t.scrollHeight+2>t.clientHeight?t.style.height=t.scrollHeight+2+"px":t.scrollHeight+2<t.clientHeight&&t.style.removeProperty("height"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=r}render(){return h`
|
|
7396
6916
|
<textarea
|
|
7397
6917
|
id="textarea"
|
|
7398
|
-
rows=${
|
|
7399
|
-
cols=${
|
|
6918
|
+
rows=${$(this.rows)}
|
|
6919
|
+
cols=${$(this.cols)}
|
|
7400
6920
|
.value=${this.value}
|
|
7401
6921
|
.name=${this.name}
|
|
7402
|
-
wrap=${
|
|
6922
|
+
wrap=${$(this.wrap)}
|
|
7403
6923
|
placeholder=${this.placeholder}
|
|
7404
6924
|
aria-label=${this.label}
|
|
7405
6925
|
.disabled=${this.disabled}
|
|
@@ -7407,7 +6927,7 @@
|
|
|
7407
6927
|
@input=${this.onInput}
|
|
7408
6928
|
@change=${this.onChange}>
|
|
7409
6929
|
</textarea>
|
|
7410
|
-
`}},
|
|
6930
|
+
`}},n.UUITextareaElement.formAssociated=!0,n.UUITextareaElement.styles=[b`
|
|
7411
6931
|
:host {
|
|
7412
6932
|
position: relative;
|
|
7413
6933
|
}
|
|
@@ -7492,7 +7012,7 @@
|
|
|
7492
7012
|
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
7493
7013
|
var(--uui-color-focus,#3879ff);
|
|
7494
7014
|
}
|
|
7495
|
-
`],
|
|
7015
|
+
`],K([l()],n.UUITextareaElement.prototype,"placeholder",2),K([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"disabled",2),K([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"readonly",2),K([l({type:String})],n.UUITextareaElement.prototype,"name",2),K([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"error",2),K([l({type:Number})],n.UUITextareaElement.prototype,"minlength",2),K([l({attribute:"minlength-message"})],n.UUITextareaElement.prototype,"minlengthMessage",2),K([l({type:Number})],n.UUITextareaElement.prototype,"maxlength",2),K([l({attribute:"maxlength-message"})],n.UUITextareaElement.prototype,"maxlengthMessage",2),K([S("#textarea")],n.UUITextareaElement.prototype,"_textarea",2),K([l({type:Boolean,attribute:"auto-height",reflect:!0})],n.UUITextareaElement.prototype,"autoHeight",2),K([l({type:String})],n.UUITextareaElement.prototype,"label",2),K([l({type:Number})],n.UUITextareaElement.prototype,"rows",2),K([l({type:Number})],n.UUITextareaElement.prototype,"cols",2),K([l({type:String})],n.UUITextareaElement.prototype,"wrap",2),n.UUITextareaElement=K([p("uui-textarea")],n.UUITextareaElement);let fe=class extends z{static{this.OPENING="opening"}static{this.OPENED="opened"}static{this.CLOSING="closing"}static{this.CLOSED="closed"}};var Lv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,mi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Lv(e,t,o),o};n.UUIToastNotificationElement=class extends g{constructor(){super(),this.color="",this._autoClose=null,this._onOpenTimerComplete=()=>{this._open&&(this.open=!1)},this._timer=null,this._pauseTimer=!1,this.isOpen=!1,this._open=!1,this._animate=!1,this._requestAnimationUpdate=0,this.addEventListener("keyup",e=>{e.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,e!==null?(this._timer===null?this._timer=new kh(this._onOpenTimerComplete,e):this._timer.setDuration(e),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):(this._timer?.destroy(),this._timer=null)}pauseAutoClose(){this._pauseTimer=!0,this._timer!==null&&this._timer.pause()}resumeAutoClose(){this._pauseTimer=!1,this._timer!==null&&this.isOpen===!0&&this._animate===!1&&this._timer.restart()}get open(){return this._open}set open(e){e===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),_(this,"uui-button"),_(this,"uui-icon")}_getAnimationDuration(){return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"),10)||480}_makeOpen(){this._open!==!0&&(this._open=!0,this.updateComplete.then(()=>{this._open===!0&&(cancelAnimationFrame(this._requestAnimationUpdate),this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!0,this.setAttribute("is-open",""),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,this.dispatchEvent(new fe(fe.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new fe(fe.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new fe(fe.CLOSING,{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented!==!0&&(this._open=!1,this._timer?.pause(),cancelAnimationFrame(this._requestAnimationUpdate),this.isOpen===!0&&(this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!1,this.removeAttribute("is-open"),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,requestAnimationFrame(()=>{this.style.height="0"}),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!1&&(this._animate=!1,this.dispatchEvent(new fe(fe.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return h`
|
|
7496
7016
|
<div id="toast" class=${this._animate?"animate":""}>
|
|
7497
7017
|
<div>
|
|
7498
7018
|
<div id="close">
|
|
@@ -7503,13 +7023,13 @@
|
|
|
7503
7023
|
@click=${()=>this.open=!1}>
|
|
7504
7024
|
<uui-icon
|
|
7505
7025
|
name="remove"
|
|
7506
|
-
.fallback=${
|
|
7026
|
+
.fallback=${Hr.strings[0]}></uui-icon>
|
|
7507
7027
|
</uui-button>
|
|
7508
7028
|
</div>
|
|
7509
7029
|
<slot></slot>
|
|
7510
7030
|
</div>
|
|
7511
7031
|
</div>
|
|
7512
|
-
`}},
|
|
7032
|
+
`}},n.UUIToastNotificationElement.styles=[Lt,b`
|
|
7513
7033
|
:host {
|
|
7514
7034
|
--uui-toast-notification-margin: var(--uui-size-space-2,6px);
|
|
7515
7035
|
|
|
@@ -7626,7 +7146,7 @@
|
|
|
7626
7146
|
71
|
|
7627
7147
|
));
|
|
7628
7148
|
}
|
|
7629
|
-
`],
|
|
7149
|
+
`],mi([l({reflect:!0})],n.UUIToastNotificationElement.prototype,"color",2),mi([l({type:Number})],n.UUIToastNotificationElement.prototype,"autoClose",1),mi([S("#toast")],n.UUIToastNotificationElement.prototype,"_toastEl",2),mi([w()],n.UUIToastNotificationElement.prototype,"_animate",2),mi([l({type:Boolean,reflect:!0})],n.UUIToastNotificationElement.prototype,"open",1),n.UUIToastNotificationElement=mi([p("uui-toast-notification")],n.UUIToastNotificationElement);var Nv=Object.defineProperty,Tv=Object.getOwnPropertyDescriptor,Pu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Nv(e,t,o),o};n.UUIToastNotificationContainerElement=class extends g{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{this._autoClosePause=!0,this._toasts?.forEach(e=>e.pauseAutoClose())},this.resumeAutoClose=()=>{this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,this._toasts?.forEach(e=>e.resumeAutoClose()))},this.onToastClosed=e=>{this.removeToast(e.target)},this._toasts=[],this.onSlotChanged=e=>{const t=[...this._toasts];this._toasts=e.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),t.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(fe.CLOSED,this.onToastClosed),r.removeEventListener("mouseenter",this.pauseAutoClose),r.removeEventListener("mouseleave",this.resumeAutoClose),r.removeEventListener("focus",this.pauseAutoClose),r.removeEventListener("blur",this.resumeAutoClose)}),this._toasts.filter(r=>t.indexOf(r)===-1).forEach(r=>{r.addEventListener(fe.CLOSED,this.onToastClosed),r.addEventListener("mouseenter",this.pauseAutoClose),r.addEventListener("mouseleave",this.resumeAutoClose),r.addEventListener("focus",this.pauseAutoClose),r.addEventListener("blur",this.resumeAutoClose),this._autoClose&&(r.autoClose=this._autoClose),this._autoClosePause===!0&&r.pauseAutoClose(),r.open=!0})}}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,this._toasts?.forEach(t=>t.autoClose=e)}removeToast(e){if(!e)e=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(e)===-1){console.warn("Toast-notification",e,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(e)}closeToast(e){let t=e;t||(t=this._toasts[this._toasts.length-1]),t.open=!1}render(){return h` <slot @slotchange=${this.onSlotChanged}></slot> `}},n.UUIToastNotificationContainerElement.styles=[b`
|
|
7630
7150
|
:host {
|
|
7631
7151
|
position: absolute;
|
|
7632
7152
|
overflow: hidden;
|
|
@@ -7654,7 +7174,7 @@
|
|
|
7654
7174
|
:host([left-align]) slot {
|
|
7655
7175
|
align-items: start;
|
|
7656
7176
|
}
|
|
7657
|
-
`],
|
|
7177
|
+
`],Pu([l({type:Number,reflect:!0,attribute:"auto-close"})],n.UUIToastNotificationContainerElement.prototype,"_autoClose",2),n.UUIToastNotificationContainerElement=Pu([p("uui-toast-notification-container")],n.UUIToastNotificationContainerElement);var Bv=Object.defineProperty,Dv=Object.getOwnPropertyDescriptor,$s=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dv(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Bv(e,t,o),o};n.UUIToastNotificationLayoutElement=class extends g{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return h`
|
|
7658
7178
|
<div id="message" class="uui-text">
|
|
7659
7179
|
<h5
|
|
7660
7180
|
style=${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}>
|
|
@@ -7664,7 +7184,7 @@
|
|
|
7664
7184
|
<slot></slot>
|
|
7665
7185
|
<slot id="actions" name="actions"></slot>
|
|
7666
7186
|
</div>
|
|
7667
|
-
`}},
|
|
7187
|
+
`}},n.UUIToastNotificationLayoutElement.styles=[Lt,b`
|
|
7668
7188
|
#message {
|
|
7669
7189
|
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
7670
7190
|
}
|
|
@@ -7685,12 +7205,12 @@
|
|
|
7685
7205
|
margin-top: var(--uui-size-space-4,12px);
|
|
7686
7206
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
7687
7207
|
}
|
|
7688
|
-
`]
|
|
7208
|
+
`],$s([l({type:String})],n.UUIToastNotificationLayoutElement.prototype,"headline",2),$s([w()],n.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIToastNotificationLayoutElement=$s([p("uui-toast-notification-layout")],n.UUIToastNotificationLayoutElement);var Vv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIToggleElement=class extends ce{constructor(){super("switch")}renderCheckbox(){return h`
|
|
7689
7209
|
<div id="toggle">
|
|
7690
|
-
<div id="icon-checked">${
|
|
7691
|
-
<div id="icon-unchecked">${
|
|
7210
|
+
<div id="icon-checked">${Uo}</div>
|
|
7211
|
+
<div id="icon-unchecked">${Hr}</div>
|
|
7692
7212
|
</div>
|
|
7693
|
-
`}},
|
|
7213
|
+
`}},n.UUIToggleElement.formAssociated=!0,n.UUIToggleElement.styles=[...ce.styles,$o,b`
|
|
7694
7214
|
:host {
|
|
7695
7215
|
--uui-toggle-size: 18px;
|
|
7696
7216
|
--uui-toggle-switch-width: calc(2 * var(--uui-toggle-size));
|
|
@@ -7837,7 +7357,7 @@
|
|
|
7837
7357
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
7838
7358
|
}
|
|
7839
7359
|
:host([disabled]) label:active #toggle {
|
|
7840
|
-
animation: ${
|
|
7360
|
+
animation: ${_o};
|
|
7841
7361
|
}
|
|
7842
7362
|
:host([disabled]) input:checked #toggle #icon-checked {
|
|
7843
7363
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
@@ -7854,7 +7374,7 @@
|
|
|
7854
7374
|
71
|
|
7855
7375
|
));
|
|
7856
7376
|
}
|
|
7857
|
-
`],
|
|
7377
|
+
`],n.UUIToggleElement=Vv([p("uui-toggle")],n.UUIToggleElement);var Hv=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIVisuallyHiddenElement=class extends g{render(){return h`<slot></slot>`}},n.UUIVisuallyHiddenElement.styles=[b`
|
|
7858
7378
|
:host(:not(:focus-within)) {
|
|
7859
7379
|
position: absolute !important;
|
|
7860
7380
|
width: 1px !important;
|
|
@@ -7866,5 +7386,5 @@
|
|
|
7866
7386
|
white-space: nowrap !important;
|
|
7867
7387
|
padding: 0 !important;
|
|
7868
7388
|
}
|
|
7869
|
-
`],
|
|
7389
|
+
`],n.UUIVisuallyHiddenElement=Hv([p("uui-visually-hidden")],n.UUIVisuallyHiddenElement),n.ActiveMixin=wc,n.LabelMixin=_c,n.PopoverTargetMixin=Rc,n.SelectOnlyMixin=Sc,n.SelectableMixin=Ec,n.Timer=Lc,n.UUIBlinkAnimationValue=pc,n.UUIBlinkKeyframes=dc,n.UUIBooleanInputElement=ce,n.UUIBooleanInputEvent=Br,n.UUIButtonInlineCreateEvent=en,n.UUICardEvent=Li,n.UUIColorAreaEvent=bn,n.UUIColorPickerChangeEvent=Di,n.UUIColorSliderEvent=Un,n.UUIColorSwatchesEvent=ji,n.UUIComboboxEvent=ve,n.UUIComboboxListEvent=me,n.UUICopyTextEvent=zi,n.UUIEvent=Tr,n.UUIFileDropzoneEvent=Wi,n.UUIFormControlEvent=dt,n.UUIFormControlMixin=Oc,n.UUIHorizontalPulseAnimationValue=mc,n.UUIHorizontalPulseKeyframes=bc,n.UUIHorizontalShakeAnimationValue=gc,n.UUIHorizontalShakeKeyframes=vc,n.UUIIconHost=Ln,n.UUIIconRegistry=Mn,n.UUIIconRegistryEssential=Ll,n.UUIIconRequestEvent=qi,n.UUIInputEvent=Ki,n.UUIInputLockEvent=Tn,n.UUIInterfaceColorValues=Wc,n.UUIInterfaceHeadingValues=qc,n.UUIInterfaceLookValues=Gc,n.UUIMenuItemEvent=ii,n.UUIModalCloseEndEvent=jl,n.UUIModalCloseEvent=ri,n.UUIModalElement=ue,n.UUIModalOpenEvent=Hl,n.UUIPaginationEvent=_t,n.UUIRadioEvent=Qi,n.UUIRadioGroupEvent=Yn,n.UUIRefEvent=to,n.UUISelectEvent=cs,n.UUISelectableEvent=Ui,n.UUISliderEvent=io,n.UUITabEvent=Cv,n.UUITabGroupEvent=Sv,n.UUITextStyles=Lt,n.UUITextareaEvent=ws,n.UUIToastNotificationEvent=fe,n.clamp=Tc,n.defineElement=Fc,n.demandCustomElement=Mc,n.drag=Nc,n.findAncestorByAttributeValue=ta,n.reverseNumberInRange=Bc,n.slotHasContent=Vc,n.toHex=Dc}));
|
|
7870
7390
|
//# sourceMappingURL=uui.min.js.map
|