@umbraco-ui/uui 1.17.0-rc.0 → 1.17.0-rc.2
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/custom-elements.json +39 -0
- package/dist/uui.min.js +1010 -437
- package/dist/uui.min.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +85 -85
- package/vscode-html-custom-data.json +18 -0
package/dist/uui.min.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(s,tt){typeof exports=="object"&&typeof module<"u"?tt(exports):typeof define=="function"&&define.amd?define(["exports"],tt):(s=typeof globalThis<"u"?globalThis:s||self,tt(s.uui={}))})(this,(function(s){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const tt=window,Nr=tt.ShadowRoot&&(tt.ShadyCSS===void 0||tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Br=Symbol(),Ys=new WeakMap;let Zs=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Br)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(Nr&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Ys.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ys.set(t,e))}return e}toString(){return this.cssText}};const be=i=>new Zs(typeof i=="string"?i:i+"",void 0,Br),v=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((r,o,n)=>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[n+1]),i[0]);return new Zs(t,i,Br)},gc=(i,e)=>{Nr?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((t=>{const r=document.createElement("style"),o=tt.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,i.appendChild(r)}))},Qs=Nr?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return be(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Vr;const Io=window,Js=Io.trustedTypes,fc=Js?Js.emptyScript:"",ea=Io.reactiveElementPolyfillSupport,Dr={toAttribute(i,e){switch(e){case Boolean:i=i?fc: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}},ta=(i,e)=>e!==i&&(e==e||i==i),jr={attribute:!0,type:String,converter:Dr,reflect:!1,hasChanged:ta},Hr="finalized";let jt=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=jr){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 n=this[e];this[t]=o,this.requestUpdate(e,n,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||jr}static finalize(){if(this.hasOwnProperty(Hr))return!1;this[Hr]=!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(Qs(o))}else e!==void 0&&t.push(Qs(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 gc(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=jr){var o;const n=this.constructor._$Ep(e,r);if(n!==void 0&&r.reflect===!0){const a=(((o=r.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?r.converter:Dr).toAttribute(t,r.type);this._$El=e,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$El=null}}_$AK(e,t){var r;const o=this.constructor,n=o._$Ev.get(e);if(n!==void 0&&this._$El!==n){const a=o.getPropertyOptions(n),u=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?a.converter:Dr;this._$El=n,this[n]=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||ta)(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,n)=>this[n]=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 n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.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){}};jt[Hr]=!0,jt.elementProperties=new Map,jt.elementStyles=[],jt.shadowRootOptions={mode:"open"},ea?.({ReactiveElement:jt}),((Vr=Io.reactiveElementVersions)!==null&&Vr!==void 0?Vr:Io.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 Rr;const Co=window,Ht=Co.trustedTypes,ia=Ht?Ht.createPolicy("lit-html",{createHTML:i=>i}):void 0,Fr="$lit$",it=`lit$${(Math.random()+"").slice(9)}$`,oa="?"+it,yc=`<${oa}>`,gt=document,So=()=>gt.createComment(""),zi=i=>i===null||typeof i!="object"&&typeof i!="function",ra=Array.isArray,wc=i=>ra(i)||typeof i?.[Symbol.iterator]=="function",Wr=`[
|
|
14
|
+
\f\r]`,Li=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,na=/-->/g,sa=/>/g,ft=RegExp(`>|${Wr}(?:([^\\s"'>=/]+)(${Wr}*=${Wr}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),aa=/'/g,la=/"/g,ua=/^(?:script|style|textarea|title)$/i,_c=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),$c=_c(1),te=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),ca=new WeakMap,yt=gt.createTreeWalker(gt,129,null,!1);function ha(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ia!==void 0?ia.createHTML(e):e}const kc=(i,e)=>{const t=i.length-1,r=[];let o,n=e===2?"<svg>":"",a=Li;for(let u=0;u<t;u++){const c=i[u];let d,b,g=-1,y=0;for(;y<c.length&&(a.lastIndex=y,b=a.exec(c),b!==null);)y=a.lastIndex,a===Li?b[1]==="!--"?a=na:b[1]!==void 0?a=sa:b[2]!==void 0?(ua.test(b[2])&&(o=RegExp("</"+b[2],"g")),a=ft):b[3]!==void 0&&(a=ft):a===ft?b[0]===">"?(a=o??Li,g=-1):b[1]===void 0?g=-2:(g=a.lastIndex-b[2].length,d=b[1],a=b[3]===void 0?ft:b[3]==='"'?la:aa):a===la||a===aa?a=ft:a===na||a===sa?a=Li:(a=ft,o=void 0);const $=a===ft&&i[u+1].startsWith("/>")?" ":"";n+=a===Li?c+yc:g>=0?(r.push(d),c.slice(0,g)+Fr+c.slice(g)+it+$):c+it+(g===-2?(r.push(void 0),u):$)}return[ha(i,n+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let Gr=class pc{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let n=0,a=0;const u=e.length-1,c=this.parts,[d,b]=kc(e,t);if(this.el=pc.createElement(d,r),yt.currentNode=this.el.content,t===2){const g=this.el.content,y=g.firstChild;y.remove(),g.append(...y.childNodes)}for(;(o=yt.nextNode())!==null&&c.length<u;){if(o.nodeType===1){if(o.hasAttributes()){const g=[];for(const y of o.getAttributeNames())if(y.endsWith(Fr)||y.startsWith(it)){const $=b[a++];if(g.push(y),$!==void 0){const x=o.getAttribute($.toLowerCase()+Fr).split(it),A=/([.?@])?(.*)/.exec($);c.push({type:1,index:n,name:A[2],strings:x,ctor:A[1]==="."?Ec:A[1]==="?"?Ic:A[1]==="@"?Cc:Ao})}else c.push({type:6,index:n})}for(const y of g)o.removeAttribute(y)}if(ua.test(o.tagName)){const g=o.textContent.split(it),y=g.length-1;if(y>0){o.textContent=Ht?Ht.emptyScript:"";for(let $=0;$<y;$++)o.append(g[$],So()),yt.nextNode(),c.push({type:2,index:++n});o.append(g[y],So())}}}else if(o.nodeType===8)if(o.data===oa)c.push({type:2,index:n});else{let g=-1;for(;(g=o.data.indexOf(it,g+1))!==-1;)c.push({type:7,index:n}),g+=it.length-1}n++}}static createElement(e,t){const r=gt.createElement("template");return r.innerHTML=e,r}};function Rt(i,e,t=i,r){var o,n,a,u;if(e===te)return e;let c=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=zi(e)?void 0:e._$litDirective$;return c?.constructor!==d&&((n=c?._$AO)===null||n===void 0||n.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=Rt(i,c._$AS(i,e.values),c,r)),e}let Uc=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,n=((t=e?.creationScope)!==null&&t!==void 0?t:gt).importNode(r,!0);yt.currentNode=n;let a=yt.nextNode(),u=0,c=0,d=o[0];for(;d!==void 0;){if(u===d.index){let b;d.type===2?b=new qr(a,a.nextSibling,this,e):d.type===1?b=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(b=new Sc(a,this,e)),this._$AV.push(b),d=o[++c]}u!==d?.index&&(a=yt.nextNode(),u++)}return yt.currentNode=gt,n}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++}},qr=class bc{constructor(e,t,r,o){var n;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(n=o?.isConnected)===null||n===void 0||n}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=Rt(this,e,t),zi(e)?e===N||e==null||e===""?(this._$AH!==N&&this._$AR(),this._$AH=N):e!==this._$AH&&e!==te&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):wc(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&&zi(this._$AH)?this._$AA.nextSibling.data=e:this.$(gt.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,n=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Gr.createElement(ha(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===n)this._$AH.v(r);else{const a=new Uc(n,this),u=a.u(this.options);a.v(r),this.$(u),this._$AH=a}}_$AC(e){let t=ca.get(e.strings);return t===void 0&&ca.set(e.strings,t=new Gr(e)),t}T(e){ra(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const n of e)o===t.length?t.push(r=new bc(this.k(So()),this.k(So()),this,this.options)):r=t[o],r._$AI(n),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))}},Ao=class{constructor(e,t,r,o,n){this.type=1,this._$AH=N,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=n,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 n=this.strings;let a=!1;if(n===void 0)e=Rt(this,e,t,0),a=!zi(e)||e!==this._$AH&&e!==te,a&&(this._$AH=e);else{const u=e;let c,d;for(e=n[0],c=0;c<n.length-1;c++)d=Rt(this,u[r+c],t,c),d===te&&(d=this._$AH[c]),a||(a=!zi(d)||d!==this._$AH[c]),d===N?e=N:e!==N&&(e+=(d??"")+n[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??"")}},Ec=class extends Ao{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===N?void 0:e}};const xc=Ht?Ht.emptyScript:"";let Ic=class extends Ao{constructor(){super(...arguments),this.type=4}j(e){e&&e!==N?this.element.setAttribute(this.name,xc):this.element.removeAttribute(this.name)}},Cc=class extends Ao{constructor(e,t,r,o,n){super(e,t,r,o,n),this.type=5}_$AI(e,t=this){var r;if((e=(r=Rt(this,e,t,0))!==null&&r!==void 0?r:N)===te)return;const o=this._$AH,n=e===N&&o!==N||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==N&&(o===N||n);n&&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)}},Sc=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){Rt(this,e)}};const Ac={I:qr},da=Co.litHtmlPolyfillSupport;da?.(Gr,qr),((Rr=Co.litHtmlVersions)!==null&&Rr!==void 0?Rr:Co.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 Kr;const Po=window,Ft=Po.trustedTypes,pa=Ft?Ft.createPolicy("lit-html",{createHTML:i=>i}):void 0,Xr="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,ba="?"+ot,Pc=`<${ba}>`,wt=document,Oi=()=>wt.createComment(""),Ti=i=>i===null||typeof i!="object"&&typeof i!="function",va=Array.isArray,Mc=i=>va(i)||typeof i?.[Symbol.iterator]=="function",Yr=`[
|
|
20
|
+
\f\r]`,Ni=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ma=/-->/g,ga=/>/g,_t=RegExp(`>|${Yr}(?:([^\\s"'>=/]+)(${Yr}*=${Yr}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),fa=/'/g,ya=/"/g,wa=/^(?:script|style|textarea|title)$/i,_a=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),h=_a(1),p=_a(2),Wt=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),$a=new WeakMap,$t=wt.createTreeWalker(wt,129,null,!1);function ka(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return pa!==void 0?pa.createHTML(e):e}const zc=(i,e)=>{const t=i.length-1,r=[];let o,n=e===2?"<svg>":"",a=Ni;for(let u=0;u<t;u++){const c=i[u];let d,b,g=-1,y=0;for(;y<c.length&&(a.lastIndex=y,b=a.exec(c),b!==null);)y=a.lastIndex,a===Ni?b[1]==="!--"?a=ma:b[1]!==void 0?a=ga:b[2]!==void 0?(wa.test(b[2])&&(o=RegExp("</"+b[2],"g")),a=_t):b[3]!==void 0&&(a=_t):a===_t?b[0]===">"?(a=o??Ni,g=-1):b[1]===void 0?g=-2:(g=a.lastIndex-b[2].length,d=b[1],a=b[3]===void 0?_t:b[3]==='"'?ya:fa):a===ya||a===fa?a=_t:a===ma||a===ga?a=Ni:(a=_t,o=void 0);const $=a===_t&&i[u+1].startsWith("/>")?" ":"";n+=a===Ni?c+Pc:g>=0?(r.push(d),c.slice(0,g)+Xr+c.slice(g)+ot+$):c+ot+(g===-2?(r.push(void 0),u):$)}return[ka(i,n+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let Zr=class vc{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let n=0,a=0;const u=e.length-1,c=this.parts,[d,b]=zc(e,t);if(this.el=vc.createElement(d,r),$t.currentNode=this.el.content,t===2){const g=this.el.content,y=g.firstChild;y.remove(),g.append(...y.childNodes)}for(;(o=$t.nextNode())!==null&&c.length<u;){if(o.nodeType===1){if(o.hasAttributes()){const g=[];for(const y of o.getAttributeNames())if(y.endsWith(Xr)||y.startsWith(ot)){const $=b[a++];if(g.push(y),$!==void 0){const x=o.getAttribute($.toLowerCase()+Xr).split(ot),A=/([.?@])?(.*)/.exec($);c.push({type:1,index:n,name:A[2],strings:x,ctor:A[1]==="."?Oc:A[1]==="?"?Nc:A[1]==="@"?Bc:Mo})}else c.push({type:6,index:n})}for(const y of g)o.removeAttribute(y)}if(wa.test(o.tagName)){const g=o.textContent.split(ot),y=g.length-1;if(y>0){o.textContent=Ft?Ft.emptyScript:"";for(let $=0;$<y;$++)o.append(g[$],Oi()),$t.nextNode(),c.push({type:2,index:++n});o.append(g[y],Oi())}}}else if(o.nodeType===8)if(o.data===ba)c.push({type:2,index:n});else{let g=-1;for(;(g=o.data.indexOf(ot,g+1))!==-1;)c.push({type:7,index:n}),g+=ot.length-1}n++}}static createElement(e,t){const r=wt.createElement("template");return r.innerHTML=e,r}};function Gt(i,e,t=i,r){var o,n,a,u;if(e===Wt)return e;let c=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=Ti(e)?void 0:e._$litDirective$;return c?.constructor!==d&&((n=c?._$AO)===null||n===void 0||n.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=Gt(i,c._$AS(i,e.values),c,r)),e}let Lc=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,n=((t=e?.creationScope)!==null&&t!==void 0?t:wt).importNode(r,!0);$t.currentNode=n;let a=$t.nextNode(),u=0,c=0,d=o[0];for(;d!==void 0;){if(u===d.index){let b;d.type===2?b=new Qr(a,a.nextSibling,this,e):d.type===1?b=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(b=new Vc(a,this,e)),this._$AV.push(b),d=o[++c]}u!==d?.index&&(a=$t.nextNode(),u++)}return $t.currentNode=wt,n}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++}},Qr=class mc{constructor(e,t,r,o){var n;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(n=o?.isConnected)===null||n===void 0||n}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=Gt(this,e,t),Ti(e)?e===C||e==null||e===""?(this._$AH!==C&&this._$AR(),this._$AH=C):e!==this._$AH&&e!==Wt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Mc(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&&Ti(this._$AH)?this._$AA.nextSibling.data=e:this.$(wt.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,n=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Zr.createElement(ka(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===n)this._$AH.v(r);else{const a=new Lc(n,this),u=a.u(this.options);a.v(r),this.$(u),this._$AH=a}}_$AC(e){let t=$a.get(e.strings);return t===void 0&&$a.set(e.strings,t=new Zr(e)),t}T(e){va(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const n of e)o===t.length?t.push(r=new mc(this.k(Oi()),this.k(Oi()),this,this.options)):r=t[o],r._$AI(n),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))}},Mo=class{constructor(e,t,r,o,n){this.type=1,this._$AH=C,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=n,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 n=this.strings;let a=!1;if(n===void 0)e=Gt(this,e,t,0),a=!Ti(e)||e!==this._$AH&&e!==Wt,a&&(this._$AH=e);else{const u=e;let c,d;for(e=n[0],c=0;c<n.length-1;c++)d=Gt(this,u[r+c],t,c),d===Wt&&(d=this._$AH[c]),a||(a=!Ti(d)||d!==this._$AH[c]),d===C?e=C:e!==C&&(e+=(d??"")+n[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??"")}},Oc=class extends Mo{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===C?void 0:e}};const Tc=Ft?Ft.emptyScript:"";let Nc=class extends Mo{constructor(){super(...arguments),this.type=4}j(e){e&&e!==C?this.element.setAttribute(this.name,Tc):this.element.removeAttribute(this.name)}},Bc=class extends Mo{constructor(e,t,r,o,n){super(e,t,r,o,n),this.type=5}_$AI(e,t=this){var r;if((e=(r=Gt(this,e,t,0))!==null&&r!==void 0?r:C)===Wt)return;const o=this._$AH,n=e===C&&o!==C||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==C&&(o===C||n);n&&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)}},Vc=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){Gt(this,e)}};const Ua=Po.litHtmlPolyfillSupport;Ua?.(Zr,Qr),((Kr=Po.litHtmlVersions)!==null&&Kr!==void 0?Kr:Po.litHtmlVersions=[]).push("2.8.0");const Dc=(i,e,t)=>{var r,o;const n=(r=t?.renderBefore)!==null&&r!==void 0?r:e;let a=n._$litPart$;if(a===void 0){const u=(o=t?.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=a=new Qr(e.insertBefore(Oi(),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 Jr,en;let f=class extends jt{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=Dc(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 Wt}};f.finalized=!0,f._$litElement$=!0,(Jr=globalThis.litElementHydrateSupport)===null||Jr===void 0||Jr.call(globalThis,{LitElement:f});const Ea=globalThis.litElementPolyfillSupport;Ea?.({LitElement:f}),((en=globalThis.litElementVersions)!==null&&en!==void 0?en: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 jc=(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)}},Hc=(i,e,t)=>{e.constructor.createProperty(t,i)};function l(i){return(e,t)=>t!==void 0?Hc(i,e,t):jc(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 tn=({finisher:i,descriptor:e})=>(t,r)=>{var o;if(r===void 0){const n=(o=t.originalKey)!==null&&o!==void 0?o:t.key,a=e!=null?{kind:"method",placement:"prototype",key:n,descriptor:e(t.key)}:{...t,key:n};return i!=null&&(a.finisher=function(u){i(u,n)}),a}{const n=t.constructor;e!==void 0&&Object.defineProperty(t,r,e(r)),i?.(n,r)}};/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/function
|
|
41
|
+
*/function S(i,e){return tn({descriptor:t=>({get(){var o,n;return(n=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(i))!==null&&n!==void 0?n: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 Rc(i){return tn({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 on;const Fc=((on=window.HTMLSlotElement)===null||on===void 0?void 0:on.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function Be(i){const{slot:e,selector:t}=i??{};return tn({descriptor:r=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(n),u=a!=null?Fc(a,i):[];return t?u.filter((c=>c.matches(t))):u},enumerable:!0,configurable:!0})})}var Wc=`.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 qt=be(Wc),Gc=v`
|
|
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
|
+
`,qc=be("uui-blink 0.9s infinite both"),Kc=v`
|
|
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
|
+
`,Xc=be("pulse 0.8s ease-in-out infinite both"),Yc=v`
|
|
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
|
-
`,
|
|
300
|
-
${this._labelSlotHasContent===!1?
|
|
299
|
+
`,Zc=be("uui-horizontal-shake 600ms ease backwards");let rn=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},kt=class extends rn{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Bi=class extends rn{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Qc=Object.defineProperty,Jc=(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&&Qc(e,t,o),o};const eh=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Jc([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var th=Object.defineProperty,xa=(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&&th(e,t,o),o};const ih=(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
|
+
${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 xa([l({type:String})],t.prototype,"label"),xa([w()],t.prototype,"_labelSlotHasContent"),t};var oh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Ia=(i,e,t,r)=>{for(var o=r>1?void 0:r?rh(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&&oh(e,t,o),o};const nh=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 Bi(Bi.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new Bi(Bi.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return Ia([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Ia([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var sh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,lh=(i,e,t,r)=>{for(var o=ah(e,t),n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(e,t,o)||o);return o&&sh(e,t,o),o};const uh=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 lh([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};var ch=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Ut=(i,e,t,r)=>{for(var o=r>1?void 0:r?hh(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&&ch(e,t,o),o};const dh=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],ph=(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:dh.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(kt.INVALID,()=>{this._runValidators()}),o.addEventListener(kt.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 kt(kt.VALID)):this.dispatchEvent(new kt(kt.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 Ut([l({type:String})],t.prototype,"name",2),Ut([l()],t.prototype,"value",1),Ut([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Ut([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Ut([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Ut([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Ut([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t};let bh=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 vh=(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)},mh=(i,e)=>{function t(o){const n=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,u=n.left+a.scrollX,c=n.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 b=d.pageX-u,g=d.pageY-c;e?.onMove&&e.onMove(b,g)}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)},gh=(i,e,t)=>Math.min(Math.max(i,e),t),fh=(i,e,t)=>t+e-i,yh=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},Ca=(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};function wh(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var _h=Object.defineProperty,$h=(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&&_h(e,t,o),o};const kh=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=Ca(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 $h([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};function Uh(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 Eh=["default","primary","secondary","outline","placeholder"],xh=["default","positive","warning","danger","invalid"],Ih=["h1","h2","h3","h4","h5","h6"];function m(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 Ch=(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.UUIButtonGroupElement=class extends f{render(){return h`<slot></slot>`}},s.UUIButtonGroupElement.styles=[v`
|
|
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
|
+
`],s.UUIButtonGroupElement=Ch([m("uui-button-group")],s.UUIButtonGroupElement);var Sh=(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.UUIActionBarElement=class extends s.UUIButtonGroupElement{},s.UUIActionBarElement.styles=[...s.UUIButtonGroupElement.styles,v`
|
|
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
|
+
`],s.UUIActionBarElement=Sh([m("uui-action-bar")],s.UUIActionBarElement);var Ah=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,zo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ph(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&&Ah(e,t,o),o};s.UUIAvatarGroupElement=class extends f{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
|
-
${this._isLimitExceeded()?
|
|
381
|
-
`}},
|
|
380
|
+
${this._isLimitExceeded()?h`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}
|
|
381
|
+
`}},s.UUIAvatarGroupElement.styles=[v`
|
|
382
382
|
:host {
|
|
383
383
|
display: inline-flex;
|
|
384
384
|
align-items: center;
|
|
@@ -395,15 +395,15 @@
|
|
|
395
395
|
#overflow-indication {
|
|
396
396
|
margin-left: 6px;
|
|
397
397
|
}
|
|
398
|
-
`],
|
|
398
|
+
`],zo([Be({selector:"uui-avatar, [uui-avatar]",flatten:!0})],s.UUIAvatarGroupElement.prototype,"_avatarNodes",2),zo([w()],s.UUIAvatarGroupElement.prototype,"_avatarArray",2),zo([l({type:Number,attribute:!0})],s.UUIAvatarGroupElement.prototype,"limit",2),s.UUIAvatarGroupElement=zo([m("uui-avatar-group")],s.UUIAvatarGroupElement);var Mh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,Kt=(i,e,t,r)=>{for(var o=r>1?void 0:r?zh(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&&Mh(e,t,o),o};s.UUIAvatarElement=class extends f{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}"
|
|
402
|
-
title="${this.name}" />`}render(){return
|
|
402
|
+
title="${this.name}" />`}render(){return h`
|
|
403
403
|
${this.imgSrc?this.renderImage():""}
|
|
404
404
|
${this.imgSrc?"":this._initials}
|
|
405
405
|
<slot></slot>
|
|
406
|
-
`}},
|
|
406
|
+
`}},s.UUIAvatarElement.styles=[v`
|
|
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
|
+
`],Kt([l({type:Boolean,attribute:!0,reflect:!0})],s.UUIAvatarElement.prototype,"overflow",2),Kt([l({type:String,attribute:"img-src"})],s.UUIAvatarElement.prototype,"imgSrc",2),Kt([l({type:String,attribute:"img-srcset"})],s.UUIAvatarElement.prototype,"imgSrcset",2),Kt([l({type:String,reflect:!0})],s.UUIAvatarElement.prototype,"name",2),Kt([l({type:String})],s.UUIAvatarElement.prototype,"initials",2),s.UUIAvatarElement=Kt([m("uui-avatar")],s.UUIAvatarElement);var Lh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,Lo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Oh(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&&Lh(e,t,o),o};s.UUIBadgeElement=class extends f{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return h` <slot></slot> `}},s.UUIBadgeElement.styles=[v`
|
|
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
|
-
`],
|
|
569
|
-
${this._labelSlotHasContent===!1?
|
|
568
|
+
`],Lo([l({reflect:!0})],s.UUIBadgeElement.prototype,"color",2),Lo([l({reflect:!0})],s.UUIBadgeElement.prototype,"look",2),Lo([l({type:Boolean,reflect:!0})],s.UUIBadgeElement.prototype,"attention",2),s.UUIBadgeElement=Lo([m("uui-badge")],s.UUIBadgeElement);var Th=Object.defineProperty,Nh=(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&&Th(e,t,o),o};const Vi=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Nh([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var Bh=Object.defineProperty,Sa=(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&&Bh(e,t,o),o};const Ee=(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
|
+
${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 Ts([l({type:String})],t.prototype,"label"),Ts([w()],t.prototype,"_labelSlotHasContent"),t};let Tc=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},io=class extends Tc{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Nc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,Ns=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bc(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&&Nc(e,t,o),o};const It=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 io(io.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new io(io.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return Ns([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Ns([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Dc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,Hc=(i,e,t,r)=>{for(var o=Vc(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Dc(e,t,o),o};const oo=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 Hc([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};let Bs=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Ct=class extends Bs{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},fv=class extends Bs{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var jc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,nt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rc(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&&jc(e,t,o),o};const Fc=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],ge=(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:Fc.indexOf(o)};return this.#r.push(u),this.#r.sort((h,d)=>h.weight>d.weight?1:d.weight>h.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(Ct.INVALID,()=>{this._runValidators()}),o.addEventListener(Ct.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 h;for(h in u.validity)if(h!=="valid"&&u.validity[h])return this.#e[h]=!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 Ct(Ct.VALID)):this.dispatchEvent(new Ct(Ct.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 nt([l({type:String})],t.prototype,"name",2),nt([l()],t.prototype,"value",1),nt([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),nt([l({type:Boolean,reflect:!0})],t.prototype,"required",2),nt([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),nt([l({type:Boolean,reflect:!0})],t.prototype,"error",2),nt([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},Gc=(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 Wc=Object.defineProperty,qc=(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&&Wc(e,t,o),o};const Kc=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=Gc(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 qc([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};let P=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},ro=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},St=class extends P{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}},_r=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Xc=Object.defineProperty,Yc=Object.getOwnPropertyDescriptor,At=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yc(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&&Xc(e,t,o),o};let le=class extends ge(ve("",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 _r(_r.CHANGE))}render(){return c`
|
|
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`
|
|
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=[v`
|
|
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
|
+
`]}};Qt([l({type:String,attribute:"label-position",reflect:!0})],ve.prototype,"labelPosition",2),Qt([l({type:Boolean})],ve.prototype,"checked",1),Qt([l({type:Boolean,reflect:!0})],ve.prototype,"indeterminate",2),Qt([l({type:Boolean,reflect:!0})],ve.prototype,"disabled",2),Qt([l({type:Boolean,reflect:!0})],ve.prototype,"readonly",2),Qt([S("#input")],ve.prototype,"_input",2);/**
|
|
643
643
|
* @license
|
|
644
644
|
* Copyright 2020 Google LLC
|
|
645
645
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
646
|
-
*/const
|
|
646
|
+
*/const Ma=Symbol.for(""),ed=i=>{if(i?.r===Ma)return i?._$litStatic$},za=i=>({_$litStatic$:i,r:Ma}),La=new Map,td=i=>(e,...t)=>{const r=t.length;let o,n;const a=[],u=[];let c,d=0,b=!1;for(;d<r;){for(c=e[d];d<r&&(n=t[d],(o=ed(n))!==void 0);)c+=o+e[++d],b=!0;d!==r&&u.push(n),a.push(c),d++}if(d===r&&a.push(e[r]),b){const g=a.join("$$lit$$");(e=La.get(g))===void 0&&(a.raw=a,La.set(g,e=a)),t=u}return i(e,...t)},Oa=td($c);var id=Object.defineProperty,od=Object.getOwnPropertyDescriptor,xt=(i,e,t,r)=>{for(var o=r>1?void 0:r?od(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&&id(e,t,o),o};function sn(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}s.UUIBoxElement=class extends f{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag="h5",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=sn(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=sn(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=sn(e.target)}}set headlineVariant(e){this._headlineVariantTag=e}get headlineVariant(){return this._headlineVariantTag}renderHeader(){return Oa`<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
|
+
<${za(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
|
+
</${za(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 Oa`
|
|
660
660
|
${this.renderHeader()}
|
|
661
661
|
<slot></slot>
|
|
662
|
-
`}},
|
|
662
|
+
`}},s.UUIBoxElement.styles=[qt,v`
|
|
663
663
|
:host {
|
|
664
664
|
display: block;
|
|
665
665
|
border: var(--uui-box-border-width, 0) solid
|
|
@@ -689,7 +689,574 @@
|
|
|
689
689
|
display: block;
|
|
690
690
|
margin-left: auto;
|
|
691
691
|
}
|
|
692
|
-
`],
|
|
692
|
+
`],xt([l({type:String})],s.UUIBoxElement.prototype,"headline",2),xt([l({attribute:"headline-variant"})],s.UUIBoxElement.prototype,"headlineVariant",1),xt([w()],s.UUIBoxElement.prototype,"_headlineVariantTag",2),xt([w()],s.UUIBoxElement.prototype,"_headlineSlotHasContent",2),xt([w()],s.UUIBoxElement.prototype,"_headerSlotHasContent",2),xt([w()],s.UUIBoxElement.prototype,"_headerActionsSlotHasContent",2),s.UUIBoxElement=xt([m("uui-box")],s.UUIBoxElement);function Bo(i,e){return t=>{if(i.indexOf("-")>0===!1){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 Jt=(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)},rd=(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};/**
|
|
693
|
+
* @license
|
|
694
|
+
* Copyright 2017 Google LLC
|
|
695
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
696
|
+
*/const me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},ei=i=>(...e)=>({_$litDirective$:i,values:e});let ti=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
|
+
* @license
|
|
698
|
+
* Copyright 2020 Google LLC
|
|
699
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
700
|
+
*/const{I:nd}=Ac,Ta=i=>i.strings===void 0,Na=()=>document.createComment(""),Di=(i,e,t)=>{var r;const o=i._$AA.parentNode,n=e===void 0?i._$AB:e._$AA;if(t===void 0){const a=o.insertBefore(Na(),n),u=o.insertBefore(Na(),n);t=new nd(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!==n||c){let d=t._$AA;for(;d!==a;){const b=d.nextSibling;o.insertBefore(d,n),d=b}}}return t},It=(i,e,t=i)=>(i._$AI(e,t),i),sd={},Ba=(i,e=sd)=>i._$AH=e,ad=i=>i._$AH,an=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
|
+
* @license
|
|
702
|
+
* Copyright 2017 Google LLC
|
|
703
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
704
|
+
*/const Va=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},Vo=ei(class extends ti{constructor(i){if(super(i),i.type!==me.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=[],n=[];let a=0;for(const u of i)o[a]=r?r(u,a):a,n[a]=t(u,a),a++;return{values:n,keys:o}}render(i,e,t){return this.ct(i,e,t).values}update(i,[e,t,r]){var o;const n=ad(i),{values:a,keys:u}=this.ct(e,t,r);if(!Array.isArray(n))return this.ut=u,a;const c=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],d=[];let b,g,y=0,$=n.length-1,x=0,A=a.length-1;for(;y<=$&&x<=A;)if(n[y]===null)y++;else if(n[$]===null)$--;else if(c[y]===u[x])d[x]=It(n[y],a[x]),y++,x++;else if(c[$]===u[A])d[A]=It(n[$],a[A]),$--,A--;else if(c[y]===u[A])d[A]=It(n[y],a[A]),Di(i,d[A+1],n[y]),y++,A--;else if(c[$]===u[x])d[x]=It(n[$],a[x]),Di(i,n[y],n[$]),$--,x++;else if(b===void 0&&(b=Va(u,x,A),g=Va(c,y,$)),b.has(c[y]))if(b.has(c[$])){const K=g.get(u[x]),Ue=K!==void 0?n[K]:null;if(Ue===null){const pe=Di(i,n[y]);It(pe,a[x]),d[x]=pe}else d[x]=It(Ue,a[x]),Di(i,n[y],Ue),n[K]=null;x++}else an(n[$]),$--;else an(n[y]),y++;for(;x<=A;){const K=Di(i,d[A+1]);It(K,a[x]),d[x++]=K}for(;y<=$;){const K=n[y++];K!==null&&an(K)}return this.ut=u,Ba(i,d),te}});v`
|
|
705
|
+
@keyframes uui-blink {
|
|
706
|
+
0%,
|
|
707
|
+
100% {
|
|
708
|
+
opacity: 0.5;
|
|
709
|
+
}
|
|
710
|
+
50% {
|
|
711
|
+
opacity: 1;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
`,be("uui-blink 0.9s infinite both"),v`
|
|
715
|
+
@keyframes pulse {
|
|
716
|
+
0% {
|
|
717
|
+
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
718
|
+
transform: translate(-50%, -50%) scale(0.2);
|
|
719
|
+
opacity: 0.9;
|
|
720
|
+
}
|
|
721
|
+
80% {
|
|
722
|
+
-webkit-transform: translate(-50%, -50%) scale(1.2);
|
|
723
|
+
transform: translate(-50%, -50%) scale(1.2);
|
|
724
|
+
opacity: 0;
|
|
725
|
+
}
|
|
726
|
+
100% {
|
|
727
|
+
-webkit-transform: translate(-50%, -50%) scale(2.2);
|
|
728
|
+
transform: translate(-50%, -50%) scale(2.2);
|
|
729
|
+
opacity: 0;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
`,be("pulse 0.8s ease-in-out infinite both");const ld=v`
|
|
733
|
+
@keyframes uui-horizontal-shake {
|
|
734
|
+
10%,
|
|
735
|
+
90% {
|
|
736
|
+
transform: translateX(-1px);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
20%,
|
|
740
|
+
80% {
|
|
741
|
+
transform: translateX(1px);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
30%,
|
|
745
|
+
50%,
|
|
746
|
+
70% {
|
|
747
|
+
transform: translateX(-2px);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
40%,
|
|
751
|
+
60% {
|
|
752
|
+
transform: translateX(2px);
|
|
753
|
+
}
|
|
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>`;/**
|
|
763
|
+
* @license
|
|
764
|
+
* Copyright 2018 Google LLC
|
|
765
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
766
|
+
*/const _=i=>i??N;var kd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,Ha=i=>{throw TypeError(i)},re=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ud(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&&kd(e,t,o),o},Ra=(i,e,t)=>e.has(i)||Ha("Cannot "+t),Ed=(i,e,t)=>(Ra(i,e,"read from private field"),e.get(i)),xd=(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),Id=(i,e,t,r)=>(Ra(i,e,"write to private field"),e.set(i,t),t),Do;let J=class extends md(hd("",wd(f))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",xd(this,Do),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(i){if(this.disabled){i.preventDefault(),i.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(i){super.updated(i),i.has("state")&&(clearTimeout(Ed(this,Do)),(this.state==="success"||this.state==="failed")&&Id(this,Do,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let i;switch(this.state){case"waiting":Jt(this,"uui-loader-circle"),i=h`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":Jt(this,"uui-icon"),i=h`<uui-icon
|
|
767
|
+
name="check"
|
|
768
|
+
.fallback=${_d.strings[0]}></uui-icon>`;break;case"failed":Jt(this,"uui-icon"),i=h`<uui-icon
|
|
769
|
+
name="wrong"
|
|
770
|
+
.fallback=${$d.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${i}</div>`}render(){return this.href?h`
|
|
771
|
+
<a
|
|
772
|
+
id="button"
|
|
773
|
+
aria-label=${_(this.label)}
|
|
774
|
+
title=${_(this.title===""?void 0:this.title)}
|
|
775
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
776
|
+
target=${_(this.target||void 0)}
|
|
777
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
778
|
+
${this.renderState()} ${this.renderLabel()}
|
|
779
|
+
<slot name="extra"></slot>
|
|
780
|
+
</a>
|
|
781
|
+
`:h`
|
|
782
|
+
<button
|
|
783
|
+
id="button"
|
|
784
|
+
type=${this.type}
|
|
785
|
+
?disabled=${this.disabled}
|
|
786
|
+
aria-label=${_(this.label)}
|
|
787
|
+
title=${_(this.title===""?void 0:this.title)}>
|
|
788
|
+
${this.renderState()} ${this.renderLabel()}
|
|
789
|
+
<slot name="extra"></slot>
|
|
790
|
+
</button>
|
|
791
|
+
`}};Do=new WeakMap,J.styles=[ld,v`
|
|
792
|
+
:host {
|
|
793
|
+
position: relative;
|
|
794
|
+
display: inline-flex;
|
|
795
|
+
margin-left: calc(var(--uui-button-merge-border-left, 0) * -1px);
|
|
796
|
+
--uui-button-padding-left-factor: 3;
|
|
797
|
+
--uui-button-padding-right-factor: 3;
|
|
798
|
+
--uui-button-padding-top-factor: 1;
|
|
799
|
+
--uui-button-padding-bottom-factor: 1;
|
|
800
|
+
|
|
801
|
+
min-height: var(--uui-button-height, var(--uui-size-11,33px));
|
|
802
|
+
max-height: 100%;
|
|
803
|
+
cursor: pointer;
|
|
804
|
+
|
|
805
|
+
text-align: center;
|
|
806
|
+
font-size: var(--uui-button-font-size, inherit);
|
|
807
|
+
font-weight: var(--uui-button-font-weight, 500);
|
|
808
|
+
transition:
|
|
809
|
+
background-color 80ms,
|
|
810
|
+
border-color 80ms,
|
|
811
|
+
color 80ms;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
:host([compact]) {
|
|
815
|
+
--uui-button-padding-left-factor: 1;
|
|
816
|
+
--uui-button-padding-right-factor: 1;
|
|
817
|
+
--uui-button-padding-top-factor: 0;
|
|
818
|
+
--uui-button-padding-bottom-factor: 0;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.label {
|
|
822
|
+
line-height: 1; /** needed to reset 'a > span' */
|
|
823
|
+
transition: opacity 120ms;
|
|
824
|
+
display: flex;
|
|
825
|
+
gap: var(--uui-size-1,3px);
|
|
826
|
+
align-items: center;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
:host([state]:not([state=''])) .label {
|
|
830
|
+
opacity: 0;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
#state {
|
|
834
|
+
position: absolute;
|
|
835
|
+
opacity: 0;
|
|
836
|
+
animation-name: fadeIn;
|
|
837
|
+
animation-delay: 40ms;
|
|
838
|
+
animation-duration: 360ms;
|
|
839
|
+
animation-fill-mode: forwards;
|
|
840
|
+
display: flex;
|
|
841
|
+
justify-content: center;
|
|
842
|
+
width: 100%;
|
|
843
|
+
height: 100%;
|
|
844
|
+
align-items: center;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
#button {
|
|
848
|
+
width: 100%;
|
|
849
|
+
background-color: transparent;
|
|
850
|
+
color: inherit;
|
|
851
|
+
font-size: inherit;
|
|
852
|
+
border-radius: inherit;
|
|
853
|
+
font-family: inherit;
|
|
854
|
+
font-weight: inherit;
|
|
855
|
+
text-align: inherit;
|
|
856
|
+
border: none;
|
|
857
|
+
cursor: inherit;
|
|
858
|
+
|
|
859
|
+
display: inline-flex;
|
|
860
|
+
align-items: center;
|
|
861
|
+
justify-content: var(--uui-button-content-align, center);
|
|
862
|
+
|
|
863
|
+
/* for anchor tag: */
|
|
864
|
+
text-decoration: none;
|
|
865
|
+
color: currentColor;
|
|
866
|
+
line-height: inherit;
|
|
867
|
+
|
|
868
|
+
border-width: var(--uui-button-border-width, 1px);
|
|
869
|
+
border-style: solid;
|
|
870
|
+
border-radius: var(
|
|
871
|
+
--uui-button-border-radius,
|
|
872
|
+
var(--uui-border-radius,3px)
|
|
873
|
+
);
|
|
874
|
+
cursor: pointer;
|
|
875
|
+
|
|
876
|
+
padding: calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor))
|
|
877
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor))
|
|
878
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor))
|
|
879
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));
|
|
880
|
+
|
|
881
|
+
box-shadow: none;
|
|
882
|
+
|
|
883
|
+
transition: var(--uui-button-transition, none);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
#button:focus-visible {
|
|
887
|
+
outline: 2px solid var(--uui-focus-outline-color, var(--color-emphasis));
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
button[disabled]:active,
|
|
891
|
+
a:not([href]):active {
|
|
892
|
+
animation: ${ud};
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/* ANIMATIONS */
|
|
896
|
+
@keyframes fadeIn {
|
|
897
|
+
0% {
|
|
898
|
+
opacity: 0;
|
|
899
|
+
}
|
|
900
|
+
100% {
|
|
901
|
+
opacity: 1;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
@keyframes fadeOut {
|
|
906
|
+
0% {
|
|
907
|
+
opacity: 1;
|
|
908
|
+
}
|
|
909
|
+
100% {
|
|
910
|
+
opacity: 0;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
#icon-check,
|
|
915
|
+
#icon-wrong {
|
|
916
|
+
display: grid;
|
|
917
|
+
place-items: center;
|
|
918
|
+
width: 1.5em;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
#loader {
|
|
922
|
+
font-size: 1.5em;
|
|
923
|
+
}
|
|
924
|
+
:host([look]:not([look=''])) #loader {
|
|
925
|
+
color: inherit;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/* edge case for default color */
|
|
929
|
+
:host(:not([color]):not([look='primary'])),
|
|
930
|
+
:host([color='']:not([look='primary'])),
|
|
931
|
+
:host([color='default']:not([look='primary'])) {
|
|
932
|
+
--uui-button-contrast-hover: var(--uui-color-default-emphasis,#3544b1);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
:host([color='warning'][look='outline']) #button,
|
|
936
|
+
:host([color='warning'][look='placeholder']) #button {
|
|
937
|
+
--uui-button-contrast-hover: var(--color-standalone);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/** Button color attribute: */
|
|
941
|
+
#button {
|
|
942
|
+
--color: var(--uui-color-default,#1b264f);
|
|
943
|
+
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
944
|
+
28,
|
|
945
|
+
35,
|
|
946
|
+
59
|
|
947
|
+
));
|
|
948
|
+
--color-emphasis: var(--uui-color-default-emphasis,#3544b1);
|
|
949
|
+
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
950
|
+
}
|
|
951
|
+
:host([color='positive']) #button {
|
|
952
|
+
--color: var(--uui-color-positive,#0b8152);
|
|
953
|
+
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
954
|
+
10,
|
|
955
|
+
115,
|
|
956
|
+
73
|
|
957
|
+
));
|
|
958
|
+
--color-emphasis: var(--uui-color-positive-emphasis,rgb(
|
|
959
|
+
13,
|
|
960
|
+
155,
|
|
961
|
+
98
|
|
962
|
+
));
|
|
963
|
+
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
964
|
+
}
|
|
965
|
+
:host([color='warning']) #button {
|
|
966
|
+
--color: var(--uui-color-warning,#fbd142);
|
|
967
|
+
--color-standalone: var(--uui-color-warning-standalone,#a17700);
|
|
968
|
+
--color-emphasis: var(--uui-color-warning-emphasis,rgb(
|
|
969
|
+
251,
|
|
970
|
+
224,
|
|
971
|
+
101
|
|
972
|
+
));
|
|
973
|
+
--color-contrast: var(--uui-color-warning-contrast,#000);
|
|
974
|
+
}
|
|
975
|
+
:host([color='danger']) #button {
|
|
976
|
+
--color: var(--uui-color-danger,#d42054);
|
|
977
|
+
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
978
|
+
191,
|
|
979
|
+
33,
|
|
980
|
+
78
|
|
981
|
+
));
|
|
982
|
+
--color-emphasis: var(--uui-color-danger-emphasis,rgb(
|
|
983
|
+
226,
|
|
984
|
+
60,
|
|
985
|
+
107
|
|
986
|
+
));
|
|
987
|
+
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
988
|
+
}
|
|
989
|
+
:host([color='invalid']) #button {
|
|
990
|
+
--color: var(--uui-color-invalid,#d42054);
|
|
991
|
+
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
992
|
+
191,
|
|
993
|
+
33,
|
|
994
|
+
78
|
|
995
|
+
));
|
|
996
|
+
--color-emphasis: var(--uui-color-invalid-emphasis,rgb(
|
|
997
|
+
226,
|
|
998
|
+
60,
|
|
999
|
+
107
|
|
1000
|
+
));
|
|
1001
|
+
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
1002
|
+
}
|
|
1003
|
+
:host([disabled]) #button {
|
|
1004
|
+
--color: var(--uui-color-disabled,#f3f3f5);
|
|
1005
|
+
--color-standalone: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1006
|
+
--color-emphasis: var(--uui-color-disabled,#f3f3f5);
|
|
1007
|
+
--color-contrast: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1008
|
+
|
|
1009
|
+
cursor: default;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/** Button look attribute: */
|
|
1013
|
+
/* DEFAULT */
|
|
1014
|
+
#button {
|
|
1015
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
1016
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1017
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
1018
|
+
}
|
|
1019
|
+
:host(:not([disabled]):hover) #button {
|
|
1020
|
+
background-color: var(
|
|
1021
|
+
--uui-button-background-color-hover,
|
|
1022
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
1023
|
+
250,
|
|
1024
|
+
250,
|
|
1025
|
+
250
|
|
1026
|
+
))
|
|
1027
|
+
);
|
|
1028
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1029
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1030
|
+
}
|
|
1031
|
+
:host([disabled]) #button {
|
|
1032
|
+
background-color: var(
|
|
1033
|
+
--uui-button-background-color-disabled,
|
|
1034
|
+
transparent
|
|
1035
|
+
);
|
|
1036
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1037
|
+
border-color: var(--uui-button-border-color-disabled, transparent);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/* PRIMARY */
|
|
1041
|
+
:host([look='primary']) #button {
|
|
1042
|
+
background-color: var(--uui-button-background-color, var(--color));
|
|
1043
|
+
color: var(--uui-button-contrast, var(--color-contrast));
|
|
1044
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
1045
|
+
|
|
1046
|
+
/* special for primary: */
|
|
1047
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
:host([look='primary']:hover) #button {
|
|
1051
|
+
background-color: var(
|
|
1052
|
+
--uui-button-background-color-hover,
|
|
1053
|
+
var(--color-emphasis)
|
|
1054
|
+
);
|
|
1055
|
+
color: var(--uui-button-contrast-hover, var(--color-contrast));
|
|
1056
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* special outline offset tof primary style so you can see the outline */
|
|
1060
|
+
:host([look='primary']) #button:focus-visible {
|
|
1061
|
+
outline-offset: 2px;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
:host([look='primary'][disabled]) #button {
|
|
1065
|
+
background-color: var(
|
|
1066
|
+
--uui-button-background-color-disabled,
|
|
1067
|
+
var(--color)
|
|
1068
|
+
);
|
|
1069
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1070
|
+
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
1071
|
+
}
|
|
1072
|
+
/* SECONDARY */
|
|
1073
|
+
:host([look='secondary']) #button {
|
|
1074
|
+
background-color: var(
|
|
1075
|
+
--uui-button-background-color,
|
|
1076
|
+
var(--uui-color-surface-alt,#f3f3f5)
|
|
1077
|
+
);
|
|
1078
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1079
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
1080
|
+
|
|
1081
|
+
/* special for secondary: */
|
|
1082
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
1083
|
+
}
|
|
1084
|
+
:host([look='secondary']:hover) #button {
|
|
1085
|
+
background-color: var(
|
|
1086
|
+
--uui-button-background-color-hover,
|
|
1087
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
1088
|
+
250,
|
|
1089
|
+
250,
|
|
1090
|
+
250
|
|
1091
|
+
))
|
|
1092
|
+
);
|
|
1093
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1094
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
1095
|
+
}
|
|
1096
|
+
:host([look='secondary'][disabled]) #button {
|
|
1097
|
+
background-color: var(
|
|
1098
|
+
--uui-button-background-color-disabled,
|
|
1099
|
+
var(--color)
|
|
1100
|
+
);
|
|
1101
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
1102
|
+
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/* OUTLINE */
|
|
1106
|
+
:host([look='outline']) #button {
|
|
1107
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
1108
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1109
|
+
border-color: var(
|
|
1110
|
+
--uui-button-border-color,
|
|
1111
|
+
var(--uui-color-border-standalone,#c2c2c2)
|
|
1112
|
+
);
|
|
1113
|
+
|
|
1114
|
+
/* special for outline: */
|
|
1115
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
1116
|
+
}
|
|
1117
|
+
:host([look='outline']:not([disabled]):hover) #button {
|
|
1118
|
+
background-color: var(--uui-button-background-color-hover, transparent);
|
|
1119
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1120
|
+
border-color: var(--uui-button-border-color-hover);
|
|
1121
|
+
}
|
|
1122
|
+
:host([look='outline'][disabled]) #button {
|
|
1123
|
+
background-color: var(
|
|
1124
|
+
--uui-button-background-color-disabled,
|
|
1125
|
+
transparent
|
|
1126
|
+
);
|
|
1127
|
+
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
1128
|
+
border-color: var(
|
|
1129
|
+
--uui-button-border-color-disabled,
|
|
1130
|
+
var(--color-standalone)
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/* PLACEHOLDER */
|
|
1135
|
+
:host([look='placeholder']) #button {
|
|
1136
|
+
border-style: dashed;
|
|
1137
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
1138
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
1139
|
+
border-color: var(
|
|
1140
|
+
--uui-button-border-color,
|
|
1141
|
+
var(--uui-color-border-standalone,#c2c2c2)
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
:host([look='placeholder']:not([disabled]):hover) #button {
|
|
1145
|
+
background-color: var(--uui-button-background-color-hover, transparent);
|
|
1146
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
1147
|
+
border-color: var(--uui-button-border-color-hover);
|
|
1148
|
+
}
|
|
1149
|
+
:host([look='placeholder'][disabled]) #button {
|
|
1150
|
+
background-color: var(
|
|
1151
|
+
--uui-button-background-color-disabled,
|
|
1152
|
+
var(--color)
|
|
1153
|
+
);
|
|
1154
|
+
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
1155
|
+
border-color: var(
|
|
1156
|
+
--uui-button-border-color-disabled,
|
|
1157
|
+
var(--color-standalone)
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
`],re([l({type:String,reflect:!0})],J.prototype,"type",2),re([l({type:Boolean,reflect:!0})],J.prototype,"disabled",2),re([l({reflect:!0})],J.prototype,"look",2),re([l({reflect:!0})],J.prototype,"color",2),re([l({type:Boolean,reflect:!0})],J.prototype,"compact",2),re([l({type:String,reflect:!0})],J.prototype,"state",2),re([l({type:String})],J.prototype,"href",2),re([l({type:String})],J.prototype,"target",2),re([l({type:String})],J.prototype,"rel",2),re([l({type:String})],J.prototype,"title",2),re([S("#button")],J.prototype,"_button",2),J=re([Bo("uui-button")],J);var Cd=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,Fa=i=>{throw TypeError(i)},St=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sd(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&&Cd(e,t,o),o},ln=(i,e,t)=>e.has(i)||Fa("Cannot "+t),z=(i,e,t)=>(ln(i,e,"read from private field"),t?t.call(i):e.get(i)),Ve=(i,e,t)=>e.has(i)?Fa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ji=(i,e,t,r)=>(ln(i,e,"write to private field"),e.set(i,t),t),rt=(i,e,t)=>(ln(i,e,"access private method"),t),De,nt,At,Hi,un,je,Ri,cn,Ie,hn,Wa,dn,Ga,pn;let He=class extends f{constructor(){super(),Ve(this,Ie),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Ve(this,De,null),Ve(this,nt,[]),Ve(this,At,null),Ve(this,Hi,{width:0,height:0}),Ve(this,un,i=>{this._open=i.newState==="open",ji(this,De,rd(this,"popovertarget",this.id)),z(this,De)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:i.oldState,newState:i.newState}})),this._open?(rt(this,Ie,Ga).call(this),rt(this,Ie,Wa).call(this),requestAnimationFrame(()=>{z(this,je).call(this)})):rt(this,Ie,dn).call(this)}),Ve(this,je,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",z(this,Ri).call(this,3))}),Ve(this,Ri,i=>{if(z(this,cn).call(this),i--,z(this,De)===null)return;const e=this._actualPlacement.indexOf("top")!==-1,t=this._actualPlacement.indexOf("bottom")!==-1,r=this._actualPlacement.indexOf("left")!==-1,o=this._actualPlacement.indexOf("right")!==-1,n=this._actualPlacement.indexOf("-start")!==-1,a=this._actualPlacement.indexOf("-end")!==-1,u=z(this,De).getBoundingClientRect(),c=this.getBoundingClientRect();let d=0,b=0;t&&(d=u.top+u.height,n&&(b=u.left),a&&(b=u.left+u.width-c.width),!n&&!a&&(b=u.left+u.width/2-c.width/2)),e&&(d=u.top-c.height,n&&(b=u.left),a&&(b=u.left+u.width-c.width),!n&&!a&&(b=u.left+u.width/2-c.width/2)),r&&(b=u.left-c.width,n&&(d=u.top),a&&(d=u.top+u.height-c.height),!n&&!a&&(d=u.top+u.height/2-c.height/2)),o&&(b=u.left+u.width,n&&(d=u.top),a&&(d=u.top+u.height-c.height),!n&&!a&&(d=u.top+u.height/2-c.height/2));const g=window.innerWidth,y=window.innerHeight,$=Math.min(0,u.top+u.height),x=Math.max(Math.min(d,y-c.height),u.top-c.height);if(Math.max($,x)!==d&&(e||t)&&i>0){rt(this,Ie,hn).call(this),z(this,Ri).call(this,i);return}d=Math.max($,x);const K=Math.min(0,u.left+u.width),Ue=Math.max(Math.min(b,g-c.width),u.left-c.width),pe=Math.max(K,Ue);if(pe!==b&&(r||o)&&i>0){rt(this,Ie,hn).call(this),z(this,Ri).call(this,i);return}b=pe,(d+c.height<0||d>y||b+c.width<0||b>g)&&this.hidePopover(),this.style.transform=`translate(${b}px, ${d}px)`,this.style.opacity="1"}),Ve(this,cn,()=>{const i={top:"bottom",bottom:"top",left:"right",right:"left"};let e=this._actualPlacement.split("-")[0];e=i[e]||e,e=e.charAt(0).toUpperCase()+e.slice(1);const t=`padding${e}`;this.style.padding="0",this.style[t]=`${this.margin}px`}),this.addEventListener("beforetoggle",z(this,un),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(i){this._placement=i,this._actualPlacement=i,z(this,je).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),z(this,At)||(ji(this,At,new ResizeObserver(i=>{const e=i[0],t=e.contentRect.width,r=e.contentRect.height;t===z(this,Hi).width&&r===z(this,Hi).height||(ji(this,Hi,{width:t,height:r}),z(this,je).call(this))})),z(this,At).observe(this))}disconnectedCallback(){super.disconnectedCallback(),rt(this,Ie,dn).call(this),z(this,At)?.disconnect(),ji(this,At,null)}_getScrollParents(){return z(this,nt)}render(){return h`<slot></slot>`}};De=new WeakMap,nt=new WeakMap,At=new WeakMap,Hi=new WeakMap,un=new WeakMap,je=new WeakMap,Ri=new WeakMap,cn=new WeakMap,Ie=new WeakSet,hn=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},Wa=function(){z(this,nt).forEach(i=>{i.addEventListener("scroll",z(this,je),{passive:!0})}),document.addEventListener("scroll",z(this,je),{passive:!0})},dn=function(){z(this,nt).forEach(i=>{i.removeEventListener("scroll",z(this,je))}),document.removeEventListener("scroll",z(this,je))},Ga=function(){if(ji(this,nt,[]),!z(this,De))return;let i=getComputedStyle(z(this,De));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=z(this,De);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=rt(this,Ie,pn).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&z(this,nt).push(r),i.position==="fixed")return;r=rt(this,Ie,pn).call(this,r)}z(this,nt).push(document.body)},pn=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},He.styles=[v`
|
|
1161
|
+
:host {
|
|
1162
|
+
margin: 0;
|
|
1163
|
+
width: fit-content;
|
|
1164
|
+
height: fit-content;
|
|
1165
|
+
border: none;
|
|
1166
|
+
border-radius: 0;
|
|
1167
|
+
padding: 0;
|
|
1168
|
+
background-color: none;
|
|
1169
|
+
background: none;
|
|
1170
|
+
overflow: visible;
|
|
1171
|
+
color: var(--uui-color-text,#060606);
|
|
1172
|
+
}
|
|
1173
|
+
`],St([l({type:Number})],He.prototype,"margin",2),St([l({type:Boolean})],He.prototype,"open",1),St([l({type:String,reflect:!0})],He.prototype,"placement",1),St([w()],He.prototype,"_placement",2),St([w()],He.prototype,"_open",2),St([w()],He.prototype,"_actualPlacement",2),He=St([Bo("uui-popover-container")],He);var Ad=Object.getOwnPropertyDescriptor,Pd=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ad(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(o)||o);return o};let bn=class extends f{render(){return p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
1174
|
+
<circle cx="17" cy="50" r="9"></circle>
|
|
1175
|
+
<circle cx="50" cy="50" r="9"></circle>
|
|
1176
|
+
<circle cx="83" cy="50" r="9"></circle>
|
|
1177
|
+
</svg>`}};bn.styles=[v`
|
|
1178
|
+
:host {
|
|
1179
|
+
display: inline-block;
|
|
1180
|
+
vertical-align: bottom;
|
|
1181
|
+
width: 1.15em;
|
|
1182
|
+
height: 1.15em;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
svg {
|
|
1186
|
+
fill: currentColor;
|
|
1187
|
+
}
|
|
1188
|
+
`],bn=Pd([Bo("uui-symbol-more")],bn);var Md=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,qa=i=>{throw TypeError(i)},oi=(i,e,t,r)=>{for(var o=r>1?void 0:r?zd(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&&Md(e,t,o),o},vn=(i,e,t)=>e.has(i)||qa("Cannot "+t),I=(i,e,t)=>(vn(i,e,"read from private field"),t?t.call(i):e.get(i)),Ce=(i,e,t)=>e.has(i)?qa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Re=(i,e,t,r)=>(vn(i,e,"write to private field"),e.set(i,t),t),Se=(i,e,t)=>(vn(i,e,"access private method"),t),Ae,ge,Fe,st,jo,Fi,Wi,Gi,ne,Ka,Xa,mn,gn,fn,yn,ri;s.UUIResponsiveContainerElement=class extends f{constructor(){super(...arguments),Ce(this,ne),this.collapse="end",Ce(this,Ae,[]),Ce(this,ge,[]),Ce(this,Fe,new Map),Ce(this,st,[]),Ce(this,jo,new ResizeObserver(Se(this,ne,Xa).bind(this))),Ce(this,Fi,[]),Ce(this,Wi,!1),Ce(this,Gi,!1),Ce(this,ri,e=>{const t=e.currentTarget,r=I(this,Fe).get(t);r&&(this._popoverContainerElement?.hidePopover(),r.click())})}connectedCallback(){super.connectedCallback(),Re(this,Gi,!0),Se(this,ne,Ka).call(this)}disconnectedCallback(){super.disconnectedCallback(),Re(this,Gi,!1),I(this,jo).disconnect(),Se(this,ne,gn).call(this)}render(){const e=h`
|
|
1189
|
+
<uui-button
|
|
1190
|
+
popovertarget="popover-container"
|
|
1191
|
+
style="display: none"
|
|
1192
|
+
id="more-button"
|
|
1193
|
+
label="More"
|
|
1194
|
+
compact>
|
|
1195
|
+
<slot name="trigger-content">
|
|
1196
|
+
<uui-symbol-more></uui-symbol-more>
|
|
1197
|
+
</slot>
|
|
1198
|
+
</uui-button>
|
|
1199
|
+
`;return h`
|
|
1200
|
+
<div id="main">
|
|
1201
|
+
${this.collapse==="start"?e:""}
|
|
1202
|
+
<div id="items-container">
|
|
1203
|
+
<slot @slotchange=${Se(this,ne,mn)}></slot>
|
|
1204
|
+
</div>
|
|
1205
|
+
${this.collapse==="end"?e:""}
|
|
1206
|
+
</div>
|
|
1207
|
+
<uui-popover-container
|
|
1208
|
+
id="popover-container"
|
|
1209
|
+
popover
|
|
1210
|
+
placement=${this.collapse==="start"?"bottom-start":"bottom-end"}>
|
|
1211
|
+
<div id="dropdown-container">
|
|
1212
|
+
${Vo(I(this,ge),t=>h`${t}`)}
|
|
1213
|
+
</div>
|
|
1214
|
+
</uui-popover-container>
|
|
1215
|
+
`}},Ae=new WeakMap,ge=new WeakMap,Fe=new WeakMap,st=new WeakMap,jo=new WeakMap,Fi=new WeakMap,Wi=new WeakMap,Gi=new WeakMap,ne=new WeakSet,Ka=async function(){Jt(this,"uui-button"),Jt(this,"uui-popover-container"),Jt(this,"uui-symbol-more"),await this.updateComplete,I(this,jo).observe(this._mainElement),requestAnimationFrame(()=>{Se(this,ne,mn).call(this)})},Xa=function(i){const e=i[0].contentBoxSize[0].inlineSize;Se(this,ne,yn).call(this,e)},mn=function(){I(this,Gi)&&(Se(this,ne,gn).call(this),Re(this,Ae,this._slottedNodes?[...this._slottedNodes]:[]),I(this,Ae).forEach(i=>{const e=new ResizeObserver(Se(this,ne,fn).bind(this));e.observe(i),I(this,Fi).push(e)}),Se(this,ne,fn).call(this))},gn=function(){I(this,Fi).forEach(i=>i.disconnect()),Re(this,Fi,[]),Re(this,st,[]),I(this,ge).forEach(i=>{i.removeEventListener("click",I(this,ri))}),Re(this,ge,[]),I(this,Fe).clear()},fn=async function(){if(I(this,Wi))return;Re(this,Wi,!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,Ae).length;o++)I(this,Ae)[o].style.display="",t+=I(this,Ae)[o].offsetWidth,I(this,st)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",Se(this,ne,yn).call(this,this._mainElement.offsetWidth),Re(this,Wi,!1)},yn=function(i){const e=this._moreButtonElement?.offsetWidth||40,t=i-e;I(this,ge).forEach(o=>{o.removeEventListener("click",I(this,ri))}),Re(this,ge,[]),I(this,Fe).clear();const r=I(this,st).length;if(this.collapse==="end")for(let o=0;o<r;o++){const n=I(this,st)[o],a=I(this,Ae)[o],u=o===r-1?i:t;if(n<=u)a.style.display="";else{a.style.display="none";const c=a.cloneNode(!0);c.style.display="",c.addEventListener("click",I(this,ri)),I(this,Fe).set(c,a),I(this,Fe).set(a,c),I(this,ge).push(c)}}else{const o=I(this,st)[r-1]||0;for(let n=0;n<r;n++){const a=I(this,Ae)[n],u=o-(n>0?I(this,st)[n-1]:0),c=(n===0||I(this,Ae)[n-1].style.display==="none")&&I(this,ge).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,ri)),I(this,Fe).set(d,a),I(this,Fe).set(a,d),I(this,ge).push(d)}}}I(this,ge).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement?.hidePopover()):this._moreButtonElement.style.display="",this.requestUpdate()},ri=new WeakMap,s.UUIResponsiveContainerElement.styles=[v`
|
|
1216
|
+
:host {
|
|
1217
|
+
display: flex;
|
|
1218
|
+
min-width: 0;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
#main {
|
|
1222
|
+
display: flex;
|
|
1223
|
+
overflow: hidden;
|
|
1224
|
+
align-items: center;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
#items-container {
|
|
1228
|
+
display: flex;
|
|
1229
|
+
gap: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
1230
|
+
overflow: hidden;
|
|
1231
|
+
align-items: center;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
#more-button {
|
|
1235
|
+
--uui-button-background-color: transparent;
|
|
1236
|
+
--uui-button-background-color-hover: var(--uui-color-surface-alt,#f3f3f5);
|
|
1237
|
+
flex-shrink: 0;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
:host([collapse='end']) #more-button,
|
|
1241
|
+
:host(:not([collapse])) #more-button {
|
|
1242
|
+
margin-left: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
:host([collapse='start']) #more-button {
|
|
1246
|
+
margin-right: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
#dropdown-container {
|
|
1250
|
+
display: flex;
|
|
1251
|
+
flex-direction: column;
|
|
1252
|
+
background-color: var(--uui-color-surface,#fff);
|
|
1253
|
+
border-radius: var(--uui-border-radius,3px);
|
|
1254
|
+
box-shadow: var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,0.19) , 0 6px 6px rgba(0,0,0,0.23));
|
|
1255
|
+
overflow: hidden;
|
|
1256
|
+
padding: var(--uui-size-space-2,6px);
|
|
1257
|
+
gap: var(--uui-size-space-1,3px);
|
|
1258
|
+
}
|
|
1259
|
+
`],oi([S("#more-button")],s.UUIResponsiveContainerElement.prototype,"_moreButtonElement",2),oi([S("#popover-container")],s.UUIResponsiveContainerElement.prototype,"_popoverContainerElement",2),oi([S("#main")],s.UUIResponsiveContainerElement.prototype,"_mainElement",2),oi([l({type:String,reflect:!0})],s.UUIResponsiveContainerElement.prototype,"collapse",2),oi([Be({flatten:!0})],s.UUIResponsiveContainerElement.prototype,"_slottedNodes",2),s.UUIResponsiveContainerElement=oi([Bo("uui-responsive-container")],s.UUIResponsiveContainerElement);let Ld=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 k=(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)},Ya=(i,e)=>{function t(o){const n=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,u=n.left+a.scrollX,c=n.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 b=d.pageX-u,g=d.pageY-c;e?.onMove&&e.onMove(b,g)}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)},L=(i,e,t)=>Math.min(Math.max(i,e),t),Za=(i,e,t)=>t+e-i,Od=(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};function Td(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var Nd=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,wn=(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&&Nd(e,t,o),o};s.UUIBreadcrumbItemElement=class extends f{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()}`}},s.UUIBreadcrumbItemElement.styles=[v`
|
|
693
1260
|
:host {
|
|
694
1261
|
font-size: var(--uui-type-small-size,12px);
|
|
695
1262
|
color: currentColor;
|
|
@@ -728,9 +1295,14 @@
|
|
|
728
1295
|
overflow: hidden;
|
|
729
1296
|
text-overflow: ellipsis;
|
|
730
1297
|
}
|
|
731
|
-
`],
|
|
1298
|
+
`],wn([l()],s.UUIBreadcrumbItemElement.prototype,"href",2),wn([l({type:Boolean,attribute:"last-item"})],s.UUIBreadcrumbItemElement.prototype,"lastItem",2),s.UUIBreadcrumbItemElement=wn([m("uui-breadcrumb-item")],s.UUIBreadcrumbItemElement);var Vd=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Qa=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dd(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&&Vd(e,t,o),o};s.UUIBreadcrumbsElement=class extends f{elementIsBreadcrumbItem(e){return e instanceof s.UUIBreadcrumbItemElement}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation"),k(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
|
+
id="breadcrumbs-list"
|
|
1300
|
+
collapse="start">
|
|
1301
|
+
<span slot="trigger-content">
|
|
1302
|
+
<span class="ellipsis">…</span> <span class="separator">/</span>
|
|
1303
|
+
</span>
|
|
732
1304
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
733
|
-
</
|
|
1305
|
+
</uui-responsive-container>`}},s.UUIBreadcrumbsElement.styles=[v`
|
|
734
1306
|
:host {
|
|
735
1307
|
display: flex;
|
|
736
1308
|
}
|
|
@@ -744,7 +1316,24 @@
|
|
|
744
1316
|
margin-inline-end: 0px;
|
|
745
1317
|
padding-inline-start: 0px;
|
|
746
1318
|
}
|
|
747
|
-
|
|
1319
|
+
uui-responsive-container {
|
|
1320
|
+
--uui-responsive-container-gap: 0;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* Style the trigger content to match breadcrumb items */
|
|
1324
|
+
[slot='trigger-content'] {
|
|
1325
|
+
font-size: var(--uui-type-small-size,12px);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
[slot='trigger-content'] .ellipsis {
|
|
1329
|
+
color: currentColor; /* Black/default text color */
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
[slot='trigger-content'] .separator {
|
|
1333
|
+
color: var(--uui-color-border,#d8d7d9); /* Matches breadcrumb separator */
|
|
1334
|
+
margin-left: var(--uui-size-2,6px);
|
|
1335
|
+
}
|
|
1336
|
+
`],Qa([Be({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],s.UUIBreadcrumbsElement.prototype,"slotNodes",2),s.UUIBreadcrumbsElement=Qa([m("uui-breadcrumbs")],s.UUIBreadcrumbsElement);const jd=v`
|
|
748
1337
|
@keyframes uui-blink {
|
|
749
1338
|
0%,
|
|
750
1339
|
100% {
|
|
@@ -754,7 +1343,7 @@
|
|
|
754
1343
|
opacity: 1;
|
|
755
1344
|
}
|
|
756
1345
|
}
|
|
757
|
-
`,
|
|
1346
|
+
`,Hd=be("uui-blink 0.9s infinite both"),Rd=v`
|
|
758
1347
|
@keyframes pulse {
|
|
759
1348
|
0% {
|
|
760
1349
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -772,7 +1361,7 @@
|
|
|
772
1361
|
opacity: 0;
|
|
773
1362
|
}
|
|
774
1363
|
}
|
|
775
|
-
`;
|
|
1364
|
+
`;be("pulse 0.8s ease-in-out infinite both");const Ho=v`
|
|
776
1365
|
@keyframes uui-horizontal-shake {
|
|
777
1366
|
10%,
|
|
778
1367
|
90% {
|
|
@@ -795,22 +1384,14 @@
|
|
|
795
1384
|
transform: translateX(2px);
|
|
796
1385
|
}
|
|
797
1386
|
}
|
|
798
|
-
`,
|
|
799
|
-
* @license
|
|
800
|
-
* Copyright 2017 Google LLC
|
|
801
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
802
|
-
*/const ue={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Pt=i=>(...e)=>({_$litDirective$:i,values:e});let zt=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)}};/**
|
|
803
|
-
* @license
|
|
804
|
-
* Copyright 2018 Google LLC
|
|
805
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
806
|
-
*/const Fs="important",lh=" !"+Fs,Ee=Pt(class extends zt{constructor(i){var e;if(super(i),i.type!==ue.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(lh);r.includes("-")||s?t.setProperty(r,s?o.slice(0,-11):o,s?Fs:""):t[r]=o}}return Q}});/**
|
|
1387
|
+
`,Ro=be("uui-horizontal-shake 600ms ease backwards");/**
|
|
807
1388
|
* @license
|
|
808
1389
|
* Copyright 2018 Google LLC
|
|
809
1390
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
810
|
-
*/const
|
|
1391
|
+
*/const Ja="important",Fd=" !"+Ja,We=ei(class extends ti{constructor(i){var e;if(super(i),i.type!==me.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 n=typeof o=="string"&&o.endsWith(Fd);r.includes("-")||n?t.setProperty(r,n?o.slice(0,-11):o,n?Ja:""):t[r]=o}}return te}});let _n=class extends M{static{this.CLICK="click"}constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};var Wd=Object.defineProperty,Gd=Object.getOwnPropertyDescriptor,el=i=>{throw TypeError(i)},Pt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gd(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&&Wd(e,t,o),o},qd=(i,e,t)=>e.has(i)||el("Cannot "+t),Kd=(i,e,t)=>e.has(i)?el("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Fo=(i,e,t)=>(qd(i,e,"access private method"),t),ni,$n,tl,il;s.UUIButtonInlineCreateElement=class extends f{constructor(){super(...arguments),Kd(this,ni),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 _n(_n.CLICK))}render(){return this.href?Fo(this,ni,tl).call(this):Fo(this,ni,il).call(this)}},ni=new WeakSet,$n=function(){return h`
|
|
811
1392
|
<div
|
|
812
1393
|
id="plus"
|
|
813
|
-
style=${
|
|
1394
|
+
style=${We({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}>
|
|
814
1395
|
<svg
|
|
815
1396
|
id="plus-icon"
|
|
816
1397
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -819,23 +1400,23 @@
|
|
|
819
1400
|
d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z" />
|
|
820
1401
|
</svg>
|
|
821
1402
|
</div>
|
|
822
|
-
`},
|
|
1403
|
+
`},tl=function(){return h`<a
|
|
823
1404
|
id="button-wrapper"
|
|
824
1405
|
@mousemove=${this._onMouseMove}
|
|
825
|
-
href=${
|
|
826
|
-
target=${
|
|
827
|
-
rel=${
|
|
1406
|
+
href=${_(this.href)}
|
|
1407
|
+
target=${_(this.target||void 0)}
|
|
1408
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
828
1409
|
aria-label=${this.label?this.label:"create new element"}>
|
|
829
|
-
${
|
|
830
|
-
</a>`},
|
|
1410
|
+
${Fo(this,ni,$n).call(this)}
|
|
1411
|
+
</a>`},il=function(){return h`
|
|
831
1412
|
<button
|
|
832
1413
|
id="button-wrapper"
|
|
833
1414
|
@mousemove=${this._onMouseMove}
|
|
834
1415
|
@click=${this._handleClick}
|
|
835
1416
|
aria-label=${this.label?this.label:"create new element"}>
|
|
836
|
-
${
|
|
1417
|
+
${Fo(this,ni,$n).call(this)}
|
|
837
1418
|
</button>
|
|
838
|
-
`},
|
|
1419
|
+
`},s.UUIButtonInlineCreateElement.styles=[jd,v`
|
|
839
1420
|
:host {
|
|
840
1421
|
display: flex;
|
|
841
1422
|
position: relative;
|
|
@@ -889,7 +1470,7 @@
|
|
|
889
1470
|
:host(:focus) #button-wrapper:before,
|
|
890
1471
|
:host(:focus-within) #button-wrapper:before,
|
|
891
1472
|
:host(:hover) #button-wrapper:before {
|
|
892
|
-
animation: ${
|
|
1473
|
+
animation: ${Hd};
|
|
893
1474
|
background-color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
894
1475
|
border-color: var(--uui-color-surface,#fff) !important;
|
|
895
1476
|
}
|
|
@@ -992,32 +1573,32 @@
|
|
|
992
1573
|
#button-wrapper:active #plus {
|
|
993
1574
|
transform: scale(1.1);
|
|
994
1575
|
}
|
|
995
|
-
`],at([w()],n.UUIButtonInlineCreateElement.prototype,"_position",2),at([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),at([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),at([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"href",2),at([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"target",2),at([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"rel",2),n.UUIButtonInlineCreateElement=at([p("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let ph=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 U=(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)},Ks=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,u=s.left+a.scrollX,h=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-h;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)},z=(i,e,t)=>Math.min(Math.max(i,e),t),Xs=(i,e,t)=>t+e-i,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};function mh(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}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 lo=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 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"><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 gh=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 fh=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 Ir=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 yh=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 wh=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 $h=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>`,_h=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 Uh=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>`;var kh=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,Ys=i=>{throw TypeError(i)},te=(i,e,t,r)=>{for(var o=r>1?void 0:r?Eh(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&&kh(e,t,o),o},Zs=(i,e,t)=>e.has(i)||Ys("Cannot "+t),xh=(i,e,t)=>(Zs(i,e,"read from private field"),e.get(i)),Ih=(i,e,t)=>e.has(i)?Ys("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ch=(i,e,t,r)=>(Zs(i,e,"write to private field"),e.set(i,t),t),uo;n.UUIButtonElement=class extends ge(ve("",Kc(g))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",Ih(this,uo),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(xh(this,uo)),(this.state==="success"||this.state==="failed")&&Ch(this,uo,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":U(this,"uui-loader-circle"),e=c`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":U(this,"uui-icon"),e=c`<uui-icon
|
|
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
|
|
996
1577
|
name="check"
|
|
997
|
-
.fallback=${
|
|
1578
|
+
.fallback=${Wo.strings[0]}></uui-icon>`;break;case"failed":k(this,"uui-icon"),e=h`<uui-icon
|
|
998
1579
|
name="wrong"
|
|
999
|
-
.fallback=${
|
|
1580
|
+
.fallback=${ip.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${e}</div>`}render(){return this.href?h`
|
|
1000
1581
|
<a
|
|
1001
1582
|
id="button"
|
|
1002
|
-
aria-label=${
|
|
1003
|
-
title=${
|
|
1004
|
-
href=${
|
|
1005
|
-
target=${
|
|
1006
|
-
rel=${
|
|
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))}>
|
|
1007
1588
|
${this.renderState()} ${this.renderLabel()}
|
|
1008
1589
|
<slot name="extra"></slot>
|
|
1009
1590
|
</a>
|
|
1010
|
-
`:
|
|
1591
|
+
`:h`
|
|
1011
1592
|
<button
|
|
1012
1593
|
id="button"
|
|
1013
1594
|
type=${this.type}
|
|
1014
1595
|
?disabled=${this.disabled}
|
|
1015
|
-
aria-label=${
|
|
1016
|
-
title=${
|
|
1596
|
+
aria-label=${_(this.label)}
|
|
1597
|
+
title=${_(this.title===""?void 0:this.title)}>
|
|
1017
1598
|
${this.renderState()} ${this.renderLabel()}
|
|
1018
1599
|
<slot name="extra"></slot>
|
|
1019
1600
|
</button>
|
|
1020
|
-
`}},
|
|
1601
|
+
`}},Go=new WeakMap,s.UUIButtonElement.styles=[Ho,v`
|
|
1021
1602
|
:host {
|
|
1022
1603
|
position: relative;
|
|
1023
1604
|
display: inline-flex;
|
|
@@ -1122,7 +1703,7 @@
|
|
|
1122
1703
|
|
|
1123
1704
|
button[disabled]:active,
|
|
1124
1705
|
a:not([href]):active {
|
|
1125
|
-
animation: ${
|
|
1706
|
+
animation: ${Ro};
|
|
1126
1707
|
}
|
|
1127
1708
|
|
|
1128
1709
|
/* ANIMATIONS */
|
|
@@ -1390,17 +1971,17 @@
|
|
|
1390
1971
|
var(--color-standalone)
|
|
1391
1972
|
);
|
|
1392
1973
|
}
|
|
1393
|
-
`],
|
|
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`
|
|
1394
1975
|
<slot class="label">
|
|
1395
1976
|
<uui-icon name="copy"></uui-icon>
|
|
1396
1977
|
</slot>
|
|
1397
|
-
`}},
|
|
1978
|
+
`}},Ki=new WeakMap,En=new WeakMap,s.UUIButtonCopyTextElement.styles=s.UUIButtonElement.styles,qo([l({type:String})],s.UUIButtonCopyTextElement.prototype,"text",2),qo([l({type:String,attribute:"copy-from"})],s.UUIButtonCopyTextElement.prototype,"copyFrom",2),qo([l({type:Number,attribute:"animation-state-delay"})],s.UUIButtonCopyTextElement.prototype,"animationStateDelay",2),s.UUIButtonCopyTextElement=qo([m("uui-button-copy-text")],s.UUIButtonCopyTextElement);var hp=(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.UUICheckboxElement=class extends ve{renderCheckbox(){return h`
|
|
1398
1979
|
<div id="ticker">
|
|
1399
1980
|
<div id="icon-check">
|
|
1400
|
-
${this.indeterminate?
|
|
1981
|
+
${this.indeterminate?Jd:Wo}
|
|
1401
1982
|
</div>
|
|
1402
1983
|
</div>
|
|
1403
|
-
`}},
|
|
1984
|
+
`}},s.UUICheckboxElement.formAssociated=!0,s.UUICheckboxElement.styles=[...ve.styles,Ho,v`
|
|
1404
1985
|
:host {
|
|
1405
1986
|
--uui-checkbox-size: 18px;
|
|
1406
1987
|
}
|
|
@@ -1596,13 +2177,13 @@
|
|
|
1596
2177
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1597
2178
|
}
|
|
1598
2179
|
:host([disabled]) label:active #ticker {
|
|
1599
|
-
animation: ${
|
|
2180
|
+
animation: ${Ro};
|
|
1600
2181
|
}
|
|
1601
2182
|
:host([disabled]) input:checked + #ticker #icon-check,
|
|
1602
2183
|
:host([disabled]) input:indeterminate + #ticker #icon-check {
|
|
1603
2184
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1604
2185
|
}
|
|
1605
|
-
`],
|
|
2186
|
+
`],s.UUICheckboxElement=hp([m("uui-checkbox")],s.UUICheckboxElement);let Xi=class extends M{static{this.OPEN="open"}};var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,si=(i,e,t,r)=>{for(var o=r>1?void 0:r?pp(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&&dp(e,t,o),o};s.UUICardElement=class extends To(Xt(f)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new Xi(Xi.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new Xi(Xi.OPEN)))}renderCheckbox(){if(this.selectable)return h`
|
|
1606
2187
|
<uui-checkbox
|
|
1607
2188
|
id="select-checkbox"
|
|
1608
2189
|
label="select"
|
|
@@ -1611,8 +2192,8 @@
|
|
|
1611
2192
|
@click=${e=>e.stopPropagation()}
|
|
1612
2193
|
@change=${()=>this.click()}>
|
|
1613
2194
|
</uui-checkbox>
|
|
1614
|
-
`}render(){return
|
|
1615
|
-
<div id="select-border"></div>`}},
|
|
2195
|
+
`}render(){return h`<slot id="open-part"></slot>
|
|
2196
|
+
<div id="select-border"></div>`}},s.UUICardElement.styles=[qt,v`
|
|
1616
2197
|
:host {
|
|
1617
2198
|
position: relative;
|
|
1618
2199
|
display: flex;
|
|
@@ -1774,41 +2355,41 @@
|
|
|
1774
2355
|
#select-checkbox[checked] {
|
|
1775
2356
|
opacity: 1;
|
|
1776
2357
|
}
|
|
1777
|
-
`],
|
|
1778
|
-
${
|
|
1779
|
-
${this.href?
|
|
2358
|
+
`],si([l({type:Boolean,reflect:!0,attribute:"disabled"})],s.UUICardElement.prototype,"disabled",2),si([l({type:Boolean,reflect:!0})],s.UUICardElement.prototype,"error",2),si([l({type:String})],s.UUICardElement.prototype,"href",2),si([l({type:String})],s.UUICardElement.prototype,"target",2),si([l({type:String})],s.UUICardElement.prototype,"rel",2),s.UUICardElement=si([m("uui-card")],s.UUICardElement);var bp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,ll=i=>{throw TypeError(i)},Ko=(i,e,t,r)=>{for(var o=r>1?void 0:r?vp(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&&bp(e,t,o),o},mp=(i,e,t)=>e.has(i)||ll("Cannot "+t),gp=(i,e,t)=>e.has(i)?ll("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Yi=(i,e,t)=>(mp(i,e,"access private method"),t),Mt,ul,cl,hl,xn;s.UUICardBlockTypeElement=class extends s.UUICardElement{constructor(){super(...arguments),gp(this,Mt),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return h`
|
|
2359
|
+
${Yi(this,Mt,hl).call(this)}
|
|
2360
|
+
${this.href?Yi(this,Mt,cl).call(this):Yi(this,Mt,ul).call(this)}
|
|
1780
2361
|
<!-- Select border must be right after #open-part -->
|
|
1781
2362
|
<div id="select-border"></div>
|
|
1782
|
-
${this.selectable?this.renderCheckbox():
|
|
2363
|
+
${this.selectable?this.renderCheckbox():C}
|
|
1783
2364
|
<slot name="tag"></slot>
|
|
1784
2365
|
<slot name="actions"></slot>
|
|
1785
|
-
`}},
|
|
2366
|
+
`}},Mt=new WeakSet,ul=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
1786
2367
|
<button
|
|
1787
2368
|
id="open-part"
|
|
1788
2369
|
class="uui-text"
|
|
1789
|
-
tabindex=${
|
|
2370
|
+
tabindex=${_(i)}
|
|
1790
2371
|
@click=${this.handleOpenClick}
|
|
1791
2372
|
@keydown=${this.handleOpenKeydown}>
|
|
1792
|
-
${
|
|
2373
|
+
${Yi(this,Mt,xn).call(this)}
|
|
1793
2374
|
</button>
|
|
1794
|
-
`},
|
|
2375
|
+
`},cl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
1795
2376
|
<a
|
|
1796
2377
|
id="open-part"
|
|
1797
2378
|
class="uui-text"
|
|
1798
|
-
tabindex=${
|
|
1799
|
-
href=${
|
|
1800
|
-
target=${
|
|
1801
|
-
rel=${
|
|
1802
|
-
${
|
|
2379
|
+
tabindex=${_(i)}
|
|
2380
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2381
|
+
target=${_(this.target||void 0)}
|
|
2382
|
+
rel=${_(this.rel||e)}>
|
|
2383
|
+
${Yi(this,Mt,xn).call(this)}
|
|
1803
2384
|
</a>
|
|
1804
|
-
`},
|
|
2385
|
+
`},hl=function(){return h`<div id="portrait">
|
|
1805
2386
|
<slot></slot>
|
|
1806
|
-
</div> `},
|
|
2387
|
+
</div> `},xn=function(){return h`
|
|
1807
2388
|
<div id="content">
|
|
1808
2389
|
<span title="${this.name}" id="name">${this.name}</span>
|
|
1809
|
-
<small title="${
|
|
2390
|
+
<small title="${_(this.description)}">${this.description}<slot name="description"></slot></small>
|
|
1810
2391
|
</div></div>
|
|
1811
|
-
`},
|
|
2392
|
+
`},s.UUICardBlockTypeElement.styles=[...s.UUICardElement.styles,v`
|
|
1812
2393
|
:host {
|
|
1813
2394
|
background-color: var(--uui-color-surface-alt,#f3f3f5);
|
|
1814
2395
|
}
|
|
@@ -1950,7 +2531,7 @@
|
|
|
1950
2531
|
calc(var(--uui-size-space-4,12px) * -1);
|
|
1951
2532
|
top: 0;
|
|
1952
2533
|
}
|
|
1953
|
-
`],
|
|
2534
|
+
`],Ko([l({type:String})],s.UUICardBlockTypeElement.prototype,"name",2),Ko([l({type:String})],s.UUICardBlockTypeElement.prototype,"description",2),Ko([l({type:String,attribute:"background"})],s.UUICardBlockTypeElement.prototype,"background",1),s.UUICardBlockTypeElement=Ko([m("uui-card-block-type")],s.UUICardBlockTypeElement);var fp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,dl=i=>{throw TypeError(i)},Xo=(i,e,t,r)=>{for(var o=r>1?void 0:r?yp(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&&fp(e,t,o),o},wp=(i,e,t)=>e.has(i)||dl("Cannot "+t),_p=(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),Yo=(i,e,t)=>(wp(i,e,"access private method"),t),ai,In,pl,bl;s.UUICardContentNodeElement=class extends s.UUICardElement{constructor(){super(...arguments),_p(this,ai),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
1954
2535
|
xmlns="http://www.w3.org/2000/svg"
|
|
1955
2536
|
viewBox="0 0 24 24"
|
|
1956
2537
|
fill="none"
|
|
@@ -1961,16 +2542,16 @@
|
|
|
1961
2542
|
id="icon">
|
|
1962
2543
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
1963
2544
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
1964
|
-
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return
|
|
2545
|
+
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return k(this,"uui-icon"),h`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}renderDetail(){return h`<small id="detail"
|
|
1965
2546
|
>${this.detail}<slot name="detail"></slot></small
|
|
1966
|
-
><slot id="default"></slot>`}render(){return
|
|
1967
|
-
${this.href?
|
|
2547
|
+
><slot id="default"></slot>`}render(){return h`
|
|
2548
|
+
${this.href?Yo(this,ai,bl).call(this):Yo(this,ai,pl).call(this)}
|
|
1968
2549
|
<!-- Select border must be right after #open-part -->
|
|
1969
2550
|
<div id="select-border"></div>
|
|
1970
|
-
${this.selectable?this.renderCheckbox():
|
|
2551
|
+
${this.selectable?this.renderCheckbox():C}
|
|
1971
2552
|
<slot name="tag"></slot>
|
|
1972
2553
|
<slot name="actions"></slot>
|
|
1973
|
-
`}},
|
|
2554
|
+
`}},ai=new WeakSet,In=function(){return h`
|
|
1974
2555
|
<span id="content" class="uui-text">
|
|
1975
2556
|
<span id="item">
|
|
1976
2557
|
<span id="icon">
|
|
@@ -1983,24 +2564,24 @@
|
|
|
1983
2564
|
</span>
|
|
1984
2565
|
${this.renderDetail()}
|
|
1985
2566
|
</span>
|
|
1986
|
-
`},
|
|
2567
|
+
`},pl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
1987
2568
|
<button
|
|
1988
2569
|
id="open-part"
|
|
1989
|
-
tabindex=${
|
|
2570
|
+
tabindex=${_(i)}
|
|
1990
2571
|
@click=${this.handleOpenClick}
|
|
1991
2572
|
@keydown=${this.handleOpenKeydown}>
|
|
1992
|
-
${
|
|
2573
|
+
${Yo(this,ai,In).call(this)}
|
|
1993
2574
|
</button>
|
|
1994
|
-
`},
|
|
2575
|
+
`},bl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
1995
2576
|
<a
|
|
1996
2577
|
id="open-part"
|
|
1997
|
-
tabindex=${
|
|
1998
|
-
href=${
|
|
1999
|
-
target=${
|
|
2000
|
-
rel=${
|
|
2001
|
-
${
|
|
2578
|
+
tabindex=${_(i)}
|
|
2579
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2580
|
+
target=${_(this.target||void 0)}
|
|
2581
|
+
rel=${_(this.rel||e)}>
|
|
2582
|
+
${Yo(this,ai,In).call(this)}
|
|
2002
2583
|
</a>
|
|
2003
|
-
`},
|
|
2584
|
+
`},s.UUICardContentNodeElement.styles=[...s.UUICardElement.styles,v`
|
|
2004
2585
|
:host {
|
|
2005
2586
|
min-width: 250px;
|
|
2006
2587
|
flex-direction: column;
|
|
@@ -2107,33 +2688,33 @@
|
|
|
2107
2688
|
top: var(--uui-size-5,15px);
|
|
2108
2689
|
left: var(--uui-size-6,18px);
|
|
2109
2690
|
}
|
|
2110
|
-
`],
|
|
2691
|
+
`],Xo([l({type:String})],s.UUICardContentNodeElement.prototype,"name",2),Xo([l({type:String})],s.UUICardContentNodeElement.prototype,"detail",2),Xo([w()],s.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),s.UUICardContentNodeElement=Xo([m("uui-card-content-node")],s.UUICardContentNodeElement);var $p=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,vl=i=>{throw TypeError(i)},Zi=(i,e,t,r)=>{for(var o=r>1?void 0:r?kp(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&&$p(e,t,o),o},Up=(i,e,t)=>e.has(i)||vl("Cannot "+t),Ep=(i,e,t)=>e.has(i)?vl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Zo=(i,e,t)=>(Up(i,e,"access private method"),t),li,ml,gl,Cn;s.UUICardMediaElement=class extends s.UUICardElement{constructor(){super(...arguments),Ep(this,li),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),k(this,"uui-symbol-folder"),k(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
|
|
2111
2692
|
id="entity-symbol"
|
|
2112
|
-
type="${this.fileExt}"></uui-symbol-file>`}render(){return
|
|
2693
|
+
type="${this.fileExt}"></uui-symbol-file>`}render(){return h` ${this.renderMedia()}
|
|
2113
2694
|
<slot @slotchange=${this.queryPreviews}></slot>
|
|
2114
|
-
${this.href?
|
|
2695
|
+
${this.href?Zo(this,li,gl).call(this):Zo(this,li,ml).call(this)}
|
|
2115
2696
|
<!-- Select border must be right after .open-part -->
|
|
2116
2697
|
<div id="select-border"></div>
|
|
2117
|
-
${this.selectable?this.renderCheckbox():
|
|
2698
|
+
${this.selectable?this.renderCheckbox():C}
|
|
2118
2699
|
<slot name="tag"></slot>
|
|
2119
|
-
<slot name="actions"></slot>`}},
|
|
2700
|
+
<slot name="actions"></slot>`}},li=new WeakSet,ml=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2120
2701
|
<button
|
|
2121
2702
|
id="open-part"
|
|
2122
|
-
tabindex=${
|
|
2703
|
+
tabindex=${_(i)}
|
|
2123
2704
|
@click=${this.handleOpenClick}
|
|
2124
2705
|
@keydown=${this.handleOpenKeydown}>
|
|
2125
|
-
${
|
|
2706
|
+
${Zo(this,li,Cn).call(this)}
|
|
2126
2707
|
</button>
|
|
2127
|
-
`},
|
|
2708
|
+
`},gl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2128
2709
|
<a
|
|
2129
2710
|
id="open-part"
|
|
2130
|
-
tabindex=${
|
|
2131
|
-
href=${
|
|
2132
|
-
target=${
|
|
2133
|
-
rel=${
|
|
2134
|
-
${
|
|
2711
|
+
tabindex=${_(i)}
|
|
2712
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2713
|
+
target=${_(this.target||void 0)}
|
|
2714
|
+
rel=${_(this.rel||e)}>
|
|
2715
|
+
${Zo(this,li,Cn).call(this)}
|
|
2135
2716
|
</a>
|
|
2136
|
-
`},
|
|
2717
|
+
`},Cn=function(){return h`
|
|
2137
2718
|
<div id="content" class="uui-text">
|
|
2138
2719
|
<!--
|
|
2139
2720
|
TODO: Implement info box when pop-out is ready
|
|
@@ -2141,7 +2722,7 @@
|
|
|
2141
2722
|
<span id="name" title="${this.name}">${this.name}</span>
|
|
2142
2723
|
<small id="detail">${this.detail}<slot name="detail"></slot></small>
|
|
2143
2724
|
</div>
|
|
2144
|
-
`},
|
|
2725
|
+
`},s.UUICardMediaElement.styles=[...s.UUICardElement.styles,v`
|
|
2145
2726
|
#entity-symbol {
|
|
2146
2727
|
align-self: center;
|
|
2147
2728
|
width: 60%;
|
|
@@ -2280,33 +2861,33 @@
|
|
|
2280
2861
|
height: var(--uui-size-8);
|
|
2281
2862
|
}
|
|
2282
2863
|
*/
|
|
2283
|
-
`],
|
|
2284
|
-
${this.href?
|
|
2864
|
+
`],Zi([l({type:String})],s.UUICardMediaElement.prototype,"name",2),Zi([l({type:String})],s.UUICardMediaElement.prototype,"detail",2),Zi([l({type:String,attribute:"file-ext"})],s.UUICardMediaElement.prototype,"fileExt",2),Zi([w()],s.UUICardMediaElement.prototype,"hasPreview",2),s.UUICardMediaElement=Zi([m("uui-card-media")],s.UUICardMediaElement);var xp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,fl=i=>{throw TypeError(i)},Sn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ip(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&&xp(e,t,o),o},Cp=(i,e,t)=>e.has(i)||fl("Cannot "+t),Sp=(i,e,t)=>e.has(i)?fl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Qo=(i,e,t)=>(Cp(i,e,"access private method"),t),ui,yl,wl,An;s.UUICardUserElement=class extends s.UUICardElement{constructor(){super(...arguments),Sp(this,ui),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=Td(e.target)}}connectedCallback(){super.connectedCallback(),k(this,"uui-avatar")}render(){return h`
|
|
2865
|
+
${this.href?Qo(this,ui,wl).call(this):Qo(this,ui,yl).call(this)}
|
|
2285
2866
|
<!-- Select border must be right after #open-part -->
|
|
2286
2867
|
<div id="select-border"></div>
|
|
2287
|
-
${this.selectable?this.renderCheckbox():
|
|
2868
|
+
${this.selectable?this.renderCheckbox():C}
|
|
2288
2869
|
<slot name="tag"></slot>
|
|
2289
2870
|
<slot name="actions"></slot>
|
|
2290
|
-
`}},
|
|
2871
|
+
`}},ui=new WeakSet,yl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2291
2872
|
<div
|
|
2292
2873
|
id="open-part"
|
|
2293
|
-
tabindex=${
|
|
2874
|
+
tabindex=${_(i)}
|
|
2294
2875
|
@click=${this.handleOpenClick}
|
|
2295
2876
|
@keydown=${this.handleOpenKeydown}>
|
|
2296
|
-
${
|
|
2877
|
+
${Qo(this,ui,An).call(this)}
|
|
2297
2878
|
</div>
|
|
2298
|
-
`},
|
|
2879
|
+
`},wl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2299
2880
|
<a
|
|
2300
2881
|
id="open-part"
|
|
2301
|
-
tabindex=${
|
|
2302
|
-
href=${
|
|
2303
|
-
target=${
|
|
2304
|
-
rel=${
|
|
2305
|
-
${
|
|
2882
|
+
tabindex=${_(i)}
|
|
2883
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2884
|
+
target=${_(this.target||void 0)}
|
|
2885
|
+
rel=${_(this.rel||e)}>
|
|
2886
|
+
${Qo(this,ui,An).call(this)}
|
|
2306
2887
|
</a>
|
|
2307
|
-
`},
|
|
2888
|
+
`},An=function(){return h`
|
|
2308
2889
|
<div id="content">
|
|
2309
|
-
${this._avatarSlotHasContent?
|
|
2890
|
+
${this._avatarSlotHasContent?C:h`<uui-avatar
|
|
2310
2891
|
class="avatar"
|
|
2311
2892
|
name=${this.name}
|
|
2312
2893
|
size="m"></uui-avatar>`}
|
|
@@ -2317,7 +2898,7 @@
|
|
|
2317
2898
|
<span title="${this.name}">${this.name}</span>
|
|
2318
2899
|
<slot></slot>
|
|
2319
2900
|
</div>
|
|
2320
|
-
`},
|
|
2901
|
+
`},s.UUICardUserElement.styles=[...s.UUICardElement.styles,v`
|
|
2321
2902
|
:host {
|
|
2322
2903
|
min-width: 250px;
|
|
2323
2904
|
}
|
|
@@ -2403,7 +2984,7 @@
|
|
|
2403
2984
|
margin-top: var(--uui-size-space-1,3px);
|
|
2404
2985
|
margin-bottom: var(--uui-size-space-2,6px);
|
|
2405
2986
|
}
|
|
2406
|
-
`],
|
|
2987
|
+
`],Sn([l({type:String})],s.UUICardUserElement.prototype,"name",2),Sn([w()],s.UUICardUserElement.prototype,"_avatarSlotHasContent",2),s.UUICardUserElement=Sn([m("uui-card-user")],s.UUICardUserElement);var Ap=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,_l=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pp(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&&Ap(e,t,o),o};s.UUICaretElement=class extends f{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
|
|
2407
2988
|
xmlns="http://www.w3.org/2000/svg"
|
|
2408
2989
|
viewBox="0 0 24 24"
|
|
2409
2990
|
fill="none"
|
|
@@ -2412,7 +2993,7 @@
|
|
|
2412
2993
|
stroke-linecap="round"
|
|
2413
2994
|
stroke-linejoin="round">
|
|
2414
2995
|
<path d="m4 9 8 8 8-8"></path>
|
|
2415
|
-
</svg>`}},
|
|
2996
|
+
</svg>`}},s.UUICaretElement.styles=[v`
|
|
2416
2997
|
:host {
|
|
2417
2998
|
display: inline-block;
|
|
2418
2999
|
width: 12px;
|
|
@@ -2426,27 +3007,27 @@
|
|
|
2426
3007
|
:host([open]) svg {
|
|
2427
3008
|
transform: rotate(180deg);
|
|
2428
3009
|
}
|
|
2429
|
-
`],
|
|
3010
|
+
`],_l([l({type:Boolean,reflect:!0})],s.UUICaretElement.prototype,"open",2),s.UUICaretElement=_l([m("uui-caret")],s.UUICaretElement);/**
|
|
2430
3011
|
* @license
|
|
2431
3012
|
* Copyright 2018 Google LLC
|
|
2432
3013
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2433
|
-
*/const
|
|
3014
|
+
*/const Pn=ei(class extends ti{constructor(i){var e;if(super(i),i.type!==me.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((n=>n!==""))));for(const n in e)e[n]&&!(!((t=this.nt)===null||t===void 0)&&t.has(n))&&this.it.add(n);return this.render(e)}const o=i.element.classList;this.it.forEach((n=>{n in e||(o.remove(n),this.it.delete(n))}));for(const n in e){const a=!!e[n];a===this.it.has(n)||!((r=this.nt)===null||r===void 0)&&r.has(n)||(a?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return te}});var Mp={grad:.9,turn:360,rad:360/(2*Math.PI)},Ge=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},ae=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},$l=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},kl=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)}},Mn=function(i){return{r:R(i.r),g:R(i.g),b:R(i.b),a:R(i.a,3)}},zp=/^#([0-9a-f]{3,8})$/i,Jo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Ul=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}},El=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}},xl=function(i){return{h:$l(i.h),s:ae(i.s,0,100),l:ae(i.l,0,100),a:ae(i.a)}},Il=function(i){return{h:R(i.h),s:R(i.s),l:R(i.l),a:R(i.a,3)}},Cl=function(i){return El((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},Qi=function(i){return{h:(e=Ul(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},Lp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Op=/^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,Np=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sl={string:[[function(i){var e=zp.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=Tp.exec(i)||Np.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:kl({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=Lp.exec(i)||Op.exec(i);if(!e)return null;var t,r,o=xl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Mp[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Cl(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 Ge(e)&&Ge(t)&&Ge(r)?kl({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(!Ge(e)||!Ge(t)||!Ge(r))return null;var a=xl({h:Number(e),s:Number(t),l:Number(r),a:Number(n)});return Cl(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,n=o===void 0?1:o;if(!Ge(e)||!Ge(t)||!Ge(r))return null;var a=(function(u){return{h:$l(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(n)});return El(a)},"hsv"]]},Al=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]},Bp=function(i){return typeof i=="string"?Al(i.trim(),Sl.string):typeof i=="object"&&i!==null?Al(i,Sl.object):[null,void 0]},zn=function(i,e){var t=Qi(i);return{h:t.h,s:ae(t.s+100*e,0,100),l:t.l,a:t.a}},Ln=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Pl=function(i,e){var t=Qi(i);return{h:t.h,s:t.s,l:ae(t.l+100*e,0,100),a:t.a}},Ml=(function(){function i(e){this.parsed=Bp(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(Ln(this.rgba),2)},i.prototype.isDark=function(){return Ln(this.rgba)<.5},i.prototype.isLight=function(){return Ln(this.rgba)>=.5},i.prototype.toHex=function(){return e=Mn(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?Jo(R(255*n)):"","#"+Jo(t)+Jo(r)+Jo(o)+a;var e,t,r,o,n,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,(n=e.a)<1?"rgba("+t+", "+r+", "+o+", "+n+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,n},i.prototype.toHsl=function(){return Il(Qi(this.rgba))},i.prototype.toHslString=function(){return e=Il(Qi(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=Ul(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 le({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),le(zn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),le(zn(this.rgba,-e))},i.prototype.grayscale=function(){return le(zn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),le(Pl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),le(Pl(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"?le({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=Qi(this.rgba);return typeof e=="number"?le({h:e,s:t.s,l:t.l,a:t.a}):R(t.h)},i.prototype.isEqual=function(e){return this.toHex()===le(e).toHex()},i})(),le=function(i){return i instanceof Ml?i:new Ml(i)};let On=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Vp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,Pe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dp(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&&Vp(e,t,o),o};s.UUIColorAreaElement=class extends f{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=le(e);if(r.isValid()){const{h:o,s:n,l:a,a:u}=r.toHsl();o!==0&&(this.hue=o),this.lightness=a,this.saturation=n,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:n}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,Ya(t,{onMove:(a,u)=>{isNaN(a)||isNaN(u)||(this.saturation=L(a/o*100,0,100),this.brightness=L(100-u/n*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=L(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=L(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=L(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=L(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}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)}syncValues(){const e=le({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new On(On.CHANGE))}getHexString(e,t,r,o=100){const n=le(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return n.isValid()?n.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return h`
|
|
2434
3015
|
<div
|
|
2435
3016
|
part="grid"
|
|
2436
3017
|
class="color-area"
|
|
2437
|
-
style=${
|
|
3018
|
+
style=${We({backgroundColor:this.getHexString(this.hue,100,50)})}
|
|
2438
3019
|
@mousedown=${this.handleGridDrag}
|
|
2439
3020
|
@touchstart=${this.handleGridDrag}>
|
|
2440
3021
|
<span
|
|
2441
3022
|
part="grid-handle"
|
|
2442
|
-
class=${
|
|
2443
|
-
style=${
|
|
3023
|
+
class=${Pn({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}
|
|
3024
|
+
style=${We({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}
|
|
2444
3025
|
role="application"
|
|
2445
|
-
tabindex=${
|
|
3026
|
+
tabindex=${_(this.disabled?void 0:"0")}
|
|
2446
3027
|
aria-label="HSB"
|
|
2447
3028
|
@keydown=${this.handleGridKeyDown}></span>
|
|
2448
3029
|
</div>
|
|
2449
|
-
`}},
|
|
3030
|
+
`}},s.UUIColorAreaElement.styles=[v`
|
|
2450
3031
|
:host {
|
|
2451
3032
|
display: inline-block;
|
|
2452
3033
|
width: 280px;
|
|
@@ -2502,17 +3083,13 @@
|
|
|
2502
3083
|
.color-area__handle--empty {
|
|
2503
3084
|
display: none;
|
|
2504
3085
|
}
|
|
2505
|
-
`],
|
|
2506
|
-
* @license
|
|
2507
|
-
* Copyright 2020 Google LLC
|
|
2508
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2509
|
-
*/const{I:ld}=Iu,xa=i=>i.strings===void 0,Ia=()=>document.createComment(""),wi=(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(Ia(),s),u=o.insertBefore(Ia(),s);t=new ld(a,u,i,i.options)}else{const a=t._$AB.nextSibling,u=t._$AM,h=u!==i;if(h){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||h){let d=t._$AA;for(;d!==a;){const m=d.nextSibling;o.insertBefore(d,s),d=m}}}return t},ut=(i,e,t=i)=>(i._$AI(e,t),i),ud={},Ca=(i,e=ud)=>i._$AH=e,cd=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}};/**
|
|
3086
|
+
`],Pe([w()],s.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),Pe([l({type:Boolean,reflect:!0})],s.UUIColorAreaElement.prototype,"disabled",2),Pe([l({type:Boolean,reflect:!0})],s.UUIColorAreaElement.prototype,"readonly",2),Pe([l({type:Number})],s.UUIColorAreaElement.prototype,"hue",2),Pe([l({type:Number})],s.UUIColorAreaElement.prototype,"saturation",2),Pe([l({type:Number})],s.UUIColorAreaElement.prototype,"lightness",2),Pe([l({type:Number})],s.UUIColorAreaElement.prototype,"brightness",2),Pe([l({type:Number})],s.UUIColorAreaElement.prototype,"alpha",2),Pe([l({type:String})],s.UUIColorAreaElement.prototype,"value",1),s.UUIColorAreaElement=Pe([m("uui-color-area")],s.UUIColorAreaElement);/**
|
|
2510
3087
|
* @license
|
|
2511
3088
|
* Copyright 2020 Google LLC
|
|
2512
3089
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2513
|
-
*/const hd=Pt(class extends zt{constructor(i){if(super(i),i.type!==ue.PROPERTY&&i.type!==ue.ATTRIBUTE&&i.type!==ue.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!xa(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===Q||e===M)return e;const t=i.element,r=i.name;if(i.type===ue.PROPERTY){if(e===t[r])return Q}else if(i.type===ue.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Q}else if(i.type===ue.ATTRIBUTE&&t.getAttribute(r)===e+"")return Q;return Ca(i),e}});var dd={grad:.9,turn:360,rad:360/(2*Math.PI)},Ie=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},Sa=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Aa=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)}},Hr=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,fo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Pa=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}},za=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),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,u,a,a,h,r][d],g:255*[h,r,r,u,a,a][d],b:255*[a,a,h,r,r,u][d],a:o}},Oa=function(i){return{h:Sa(i.h),s:re(i.s,0,100),l:re(i.l,0,100),a:re(i.a)}},La=function(i){return{h:j(i.h),s:j(i.s),l:j(i.l),a:j(i.a,3)}},Ma=function(i){return za((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},$i=function(i){return{h:(e=Pa(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},bd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vd=/^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,jr={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=vd.exec(i)||gd.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Aa({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=bd.exec(i)||md.exec(i);if(!e)return null;var t,r,o=Oa({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(dd[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Ma(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 Ie(e)&&Ie(t)&&Ie(r)?Aa({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(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=Oa({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return Ma(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=(function(u){return{h:Sa(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 za(a)},"hsv"]]},Ta=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]},fd=function(i){return typeof i=="string"?Ta(i.trim(),jr.string):typeof i=="object"&&i!==null?Ta(i,jr.object):[null,void 0]},Rr=function(i,e){var t=$i(i);return{h:t.h,s:re(t.s+100*e,0,100),l:t.l,a:t.a}},Fr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Na=function(i,e){var t=$i(i);return{h:t.h,s:t.s,l:re(t.l+100*e,0,100),a:t.a}},yo=(function(){function i(e){this.parsed=fd(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(Fr(this.rgba),2)},i.prototype.isDark=function(){return Fr(this.rgba)<.5},i.prototype.isLight=function(){return Fr(this.rgba)>=.5},i.prototype.toHex=function(){return e=Hr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?fo(j(255*s)):"","#"+fo(t)+fo(r)+fo(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Hr(this.rgba)},i.prototype.toRgbString=function(){return e=Hr(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 La($i(this.rgba))},i.prototype.toHslString=function(){return e=La($i(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=Pa(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 ce({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),ce(Rr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ce(Rr(this.rgba,-e))},i.prototype.grayscale=function(){return ce(Rr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ce(Na(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ce(Na(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"?ce({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=$i(this.rgba);return typeof e=="number"?ce({h:e,s:t.s,l:t.l,a:t.a}):j(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ce(e).toHex()},i})(),ce=function(i){return i instanceof yo?i:new yo(i)},Ba=[],yd=function(i){i.forEach(function(e){Ba.indexOf(e)<0&&(e(yo,jr),Ba.push(e))})};function wd(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,h,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 _ in t)s[_]=new i(t[_]).toRgb();for(var x in t){var C=(u=m,h=s[x],Math.pow(u.r-h.r,2)+Math.pow(u.g-h.g,2)+Math.pow(u.b-h.b,2));C<v&&(v=C,y=x)}return y}},e.string.push([function(a){var u=a.toLowerCase(),h=u==="transparent"?"#0000":t[u];return h?new i(h).toRgb():null},"name"])}let _i=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var $d=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,B=(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&&$d(e,t,o),o};yd([wd]);const Da="EyeDropper"in window;n.UUIColorPickerElement=class extends ve("label",g){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=ce("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(),U(this,"uui-icon"),U(this,"uui-icon-registry-essential"),U(this,"uui-input"),U(this,"uui-button"),U(this,"uui-button-group"),U(this,"uui-color-swatches"),U(this,"uui-color-swatch"),U(this,"uui-color-area"),U(this,"uui-color-slider"),U(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,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(${h}, ${d}%, ${m}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${h}, ${d}%, ${m}%)`);case"hsva":return this.setLetterCase(`hsva(${h}, ${d}%, ${v}%, ${y})`);default:return""}}getBrightness(e){return z(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return z((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(){Da&&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 _i(_i.CHANGE)),!0;const t=new yo(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 _i(_i.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const s=ce(`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 c`
|
|
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`
|
|
2514
3091
|
<div
|
|
2515
|
-
class=${
|
|
3092
|
+
class=${Pn({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}
|
|
2516
3093
|
aria-disabled=${this.disabled?"true":"false"}>
|
|
2517
3094
|
<uui-color-area
|
|
2518
3095
|
.value="${this.value}"
|
|
@@ -2532,7 +3109,7 @@
|
|
|
2532
3109
|
?readonly=${this.readonly}
|
|
2533
3110
|
@change=${this.handleHueChange}>
|
|
2534
3111
|
</uui-color-slider>
|
|
2535
|
-
${this.opacity?
|
|
3112
|
+
${this.opacity?h`
|
|
2536
3113
|
<uui-color-slider
|
|
2537
3114
|
hide-value-label
|
|
2538
3115
|
label="alpha"
|
|
@@ -2552,7 +3129,7 @@
|
|
|
2552
3129
|
class="color-picker__preview color-picker__transparent-bg"
|
|
2553
3130
|
title="Copy"
|
|
2554
3131
|
aria-label="Copy"
|
|
2555
|
-
style=${
|
|
3132
|
+
style=${We({"--preview-color":e})}
|
|
2556
3133
|
@click=${this.handleCopy}></button>
|
|
2557
3134
|
</div>
|
|
2558
3135
|
<div class="color-picker__user-input" aria-live="polite">
|
|
@@ -2564,14 +3141,14 @@
|
|
|
2564
3141
|
autocomplete="off"
|
|
2565
3142
|
autocapitalize="off"
|
|
2566
3143
|
spellcheck="false"
|
|
2567
|
-
.value=${
|
|
3144
|
+
.value=${jp(this.inputValue)}
|
|
2568
3145
|
?disabled=${this.disabled}
|
|
2569
3146
|
?readonly=${this.readonly}
|
|
2570
3147
|
@keydown=${this.handleInputKeyDown}
|
|
2571
3148
|
@change=${this.handleInputChange}>
|
|
2572
3149
|
</uui-input>
|
|
2573
3150
|
<uui-button-group>
|
|
2574
|
-
${this.noFormatToggle?"":
|
|
3151
|
+
${this.noFormatToggle?"":h`<uui-button
|
|
2575
3152
|
label="Toggle color format"
|
|
2576
3153
|
@click=${this.handleFormatToggle}
|
|
2577
3154
|
class="color-picker__toggle-format"
|
|
@@ -2579,7 +3156,7 @@
|
|
|
2579
3156
|
compact>
|
|
2580
3157
|
<span>${this.format}</span>
|
|
2581
3158
|
</uui-button>`}
|
|
2582
|
-
${
|
|
3159
|
+
${Rl?h`<uui-button
|
|
2583
3160
|
label="Select a color"
|
|
2584
3161
|
?disabled=${this.disabled||this.readonly}
|
|
2585
3162
|
@click=${this.handleEyeDropper}
|
|
@@ -2592,28 +3169,28 @@
|
|
|
2592
3169
|
</div>
|
|
2593
3170
|
${this._renderSwatches()}
|
|
2594
3171
|
</div>
|
|
2595
|
-
`}_renderSwatches(){return this.swatches?.length?
|
|
3172
|
+
`}_renderSwatches(){return this.swatches?.length?h`<uui-color-swatches
|
|
2596
3173
|
id="swatches"
|
|
2597
3174
|
class="color-picker__swatches"
|
|
2598
3175
|
label="Swatches"
|
|
2599
3176
|
?disabled=${this.disabled}
|
|
2600
3177
|
?readonly=${this.readonly}
|
|
2601
3178
|
@change=${this.handleColorSwatchChange}>
|
|
2602
|
-
${this.swatches.map(e=>
|
|
3179
|
+
${this.swatches.map(e=>h`<uui-color-swatch label="${e}" .value=${e}>
|
|
2603
3180
|
</uui-color-swatch>`)}
|
|
2604
|
-
</uui-color-swatches>`:
|
|
3181
|
+
</uui-color-swatches>`:C}_renderPreviewButton(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return h`<button
|
|
2605
3182
|
type="button"
|
|
2606
3183
|
part="trigger"
|
|
2607
3184
|
aria-label="${this.label||"Open Color picker"}"
|
|
2608
|
-
class=${
|
|
2609
|
-
style=${
|
|
3185
|
+
class=${Pn({"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})}
|
|
3186
|
+
style=${We({"--preview-color":e})}
|
|
2610
3187
|
?disabled=${this.disabled}
|
|
2611
3188
|
aria-haspopup="true"
|
|
2612
3189
|
aria-expanded="false"
|
|
2613
3190
|
popovertarget="color-picker-popover"></button>
|
|
2614
3191
|
<uui-popover-container id="color-picker-popover">
|
|
2615
3192
|
${this._renderColorPicker()}
|
|
2616
|
-
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},
|
|
3193
|
+
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},s.UUIColorPickerElement.styles=[v`
|
|
2617
3194
|
:host {
|
|
2618
3195
|
--uui-look-outline-border: #ddd;
|
|
2619
3196
|
--uui-look-outline-border-hover: #aaa;
|
|
@@ -2764,7 +3341,7 @@
|
|
|
2764
3341
|
uui-color-area {
|
|
2765
3342
|
width: 100%;
|
|
2766
3343
|
}
|
|
2767
|
-
`],B([A('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),B([A(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),B([A("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),B([w()],n.UUIColorPickerElement.prototype,"inputValue",2),B([w()],n.UUIColorPickerElement.prototype,"hue",2),B([w()],n.UUIColorPickerElement.prototype,"saturation",2),B([w()],n.UUIColorPickerElement.prototype,"lightness",2),B([w()],n.UUIColorPickerElement.prototype,"alpha",2),B([w()],n.UUIColorPickerElement.prototype,"_colord",2),B([l()],n.UUIColorPickerElement.prototype,"value",1),B([l()],n.UUIColorPickerElement.prototype,"format",2),B([l()],n.UUIColorPickerElement.prototype,"name",2),B([l()],n.UUIColorPickerElement.prototype,"size",2),B([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),B([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),B([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),B([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),B([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"readonly",2),B([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),B([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=B([p("uui-color-picker")],n.UUIColorPickerElement);var Ud={grad:.9,turn:360,rad:360/(2*Math.PI)},Ce=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},ne=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Va=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Ha=function(i){return{r:ne(i.r,0,255),g:ne(i.g,0,255),b:ne(i.b,0,255),a:ne(i.a)}},Gr=function(i){return{r:R(i.r),g:R(i.g),b:R(i.b),a:R(i.a,3)}},kd=/^#([0-9a-f]{3,8})$/i,wo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ja=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}},Ra=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),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,u,a,a,h,r][d],g:255*[h,r,r,u,a,a][d],b:255*[a,a,h,r,r,u][d],a:o}},Fa=function(i){return{h:Va(i.h),s:ne(i.s,0,100),l:ne(i.l,0,100),a:ne(i.a)}},Ga=function(i){return{h:R(i.h),s:R(i.s),l:R(i.l),a:R(i.a,3)}},Wa=function(i){return Ra((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},Ui=function(i){return{h:(e=ja(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},Ed=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Id=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Cd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qa={string:[[function(i){var e=kd.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=Id.exec(i)||Cd.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ha({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=Ed.exec(i)||xd.exec(i);if(!e)return null;var t,r,o=Fa({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Ud[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Wa(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 Ce(e)&&Ce(t)&&Ce(r)?Ha({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(!Ce(e)||!Ce(t)||!Ce(r))return null;var a=Fa({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return Wa(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ce(e)||!Ce(t)||!Ce(r))return null;var a=(function(u){return{h:Va(u.h),s:ne(u.s,0,100),v:ne(u.v,0,100),a:ne(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return Ra(a)},"hsv"]]},Ka=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]},Sd=function(i){return typeof i=="string"?Ka(i.trim(),qa.string):typeof i=="object"&&i!==null?Ka(i,qa.object):[null,void 0]},Wr=function(i,e){var t=Ui(i);return{h:t.h,s:ne(t.s+100*e,0,100),l:t.l,a:t.a}},qr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Xa=function(i,e){var t=Ui(i);return{h:t.h,s:t.s,l:ne(t.l+100*e,0,100),a:t.a}},Kr=(function(){function i(e){this.parsed=Sd(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(qr(this.rgba),2)},i.prototype.isDark=function(){return qr(this.rgba)<.5},i.prototype.isLight=function(){return qr(this.rgba)>=.5},i.prototype.toHex=function(){return e=Gr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?wo(R(255*s)):"","#"+wo(t)+wo(r)+wo(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Gr(this.rgba)},i.prototype.toRgbString=function(){return e=Gr(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 Ga(Ui(this.rgba))},i.prototype.toHslString=function(){return e=Ga(Ui(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=ja(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 Se({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),Se(Wr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Se(Wr(this.rgba,-e))},i.prototype.grayscale=function(){return Se(Wr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Se(Xa(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Se(Xa(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"?Se({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=Ui(this.rgba);return typeof e=="number"?Se({h:e,s:t.s,l:t.l,a:t.a}):R(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Se(e).toHex()},i})(),Se=function(i){return i instanceof Kr?i:new Kr(i)};let Xr=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Ad=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,he=(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&&Ad(e,t,o),o};n.UUIColorSliderElement=class extends ve("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 Kr(this.color),{h:r,s:o,l:s}=t.toHsl(),{r:a,g:u,b:h}=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}, ${h}, ${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(),Ks(this.container,{onMove:(o,s)=>{this.vertical?this.value=Xs(z(s/r*this.max,this.min,this.max),this.min,this.max):this.value=z(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=z(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=z(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=z(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=z(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 z(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return z(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 Xr(Xr.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Xs(this.value,this.min,this.max):this.max/this.value)}render(){return c`<div
|
|
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
|
|
2768
3345
|
part="slider"
|
|
2769
3346
|
id="color-slider"
|
|
2770
3347
|
role="slider"
|
|
@@ -2777,17 +3354,17 @@
|
|
|
2777
3354
|
@mousedown=${this.handleDrag}
|
|
2778
3355
|
@touchstart=${this.handleDrag}
|
|
2779
3356
|
@keydown=${this.handleKeyDown}>
|
|
2780
|
-
${this.type==="opacity"?
|
|
3357
|
+
${this.type==="opacity"?h`<div
|
|
2781
3358
|
id="current-hue"
|
|
2782
|
-
style=${
|
|
3359
|
+
style=${We({backgroundImage:"var(--uui-slider-hue-color)"})}></div>`:""}
|
|
2783
3360
|
<!-- <slot name="detail"> </slot> -->
|
|
2784
3361
|
<span
|
|
2785
3362
|
id="color-slider__handle"
|
|
2786
3363
|
style="--current-value: ${this.cssPropCurrentValue}%;"
|
|
2787
|
-
tabindex=${
|
|
3364
|
+
tabindex=${_(this.disabled?void 0:"0")}>
|
|
2788
3365
|
</span>
|
|
2789
3366
|
</div>
|
|
2790
|
-
${this.hideValueLabel?null:Math.round(this.value)}`}},
|
|
3367
|
+
${this.hideValueLabel?null:Math.round(this.value)}`}},s.UUIColorSliderElement.styles=[v`
|
|
2791
3368
|
:host {
|
|
2792
3369
|
--uui-slider-height: 15px;
|
|
2793
3370
|
--uui-slider-handle-size: 17px;
|
|
@@ -2901,14 +3478,14 @@
|
|
|
2901
3478
|
position: absolute;
|
|
2902
3479
|
inset: 0 0 0 0;
|
|
2903
3480
|
}
|
|
2904
|
-
`],
|
|
3481
|
+
`],ye([l({reflect:!0})],s.UUIColorSliderElement.prototype,"type",2),ye([l()],s.UUIColorSliderElement.prototype,"color",2),ye([l({type:Number})],s.UUIColorSliderElement.prototype,"min",2),ye([l({type:Number})],s.UUIColorSliderElement.prototype,"max",2),ye([l({type:Number})],s.UUIColorSliderElement.prototype,"precision",2),ye([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"vertical",2),ye([l({type:Number})],s.UUIColorSliderElement.prototype,"value",2),ye([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"readonly",2),ye([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"disabled",2),ye([l({type:Boolean,attribute:"hide-value-label",reflect:!0})],s.UUIColorSliderElement.prototype,"hideValueLabel",2),s.UUIColorSliderElement=ye([m("uui-color-slider")],s.UUIColorSliderElement);/**
|
|
2905
3482
|
* @license
|
|
2906
3483
|
* Copyright 2017 Google LLC
|
|
2907
3484
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2908
|
-
*/const
|
|
3485
|
+
*/const io=(i,e)=>{var t,r;const o=i._$AN;if(o===void 0)return!1;for(const n of o)(r=(t=n)._$AO)===null||r===void 0||r.call(t,e,!1),io(n,e);return!0},or=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},eu=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),cb(e)}};function lb(i){this._$AN!==void 0?(or(this),this._$AM=i,eu(this)):this._$AM=i}function ub(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 n=t;n<r.length;n++)io(r[n],!1),or(r[n]);else r!=null&&(io(r,!1),or(r));else io(this,i)}const cb=i=>{var e,t,r,o;i.type==me.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=ub),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=lb))};let hb=class extends ti{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),eu(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&&(io(this,e),or(this))}setValue(e){if(Ta(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 Wn=new WeakMap,rr=ei(class extends hb{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=Wn.get(t);r===void 0&&(r=new WeakMap,Wn.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=Wn.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 db=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,tu=i=>{throw TypeError(i)},ci=(i,e,t,r)=>{for(var o=r>1?void 0:r?pb(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&&db(e,t,o),o},bb=(i,e,t)=>e.has(i)||tu("Cannot "+t),vb=(i,e,t)=>e.has(i)?tu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),mb=(i,e,t)=>(bb(i,e,"access private method"),t),Gn,iu;s.UUIColorSwatchElement=class extends Ee("label",Xt(Vi(f))){constructor(){super(),vb(this,Gn),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`
|
|
2909
3486
|
<button
|
|
2910
3487
|
id="swatch"
|
|
2911
|
-
${
|
|
3488
|
+
${rr(mb(this,Gn,iu))}
|
|
2912
3489
|
aria-label=${this.label}
|
|
2913
3490
|
?disabled="${this.disabled}"
|
|
2914
3491
|
title="${this.label}">
|
|
@@ -2919,15 +3496,15 @@
|
|
|
2919
3496
|
<div
|
|
2920
3497
|
class="color-swatch__check"
|
|
2921
3498
|
style="color: var(--uui-swatch-color, ${this.color??this.value})">
|
|
2922
|
-
${
|
|
3499
|
+
${Wo}
|
|
2923
3500
|
</div>
|
|
2924
3501
|
</div>
|
|
2925
3502
|
${this._renderWithLabel()}
|
|
2926
3503
|
</button>
|
|
2927
|
-
`}_renderWithLabel(){return this.showLabel?
|
|
3504
|
+
`}_renderWithLabel(){return this.showLabel?h`<div class="color-swatch__label">
|
|
2928
3505
|
<strong>${this.renderLabel()}</strong>
|
|
2929
3506
|
${this.value}
|
|
2930
|
-
</div>`:
|
|
3507
|
+
</div>`:C}},Gn=new WeakSet,iu=function(i){this.selectableTarget=i||this},s.UUIColorSwatchElement.styles=[v`
|
|
2931
3508
|
:host {
|
|
2932
3509
|
position: relative;
|
|
2933
3510
|
display: inline-flex;
|
|
@@ -3090,19 +3667,19 @@
|
|
|
3090
3667
|
white-space: nowrap;
|
|
3091
3668
|
box-sizing: border-box;
|
|
3092
3669
|
}
|
|
3093
|
-
`],
|
|
3670
|
+
`],ci([l()],s.UUIColorSwatchElement.prototype,"value",1),ci([l()],s.UUIColorSwatchElement.prototype,"color",1),ci([l({type:Boolean,reflect:!0})],s.UUIColorSwatchElement.prototype,"disabled",2),ci([l({type:Boolean,reflect:!0})],s.UUIColorSwatchElement.prototype,"readonly",2),ci([l({type:Boolean,attribute:"show-label",reflect:!0})],s.UUIColorSwatchElement.prototype,"showLabel",2),s.UUIColorSwatchElement=ci([m("uui-color-swatch")],s.UUIColorSwatchElement);let oo=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var gb=Object.defineProperty,fb=Object.getOwnPropertyDescriptor,ro=(i,e,t,r)=>{for(var o=r>1?void 0:r?fb(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&&gb(e,t,o),o};s.UUIColorSwatchesElement=class extends Ee("label",f){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 oo(oo.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 oo(oo.CHANGE))))},this.addEventListener(Zt.SELECTED,this._onSelected),this.addEventListener(Zt.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>`}},s.UUIColorSwatchesElement.styles=[v`
|
|
3094
3671
|
:host {
|
|
3095
3672
|
display: flex;
|
|
3096
3673
|
flex-wrap: wrap;
|
|
3097
3674
|
gap: 0.4rem;
|
|
3098
3675
|
}
|
|
3099
|
-
`],
|
|
3676
|
+
`],ro([l()],s.UUIColorSwatchesElement.prototype,"value",2),ro([l({type:Boolean,reflect:!0})],s.UUIColorSwatchesElement.prototype,"disabled",2),ro([l({type:Boolean,reflect:!0})],s.UUIColorSwatchesElement.prototype,"readonly",2),ro([Be({selector:"uui-color-swatch"})],s.UUIColorSwatchesElement.prototype,"_swatches",2),s.UUIColorSwatchesElement=ro([m("uui-color-swatches")],s.UUIColorSwatchesElement);let we=class extends M{static{this.CHANGE="change"}static{this.INNER_SLOT_CHANGE="inner-slot-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var yb=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,ou=i=>{throw TypeError(i)},at=(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&&yb(e,t,o),o},_b=(i,e,t)=>e.has(i)||ou("Cannot "+t),$b=(i,e,t)=>e.has(i)?ou("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ru=(i,e,t)=>(_b(i,e,"access private method"),t),nr,qn;s.UUIComboboxListElement=class extends f{constructor(){super(...arguments),$b(this,nr),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{ru(this,nr,qn).call(this),this._updateSelection(),this.dispatchEvent(new we(we.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 we(we.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new we(we.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(Zt.SELECTED,this._onSelected),this.addEventListener(Zt.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Zt.SELECTED,this._onSelected),this.removeEventListener(Zt.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,ru(this,nr,qn).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return h` <slot @slotchange=${this._onSlotChange}></slot> `}},nr=new WeakSet,qn=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)},s.UUIComboboxListElement.styles=[v`
|
|
3100
3677
|
:host {
|
|
3101
3678
|
display: flex;
|
|
3102
3679
|
flex-direction: column;
|
|
3103
3680
|
box-sizing: border-box;
|
|
3104
3681
|
}
|
|
3105
|
-
`],
|
|
3682
|
+
`],at([l()],s.UUIComboboxListElement.prototype,"value",1),at([l({type:String})],s.UUIComboboxListElement.prototype,"displayValue",2),at([l({attribute:!1})],s.UUIComboboxListElement.prototype,"for",1),at([Be({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],s.UUIComboboxListElement.prototype,"_options",2),at([Be({flatten:!0,selector:"uui-combobox-list-option[active]"})],s.UUIComboboxListElement.prototype,"_activeOptions",2),at([w()],s.UUIComboboxListElement.prototype,"_value",2),at([w()],s.UUIComboboxListElement.prototype,"_activeElementValue",2),s.UUIComboboxListElement=at([m("uui-combobox-list")],s.UUIComboboxListElement);var kb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,hi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ub(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&&kb(e,t,o),o};s.UUIComboboxListOptionElement=class extends Xt(Vi(f)){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>`}},s.UUIComboboxListOptionElement.styles=[v`
|
|
3106
3683
|
:host {
|
|
3107
3684
|
position: relative;
|
|
3108
3685
|
cursor: pointer;
|
|
@@ -3184,7 +3761,7 @@
|
|
|
3184
3761
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
3185
3762
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
3186
3763
|
}
|
|
3187
|
-
`],
|
|
3764
|
+
`],hi([w()],s.UUIComboboxListOptionElement.prototype,"_disabled",2),hi([w()],s.UUIComboboxListOptionElement.prototype,"_displayValue",2),hi([l({type:String})],s.UUIComboboxListOptionElement.prototype,"value",1),hi([l({type:String,attribute:"display-value"})],s.UUIComboboxListOptionElement.prototype,"displayValue",1),hi([l({type:Boolean,reflect:!0})],s.UUIComboboxListOptionElement.prototype,"disabled",1),s.UUIComboboxListOptionElement=hi([m("uui-combobox-list-option")],s.UUIComboboxListOptionElement);let _e=class extends M{static{this.SEARCH="search"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Eb=Object.defineProperty,xb=Object.getOwnPropertyDescriptor,nu=i=>{throw TypeError(i)},X=(i,e,t,r)=>{for(var o=r>1?void 0:r?xb(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&&Eb(e,t,o),o},Kn=(i,e,t)=>e.has(i)||nu("Cannot "+t),E=(i,e,t)=>(Kn(i,e,"read from private field"),t?t.call(i):e.get(i)),q=(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),su=(i,e,t,r)=>(Kn(i,e,"write to private field"),e.set(i,t),t),sr=(i,e,t)=>(Kn(i,e,"access private method"),t),ee,di,pi,au,no,ar,lr,ur,Xn,cr,hr,Yn,so,bi,Zn,dr,pr,Qn,br;s.UUIComboboxElement=class extends xe(f,""){constructor(){super(...arguments),q(this,pi),this.closeLabel="Close",this.disabled=!1,this.hideExpandSymbol=!1,this.readonly=!1,this.placeholder="",q(this,ee),q(this,di),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,q(this,no,()=>{this._isPhone=E(this,di).matches}),q(this,lr,()=>requestAnimationFrame(()=>this._input.focus())),q(this,ur,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||E(this,bi).call(this)})),q(this,Xn,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new _e(_e.SEARCH)),E(this,so).call(this)}),q(this,cr,()=>{this.value&&this.value!==E(this,ee)?.value&&sr(this,pi,ar).call(this)}),q(this,hr,()=>{this.value=E(this,ee)?.value||"",this.search=this.value?this.search:"",E(this,bi).call(this),this.dispatchEvent(new _e(_e.CHANGE))}),q(this,Yn,()=>{this.readonly||(this.open=!this.open)}),q(this,so,()=>{this.open||this.readonly||(this.open=!0)}),q(this,bi,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new _e(_e.SEARCH)))}),q(this,Zn,e=>{if(this.open===!1&&e.code==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.code==="ArrowUp"||e.code==="ArrowDown")&&E(this,so).call(this),e.code==="Space"){if(this._isOpen)return;e.preventDefault(),e.stopImmediatePropagation(),E(this,so).call(this)}(e.code==="Escape"||e.code==="Enter")&&E(this,bi).call(this)}),q(this,dr,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 _e(_e.SEARCH)),this.dispatchEvent(new _e(_e.CHANGE)))}),q(this,pr,()=>h`<uui-input
|
|
3188
3765
|
slot="trigger"
|
|
3189
3766
|
id="combobox-input"
|
|
3190
3767
|
label="combobox-input"
|
|
@@ -3195,44 +3772,44 @@
|
|
|
3195
3772
|
.disabled=${this.disabled}
|
|
3196
3773
|
.readonly=${this.readonly}
|
|
3197
3774
|
popovertarget="combobox-popover"
|
|
3198
|
-
@click=${E(this,
|
|
3199
|
-
@input=${E(this,
|
|
3200
|
-
@keydown=${E(this,
|
|
3775
|
+
@click=${E(this,Yn)}
|
|
3776
|
+
@input=${E(this,Xn)}
|
|
3777
|
+
@keydown=${E(this,Zn)}>
|
|
3201
3778
|
<slot name="input-prepend" slot="prepend"></slot>
|
|
3202
|
-
${E(this,
|
|
3203
|
-
${this.hideExpandSymbol?
|
|
3779
|
+
${E(this,Qn).call(this)}
|
|
3780
|
+
${this.hideExpandSymbol?C:h`<div id="expand-symbol-wrapper" slot="append">
|
|
3204
3781
|
<uui-symbol-expand .open=${this._isOpen}></uui-symbol-expand>
|
|
3205
3782
|
</div>`}
|
|
3206
3783
|
<slot name="input-append" slot="append"></slot>
|
|
3207
|
-
</uui-input>`),
|
|
3784
|
+
</uui-input>`),q(this,Qn,()=>this.disabled||this.readonly?C:h`<uui-button
|
|
3208
3785
|
id="clear-button"
|
|
3209
|
-
@click=${E(this,
|
|
3210
|
-
@keydown=${E(this,
|
|
3786
|
+
@click=${E(this,dr)}
|
|
3787
|
+
@keydown=${E(this,dr)}
|
|
3211
3788
|
label="clear"
|
|
3212
3789
|
slot="append"
|
|
3213
3790
|
compact
|
|
3214
3791
|
style="height: 100%;"
|
|
3215
3792
|
tabindex=${this.value||this.search?"":"-1"}
|
|
3216
3793
|
class=${this.value||this.search?"visible":""}>
|
|
3217
|
-
<uui-icon name="remove" .fallback=${
|
|
3218
|
-
</uui-button>`),
|
|
3794
|
+
<uui-icon name="remove" .fallback=${kn.strings[0]}></uui-icon>
|
|
3795
|
+
</uui-button>`),q(this,br,()=>h`<div id="dropdown">
|
|
3219
3796
|
<uui-scroll-container tabindex="-1" id="scroll-container">
|
|
3220
|
-
<slot @slotchange=${
|
|
3797
|
+
<slot @slotchange=${sr(this,pi,au)}></slot>
|
|
3221
3798
|
</uui-scroll-container>
|
|
3222
|
-
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&
|
|
3223
|
-
<uui-button label="close" look="primary" @click=${E(this,
|
|
3799
|
+
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&sr(this,pi,ar).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,ur)),this.addEventListener("mousedown",E(this,lr)),su(this,di,window.matchMedia("(max-width: 600px)")),E(this,no).call(this),E(this,di).addEventListener("change",E(this,no)),k(this,"uui-icon"),k(this,"uui-input"),k(this,"uui-button"),k(this,"uui-combobox-list"),k(this,"uui-scroll-container"),k(this,"uui-popover-container"),k(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",E(this,ur)),this.removeEventListener("mousedown",E(this,lr)),E(this,di).removeEventListener("change",E(this,no))}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">
|
|
3800
|
+
<uui-button label="close" look="primary" @click=${E(this,bi)}>
|
|
3224
3801
|
${this.closeLabel}
|
|
3225
3802
|
</uui-button>
|
|
3226
|
-
${E(this,
|
|
3227
|
-
</div>`:
|
|
3228
|
-
${E(this,
|
|
3803
|
+
${E(this,pr).call(this)} ${E(this,br).call(this)}
|
|
3804
|
+
</div>`:h`
|
|
3805
|
+
${E(this,pr).call(this)}
|
|
3229
3806
|
<uui-popover-container
|
|
3230
3807
|
id="combobox-popover"
|
|
3231
3808
|
popover="manual"
|
|
3232
3809
|
placement="bottom-end">
|
|
3233
|
-
${E(this,
|
|
3810
|
+
${E(this,br).call(this)}
|
|
3234
3811
|
</uui-popover-container>
|
|
3235
|
-
`}},
|
|
3812
|
+
`}},ee=new WeakMap,di=new WeakMap,pi=new WeakSet,au=function(){E(this,ee)&&(E(this,ee).removeEventListener(we.CHANGE,E(this,hr)),E(this,ee).removeEventListener(we.INNER_SLOT_CHANGE,E(this,cr)));const i=this._comboboxListElements?.[0];i&&(su(this,ee,i),E(this,ee).for=this,E(this,ee).addEventListener(we.CHANGE,E(this,hr)),E(this,ee).addEventListener(we.INNER_SLOT_CHANGE,E(this,cr))),this.updateComplete.then(()=>{sr(this,pi,ar).call(this)})},no=new WeakMap,ar=function(){E(this,ee)&&(E(this,ee).value=this.value,requestAnimationFrame(()=>this._displayValue=E(this,ee).displayValue||""))},lr=new WeakMap,ur=new WeakMap,Xn=new WeakMap,cr=new WeakMap,hr=new WeakMap,Yn=new WeakMap,so=new WeakMap,bi=new WeakMap,Zn=new WeakMap,dr=new WeakMap,pr=new WeakMap,Qn=new WeakMap,br=new WeakMap,s.UUIComboboxElement.styles=[v`
|
|
3236
3813
|
:host {
|
|
3237
3814
|
display: inline-flex;
|
|
3238
3815
|
}
|
|
@@ -3312,12 +3889,12 @@
|
|
|
3312
3889
|
#phone-wrapper #scroll-container {
|
|
3313
3890
|
max-height: unset;
|
|
3314
3891
|
}
|
|
3315
|
-
`],
|
|
3892
|
+
`],X([l({attribute:"value",reflect:!0})],s.UUIComboboxElement.prototype,"value",1),X([l({type:String})],s.UUIComboboxElement.prototype,"search",1),X([l({type:Boolean})],s.UUIComboboxElement.prototype,"open",1),X([l({type:String,attribute:"close-label"})],s.UUIComboboxElement.prototype,"closeLabel",2),X([l({type:Boolean,reflect:!0})],s.UUIComboboxElement.prototype,"disabled",2),X([l({type:Boolean,reflect:!1,attribute:"hide-expand-symbol"})],s.UUIComboboxElement.prototype,"hideExpandSymbol",2),X([l({type:Boolean,reflect:!0})],s.UUIComboboxElement.prototype,"readonly",2),X([l()],s.UUIComboboxElement.prototype,"placeholder",2),X([S("#combobox-input")],s.UUIComboboxElement.prototype,"_input",2),X([S("#combobox-popover")],s.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),X([Be({flatten:!0,selector:"uui-combobox-list"})],s.UUIComboboxElement.prototype,"_comboboxListElements",2),X([w()],s.UUIComboboxElement.prototype,"_displayValue",2),X([w()],s.UUIComboboxElement.prototype,"_search",2),X([w()],s.UUIComboboxElement.prototype,"_isPhone",2),X([w()],s.UUIComboboxElement.prototype,"_isOpen",2),s.UUIComboboxElement=X([m("uui-combobox")],s.UUIComboboxElement);var Ib=Object.defineProperty,Cb=Object.getOwnPropertyDescriptor,Jn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cb(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&&Ib(e,t,o),o};s.UUIDialogLayoutElement=class extends f{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
|
|
3316
3893
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
3317
3894
|
${this.headline}
|
|
3318
3895
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
3319
|
-
</h3>`}renderContent(){return
|
|
3320
|
-
${this.renderActions()} `}},
|
|
3896
|
+
</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()} `}},s.UUIDialogLayoutElement.styles=[v`
|
|
3321
3898
|
:host {
|
|
3322
3899
|
display: block;
|
|
3323
3900
|
padding: var(--uui-size-10,30px) var(--uui-size-14,42px);
|
|
@@ -3330,7 +3907,7 @@
|
|
|
3330
3907
|
justify-content: end;
|
|
3331
3908
|
gap: var(--uui-size-4,12px);
|
|
3332
3909
|
}
|
|
3333
|
-
`],
|
|
3910
|
+
`],Jn([l({type:String})],s.UUIDialogLayoutElement.prototype,"headline",2),Jn([w()],s.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),s.UUIDialogLayoutElement=Jn([m("uui-dialog-layout")],s.UUIDialogLayoutElement);var Sb=(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.UUIDialogElement=class extends f{render(){return h`<slot></slot>`}},s.UUIDialogElement.styles=[v`
|
|
3334
3911
|
:host {
|
|
3335
3912
|
position: relative;
|
|
3336
3913
|
display: block;
|
|
@@ -3348,13 +3925,13 @@
|
|
|
3348
3925
|
calc(var(--uui-border-radius,3px) * 2)
|
|
3349
3926
|
);
|
|
3350
3927
|
}
|
|
3351
|
-
`],
|
|
3928
|
+
`],s.UUIDialogElement=Sb([m("uui-dialog")],s.UUIDialogElement);var Ab=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,lu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pb(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&&Ab(e,t,o),o};s.UUISymbolFileDropzoneElement=class extends f{constructor(){super(...arguments),this.error=!1}render(){return h`<svg
|
|
3352
3929
|
xmlns="http://www.w3.org/2000/svg"
|
|
3353
3930
|
viewBox="0 0 512 512"
|
|
3354
3931
|
id="upload-icon">
|
|
3355
3932
|
<path
|
|
3356
3933
|
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"} />
|
|
3357
|
-
</svg> `}},
|
|
3934
|
+
</svg> `}},s.UUISymbolFileDropzoneElement.styles=[v`
|
|
3358
3935
|
:host {
|
|
3359
3936
|
display: flex;
|
|
3360
3937
|
flex-direction: column;
|
|
@@ -3373,7 +3950,7 @@
|
|
|
3373
3950
|
:host([error]) #upload-icon {
|
|
3374
3951
|
fill: var(--uui-color-invalid,#c31d4c);
|
|
3375
3952
|
}
|
|
3376
|
-
`],
|
|
3953
|
+
`],lu([l({type:Boolean,reflect:!0})],s.UUISymbolFileDropzoneElement.prototype,"error",2),s.UUISymbolFileDropzoneElement=lu([m("uui-symbol-file-dropzone")],s.UUISymbolFileDropzoneElement);let ao=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Mb=Object.defineProperty,zb=Object.getOwnPropertyDescriptor,vi=(i,e,t,r)=>{for(var o=r>1?void 0:r?zb(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&&Mb(e,t,o),o};s.UUIFileDropzoneElement=class extends Ee("",f){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(n=>{n=n.trim().toLowerCase(),/[a-z]+\/[a-z*]/s.test(n)?r.push(n):o.push(n.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 n of t){if(n?.kind!=="file")continue;const a=this._getEntry(n);if(a)if(a.isDirectory){if(!this.disallowFolderUpload&&this.multiple){const u=await this._mkdir(a);r.push(u)}}else{const u=n.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=[],n=a=>new Promise((u,c)=>{a.readEntries(async d=>{if(!d.length){u();return}for(const b of d)if(b.isFile){const g=await this._getAsFile(b);this._isAccepted(g)&&o.push(g)}else if(b.isDirectory){const g=await this._mkdir(b);r.push(g)}await n(a),u()},c)});return await n(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 ao(ao.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 ao(ao.CHANGE,{detail:{files:t,folders:[]}}))}render(){return h`
|
|
3377
3954
|
<div id="dropzone">
|
|
3378
3955
|
<uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>
|
|
3379
3956
|
${this.renderLabel()}
|
|
@@ -3387,7 +3964,7 @@
|
|
|
3387
3964
|
aria-label="${this.label}" />
|
|
3388
3965
|
<slot></slot>
|
|
3389
3966
|
</div>
|
|
3390
|
-
`}},
|
|
3967
|
+
`}},s.UUIFileDropzoneElement.styles=[v`
|
|
3391
3968
|
#dropzone {
|
|
3392
3969
|
display: flex;
|
|
3393
3970
|
flex-direction: column;
|
|
@@ -3425,12 +4002,12 @@
|
|
|
3425
4002
|
opacity: 0;
|
|
3426
4003
|
display: none;
|
|
3427
4004
|
}
|
|
3428
|
-
`],
|
|
4005
|
+
`],vi([S("#input")],s.UUIFileDropzoneElement.prototype,"_input",2),vi([S("#dropzone")],s.UUIFileDropzoneElement.prototype,"_dropzone",2),vi([l({type:String})],s.UUIFileDropzoneElement.prototype,"accept",1),vi([l({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],s.UUIFileDropzoneElement.prototype,"disallowFolderUpload",2),vi([l({type:Boolean})],s.UUIFileDropzoneElement.prototype,"multiple",2),s.UUIFileDropzoneElement=vi([m("uui-file-dropzone")],s.UUIFileDropzoneElement);let Lb=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const n=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<n.length-1);return e.toFixed(r)+" "+n[a]}};var Ob=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,Me=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tb(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&&Ob(e,t,o),o};s.UUIFilePreviewElement=class extends f{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(),k(this,"uui-symbol-file-thumbnail"),k(this,"uui-symbol-folder"),k(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
|
|
3429
4006
|
.src=${this._src}
|
|
3430
4007
|
.alt=${this._name}
|
|
3431
|
-
id="file-symbol"></uui-symbol-file-thumbnail>`:
|
|
4008
|
+
id="file-symbol"></uui-symbol-file-thumbnail>`:h`<uui-symbol-file
|
|
3432
4009
|
id="file-symbol"
|
|
3433
|
-
.type=${this._extension}></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return
|
|
4010
|
+
.type=${this._extension}></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return h`
|
|
3434
4011
|
<span
|
|
3435
4012
|
id="file-name"
|
|
3436
4013
|
class=${this._url?"has-source":""}
|
|
@@ -3439,16 +4016,16 @@
|
|
|
3439
4016
|
<span id="file-name-start">${e}</span>
|
|
3440
4017
|
<span id="file-name-end">${t}</span>
|
|
3441
4018
|
</span>
|
|
3442
|
-
`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return
|
|
4019
|
+
`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return h`
|
|
3443
4020
|
<slot id="actions" name="actions"></slot>
|
|
3444
4021
|
${this._fileTypeTemplate()}
|
|
3445
4022
|
<div id="file-info">
|
|
3446
4023
|
${this._renderLongName()}
|
|
3447
4024
|
<span id="file-size">
|
|
3448
|
-
${this._size&&!this._isDirectory?
|
|
4025
|
+
${this._size&&!this._isDirectory?h`${Lb.humanFileSize(this._size,!0)}`:""}
|
|
3449
4026
|
</span>
|
|
3450
4027
|
</div>
|
|
3451
|
-
`}},
|
|
4028
|
+
`}},s.UUIFilePreviewElement.styles=[v`
|
|
3452
4029
|
:host {
|
|
3453
4030
|
position: relative;
|
|
3454
4031
|
display: grid;
|
|
@@ -3516,7 +4093,7 @@
|
|
|
3516
4093
|
text-decoration: underline;
|
|
3517
4094
|
cursor: pointer;
|
|
3518
4095
|
}
|
|
3519
|
-
`],
|
|
4096
|
+
`],Me([w()],s.UUIFilePreviewElement.prototype,"_name",2),Me([w()],s.UUIFilePreviewElement.prototype,"_url",2),Me([w()],s.UUIFilePreviewElement.prototype,"_extension",2),Me([w()],s.UUIFilePreviewElement.prototype,"_src",2),Me([w()],s.UUIFilePreviewElement.prototype,"_size",2),Me([w()],s.UUIFilePreviewElement.prototype,"_isDirectory",2),Me([w()],s.UUIFilePreviewElement.prototype,"_file",2),Me([w()],s.UUIFilePreviewElement.prototype,"_isImage",2),Me([l({attribute:!1})],s.UUIFilePreviewElement.prototype,"file",1),s.UUIFilePreviewElement=Me([m("uui-file-preview")],s.UUIFilePreviewElement);var Nb=Object.defineProperty,Bb=Object.getOwnPropertyDescriptor,vr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bb(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&&Nb(e,t,o),o};s.UUIFormLayoutItemElement=class extends f{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(),k(this,"uui-form-validation-message")}render(){return h`
|
|
3520
4097
|
<div id="label" style=${this._labelSlotHasContent?"":"display: none"}>
|
|
3521
4098
|
<slot name="label" @slotchange=${this._labelSlotChanged}></slot>
|
|
3522
4099
|
</div>
|
|
@@ -3532,7 +4109,7 @@
|
|
|
3532
4109
|
<slot></slot>
|
|
3533
4110
|
<slot name="message" slot="message"></slot>
|
|
3534
4111
|
</uui-form-validation-message>
|
|
3535
|
-
`}},
|
|
4112
|
+
`}},s.UUIFormLayoutItemElement.styles=[v`
|
|
3536
4113
|
:host {
|
|
3537
4114
|
position: relative;
|
|
3538
4115
|
display: block;
|
|
@@ -3551,21 +4128,17 @@
|
|
|
3551
4128
|
margin-top: -8px;
|
|
3552
4129
|
min-height: 8px;
|
|
3553
4130
|
}
|
|
3554
|
-
`],
|
|
3555
|
-
* @license
|
|
3556
|
-
* Copyright 2017 Google LLC
|
|
3557
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3558
|
-
*/const nl=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},sn=Pt(class extends zt{constructor(i){if(super(i),i.type!==ue.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=cd(i),{values:a,keys:u}=this.ct(e,t,r);if(!Array.isArray(s))return this.ut=u,a;const h=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],d=[];let m,v,y=0,_=s.length-1,x=0,C=a.length-1;for(;y<=_&&x<=C;)if(s[y]===null)y++;else if(s[_]===null)_--;else if(h[y]===u[x])d[x]=ut(s[y],a[x]),y++,x++;else if(h[_]===u[C])d[C]=ut(s[_],a[C]),_--,C--;else if(h[y]===u[C])d[C]=ut(s[y],a[C]),wi(i,d[C+1],s[y]),y++,C--;else if(h[_]===u[x])d[x]=ut(s[_],a[x]),wi(i,s[y],s[_]),_--,x++;else if(m===void 0&&(m=nl(u,x,C),v=nl(h,y,_)),m.has(h[y]))if(m.has(h[_])){const Y=v.get(u[x]),Me=Y!==void 0?s[Y]:null;if(Me===null){const Te=wi(i,s[y]);ut(Te,a[x]),d[x]=Te}else d[x]=ut(Me,a[x]),wi(i,s[y],Me),s[Y]=null;x++}else Vr(s[_]),_--;else Vr(s[y]),y++;for(;x<=C;){const Y=wi(i,d[C+1]);ut(Y,a[x]),d[x++]=Y}for(;y<=_;){const Y=s[y++];Y!==null&&Vr(Y)}return this.ut=u,Ca(i,d),Q}});/**
|
|
4131
|
+
`],vr([l({type:String})],s.UUIFormLayoutItemElement.prototype,"description",2),vr([w()],s.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),vr([w()],s.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),s.UUIFormLayoutItemElement=vr([m("uui-form-layout-item")],s.UUIFormLayoutItemElement);/**
|
|
3559
4132
|
* @license
|
|
3560
4133
|
* Copyright 2017 Google LLC
|
|
3561
4134
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3562
|
-
*/class
|
|
4135
|
+
*/class es extends ti{constructor(e){if(super(e),this.et=N,e.type!==me.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===te)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:[]}}}es.directiveName="unsafeHTML",es.resultType=1;const mr=ei(es);var Vb=Object.defineProperty,Db=Object.getOwnPropertyDescriptor,uu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Db(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&&Vb(e,t,o),o};s.UUIFormValidationMessageElement=class extends f{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(No.INVALID,this._onControlInvalid),o.removeEventListener(No.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(No.INVALID,this._onControlInvalid),this._for.addEventListener(No.VALID,this._onControlValid))}render(){return h`
|
|
3563
4136
|
<slot></slot>
|
|
3564
4137
|
<div id="messages">
|
|
3565
|
-
${
|
|
4138
|
+
${Vo(this._messages,e=>h`<div>${mr(e[1])}</div>`)}
|
|
3566
4139
|
<slot name="message"></slot>
|
|
3567
4140
|
</div>
|
|
3568
|
-
`}},
|
|
4141
|
+
`}},s.UUIFormValidationMessageElement.styles=[v`
|
|
3569
4142
|
#messages {
|
|
3570
4143
|
color: var(--uui-color-invalid-standalone,rgb(
|
|
3571
4144
|
174,
|
|
@@ -3573,7 +4146,7 @@
|
|
|
3573
4146
|
71
|
|
3574
4147
|
));
|
|
3575
4148
|
}
|
|
3576
|
-
`],
|
|
4149
|
+
`],uu([l({reflect:!1,attribute:!0})],s.UUIFormValidationMessageElement.prototype,"for",1),s.UUIFormValidationMessageElement=uu([m("uui-form-validation-message")],s.UUIFormValidationMessageElement);var jb=(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.UUIFormElement=class extends f{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>`}},s.UUIFormElement=jb([m("uui-form")],s.UUIFormElement);let lo=class extends M{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 Hb=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,zt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rb(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&&Hb(e,t,o),o};s.UUIIconElement=class extends f{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 lo(lo.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`${mr(this.fallback)}`:this._nameSvg!==null?h`${mr(this._nameSvg)}`:this.svg!==null?h`${mr(this.svg)}`:h`<slot></slot>`}},s.UUIIconElement.styles=[v`
|
|
3577
4150
|
:host {
|
|
3578
4151
|
vertical-align: text-bottom;
|
|
3579
4152
|
display: inline-flex;
|
|
@@ -3599,16 +4172,16 @@
|
|
|
3599
4172
|
:host-context(div[slot='append']) {
|
|
3600
4173
|
margin-right: var(--uui-size-2, 6px);
|
|
3601
4174
|
}
|
|
3602
|
-
`],ct([w()],n.UUIIconElement.prototype,"_nameSvg",2),ct([l()],n.UUIIconElement.prototype,"label",2),ct([l()],n.UUIIconElement.prototype,"name",1),ct([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),ct([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),ct([w()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=ct([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)}},un=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(Ai.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(Ai.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 bp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,al=(i,e,t,r)=>{for(var o=r>1?void 0:r?mp(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&&bp(e,t,o),o};n.UUIIconRegistryElement=class extends g{constructor(){super(),this._icons={},this._registry=new un,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 c`<slot></slot>`}},al([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=al([p("uui-icon-registry")],n.UUIIconRegistryElement);const vp=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>`,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="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>`,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"><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>`,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"><polyline points="20 6 9 17 4 12" /></svg>`,$p=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>`,_p=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>`,Up=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>`,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"><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>`,Ep=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>`,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"><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>`,Ip=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>`,Cp=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>`,Sp=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>`,Ap=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>`,Pp=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>`,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" ><circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" /></svg>`,Op=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>`,Lp=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>`,Mp=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>`,Tp=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>`,Np=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>`,Bp=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>`,Dp=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>`,Vp=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>`,Hp=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>`,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="M5 12h14" /></svg>`,Rp=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>`,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"><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>`,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="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>`,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="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>`,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"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;let ll=class extends un{constructor(){super(),this.defineIcon("add",vp.strings[0]),this.defineIcon("alert",gp.strings[0]),this.defineIcon("attachment",fp.strings[0]),this.defineIcon("calendar",yp.strings[0]),this.defineIcon("check",wp.strings[0]),this.defineIcon("clipboard",$p.strings[0]),this.defineIcon("code",_p.strings[0]),this.defineIcon("colorpicker",Up.strings[0]),this.defineIcon("copy",kp.strings[0]),this.defineIcon("delete",Ep.strings[0]),this.defineIcon("document",xp.strings[0]),this.defineIcon("download",Ip.strings[0]),this.defineIcon("edit",Cp.strings[0]),this.defineIcon("favorite",Sp.strings[0]),this.defineIcon("folder",Ap.strings[0]),this.defineIcon("forbidden",Pp.strings[0]),this.defineIcon("info",zp.strings[0]),this.defineIcon("link",Op.strings[0]),this.defineIcon("lock",Lp.strings[0]),this.defineIcon("pause",Mp.strings[0]),this.defineIcon("picture",Tp.strings[0]),this.defineIcon("play",Np.strings[0]),this.defineIcon("remove",Bp.strings[0]),this.defineIcon("search",Dp.strings[0]),this.defineIcon("see",Vp.strings[0]),this.defineIcon("settings",Hp.strings[0]),this.defineIcon("subtract",jp.strings[0]),this.defineIcon("sync",Rp.strings[0]),this.defineIcon("unlock",Fp.strings[0]),this.defineIcon("unsee",Gp.strings[0]),this.defineIcon("wand",Wp.strings[0]),this.defineIcon("wrong",qp.strings[0])}};var Kp=(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=Kp([p("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var Xp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Ft=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yp(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&&Xp(e,t,o),o};n.UUIInputFileElement=class extends ge(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(),U(this,"uui-icon"),U(this,"uui-file-dropzone"),U(this,"uui-button"),U(this,"uui-action-bar"),U(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 c`<uui-file-preview .file="${e}">
|
|
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}">
|
|
3603
4176
|
<uui-action-bar slot="actions">
|
|
3604
4177
|
<uui-button
|
|
3605
4178
|
@click=${()=>this._removeFile(t)}
|
|
3606
4179
|
color="danger"
|
|
3607
4180
|
label=${`Delete ${e.name}`}>
|
|
3608
|
-
<uui-icon name="delete" .fallback=${
|
|
4181
|
+
<uui-icon name="delete" .fallback=${Xd.strings[0]}></uui-icon>
|
|
3609
4182
|
</uui-button>
|
|
3610
4183
|
</uui-action-bar>
|
|
3611
|
-
</uui-file-preview>`}_renderFiles(){return
|
|
4184
|
+
</uui-file-preview>`}_renderFiles(){return h`${Vo(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return h`
|
|
3612
4185
|
<uui-file-dropzone
|
|
3613
4186
|
id="dropzone"
|
|
3614
4187
|
?multiple=${this.multiple}
|
|
@@ -3617,13 +4190,13 @@
|
|
|
3617
4190
|
label="Drop files here"></uui-file-dropzone>
|
|
3618
4191
|
<div id="files">
|
|
3619
4192
|
${this._renderFiles()}
|
|
3620
|
-
${this._files.length===0||this.multiple?
|
|
4193
|
+
${this._files.length===0||this.multiple?h`<uui-button
|
|
3621
4194
|
@click=${this._handleClick}
|
|
3622
4195
|
id="add-button"
|
|
3623
4196
|
look="placeholder"
|
|
3624
|
-
label="Add"></uui-button>`:
|
|
4197
|
+
label="Add"></uui-button>`:C}
|
|
3625
4198
|
</div>
|
|
3626
|
-
`}},
|
|
4199
|
+
`}},s.UUIInputFileElement.styles=[v`
|
|
3627
4200
|
:host {
|
|
3628
4201
|
width: 100%;
|
|
3629
4202
|
height: 100%;
|
|
@@ -3672,33 +4245,33 @@
|
|
|
3672
4245
|
justify-content: center;
|
|
3673
4246
|
align-items: stretch;
|
|
3674
4247
|
}
|
|
3675
|
-
`],
|
|
4248
|
+
`],mi([S("#dropzone")],s.UUIInputFileElement.prototype,"_dropzone",2),mi([S("#dropzone")],s.UUIInputFileElement.prototype,"_dropZone",2),mi([l({type:String})],s.UUIInputFileElement.prototype,"accept",2),mi([l({type:Boolean})],s.UUIInputFileElement.prototype,"multiple",2),mi([w()],s.UUIInputFileElement.prototype,"_files",2),s.UUIInputFileElement=mi([m("uui-input-file")],s.UUIInputFileElement);let uo=class extends M{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Iv=Object.defineProperty,Cv=Object.getOwnPropertyDescriptor,du=i=>{throw TypeError(i)},G=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cv(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&&Iv(e,t,o),o},Sv=(i,e,t)=>e.has(i)||du("Cannot "+t),Av=(i,e,t)=>e.has(i)?du("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pv=(i,e,t)=>(Sv(i,e,"access private method"),t),os,pu;s.UUIInputElement=class extends xe(Ee("",f),""){constructor(){super(),Av(this,os),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",Pv(this,os,pu)),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 uo(uo.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new uo(uo.CHANGE))}renderPrepend(){return h`<slot name="prepend"></slot>`}renderAppend(){return h`<slot name="append"></slot>`}render(){return h`
|
|
3676
4249
|
${this.renderPrepend()}
|
|
3677
4250
|
${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()}
|
|
3678
4251
|
${this.renderAppend()}
|
|
3679
|
-
`}renderInputWithAutoWidth(){return
|
|
4252
|
+
`}renderInputWithAutoWidth(){return h`<div id="control">
|
|
3680
4253
|
${this.renderInput()}${this.renderAutoWidthBackground()}
|
|
3681
|
-
</div>`}renderInput(){return
|
|
4254
|
+
</div>`}renderInput(){return h`<input
|
|
3682
4255
|
id="input"
|
|
3683
4256
|
.type=${this.type}
|
|
3684
4257
|
.value=${this.value}
|
|
3685
4258
|
.name=${this.name}
|
|
3686
|
-
pattern=${
|
|
3687
|
-
min=${
|
|
3688
|
-
max=${
|
|
3689
|
-
step=${
|
|
4259
|
+
pattern=${_(this.pattern)}
|
|
4260
|
+
min=${_(this.min)}
|
|
4261
|
+
max=${_(this.max)}
|
|
4262
|
+
step=${_(this.step)}
|
|
3690
4263
|
spellcheck=${this.spellcheck}
|
|
3691
|
-
autocomplete=${
|
|
3692
|
-
placeholder=${
|
|
3693
|
-
aria-label=${
|
|
3694
|
-
inputmode=${
|
|
4264
|
+
autocomplete=${_(this.autocomplete)}
|
|
4265
|
+
placeholder=${_(this.placeholder)}
|
|
4266
|
+
aria-label=${_(this.label)}
|
|
4267
|
+
inputmode=${_(this.inputMode)}
|
|
3695
4268
|
?disabled=${this.disabled}
|
|
3696
4269
|
?autofocus=${this.autofocus}
|
|
3697
4270
|
?required=${this.required}
|
|
3698
4271
|
?readonly=${this.readonly}
|
|
3699
|
-
tabindex=${
|
|
4272
|
+
tabindex=${_(this.tabIndex)}
|
|
3700
4273
|
@input=${this.onInput}
|
|
3701
|
-
@change=${this.onChange} />`}renderAutoWidthBackground(){return
|
|
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}`}},os=new WeakSet,pu=function(i){this.type!=="color"&&i.key=="Enter"&&this.submit()},s.UUIInputElement.formAssociated=!0,s.UUIInputElement.styles=[v`
|
|
3702
4275
|
:host {
|
|
3703
4276
|
position: relative;
|
|
3704
4277
|
display: inline-flex;
|
|
@@ -3844,16 +4417,16 @@
|
|
|
3844
4417
|
height: 100%;
|
|
3845
4418
|
--uui-input-border-width: 0;
|
|
3846
4419
|
}
|
|
3847
|
-
`],
|
|
4420
|
+
`],G([l()],s.UUIInputElement.prototype,"min",2),G([l({type:Number})],s.UUIInputElement.prototype,"minlength",2),G([l({attribute:"minlength-message"})],s.UUIInputElement.prototype,"minlengthMessage",2),G([l()],s.UUIInputElement.prototype,"max",2),G([l({type:Number})],s.UUIInputElement.prototype,"maxlength",2),G([l({attribute:"maxlength-message"})],s.UUIInputElement.prototype,"maxlengthMessage",2),G([l({type:Number})],s.UUIInputElement.prototype,"step",2),G([l({type:Boolean,reflect:!0})],s.UUIInputElement.prototype,"disabled",2),G([l({type:Boolean,reflect:!0})],s.UUIInputElement.prototype,"readonly",2),G([l()],s.UUIInputElement.prototype,"placeholder",2),G([l()],s.UUIInputElement.prototype,"autocomplete",2),G([l({type:Boolean,reflect:!0,attribute:"auto-width"})],s.UUIInputElement.prototype,"autoWidth",2),G([l({type:String})],s.UUIInputElement.prototype,"type",1),G([l({attribute:"inputmode"})],s.UUIInputElement.prototype,"inputMode",2),G([l({type:String})],s.UUIInputElement.prototype,"pattern",2),G([l({type:Number,reflect:!1,attribute:"tabindex"})],s.UUIInputElement.prototype,"tabIndex",2),G([S("#input")],s.UUIInputElement.prototype,"_input",2),s.UUIInputElement=G([m("uui-input")],s.UUIInputElement);let rs=class extends M{static{this.LOCK_CHANGE="lock-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Mv=Object.defineProperty,zv=Object.getOwnPropertyDescriptor,bu=i=>{throw TypeError(i)},gr=(i,e,t,r)=>{for(var o=r>1?void 0:r?zv(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&&Mv(e,t,o),o},vu=(i,e,t)=>e.has(i)||bu("Cannot "+t),Lv=(i,e,t)=>(vu(i,e,"read from private field"),t?t.call(i):e.get(i)),Ov=(i,e,t)=>e.has(i)?bu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Tv=(i,e,t,r)=>(vu(i,e,"write to private field"),e.set(i,t),t),fr;s.UUIInputLockElement=class extends s.UUIInputElement{constructor(){super(),Ov(this,fr,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){Tv(this,fr,e),this.readonly=e,this.tabIndex=e?-1:0}get locked(){return Lv(this,fr)}connectedCallback(){super.connectedCallback(),k(this,"uui-icon"),k(this,"uui-button")}_onLockToggle(){this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new rs(rs.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?h`<uui-icon name="lock" .fallback=${Yd.strings[0]}></uui-icon>`:h`<uui-icon
|
|
3848
4421
|
name="unlock"
|
|
3849
|
-
.fallback=${
|
|
4422
|
+
.fallback=${ep.strings[0]}></uui-icon>`}renderPrepend(){return h`<uui-button
|
|
3850
4423
|
.disabled=${this.disabled}
|
|
3851
4424
|
@click=${this._onLockToggle}
|
|
3852
4425
|
compact
|
|
3853
4426
|
id="lock"
|
|
3854
4427
|
label="${this.locked?this.unlockLabel:this.lockLabel}">
|
|
3855
4428
|
${this.renderIcon()}
|
|
3856
|
-
</uui-button>`}},
|
|
4429
|
+
</uui-button>`}},fr=new WeakMap,s.UUIInputLockElement.styles=[...s.UUIInputElement.styles,v`
|
|
3857
4430
|
#lock {
|
|
3858
4431
|
height: 100%;
|
|
3859
4432
|
|
|
@@ -3866,16 +4439,16 @@
|
|
|
3866
4439
|
cursor: not-allowed;
|
|
3867
4440
|
opacity: 0.55;
|
|
3868
4441
|
}
|
|
3869
|
-
`],
|
|
4442
|
+
`],gr([l({type:Boolean,reflect:!0})],s.UUIInputLockElement.prototype,"locked",1),gr([l({type:String,reflect:!1,attribute:"unlock-label"})],s.UUIInputLockElement.prototype,"unlockLabel",2),gr([l({type:String,reflect:!1,attribute:"lock-label"})],s.UUIInputLockElement.prototype,"lockLabel",2),s.UUIInputLockElement=gr([m("uui-input-lock")],s.UUIInputLockElement);var Nv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,ns=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bv(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&&Nv(e,t,o),o};s.UUIInputPasswordElement=class extends s.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(),k(this,"uui-icon"),k(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?h`<uui-icon name="see" .fallback=${Qd.strings[0]}></uui-icon>`:h`<uui-icon
|
|
3870
4443
|
name="unsee"
|
|
3871
|
-
.fallback=${
|
|
4444
|
+
.fallback=${tp.strings[0]}></uui-icon>`}renderAppend(){return h`<uui-button
|
|
3872
4445
|
.disabled=${this.disabled}
|
|
3873
4446
|
@click=${this._onPasswordToggle}
|
|
3874
4447
|
compact
|
|
3875
4448
|
label="${this.passwordType==="password"?"Show password":"Hide password"}"
|
|
3876
4449
|
id="eye">
|
|
3877
4450
|
${this.renderIcon()}
|
|
3878
|
-
</uui-button>`}},
|
|
4451
|
+
</uui-button>`}},s.UUIInputPasswordElement.styles=[...s.UUIInputElement.styles,v`
|
|
3879
4452
|
#eye {
|
|
3880
4453
|
height: 100%;
|
|
3881
4454
|
margin-left: -6px;
|
|
@@ -3884,7 +4457,7 @@
|
|
|
3884
4457
|
#clear:hover {
|
|
3885
4458
|
color: black;
|
|
3886
4459
|
}
|
|
3887
|
-
`],
|
|
4460
|
+
`],ns([w()],s.UUIInputPasswordElement.prototype,"passwordType",2),ns([l()],s.UUIInputPasswordElement.prototype,"type",1),s.UUIInputPasswordElement=ns([m("uui-input-password")],s.UUIInputPasswordElement);var Vv=(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.UUIKeyboardShortcutElement=class extends f{render(){return h`<slot></slot>`}},s.UUIKeyboardShortcutElement.styles=[v`
|
|
3888
4461
|
:host {
|
|
3889
4462
|
display: inline-block;
|
|
3890
4463
|
font-family: inherit;
|
|
@@ -3899,7 +4472,7 @@
|
|
|
3899
4472
|
::slotted(*:last-child)uui-key {
|
|
3900
4473
|
margin-right: 0px;
|
|
3901
4474
|
}
|
|
3902
|
-
`],
|
|
4475
|
+
`],s.UUIKeyboardShortcutElement=Vv([m("uui-keyboard-shortcut")],s.UUIKeyboardShortcutElement);var Dv=(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.UUIKeyElement=class extends f{render(){return h`<slot></slot>`}},s.UUIKeyElement.styles=[v`
|
|
3903
4476
|
:host {
|
|
3904
4477
|
background: var(--uui-color-surface,#fff);
|
|
3905
4478
|
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
@@ -3913,10 +4486,10 @@
|
|
|
3913
4486
|
user-select: none;
|
|
3914
4487
|
text-transform: lowercase;
|
|
3915
4488
|
}
|
|
3916
|
-
`],
|
|
4489
|
+
`],s.UUIKeyElement=Dv([m("uui-key")],s.UUIKeyElement);var jv=Object.defineProperty,Hv=Object.getOwnPropertyDescriptor,yr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hv(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&&jv(e,t,o),o};s.UUILabelElement=class extends f{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`
|
|
3917
4490
|
<slot></slot>
|
|
3918
|
-
${this.required?
|
|
3919
|
-
`}},
|
|
4491
|
+
${this.required?h`<div id="required">*</div>`:""}
|
|
4492
|
+
`}},s.UUILabelElement.styles=[v`
|
|
3920
4493
|
:host {
|
|
3921
4494
|
font-weight: 700;
|
|
3922
4495
|
}
|
|
@@ -3931,8 +4504,8 @@
|
|
|
3931
4504
|
color: var(--uui-color-danger,#c31d4c);
|
|
3932
4505
|
font-weight: 900;
|
|
3933
4506
|
}
|
|
3934
|
-
`],
|
|
3935
|
-
${this.progress?
|
|
4507
|
+
`],yr([l({type:Boolean,reflect:!0})],s.UUILabelElement.prototype,"disabled",2),yr([l({reflect:!0,attribute:!0})],s.UUILabelElement.prototype,"for",2),yr([l({type:Boolean,reflect:!0})],s.UUILabelElement.prototype,"required",2),s.UUILabelElement=yr([m("uui-label")],s.UUILabelElement);var Rv=Object.defineProperty,Fv=Object.getOwnPropertyDescriptor,ss=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fv(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&&Rv(e,t,o),o};s.UUILoaderBarElement=class extends f{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=L(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
|
+
${this.progress?h`<div
|
|
3936
4509
|
id="bar"
|
|
3937
4510
|
style="max-width: ${this.progress.toString()}%;"></div>`:""}
|
|
3938
4511
|
<div
|
|
@@ -3940,7 +4513,7 @@
|
|
|
3940
4513
|
class=${this.progress?"":"animate"}
|
|
3941
4514
|
style="animation-duration: ${this.animationDuration}s"></div>
|
|
3942
4515
|
<div id="bar-background"></div>
|
|
3943
|
-
`}},
|
|
4516
|
+
`}},s.UUILoaderBarElement.styles=[v`
|
|
3944
4517
|
:host {
|
|
3945
4518
|
position: relative;
|
|
3946
4519
|
display: block;
|
|
@@ -3999,7 +4572,7 @@
|
|
|
3999
4572
|
transform-origin: 175% 0%;
|
|
4000
4573
|
}
|
|
4001
4574
|
}
|
|
4002
|
-
`],
|
|
4575
|
+
`],ss([l({type:Number})],s.UUILoaderBarElement.prototype,"progress",1),ss([l({type:Number})],s.UUILoaderBarElement.prototype,"animationDuration",1),s.UUILoaderBarElement=ss([m("uui-loader-bar")],s.UUILoaderBarElement);var Wv=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,as=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gv(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&&Wv(e,t,o),o};s.UUILoaderCircleElement=class extends f{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`
|
|
4003
4576
|
<svg
|
|
4004
4577
|
id="spinner"
|
|
4005
4578
|
class=${this.progress?"":"animate"}
|
|
@@ -4012,11 +4585,11 @@
|
|
|
4012
4585
|
cx="50%"
|
|
4013
4586
|
cy="50%"
|
|
4014
4587
|
r="16"
|
|
4015
|
-
style=${
|
|
4588
|
+
style=${We(this._circleStyle())} />
|
|
4016
4589
|
</g>
|
|
4017
4590
|
</svg>
|
|
4018
4591
|
${this.renderProgress()}
|
|
4019
|
-
`}},
|
|
4592
|
+
`}},s.UUILoaderCircleElement.styles=[v`
|
|
4020
4593
|
:host {
|
|
4021
4594
|
vertical-align: middle;
|
|
4022
4595
|
line-height: 0;
|
|
@@ -4101,11 +4674,11 @@
|
|
|
4101
4674
|
/* Center the text */
|
|
4102
4675
|
padding-top: 0.09em;
|
|
4103
4676
|
}
|
|
4104
|
-
`],
|
|
4677
|
+
`],as([l({type:Number})],s.UUILoaderCircleElement.prototype,"progress",2),as([l({type:Boolean,reflect:!0,attribute:"show-progress"})],s.UUILoaderCircleElement.prototype,"showProgress",2),s.UUILoaderCircleElement=as([m("uui-loader-circle")],s.UUILoaderCircleElement);var qv=(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.UUILoaderElement=class extends f{render(){return h`
|
|
4105
4678
|
<div></div>
|
|
4106
4679
|
<div></div>
|
|
4107
4680
|
<div></div>
|
|
4108
|
-
`}},
|
|
4681
|
+
`}},s.UUILoaderElement.styles=[v`
|
|
4109
4682
|
:host {
|
|
4110
4683
|
color: var(--uui-color-default,#1b264f);
|
|
4111
4684
|
}
|
|
@@ -4145,49 +4718,49 @@
|
|
|
4145
4718
|
background-color: currentColor;
|
|
4146
4719
|
}
|
|
4147
4720
|
}
|
|
4148
|
-
`],
|
|
4721
|
+
`],s.UUILoaderElement=qv([m("uui-loader")],s.UUILoaderElement);let gi=class extends M{static{this.SHOW_CHILDREN="show-children"}static{this.HIDE_CHILDREN="hide-children"}static{this.CLICK_LABEL="click-label"}};var Kv=Object.defineProperty,Xv=Object.getOwnPropertyDescriptor,mu=i=>{throw TypeError(i)},he=(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&&Kv(e,t,o),o},Yv=(i,e,t)=>e.has(i)||mu("Cannot "+t),Zv=(i,e,t)=>e.has(i)?mu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ls=(i,e,t)=>(Yv(i,e,"access private method"),t),co,us,gu;s.UUIMenuItemElement=class extends To(Xt(Vi(Ee("label",f)))){constructor(){super(...arguments),Zv(this,co),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?gi.HIDE_CHILDREN:gi.SHOW_CHILDREN,t=new gi(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),k(this,"uui-symbol-expand"),k(this,"uui-loader-bar")}async focus(){await this.updateComplete,this.shadowRoot?.querySelector("#label-button")?.focus?.()}_renderLabelInside(){return h` <slot
|
|
4149
4722
|
name="icon"
|
|
4150
4723
|
id="icon"
|
|
4151
4724
|
style=${this.iconSlotHasContent?"":"display: none;"}
|
|
4152
4725
|
@slotchange=${this._iconSlotChanged}></slot>
|
|
4153
4726
|
${this.renderLabel()}
|
|
4154
|
-
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?
|
|
4727
|
+
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?h` <span id="label-button" ${rr(this._labelButtonChanged)}>
|
|
4155
4728
|
${this._renderLabelInside()}
|
|
4156
|
-
</span>`:
|
|
4729
|
+
</span>`:h` <a
|
|
4157
4730
|
id="label-button"
|
|
4158
|
-
${
|
|
4159
|
-
href=${
|
|
4160
|
-
target=${
|
|
4161
|
-
rel=${
|
|
4162
|
-
@click=${
|
|
4731
|
+
${rr(this._labelButtonChanged)}
|
|
4732
|
+
href=${_(this.href)}
|
|
4733
|
+
target=${_(this.target||void 0)}
|
|
4734
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
4735
|
+
@click=${ls(this,co,us)}
|
|
4163
4736
|
?disabled=${this.disabled}
|
|
4164
4737
|
aria-label="${this.label}">
|
|
4165
4738
|
${this._renderLabelInside()}
|
|
4166
|
-
</a>`}_renderLabelAsButton(){return
|
|
4739
|
+
</a>`}_renderLabelAsButton(){return h` <button
|
|
4167
4740
|
id="label-button"
|
|
4168
|
-
${
|
|
4169
|
-
@click=${
|
|
4741
|
+
${rr(this._labelButtonChanged)}
|
|
4742
|
+
@click=${ls(this,co,us)}
|
|
4170
4743
|
?disabled=${this.disabled}
|
|
4171
4744
|
aria-label="${this.label}">
|
|
4172
4745
|
${this._renderLabelInside()}
|
|
4173
|
-
</button>`}render(){return
|
|
4746
|
+
</button>`}render(){return h`
|
|
4174
4747
|
<div id="menu-item" aria-label="menuitem" role="menuitem">
|
|
4175
4748
|
<div id="label-button-background"></div>
|
|
4176
|
-
${this.hasChildren?
|
|
4749
|
+
${this.hasChildren?h`<button
|
|
4177
4750
|
id="caret-button"
|
|
4178
4751
|
aria-label=${this.caretLabel}
|
|
4179
4752
|
@click=${this._onCaretClicked}>
|
|
4180
|
-
${
|
|
4753
|
+
${ls(this,co,gu).call(this)}
|
|
4181
4754
|
</button>`:""}
|
|
4182
4755
|
${this.href&&this.selectOnly!==!0&&this.selectable!==!0?this._renderLabelAsAnchor():this._renderLabelAsButton()}
|
|
4183
4756
|
|
|
4184
4757
|
<slot id="actions-container" name="actions"></slot>
|
|
4185
|
-
${this.loading?
|
|
4758
|
+
${this.loading?h`<uui-loader-bar id="loader"></uui-loader-bar>`:""}
|
|
4186
4759
|
</div>
|
|
4187
|
-
${this.showChildren?
|
|
4188
|
-
`}},
|
|
4760
|
+
${this.showChildren?h`<slot></slot>`:""}
|
|
4761
|
+
`}},co=new WeakSet,us=function(){if(this.selectOnly)return;const i=new gi(gi.CLICK_LABEL);this.dispatchEvent(i)},gu=function(){if(this.renderExpandSymbol){const i=this.renderExpandSymbol();if(i)return i}return h`<uui-symbol-expand
|
|
4189
4762
|
aria-hidden="true"
|
|
4190
|
-
?open=${this.showChildren}></uui-symbol-expand>`},
|
|
4763
|
+
?open=${this.showChildren}></uui-symbol-expand>`},s.UUIMenuItemElement.styles=[v`
|
|
4191
4764
|
:host {
|
|
4192
4765
|
box-sizing: border-box;
|
|
4193
4766
|
display: block;
|
|
@@ -4589,7 +5162,7 @@
|
|
|
4589
5162
|
opacity: 0;
|
|
4590
5163
|
animation: fadeIn 120ms ease-in 60ms forwards;
|
|
4591
5164
|
}
|
|
4592
|
-
`],
|
|
5165
|
+
`],he([l({type:Boolean,reflect:!0})],s.UUIMenuItemElement.prototype,"disabled",2),he([l({type:Boolean,reflect:!0,attribute:"show-children"})],s.UUIMenuItemElement.prototype,"showChildren",2),he([l({type:Boolean,attribute:"has-children"})],s.UUIMenuItemElement.prototype,"hasChildren",2),he([l({type:Boolean,attribute:"loading"})],s.UUIMenuItemElement.prototype,"loading",2),he([l({type:String})],s.UUIMenuItemElement.prototype,"href",2),he([l({type:String})],s.UUIMenuItemElement.prototype,"target",2),he([l({type:String})],s.UUIMenuItemElement.prototype,"rel",2),he([l({type:String,attribute:"select-mode",reflect:!0})],s.UUIMenuItemElement.prototype,"selectMode",2),he([l({type:String,attribute:"caret-label"})],s.UUIMenuItemElement.prototype,"caretLabel",2),he([l({attribute:!1})],s.UUIMenuItemElement.prototype,"renderExpandSymbol",2),he([w()],s.UUIMenuItemElement.prototype,"iconSlotHasContent",2),s.UUIMenuItemElement=he([m("uui-menu-item")],s.UUIMenuItemElement);var Qv=Object.defineProperty,Jv=Object.getOwnPropertyDescriptor,fi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jv(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&&Qv(e,t,o),o};const fu="uui:modal-open",yi="uui:modal-close",yu="uui:modal-close-end";let de=class extends f{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(fu,{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(yi,{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(yu)),this.remove()}static{this.styles=[v`
|
|
4593
5166
|
dialog {
|
|
4594
5167
|
display: block;
|
|
4595
5168
|
margin: 0;
|
|
@@ -4617,9 +5190,9 @@
|
|
|
4617
5190
|
:host([index='0']) dialog::after {
|
|
4618
5191
|
opacity: 0;
|
|
4619
5192
|
}
|
|
4620
|
-
`]}};
|
|
5193
|
+
`]}};fi([S("dialog")],de.prototype,"_dialogElement",2),fi([l({type:Boolean,reflect:!0,attribute:"is-open"})],de.prototype,"isOpen",2),fi([l({type:Boolean,reflect:!0,attribute:"is-closing"})],de.prototype,"isClosing",2),fi([l({type:Number,reflect:!0})],de.prototype,"index",2),fi([l({type:Number,reflect:!0,attribute:"unique-index"})],de.prototype,"uniqueIndex",2),fi([l({type:Number,attribute:"transition-duration"})],de.prototype,"transitionDuration",1);var em=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,wu=i=>{throw TypeError(i)},_u=(i,e,t,r)=>{for(var o=r>1?void 0:r?tm(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&&em(e,t,o),o},im=(i,e,t)=>e.has(i)||wu("Cannot "+t),$u=(i,e,t)=>(im(i,e,"read from private field"),t?t.call(i):e.get(i)),om=(i,e,t)=>e.has(i)?wu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),wr,cs;s.UUIModalSidebarElement=class extends de{constructor(){super(...arguments),om(this,wr),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-$u(this,wr,cs)+"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",-$u(this,wr,cs)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return h`<dialog>
|
|
4621
5194
|
<slot></slot>
|
|
4622
|
-
</dialog>`}},
|
|
5195
|
+
</dialog>`}},wr=new WeakSet,cs=function(){return this._dialogElement?.getBoundingClientRect().width??0},s.UUIModalSidebarElement.styles=[...de.styles,v`
|
|
4623
5196
|
:host {
|
|
4624
5197
|
outline: none;
|
|
4625
5198
|
--uui-modal-sidebar-left-gap: 24px;
|
|
@@ -4661,7 +5234,7 @@
|
|
|
4661
5234
|
:host([size='small']) dialog {
|
|
4662
5235
|
max-width: min(500px, calc(100% - var(--uui-modal-sidebar-left-gap)));
|
|
4663
5236
|
}
|
|
4664
|
-
`],
|
|
5237
|
+
`],_u([l({reflect:!0})],s.UUIModalSidebarElement.prototype,"size",2),s.UUIModalSidebarElement=_u([m("uui-modal-sidebar")],s.UUIModalSidebarElement);var rm=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,ku=i=>{throw TypeError(i)},wi=(i,e,t,r)=>{for(var o=r>1?void 0:r?nm(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&&rm(e,t,o),o},Uu=(i,e,t)=>e.has(i)||ku("Cannot "+t),ho=(i,e,t)=>(Uu(i,e,"read from private field"),t?t.call(i):e.get(i)),hs=(i,e,t)=>e.has(i)?ku("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),_r=(i,e,t)=>(Uu(i,e,"access private method"),t),ds,_i,$i,ps,bs;s.UUIModalContainerElement=class extends f{constructor(){super(),hs(this,$i),this.sidebarGap=64,this.transitionDurationMS=250,hs(this,ds,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof de)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(yi,ho(this,_i))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(yi,ho(this,_i))),this._sidebars=this._modals.filter(t=>t instanceof s.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}_r(this,$i,ps).call(this),_r(this,$i,bs).call(this)}),hs(this,_i,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(yi,ho(this,_i)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}_r(this,$i,ps).call(this),_r(this,$i,bs).call(this)}),this.addEventListener(yi,ho(this,_i))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return h`<slot @slotchange=${ho(this,ds)}></slot>`}},ds=new WeakMap,_i=new WeakMap,$i=new WeakSet,ps=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})},bs=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],n=i;if(r.updateComplete.then(()=>{r.style.setProperty("--uui-modal-offset",n+"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}})},s.UUIModalContainerElement.styles=v`
|
|
4665
5238
|
:host {
|
|
4666
5239
|
position: fixed;
|
|
4667
5240
|
--uui-modal-color-backdrop: rgba(0, 0, 0, 0.5);
|
|
@@ -4678,11 +5251,11 @@
|
|
|
4678
5251
|
:host([backdrop])::after {
|
|
4679
5252
|
opacity: 1;
|
|
4680
5253
|
}
|
|
4681
|
-
`,
|
|
5254
|
+
`,wi([S("slot")],s.UUIModalContainerElement.prototype,"modalSlot",2),wi([w()],s.UUIModalContainerElement.prototype,"_modals",2),wi([w()],s.UUIModalContainerElement.prototype,"_sidebars",2),wi([l({type:Number})],s.UUIModalContainerElement.prototype,"sidebarGap",2),wi([l({type:Number})],s.UUIModalContainerElement.prototype,"transitionDurationMS",2),s.UUIModalContainerElement=wi([m("uui-modal-container")],s.UUIModalContainerElement);var sm=(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.UUIModalDialogElement=class extends de{render(){return h`
|
|
4682
5255
|
<dialog>
|
|
4683
5256
|
<slot></slot>
|
|
4684
5257
|
</dialog>
|
|
4685
|
-
`}},
|
|
5258
|
+
`}},s.UUIModalDialogElement.styles=[...de.styles,v`
|
|
4686
5259
|
:host {
|
|
4687
5260
|
outline: none;
|
|
4688
5261
|
--uui-modal-dialog-background: var(--uui-color-surface,#fff);
|
|
@@ -4706,28 +5279,28 @@
|
|
|
4706
5279
|
:host(:not([index='0'])) dialog {
|
|
4707
5280
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
4708
5281
|
}
|
|
4709
|
-
`],
|
|
5282
|
+
`],s.UUIModalDialogElement=sm([m("uui-modal-dialog")],s.UUIModalDialogElement);let Lt=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var am=Object.defineProperty,lm=Object.getOwnPropertyDescriptor,ie=(i,e,t,r)=>{for(var o=r>1?void 0:r?lm(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&&am(e,t,o),o};const um=45,vs=(i,e,t)=>Math.min(Math.max(i,e),t),cm=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);s.UUIPaginationElement=class extends f{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),k(this,"uui-button"),k(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,n)=>o+n.getBoundingClientRect().width,0),r=(e-t)/um/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 cm(vs(t,1,this.total),vs(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=vs(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new Lt(Lt.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new Lt(Lt.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new Lt(Lt.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return h`<uui-button
|
|
4710
5283
|
compact
|
|
4711
5284
|
look="outline"
|
|
4712
5285
|
class="nav"
|
|
4713
5286
|
role="listitem"
|
|
4714
5287
|
label=${this.firstLabel}
|
|
4715
5288
|
?disabled=${this._current===1}
|
|
4716
|
-
@click=${()=>this.goToPage(1)}></uui-button>`}renderPrevious(){return
|
|
5289
|
+
@click=${()=>this.goToPage(1)}></uui-button>`}renderPrevious(){return h`<uui-button
|
|
4717
5290
|
compact
|
|
4718
5291
|
look="outline"
|
|
4719
5292
|
class="nav"
|
|
4720
5293
|
role="listitem"
|
|
4721
5294
|
label=${this.previousLabel}
|
|
4722
5295
|
?disabled=${this._current===1}
|
|
4723
|
-
@click=${this.goToPreviousPage}></uui-button>`}renderNext(){return
|
|
5296
|
+
@click=${this.goToPreviousPage}></uui-button>`}renderNext(){return h`<uui-button
|
|
4724
5297
|
compact
|
|
4725
5298
|
look="outline"
|
|
4726
5299
|
role="listitem"
|
|
4727
5300
|
class="nav"
|
|
4728
5301
|
label=${this.nextLabel}
|
|
4729
5302
|
?disabled=${this._current===this.total}
|
|
4730
|
-
@click=${this.goToNextPage}></uui-button>`}renderLast(){return
|
|
5303
|
+
@click=${this.goToNextPage}></uui-button>`}renderLast(){return h`
|
|
4731
5304
|
<uui-button
|
|
4732
5305
|
compact
|
|
4733
5306
|
look="outline"
|
|
@@ -4736,7 +5309,7 @@
|
|
|
4736
5309
|
label=${this.lastLabel}
|
|
4737
5310
|
?disabled=${this.total===this._current}
|
|
4738
5311
|
@click=${()=>this.goToPage(this.total)}></uui-button>
|
|
4739
|
-
`}renderDots(){return
|
|
5312
|
+
`}renderDots(){return h`<uui-button
|
|
4740
5313
|
compact
|
|
4741
5314
|
look="outline"
|
|
4742
5315
|
role="listitem"
|
|
@@ -4744,7 +5317,7 @@
|
|
|
4744
5317
|
class="dots"
|
|
4745
5318
|
label="More pages"
|
|
4746
5319
|
>...</uui-button
|
|
4747
|
-
> `}renderPage(e){return
|
|
5320
|
+
> `}renderPage(e){return h`<uui-button
|
|
4748
5321
|
compact
|
|
4749
5322
|
look="outline"
|
|
4750
5323
|
role="listitem"
|
|
@@ -4753,14 +5326,14 @@
|
|
|
4753
5326
|
tabindex=${e===this._current?"-1":""}
|
|
4754
5327
|
@click=${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}>
|
|
4755
5328
|
${e}
|
|
4756
|
-
</uui-button>`}renderNavigationLeft(){return
|
|
4757
|
-
${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return
|
|
4758
|
-
${this.renderNext()} ${this.renderLast()}`}render(){return
|
|
5329
|
+
</uui-button>`}renderNavigationLeft(){return h` ${this.renderFirst()} ${this.renderPrevious()}
|
|
5330
|
+
${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return h`${this._visiblePages.includes(this.total)?"":this.renderDots()}
|
|
5331
|
+
${this.renderNext()} ${this.renderLast()}`}render(){return h`<uui-button-group role="list" id="pages">
|
|
4759
5332
|
${this.renderNavigationLeft()}
|
|
4760
5333
|
${this._visiblePages.map(e=>this.renderPage(e))}
|
|
4761
5334
|
${this.renderNavigationRight()}
|
|
4762
5335
|
</uui-button-group>
|
|
4763
|
-
`}},
|
|
5336
|
+
`}},s.UUIPaginationElement.styles=[v`
|
|
4764
5337
|
uui-button-group {
|
|
4765
5338
|
width: 100%;
|
|
4766
5339
|
}
|
|
@@ -4790,15 +5363,15 @@
|
|
|
4790
5363
|
.active {
|
|
4791
5364
|
pointer-events: none;
|
|
4792
5365
|
}
|
|
4793
|
-
`],
|
|
5366
|
+
`],ie([Rc("uui-button.nav")],s.UUIPaginationElement.prototype,"_navButtons",2),ie([S("#pages")],s.UUIPaginationElement.prototype,"_pagesGroup",2),ie([l()],s.UUIPaginationElement.prototype,"label",2),ie([l({reflect:!0,attribute:"aria-label"})],s.UUIPaginationElement.prototype,"ariaLabel",2),ie([l()],s.UUIPaginationElement.prototype,"firstLabel",2),ie([l()],s.UUIPaginationElement.prototype,"previousLabel",2),ie([l()],s.UUIPaginationElement.prototype,"nextLabel",2),ie([l()],s.UUIPaginationElement.prototype,"lastLabel",2),ie([l({type:Number})],s.UUIPaginationElement.prototype,"total",1),ie([w()],s.UUIPaginationElement.prototype,"_range",2),ie([w()],s.UUIPaginationElement.prototype,"_visiblePages",2),ie([l({type:Number})],s.UUIPaginationElement.prototype,"current",1),s.UUIPaginationElement=ie([m("uui-pagination")],s.UUIPaginationElement);let Eu=class extends M{static{this.CLOSE="close"}};var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,po=(i,e,t,r)=>{for(var o=r>1?void 0:r?dm(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&&hm(e,t,o),o};function $r(i,e,t){return i<e?e:i>t?t:i}s.UUIPopoverElement=class extends f{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 Eu(Eu.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 n=e;for(;n;){if(t=getComputedStyle(n),r&&t.position==="static"){n=this._getAncestorElement(n);continue}if(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(n),t.position==="fixed")return;n=this._getAncestorElement(n)}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(Ne=>Ne.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,t,o));let n=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,b=this._currentPlacement.indexOf("-end")!==-1;let g=.5,y=.5,$=.5,x=.5,A=0,K=0;if(this.placement==="auto"){const Ne=this._scrollParents[0],xo=Ne.clientWidth,Dt=Ne.clientHeight,Pi=r.x-t.width,Mi=xo-(r.x+r.width)-t.width,Xs=r.y-t.height,Lr=Dt-(r.y+r.height)-t.height;let Or=.5,Tr=.5;const qg=Math.max(Pi,Mi);let dc=Math.max(Xs,Lr);Lr>Xs&&Lr>this.margin&&(dc+=9999),qg>dc?(Pi>Mi?(Or=0,u=!0):(Or=1,c=!0),A=this.margin):(Xs>Lr?(Tr=0,n=!0):(Tr=1,a=!0),K=this.margin),g=Or,y=Tr,$=1-Or,x=1-Tr}else n&&(x=1,y=0),a&&(x=0,y=1),(n||a)&&(K=this.margin,d&&($=0,g=0),b&&($=1,g=1)),u&&($=1,g=0),c&&($=0,g=1),(u||c)&&(A=this.margin,d&&(x=0,y=0),b&&(x=1,y=1));const Ue=-t.width*$+r.width*g-A*($*2-1),pe=-t.height*x+r.height*y-K*(x*2-1);let mt=Ue,Vt=pe;n||a?(this._scrollParents.forEach((Ne,xo)=>{const Dt=Ne===document.body?0:o[xo].x,Pi=-r.x+Dt,Mi=Ne.clientWidth-r.x-r.width+Ue+Dt-(t.width-r.width)*(1-g);mt=$r(mt,Pi,Mi)}),mt=$r(mt,-t.width,r.width)):(u||c)&&(this._scrollParents.forEach((Ne,xo)=>{const Dt=Ne===document.body?0:o[xo].y,Pi=-r.y+Dt,Mi=Ne.clientHeight-r.y-r.height+pe+Dt-(t.height-r.height)*(1-y);Vt=$r(Vt,Pi,Mi)}),Vt=$r(Vt,-t.height,r.height)),(this._positionX!==mt||this._positionY!==Vt)&&(this._positionX=mt,this._positionY=Vt,Ue===mt&&pe===Vt&&this._stopScrollListener(),e.style.left=`${this._positionX}px`,e.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),n=o[0],a=o[1]||null;let u;return this._scrollParents.some((c,d)=>{const b=c===document.body?0:r[d].x,g=c===document.body?0:r[d].y;return n==="top"&&t.y-2<=g?(u="bottom",!0):n==="bottom"&&t.y+t.height+2>=c.clientHeight+g?(u="top",!0):n==="left"&&t.x-2<=b?(u="right",!0):n==="right"&&t.x+t.width+2>=c.clientWidth+b?(u="left",!0):!1}),u?(this._startScrollListener(),u+(a?`-${a}`:"")):e}render(){return h`
|
|
4794
5367
|
<slot
|
|
4795
5368
|
id="trigger"
|
|
4796
5369
|
name="trigger"
|
|
4797
5370
|
@slotchange=${this._onTriggerSlotChanged}></slot>
|
|
4798
5371
|
<div id="container">
|
|
4799
|
-
${this._open?
|
|
5372
|
+
${this._open?h`<slot name="popover"></slot>`:""}
|
|
4800
5373
|
</div>
|
|
4801
|
-
`}},
|
|
5374
|
+
`}},s.UUIPopoverElement.styles=[v`
|
|
4802
5375
|
:host {
|
|
4803
5376
|
position: relative;
|
|
4804
5377
|
display: inline-block;
|
|
@@ -4825,7 +5398,7 @@
|
|
|
4825
5398
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
4826
5399
|
);
|
|
4827
5400
|
}
|
|
4828
|
-
`],
|
|
5401
|
+
`],po([S("#container")],s.UUIPopoverElement.prototype,"containerElement",2),po([l({type:Number})],s.UUIPopoverElement.prototype,"margin",2),po([l({type:String,reflect:!0})],s.UUIPopoverElement.prototype,"placement",1),po([l({type:Boolean,reflect:!0})],s.UUIPopoverElement.prototype,"open",1),s.UUIPopoverElement=po([m("uui-popover")],s.UUIPopoverElement);var pm=Object.defineProperty,bm=Object.getOwnPropertyDescriptor,xu=i=>{throw TypeError(i)},Ot=(i,e,t,r)=>{for(var o=r>1?void 0:r?bm(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&&pm(e,t,o),o},ms=(i,e,t)=>e.has(i)||xu("Cannot "+t),O=(i,e,t)=>(ms(i,e,"read from private field"),t?t.call(i):e.get(i)),Ye=(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),bo=(i,e,t,r)=>(ms(i,e,"write to private field"),e.set(i,t),t),lt=(i,e,t)=>(ms(i,e,"access private method"),t),Ze,ut,Tt,vo,gs,Qe,mo,fs,ze,ys,Iu,ws,Cu,_s;s.UUIPopoverContainerElement=class extends f{constructor(){super(),Ye(this,ze),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Ye(this,Ze,null),Ye(this,ut,[]),Ye(this,Tt,null),Ye(this,vo,{width:0,height:0}),Ye(this,gs,e=>{this._open=e.newState==="open",bo(this,Ze,Od(this,"popovertarget",this.id)),O(this,Ze)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),this._open?(lt(this,ze,Cu).call(this),lt(this,ze,Iu).call(this),requestAnimationFrame(()=>{O(this,Qe).call(this)})):lt(this,ze,ws).call(this)}),Ye(this,Qe,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",O(this,mo).call(this,3))}),Ye(this,mo,e=>{if(O(this,fs).call(this),e--,O(this,Ze)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,n=this._actualPlacement.indexOf("right")!==-1,a=this._actualPlacement.indexOf("-start")!==-1,u=this._actualPlacement.indexOf("-end")!==-1,c=O(this,Ze).getBoundingClientRect(),d=this.getBoundingClientRect();let b=0,g=0;r&&(b=c.top+c.height,a&&(g=c.left),u&&(g=c.left+c.width-d.width),!a&&!u&&(g=c.left+c.width/2-d.width/2)),t&&(b=c.top-d.height,a&&(g=c.left),u&&(g=c.left+c.width-d.width),!a&&!u&&(g=c.left+c.width/2-d.width/2)),o&&(g=c.left-d.width,a&&(b=c.top),u&&(b=c.top+c.height-d.height),!a&&!u&&(b=c.top+c.height/2-d.height/2)),n&&(g=c.left+c.width,a&&(b=c.top),u&&(b=c.top+c.height-d.height),!a&&!u&&(b=c.top+c.height/2-d.height/2));const y=window.innerWidth,$=window.innerHeight,x=Math.min(0,c.top+c.height),A=Math.max(Math.min(b,$-d.height),c.top-d.height);if(Math.max(x,A)!==b&&(t||r)&&e>0){lt(this,ze,ys).call(this),O(this,mo).call(this,e);return}b=Math.max(x,A);const K=Math.min(0,c.left+c.width),Ue=Math.max(Math.min(g,y-d.width),c.left-d.width),pe=Math.max(K,Ue);if(pe!==g&&(o||n)&&e>0){lt(this,ze,ys).call(this),O(this,mo).call(this,e);return}g=pe,(b+d.height<0||b>$||g+d.width<0||g>y)&&this.hidePopover(),this.style.transform=`translate(${g}px, ${b}px)`,this.style.opacity="1"}),Ye(this,fs,()=>{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",O(this,gs),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,O(this,Qe).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),O(this,Tt)||(bo(this,Tt,new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,o=t.contentRect.height;r===O(this,vo).width&&o===O(this,vo).height||(bo(this,vo,{width:r,height:o}),O(this,Qe).call(this))})),O(this,Tt).observe(this))}disconnectedCallback(){super.disconnectedCallback(),lt(this,ze,ws).call(this),O(this,Tt)?.disconnect(),bo(this,Tt,null)}_getScrollParents(){return O(this,ut)}render(){return h`<slot></slot>`}},Ze=new WeakMap,ut=new WeakMap,Tt=new WeakMap,vo=new WeakMap,gs=new WeakMap,Qe=new WeakMap,mo=new WeakMap,fs=new WeakMap,ze=new WeakSet,ys=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},Iu=function(){O(this,ut).forEach(i=>{i.addEventListener("scroll",O(this,Qe),{passive:!0})}),document.addEventListener("scroll",O(this,Qe),{passive:!0})},ws=function(){O(this,ut).forEach(i=>{i.removeEventListener("scroll",O(this,Qe))}),document.removeEventListener("scroll",O(this,Qe))},Cu=function(){if(bo(this,ut,[]),!O(this,Ze))return;let i=getComputedStyle(O(this,Ze));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=O(this,Ze);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=lt(this,ze,_s).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&O(this,ut).push(r),i.position==="fixed")return;r=lt(this,ze,_s).call(this,r)}O(this,ut).push(document.body)},_s=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},s.UUIPopoverContainerElement.styles=[v`
|
|
4829
5402
|
:host {
|
|
4830
5403
|
margin: 0;
|
|
4831
5404
|
width: fit-content;
|
|
@@ -4838,9 +5411,9 @@
|
|
|
4838
5411
|
overflow: visible;
|
|
4839
5412
|
color: var(--uui-color-text,#060606);
|
|
4840
5413
|
}
|
|
4841
|
-
`],
|
|
4842
|
-
<div id="bar" style=${
|
|
4843
|
-
`}},
|
|
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`
|
|
4844
5417
|
:host {
|
|
4845
5418
|
width: 100%;
|
|
4846
5419
|
height: 4px;
|
|
@@ -4857,7 +5430,7 @@
|
|
|
4857
5430
|
height: 100%;
|
|
4858
5431
|
width: 0%;
|
|
4859
5432
|
}
|
|
4860
|
-
`],
|
|
5433
|
+
`],Su([l({type:Number})],s.UUIProgressBarElement.prototype,"progress",1),s.UUIProgressBarElement=Su([m("uui-progress-bar")],s.UUIProgressBarElement);let go=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var fm=Object.defineProperty,ym=Object.getOwnPropertyDescriptor,Au=i=>{throw TypeError(i)},ct=(i,e,t,r)=>{for(var o=r>1?void 0:r?ym(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&&fm(e,t,o),o},wm=(i,e,t)=>e.has(i)||Au("Cannot "+t),_m=(i,e,t)=>e.has(i)?Au("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),$m=(i,e,t)=>(wm(i,e,"access private method"),t),$s,Pu;s.UUIRadioElement=class extends f{constructor(){super(...arguments),_m(this,$s),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>
|
|
4861
5434
|
<input
|
|
4862
5435
|
id="input"
|
|
4863
5436
|
type="radio"
|
|
@@ -4865,12 +5438,12 @@
|
|
|
4865
5438
|
value=${this.value}
|
|
4866
5439
|
.checked=${this.checked}
|
|
4867
5440
|
.disabled=${this.disabled||this.readonly}
|
|
4868
|
-
@change=${
|
|
5441
|
+
@change=${$m(this,$s,Pu)} />
|
|
4869
5442
|
<div id="button"></div>
|
|
4870
5443
|
<div id="label">
|
|
4871
|
-
${this.label?
|
|
5444
|
+
${this.label?h`<span>${this.label}</span>`:h`<slot></slot>`}
|
|
4872
5445
|
</div>
|
|
4873
|
-
</label>`}}
|
|
5446
|
+
</label>`}},$s=new WeakSet,Pu=function(i){i.stopPropagation();const e=this._inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new go(go.CHANGE))},s.UUIRadioElement.styles=[Ho,v`
|
|
4874
5447
|
:host {
|
|
4875
5448
|
display: block;
|
|
4876
5449
|
box-sizing: border-box;
|
|
@@ -4987,7 +5560,7 @@
|
|
|
4987
5560
|
}
|
|
4988
5561
|
|
|
4989
5562
|
:host([disabled]:active) #button {
|
|
4990
|
-
animation: ${
|
|
5563
|
+
animation: ${Ro};
|
|
4991
5564
|
}
|
|
4992
5565
|
|
|
4993
5566
|
@media (prefers-reduced-motion) {
|
|
@@ -4999,7 +5572,7 @@
|
|
|
4999
5572
|
transition: none;
|
|
5000
5573
|
}
|
|
5001
5574
|
}
|
|
5002
|
-
`],
|
|
5575
|
+
`],ct([S("#input")],s.UUIRadioElement.prototype,"_inputElement",2),ct([l({type:String})],s.UUIRadioElement.prototype,"name",2),ct([l({type:String})],s.UUIRadioElement.prototype,"value",2),ct([l({type:String})],s.UUIRadioElement.prototype,"label",2),ct([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"checked",2),ct([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"disabled",2),ct([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"readonly",2),s.UUIRadioElement=ct([m("uui-radio")],s.UUIRadioElement);let ks=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var km=Object.defineProperty,Um=Object.getOwnPropertyDescriptor,Mu=i=>{throw TypeError(i)},Us=(i,e,t,r)=>{for(var o=r>1?void 0:r?Um(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&&km(e,t,o),o},Es=(i,e,t)=>e.has(i)||Mu("Cannot "+t),U=(i,e,t)=>(Es(i,e,"read from private field"),t?t.call(i):e.get(i)),ht=(i,e,t)=>e.has(i)?Mu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),kr=(i,e,t,r)=>(Es(i,e,"write to private field"),e.set(i,t),t),j=(i,e,t)=>(Es(i,e,"access private method"),t),H,T,xs,Is,Ur,Er,Cs,B,zu,Ss,As,Ps,Ms,Nt,Lu,Ou,fo;const Em="ArrowLeft",xm="ArrowUp",Im="ArrowRight",Cm="ArrowDown",Sm=" ",Am="Enter";s.UUIRadioGroupElement=class extends xe(f,""){constructor(){super(),ht(this,B),this.disabled=!1,this.readonly=!1,ht(this,H,null),ht(this,T,[]),ht(this,xs,e=>{U(this,T)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),ht(this,Is,e=>{this.contains(e.relatedTarget)||U(this,H)===null&&U(this,T)?.forEach(t=>{t.makeFocusable()})}),ht(this,Ur,()=>{this.pristine=!1}),ht(this,Er,e=>{e.target.checked===!0&&(this.value=e.target.value,j(this,B,fo).call(this))}),ht(this,Cs,e=>{switch(e.key){case Em:case xm:{e.preventDefault(),j(this,B,Lu).call(this);break}case Im:case Cm:{e.preventDefault(),j(this,B,Ou).call(this);break}case Sm:{U(this,H)===null&&(this.value=j(this,B,Nt).call(this,1,!1)?.value,j(this,B,fo).call(this));break}case Am:this.submit()}}),this.addEventListener("keydown",U(this,Cs)),this.addEventListener("focusin",U(this,xs)),this.addEventListener("focusout",U(this,Is)),this.updateComplete.then(()=>{j(this,B,As).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,j(this,B,As).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&j(this,B,Ps).call(this,this.disabled),e.has("readonly")&&j(this,B,Ms).call(this,this.readonly),e.has("name")&&j(this,B,Ss).call(this,e.get("name"))}async focus(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.focus():j(this,B,Nt).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.blur():j(this,B,Nt).call(this,1,!1)?.blur()}async click(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.click():j(this,B,Nt).call(this,1,!1)?.click()}getFormElement(){if(U(this,T)&&U(this,H))return U(this,T)[U(this,H)]}render(){return h` <slot @slotchange=${j(this,B,zu)}></slot> `}},H=new WeakMap,T=new WeakMap,xs=new WeakMap,Is=new WeakMap,Ur=new WeakMap,Er=new WeakMap,Cs=new WeakMap,B=new WeakSet,zu=function(i){if(i.stopPropagation(),U(this,T)?.forEach(t=>{t.removeEventListener(go.CHANGE,U(this,Er)),t.removeEventListener("blur",U(this,Ur))}),kr(this,H,null),kr(this,T,i.target.assignedElements({flatten:!0}).filter(t=>t instanceof s.UUIRadioElement)),U(this,T).length===0)return;U(this,T).forEach(t=>{t.addEventListener(go.CHANGE,U(this,Er)),t.addEventListener("blur",U(this,Ur))}),j(this,B,Ss).call(this,this.name),this.disabled&&j(this,B,Ps).call(this,!0),this.readonly&&j(this,B,Ms).call(this,!0);const e=U(this,T).filter(t=>t.checked===!0);if(e.length>1&&(U(this,T).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,kr(this,H,U(this,T).indexOf(t))}},Ss=function(i){U(this,T)?.forEach(e=>e.name=i)},As=function(i){const e=[];U(this,T).forEach((t,r)=>{t.value===i?(t.checked=!0,t.makeFocusable(),kr(this,H,r)):(t.checked=!1,e.push(t))}),U(this,H)!==null&&e.forEach(t=>t.makeUnfocusable())},Ps=function(i){U(this,T)?.forEach(e=>e.disabled=i)},Ms=function(i){U(this,T)?.forEach(e=>e.readonly=i)},Nt=function(i=1,e=!0){if(!U(this,T)||U(this,T).length===0)return null;const t=U(this,T).length;let r=U(this,H)??0;for(let o=0;o<t+1;o++){if(!e||o>0){const n=U(this,T)[r];if(!n.disabled&&!n.readonly)return n}r=(r+i+t)%t}return null},Lu=function(){this.value=j(this,B,Nt).call(this,-1)?.value??"",U(this,T)[U(this,H)??0]?.focus(),j(this,B,fo).call(this)},Ou=function(){this.value=j(this,B,Nt).call(this)?.value??"",U(this,T)[U(this,H)??0]?.focus(),j(this,B,fo).call(this)},fo=function(){this.pristine=!1,this.dispatchEvent(new ks(ks.CHANGE))},s.UUIRadioGroupElement.formAssociated=!0,s.UUIRadioGroupElement.styles=[v`
|
|
5003
5576
|
:host {
|
|
5004
5577
|
display: inline-block;
|
|
5005
5578
|
padding-right: 3px;
|
|
@@ -5016,7 +5589,7 @@
|
|
|
5016
5589
|
71
|
|
5017
5590
|
));
|
|
5018
5591
|
}
|
|
5019
|
-
`],
|
|
5592
|
+
`],Us([l({type:Boolean,reflect:!0})],s.UUIRadioGroupElement.prototype,"disabled",2),Us([l({type:Boolean,reflect:!0})],s.UUIRadioGroupElement.prototype,"readonly",2),s.UUIRadioGroupElement=Us([m("uui-radio-group")],s.UUIRadioGroupElement);let dt=class extends M{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Pm=Object.defineProperty,Mm=Object.getOwnPropertyDescriptor,Tu=i=>{throw TypeError(i)},V=(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&&Pm(e,t,o),o},Nu=(i,e,t)=>e.has(i)||Tu("Cannot "+t),zm=(i,e,t)=>(Nu(i,e,"read from private field"),t?t.call(i):e.get(i)),Bu=(i,e,t)=>e.has(i)?Tu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ki=(i,e,t)=>(Nu(i,e,"access private method"),t),pt,Bt,zs;const Ls={TOP:3,CENTER:2},yo=18,Ui=3,Je=12,Lm=24,Os=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};s.UUIRangeSliderElement=class extends xe(f,""){constructor(){super(),Bu(this,pt),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,Bu(this,zs,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),n=Math.abs(this._highInputValue-r);o<n?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),n=Math.abs(this._highInputValue-r);o<n?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",zm(this,zs)),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,ki(this,pt,Bt).call(this)}get max(){return this._max}set max(e){this._max=e,ki(this,pt,Bt).call(this)}get step(){return this._step}set step(e){this._step=e,ki(this,pt,Bt).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,ki(this,pt,Bt).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,ki(this,pt,Bt).call(this)}get value(){return super.value}set value(e){super.value=e,ki(this,pt,Bt).call(this)}setValueLow(e){e=L(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=L(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=L(e,this.min,this.max-o),t=L(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,n=100-r/e*100;this._lowValuePercentStart=L(o,0,100),this._highValuePercentEnd=L(n,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,n=r/(t+Je*2),a=Math.round(n*o/this._step)*this._step,u=this.startPoint.low+a,c=this.startPoint.high+a;this.setValue(u,c,!0),this.dispatchEvent(new dt(dt.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 dt(dt.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 dt(dt.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 dt(dt.CHANGE))}render(){return h`
|
|
5020
5593
|
<div id="range-slider">
|
|
5021
5594
|
${this._renderNativeInputs()}
|
|
5022
5595
|
<div id="inner-track">
|
|
@@ -5030,26 +5603,26 @@
|
|
|
5030
5603
|
${this._renderSteps()}
|
|
5031
5604
|
</div>
|
|
5032
5605
|
</div>
|
|
5033
|
-
`}_renderThumbValues(){return
|
|
5606
|
+
`}_renderThumbValues(){return h`<div class="thumb-values">
|
|
5034
5607
|
<span
|
|
5035
5608
|
><span
|
|
5036
|
-
>${this._lowInputValue.toFixed(
|
|
5609
|
+
>${this._lowInputValue.toFixed(Os(this._step))}</span
|
|
5037
5610
|
></span
|
|
5038
5611
|
>
|
|
5039
5612
|
<span
|
|
5040
5613
|
><span
|
|
5041
|
-
>${this._highInputValue.toFixed(
|
|
5614
|
+
>${this._highInputValue.toFixed(Os(this._step))}</span
|
|
5042
5615
|
></span
|
|
5043
5616
|
>
|
|
5044
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-
|
|
5617
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-Je*2)/e;if(t<Lm||e%1!==0)return;let r=0;const o=new Array(e+1).fill(t).map(n=>n*r++);return h`<div class="step-wrapper">
|
|
5045
5618
|
<svg height="100%" width="100%">
|
|
5046
|
-
<rect x="9" y="9" height="${
|
|
5619
|
+
<rect x="9" y="9" height="${Ui}" rx="2" />
|
|
5047
5620
|
${this._renderStepCircles(o)}
|
|
5048
5621
|
</svg>
|
|
5049
5622
|
${this._renderStepValues(e)}
|
|
5050
|
-
</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(
|
|
5051
|
-
${r.map(o=>
|
|
5052
|
-
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return
|
|
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(Os(this._step)));return h`<div class="step-values">
|
|
5624
|
+
${r.map(o=>h`<span><span>${o}</span></span>`)}
|
|
5625
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return p`${e.map(r=>{const o=r+Je,n=this._lowInputValue-this._min,a=this._highInputValue-this._min;return o/t>=n&&o/t<=a?p`<circle class="track-step filled" cx="${o}" cy="${Ui*2}" r="4.5" />`:p`<circle class="track-step regular" cx="${o}" cy="${Ui*2}" r="4.5" />`})}`}_renderNativeInputs(){return h` <div class="native-wrapper">
|
|
5053
5626
|
<input
|
|
5054
5627
|
id="inputLow"
|
|
5055
5628
|
class="${this._movement?"focus":""}"
|
|
@@ -5074,7 +5647,7 @@
|
|
|
5074
5647
|
?disabled="${this.disabled||this.readonly}"
|
|
5075
5648
|
@input=${this._onHighInput}
|
|
5076
5649
|
@change=${this._onHighChange} />
|
|
5077
|
-
</div>`}},
|
|
5650
|
+
</div>`}},pt=new WeakSet,Bt=function(){const i=this.value.split(",");let e=Number(i[0])||0,t=Number(i[1])||0;t=L(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=L(e,this._min,this._minGap?t-this._minGap:t-this._step),this._highInputValue=L(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()},zs=new WeakMap,s.UUIRangeSliderElement.formAssociated=!0,s.UUIRangeSliderElement.styles=[v`
|
|
5078
5651
|
:host {
|
|
5079
5652
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
5080
5653
|
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
@@ -5110,8 +5683,8 @@
|
|
|
5110
5683
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5111
5684
|
position: absolute;
|
|
5112
5685
|
height: 3px;
|
|
5113
|
-
left: ${
|
|
5114
|
-
right: ${
|
|
5686
|
+
left: ${Je}px; /* Match TRACK_MARGIN */
|
|
5687
|
+
right: ${Je}px; /* Match TRACK_MARGIN */
|
|
5115
5688
|
}
|
|
5116
5689
|
|
|
5117
5690
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -5125,10 +5698,10 @@
|
|
|
5125
5698
|
display: flex;
|
|
5126
5699
|
flex-direction: column;
|
|
5127
5700
|
justify-content: center;
|
|
5128
|
-
height: ${
|
|
5701
|
+
height: ${yo}px;
|
|
5129
5702
|
cursor: grab;
|
|
5130
5703
|
user-select: none;
|
|
5131
|
-
z-index: ${
|
|
5704
|
+
z-index: ${Ls.CENTER};
|
|
5132
5705
|
}
|
|
5133
5706
|
|
|
5134
5707
|
:host([disabled]) #inner-color-thumb,
|
|
@@ -5152,16 +5725,16 @@
|
|
|
5152
5725
|
}
|
|
5153
5726
|
|
|
5154
5727
|
:host(:not([readonly])) #inner-color-thumb:hover .color {
|
|
5155
|
-
height: ${
|
|
5728
|
+
height: ${Ui*2}px;
|
|
5156
5729
|
background-color: var(--color-hover);
|
|
5157
|
-
transform: translateY(-${
|
|
5730
|
+
transform: translateY(-${Ui/2}px);
|
|
5158
5731
|
}
|
|
5159
5732
|
|
|
5160
5733
|
.color {
|
|
5161
5734
|
user-select: none;
|
|
5162
5735
|
position: absolute;
|
|
5163
5736
|
inset-inline: 0;
|
|
5164
|
-
height: ${
|
|
5737
|
+
height: ${Ui}px;
|
|
5165
5738
|
top: 50%;
|
|
5166
5739
|
transform: translateY(0);
|
|
5167
5740
|
background-color: var(--color-interactive);
|
|
@@ -5186,7 +5759,7 @@
|
|
|
5186
5759
|
|
|
5187
5760
|
/** Steps */
|
|
5188
5761
|
.step-wrapper {
|
|
5189
|
-
margin: 0 ${-1*
|
|
5762
|
+
margin: 0 ${-1*Je}px;
|
|
5190
5763
|
height: 11px;
|
|
5191
5764
|
position: absolute;
|
|
5192
5765
|
left: 0;
|
|
@@ -5229,7 +5802,7 @@
|
|
|
5229
5802
|
|
|
5230
5803
|
.step-values {
|
|
5231
5804
|
box-sizing: border-box;
|
|
5232
|
-
margin: 0 ${
|
|
5805
|
+
margin: 0 ${Je}px; /* Match TRACK_MARGIN */
|
|
5233
5806
|
display: flex;
|
|
5234
5807
|
justify-content: space-between;
|
|
5235
5808
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -5311,9 +5884,9 @@
|
|
|
5311
5884
|
pointer-events: all;
|
|
5312
5885
|
cursor: grab;
|
|
5313
5886
|
position: relative;
|
|
5314
|
-
z-index: ${
|
|
5315
|
-
width: ${
|
|
5316
|
-
height: ${
|
|
5887
|
+
z-index: ${Ls.TOP};
|
|
5888
|
+
width: ${yo}px;
|
|
5889
|
+
height: ${yo}px;
|
|
5317
5890
|
border-radius: 24px;
|
|
5318
5891
|
border: none;
|
|
5319
5892
|
background-color: var(--color-interactive);
|
|
@@ -5357,9 +5930,9 @@
|
|
|
5357
5930
|
pointer-events: all;
|
|
5358
5931
|
cursor: grab;
|
|
5359
5932
|
position: relative;
|
|
5360
|
-
z-index: ${
|
|
5361
|
-
width: ${
|
|
5362
|
-
height: ${
|
|
5933
|
+
z-index: ${Ls.TOP};
|
|
5934
|
+
width: ${yo}px;
|
|
5935
|
+
height: ${yo}px;
|
|
5363
5936
|
border-radius: 24px;
|
|
5364
5937
|
border: none;
|
|
5365
5938
|
background-color: var(--color-interactive);
|
|
@@ -5394,7 +5967,7 @@
|
|
|
5394
5967
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
5395
5968
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
5396
5969
|
}
|
|
5397
|
-
`],
|
|
5970
|
+
`],V([l({type:String})],s.UUIRangeSliderElement.prototype,"label",2),V([l({type:Boolean,reflect:!0})],s.UUIRangeSliderElement.prototype,"disabled",2),V([l({type:Boolean,reflect:!0})],s.UUIRangeSliderElement.prototype,"readonly",2),V([l({type:Number})],s.UUIRangeSliderElement.prototype,"min",1),V([l({type:Number})],s.UUIRangeSliderElement.prototype,"max",1),V([l({type:Boolean,attribute:"hide-step-values"})],s.UUIRangeSliderElement.prototype,"hideStepValues",2),V([l({type:Number})],s.UUIRangeSliderElement.prototype,"step",1),V([l({type:Number,attribute:"min-gap"})],s.UUIRangeSliderElement.prototype,"minGap",1),V([l({type:Number,attribute:"max-gap"})],s.UUIRangeSliderElement.prototype,"maxGap",1),V([l({type:String})],s.UUIRangeSliderElement.prototype,"value",1),V([w()],s.UUIRangeSliderElement.prototype,"_movement",2),V([w()],s.UUIRangeSliderElement.prototype,"_lowInputValue",2),V([w()],s.UUIRangeSliderElement.prototype,"_highInputValue",2),V([w()],s.UUIRangeSliderElement.prototype,"_trackWidth",2),V([w()],s.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),V([w()],s.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),V([S("#range-slider")],s.UUIRangeSliderElement.prototype,"_outerTrack",2),V([S("#inputLow")],s.UUIRangeSliderElement.prototype,"_inputLow",2),V([S("#inputHigh")],s.UUIRangeSliderElement.prototype,"_inputHigh",2),V([S(".color")],s.UUIRangeSliderElement.prototype,"_innerColor",2),V([S("#inner-color-thumb")],s.UUIRangeSliderElement.prototype,"_innerColorThumb",2),s.UUIRangeSliderElement=V([m("uui-range-slider")],s.UUIRangeSliderElement);var Om=(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.UUIRefListElement=class extends f{render(){return h`<slot></slot>`}},s.UUIRefListElement.styles=[v`
|
|
5398
5971
|
:host {
|
|
5399
5972
|
display: block;
|
|
5400
5973
|
}
|
|
@@ -5410,7 +5983,7 @@
|
|
|
5410
5983
|
right: 0;
|
|
5411
5984
|
border-top: 1px solid var(--uui-color-border,#d8d7d9);
|
|
5412
5985
|
}
|
|
5413
|
-
`],
|
|
5986
|
+
`],s.UUIRefListElement=Om([m("uui-ref-list")],s.UUIRefListElement);let wo=class extends M{static{this.OPEN="open"}};var Tm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,xr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nm(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&&Tm(e,t,o),o};s.UUIRefElement=class extends To(Xt(f)){constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new wo(wo.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new wo(wo.OPEN)))}},s.UUIRefElement.styles=[v`
|
|
5414
5987
|
:host {
|
|
5415
5988
|
position: relative;
|
|
5416
5989
|
display: flex;
|
|
@@ -5587,7 +6160,7 @@
|
|
|
5587
6160
|
justify-content: flex-end;
|
|
5588
6161
|
align-items: center;
|
|
5589
6162
|
}
|
|
5590
|
-
`],
|
|
6163
|
+
`],xr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"disabled",2),xr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"readonly",2),xr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"error",2),s.UUIRefElement=xr([m("uui-ref")],s.UUIRefElement);var Bm=Object.defineProperty,Vm=Object.getOwnPropertyDescriptor,Vu=i=>{throw TypeError(i)},bt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vm(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&&Bm(e,t,o),o},Dm=(i,e,t)=>e.has(i)||Vu("Cannot "+t),jm=(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),vt=(i,e,t)=>(Dm(i,e,"access private method"),t),Le,Du,ju,Ir,Hu,Ru,Fu;s.UUIRefNodeElement=class extends s.UUIRefElement{constructor(){super(...arguments),jm(this,Le),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
5591
6164
|
xmlns="http://www.w3.org/2000/svg"
|
|
5592
6165
|
viewBox="0 0 24 24"
|
|
5593
6166
|
fill="none"
|
|
@@ -5598,36 +6171,36 @@
|
|
|
5598
6171
|
id="icon">
|
|
5599
6172
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
5600
6173
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
5601
|
-
</svg>`}connectedCallback(){super.connectedCallback(),
|
|
6174
|
+
</svg>`}connectedCallback(){super.connectedCallback(),k(this,"uui-icon")}async focus(){await this.updateComplete,this._openPart?.focus()}renderDetail(){return h`<small id="detail"
|
|
5602
6175
|
>${this.detail}<slot name="detail"></slot
|
|
5603
|
-
></small>`}render(){return
|
|
5604
|
-
${
|
|
6176
|
+
></small>`}render(){return h`
|
|
6177
|
+
${vt(this,Le,Fu).call(this)}
|
|
5605
6178
|
<!-- Select border must be right after #open-part -->
|
|
5606
6179
|
<div id="select-border"></div>
|
|
5607
6180
|
|
|
5608
6181
|
<slot></slot>
|
|
5609
6182
|
<slot name="tag" id="tag-container"></slot>
|
|
5610
6183
|
<slot name="actions" id="actions-container"></slot>
|
|
5611
|
-
`}}
|
|
6184
|
+
`}},Le=new WeakSet,Du=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},ju=function(){return h`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Ir=function(){return h`
|
|
5612
6185
|
<span id="content" class="uui-text">
|
|
5613
6186
|
<span id="icon">
|
|
5614
|
-
<slot name="icon" @slotchange=${
|
|
5615
|
-
${this._iconSlotHasContent===!1?
|
|
6187
|
+
<slot name="icon" @slotchange=${vt(this,Le,Du)}></slot>
|
|
6188
|
+
${this._iconSlotHasContent===!1?vt(this,Le,ju).call(this):""}
|
|
5616
6189
|
</span>
|
|
5617
6190
|
<div id="info">
|
|
5618
6191
|
<div id="name">${this.name}<slot name="name"></slot></div>
|
|
5619
6192
|
${this.renderDetail()}
|
|
5620
6193
|
</div>
|
|
5621
6194
|
</span>
|
|
5622
|
-
`},
|
|
6195
|
+
`},Hu=function(){return h`<a
|
|
5623
6196
|
id="open-part"
|
|
5624
6197
|
class="uui-text"
|
|
5625
|
-
tabindex=${this.disabled?
|
|
5626
|
-
href=${
|
|
5627
|
-
target=${
|
|
5628
|
-
rel=${
|
|
5629
|
-
${
|
|
5630
|
-
</a>`},
|
|
6198
|
+
tabindex=${this.disabled?C:"0"}
|
|
6199
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
6200
|
+
target=${_(this.target||void 0)}
|
|
6201
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
6202
|
+
${vt(this,Le,Ir).call(this)}
|
|
6203
|
+
</a>`},Ru=function(){return h`
|
|
5631
6204
|
<button
|
|
5632
6205
|
type="button"
|
|
5633
6206
|
id="open-part"
|
|
@@ -5636,9 +6209,9 @@
|
|
|
5636
6209
|
@click=${this.handleOpenClick}
|
|
5637
6210
|
@keydown=${this.handleOpenKeydown}
|
|
5638
6211
|
?disabled=${this.disabled}>
|
|
5639
|
-
${
|
|
6212
|
+
${vt(this,Le,Ir).call(this)}
|
|
5640
6213
|
</button>
|
|
5641
|
-
`},
|
|
6214
|
+
`},Fu=function(){return this.readonly?h`${vt(this,Le,Ir).call(this)}`:this.href?vt(this,Le,Hu).call(this):vt(this,Le,Ru).call(this)},s.UUIRefNodeElement.styles=[...s.UUIRefElement.styles,v`
|
|
5642
6215
|
:host {
|
|
5643
6216
|
min-width: 250px;
|
|
5644
6217
|
padding: 1px;
|
|
@@ -5725,17 +6298,17 @@
|
|
|
5725
6298
|
:host([disabled]) #detail {
|
|
5726
6299
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5727
6300
|
}
|
|
5728
|
-
`],
|
|
6301
|
+
`],bt([l({type:String})],s.UUIRefNodeElement.prototype,"name",2),bt([l({type:String})],s.UUIRefNodeElement.prototype,"detail",2),bt([l({type:String})],s.UUIRefNodeElement.prototype,"href",2),bt([l({type:String})],s.UUIRefNodeElement.prototype,"target",2),bt([l({type:String})],s.UUIRefNodeElement.prototype,"rel",2),bt([S("#open-part")],s.UUIRefNodeElement.prototype,"_openPart",2),bt([w()],s.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),s.UUIRefNodeElement=bt([m("uui-ref-node")],s.UUIRefNodeElement);var Hm=Object.defineProperty,Rm=Object.getOwnPropertyDescriptor,Wu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rm(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&&Hm(e,t,o),o};s.UUIRefNodeDataTypeElement=class extends s.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"
|
|
5729
6302
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5730
|
-
></small>`}},
|
|
6303
|
+
></small>`}},s.UUIRefNodeDataTypeElement.styles=[...s.UUIRefNodeElement.styles],Wu([l({type:String})],s.UUIRefNodeDataTypeElement.prototype,"alias",2),s.UUIRefNodeDataTypeElement=Wu([m("uui-ref-node-data-type")],s.UUIRefNodeDataTypeElement);var Fm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,Gu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wm(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&&Fm(e,t,o),o};s.UUIRefNodeDocumentTypeElement=class extends s.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"
|
|
5731
6304
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5732
|
-
></small>`}},
|
|
6305
|
+
></small>`}},s.UUIRefNodeDocumentTypeElement.styles=[...s.UUIRefNodeElement.styles],Gu([l({type:String})],s.UUIRefNodeDocumentTypeElement.prototype,"alias",2),s.UUIRefNodeDocumentTypeElement=Gu([m("uui-ref-node-document-type")],s.UUIRefNodeDocumentTypeElement);var Gm=(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.UUIRefNodeFormElement=class extends s.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>'}},s.UUIRefNodeFormElement.styles=[...s.UUIRefNodeElement.styles],s.UUIRefNodeFormElement=Gm([m("uui-ref-node-form")],s.UUIRefNodeFormElement);var qm=Object.defineProperty,Km=Object.getOwnPropertyDescriptor,qu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Km(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&&qm(e,t,o),o};s.UUIRefNodeMemberElement=class extends s.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"
|
|
5733
6306
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5734
|
-
></small>`}},
|
|
6307
|
+
></small>`}},s.UUIRefNodeMemberElement.styles=[...s.UUIRefNodeElement.styles],qu([l({type:String,attribute:"group-name"})],s.UUIRefNodeMemberElement.prototype,"groupName",2),s.UUIRefNodeMemberElement=qu([m("uui-ref-node-member")],s.UUIRefNodeMemberElement);var Xm=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,Ts=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ym(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&&Xm(e,t,o),o};s.UUIRefNodePackageElement=class extends s.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"
|
|
5735
6308
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5736
|
-
></small>`}},
|
|
6309
|
+
></small>`}},s.UUIRefNodePackageElement.styles=[...s.UUIRefNodeElement.styles],Ts([l({type:String})],s.UUIRefNodePackageElement.prototype,"version",2),Ts([l({type:String})],s.UUIRefNodePackageElement.prototype,"author",2),s.UUIRefNodePackageElement=Ts([m("uui-ref-node-package")],s.UUIRefNodePackageElement);var Zm=Object.defineProperty,Qm=Object.getOwnPropertyDescriptor,Ku=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qm(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&&Zm(e,t,o),o};s.UUIRefNodeUserElement=class extends s.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"
|
|
5737
6310
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5738
|
-
></small>`}},
|
|
6311
|
+
></small>`}},s.UUIRefNodeUserElement.styles=[...s.UUIRefNodeElement.styles],Ku([l({type:String,attribute:"group-name"})],s.UUIRefNodeUserElement.prototype,"groupName",2),s.UUIRefNodeUserElement=Ku([m("uui-ref-node-user")],s.UUIRefNodeUserElement);var Jm=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,Xu=(i,e,t,r)=>{for(var o=r>1?void 0:r?eg(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&&Jm(e,t,o),o};s.UUIScrollContainerElement=class extends f{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return h`<slot></slot>`}},s.UUIScrollContainerElement.styles=[v`
|
|
5739
6312
|
:host {
|
|
5740
6313
|
display: block;
|
|
5741
6314
|
scrollbar-width: thin;
|
|
@@ -5761,18 +6334,18 @@
|
|
|
5761
6334
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5762
6335
|
border-radius: 3px;
|
|
5763
6336
|
}
|
|
5764
|
-
`],
|
|
6337
|
+
`],Xu([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],s.UUIScrollContainerElement.prototype,"enforceScroll",2),s.UUIScrollContainerElement=Xu([m("uui-scroll-container")],s.UUIScrollContainerElement);let Ns=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var tg=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,$e=(i,e,t,r)=>{for(var o=r>1?void 0:r?ig(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&&tg(e,t,o),o};s.UUISelectElement=class extends xe(f,""){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 Ns(Ns.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,r,o){return h`<option
|
|
5765
6338
|
value="${t}"
|
|
5766
6339
|
?selected=${r}
|
|
5767
6340
|
?disabled=${o}>
|
|
5768
6341
|
${e}
|
|
5769
|
-
</option>`}_renderGrouped(){return this._groups.length===0?
|
|
5770
|
-
${this._groups.map(e=>
|
|
6342
|
+
</option>`}_renderGrouped(){return this._groups.length===0?C:h`
|
|
6343
|
+
${this._groups.map(e=>h`<optgroup
|
|
5771
6344
|
label=${e}
|
|
5772
6345
|
?disabled=${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}>
|
|
5773
6346
|
${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}
|
|
5774
6347
|
</optgroup>`)}
|
|
5775
|
-
`}_getDisplayValue(){return this.options.find(e=>e.value===this.value)?.name||this.value}render(){return this.readonly?
|
|
6348
|
+
`}_getDisplayValue(){return this.options.find(e=>e.value===this.value)?.name||this.value}render(){return this.readonly?h`<span>${this._getDisplayValue()}</span>`:h` <select
|
|
5776
6349
|
id="native"
|
|
5777
6350
|
aria-label=${this.label}
|
|
5778
6351
|
@change=${this.setValue}
|
|
@@ -5782,7 +6355,7 @@
|
|
|
5782
6355
|
<option disabled selected value="" hidden>${this.placeholder}</option>
|
|
5783
6356
|
${this._renderGrouped()}
|
|
5784
6357
|
${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}
|
|
5785
|
-
</select>`}},
|
|
6358
|
+
</select>`}},s.UUISelectElement.styles=[v`
|
|
5786
6359
|
:host {
|
|
5787
6360
|
display: inline-block;
|
|
5788
6361
|
position: relative;
|
|
@@ -5860,7 +6433,7 @@
|
|
|
5860
6433
|
71
|
|
5861
6434
|
));
|
|
5862
6435
|
}
|
|
5863
|
-
`]
|
|
6436
|
+
`],$e([l({type:String})],s.UUISelectElement.prototype,"label",2),$e([l()],s.UUISelectElement.prototype,"placeholder",2),$e([l({type:Boolean,reflect:!0})],s.UUISelectElement.prototype,"disabled",2),$e([l({type:Boolean,reflect:!0})],s.UUISelectElement.prototype,"readonly",2),$e([l({type:Boolean,reflect:!0})],s.UUISelectElement.prototype,"error",2),$e([l({type:Array,attribute:!1})],s.UUISelectElement.prototype,"options",2),$e([w()],s.UUISelectElement.prototype,"_groups",2),$e([l()],s.UUISelectElement.prototype,"disabledGroups",2),$e([w()],s.UUISelectElement.prototype,"_disabledGroups",2),$e([S("#native")],s.UUISelectElement.prototype,"_input",2),s.UUISelectElement=$e([m("uui-select")],s.UUISelectElement);const og=v`
|
|
5864
6437
|
input[type='range'] {
|
|
5865
6438
|
left: 0;
|
|
5866
6439
|
position: absolute;
|
|
@@ -5967,15 +6540,15 @@
|
|
|
5967
6540
|
input[type='range']:focus::-ms-fill-upper {
|
|
5968
6541
|
background: transparent;
|
|
5969
6542
|
}
|
|
5970
|
-
`;let
|
|
5971
|
-
${this._steps.map(e=>{if(this._stepWidth>=
|
|
5972
|
-
`}renderStepValues(){return this.hideStepValues?
|
|
5973
|
-
${this._steps.map(e=>
|
|
6543
|
+
`;let _o=class extends M{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var rg=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,Yu=i=>{throw TypeError(i)},Z=(i,e,t,r)=>{for(var o=r>1?void 0:r?ng(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&&rg(e,t,o),o},Bs=(i,e,t)=>e.has(i)||Yu("Cannot "+t),Zu=(i,e,t)=>(Bs(i,e,"read from private field"),t?t.call(i):e.get(i)),Vs=(i,e,t)=>e.has(i)?Yu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Qu=(i,e,t,r)=>(Bs(i,e,"write to private field"),e.set(i,t),t),sg=(i,e,t)=>(Bs(i,e,"access private method"),t),Cr,Sr,Ds,Ju;const $o=12,ec=24,ag=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t),lg=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};s.UUISliderElement=class extends xe(f,""){constructor(){super(),Vs(this,Ds),Vs(this,Cr,0),this.hideStepValues=!1,this.hideValueLabel=!1,this.min=0,this.max=100,Vs(this,Sr,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",sg(this,Ds,Ju))}get step(){return Zu(this,Sr)}set step(e){Qu(this,Sr,e),Qu(this,Cr,(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(Zu(this,Cr)).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=ag(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-$o*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 _o(_o.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new _o(_o.CHANGE))}renderTrackSteps(){return p`
|
|
6544
|
+
${this._steps.map(e=>{if(this._stepWidth>=ec){const t=Math.round($o+this._stepWidth*this._steps.indexOf(e));return p`<circle class="track-step" cx="${t}" cy="50%" r="4.5" />`}return p``})}
|
|
6545
|
+
`}renderStepValues(){return this.hideStepValues?C:h`<div id="step-values">
|
|
6546
|
+
${this._steps.map(e=>h` <span
|
|
5974
6547
|
><span>
|
|
5975
|
-
${this._steps.length<=20&&this._stepWidth>=
|
|
6548
|
+
${this._steps.length<=20&&this._stepWidth>=ec?e.toFixed(lg(this.step)):C}
|
|
5976
6549
|
</span></span
|
|
5977
6550
|
>`)}
|
|
5978
|
-
</div>`}render(){return
|
|
6551
|
+
</div>`}render(){return h`
|
|
5979
6552
|
<input
|
|
5980
6553
|
id="input"
|
|
5981
6554
|
type="range"
|
|
@@ -5995,13 +6568,13 @@
|
|
|
5995
6568
|
</svg>
|
|
5996
6569
|
|
|
5997
6570
|
<div id="track-inner" aria-hidden="true">
|
|
5998
|
-
<div id="thumb" style=${
|
|
5999
|
-
${this.hideValueLabel?null:
|
|
6571
|
+
<div id="thumb" style=${We({left:this._sliderPosition})}>
|
|
6572
|
+
${this.hideValueLabel?null:h`<div id="thumb-label">${this.value}</div>`}
|
|
6000
6573
|
</div>
|
|
6001
6574
|
</div>
|
|
6002
6575
|
</div>
|
|
6003
6576
|
${this.renderStepValues()}
|
|
6004
|
-
`}},
|
|
6577
|
+
`}},Cr=new WeakMap,Sr=new WeakMap,Ds=new WeakSet,Ju=function(i){i.key=="Enter"&&this.submit()},s.UUISliderElement.formAssociated=!0,s.UUISliderElement.styles=[Rd,og,v`
|
|
6005
6578
|
:host {
|
|
6006
6579
|
display: inline-block;
|
|
6007
6580
|
width: 100%;
|
|
@@ -6050,8 +6623,8 @@
|
|
|
6050
6623
|
|
|
6051
6624
|
#track-inner {
|
|
6052
6625
|
position: absolute;
|
|
6053
|
-
left: ${
|
|
6054
|
-
right: ${
|
|
6626
|
+
left: ${$o}px; /* Match TRACK_MARGIN */
|
|
6627
|
+
right: ${$o}px; /* Match TRACK_MARGIN */
|
|
6055
6628
|
}
|
|
6056
6629
|
|
|
6057
6630
|
#thumb {
|
|
@@ -6113,7 +6686,7 @@
|
|
|
6113
6686
|
}
|
|
6114
6687
|
|
|
6115
6688
|
#step-values {
|
|
6116
|
-
margin: 0 ${
|
|
6689
|
+
margin: 0 ${$o}px; /* Match TRACK_MARGIN */
|
|
6117
6690
|
margin-top: 6px;
|
|
6118
6691
|
display: flex;
|
|
6119
6692
|
align-items: flex-end;
|
|
@@ -6162,7 +6735,7 @@
|
|
|
6162
6735
|
:host([readonly]) #thumb-label {
|
|
6163
6736
|
opacity: 1;
|
|
6164
6737
|
}
|
|
6165
|
-
`],
|
|
6738
|
+
`],Z([l({type:Boolean,attribute:"hide-step-values"})],s.UUISliderElement.prototype,"hideStepValues",2),Z([l({type:Boolean,attribute:"hide-value-label"})],s.UUISliderElement.prototype,"hideValueLabel",2),Z([l({type:Number})],s.UUISliderElement.prototype,"min",2),Z([l({type:Number})],s.UUISliderElement.prototype,"max",2),Z([l({type:Number})],s.UUISliderElement.prototype,"step",1),Z([l({type:String})],s.UUISliderElement.prototype,"value",1),Z([l({type:Boolean,reflect:!0})],s.UUISliderElement.prototype,"disabled",2),Z([l({type:Boolean,reflect:!0})],s.UUISliderElement.prototype,"readonly",2),Z([l({type:String})],s.UUISliderElement.prototype,"label",2),Z([S("#input")],s.UUISliderElement.prototype,"_input",2),Z([S("#track")],s.UUISliderElement.prototype,"_track",2),Z([w()],s.UUISliderElement.prototype,"_stepWidth",2),Z([w()],s.UUISliderElement.prototype,"_steps",2),Z([w()],s.UUISliderElement.prototype,"_sliderPosition",2),s.UUISliderElement=Z([m("uui-slider")],s.UUISliderElement);var ug=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,tc=(i,e,t,r)=>{for(var o=r>1?void 0:r?cg(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&&ug(e,t,o),o};s.UUISymbolExpandElement=class extends f{constructor(){super(...arguments),this.open=!1}render(){return h`<svg
|
|
6166
6739
|
xmlns="http://www.w3.org/2000/svg"
|
|
6167
6740
|
viewBox="0 0 24 24"
|
|
6168
6741
|
fill="none"
|
|
@@ -6171,7 +6744,7 @@
|
|
|
6171
6744
|
stroke-linecap="round"
|
|
6172
6745
|
stroke-linejoin="round">
|
|
6173
6746
|
<path d="m4 9 8 8 8-8"></path>
|
|
6174
|
-
</svg>`}},
|
|
6747
|
+
</svg>`}},s.UUISymbolExpandElement.styles=[v`
|
|
6175
6748
|
:host {
|
|
6176
6749
|
display: inline-flex;
|
|
6177
6750
|
width: 12px;
|
|
@@ -6189,9 +6762,9 @@
|
|
|
6189
6762
|
:host([open]) svg {
|
|
6190
6763
|
transform: rotate(0deg);
|
|
6191
6764
|
}
|
|
6192
|
-
`],
|
|
6765
|
+
`],tc([l({type:Boolean,reflect:!0})],s.UUISymbolExpandElement.prototype,"open",2),s.UUISymbolExpandElement=tc([m("uui-symbol-expand")],s.UUISymbolExpandElement);var hg=Object.defineProperty,dg=Object.getOwnPropertyDescriptor,js=(i,e,t,r)=>{for(var o=r>1?void 0:r?dg(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&&hg(e,t,o),o};s.UUISymbolFileThumbnailElement=class extends f{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),k(this,"uui-icon")}render(){return this.src?h`<img src=${this.src} alt=${this.alt} />`:h`<uui-icon
|
|
6193
6766
|
name="picture"
|
|
6194
|
-
.fallback=${
|
|
6767
|
+
.fallback=${Zd.strings[0]}></uui-icon>`}},s.UUISymbolFileThumbnailElement.styles=[v`
|
|
6195
6768
|
:host {
|
|
6196
6769
|
display: block;
|
|
6197
6770
|
width: 100%;
|
|
@@ -6214,7 +6787,7 @@
|
|
|
6214
6787
|
color: var(--uui-color-surface,#fff);
|
|
6215
6788
|
background: var(--uui-color-surface-alt,#f3f3f5);
|
|
6216
6789
|
}
|
|
6217
|
-
`],
|
|
6790
|
+
`],js([l({type:String})],s.UUISymbolFileThumbnailElement.prototype,"src",2),js([l({type:String})],s.UUISymbolFileThumbnailElement.prototype,"alt",2),s.UUISymbolFileThumbnailElement=js([m("uui-symbol-file-thumbnail")],s.UUISymbolFileThumbnailElement);var pg=Object.defineProperty,bg=Object.getOwnPropertyDescriptor,ic=(i,e,t,r)=>{for(var o=r>1?void 0:r?bg(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&&pg(e,t,o),o};s.UUISymbolFileElement=class extends f{constructor(){super(...arguments),this.type=""}render(){return h`
|
|
6218
6791
|
<svg
|
|
6219
6792
|
xmlns="http://www.w3.org/2000/svg"
|
|
6220
6793
|
viewBox="0 0 24 24"
|
|
@@ -6228,10 +6801,10 @@
|
|
|
6228
6801
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
6229
6802
|
</svg>
|
|
6230
6803
|
|
|
6231
|
-
${this.type?
|
|
6804
|
+
${this.type?h`<small id="file-type" class="uui-small"
|
|
6232
6805
|
>${this.type.toUpperCase()}</small
|
|
6233
6806
|
>`:""}
|
|
6234
|
-
`}},
|
|
6807
|
+
`}},s.UUISymbolFileElement.styles=[qt,v`
|
|
6235
6808
|
:host {
|
|
6236
6809
|
position: relative;
|
|
6237
6810
|
display: block;
|
|
@@ -6257,7 +6830,7 @@
|
|
|
6257
6830
|
width: 100%;
|
|
6258
6831
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6259
6832
|
}
|
|
6260
|
-
`],
|
|
6833
|
+
`],ic([l({type:String})],s.UUISymbolFileElement.prototype,"type",2),s.UUISymbolFileElement=ic([m("uui-symbol-file")],s.UUISymbolFileElement);var vg=(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.UUISymbolFolderElement=class extends f{render(){return h`<svg
|
|
6261
6834
|
xmlns="http://www.w3.org/2000/svg"
|
|
6262
6835
|
viewBox="0 0 24 24"
|
|
6263
6836
|
fill="none"
|
|
@@ -6268,7 +6841,7 @@
|
|
|
6268
6841
|
id="icon">
|
|
6269
6842
|
<path
|
|
6270
6843
|
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" />
|
|
6271
|
-
</svg>`}},
|
|
6844
|
+
</svg>`}},s.UUISymbolFolderElement.styles=[v`
|
|
6272
6845
|
:host {
|
|
6273
6846
|
display: block;
|
|
6274
6847
|
position: relative;
|
|
@@ -6279,9 +6852,9 @@
|
|
|
6279
6852
|
width: 100%;
|
|
6280
6853
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6281
6854
|
}
|
|
6282
|
-
`],
|
|
6283
|
-
${this.open===!0?
|
|
6284
|
-
</svg>`}},
|
|
6855
|
+
`],s.UUISymbolFolderElement=vg([m("uui-symbol-folder")],s.UUISymbolFolderElement);var mg=Object.defineProperty,gg=Object.getOwnPropertyDescriptor,oc=(i,e,t,r)=>{for(var o=r>1?void 0:r?gg(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&&mg(e,t,o),o};s.UUISymbolLockElement=class extends f{constructor(){super(...arguments),this.open=!1}render(){return p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
6856
|
+
${this.open===!0?p`<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>`:p`<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>`}
|
|
6857
|
+
</svg>`}},s.UUISymbolLockElement.styles=[v`
|
|
6285
6858
|
:host {
|
|
6286
6859
|
display: inline-block;
|
|
6287
6860
|
vertical-align: middle;
|
|
@@ -6291,11 +6864,11 @@
|
|
|
6291
6864
|
svg {
|
|
6292
6865
|
fill: currentColor;
|
|
6293
6866
|
}
|
|
6294
|
-
`],
|
|
6867
|
+
`],oc([l({type:Boolean,reflect:!0})],s.UUISymbolLockElement.prototype,"open",2),s.UUISymbolLockElement=oc([m("uui-symbol-lock")],s.UUISymbolLockElement);var fg=(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.UUISymbolMoreElement=class extends f{render(){return p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
6295
6868
|
<circle cx="17" cy="50" r="9"></circle>
|
|
6296
6869
|
<circle cx="50" cy="50" r="9"></circle>
|
|
6297
6870
|
<circle cx="83" cy="50" r="9"></circle>
|
|
6298
|
-
</svg>`}},
|
|
6871
|
+
</svg>`}},s.UUISymbolMoreElement.styles=[v`
|
|
6299
6872
|
:host {
|
|
6300
6873
|
display: inline-block;
|
|
6301
6874
|
vertical-align: bottom;
|
|
@@ -6306,7 +6879,7 @@
|
|
|
6306
6879
|
svg {
|
|
6307
6880
|
fill: currentColor;
|
|
6308
6881
|
}
|
|
6309
|
-
`],
|
|
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
|
|
6310
6883
|
id="up"
|
|
6311
6884
|
xmlns="http://www.w3.org/2000/svg"
|
|
6312
6885
|
width="24"
|
|
@@ -6331,7 +6904,7 @@
|
|
|
6331
6904
|
stroke-linecap="round"
|
|
6332
6905
|
stroke-linejoin="round">
|
|
6333
6906
|
<path d="m4 9 8 8 8-8"></path>
|
|
6334
|
-
</svg>`}},
|
|
6907
|
+
</svg>`}},s.UUISymbolSortElement.styles=[v`
|
|
6335
6908
|
:host {
|
|
6336
6909
|
position: relative;
|
|
6337
6910
|
display: inline-block;
|
|
@@ -6390,7 +6963,7 @@
|
|
|
6390
6963
|
:host([active][descending]) #down {
|
|
6391
6964
|
opacity: calc(0.25 * var(--uui-symbol-sort-hover, 0));
|
|
6392
6965
|
}
|
|
6393
|
-
`],
|
|
6966
|
+
`],rc([l({type:Boolean,reflect:!0})],s.UUISymbolSortElement.prototype,"descending",2),s.UUISymbolSortElement=rc([m("uui-symbol-sort")],s.UUISymbolSortElement);var _g=(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.UUITableElement=class extends f{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return h`<slot></slot>`}},s.UUITableElement.styles=[v`
|
|
6394
6967
|
:host {
|
|
6395
6968
|
display: table;
|
|
6396
6969
|
width: 100%;
|
|
@@ -6398,7 +6971,7 @@
|
|
|
6398
6971
|
background-color: var(--uui-color-surface,#fff);
|
|
6399
6972
|
cursor: default;
|
|
6400
6973
|
}
|
|
6401
|
-
`],
|
|
6974
|
+
`],s.UUITableElement=_g([m("uui-table")],s.UUITableElement);var $g=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,Ar=(i,e,t,r)=>{for(var o=r>1?void 0:r?kg(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&&$g(e,t,o),o};s.UUITableCellElement=class extends f{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>`}},s.UUITableCellElement.styles=[v`
|
|
6402
6975
|
:host {
|
|
6403
6976
|
position: relative;
|
|
6404
6977
|
display: table-cell;
|
|
@@ -6432,20 +7005,20 @@
|
|
|
6432
7005
|
:host([no-padding]) {
|
|
6433
7006
|
padding: 0;
|
|
6434
7007
|
}
|
|
6435
|
-
`],
|
|
7008
|
+
`],Ar([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],s.UUITableCellElement.prototype,"disableChildInteraction",2),Ar([l({type:Boolean,reflect:!0,attribute:"no-padding"})],s.UUITableCellElement.prototype,"noPadding",2),Ar([l({type:Boolean,reflect:!0,attribute:"clip-text"})],s.UUITableCellElement.prototype,"clipText",2),s.UUITableCellElement=Ar([m("uui-table-cell")],s.UUITableCellElement);var Ug=(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.UUITableColumnElement=class extends f{},s.UUITableColumnElement.styles=[v`
|
|
6436
7009
|
:host {
|
|
6437
7010
|
display: table-column;
|
|
6438
7011
|
}
|
|
6439
|
-
`],
|
|
7012
|
+
`],s.UUITableColumnElement=Ug([m("uui-table-column")],s.UUITableColumnElement);var Eg=(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.UUITableHeadCellElement=class extends s.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},s.UUITableHeadCellElement.styles=[...s.UUITableCellElement.styles,v`
|
|
6440
7013
|
:host {
|
|
6441
7014
|
border-top: none;
|
|
6442
7015
|
}
|
|
6443
|
-
`],
|
|
7016
|
+
`],s.UUITableHeadCellElement=Eg([m("uui-table-head-cell")],s.UUITableHeadCellElement);var xg=(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.UUITableHeadElement=class extends f{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return h`<slot></slot>`}},s.UUITableHeadElement.styles=[v`
|
|
6444
7017
|
:host {
|
|
6445
7018
|
display: table-header-group;
|
|
6446
7019
|
font-weight: bold;
|
|
6447
7020
|
}
|
|
6448
|
-
`],
|
|
7021
|
+
`],s.UUITableHeadElement=xg([m("uui-table-head")],s.UUITableHeadElement);var Ig=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,nc=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cg(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&&Ig(e,t,o),o};s.UUITableRowElement=class extends To(Xt(f)){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> `}},s.UUITableRowElement.styles=[v`
|
|
6449
7022
|
:host {
|
|
6450
7023
|
display: table-row;
|
|
6451
7024
|
position: relative;
|
|
@@ -6468,18 +7041,18 @@
|
|
|
6468
7041
|
:host([selected]:focus) {
|
|
6469
7042
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
6470
7043
|
}
|
|
6471
|
-
`],
|
|
7044
|
+
`],nc([Be({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],s.UUITableRowElement.prototype,"slotCellNodes",2),s.UUITableRowElement=nc([m("uui-table-row")],s.UUITableRowElement);var Sg=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,Ei=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ag(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&&Sg(e,t,o),o};s.UUITabElement=class extends Vi(Ee("",f)){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`
|
|
6472
7045
|
<a
|
|
6473
7046
|
id="button"
|
|
6474
|
-
href=${
|
|
6475
|
-
target=${
|
|
6476
|
-
rel=${
|
|
7047
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
7048
|
+
target=${_(this.target||void 0)}
|
|
7049
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
6477
7050
|
role="tab">
|
|
6478
7051
|
<slot name="icon"></slot>
|
|
6479
7052
|
${this.renderLabel()}
|
|
6480
7053
|
<slot name="extra"></slot>
|
|
6481
7054
|
</a>
|
|
6482
|
-
`:
|
|
7055
|
+
`:h`
|
|
6483
7056
|
<button
|
|
6484
7057
|
type="button"
|
|
6485
7058
|
id="button"
|
|
@@ -6489,7 +7062,7 @@
|
|
|
6489
7062
|
${this.renderLabel()}
|
|
6490
7063
|
<slot name="extra"></slot>
|
|
6491
7064
|
</button>
|
|
6492
|
-
`}},
|
|
7065
|
+
`}},s.UUITabElement.styles=[v`
|
|
6493
7066
|
:host {
|
|
6494
7067
|
color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
|
|
6495
7068
|
font-family: inherit;
|
|
@@ -6619,10 +7192,10 @@
|
|
|
6619
7192
|
:host([orientation='vertical']) slot.label {
|
|
6620
7193
|
text-align: left;
|
|
6621
7194
|
}
|
|
6622
|
-
`],
|
|
7195
|
+
`],Ei([l({type:Boolean,reflect:!0})],s.UUITabElement.prototype,"disabled",2),Ei([l({type:String})],s.UUITabElement.prototype,"href",2),Ei([l({type:String})],s.UUITabElement.prototype,"target",2),Ei([l({type:String})],s.UUITabElement.prototype,"rel",2),Ei([l({type:String,reflect:!0})],s.UUITabElement.prototype,"orientation",2),s.UUITabElement=Ei([m("uui-tab")],s.UUITabElement);var Pg=Object.defineProperty,Mg=Object.getOwnPropertyDescriptor,sc=i=>{throw TypeError(i)},xi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mg(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&&Pg(e,t,o),o},Hs=(i,e,t)=>e.has(i)||sc("Cannot "+t),P=(i,e,t)=>(Hs(i,e,"read from private field"),t?t.call(i):e.get(i)),Oe=(i,e,t)=>e.has(i)?sc("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ko=(i,e,t,r)=>(Hs(i,e,"write to private field"),e.set(i,t),t),oe=(i,e,t)=>(Hs(i,e,"access private method"),t),Pr,Te,et,Ii,Ci,Mr,Uo,Eo,Q,ac,lc,Rs,uc,Si,zr,cc,Fs,Ws;s.UUITabGroupElement=class extends f{constructor(){super(...arguments),Oe(this,Q),Oe(this,Pr,0),this.dropdownContentDirection="vertical",Oe(this,Te,[]),Oe(this,et,[]),Oe(this,Ii,new Map),Oe(this,Ci,[]),Oe(this,Mr,new ResizeObserver(oe(this,Q,lc).bind(this))),Oe(this,Uo,[]),Oe(this,Eo,!1),Oe(this,Si,e=>{const t=e.currentTarget;if(oe(this,Q,Ws).call(this,t)){t.active=!0;const r=P(this,Ii).get(t);r&&(r.active=!0),[...P(this,Te),...P(this,et)].filter(o=>o!==t&&o!==r).forEach(o=>{oe(this,Q,Ws).call(this,o)&&(o.active=!1)}),P(this,et).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),oe(this,Q,ac).call(this)}disconnectedCallback(){super.disconnectedCallback(),P(this,Mr).unobserve(this),oe(this,Q,Rs).call(this)}render(){return h`
|
|
6623
7196
|
<div id="main">
|
|
6624
7197
|
<div id="grid" role="tablist">
|
|
6625
|
-
<slot @slotchange=${
|
|
7198
|
+
<slot @slotchange=${oe(this,Q,uc)}></slot>
|
|
6626
7199
|
</div>
|
|
6627
7200
|
<uui-button
|
|
6628
7201
|
popovertarget="popover-container"
|
|
@@ -6638,10 +7211,10 @@
|
|
|
6638
7211
|
popover
|
|
6639
7212
|
placement="bottom-end">
|
|
6640
7213
|
<div id="hidden-tabs-container" role="tablist">
|
|
6641
|
-
${
|
|
7214
|
+
${Vo(P(this,et),e=>h`${e}`)}
|
|
6642
7215
|
</div>
|
|
6643
7216
|
</uui-popover-container>
|
|
6644
|
-
`}},
|
|
7217
|
+
`}},Pr=new WeakMap,Te=new WeakMap,et=new WeakMap,Ii=new WeakMap,Ci=new WeakMap,Mr=new WeakMap,Uo=new WeakMap,Eo=new WeakMap,Q=new WeakSet,ac=async function(){k(this,"uui-button"),k(this,"uui-popover-container"),k(this,"uui-symbol-more"),await this.updateComplete,P(this,Mr).observe(this._mainElement)},lc=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==P(this,Pr)?oe(this,Q,zr).call(this):oe(this,Q,Fs).call(this,i[0].contentBoxSize[0].inlineSize)},Rs=function(){P(this,Te).forEach(i=>{i.removeEventListener("click",P(this,Si)),P(this,Uo).forEach(e=>e.disconnect())}),P(this,Uo).length=0,P(this,Ci).length=0},uc=function(){oe(this,Q,Rs).call(this),oe(this,Q,cc).call(this),P(this,Te).forEach(i=>{i.addEventListener("click",P(this,Si));const e=new ResizeObserver(oe(this,Q,zr).bind(this));e.observe(i),P(this,Uo).push(e)})},Si=new WeakMap,zr=async function(){if(P(this,Eo))return;ko(this,Eo,!0),requestAnimationFrame(()=>{ko(this,Eo,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;ko(this,Pr,e);let t=0;for(let o=0;o<P(this,Te).length;o++)P(this,Te)[o].style.display="",t+=P(this,Te)[o].offsetWidth,P(this,Ci)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",oe(this,Q,Fs).call(this,this._mainElement.offsetWidth)},cc=function(){ko(this,Te,this._slottedNodes?this._slottedNodes:[]),oe(this,Q,zr).call(this)},Fs=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);P(this,et).forEach(n=>{n.removeEventListener("click",P(this,Si))}),ko(this,et,[]),P(this,Ii).clear();let r=!1;const o=P(this,Ci).length;for(let n=0;n<o;n++){const a=P(this,Ci)[n],u=P(this,Te)[n];if(a<=(n===o-1?i:t))u.style.display="";else{const c=u.cloneNode(!0);c.addEventListener("click",P(this,Si)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,P(this,Ii).set(c,u),P(this,Ii).set(u,c),P(this,et).push(c),u.style.display="none",u.active&&(r=!0)}}P(this,et).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()},Ws=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},s.UUITabGroupElement.styles=[v`
|
|
6645
7218
|
:host {
|
|
6646
7219
|
min-width: 0;
|
|
6647
7220
|
display: flex;
|
|
@@ -6729,7 +7302,7 @@
|
|
|
6729
7302
|
opacity 120ms,
|
|
6730
7303
|
height ease-out 120ms;
|
|
6731
7304
|
}
|
|
6732
|
-
`],
|
|
7305
|
+
`],xi([S("#more-button")],s.UUITabGroupElement.prototype,"_moreButtonElement",2),xi([S("#popover-container")],s.UUITabGroupElement.prototype,"_popoverContainerElement",2),xi([S("#main")],s.UUITabGroupElement.prototype,"_mainElement",2),xi([Be({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],s.UUITabGroupElement.prototype,"_slottedNodes",2),xi([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],s.UUITabGroupElement.prototype,"dropdownContentDirection",2),s.UUITabGroupElement=xi([m("uui-tab-group")],s.UUITabGroupElement);class zg extends M{}class Lg extends M{}var Og=Object.defineProperty,Tg=Object.getOwnPropertyDescriptor,Gs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tg(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&&Og(e,t,o),o};s.UUITagElement=class extends f{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return h`<slot></slot>`}},s.UUITagElement.styles=[v`
|
|
6733
7306
|
:host {
|
|
6734
7307
|
display: inline-block;
|
|
6735
7308
|
font-size: var(--uui-tag-font-size, var(--uui-type-small-size,12px));
|
|
@@ -6819,14 +7392,14 @@
|
|
|
6819
7392
|
color: var(--color-standalone);
|
|
6820
7393
|
border-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6821
7394
|
}
|
|
6822
|
-
`],
|
|
7395
|
+
`],Gs([l({reflect:!0})],s.UUITagElement.prototype,"color",2),Gs([l({reflect:!0})],s.UUITagElement.prototype,"look",2),s.UUITagElement=Gs([m("uui-tag")],s.UUITagElement);class qs extends M{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}}var Ng=Object.defineProperty,Bg=Object.getOwnPropertyDescriptor,Y=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bg(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&&Ng(e,t,o),o};s.UUITextareaElement=class extends xe(f,""){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 qs(qs.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`
|
|
6823
7396
|
<textarea
|
|
6824
7397
|
id="textarea"
|
|
6825
|
-
rows=${
|
|
6826
|
-
cols=${
|
|
7398
|
+
rows=${_(this.rows)}
|
|
7399
|
+
cols=${_(this.cols)}
|
|
6827
7400
|
.value=${this.value}
|
|
6828
7401
|
.name=${this.name}
|
|
6829
|
-
wrap=${
|
|
7402
|
+
wrap=${_(this.wrap)}
|
|
6830
7403
|
placeholder=${this.placeholder}
|
|
6831
7404
|
aria-label=${this.label}
|
|
6832
7405
|
.disabled=${this.disabled}
|
|
@@ -6834,7 +7407,7 @@
|
|
|
6834
7407
|
@input=${this.onInput}
|
|
6835
7408
|
@change=${this.onChange}>
|
|
6836
7409
|
</textarea>
|
|
6837
|
-
`}},
|
|
7410
|
+
`}},s.UUITextareaElement.formAssociated=!0,s.UUITextareaElement.styles=[v`
|
|
6838
7411
|
:host {
|
|
6839
7412
|
position: relative;
|
|
6840
7413
|
}
|
|
@@ -6919,7 +7492,7 @@
|
|
|
6919
7492
|
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
6920
7493
|
var(--uui-color-focus,#3879ff);
|
|
6921
7494
|
}
|
|
6922
|
-
`],
|
|
7495
|
+
`],Y([l()],s.UUITextareaElement.prototype,"placeholder",2),Y([l({type:Boolean,reflect:!0})],s.UUITextareaElement.prototype,"disabled",2),Y([l({type:Boolean,reflect:!0})],s.UUITextareaElement.prototype,"readonly",2),Y([l({type:String})],s.UUITextareaElement.prototype,"name",2),Y([l({type:Boolean,reflect:!0})],s.UUITextareaElement.prototype,"error",2),Y([l({type:Number})],s.UUITextareaElement.prototype,"minlength",2),Y([l({attribute:"minlength-message"})],s.UUITextareaElement.prototype,"minlengthMessage",2),Y([l({type:Number})],s.UUITextareaElement.prototype,"maxlength",2),Y([l({attribute:"maxlength-message"})],s.UUITextareaElement.prototype,"maxlengthMessage",2),Y([S("#textarea")],s.UUITextareaElement.prototype,"_textarea",2),Y([l({type:Boolean,attribute:"auto-height",reflect:!0})],s.UUITextareaElement.prototype,"autoHeight",2),Y([l({type:String})],s.UUITextareaElement.prototype,"label",2),Y([l({type:Number})],s.UUITextareaElement.prototype,"rows",2),Y([l({type:Number})],s.UUITextareaElement.prototype,"cols",2),Y([l({type:String})],s.UUITextareaElement.prototype,"wrap",2),s.UUITextareaElement=Y([m("uui-textarea")],s.UUITextareaElement);let ke=class extends M{static{this.OPENING="opening"}static{this.OPENED="opened"}static{this.CLOSING="closing"}static{this.CLOSED="closed"}};var Vg=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,Ai=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dg(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&&Vg(e,t,o),o};s.UUIToastNotificationElement=class extends f{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 Ld(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(),k(this,"uui-button"),k(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 ke(ke.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new ke(ke.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new ke(ke.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 ke(ke.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return h`
|
|
6923
7496
|
<div id="toast" class=${this._animate?"animate":""}>
|
|
6924
7497
|
<div>
|
|
6925
7498
|
<div id="close">
|
|
@@ -6930,13 +7503,13 @@
|
|
|
6930
7503
|
@click=${()=>this.open=!1}>
|
|
6931
7504
|
<uui-icon
|
|
6932
7505
|
name="remove"
|
|
6933
|
-
.fallback=${
|
|
7506
|
+
.fallback=${kn.strings[0]}></uui-icon>
|
|
6934
7507
|
</uui-button>
|
|
6935
7508
|
</div>
|
|
6936
7509
|
<slot></slot>
|
|
6937
7510
|
</div>
|
|
6938
7511
|
</div>
|
|
6939
|
-
`}},
|
|
7512
|
+
`}},s.UUIToastNotificationElement.styles=[qt,v`
|
|
6940
7513
|
:host {
|
|
6941
7514
|
--uui-toast-notification-margin: var(--uui-size-space-2,6px);
|
|
6942
7515
|
|
|
@@ -7053,7 +7626,7 @@
|
|
|
7053
7626
|
71
|
|
7054
7627
|
));
|
|
7055
7628
|
}
|
|
7056
|
-
`],
|
|
7629
|
+
`],Ai([l({reflect:!0})],s.UUIToastNotificationElement.prototype,"color",2),Ai([l({type:Number})],s.UUIToastNotificationElement.prototype,"autoClose",1),Ai([S("#toast")],s.UUIToastNotificationElement.prototype,"_toastEl",2),Ai([w()],s.UUIToastNotificationElement.prototype,"_animate",2),Ai([l({type:Boolean,reflect:!0})],s.UUIToastNotificationElement.prototype,"open",1),s.UUIToastNotificationElement=Ai([m("uui-toast-notification")],s.UUIToastNotificationElement);var jg=Object.defineProperty,Hg=Object.getOwnPropertyDescriptor,hc=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hg(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&&jg(e,t,o),o};s.UUIToastNotificationContainerElement=class extends f{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(ke.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(ke.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> `}},s.UUIToastNotificationContainerElement.styles=[v`
|
|
7057
7630
|
:host {
|
|
7058
7631
|
position: absolute;
|
|
7059
7632
|
overflow: hidden;
|
|
@@ -7081,7 +7654,7 @@
|
|
|
7081
7654
|
:host([left-align]) slot {
|
|
7082
7655
|
align-items: start;
|
|
7083
7656
|
}
|
|
7084
|
-
`],
|
|
7657
|
+
`],hc([l({type:Number,reflect:!0,attribute:"auto-close"})],s.UUIToastNotificationContainerElement.prototype,"_autoClose",2),s.UUIToastNotificationContainerElement=hc([m("uui-toast-notification-container")],s.UUIToastNotificationContainerElement);var Rg=Object.defineProperty,Fg=Object.getOwnPropertyDescriptor,Ks=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fg(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&&Rg(e,t,o),o};s.UUIToastNotificationLayoutElement=class extends f{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return h`
|
|
7085
7658
|
<div id="message" class="uui-text">
|
|
7086
7659
|
<h5
|
|
7087
7660
|
style=${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}>
|
|
@@ -7091,7 +7664,7 @@
|
|
|
7091
7664
|
<slot></slot>
|
|
7092
7665
|
<slot id="actions" name="actions"></slot>
|
|
7093
7666
|
</div>
|
|
7094
|
-
`}},
|
|
7667
|
+
`}},s.UUIToastNotificationLayoutElement.styles=[qt,v`
|
|
7095
7668
|
#message {
|
|
7096
7669
|
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
7097
7670
|
}
|
|
@@ -7112,12 +7685,12 @@
|
|
|
7112
7685
|
margin-top: var(--uui-size-space-4,12px);
|
|
7113
7686
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
7114
7687
|
}
|
|
7115
|
-
`],
|
|
7688
|
+
`],Ks([l({type:String})],s.UUIToastNotificationLayoutElement.prototype,"headline",2),Ks([w()],s.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),s.UUIToastNotificationLayoutElement=Ks([m("uui-toast-notification-layout")],s.UUIToastNotificationLayoutElement);var Wg=(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.UUIToggleElement=class extends ve{constructor(){super("switch")}renderCheckbox(){return h`
|
|
7116
7689
|
<div id="toggle">
|
|
7117
|
-
<div id="icon-checked">${
|
|
7118
|
-
<div id="icon-unchecked">${
|
|
7690
|
+
<div id="icon-checked">${Wo}</div>
|
|
7691
|
+
<div id="icon-unchecked">${kn}</div>
|
|
7119
7692
|
</div>
|
|
7120
|
-
`}},
|
|
7693
|
+
`}},s.UUIToggleElement.formAssociated=!0,s.UUIToggleElement.styles=[...ve.styles,Ho,v`
|
|
7121
7694
|
:host {
|
|
7122
7695
|
--uui-toggle-size: 18px;
|
|
7123
7696
|
--uui-toggle-switch-width: calc(2 * var(--uui-toggle-size));
|
|
@@ -7264,7 +7837,7 @@
|
|
|
7264
7837
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
7265
7838
|
}
|
|
7266
7839
|
:host([disabled]) label:active #toggle {
|
|
7267
|
-
animation: ${
|
|
7840
|
+
animation: ${Ro};
|
|
7268
7841
|
}
|
|
7269
7842
|
:host([disabled]) input:checked #toggle #icon-checked {
|
|
7270
7843
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
@@ -7281,7 +7854,7 @@
|
|
|
7281
7854
|
71
|
|
7282
7855
|
));
|
|
7283
7856
|
}
|
|
7284
|
-
`],
|
|
7857
|
+
`],s.UUIToggleElement=Wg([m("uui-toggle")],s.UUIToggleElement);var Gg=(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.UUIVisuallyHiddenElement=class extends f{render(){return h`<slot></slot>`}},s.UUIVisuallyHiddenElement.styles=[v`
|
|
7285
7858
|
:host(:not(:focus-within)) {
|
|
7286
7859
|
position: absolute !important;
|
|
7287
7860
|
width: 1px !important;
|
|
@@ -7293,5 +7866,5 @@
|
|
|
7293
7866
|
white-space: nowrap !important;
|
|
7294
7867
|
padding: 0 !important;
|
|
7295
7868
|
}
|
|
7296
|
-
`],
|
|
7869
|
+
`],s.UUIVisuallyHiddenElement=Gg([m("uui-visually-hidden")],s.UUIVisuallyHiddenElement),s.ActiveMixin=eh,s.LabelMixin=ih,s.PopoverTargetMixin=kh,s.SelectOnlyMixin=uh,s.SelectableMixin=nh,s.Timer=bh,s.UUIBlinkAnimationValue=qc,s.UUIBlinkKeyframes=Gc,s.UUIBooleanInputElement=ve,s.UUIBooleanInputEvent=nn,s.UUIButtonInlineCreateEvent=_n,s.UUICardEvent=Xi,s.UUIColorAreaEvent=On,s.UUIColorPickerChangeEvent=eo,s.UUIColorSliderEvent=Fn,s.UUIColorSwatchesEvent=oo,s.UUIComboboxEvent=_e,s.UUIComboboxListEvent=we,s.UUICopyTextEvent=qi,s.UUIEvent=rn,s.UUIFileDropzoneEvent=ao,s.UUIFormControlEvent=kt,s.UUIFormControlMixin=ph,s.UUIHorizontalPulseAnimationValue=Xc,s.UUIHorizontalPulseKeyframes=Kc,s.UUIHorizontalShakeAnimationValue=Zc,s.UUIHorizontalShakeKeyframes=Yc,s.UUIIconHost=ts,s.UUIIconRegistry=is,s.UUIIconRegistryEssential=hu,s.UUIIconRequestEvent=lo,s.UUIInputEvent=uo,s.UUIInputLockEvent=rs,s.UUIInterfaceColorValues=xh,s.UUIInterfaceHeadingValues=Ih,s.UUIInterfaceLookValues=Eh,s.UUIMenuItemEvent=gi,s.UUIModalCloseEndEvent=yu,s.UUIModalCloseEvent=yi,s.UUIModalElement=de,s.UUIModalOpenEvent=fu,s.UUIPaginationEvent=Lt,s.UUIRadioEvent=go,s.UUIRadioGroupEvent=ks,s.UUIRefEvent=wo,s.UUISelectEvent=Ns,s.UUISelectableEvent=Bi,s.UUISliderEvent=_o,s.UUITabEvent=zg,s.UUITabGroupEvent=Lg,s.UUITextStyles=qt,s.UUITextareaEvent=qs,s.UUIToastNotificationEvent=ke,s.clamp=gh,s.defineElement=Uh,s.demandCustomElement=vh,s.drag=mh,s.findAncestorByAttributeValue=Ca,s.reverseNumberInRange=fh,s.slotHasContent=wh,s.toHex=yh}));
|
|
7297
7870
|
//# sourceMappingURL=uui.min.js.map
|