@umbraco-ui/uui 1.17.0-rc.0 → 1.17.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +39 -0
- package/dist/uui.min.js +976 -425
- 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"}},K0=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,7 @@
|
|
|
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);var rd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,an=(i,e,t,r)=>{for(var o=r>1?void 0:r?nd(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&&rd(e,t,o),o};s.UUIBreadcrumbItemElement=class extends f{constructor(){super(...arguments),this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}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
693
|
:host {
|
|
694
694
|
font-size: var(--uui-type-small-size,12px);
|
|
695
695
|
color: currentColor;
|
|
@@ -728,9 +728,9 @@
|
|
|
728
728
|
overflow: hidden;
|
|
729
729
|
text-overflow: ellipsis;
|
|
730
730
|
}
|
|
731
|
-
`],
|
|
731
|
+
`],an([l()],s.UUIBreadcrumbItemElement.prototype,"href",2),an([l({type:Boolean,attribute:"last-item"})],s.UUIBreadcrumbItemElement.prototype,"lastItem",2),s.UUIBreadcrumbItemElement=an([m("uui-breadcrumb-item")],s.UUIBreadcrumbItemElement);var sd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,Ta=(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=(r?a(e,t,o):a(o))||o);return r&&o&&sd(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")}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`<ol id="breadcrumbs-list">
|
|
732
732
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
733
|
-
</ol>`}},
|
|
733
|
+
</ol>`}},s.UUIBreadcrumbsElement.styles=[v`
|
|
734
734
|
:host {
|
|
735
735
|
display: flex;
|
|
736
736
|
}
|
|
@@ -744,7 +744,7 @@
|
|
|
744
744
|
margin-inline-end: 0px;
|
|
745
745
|
padding-inline-start: 0px;
|
|
746
746
|
}
|
|
747
|
-
`],
|
|
747
|
+
`],Ta([Be({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],s.UUIBreadcrumbsElement.prototype,"slotNodes",2),s.UUIBreadcrumbsElement=Ta([m("uui-breadcrumbs")],s.UUIBreadcrumbsElement);const ld=v`
|
|
748
748
|
@keyframes uui-blink {
|
|
749
749
|
0%,
|
|
750
750
|
100% {
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
opacity: 1;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
`,
|
|
757
|
+
`,ud=be("uui-blink 0.9s infinite both"),cd=v`
|
|
758
758
|
@keyframes pulse {
|
|
759
759
|
0% {
|
|
760
760
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
opacity: 0;
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
-
`;
|
|
775
|
+
`;be("pulse 0.8s ease-in-out infinite both");const Bo=v`
|
|
776
776
|
@keyframes uui-horizontal-shake {
|
|
777
777
|
10%,
|
|
778
778
|
90% {
|
|
@@ -795,22 +795,22 @@
|
|
|
795
795
|
transform: translateX(2px);
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
`,
|
|
798
|
+
`,Vo=be("uui-horizontal-shake 600ms ease backwards");/**
|
|
799
799
|
* @license
|
|
800
800
|
* Copyright 2017 Google LLC
|
|
801
801
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
802
|
-
*/const
|
|
802
|
+
*/const me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Jt=i=>(...e)=>({_$litDirective$:i,values:e});let ei=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
803
|
* @license
|
|
804
804
|
* Copyright 2018 Google LLC
|
|
805
805
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
806
|
-
*/const
|
|
806
|
+
*/const Na="important",hd=" !"+Na,Ve=Jt(class extends ei{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(hd);r.includes("-")||n?t.setProperty(r,n?o.slice(0,-11):o,n?Na:""):t[r]=o}}return te}});/**
|
|
807
807
|
* @license
|
|
808
808
|
* Copyright 2018 Google LLC
|
|
809
809
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
810
|
-
*/const
|
|
810
|
+
*/const _=i=>i??N;let ln=class extends M{static{this.CLICK="click"}constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Ba=i=>{throw TypeError(i)},It=(i,e,t,r)=>{for(var o=r>1?void 0:r?pd(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&&dd(e,t,o),o},bd=(i,e,t)=>e.has(i)||Ba("Cannot "+t),vd=(i,e,t)=>e.has(i)?Ba("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Do=(i,e,t)=>(bd(i,e,"access private method"),t),ti,un,Va,Da;s.UUIButtonInlineCreateElement=class extends f{constructor(){super(...arguments),vd(this,ti),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 ln(ln.CLICK))}render(){return this.href?Do(this,ti,Va).call(this):Do(this,ti,Da).call(this)}},ti=new WeakSet,un=function(){return h`
|
|
811
811
|
<div
|
|
812
812
|
id="plus"
|
|
813
|
-
style=${
|
|
813
|
+
style=${Ve({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}>
|
|
814
814
|
<svg
|
|
815
815
|
id="plus-icon"
|
|
816
816
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -819,23 +819,23 @@
|
|
|
819
819
|
d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z" />
|
|
820
820
|
</svg>
|
|
821
821
|
</div>
|
|
822
|
-
`},
|
|
822
|
+
`},Va=function(){return h`<a
|
|
823
823
|
id="button-wrapper"
|
|
824
824
|
@mousemove=${this._onMouseMove}
|
|
825
|
-
href=${
|
|
826
|
-
target=${
|
|
827
|
-
rel=${
|
|
825
|
+
href=${_(this.href)}
|
|
826
|
+
target=${_(this.target||void 0)}
|
|
827
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
828
828
|
aria-label=${this.label?this.label:"create new element"}>
|
|
829
|
-
${
|
|
830
|
-
</a>`},
|
|
829
|
+
${Do(this,ti,un).call(this)}
|
|
830
|
+
</a>`},Da=function(){return h`
|
|
831
831
|
<button
|
|
832
832
|
id="button-wrapper"
|
|
833
833
|
@mousemove=${this._onMouseMove}
|
|
834
834
|
@click=${this._handleClick}
|
|
835
835
|
aria-label=${this.label?this.label:"create new element"}>
|
|
836
|
-
${
|
|
836
|
+
${Do(this,ti,un).call(this)}
|
|
837
837
|
</button>
|
|
838
|
-
`},
|
|
838
|
+
`},s.UUIButtonInlineCreateElement.styles=[ld,v`
|
|
839
839
|
:host {
|
|
840
840
|
display: flex;
|
|
841
841
|
position: relative;
|
|
@@ -889,7 +889,7 @@
|
|
|
889
889
|
:host(:focus) #button-wrapper:before,
|
|
890
890
|
:host(:focus-within) #button-wrapper:before,
|
|
891
891
|
:host(:hover) #button-wrapper:before {
|
|
892
|
-
animation: ${
|
|
892
|
+
animation: ${ud};
|
|
893
893
|
background-color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
894
894
|
border-color: var(--uui-color-surface,#fff) !important;
|
|
895
895
|
}
|
|
@@ -992,32 +992,32 @@
|
|
|
992
992
|
#button-wrapper:active #plus {
|
|
993
993
|
transform: scale(1.1);
|
|
994
994
|
}
|
|
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
|
|
995
|
+
`],It([w()],s.UUIButtonInlineCreateElement.prototype,"_position",2),It([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"label",2),It([l({type:Boolean,reflect:!0})],s.UUIButtonInlineCreateElement.prototype,"vertical",2),It([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"href",2),It([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"target",2),It([l({type:String})],s.UUIButtonInlineCreateElement.prototype,"rel",2),s.UUIButtonInlineCreateElement=It([m("uui-button-inline-create")],s.UUIButtonInlineCreateElement);let md=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)},ja=(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)},z=(i,e,t)=>Math.min(Math.max(i,e),t),Ha=(i,e,t)=>t+e-i,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};function fd(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}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 jo=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 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"><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 wd=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 _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"><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 cn=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 $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"><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 kd=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 Ud=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>`,Ed=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 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"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;var Id=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Ra=i=>{throw TypeError(i)},re=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cd(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},Fa=(i,e,t)=>e.has(i)||Ra("Cannot "+t),Sd=(i,e,t)=>(Fa(i,e,"read from private field"),e.get(i)),Ad=(i,e,t)=>e.has(i)?Ra("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pd=(i,e,t,r)=>(Fa(i,e,"write to private field"),e.set(i,t),t),Ho;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="",Ad(this,Ho),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(Sd(this,Ho)),(this.state==="success"||this.state==="failed")&&Pd(this,Ho,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
996
|
name="check"
|
|
997
|
-
.fallback=${
|
|
997
|
+
.fallback=${jo.strings[0]}></uui-icon>`;break;case"failed":k(this,"uui-icon"),e=h`<uui-icon
|
|
998
998
|
name="wrong"
|
|
999
|
-
.fallback=${
|
|
999
|
+
.fallback=${xd.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${e}</div>`}render(){return this.href?h`
|
|
1000
1000
|
<a
|
|
1001
1001
|
id="button"
|
|
1002
|
-
aria-label=${
|
|
1003
|
-
title=${
|
|
1004
|
-
href=${
|
|
1005
|
-
target=${
|
|
1006
|
-
rel=${
|
|
1002
|
+
aria-label=${_(this.label)}
|
|
1003
|
+
title=${_(this.title===""?void 0:this.title)}
|
|
1004
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
1005
|
+
target=${_(this.target||void 0)}
|
|
1006
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
1007
1007
|
${this.renderState()} ${this.renderLabel()}
|
|
1008
1008
|
<slot name="extra"></slot>
|
|
1009
1009
|
</a>
|
|
1010
|
-
`:
|
|
1010
|
+
`:h`
|
|
1011
1011
|
<button
|
|
1012
1012
|
id="button"
|
|
1013
1013
|
type=${this.type}
|
|
1014
1014
|
?disabled=${this.disabled}
|
|
1015
|
-
aria-label=${
|
|
1016
|
-
title=${
|
|
1015
|
+
aria-label=${_(this.label)}
|
|
1016
|
+
title=${_(this.title===""?void 0:this.title)}>
|
|
1017
1017
|
${this.renderState()} ${this.renderLabel()}
|
|
1018
1018
|
<slot name="extra"></slot>
|
|
1019
1019
|
</button>
|
|
1020
|
-
`}},
|
|
1020
|
+
`}},Ho=new WeakMap,s.UUIButtonElement.styles=[Bo,v`
|
|
1021
1021
|
:host {
|
|
1022
1022
|
position: relative;
|
|
1023
1023
|
display: inline-flex;
|
|
@@ -1122,7 +1122,7 @@
|
|
|
1122
1122
|
|
|
1123
1123
|
button[disabled]:active,
|
|
1124
1124
|
a:not([href]):active {
|
|
1125
|
-
animation: ${
|
|
1125
|
+
animation: ${Vo};
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
1128
1128
|
/* ANIMATIONS */
|
|
@@ -1390,17 +1390,17 @@
|
|
|
1390
1390
|
var(--color-standalone)
|
|
1391
1391
|
);
|
|
1392
1392
|
}
|
|
1393
|
-
`],
|
|
1393
|
+
`],re([l({type:String,reflect:!0})],s.UUIButtonElement.prototype,"type",2),re([l({type:Boolean,reflect:!0})],s.UUIButtonElement.prototype,"disabled",2),re([l({reflect:!0})],s.UUIButtonElement.prototype,"look",2),re([l({reflect:!0})],s.UUIButtonElement.prototype,"color",2),re([l({type:Boolean,reflect:!0})],s.UUIButtonElement.prototype,"compact",2),re([l({type:String,reflect:!0})],s.UUIButtonElement.prototype,"state",2),re([l({type:String})],s.UUIButtonElement.prototype,"href",2),re([l({type:String})],s.UUIButtonElement.prototype,"target",2),re([l({type:String})],s.UUIButtonElement.prototype,"rel",2),re([l({type:String})],s.UUIButtonElement.prototype,"title",2),re([S("#button")],s.UUIButtonElement.prototype,"_button",2),s.UUIButtonElement=re([m("uui-button")],s.UUIButtonElement);let Di=class extends M{constructor(){super(...arguments),this.text=null}static{this.COPIED="copied"}static{this.COPYING="copying"}};var Md=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,Wa=i=>{throw TypeError(i)},Ro=(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},Ga=(i,e,t)=>e.has(i)||Wa("Cannot "+t),hn=(i,e,t)=>(Ga(i,e,"read from private field"),t?t.call(i):e.get(i)),qa=(i,e,t)=>e.has(i)?Wa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ld=(i,e,t,r)=>(Ga(i,e,"write to private field"),e.set(i,t),t),ji,dn;s.UUIButtonCopyTextElement=class extends s.UUIButtonElement{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,qa(this,ji),qa(this,dn,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 Di(Di.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const r=new Di(Di.COPIED);r.text=e,this.dispatchEvent(r),Ld(this,ji,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",hn(this,dn))}disconnectedCallback(){super.disconnectedCallback(),hn(this,ji)&&clearTimeout(hn(this,ji))}renderLabel(){return h`
|
|
1394
1394
|
<slot class="label">
|
|
1395
1395
|
<uui-icon name="copy"></uui-icon>
|
|
1396
1396
|
</slot>
|
|
1397
|
-
`}},
|
|
1397
|
+
`}},ji=new WeakMap,dn=new WeakMap,s.UUIButtonCopyTextElement.styles=s.UUIButtonElement.styles,Ro([l({type:String})],s.UUIButtonCopyTextElement.prototype,"text",2),Ro([l({type:String,attribute:"copy-from"})],s.UUIButtonCopyTextElement.prototype,"copyFrom",2),Ro([l({type:Number,attribute:"animation-state-delay"})],s.UUIButtonCopyTextElement.prototype,"animationStateDelay",2),s.UUIButtonCopyTextElement=Ro([m("uui-button-copy-text")],s.UUIButtonCopyTextElement);var Od=(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
1398
|
<div id="ticker">
|
|
1399
1399
|
<div id="icon-check">
|
|
1400
|
-
${this.indeterminate?
|
|
1400
|
+
${this.indeterminate?kd:jo}
|
|
1401
1401
|
</div>
|
|
1402
1402
|
</div>
|
|
1403
|
-
`}},
|
|
1403
|
+
`}},s.UUICheckboxElement.formAssociated=!0,s.UUICheckboxElement.styles=[...ve.styles,Bo,v`
|
|
1404
1404
|
:host {
|
|
1405
1405
|
--uui-checkbox-size: 18px;
|
|
1406
1406
|
}
|
|
@@ -1596,13 +1596,13 @@
|
|
|
1596
1596
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1597
1597
|
}
|
|
1598
1598
|
:host([disabled]) label:active #ticker {
|
|
1599
|
-
animation: ${
|
|
1599
|
+
animation: ${Vo};
|
|
1600
1600
|
}
|
|
1601
1601
|
:host([disabled]) input:checked + #ticker #icon-check,
|
|
1602
1602
|
:host([disabled]) input:indeterminate + #ticker #icon-check {
|
|
1603
1603
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
1604
1604
|
}
|
|
1605
|
-
`],
|
|
1605
|
+
`],s.UUICheckboxElement=Od([m("uui-checkbox")],s.UUICheckboxElement);let Hi=class extends M{static{this.OPEN="open"}};var Td=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,ii=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nd(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&&Td(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 Hi(Hi.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new Hi(Hi.OPEN)))}renderCheckbox(){if(this.selectable)return h`
|
|
1606
1606
|
<uui-checkbox
|
|
1607
1607
|
id="select-checkbox"
|
|
1608
1608
|
label="select"
|
|
@@ -1611,8 +1611,8 @@
|
|
|
1611
1611
|
@click=${e=>e.stopPropagation()}
|
|
1612
1612
|
@change=${()=>this.click()}>
|
|
1613
1613
|
</uui-checkbox>
|
|
1614
|
-
`}render(){return
|
|
1615
|
-
<div id="select-border"></div>`}},
|
|
1614
|
+
`}render(){return h`<slot id="open-part"></slot>
|
|
1615
|
+
<div id="select-border"></div>`}},s.UUICardElement.styles=[qt,v`
|
|
1616
1616
|
:host {
|
|
1617
1617
|
position: relative;
|
|
1618
1618
|
display: flex;
|
|
@@ -1774,41 +1774,41 @@
|
|
|
1774
1774
|
#select-checkbox[checked] {
|
|
1775
1775
|
opacity: 1;
|
|
1776
1776
|
}
|
|
1777
|
-
`],
|
|
1778
|
-
${
|
|
1779
|
-
${this.href?
|
|
1777
|
+
`],ii([l({type:Boolean,reflect:!0,attribute:"disabled"})],s.UUICardElement.prototype,"disabled",2),ii([l({type:Boolean,reflect:!0})],s.UUICardElement.prototype,"error",2),ii([l({type:String})],s.UUICardElement.prototype,"href",2),ii([l({type:String})],s.UUICardElement.prototype,"target",2),ii([l({type:String})],s.UUICardElement.prototype,"rel",2),s.UUICardElement=ii([m("uui-card")],s.UUICardElement);var Bd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,Ka=i=>{throw TypeError(i)},Fo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vd(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&&Bd(e,t,o),o},Dd=(i,e,t)=>e.has(i)||Ka("Cannot "+t),jd=(i,e,t)=>e.has(i)?Ka("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ri=(i,e,t)=>(Dd(i,e,"access private method"),t),Ct,Xa,Ya,Za,pn;s.UUICardBlockTypeElement=class extends s.UUICardElement{constructor(){super(...arguments),jd(this,Ct),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return h`
|
|
1778
|
+
${Ri(this,Ct,Za).call(this)}
|
|
1779
|
+
${this.href?Ri(this,Ct,Ya).call(this):Ri(this,Ct,Xa).call(this)}
|
|
1780
1780
|
<!-- Select border must be right after #open-part -->
|
|
1781
1781
|
<div id="select-border"></div>
|
|
1782
|
-
${this.selectable?this.renderCheckbox():
|
|
1782
|
+
${this.selectable?this.renderCheckbox():C}
|
|
1783
1783
|
<slot name="tag"></slot>
|
|
1784
1784
|
<slot name="actions"></slot>
|
|
1785
|
-
`}},
|
|
1785
|
+
`}},Ct=new WeakSet,Xa=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
1786
1786
|
<button
|
|
1787
1787
|
id="open-part"
|
|
1788
1788
|
class="uui-text"
|
|
1789
|
-
tabindex=${
|
|
1789
|
+
tabindex=${_(i)}
|
|
1790
1790
|
@click=${this.handleOpenClick}
|
|
1791
1791
|
@keydown=${this.handleOpenKeydown}>
|
|
1792
|
-
${
|
|
1792
|
+
${Ri(this,Ct,pn).call(this)}
|
|
1793
1793
|
</button>
|
|
1794
|
-
`},
|
|
1794
|
+
`},Ya=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
1795
1795
|
<a
|
|
1796
1796
|
id="open-part"
|
|
1797
1797
|
class="uui-text"
|
|
1798
|
-
tabindex=${
|
|
1799
|
-
href=${
|
|
1800
|
-
target=${
|
|
1801
|
-
rel=${
|
|
1802
|
-
${
|
|
1798
|
+
tabindex=${_(i)}
|
|
1799
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
1800
|
+
target=${_(this.target||void 0)}
|
|
1801
|
+
rel=${_(this.rel||e)}>
|
|
1802
|
+
${Ri(this,Ct,pn).call(this)}
|
|
1803
1803
|
</a>
|
|
1804
|
-
`},
|
|
1804
|
+
`},Za=function(){return h`<div id="portrait">
|
|
1805
1805
|
<slot></slot>
|
|
1806
|
-
</div> `},
|
|
1806
|
+
</div> `},pn=function(){return h`
|
|
1807
1807
|
<div id="content">
|
|
1808
1808
|
<span title="${this.name}" id="name">${this.name}</span>
|
|
1809
|
-
<small title="${
|
|
1809
|
+
<small title="${_(this.description)}">${this.description}<slot name="description"></slot></small>
|
|
1810
1810
|
</div></div>
|
|
1811
|
-
`},
|
|
1811
|
+
`},s.UUICardBlockTypeElement.styles=[...s.UUICardElement.styles,v`
|
|
1812
1812
|
:host {
|
|
1813
1813
|
background-color: var(--uui-color-surface-alt,#f3f3f5);
|
|
1814
1814
|
}
|
|
@@ -1950,7 +1950,7 @@
|
|
|
1950
1950
|
calc(var(--uui-size-space-4,12px) * -1);
|
|
1951
1951
|
top: 0;
|
|
1952
1952
|
}
|
|
1953
|
-
`],
|
|
1953
|
+
`],Fo([l({type:String})],s.UUICardBlockTypeElement.prototype,"name",2),Fo([l({type:String})],s.UUICardBlockTypeElement.prototype,"description",2),Fo([l({type:String,attribute:"background"})],s.UUICardBlockTypeElement.prototype,"background",1),s.UUICardBlockTypeElement=Fo([m("uui-card-block-type")],s.UUICardBlockTypeElement);var Hd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,Qa=i=>{throw TypeError(i)},Wo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rd(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&&Hd(e,t,o),o},Fd=(i,e,t)=>e.has(i)||Qa("Cannot "+t),Wd=(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),Go=(i,e,t)=>(Fd(i,e,"access private method"),t),oi,bn,Ja,el;s.UUICardContentNodeElement=class extends s.UUICardElement{constructor(){super(...arguments),Wd(this,oi),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
1954
1954
|
xmlns="http://www.w3.org/2000/svg"
|
|
1955
1955
|
viewBox="0 0 24 24"
|
|
1956
1956
|
fill="none"
|
|
@@ -1961,16 +1961,16 @@
|
|
|
1961
1961
|
id="icon">
|
|
1962
1962
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
1963
1963
|
<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
|
|
1964
|
+
</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
1965
|
>${this.detail}<slot name="detail"></slot></small
|
|
1966
|
-
><slot id="default"></slot>`}render(){return
|
|
1967
|
-
${this.href?
|
|
1966
|
+
><slot id="default"></slot>`}render(){return h`
|
|
1967
|
+
${this.href?Go(this,oi,el).call(this):Go(this,oi,Ja).call(this)}
|
|
1968
1968
|
<!-- Select border must be right after #open-part -->
|
|
1969
1969
|
<div id="select-border"></div>
|
|
1970
|
-
${this.selectable?this.renderCheckbox():
|
|
1970
|
+
${this.selectable?this.renderCheckbox():C}
|
|
1971
1971
|
<slot name="tag"></slot>
|
|
1972
1972
|
<slot name="actions"></slot>
|
|
1973
|
-
`}},
|
|
1973
|
+
`}},oi=new WeakSet,bn=function(){return h`
|
|
1974
1974
|
<span id="content" class="uui-text">
|
|
1975
1975
|
<span id="item">
|
|
1976
1976
|
<span id="icon">
|
|
@@ -1983,24 +1983,24 @@
|
|
|
1983
1983
|
</span>
|
|
1984
1984
|
${this.renderDetail()}
|
|
1985
1985
|
</span>
|
|
1986
|
-
`},
|
|
1986
|
+
`},Ja=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
1987
1987
|
<button
|
|
1988
1988
|
id="open-part"
|
|
1989
|
-
tabindex=${
|
|
1989
|
+
tabindex=${_(i)}
|
|
1990
1990
|
@click=${this.handleOpenClick}
|
|
1991
1991
|
@keydown=${this.handleOpenKeydown}>
|
|
1992
|
-
${
|
|
1992
|
+
${Go(this,oi,bn).call(this)}
|
|
1993
1993
|
</button>
|
|
1994
|
-
`},
|
|
1994
|
+
`},el=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
1995
1995
|
<a
|
|
1996
1996
|
id="open-part"
|
|
1997
|
-
tabindex=${
|
|
1998
|
-
href=${
|
|
1999
|
-
target=${
|
|
2000
|
-
rel=${
|
|
2001
|
-
${
|
|
1997
|
+
tabindex=${_(i)}
|
|
1998
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
1999
|
+
target=${_(this.target||void 0)}
|
|
2000
|
+
rel=${_(this.rel||e)}>
|
|
2001
|
+
${Go(this,oi,bn).call(this)}
|
|
2002
2002
|
</a>
|
|
2003
|
-
`},
|
|
2003
|
+
`},s.UUICardContentNodeElement.styles=[...s.UUICardElement.styles,v`
|
|
2004
2004
|
:host {
|
|
2005
2005
|
min-width: 250px;
|
|
2006
2006
|
flex-direction: column;
|
|
@@ -2107,33 +2107,33 @@
|
|
|
2107
2107
|
top: var(--uui-size-5,15px);
|
|
2108
2108
|
left: var(--uui-size-6,18px);
|
|
2109
2109
|
}
|
|
2110
|
-
`],
|
|
2110
|
+
`],Wo([l({type:String})],s.UUICardContentNodeElement.prototype,"name",2),Wo([l({type:String})],s.UUICardContentNodeElement.prototype,"detail",2),Wo([w()],s.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),s.UUICardContentNodeElement=Wo([m("uui-card-content-node")],s.UUICardContentNodeElement);var Gd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,tl=i=>{throw TypeError(i)},Fi=(i,e,t,r)=>{for(var o=r>1?void 0:r?qd(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&&Gd(e,t,o),o},Kd=(i,e,t)=>e.has(i)||tl("Cannot "+t),Xd=(i,e,t)=>e.has(i)?tl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),qo=(i,e,t)=>(Kd(i,e,"access private method"),t),ri,il,ol,vn;s.UUICardMediaElement=class extends s.UUICardElement{constructor(){super(...arguments),Xd(this,ri),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
2111
|
id="entity-symbol"
|
|
2112
|
-
type="${this.fileExt}"></uui-symbol-file>`}render(){return
|
|
2112
|
+
type="${this.fileExt}"></uui-symbol-file>`}render(){return h` ${this.renderMedia()}
|
|
2113
2113
|
<slot @slotchange=${this.queryPreviews}></slot>
|
|
2114
|
-
${this.href?
|
|
2114
|
+
${this.href?qo(this,ri,ol).call(this):qo(this,ri,il).call(this)}
|
|
2115
2115
|
<!-- Select border must be right after .open-part -->
|
|
2116
2116
|
<div id="select-border"></div>
|
|
2117
|
-
${this.selectable?this.renderCheckbox():
|
|
2117
|
+
${this.selectable?this.renderCheckbox():C}
|
|
2118
2118
|
<slot name="tag"></slot>
|
|
2119
|
-
<slot name="actions"></slot>`}},
|
|
2119
|
+
<slot name="actions"></slot>`}},ri=new WeakSet,il=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2120
2120
|
<button
|
|
2121
2121
|
id="open-part"
|
|
2122
|
-
tabindex=${
|
|
2122
|
+
tabindex=${_(i)}
|
|
2123
2123
|
@click=${this.handleOpenClick}
|
|
2124
2124
|
@keydown=${this.handleOpenKeydown}>
|
|
2125
|
-
${
|
|
2125
|
+
${qo(this,ri,vn).call(this)}
|
|
2126
2126
|
</button>
|
|
2127
|
-
`},
|
|
2127
|
+
`},ol=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2128
2128
|
<a
|
|
2129
2129
|
id="open-part"
|
|
2130
|
-
tabindex=${
|
|
2131
|
-
href=${
|
|
2132
|
-
target=${
|
|
2133
|
-
rel=${
|
|
2134
|
-
${
|
|
2130
|
+
tabindex=${_(i)}
|
|
2131
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2132
|
+
target=${_(this.target||void 0)}
|
|
2133
|
+
rel=${_(this.rel||e)}>
|
|
2134
|
+
${qo(this,ri,vn).call(this)}
|
|
2135
2135
|
</a>
|
|
2136
|
-
`},
|
|
2136
|
+
`},vn=function(){return h`
|
|
2137
2137
|
<div id="content" class="uui-text">
|
|
2138
2138
|
<!--
|
|
2139
2139
|
TODO: Implement info box when pop-out is ready
|
|
@@ -2141,7 +2141,7 @@
|
|
|
2141
2141
|
<span id="name" title="${this.name}">${this.name}</span>
|
|
2142
2142
|
<small id="detail">${this.detail}<slot name="detail"></slot></small>
|
|
2143
2143
|
</div>
|
|
2144
|
-
`},
|
|
2144
|
+
`},s.UUICardMediaElement.styles=[...s.UUICardElement.styles,v`
|
|
2145
2145
|
#entity-symbol {
|
|
2146
2146
|
align-self: center;
|
|
2147
2147
|
width: 60%;
|
|
@@ -2280,33 +2280,33 @@
|
|
|
2280
2280
|
height: var(--uui-size-8);
|
|
2281
2281
|
}
|
|
2282
2282
|
*/
|
|
2283
|
-
`],
|
|
2284
|
-
${this.href?
|
|
2283
|
+
`],Fi([l({type:String})],s.UUICardMediaElement.prototype,"name",2),Fi([l({type:String})],s.UUICardMediaElement.prototype,"detail",2),Fi([l({type:String,attribute:"file-ext"})],s.UUICardMediaElement.prototype,"fileExt",2),Fi([w()],s.UUICardMediaElement.prototype,"hasPreview",2),s.UUICardMediaElement=Fi([m("uui-card-media")],s.UUICardMediaElement);var Yd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,rl=i=>{throw TypeError(i)},mn=(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&&Yd(e,t,o),o},Qd=(i,e,t)=>e.has(i)||rl("Cannot "+t),Jd=(i,e,t)=>e.has(i)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ko=(i,e,t)=>(Qd(i,e,"access private method"),t),ni,nl,sl,gn;s.UUICardUserElement=class extends s.UUICardElement{constructor(){super(...arguments),Jd(this,ni),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=fd(e.target)}}connectedCallback(){super.connectedCallback(),k(this,"uui-avatar")}render(){return h`
|
|
2284
|
+
${this.href?Ko(this,ni,sl).call(this):Ko(this,ni,nl).call(this)}
|
|
2285
2285
|
<!-- Select border must be right after #open-part -->
|
|
2286
2286
|
<div id="select-border"></div>
|
|
2287
|
-
${this.selectable?this.renderCheckbox():
|
|
2287
|
+
${this.selectable?this.renderCheckbox():C}
|
|
2288
2288
|
<slot name="tag"></slot>
|
|
2289
2289
|
<slot name="actions"></slot>
|
|
2290
|
-
`}},
|
|
2290
|
+
`}},ni=new WeakSet,nl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return h`
|
|
2291
2291
|
<div
|
|
2292
2292
|
id="open-part"
|
|
2293
|
-
tabindex=${
|
|
2293
|
+
tabindex=${_(i)}
|
|
2294
2294
|
@click=${this.handleOpenClick}
|
|
2295
2295
|
@keydown=${this.handleOpenKeydown}>
|
|
2296
|
-
${
|
|
2296
|
+
${Ko(this,ni,gn).call(this)}
|
|
2297
2297
|
</div>
|
|
2298
|
-
`},
|
|
2298
|
+
`},sl=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return h`
|
|
2299
2299
|
<a
|
|
2300
2300
|
id="open-part"
|
|
2301
|
-
tabindex=${
|
|
2302
|
-
href=${
|
|
2303
|
-
target=${
|
|
2304
|
-
rel=${
|
|
2305
|
-
${
|
|
2301
|
+
tabindex=${_(i)}
|
|
2302
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
2303
|
+
target=${_(this.target||void 0)}
|
|
2304
|
+
rel=${_(this.rel||e)}>
|
|
2305
|
+
${Ko(this,ni,gn).call(this)}
|
|
2306
2306
|
</a>
|
|
2307
|
-
`},
|
|
2307
|
+
`},gn=function(){return h`
|
|
2308
2308
|
<div id="content">
|
|
2309
|
-
${this._avatarSlotHasContent?
|
|
2309
|
+
${this._avatarSlotHasContent?C:h`<uui-avatar
|
|
2310
2310
|
class="avatar"
|
|
2311
2311
|
name=${this.name}
|
|
2312
2312
|
size="m"></uui-avatar>`}
|
|
@@ -2317,7 +2317,7 @@
|
|
|
2317
2317
|
<span title="${this.name}">${this.name}</span>
|
|
2318
2318
|
<slot></slot>
|
|
2319
2319
|
</div>
|
|
2320
|
-
`},
|
|
2320
|
+
`},s.UUICardUserElement.styles=[...s.UUICardElement.styles,v`
|
|
2321
2321
|
:host {
|
|
2322
2322
|
min-width: 250px;
|
|
2323
2323
|
}
|
|
@@ -2403,7 +2403,7 @@
|
|
|
2403
2403
|
margin-top: var(--uui-size-space-1,3px);
|
|
2404
2404
|
margin-bottom: var(--uui-size-space-2,6px);
|
|
2405
2405
|
}
|
|
2406
|
-
`],
|
|
2406
|
+
`],mn([l({type:String})],s.UUICardUserElement.prototype,"name",2),mn([w()],s.UUICardUserElement.prototype,"_avatarSlotHasContent",2),s.UUICardUserElement=mn([m("uui-card-user")],s.UUICardUserElement);var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,al=(i,e,t,r)=>{for(var o=r>1?void 0:r?tp(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&&ep(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
2407
|
xmlns="http://www.w3.org/2000/svg"
|
|
2408
2408
|
viewBox="0 0 24 24"
|
|
2409
2409
|
fill="none"
|
|
@@ -2412,7 +2412,7 @@
|
|
|
2412
2412
|
stroke-linecap="round"
|
|
2413
2413
|
stroke-linejoin="round">
|
|
2414
2414
|
<path d="m4 9 8 8 8-8"></path>
|
|
2415
|
-
</svg>`}},
|
|
2415
|
+
</svg>`}},s.UUICaretElement.styles=[v`
|
|
2416
2416
|
:host {
|
|
2417
2417
|
display: inline-block;
|
|
2418
2418
|
width: 12px;
|
|
@@ -2426,27 +2426,27 @@
|
|
|
2426
2426
|
:host([open]) svg {
|
|
2427
2427
|
transform: rotate(180deg);
|
|
2428
2428
|
}
|
|
2429
|
-
`],
|
|
2429
|
+
`],al([l({type:Boolean,reflect:!0})],s.UUICaretElement.prototype,"open",2),s.UUICaretElement=al([m("uui-caret")],s.UUICaretElement);/**
|
|
2430
2430
|
* @license
|
|
2431
2431
|
* Copyright 2018 Google LLC
|
|
2432
2432
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2433
|
-
*/const
|
|
2433
|
+
*/const fn=Jt(class extends ei{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 ip={grad:.9,turn:360,rad:360/(2*Math.PI)},De=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},R=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ne=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},ll=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ul=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)}},yn=function(i){return{r:R(i.r),g:R(i.g),b:R(i.b),a:R(i.a,3)}},op=/^#([0-9a-f]{3,8})$/i,Xo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},cl=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}},hl=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}},dl=function(i){return{h:ll(i.h),s:ne(i.s,0,100),l:ne(i.l,0,100),a:ne(i.a)}},pl=function(i){return{h:R(i.h),s:R(i.s),l:R(i.l),a:R(i.a,3)}},bl=function(i){return hl((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},Wi=function(i){return{h:(e=cl(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},rp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,np=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ap=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vl={string:[[function(i){var e=op.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=sp.exec(i)||ap.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ul({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=rp.exec(i)||np.exec(i);if(!e)return null;var t,r,o=dl({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(ip[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return bl(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 De(e)&&De(t)&&De(r)?ul({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(!De(e)||!De(t)||!De(r))return null;var a=dl({h:Number(e),s:Number(t),l:Number(r),a:Number(n)});return bl(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,n=o===void 0?1:o;if(!De(e)||!De(t)||!De(r))return null;var a=(function(u){return{h:ll(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(n)});return hl(a)},"hsv"]]},ml=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]},lp=function(i){return typeof i=="string"?ml(i.trim(),vl.string):typeof i=="object"&&i!==null?ml(i,vl.object):[null,void 0]},wn=function(i,e){var t=Wi(i);return{h:t.h,s:ne(t.s+100*e,0,100),l:t.l,a:t.a}},_n=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},gl=function(i,e){var t=Wi(i);return{h:t.h,s:t.s,l:ne(t.l+100*e,0,100),a:t.a}},fl=(function(){function i(e){this.parsed=lp(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(_n(this.rgba),2)},i.prototype.isDark=function(){return _n(this.rgba)<.5},i.prototype.isLight=function(){return _n(this.rgba)>=.5},i.prototype.toHex=function(){return e=yn(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?Xo(R(255*n)):"","#"+Xo(t)+Xo(r)+Xo(o)+a;var e,t,r,o,n,a},i.prototype.toRgb=function(){return yn(this.rgba)},i.prototype.toRgbString=function(){return e=yn(this.rgba),t=e.r,r=e.g,o=e.b,(n=e.a)<1?"rgba("+t+", "+r+", "+o+", "+n+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,n},i.prototype.toHsl=function(){return pl(Wi(this.rgba))},i.prototype.toHslString=function(){return e=pl(Wi(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=cl(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(wn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),se(wn(this.rgba,-e))},i.prototype.grayscale=function(){return se(wn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),se(gl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),se(gl(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=Wi(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 fl?i:new fl(i)};let $n=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var up=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,Ie=(i,e,t,r)=>{for(var o=r>1?void 0:r?cp(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&&up(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=se(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,ja(t,{onMove:(a,u)=>{isNaN(a)||isNaN(u)||(this.saturation=z(a/o*100,0,100),this.brightness=z(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=z(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=z(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=z(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=z(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}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)}syncValues(){const e=se({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new $n($n.CHANGE))}getHexString(e,t,r,o=100){const n=se(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return n.isValid()?n.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return h`
|
|
2434
2434
|
<div
|
|
2435
2435
|
part="grid"
|
|
2436
2436
|
class="color-area"
|
|
2437
|
-
style=${
|
|
2437
|
+
style=${Ve({backgroundColor:this.getHexString(this.hue,100,50)})}
|
|
2438
2438
|
@mousedown=${this.handleGridDrag}
|
|
2439
2439
|
@touchstart=${this.handleGridDrag}>
|
|
2440
2440
|
<span
|
|
2441
2441
|
part="grid-handle"
|
|
2442
|
-
class=${
|
|
2443
|
-
style=${
|
|
2442
|
+
class=${fn({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}
|
|
2443
|
+
style=${Ve({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}
|
|
2444
2444
|
role="application"
|
|
2445
|
-
tabindex=${
|
|
2445
|
+
tabindex=${_(this.disabled?void 0:"0")}
|
|
2446
2446
|
aria-label="HSB"
|
|
2447
2447
|
@keydown=${this.handleGridKeyDown}></span>
|
|
2448
2448
|
</div>
|
|
2449
|
-
`}},
|
|
2449
|
+
`}},s.UUIColorAreaElement.styles=[v`
|
|
2450
2450
|
:host {
|
|
2451
2451
|
display: inline-block;
|
|
2452
2452
|
width: 280px;
|
|
@@ -2502,17 +2502,17 @@
|
|
|
2502
2502
|
.color-area__handle--empty {
|
|
2503
2503
|
display: none;
|
|
2504
2504
|
}
|
|
2505
|
-
`],
|
|
2505
|
+
`],Ie([w()],s.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),Ie([l({type:Boolean,reflect:!0})],s.UUIColorAreaElement.prototype,"disabled",2),Ie([l({type:Boolean,reflect:!0})],s.UUIColorAreaElement.prototype,"readonly",2),Ie([l({type:Number})],s.UUIColorAreaElement.prototype,"hue",2),Ie([l({type:Number})],s.UUIColorAreaElement.prototype,"saturation",2),Ie([l({type:Number})],s.UUIColorAreaElement.prototype,"lightness",2),Ie([l({type:Number})],s.UUIColorAreaElement.prototype,"brightness",2),Ie([l({type:Number})],s.UUIColorAreaElement.prototype,"alpha",2),Ie([l({type:String})],s.UUIColorAreaElement.prototype,"value",1),s.UUIColorAreaElement=Ie([m("uui-color-area")],s.UUIColorAreaElement);/**
|
|
2506
2506
|
* @license
|
|
2507
2507
|
* Copyright 2020 Google LLC
|
|
2508
2508
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2509
|
-
*/const{I:
|
|
2509
|
+
*/const{I:hp}=Ac,yl=i=>i.strings===void 0,wl=()=>document.createComment(""),Gi=(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(wl(),n),u=o.insertBefore(wl(),n);t=new hp(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},St=(i,e,t=i)=>(i._$AI(e,t),i),dp={},_l=(i,e=dp)=>i._$AH=e,pp=i=>i._$AH,kn=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}};/**
|
|
2510
2510
|
* @license
|
|
2511
2511
|
* Copyright 2020 Google LLC
|
|
2512
2512
|
* 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`
|
|
2513
|
+
*/const bp=Jt(class extends ei{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(!yl(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 _l(i),e}});var vp={grad:.9,turn:360,rad:360/(2*Math.PI)},je=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},F=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ae=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},$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)}},Un=function(i){return{r:F(i.r),g:F(i.g),b:F(i.b),a:F(i.a,3)}},mp=/^#([0-9a-f]{3,8})$/i,Yo=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:F(i.h),s:F(i.s),l:F(i.l),a:F(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},gp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,En={string:[[function(i){var e=mp.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=yp.exec(i)||wp.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=gp.exec(i)||fp.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)*(vp[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 je(e)&&je(t)&&je(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(!je(e)||!je(t)||!je(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(!je(e)||!je(t)||!je(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"]]},Sl=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]},_p=function(i){return typeof i=="string"?Sl(i.trim(),En.string):typeof i=="object"&&i!==null?Sl(i,En.object):[null,void 0]},xn=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}},In=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Al=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}},Zo=(function(){function i(e){this.parsed=_p(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(In(this.rgba),2)},i.prototype.isDark=function(){return In(this.rgba)<.5},i.prototype.isLight=function(){return In(this.rgba)>=.5},i.prototype.toHex=function(){return e=Un(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?Yo(F(255*n)):"","#"+Yo(t)+Yo(r)+Yo(o)+a;var e,t,r,o,n,a},i.prototype.toRgb=function(){return Un(this.rgba)},i.prototype.toRgbString=function(){return e=Un(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:F(e.h),s:F(e.s),v:F(e.v),a:F(e.a,3)};var e},i.prototype.invert=function(){return ge({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),ge(xn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ge(xn(this.rgba,-e))},i.prototype.grayscale=function(){return ge(xn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ge(Al(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ge(Al(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"?ge({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=qi(this.rgba);return typeof e=="number"?ge({h:e,s:t.s,l:t.l,a:t.a}):F(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ge(e).toHex()},i})(),ge=function(i){return i instanceof Zo?i:new Zo(i)},Pl=[],$p=function(i){i.forEach(function(e){Pl.indexOf(e)<0&&(e(Zo,En),Pl.push(e))})};function kp(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 Ki=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Up=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,D=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ep(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&&Up(e,t,o),o};$p([kp]);const Ml="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=ge("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 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(){Ml&&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 Ki(Ki.CHANGE)),!0;const t=new Zo(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 Ki(Ki.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const n=ge(`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
2514
|
<div
|
|
2515
|
-
class=${
|
|
2515
|
+
class=${fn({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}
|
|
2516
2516
|
aria-disabled=${this.disabled?"true":"false"}>
|
|
2517
2517
|
<uui-color-area
|
|
2518
2518
|
.value="${this.value}"
|
|
@@ -2532,7 +2532,7 @@
|
|
|
2532
2532
|
?readonly=${this.readonly}
|
|
2533
2533
|
@change=${this.handleHueChange}>
|
|
2534
2534
|
</uui-color-slider>
|
|
2535
|
-
${this.opacity?
|
|
2535
|
+
${this.opacity?h`
|
|
2536
2536
|
<uui-color-slider
|
|
2537
2537
|
hide-value-label
|
|
2538
2538
|
label="alpha"
|
|
@@ -2552,7 +2552,7 @@
|
|
|
2552
2552
|
class="color-picker__preview color-picker__transparent-bg"
|
|
2553
2553
|
title="Copy"
|
|
2554
2554
|
aria-label="Copy"
|
|
2555
|
-
style=${
|
|
2555
|
+
style=${Ve({"--preview-color":e})}
|
|
2556
2556
|
@click=${this.handleCopy}></button>
|
|
2557
2557
|
</div>
|
|
2558
2558
|
<div class="color-picker__user-input" aria-live="polite">
|
|
@@ -2564,14 +2564,14 @@
|
|
|
2564
2564
|
autocomplete="off"
|
|
2565
2565
|
autocapitalize="off"
|
|
2566
2566
|
spellcheck="false"
|
|
2567
|
-
.value=${
|
|
2567
|
+
.value=${bp(this.inputValue)}
|
|
2568
2568
|
?disabled=${this.disabled}
|
|
2569
2569
|
?readonly=${this.readonly}
|
|
2570
2570
|
@keydown=${this.handleInputKeyDown}
|
|
2571
2571
|
@change=${this.handleInputChange}>
|
|
2572
2572
|
</uui-input>
|
|
2573
2573
|
<uui-button-group>
|
|
2574
|
-
${this.noFormatToggle?"":
|
|
2574
|
+
${this.noFormatToggle?"":h`<uui-button
|
|
2575
2575
|
label="Toggle color format"
|
|
2576
2576
|
@click=${this.handleFormatToggle}
|
|
2577
2577
|
class="color-picker__toggle-format"
|
|
@@ -2579,7 +2579,7 @@
|
|
|
2579
2579
|
compact>
|
|
2580
2580
|
<span>${this.format}</span>
|
|
2581
2581
|
</uui-button>`}
|
|
2582
|
-
${
|
|
2582
|
+
${Ml?h`<uui-button
|
|
2583
2583
|
label="Select a color"
|
|
2584
2584
|
?disabled=${this.disabled||this.readonly}
|
|
2585
2585
|
@click=${this.handleEyeDropper}
|
|
@@ -2592,28 +2592,28 @@
|
|
|
2592
2592
|
</div>
|
|
2593
2593
|
${this._renderSwatches()}
|
|
2594
2594
|
</div>
|
|
2595
|
-
`}_renderSwatches(){return this.swatches?.length?
|
|
2595
|
+
`}_renderSwatches(){return this.swatches?.length?h`<uui-color-swatches
|
|
2596
2596
|
id="swatches"
|
|
2597
2597
|
class="color-picker__swatches"
|
|
2598
2598
|
label="Swatches"
|
|
2599
2599
|
?disabled=${this.disabled}
|
|
2600
2600
|
?readonly=${this.readonly}
|
|
2601
2601
|
@change=${this.handleColorSwatchChange}>
|
|
2602
|
-
${this.swatches.map(e=>
|
|
2602
|
+
${this.swatches.map(e=>h`<uui-color-swatch label="${e}" .value=${e}>
|
|
2603
2603
|
</uui-color-swatch>`)}
|
|
2604
|
-
</uui-color-swatches>`:
|
|
2604
|
+
</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
2605
|
type="button"
|
|
2606
2606
|
part="trigger"
|
|
2607
2607
|
aria-label="${this.label||"Open Color picker"}"
|
|
2608
|
-
class=${
|
|
2609
|
-
style=${
|
|
2608
|
+
class=${fn({"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})}
|
|
2609
|
+
style=${Ve({"--preview-color":e})}
|
|
2610
2610
|
?disabled=${this.disabled}
|
|
2611
2611
|
aria-haspopup="true"
|
|
2612
2612
|
aria-expanded="false"
|
|
2613
2613
|
popovertarget="color-picker-popover"></button>
|
|
2614
2614
|
<uui-popover-container id="color-picker-popover">
|
|
2615
2615
|
${this._renderColorPicker()}
|
|
2616
|
-
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},
|
|
2616
|
+
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},s.UUIColorPickerElement.styles=[v`
|
|
2617
2617
|
:host {
|
|
2618
2618
|
--uui-look-outline-border: #ddd;
|
|
2619
2619
|
--uui-look-outline-border-hover: #aaa;
|
|
@@ -2764,7 +2764,7 @@
|
|
|
2764
2764
|
uui-color-area {
|
|
2765
2765
|
width: 100%;
|
|
2766
2766
|
}
|
|
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
|
|
2767
|
+
`],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 xp={grad:.9,turn:360,rad:360/(2*Math.PI)},He=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},le=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:le(i.r,0,255),g:le(i.g,0,255),b:le(i.b,0,255),a:le(i.a)}},Cn=function(i){return{r:W(i.r),g:W(i.g),b:W(i.b),a:W(i.a,3)}},Ip=/^#([0-9a-f]{3,8})$/i,Qo=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:le(i.s,0,100),l:le(i.l,0,100),a:le(i.a)}},Bl=function(i){return{h:W(i.h),s:W(i.s),l:W(i.l),a:W(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},Xi=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},Cp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ap=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dl={string:[[function(i){var e=Ip.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=Ap.exec(i)||Pp.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=Cp.exec(i)||Sp.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)*(xp[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 He(e)&&He(t)&&He(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(!He(e)||!He(t)||!He(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(!He(e)||!He(t)||!He(r))return null;var a=(function(u){return{h:zl(u.h),s:le(u.s,0,100),v:le(u.v,0,100),a:le(u.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(n)});return Tl(a)},"hsv"]]},jl=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]},Mp=function(i){return typeof i=="string"?jl(i.trim(),Dl.string):typeof i=="object"&&i!==null?jl(i,Dl.object):[null,void 0]},Sn=function(i,e){var t=Xi(i);return{h:t.h,s:le(t.s+100*e,0,100),l:t.l,a:t.a}},An=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Hl=function(i,e){var t=Xi(i);return{h:t.h,s:t.s,l:le(t.l+100*e,0,100),a:t.a}},Pn=(function(){function i(e){this.parsed=Mp(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(An(this.rgba),2)},i.prototype.isDark=function(){return An(this.rgba)<.5},i.prototype.isLight=function(){return An(this.rgba)>=.5},i.prototype.toHex=function(){return e=Cn(this.rgba),t=e.r,r=e.g,o=e.b,a=(n=e.a)<1?Qo(W(255*n)):"","#"+Qo(t)+Qo(r)+Qo(o)+a;var e,t,r,o,n,a},i.prototype.toRgb=function(){return Cn(this.rgba)},i.prototype.toRgbString=function(){return e=Cn(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(Xi(this.rgba))},i.prototype.toHslString=function(){return e=Bl(Xi(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:W(e.h),s:W(e.s),v:W(e.v),a:W(e.a,3)};var e},i.prototype.invert=function(){return Re({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),Re(Sn(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Re(Sn(this.rgba,-e))},i.prototype.grayscale=function(){return Re(Sn(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Re(Hl(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Re(Hl(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"?Re({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=Xi(this.rgba);return typeof e=="number"?Re({h:e,s:t.s,l:t.l,a:t.a}):W(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Re(e).toHex()},i})(),Re=function(i){return i instanceof Pn?i:new Pn(i)};let Mn=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var zp=Object.defineProperty,Lp=Object.getOwnPropertyDescriptor,fe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Lp(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};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 Pn(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(),ja(this.container,{onMove:(o,n)=>{this.vertical?this.value=Ha(z(n/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 Mn(Mn.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Ha(this.value,this.min,this.max):this.max/this.value)}render(){return h`<div
|
|
2768
2768
|
part="slider"
|
|
2769
2769
|
id="color-slider"
|
|
2770
2770
|
role="slider"
|
|
@@ -2777,17 +2777,17 @@
|
|
|
2777
2777
|
@mousedown=${this.handleDrag}
|
|
2778
2778
|
@touchstart=${this.handleDrag}
|
|
2779
2779
|
@keydown=${this.handleKeyDown}>
|
|
2780
|
-
${this.type==="opacity"?
|
|
2780
|
+
${this.type==="opacity"?h`<div
|
|
2781
2781
|
id="current-hue"
|
|
2782
|
-
style=${
|
|
2782
|
+
style=${Ve({backgroundImage:"var(--uui-slider-hue-color)"})}></div>`:""}
|
|
2783
2783
|
<!-- <slot name="detail"> </slot> -->
|
|
2784
2784
|
<span
|
|
2785
2785
|
id="color-slider__handle"
|
|
2786
2786
|
style="--current-value: ${this.cssPropCurrentValue}%;"
|
|
2787
|
-
tabindex=${
|
|
2787
|
+
tabindex=${_(this.disabled?void 0:"0")}>
|
|
2788
2788
|
</span>
|
|
2789
2789
|
</div>
|
|
2790
|
-
${this.hideValueLabel?null:Math.round(this.value)}`}},
|
|
2790
|
+
${this.hideValueLabel?null:Math.round(this.value)}`}},s.UUIColorSliderElement.styles=[v`
|
|
2791
2791
|
:host {
|
|
2792
2792
|
--uui-slider-height: 15px;
|
|
2793
2793
|
--uui-slider-handle-size: 17px;
|
|
@@ -2901,14 +2901,14 @@
|
|
|
2901
2901
|
position: absolute;
|
|
2902
2902
|
inset: 0 0 0 0;
|
|
2903
2903
|
}
|
|
2904
|
-
`],
|
|
2904
|
+
`],fe([l({reflect:!0})],s.UUIColorSliderElement.prototype,"type",2),fe([l()],s.UUIColorSliderElement.prototype,"color",2),fe([l({type:Number})],s.UUIColorSliderElement.prototype,"min",2),fe([l({type:Number})],s.UUIColorSliderElement.prototype,"max",2),fe([l({type:Number})],s.UUIColorSliderElement.prototype,"precision",2),fe([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"vertical",2),fe([l({type:Number})],s.UUIColorSliderElement.prototype,"value",2),fe([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"readonly",2),fe([l({type:Boolean,reflect:!0})],s.UUIColorSliderElement.prototype,"disabled",2),fe([l({type:Boolean,attribute:"hide-value-label",reflect:!0})],s.UUIColorSliderElement.prototype,"hideValueLabel",2),s.UUIColorSliderElement=fe([m("uui-color-slider")],s.UUIColorSliderElement);/**
|
|
2905
2905
|
* @license
|
|
2906
2906
|
* Copyright 2017 Google LLC
|
|
2907
2907
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2908
|
-
*/const
|
|
2908
|
+
*/const Yi=(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),Yi(n,e);return!0},Jo=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},Rl=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),Np(e)}};function Op(i){this._$AN!==void 0?(Jo(this),this._$AM=i,Rl(this)):this._$AM=i}function Tp(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++)Yi(r[n],!1),Jo(r[n]);else r!=null&&(Yi(r,!1),Jo(r));else Yi(this,i)}const Np=i=>{var e,t,r,o;i.type==me.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=Tp),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=Op))};let Bp=class extends ei{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Rl(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&&(Yi(this,e),Jo(this))}setValue(e){if(yl(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 zn=new WeakMap,er=Jt(class extends Bp{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=zn.get(t);r===void 0&&(r=new WeakMap,zn.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=zn.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 Vp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,Fl=i=>{throw TypeError(i)},si=(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},jp=(i,e,t)=>e.has(i)||Fl("Cannot "+t),Hp=(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),Rp=(i,e,t)=>(jp(i,e,"access private method"),t),Ln,Wl;s.UUIColorSwatchElement=class extends Ee("label",Xt(Vi(f))){constructor(){super(),Hp(this,Ln),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
2909
|
<button
|
|
2910
2910
|
id="swatch"
|
|
2911
|
-
${
|
|
2911
|
+
${er(Rp(this,Ln,Wl))}
|
|
2912
2912
|
aria-label=${this.label}
|
|
2913
2913
|
?disabled="${this.disabled}"
|
|
2914
2914
|
title="${this.label}">
|
|
@@ -2919,15 +2919,15 @@
|
|
|
2919
2919
|
<div
|
|
2920
2920
|
class="color-swatch__check"
|
|
2921
2921
|
style="color: var(--uui-swatch-color, ${this.color??this.value})">
|
|
2922
|
-
${
|
|
2922
|
+
${jo}
|
|
2923
2923
|
</div>
|
|
2924
2924
|
</div>
|
|
2925
2925
|
${this._renderWithLabel()}
|
|
2926
2926
|
</button>
|
|
2927
|
-
`}_renderWithLabel(){return this.showLabel?
|
|
2927
|
+
`}_renderWithLabel(){return this.showLabel?h`<div class="color-swatch__label">
|
|
2928
2928
|
<strong>${this.renderLabel()}</strong>
|
|
2929
2929
|
${this.value}
|
|
2930
|
-
</div>`:
|
|
2930
|
+
</div>`:C}},Ln=new WeakSet,Wl=function(i){this.selectableTarget=i||this},s.UUIColorSwatchElement.styles=[v`
|
|
2931
2931
|
:host {
|
|
2932
2932
|
position: relative;
|
|
2933
2933
|
display: inline-flex;
|
|
@@ -3090,19 +3090,19 @@
|
|
|
3090
3090
|
white-space: nowrap;
|
|
3091
3091
|
box-sizing: border-box;
|
|
3092
3092
|
}
|
|
3093
|
-
`],
|
|
3093
|
+
`],si([l()],s.UUIColorSwatchElement.prototype,"value",1),si([l()],s.UUIColorSwatchElement.prototype,"color",1),si([l({type:Boolean,reflect:!0})],s.UUIColorSwatchElement.prototype,"disabled",2),si([l({type:Boolean,reflect:!0})],s.UUIColorSwatchElement.prototype,"readonly",2),si([l({type:Boolean,attribute:"show-label",reflect:!0})],s.UUIColorSwatchElement.prototype,"showLabel",2),s.UUIColorSwatchElement=si([m("uui-color-swatch")],s.UUIColorSwatchElement);let Zi=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Fp=Object.defineProperty,Wp=Object.getOwnPropertyDescriptor,Qi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wp(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};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 Zi(Zi.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 Zi(Zi.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
3094
|
:host {
|
|
3095
3095
|
display: flex;
|
|
3096
3096
|
flex-wrap: wrap;
|
|
3097
3097
|
gap: 0.4rem;
|
|
3098
3098
|
}
|
|
3099
|
-
`],
|
|
3099
|
+
`],Qi([l()],s.UUIColorSwatchesElement.prototype,"value",2),Qi([l({type:Boolean,reflect:!0})],s.UUIColorSwatchesElement.prototype,"disabled",2),Qi([l({type:Boolean,reflect:!0})],s.UUIColorSwatchesElement.prototype,"readonly",2),Qi([Be({selector:"uui-color-swatch"})],s.UUIColorSwatchesElement.prototype,"_swatches",2),s.UUIColorSwatchesElement=Qi([m("uui-color-swatches")],s.UUIColorSwatchesElement);let ye=class extends M{static{this.CHANGE="change"}static{this.INNER_SLOT_CHANGE="inner-slot-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Gp=Object.defineProperty,qp=Object.getOwnPropertyDescriptor,Gl=i=>{throw TypeError(i)},rt=(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&&Gp(e,t,o),o},Kp=(i,e,t)=>e.has(i)||Gl("Cannot "+t),Xp=(i,e,t)=>e.has(i)?Gl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ql=(i,e,t)=>(Kp(i,e,"access private method"),t),tr,On;s.UUIComboboxListElement=class extends f{constructor(){super(...arguments),Xp(this,tr),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{ql(this,tr,On).call(this),this._updateSelection(),this.dispatchEvent(new ye(ye.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 ye(ye.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new ye(ye.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,ql(this,tr,On).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return h` <slot @slotchange=${this._onSlotChange}></slot> `}},tr=new WeakSet,On=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
3100
|
:host {
|
|
3101
3101
|
display: flex;
|
|
3102
3102
|
flex-direction: column;
|
|
3103
3103
|
box-sizing: border-box;
|
|
3104
3104
|
}
|
|
3105
|
-
`],
|
|
3105
|
+
`],rt([l()],s.UUIComboboxListElement.prototype,"value",1),rt([l({type:String})],s.UUIComboboxListElement.prototype,"displayValue",2),rt([l({attribute:!1})],s.UUIComboboxListElement.prototype,"for",1),rt([Be({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],s.UUIComboboxListElement.prototype,"_options",2),rt([Be({flatten:!0,selector:"uui-combobox-list-option[active]"})],s.UUIComboboxListElement.prototype,"_activeOptions",2),rt([w()],s.UUIComboboxListElement.prototype,"_value",2),rt([w()],s.UUIComboboxListElement.prototype,"_activeElementValue",2),s.UUIComboboxListElement=rt([m("uui-combobox-list")],s.UUIComboboxListElement);var Yp=Object.defineProperty,Zp=Object.getOwnPropertyDescriptor,ai=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zp(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&&Yp(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
3106
|
:host {
|
|
3107
3107
|
position: relative;
|
|
3108
3108
|
cursor: pointer;
|
|
@@ -3184,7 +3184,7 @@
|
|
|
3184
3184
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
3185
3185
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
3186
3186
|
}
|
|
3187
|
-
`],
|
|
3187
|
+
`],ai([w()],s.UUIComboboxListOptionElement.prototype,"_disabled",2),ai([w()],s.UUIComboboxListOptionElement.prototype,"_displayValue",2),ai([l({type:String})],s.UUIComboboxListOptionElement.prototype,"value",1),ai([l({type:String,attribute:"display-value"})],s.UUIComboboxListOptionElement.prototype,"displayValue",1),ai([l({type:Boolean,reflect:!0})],s.UUIComboboxListOptionElement.prototype,"disabled",1),s.UUIComboboxListOptionElement=ai([m("uui-combobox-list-option")],s.UUIComboboxListOptionElement);let we=class extends M{static{this.SEARCH="search"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Qp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,Kl=i=>{throw TypeError(i)},X=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jp(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&&Qp(e,t,o),o},Tn=(i,e,t)=>e.has(i)||Kl("Cannot "+t),E=(i,e,t)=>(Tn(i,e,"read from private field"),t?t.call(i):e.get(i)),q=(i,e,t)=>e.has(i)?Kl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Xl=(i,e,t,r)=>(Tn(i,e,"write to private field"),e.set(i,t),t),ir=(i,e,t)=>(Tn(i,e,"access private method"),t),J,li,ui,Yl,Ji,or,rr,nr,Nn,sr,ar,Bn,eo,ci,Vn,lr,ur,Dn,cr;s.UUIComboboxElement=class extends xe(f,""){constructor(){super(...arguments),q(this,ui),this.closeLabel="Close",this.disabled=!1,this.hideExpandSymbol=!1,this.readonly=!1,this.placeholder="",q(this,J),q(this,li),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,q(this,Ji,()=>{this._isPhone=E(this,li).matches}),q(this,rr,()=>requestAnimationFrame(()=>this._input.focus())),q(this,nr,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||E(this,ci).call(this)})),q(this,Nn,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new we(we.SEARCH)),E(this,eo).call(this)}),q(this,sr,()=>{this.value&&this.value!==E(this,J)?.value&&ir(this,ui,or).call(this)}),q(this,ar,()=>{this.value=E(this,J)?.value||"",this.search=this.value?this.search:"",E(this,ci).call(this),this.dispatchEvent(new we(we.CHANGE))}),q(this,Bn,()=>{this.readonly||(this.open=!this.open)}),q(this,eo,()=>{this.open||this.readonly||(this.open=!0)}),q(this,ci,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new we(we.SEARCH)))}),q(this,Vn,e=>{if(this.open===!1&&e.code==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.code==="ArrowUp"||e.code==="ArrowDown")&&E(this,eo).call(this),e.code==="Space"){if(this._isOpen)return;e.preventDefault(),e.stopImmediatePropagation(),E(this,eo).call(this)}(e.code==="Escape"||e.code==="Enter")&&E(this,ci).call(this)}),q(this,lr,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 we(we.SEARCH)),this.dispatchEvent(new we(we.CHANGE)))}),q(this,ur,()=>h`<uui-input
|
|
3188
3188
|
slot="trigger"
|
|
3189
3189
|
id="combobox-input"
|
|
3190
3190
|
label="combobox-input"
|
|
@@ -3195,44 +3195,44 @@
|
|
|
3195
3195
|
.disabled=${this.disabled}
|
|
3196
3196
|
.readonly=${this.readonly}
|
|
3197
3197
|
popovertarget="combobox-popover"
|
|
3198
|
-
@click=${E(this,
|
|
3199
|
-
@input=${E(this,
|
|
3200
|
-
@keydown=${E(this,
|
|
3198
|
+
@click=${E(this,Bn)}
|
|
3199
|
+
@input=${E(this,Nn)}
|
|
3200
|
+
@keydown=${E(this,Vn)}>
|
|
3201
3201
|
<slot name="input-prepend" slot="prepend"></slot>
|
|
3202
|
-
${E(this,
|
|
3203
|
-
${this.hideExpandSymbol?
|
|
3202
|
+
${E(this,Dn).call(this)}
|
|
3203
|
+
${this.hideExpandSymbol?C:h`<div id="expand-symbol-wrapper" slot="append">
|
|
3204
3204
|
<uui-symbol-expand .open=${this._isOpen}></uui-symbol-expand>
|
|
3205
3205
|
</div>`}
|
|
3206
3206
|
<slot name="input-append" slot="append"></slot>
|
|
3207
|
-
</uui-input>`),
|
|
3207
|
+
</uui-input>`),q(this,Dn,()=>this.disabled||this.readonly?C:h`<uui-button
|
|
3208
3208
|
id="clear-button"
|
|
3209
|
-
@click=${E(this,
|
|
3210
|
-
@keydown=${E(this,
|
|
3209
|
+
@click=${E(this,lr)}
|
|
3210
|
+
@keydown=${E(this,lr)}
|
|
3211
3211
|
label="clear"
|
|
3212
3212
|
slot="append"
|
|
3213
3213
|
compact
|
|
3214
3214
|
style="height: 100%;"
|
|
3215
3215
|
tabindex=${this.value||this.search?"":"-1"}
|
|
3216
3216
|
class=${this.value||this.search?"visible":""}>
|
|
3217
|
-
<uui-icon name="remove" .fallback=${
|
|
3218
|
-
</uui-button>`),
|
|
3217
|
+
<uui-icon name="remove" .fallback=${cn.strings[0]}></uui-icon>
|
|
3218
|
+
</uui-button>`),q(this,cr,()=>h`<div id="dropdown">
|
|
3219
3219
|
<uui-scroll-container tabindex="-1" id="scroll-container">
|
|
3220
|
-
<slot @slotchange=${
|
|
3220
|
+
<slot @slotchange=${ir(this,ui,Yl)}></slot>
|
|
3221
3221
|
</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,
|
|
3222
|
+
</div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&ir(this,ui,or).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,nr)),this.addEventListener("mousedown",E(this,rr)),Xl(this,li,window.matchMedia("(max-width: 600px)")),E(this,Ji).call(this),E(this,li).addEventListener("change",E(this,Ji)),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,nr)),this.removeEventListener("mousedown",E(this,rr)),E(this,li).removeEventListener("change",E(this,Ji))}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">
|
|
3223
|
+
<uui-button label="close" look="primary" @click=${E(this,ci)}>
|
|
3224
3224
|
${this.closeLabel}
|
|
3225
3225
|
</uui-button>
|
|
3226
|
-
${E(this,
|
|
3227
|
-
</div>`:
|
|
3228
|
-
${E(this,
|
|
3226
|
+
${E(this,ur).call(this)} ${E(this,cr).call(this)}
|
|
3227
|
+
</div>`:h`
|
|
3228
|
+
${E(this,ur).call(this)}
|
|
3229
3229
|
<uui-popover-container
|
|
3230
3230
|
id="combobox-popover"
|
|
3231
3231
|
popover="manual"
|
|
3232
3232
|
placement="bottom-end">
|
|
3233
|
-
${E(this,
|
|
3233
|
+
${E(this,cr).call(this)}
|
|
3234
3234
|
</uui-popover-container>
|
|
3235
|
-
`}},
|
|
3235
|
+
`}},J=new WeakMap,li=new WeakMap,ui=new WeakSet,Yl=function(){E(this,J)&&(E(this,J).removeEventListener(ye.CHANGE,E(this,ar)),E(this,J).removeEventListener(ye.INNER_SLOT_CHANGE,E(this,sr)));const i=this._comboboxListElements?.[0];i&&(Xl(this,J,i),E(this,J).for=this,E(this,J).addEventListener(ye.CHANGE,E(this,ar)),E(this,J).addEventListener(ye.INNER_SLOT_CHANGE,E(this,sr))),this.updateComplete.then(()=>{ir(this,ui,or).call(this)})},Ji=new WeakMap,or=function(){E(this,J)&&(E(this,J).value=this.value,requestAnimationFrame(()=>this._displayValue=E(this,J).displayValue||""))},rr=new WeakMap,nr=new WeakMap,Nn=new WeakMap,sr=new WeakMap,ar=new WeakMap,Bn=new WeakMap,eo=new WeakMap,ci=new WeakMap,Vn=new WeakMap,lr=new WeakMap,ur=new WeakMap,Dn=new WeakMap,cr=new WeakMap,s.UUIComboboxElement.styles=[v`
|
|
3236
3236
|
:host {
|
|
3237
3237
|
display: inline-flex;
|
|
3238
3238
|
}
|
|
@@ -3312,12 +3312,12 @@
|
|
|
3312
3312
|
#phone-wrapper #scroll-container {
|
|
3313
3313
|
max-height: unset;
|
|
3314
3314
|
}
|
|
3315
|
-
`],
|
|
3315
|
+
`],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 eb=Object.defineProperty,tb=Object.getOwnPropertyDescriptor,jn=(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&&eb(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
3316
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
3317
3317
|
${this.headline}
|
|
3318
3318
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
3319
|
-
</h3>`}renderContent(){return
|
|
3320
|
-
${this.renderActions()} `}},
|
|
3319
|
+
</h3>`}renderContent(){return h`<slot></slot>`}renderActions(){return h`<slot id="actions" name="actions"></slot>`}render(){return h`${this.renderHeadline()} ${this.renderContent()}
|
|
3320
|
+
${this.renderActions()} `}},s.UUIDialogLayoutElement.styles=[v`
|
|
3321
3321
|
:host {
|
|
3322
3322
|
display: block;
|
|
3323
3323
|
padding: var(--uui-size-10,30px) var(--uui-size-14,42px);
|
|
@@ -3330,7 +3330,7 @@
|
|
|
3330
3330
|
justify-content: end;
|
|
3331
3331
|
gap: var(--uui-size-4,12px);
|
|
3332
3332
|
}
|
|
3333
|
-
`],
|
|
3333
|
+
`],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 ib=(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
3334
|
:host {
|
|
3335
3335
|
position: relative;
|
|
3336
3336
|
display: block;
|
|
@@ -3348,13 +3348,13 @@
|
|
|
3348
3348
|
calc(var(--uui-border-radius,3px) * 2)
|
|
3349
3349
|
);
|
|
3350
3350
|
}
|
|
3351
|
-
`],
|
|
3351
|
+
`],s.UUIDialogElement=ib([m("uui-dialog")],s.UUIDialogElement);var ob=Object.defineProperty,rb=Object.getOwnPropertyDescriptor,Zl=(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&&ob(e,t,o),o};s.UUISymbolFileDropzoneElement=class extends f{constructor(){super(...arguments),this.error=!1}render(){return h`<svg
|
|
3352
3352
|
xmlns="http://www.w3.org/2000/svg"
|
|
3353
3353
|
viewBox="0 0 512 512"
|
|
3354
3354
|
id="upload-icon">
|
|
3355
3355
|
<path
|
|
3356
3356
|
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> `}},
|
|
3357
|
+
</svg> `}},s.UUISymbolFileDropzoneElement.styles=[v`
|
|
3358
3358
|
:host {
|
|
3359
3359
|
display: flex;
|
|
3360
3360
|
flex-direction: column;
|
|
@@ -3373,7 +3373,7 @@
|
|
|
3373
3373
|
:host([error]) #upload-icon {
|
|
3374
3374
|
fill: var(--uui-color-invalid,#c31d4c);
|
|
3375
3375
|
}
|
|
3376
|
-
`],
|
|
3376
|
+
`],Zl([l({type:Boolean,reflect:!0})],s.UUISymbolFileDropzoneElement.prototype,"error",2),s.UUISymbolFileDropzoneElement=Zl([m("uui-symbol-file-dropzone")],s.UUISymbolFileDropzoneElement);let to=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var nb=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,hi=(i,e,t,r)=>{for(var o=r>1?void 0:r?sb(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.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 to(to.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 to(to.CHANGE,{detail:{files:t,folders:[]}}))}render(){return h`
|
|
3377
3377
|
<div id="dropzone">
|
|
3378
3378
|
<uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>
|
|
3379
3379
|
${this.renderLabel()}
|
|
@@ -3387,7 +3387,7 @@
|
|
|
3387
3387
|
aria-label="${this.label}" />
|
|
3388
3388
|
<slot></slot>
|
|
3389
3389
|
</div>
|
|
3390
|
-
`}},
|
|
3390
|
+
`}},s.UUIFileDropzoneElement.styles=[v`
|
|
3391
3391
|
#dropzone {
|
|
3392
3392
|
display: flex;
|
|
3393
3393
|
flex-direction: column;
|
|
@@ -3425,12 +3425,12 @@
|
|
|
3425
3425
|
opacity: 0;
|
|
3426
3426
|
display: none;
|
|
3427
3427
|
}
|
|
3428
|
-
`],
|
|
3428
|
+
`],hi([S("#input")],s.UUIFileDropzoneElement.prototype,"_input",2),hi([S("#dropzone")],s.UUIFileDropzoneElement.prototype,"_dropzone",2),hi([l({type:String})],s.UUIFileDropzoneElement.prototype,"accept",1),hi([l({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],s.UUIFileDropzoneElement.prototype,"disallowFolderUpload",2),hi([l({type:Boolean})],s.UUIFileDropzoneElement.prototype,"multiple",2),s.UUIFileDropzoneElement=hi([m("uui-file-dropzone")],s.UUIFileDropzoneElement);let ab=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 lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,Ce=(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&&lb(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
3429
|
.src=${this._src}
|
|
3430
3430
|
.alt=${this._name}
|
|
3431
|
-
id="file-symbol"></uui-symbol-file-thumbnail>`:
|
|
3431
|
+
id="file-symbol"></uui-symbol-file-thumbnail>`:h`<uui-symbol-file
|
|
3432
3432
|
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
|
|
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 h`
|
|
3434
3434
|
<span
|
|
3435
3435
|
id="file-name"
|
|
3436
3436
|
class=${this._url?"has-source":""}
|
|
@@ -3439,16 +3439,16 @@
|
|
|
3439
3439
|
<span id="file-name-start">${e}</span>
|
|
3440
3440
|
<span id="file-name-end">${t}</span>
|
|
3441
3441
|
</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
|
|
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 h`
|
|
3443
3443
|
<slot id="actions" name="actions"></slot>
|
|
3444
3444
|
${this._fileTypeTemplate()}
|
|
3445
3445
|
<div id="file-info">
|
|
3446
3446
|
${this._renderLongName()}
|
|
3447
3447
|
<span id="file-size">
|
|
3448
|
-
${this._size&&!this._isDirectory?
|
|
3448
|
+
${this._size&&!this._isDirectory?h`${ab.humanFileSize(this._size,!0)}`:""}
|
|
3449
3449
|
</span>
|
|
3450
3450
|
</div>
|
|
3451
|
-
`}},
|
|
3451
|
+
`}},s.UUIFilePreviewElement.styles=[v`
|
|
3452
3452
|
:host {
|
|
3453
3453
|
position: relative;
|
|
3454
3454
|
display: grid;
|
|
@@ -3516,7 +3516,7 @@
|
|
|
3516
3516
|
text-decoration: underline;
|
|
3517
3517
|
cursor: pointer;
|
|
3518
3518
|
}
|
|
3519
|
-
`],
|
|
3519
|
+
`],Ce([w()],s.UUIFilePreviewElement.prototype,"_name",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_url",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_extension",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_src",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_size",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_isDirectory",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_file",2),Ce([w()],s.UUIFilePreviewElement.prototype,"_isImage",2),Ce([l({attribute:!1})],s.UUIFilePreviewElement.prototype,"file",1),s.UUIFilePreviewElement=Ce([m("uui-file-preview")],s.UUIFilePreviewElement);var cb=Object.defineProperty,hb=Object.getOwnPropertyDescriptor,hr=(i,e,t,r)=>{for(var o=r>1?void 0:r?hb(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&&cb(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
3520
|
<div id="label" style=${this._labelSlotHasContent?"":"display: none"}>
|
|
3521
3521
|
<slot name="label" @slotchange=${this._labelSlotChanged}></slot>
|
|
3522
3522
|
</div>
|
|
@@ -3532,7 +3532,7 @@
|
|
|
3532
3532
|
<slot></slot>
|
|
3533
3533
|
<slot name="message" slot="message"></slot>
|
|
3534
3534
|
</uui-form-validation-message>
|
|
3535
|
-
`}},
|
|
3535
|
+
`}},s.UUIFormLayoutItemElement.styles=[v`
|
|
3536
3536
|
:host {
|
|
3537
3537
|
position: relative;
|
|
3538
3538
|
display: block;
|
|
@@ -3551,21 +3551,21 @@
|
|
|
3551
3551
|
margin-top: -8px;
|
|
3552
3552
|
min-height: 8px;
|
|
3553
3553
|
}
|
|
3554
|
-
`],
|
|
3554
|
+
`],hr([l({type:String})],s.UUIFormLayoutItemElement.prototype,"description",2),hr([w()],s.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),hr([w()],s.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),s.UUIFormLayoutItemElement=hr([m("uui-form-layout-item")],s.UUIFormLayoutItemElement);/**
|
|
3555
3555
|
* @license
|
|
3556
3556
|
* Copyright 2017 Google LLC
|
|
3557
3557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3558
|
-
*/const
|
|
3558
|
+
*/const Ql=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},dr=Jt(class extends ei{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=pp(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]=St(n[y],a[x]),y++,x++;else if(c[$]===u[A])d[A]=St(n[$],a[A]),$--,A--;else if(c[y]===u[A])d[A]=St(n[y],a[A]),Gi(i,d[A+1],n[y]),y++,A--;else if(c[$]===u[x])d[x]=St(n[$],a[x]),Gi(i,n[y],n[$]),$--,x++;else if(b===void 0&&(b=Ql(u,x,A),g=Ql(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=Gi(i,n[y]);St(pe,a[x]),d[x]=pe}else d[x]=St(Ue,a[x]),Gi(i,n[y],Ue),n[K]=null;x++}else kn(n[$]),$--;else kn(n[y]),y++;for(;x<=A;){const K=Gi(i,d[A+1]);St(K,a[x]),d[x++]=K}for(;y<=$;){const K=n[y++];K!==null&&kn(K)}return this.ut=u,_l(i,d),te}});/**
|
|
3559
3559
|
* @license
|
|
3560
3560
|
* Copyright 2017 Google LLC
|
|
3561
3561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3562
|
-
*/class
|
|
3562
|
+
*/class Hn extends ei{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:[]}}}Hn.directiveName="unsafeHTML",Hn.resultType=1;const pr=Jt(Hn);var db=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,Jl=(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};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
3563
|
<slot></slot>
|
|
3564
3564
|
<div id="messages">
|
|
3565
|
-
${
|
|
3565
|
+
${dr(this._messages,e=>h`<div>${pr(e[1])}</div>`)}
|
|
3566
3566
|
<slot name="message"></slot>
|
|
3567
3567
|
</div>
|
|
3568
|
-
`}},
|
|
3568
|
+
`}},s.UUIFormValidationMessageElement.styles=[v`
|
|
3569
3569
|
#messages {
|
|
3570
3570
|
color: var(--uui-color-invalid-standalone,rgb(
|
|
3571
3571
|
174,
|
|
@@ -3573,7 +3573,7 @@
|
|
|
3573
3573
|
71
|
|
3574
3574
|
));
|
|
3575
3575
|
}
|
|
3576
|
-
`],
|
|
3576
|
+
`],Jl([l({reflect:!1,attribute:!0})],s.UUIFormValidationMessageElement.prototype,"for",1),s.UUIFormValidationMessageElement=Jl([m("uui-form-validation-message")],s.UUIFormValidationMessageElement);var bb=(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=bb([m("uui-form")],s.UUIFormElement);let io=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 vb=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,At=(i,e,t,r)=>{for(var o=r>1?void 0:r?mb(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.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 io(io.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`${pr(this.fallback)}`:this._nameSvg!==null?h`${pr(this._nameSvg)}`:this.svg!==null?h`${pr(this.svg)}`:h`<slot></slot>`}},s.UUIIconElement.styles=[v`
|
|
3577
3577
|
:host {
|
|
3578
3578
|
vertical-align: text-bottom;
|
|
3579
3579
|
display: inline-flex;
|
|
@@ -3599,16 +3599,16 @@
|
|
|
3599
3599
|
:host-context(div[slot='append']) {
|
|
3600
3600
|
margin-right: var(--uui-size-2, 6px);
|
|
3601
3601
|
}
|
|
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}">
|
|
3602
|
+
`],At([w()],s.UUIIconElement.prototype,"_nameSvg",2),At([l()],s.UUIIconElement.prototype,"label",2),At([l()],s.UUIIconElement.prototype,"name",1),At([l({attribute:!1})],s.UUIIconElement.prototype,"svg",2),At([l({attribute:!1})],s.UUIIconElement.prototype,"fallback",2),At([w()],s.UUIIconElement.prototype,"_useFallback",2),s.UUIIconElement=At([m("uui-icon")],s.UUIIconElement);let Rn=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)}},Fn=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(io.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(io.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new Rn(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Rn}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var gb=Object.defineProperty,fb=Object.getOwnPropertyDescriptor,eu=(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.UUIIconRegistryElement=class extends f{constructor(){super(),this._icons={},this._registry=new Fn,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>`}},eu([l({attribute:!1})],s.UUIIconRegistryElement.prototype,"_icons",2),s.UUIIconRegistryElement=eu([m("uui-icon-registry")],s.UUIIconRegistryElement);const 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"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,wb=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>`,_b=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>`,$b=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>`,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"><polyline points="20 6 9 17 4 12" /></svg>`,Ub=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>`,Eb=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>`,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"><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>`,Ib=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>`,Cb=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>`,Sb=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>`,Ab=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>`,Pb=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>`,Mb=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>`,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"><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>`,Lb=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>`,Ob=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>`,Tb=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>`,Nb=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>`,Bb=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>`,Vb=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>`,Db=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>`,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="M18 6 6 18" /><path d="m6 6 12 12" /></svg>`,Hb=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>`,Rb=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>`,Fb=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>`,Wb=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>`,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="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>`,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"><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>`,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="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>`,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"><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>`,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"><circle cx="12" cy="12" r="10" /><path d="m15 9-6 6" /><path d="m9 9 6 6" /></svg>`;let tu=class extends Fn{constructor(){super(),this.defineIcon("add",yb.strings[0]),this.defineIcon("alert",wb.strings[0]),this.defineIcon("attachment",_b.strings[0]),this.defineIcon("calendar",$b.strings[0]),this.defineIcon("check",kb.strings[0]),this.defineIcon("clipboard",Ub.strings[0]),this.defineIcon("code",Eb.strings[0]),this.defineIcon("colorpicker",xb.strings[0]),this.defineIcon("copy",Ib.strings[0]),this.defineIcon("delete",Cb.strings[0]),this.defineIcon("document",Sb.strings[0]),this.defineIcon("download",Ab.strings[0]),this.defineIcon("edit",Pb.strings[0]),this.defineIcon("favorite",Mb.strings[0]),this.defineIcon("folder",zb.strings[0]),this.defineIcon("forbidden",Lb.strings[0]),this.defineIcon("info",Ob.strings[0]),this.defineIcon("link",Tb.strings[0]),this.defineIcon("lock",Nb.strings[0]),this.defineIcon("pause",Bb.strings[0]),this.defineIcon("picture",Vb.strings[0]),this.defineIcon("play",Db.strings[0]),this.defineIcon("remove",jb.strings[0]),this.defineIcon("search",Hb.strings[0]),this.defineIcon("see",Rb.strings[0]),this.defineIcon("settings",Fb.strings[0]),this.defineIcon("subtract",Wb.strings[0]),this.defineIcon("sync",Gb.strings[0]),this.defineIcon("unlock",qb.strings[0]),this.defineIcon("unsee",Kb.strings[0]),this.defineIcon("wand",Xb.strings[0]),this.defineIcon("wrong",Yb.strings[0])}};var Zb=(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 tu}},s.UUIIconRegistryEssentialElement=Zb([m("uui-icon-registry-essential")],s.UUIIconRegistryEssentialElement);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,di=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jb(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&&Qb(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
3603
|
<uui-action-bar slot="actions">
|
|
3604
3604
|
<uui-button
|
|
3605
3605
|
@click=${()=>this._removeFile(t)}
|
|
3606
3606
|
color="danger"
|
|
3607
3607
|
label=${`Delete ${e.name}`}>
|
|
3608
|
-
<uui-icon name="delete" .fallback=${
|
|
3608
|
+
<uui-icon name="delete" .fallback=${yd.strings[0]}></uui-icon>
|
|
3609
3609
|
</uui-button>
|
|
3610
3610
|
</uui-action-bar>
|
|
3611
|
-
</uui-file-preview>`}_renderFiles(){return
|
|
3611
|
+
</uui-file-preview>`}_renderFiles(){return h`${dr(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return h`
|
|
3612
3612
|
<uui-file-dropzone
|
|
3613
3613
|
id="dropzone"
|
|
3614
3614
|
?multiple=${this.multiple}
|
|
@@ -3617,13 +3617,13 @@
|
|
|
3617
3617
|
label="Drop files here"></uui-file-dropzone>
|
|
3618
3618
|
<div id="files">
|
|
3619
3619
|
${this._renderFiles()}
|
|
3620
|
-
${this._files.length===0||this.multiple?
|
|
3620
|
+
${this._files.length===0||this.multiple?h`<uui-button
|
|
3621
3621
|
@click=${this._handleClick}
|
|
3622
3622
|
id="add-button"
|
|
3623
3623
|
look="placeholder"
|
|
3624
|
-
label="Add"></uui-button>`:
|
|
3624
|
+
label="Add"></uui-button>`:C}
|
|
3625
3625
|
</div>
|
|
3626
|
-
`}},
|
|
3626
|
+
`}},s.UUIInputFileElement.styles=[v`
|
|
3627
3627
|
:host {
|
|
3628
3628
|
width: 100%;
|
|
3629
3629
|
height: 100%;
|
|
@@ -3672,33 +3672,33 @@
|
|
|
3672
3672
|
justify-content: center;
|
|
3673
3673
|
align-items: stretch;
|
|
3674
3674
|
}
|
|
3675
|
-
`],
|
|
3675
|
+
`],di([S("#dropzone")],s.UUIInputFileElement.prototype,"_dropzone",2),di([S("#dropzone")],s.UUIInputFileElement.prototype,"_dropZone",2),di([l({type:String})],s.UUIInputFileElement.prototype,"accept",2),di([l({type:Boolean})],s.UUIInputFileElement.prototype,"multiple",2),di([w()],s.UUIInputFileElement.prototype,"_files",2),s.UUIInputFileElement=di([m("uui-input-file")],s.UUIInputFileElement);let oo=class extends M{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,iu=i=>{throw TypeError(i)},G=(i,e,t,r)=>{for(var o=r>1?void 0:r?tv(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},iv=(i,e,t)=>e.has(i)||iu("Cannot "+t),ov=(i,e,t)=>e.has(i)?iu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),rv=(i,e,t)=>(iv(i,e,"access private method"),t),Wn,ou;s.UUIInputElement=class extends xe(Ee("",f),""){constructor(){super(),ov(this,Wn),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",rv(this,Wn,ou)),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 oo(oo.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new oo(oo.CHANGE))}renderPrepend(){return h`<slot name="prepend"></slot>`}renderAppend(){return h`<slot name="append"></slot>`}render(){return h`
|
|
3676
3676
|
${this.renderPrepend()}
|
|
3677
3677
|
${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()}
|
|
3678
3678
|
${this.renderAppend()}
|
|
3679
|
-
`}renderInputWithAutoWidth(){return
|
|
3679
|
+
`}renderInputWithAutoWidth(){return h`<div id="control">
|
|
3680
3680
|
${this.renderInput()}${this.renderAutoWidthBackground()}
|
|
3681
|
-
</div>`}renderInput(){return
|
|
3681
|
+
</div>`}renderInput(){return h`<input
|
|
3682
3682
|
id="input"
|
|
3683
3683
|
.type=${this.type}
|
|
3684
3684
|
.value=${this.value}
|
|
3685
3685
|
.name=${this.name}
|
|
3686
|
-
pattern=${
|
|
3687
|
-
min=${
|
|
3688
|
-
max=${
|
|
3689
|
-
step=${
|
|
3686
|
+
pattern=${_(this.pattern)}
|
|
3687
|
+
min=${_(this.min)}
|
|
3688
|
+
max=${_(this.max)}
|
|
3689
|
+
step=${_(this.step)}
|
|
3690
3690
|
spellcheck=${this.spellcheck}
|
|
3691
|
-
autocomplete=${
|
|
3692
|
-
placeholder=${
|
|
3693
|
-
aria-label=${
|
|
3694
|
-
inputmode=${
|
|
3691
|
+
autocomplete=${_(this.autocomplete)}
|
|
3692
|
+
placeholder=${_(this.placeholder)}
|
|
3693
|
+
aria-label=${_(this.label)}
|
|
3694
|
+
inputmode=${_(this.inputMode)}
|
|
3695
3695
|
?disabled=${this.disabled}
|
|
3696
3696
|
?autofocus=${this.autofocus}
|
|
3697
3697
|
?required=${this.required}
|
|
3698
3698
|
?readonly=${this.readonly}
|
|
3699
|
-
tabindex=${
|
|
3699
|
+
tabindex=${_(this.tabIndex)}
|
|
3700
3700
|
@input=${this.onInput}
|
|
3701
|
-
@change=${this.onChange} />`}renderAutoWidthBackground(){return
|
|
3701
|
+
@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}`}},Wn=new WeakSet,ou=function(i){this.type!=="color"&&i.key=="Enter"&&this.submit()},s.UUIInputElement.formAssociated=!0,s.UUIInputElement.styles=[v`
|
|
3702
3702
|
:host {
|
|
3703
3703
|
position: relative;
|
|
3704
3704
|
display: inline-flex;
|
|
@@ -3844,16 +3844,16 @@
|
|
|
3844
3844
|
height: 100%;
|
|
3845
3845
|
--uui-input-border-width: 0;
|
|
3846
3846
|
}
|
|
3847
|
-
`],
|
|
3847
|
+
`],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 Gn=class extends M{static{this.LOCK_CHANGE="lock-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var nv=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,ru=i=>{throw TypeError(i)},br=(i,e,t,r)=>{for(var o=r>1?void 0:r?sv(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},nu=(i,e,t)=>e.has(i)||ru("Cannot "+t),av=(i,e,t)=>(nu(i,e,"read from private field"),t?t.call(i):e.get(i)),lv=(i,e,t)=>e.has(i)?ru("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),uv=(i,e,t,r)=>(nu(i,e,"write to private field"),e.set(i,t),t),vr;s.UUIInputLockElement=class extends s.UUIInputElement{constructor(){super(),lv(this,vr,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){uv(this,vr,e),this.readonly=e,this.tabIndex=e?-1:0}get locked(){return av(this,vr)}connectedCallback(){super.connectedCallback(),k(this,"uui-icon"),k(this,"uui-button")}_onLockToggle(){this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new Gn(Gn.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?h`<uui-icon name="lock" .fallback=${wd.strings[0]}></uui-icon>`:h`<uui-icon
|
|
3848
3848
|
name="unlock"
|
|
3849
|
-
.fallback=${
|
|
3849
|
+
.fallback=${Ud.strings[0]}></uui-icon>`}renderPrepend(){return h`<uui-button
|
|
3850
3850
|
.disabled=${this.disabled}
|
|
3851
3851
|
@click=${this._onLockToggle}
|
|
3852
3852
|
compact
|
|
3853
3853
|
id="lock"
|
|
3854
3854
|
label="${this.locked?this.unlockLabel:this.lockLabel}">
|
|
3855
3855
|
${this.renderIcon()}
|
|
3856
|
-
</uui-button>`}},
|
|
3856
|
+
</uui-button>`}},vr=new WeakMap,s.UUIInputLockElement.styles=[...s.UUIInputElement.styles,v`
|
|
3857
3857
|
#lock {
|
|
3858
3858
|
height: 100%;
|
|
3859
3859
|
|
|
@@ -3866,16 +3866,16 @@
|
|
|
3866
3866
|
cursor: not-allowed;
|
|
3867
3867
|
opacity: 0.55;
|
|
3868
3868
|
}
|
|
3869
|
-
`],
|
|
3869
|
+
`],br([l({type:Boolean,reflect:!0})],s.UUIInputLockElement.prototype,"locked",1),br([l({type:String,reflect:!1,attribute:"unlock-label"})],s.UUIInputLockElement.prototype,"unlockLabel",2),br([l({type:String,reflect:!1,attribute:"lock-label"})],s.UUIInputLockElement.prototype,"lockLabel",2),s.UUIInputLockElement=br([m("uui-input-lock")],s.UUIInputLockElement);var cv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,qn=(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&&cv(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=${$d.strings[0]}></uui-icon>`:h`<uui-icon
|
|
3870
3870
|
name="unsee"
|
|
3871
|
-
.fallback=${
|
|
3871
|
+
.fallback=${Ed.strings[0]}></uui-icon>`}renderAppend(){return h`<uui-button
|
|
3872
3872
|
.disabled=${this.disabled}
|
|
3873
3873
|
@click=${this._onPasswordToggle}
|
|
3874
3874
|
compact
|
|
3875
3875
|
label="${this.passwordType==="password"?"Show password":"Hide password"}"
|
|
3876
3876
|
id="eye">
|
|
3877
3877
|
${this.renderIcon()}
|
|
3878
|
-
</uui-button>`}},
|
|
3878
|
+
</uui-button>`}},s.UUIInputPasswordElement.styles=[...s.UUIInputElement.styles,v`
|
|
3879
3879
|
#eye {
|
|
3880
3880
|
height: 100%;
|
|
3881
3881
|
margin-left: -6px;
|
|
@@ -3884,7 +3884,7 @@
|
|
|
3884
3884
|
#clear:hover {
|
|
3885
3885
|
color: black;
|
|
3886
3886
|
}
|
|
3887
|
-
`],
|
|
3887
|
+
`],qn([w()],s.UUIInputPasswordElement.prototype,"passwordType",2),qn([l()],s.UUIInputPasswordElement.prototype,"type",1),s.UUIInputPasswordElement=qn([m("uui-input-password")],s.UUIInputPasswordElement);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.UUIKeyboardShortcutElement=class extends f{render(){return h`<slot></slot>`}},s.UUIKeyboardShortcutElement.styles=[v`
|
|
3888
3888
|
:host {
|
|
3889
3889
|
display: inline-block;
|
|
3890
3890
|
font-family: inherit;
|
|
@@ -3899,7 +3899,7 @@
|
|
|
3899
3899
|
::slotted(*:last-child)uui-key {
|
|
3900
3900
|
margin-right: 0px;
|
|
3901
3901
|
}
|
|
3902
|
-
`],
|
|
3902
|
+
`],s.UUIKeyboardShortcutElement=dv([m("uui-keyboard-shortcut")],s.UUIKeyboardShortcutElement);var pv=(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
3903
|
:host {
|
|
3904
3904
|
background: var(--uui-color-surface,#fff);
|
|
3905
3905
|
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
@@ -3913,10 +3913,10 @@
|
|
|
3913
3913
|
user-select: none;
|
|
3914
3914
|
text-transform: lowercase;
|
|
3915
3915
|
}
|
|
3916
|
-
`],
|
|
3916
|
+
`],s.UUIKeyElement=pv([m("uui-key")],s.UUIKeyElement);var bv=Object.defineProperty,vv=Object.getOwnPropertyDescriptor,mr=(i,e,t,r)=>{for(var o=r>1?void 0:r?vv(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&&bv(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
3917
|
<slot></slot>
|
|
3918
|
-
${this.required?
|
|
3919
|
-
`}},
|
|
3918
|
+
${this.required?h`<div id="required">*</div>`:""}
|
|
3919
|
+
`}},s.UUILabelElement.styles=[v`
|
|
3920
3920
|
:host {
|
|
3921
3921
|
font-weight: 700;
|
|
3922
3922
|
}
|
|
@@ -3931,8 +3931,8 @@
|
|
|
3931
3931
|
color: var(--uui-color-danger,#c31d4c);
|
|
3932
3932
|
font-weight: 900;
|
|
3933
3933
|
}
|
|
3934
|
-
`],
|
|
3935
|
-
${this.progress?
|
|
3934
|
+
`],mr([l({type:Boolean,reflect:!0})],s.UUILabelElement.prototype,"disabled",2),mr([l({reflect:!0,attribute:!0})],s.UUILabelElement.prototype,"for",2),mr([l({type:Boolean,reflect:!0})],s.UUILabelElement.prototype,"required",2),s.UUILabelElement=mr([m("uui-label")],s.UUILabelElement);var mv=Object.defineProperty,gv=Object.getOwnPropertyDescriptor,Kn=(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&&mv(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=z(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`
|
|
3935
|
+
${this.progress?h`<div
|
|
3936
3936
|
id="bar"
|
|
3937
3937
|
style="max-width: ${this.progress.toString()}%;"></div>`:""}
|
|
3938
3938
|
<div
|
|
@@ -3940,7 +3940,7 @@
|
|
|
3940
3940
|
class=${this.progress?"":"animate"}
|
|
3941
3941
|
style="animation-duration: ${this.animationDuration}s"></div>
|
|
3942
3942
|
<div id="bar-background"></div>
|
|
3943
|
-
`}},
|
|
3943
|
+
`}},s.UUILoaderBarElement.styles=[v`
|
|
3944
3944
|
:host {
|
|
3945
3945
|
position: relative;
|
|
3946
3946
|
display: block;
|
|
@@ -3999,7 +3999,7 @@
|
|
|
3999
3999
|
transform-origin: 175% 0%;
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
`],
|
|
4002
|
+
`],Kn([l({type:Number})],s.UUILoaderBarElement.prototype,"progress",1),Kn([l({type:Number})],s.UUILoaderBarElement.prototype,"animationDuration",1),s.UUILoaderBarElement=Kn([m("uui-loader-bar")],s.UUILoaderBarElement);var fv=Object.defineProperty,yv=Object.getOwnPropertyDescriptor,Xn=(i,e,t,r)=>{for(var o=r>1?void 0:r?yv(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&&fv(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
4003
|
<svg
|
|
4004
4004
|
id="spinner"
|
|
4005
4005
|
class=${this.progress?"":"animate"}
|
|
@@ -4012,11 +4012,11 @@
|
|
|
4012
4012
|
cx="50%"
|
|
4013
4013
|
cy="50%"
|
|
4014
4014
|
r="16"
|
|
4015
|
-
style=${
|
|
4015
|
+
style=${Ve(this._circleStyle())} />
|
|
4016
4016
|
</g>
|
|
4017
4017
|
</svg>
|
|
4018
4018
|
${this.renderProgress()}
|
|
4019
|
-
`}},
|
|
4019
|
+
`}},s.UUILoaderCircleElement.styles=[v`
|
|
4020
4020
|
:host {
|
|
4021
4021
|
vertical-align: middle;
|
|
4022
4022
|
line-height: 0;
|
|
@@ -4101,11 +4101,11 @@
|
|
|
4101
4101
|
/* Center the text */
|
|
4102
4102
|
padding-top: 0.09em;
|
|
4103
4103
|
}
|
|
4104
|
-
`],
|
|
4104
|
+
`],Xn([l({type:Number})],s.UUILoaderCircleElement.prototype,"progress",2),Xn([l({type:Boolean,reflect:!0,attribute:"show-progress"})],s.UUILoaderCircleElement.prototype,"showProgress",2),s.UUILoaderCircleElement=Xn([m("uui-loader-circle")],s.UUILoaderCircleElement);var wv=(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
4105
|
<div></div>
|
|
4106
4106
|
<div></div>
|
|
4107
4107
|
<div></div>
|
|
4108
|
-
`}},
|
|
4108
|
+
`}},s.UUILoaderElement.styles=[v`
|
|
4109
4109
|
:host {
|
|
4110
4110
|
color: var(--uui-color-default,#1b264f);
|
|
4111
4111
|
}
|
|
@@ -4145,49 +4145,49 @@
|
|
|
4145
4145
|
background-color: currentColor;
|
|
4146
4146
|
}
|
|
4147
4147
|
}
|
|
4148
|
-
`],
|
|
4148
|
+
`],s.UUILoaderElement=wv([m("uui-loader")],s.UUILoaderElement);let pi=class extends M{static{this.SHOW_CHILDREN="show-children"}static{this.HIDE_CHILDREN="hide-children"}static{this.CLICK_LABEL="click-label"}};var _v=Object.defineProperty,$v=Object.getOwnPropertyDescriptor,su=i=>{throw TypeError(i)},ue=(i,e,t,r)=>{for(var o=r>1?void 0:r?$v(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&&_v(e,t,o),o},kv=(i,e,t)=>e.has(i)||su("Cannot "+t),Uv=(i,e,t)=>e.has(i)?su("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Yn=(i,e,t)=>(kv(i,e,"access private method"),t),ro,Zn,au;s.UUIMenuItemElement=class extends To(Xt(Vi(Ee("label",f)))){constructor(){super(...arguments),Uv(this,ro),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?pi.HIDE_CHILDREN:pi.SHOW_CHILDREN,t=new pi(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
4149
|
name="icon"
|
|
4150
4150
|
id="icon"
|
|
4151
4151
|
style=${this.iconSlotHasContent?"":"display: none;"}
|
|
4152
4152
|
@slotchange=${this._iconSlotChanged}></slot>
|
|
4153
4153
|
${this.renderLabel()}
|
|
4154
|
-
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?
|
|
4154
|
+
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?h` <span id="label-button" ${er(this._labelButtonChanged)}>
|
|
4155
4155
|
${this._renderLabelInside()}
|
|
4156
|
-
</span>`:
|
|
4156
|
+
</span>`:h` <a
|
|
4157
4157
|
id="label-button"
|
|
4158
|
-
${
|
|
4159
|
-
href=${
|
|
4160
|
-
target=${
|
|
4161
|
-
rel=${
|
|
4162
|
-
@click=${
|
|
4158
|
+
${er(this._labelButtonChanged)}
|
|
4159
|
+
href=${_(this.href)}
|
|
4160
|
+
target=${_(this.target||void 0)}
|
|
4161
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
4162
|
+
@click=${Yn(this,ro,Zn)}
|
|
4163
4163
|
?disabled=${this.disabled}
|
|
4164
4164
|
aria-label="${this.label}">
|
|
4165
4165
|
${this._renderLabelInside()}
|
|
4166
|
-
</a>`}_renderLabelAsButton(){return
|
|
4166
|
+
</a>`}_renderLabelAsButton(){return h` <button
|
|
4167
4167
|
id="label-button"
|
|
4168
|
-
${
|
|
4169
|
-
@click=${
|
|
4168
|
+
${er(this._labelButtonChanged)}
|
|
4169
|
+
@click=${Yn(this,ro,Zn)}
|
|
4170
4170
|
?disabled=${this.disabled}
|
|
4171
4171
|
aria-label="${this.label}">
|
|
4172
4172
|
${this._renderLabelInside()}
|
|
4173
|
-
</button>`}render(){return
|
|
4173
|
+
</button>`}render(){return h`
|
|
4174
4174
|
<div id="menu-item" aria-label="menuitem" role="menuitem">
|
|
4175
4175
|
<div id="label-button-background"></div>
|
|
4176
|
-
${this.hasChildren?
|
|
4176
|
+
${this.hasChildren?h`<button
|
|
4177
4177
|
id="caret-button"
|
|
4178
4178
|
aria-label=${this.caretLabel}
|
|
4179
4179
|
@click=${this._onCaretClicked}>
|
|
4180
|
-
${
|
|
4180
|
+
${Yn(this,ro,au).call(this)}
|
|
4181
4181
|
</button>`:""}
|
|
4182
4182
|
${this.href&&this.selectOnly!==!0&&this.selectable!==!0?this._renderLabelAsAnchor():this._renderLabelAsButton()}
|
|
4183
4183
|
|
|
4184
4184
|
<slot id="actions-container" name="actions"></slot>
|
|
4185
|
-
${this.loading?
|
|
4185
|
+
${this.loading?h`<uui-loader-bar id="loader"></uui-loader-bar>`:""}
|
|
4186
4186
|
</div>
|
|
4187
|
-
${this.showChildren?
|
|
4188
|
-
`}},
|
|
4187
|
+
${this.showChildren?h`<slot></slot>`:""}
|
|
4188
|
+
`}},ro=new WeakSet,Zn=function(){if(this.selectOnly)return;const i=new pi(pi.CLICK_LABEL);this.dispatchEvent(i)},au=function(){if(this.renderExpandSymbol){const i=this.renderExpandSymbol();if(i)return i}return h`<uui-symbol-expand
|
|
4189
4189
|
aria-hidden="true"
|
|
4190
|
-
?open=${this.showChildren}></uui-symbol-expand>`},
|
|
4190
|
+
?open=${this.showChildren}></uui-symbol-expand>`},s.UUIMenuItemElement.styles=[v`
|
|
4191
4191
|
:host {
|
|
4192
4192
|
box-sizing: border-box;
|
|
4193
4193
|
display: block;
|
|
@@ -4589,7 +4589,7 @@
|
|
|
4589
4589
|
opacity: 0;
|
|
4590
4590
|
animation: fadeIn 120ms ease-in 60ms forwards;
|
|
4591
4591
|
}
|
|
4592
|
-
`],
|
|
4592
|
+
`],ue([l({type:Boolean,reflect:!0})],s.UUIMenuItemElement.prototype,"disabled",2),ue([l({type:Boolean,reflect:!0,attribute:"show-children"})],s.UUIMenuItemElement.prototype,"showChildren",2),ue([l({type:Boolean,attribute:"has-children"})],s.UUIMenuItemElement.prototype,"hasChildren",2),ue([l({type:Boolean,attribute:"loading"})],s.UUIMenuItemElement.prototype,"loading",2),ue([l({type:String})],s.UUIMenuItemElement.prototype,"href",2),ue([l({type:String})],s.UUIMenuItemElement.prototype,"target",2),ue([l({type:String})],s.UUIMenuItemElement.prototype,"rel",2),ue([l({type:String,attribute:"select-mode",reflect:!0})],s.UUIMenuItemElement.prototype,"selectMode",2),ue([l({type:String,attribute:"caret-label"})],s.UUIMenuItemElement.prototype,"caretLabel",2),ue([l({attribute:!1})],s.UUIMenuItemElement.prototype,"renderExpandSymbol",2),ue([w()],s.UUIMenuItemElement.prototype,"iconSlotHasContent",2),s.UUIMenuItemElement=ue([m("uui-menu-item")],s.UUIMenuItemElement);var Ev=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,bi=(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};const lu="uui:modal-open",vi="uui:modal-close",uu="uui:modal-close-end";let ce=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(lu,{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(vi,{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(uu)),this.remove()}static{this.styles=[v`
|
|
4593
4593
|
dialog {
|
|
4594
4594
|
display: block;
|
|
4595
4595
|
margin: 0;
|
|
@@ -4617,9 +4617,9 @@
|
|
|
4617
4617
|
:host([index='0']) dialog::after {
|
|
4618
4618
|
opacity: 0;
|
|
4619
4619
|
}
|
|
4620
|
-
`]}};
|
|
4620
|
+
`]}};bi([S("dialog")],ce.prototype,"_dialogElement",2),bi([l({type:Boolean,reflect:!0,attribute:"is-open"})],ce.prototype,"isOpen",2),bi([l({type:Boolean,reflect:!0,attribute:"is-closing"})],ce.prototype,"isClosing",2),bi([l({type:Number,reflect:!0})],ce.prototype,"index",2),bi([l({type:Number,reflect:!0,attribute:"unique-index"})],ce.prototype,"uniqueIndex",2),bi([l({type:Number,attribute:"transition-duration"})],ce.prototype,"transitionDuration",1);var Iv=Object.defineProperty,Cv=Object.getOwnPropertyDescriptor,cu=i=>{throw TypeError(i)},hu=(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)||cu("Cannot "+t),du=(i,e,t)=>(Sv(i,e,"read from private field"),t?t.call(i):e.get(i)),Av=(i,e,t)=>e.has(i)?cu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),gr,Qn;s.UUIModalSidebarElement=class extends ce{constructor(){super(...arguments),Av(this,gr),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-du(this,gr,Qn)+"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",-du(this,gr,Qn)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return h`<dialog>
|
|
4621
4621
|
<slot></slot>
|
|
4622
|
-
</dialog>`}},
|
|
4622
|
+
</dialog>`}},gr=new WeakSet,Qn=function(){return this._dialogElement?.getBoundingClientRect().width??0},s.UUIModalSidebarElement.styles=[...ce.styles,v`
|
|
4623
4623
|
:host {
|
|
4624
4624
|
outline: none;
|
|
4625
4625
|
--uui-modal-sidebar-left-gap: 24px;
|
|
@@ -4661,7 +4661,7 @@
|
|
|
4661
4661
|
:host([size='small']) dialog {
|
|
4662
4662
|
max-width: min(500px, calc(100% - var(--uui-modal-sidebar-left-gap)));
|
|
4663
4663
|
}
|
|
4664
|
-
`],
|
|
4664
|
+
`],hu([l({reflect:!0})],s.UUIModalSidebarElement.prototype,"size",2),s.UUIModalSidebarElement=hu([m("uui-modal-sidebar")],s.UUIModalSidebarElement);var Pv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,pu=i=>{throw TypeError(i)},mi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mv(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&&Pv(e,t,o),o},bu=(i,e,t)=>e.has(i)||pu("Cannot "+t),no=(i,e,t)=>(bu(i,e,"read from private field"),t?t.call(i):e.get(i)),Jn=(i,e,t)=>e.has(i)?pu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),fr=(i,e,t)=>(bu(i,e,"access private method"),t),es,gi,fi,ts,is;s.UUIModalContainerElement=class extends f{constructor(){super(),Jn(this,fi),this.sidebarGap=64,this.transitionDurationMS=250,Jn(this,es,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof ce)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(vi,no(this,gi))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(vi,no(this,gi))),this._sidebars=this._modals.filter(t=>t instanceof s.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}fr(this,fi,ts).call(this),fr(this,fi,is).call(this)}),Jn(this,gi,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(vi,no(this,gi)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}fr(this,fi,ts).call(this),fr(this,fi,is).call(this)}),this.addEventListener(vi,no(this,gi))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return h`<slot @slotchange=${no(this,es)}></slot>`}},es=new WeakMap,gi=new WeakMap,fi=new WeakSet,ts=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})},is=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
4665
|
:host {
|
|
4666
4666
|
position: fixed;
|
|
4667
4667
|
--uui-modal-color-backdrop: rgba(0, 0, 0, 0.5);
|
|
@@ -4678,11 +4678,11 @@
|
|
|
4678
4678
|
:host([backdrop])::after {
|
|
4679
4679
|
opacity: 1;
|
|
4680
4680
|
}
|
|
4681
|
-
`,
|
|
4681
|
+
`,mi([S("slot")],s.UUIModalContainerElement.prototype,"modalSlot",2),mi([w()],s.UUIModalContainerElement.prototype,"_modals",2),mi([w()],s.UUIModalContainerElement.prototype,"_sidebars",2),mi([l({type:Number})],s.UUIModalContainerElement.prototype,"sidebarGap",2),mi([l({type:Number})],s.UUIModalContainerElement.prototype,"transitionDurationMS",2),s.UUIModalContainerElement=mi([m("uui-modal-container")],s.UUIModalContainerElement);var zv=(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 ce{render(){return h`
|
|
4682
4682
|
<dialog>
|
|
4683
4683
|
<slot></slot>
|
|
4684
4684
|
</dialog>
|
|
4685
|
-
`}},
|
|
4685
|
+
`}},s.UUIModalDialogElement.styles=[...ce.styles,v`
|
|
4686
4686
|
:host {
|
|
4687
4687
|
outline: none;
|
|
4688
4688
|
--uui-modal-dialog-background: var(--uui-color-surface,#fff);
|
|
@@ -4706,28 +4706,28 @@
|
|
|
4706
4706
|
:host(:not([index='0'])) dialog {
|
|
4707
4707
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
4708
4708
|
}
|
|
4709
|
-
`],
|
|
4709
|
+
`],s.UUIModalDialogElement=zv([m("uui-modal-dialog")],s.UUIModalDialogElement);let Pt=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Lv=Object.defineProperty,Ov=Object.getOwnPropertyDescriptor,ie=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ov(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&&Lv(e,t,o),o};const Tv=45,os=(i,e,t)=>Math.min(Math.max(i,e),t),Nv=(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)/Tv/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 Nv(os(t,1,this.total),os(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=os(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new Pt(Pt.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new Pt(Pt.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new Pt(Pt.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return h`<uui-button
|
|
4710
4710
|
compact
|
|
4711
4711
|
look="outline"
|
|
4712
4712
|
class="nav"
|
|
4713
4713
|
role="listitem"
|
|
4714
4714
|
label=${this.firstLabel}
|
|
4715
4715
|
?disabled=${this._current===1}
|
|
4716
|
-
@click=${()=>this.goToPage(1)}></uui-button>`}renderPrevious(){return
|
|
4716
|
+
@click=${()=>this.goToPage(1)}></uui-button>`}renderPrevious(){return h`<uui-button
|
|
4717
4717
|
compact
|
|
4718
4718
|
look="outline"
|
|
4719
4719
|
class="nav"
|
|
4720
4720
|
role="listitem"
|
|
4721
4721
|
label=${this.previousLabel}
|
|
4722
4722
|
?disabled=${this._current===1}
|
|
4723
|
-
@click=${this.goToPreviousPage}></uui-button>`}renderNext(){return
|
|
4723
|
+
@click=${this.goToPreviousPage}></uui-button>`}renderNext(){return h`<uui-button
|
|
4724
4724
|
compact
|
|
4725
4725
|
look="outline"
|
|
4726
4726
|
role="listitem"
|
|
4727
4727
|
class="nav"
|
|
4728
4728
|
label=${this.nextLabel}
|
|
4729
4729
|
?disabled=${this._current===this.total}
|
|
4730
|
-
@click=${this.goToNextPage}></uui-button>`}renderLast(){return
|
|
4730
|
+
@click=${this.goToNextPage}></uui-button>`}renderLast(){return h`
|
|
4731
4731
|
<uui-button
|
|
4732
4732
|
compact
|
|
4733
4733
|
look="outline"
|
|
@@ -4736,7 +4736,7 @@
|
|
|
4736
4736
|
label=${this.lastLabel}
|
|
4737
4737
|
?disabled=${this.total===this._current}
|
|
4738
4738
|
@click=${()=>this.goToPage(this.total)}></uui-button>
|
|
4739
|
-
`}renderDots(){return
|
|
4739
|
+
`}renderDots(){return h`<uui-button
|
|
4740
4740
|
compact
|
|
4741
4741
|
look="outline"
|
|
4742
4742
|
role="listitem"
|
|
@@ -4744,7 +4744,7 @@
|
|
|
4744
4744
|
class="dots"
|
|
4745
4745
|
label="More pages"
|
|
4746
4746
|
>...</uui-button
|
|
4747
|
-
> `}renderPage(e){return
|
|
4747
|
+
> `}renderPage(e){return h`<uui-button
|
|
4748
4748
|
compact
|
|
4749
4749
|
look="outline"
|
|
4750
4750
|
role="listitem"
|
|
@@ -4753,14 +4753,14 @@
|
|
|
4753
4753
|
tabindex=${e===this._current?"-1":""}
|
|
4754
4754
|
@click=${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}>
|
|
4755
4755
|
${e}
|
|
4756
|
-
</uui-button>`}renderNavigationLeft(){return
|
|
4757
|
-
${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return
|
|
4758
|
-
${this.renderNext()} ${this.renderLast()}`}render(){return
|
|
4756
|
+
</uui-button>`}renderNavigationLeft(){return h` ${this.renderFirst()} ${this.renderPrevious()}
|
|
4757
|
+
${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return h`${this._visiblePages.includes(this.total)?"":this.renderDots()}
|
|
4758
|
+
${this.renderNext()} ${this.renderLast()}`}render(){return h`<uui-button-group role="list" id="pages">
|
|
4759
4759
|
${this.renderNavigationLeft()}
|
|
4760
4760
|
${this._visiblePages.map(e=>this.renderPage(e))}
|
|
4761
4761
|
${this.renderNavigationRight()}
|
|
4762
4762
|
</uui-button-group>
|
|
4763
|
-
`}},
|
|
4763
|
+
`}},s.UUIPaginationElement.styles=[v`
|
|
4764
4764
|
uui-button-group {
|
|
4765
4765
|
width: 100%;
|
|
4766
4766
|
}
|
|
@@ -4790,15 +4790,15 @@
|
|
|
4790
4790
|
.active {
|
|
4791
4791
|
pointer-events: none;
|
|
4792
4792
|
}
|
|
4793
|
-
`],
|
|
4793
|
+
`],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 vu=class extends M{static{this.CLOSE="close"}};var Bv=Object.defineProperty,Vv=Object.getOwnPropertyDescriptor,so=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vv(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&&Bv(e,t,o),o};function yr(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 vu(vu.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 q0=Math.max(Pi,Mi);let dc=Math.max(Xs,Lr);Lr>Xs&&Lr>this.margin&&(dc+=9999),q0>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=yr(mt,Pi,Mi)}),mt=yr(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=yr(Vt,Pi,Mi)}),Vt=yr(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
4794
|
<slot
|
|
4795
4795
|
id="trigger"
|
|
4796
4796
|
name="trigger"
|
|
4797
4797
|
@slotchange=${this._onTriggerSlotChanged}></slot>
|
|
4798
4798
|
<div id="container">
|
|
4799
|
-
${this._open?
|
|
4799
|
+
${this._open?h`<slot name="popover"></slot>`:""}
|
|
4800
4800
|
</div>
|
|
4801
|
-
`}},
|
|
4801
|
+
`}},s.UUIPopoverElement.styles=[v`
|
|
4802
4802
|
:host {
|
|
4803
4803
|
position: relative;
|
|
4804
4804
|
display: inline-block;
|
|
@@ -4825,7 +4825,7 @@
|
|
|
4825
4825
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
4826
4826
|
);
|
|
4827
4827
|
}
|
|
4828
|
-
`],
|
|
4828
|
+
`],so([S("#container")],s.UUIPopoverElement.prototype,"containerElement",2),so([l({type:Number})],s.UUIPopoverElement.prototype,"margin",2),so([l({type:String,reflect:!0})],s.UUIPopoverElement.prototype,"placement",1),so([l({type:Boolean,reflect:!0})],s.UUIPopoverElement.prototype,"open",1),s.UUIPopoverElement=so([m("uui-popover")],s.UUIPopoverElement);var Dv=Object.defineProperty,jv=Object.getOwnPropertyDescriptor,mu=i=>{throw TypeError(i)},Mt=(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&&Dv(e,t,o),o},rs=(i,e,t)=>e.has(i)||mu("Cannot "+t),L=(i,e,t)=>(rs(i,e,"read from private field"),t?t.call(i):e.get(i)),Fe=(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),ao=(i,e,t,r)=>(rs(i,e,"write to private field"),e.set(i,t),t),nt=(i,e,t)=>(rs(i,e,"access private method"),t),We,st,zt,lo,ns,Ge,uo,ss,Se,as,gu,ls,fu,us;s.UUIPopoverContainerElement=class extends f{constructor(){super(),Fe(this,Se),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Fe(this,We,null),Fe(this,st,[]),Fe(this,zt,null),Fe(this,lo,{width:0,height:0}),Fe(this,ns,e=>{this._open=e.newState==="open",ao(this,We,gd(this,"popovertarget",this.id)),L(this,We)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),this._open?(nt(this,Se,fu).call(this),nt(this,Se,gu).call(this),requestAnimationFrame(()=>{L(this,Ge).call(this)})):nt(this,Se,ls).call(this)}),Fe(this,Ge,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",L(this,uo).call(this,3))}),Fe(this,uo,e=>{if(L(this,ss).call(this),e--,L(this,We)===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=L(this,We).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){nt(this,Se,as).call(this),L(this,uo).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){nt(this,Se,as).call(this),L(this,uo).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"}),Fe(this,ss,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`}),this.addEventListener("beforetoggle",L(this,ns),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,L(this,Ge).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),L(this,zt)||(ao(this,zt,new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,o=t.contentRect.height;r===L(this,lo).width&&o===L(this,lo).height||(ao(this,lo,{width:r,height:o}),L(this,Ge).call(this))})),L(this,zt).observe(this))}disconnectedCallback(){super.disconnectedCallback(),nt(this,Se,ls).call(this),L(this,zt)?.disconnect(),ao(this,zt,null)}_getScrollParents(){return L(this,st)}render(){return h`<slot></slot>`}},We=new WeakMap,st=new WeakMap,zt=new WeakMap,lo=new WeakMap,ns=new WeakMap,Ge=new WeakMap,uo=new WeakMap,ss=new WeakMap,Se=new WeakSet,as=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},gu=function(){L(this,st).forEach(i=>{i.addEventListener("scroll",L(this,Ge),{passive:!0})}),document.addEventListener("scroll",L(this,Ge),{passive:!0})},ls=function(){L(this,st).forEach(i=>{i.removeEventListener("scroll",L(this,Ge))}),document.removeEventListener("scroll",L(this,Ge))},fu=function(){if(ao(this,st,[]),!L(this,We))return;let i=getComputedStyle(L(this,We));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=L(this,We);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=nt(this,Se,us).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&L(this,st).push(r),i.position==="fixed")return;r=nt(this,Se,us).call(this,r)}L(this,st).push(document.body)},us=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},s.UUIPopoverContainerElement.styles=[v`
|
|
4829
4829
|
:host {
|
|
4830
4830
|
margin: 0;
|
|
4831
4831
|
width: fit-content;
|
|
@@ -4838,9 +4838,9 @@
|
|
|
4838
4838
|
overflow: visible;
|
|
4839
4839
|
color: var(--uui-color-text,#060606);
|
|
4840
4840
|
}
|
|
4841
|
-
`],
|
|
4842
|
-
<div id="bar" style=${
|
|
4843
|
-
`}},
|
|
4841
|
+
`],Mt([l({type:Number})],s.UUIPopoverContainerElement.prototype,"margin",2),Mt([l({type:Boolean})],s.UUIPopoverContainerElement.prototype,"open",1),Mt([l({type:String,reflect:!0})],s.UUIPopoverContainerElement.prototype,"placement",1),Mt([w()],s.UUIPopoverContainerElement.prototype,"_placement",2),Mt([w()],s.UUIPopoverContainerElement.prototype,"_open",2),Mt([w()],s.UUIPopoverContainerElement.prototype,"_actualPlacement",2),s.UUIPopoverContainerElement=Mt([m("uui-popover-container")],s.UUIPopoverContainerElement);var Hv=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,yu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rv(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&&Hv(e,t,o),o};const Fv=(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=Fv(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return h`
|
|
4842
|
+
<div id="bar" style=${Ve(this._getProgressStyle())}></div>
|
|
4843
|
+
`}},s.UUIProgressBarElement.styles=[v`
|
|
4844
4844
|
:host {
|
|
4845
4845
|
width: 100%;
|
|
4846
4846
|
height: 4px;
|
|
@@ -4857,7 +4857,7 @@
|
|
|
4857
4857
|
height: 100%;
|
|
4858
4858
|
width: 0%;
|
|
4859
4859
|
}
|
|
4860
|
-
`],
|
|
4860
|
+
`],yu([l({type:Number})],s.UUIProgressBarElement.prototype,"progress",1),s.UUIProgressBarElement=yu([m("uui-progress-bar")],s.UUIProgressBarElement);let co=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Wv=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,wu=i=>{throw TypeError(i)},at=(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},qv=(i,e,t)=>e.has(i)||wu("Cannot "+t),Kv=(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),Xv=(i,e,t)=>(qv(i,e,"access private method"),t),cs,_u;s.UUIRadioElement=class extends f{constructor(){super(...arguments),Kv(this,cs),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
4861
|
<input
|
|
4862
4862
|
id="input"
|
|
4863
4863
|
type="radio"
|
|
@@ -4865,12 +4865,12 @@
|
|
|
4865
4865
|
value=${this.value}
|
|
4866
4866
|
.checked=${this.checked}
|
|
4867
4867
|
.disabled=${this.disabled||this.readonly}
|
|
4868
|
-
@change=${
|
|
4868
|
+
@change=${Xv(this,cs,_u)} />
|
|
4869
4869
|
<div id="button"></div>
|
|
4870
4870
|
<div id="label">
|
|
4871
|
-
${this.label?
|
|
4871
|
+
${this.label?h`<span>${this.label}</span>`:h`<slot></slot>`}
|
|
4872
4872
|
</div>
|
|
4873
|
-
</label>`}},
|
|
4873
|
+
</label>`}},cs=new WeakSet,_u=function(i){i.stopPropagation();const e=this._inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new co(co.CHANGE))},s.UUIRadioElement.styles=[Bo,v`
|
|
4874
4874
|
:host {
|
|
4875
4875
|
display: block;
|
|
4876
4876
|
box-sizing: border-box;
|
|
@@ -4987,7 +4987,7 @@
|
|
|
4987
4987
|
}
|
|
4988
4988
|
|
|
4989
4989
|
:host([disabled]:active) #button {
|
|
4990
|
-
animation: ${
|
|
4990
|
+
animation: ${Vo};
|
|
4991
4991
|
}
|
|
4992
4992
|
|
|
4993
4993
|
@media (prefers-reduced-motion) {
|
|
@@ -4999,7 +4999,7 @@
|
|
|
4999
4999
|
transition: none;
|
|
5000
5000
|
}
|
|
5001
5001
|
}
|
|
5002
|
-
`],
|
|
5002
|
+
`],at([S("#input")],s.UUIRadioElement.prototype,"_inputElement",2),at([l({type:String})],s.UUIRadioElement.prototype,"name",2),at([l({type:String})],s.UUIRadioElement.prototype,"value",2),at([l({type:String})],s.UUIRadioElement.prototype,"label",2),at([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"checked",2),at([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"disabled",2),at([l({type:Boolean,reflect:!0})],s.UUIRadioElement.prototype,"readonly",2),s.UUIRadioElement=at([m("uui-radio")],s.UUIRadioElement);let hs=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Yv=Object.defineProperty,Zv=Object.getOwnPropertyDescriptor,$u=i=>{throw TypeError(i)},ds=(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&&Yv(e,t,o),o},ps=(i,e,t)=>e.has(i)||$u("Cannot "+t),U=(i,e,t)=>(ps(i,e,"read from private field"),t?t.call(i):e.get(i)),lt=(i,e,t)=>e.has(i)?$u("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),wr=(i,e,t,r)=>(ps(i,e,"write to private field"),e.set(i,t),t),j=(i,e,t)=>(ps(i,e,"access private method"),t),H,T,bs,vs,_r,$r,ms,B,ku,gs,fs,ys,ws,Lt,Uu,Eu,ho;const Qv="ArrowLeft",Jv="ArrowUp",em="ArrowRight",tm="ArrowDown",im=" ",om="Enter";s.UUIRadioGroupElement=class extends xe(f,""){constructor(){super(),lt(this,B),this.disabled=!1,this.readonly=!1,lt(this,H,null),lt(this,T,[]),lt(this,bs,e=>{U(this,T)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),lt(this,vs,e=>{this.contains(e.relatedTarget)||U(this,H)===null&&U(this,T)?.forEach(t=>{t.makeFocusable()})}),lt(this,_r,()=>{this.pristine=!1}),lt(this,$r,e=>{e.target.checked===!0&&(this.value=e.target.value,j(this,B,ho).call(this))}),lt(this,ms,e=>{switch(e.key){case Qv:case Jv:{e.preventDefault(),j(this,B,Uu).call(this);break}case em:case tm:{e.preventDefault(),j(this,B,Eu).call(this);break}case im:{U(this,H)===null&&(this.value=j(this,B,Lt).call(this,1,!1)?.value,j(this,B,ho).call(this));break}case om:this.submit()}}),this.addEventListener("keydown",U(this,ms)),this.addEventListener("focusin",U(this,bs)),this.addEventListener("focusout",U(this,vs)),this.updateComplete.then(()=>{j(this,B,fs).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,j(this,B,fs).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&j(this,B,ys).call(this,this.disabled),e.has("readonly")&&j(this,B,ws).call(this,this.readonly),e.has("name")&&j(this,B,gs).call(this,e.get("name"))}async focus(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.focus():j(this,B,Lt).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.blur():j(this,B,Lt).call(this,1,!1)?.blur()}async click(){await this.updateComplete,U(this,H)!==null?U(this,T)[U(this,H)]?.click():j(this,B,Lt).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,ku)}></slot> `}},H=new WeakMap,T=new WeakMap,bs=new WeakMap,vs=new WeakMap,_r=new WeakMap,$r=new WeakMap,ms=new WeakMap,B=new WeakSet,ku=function(i){if(i.stopPropagation(),U(this,T)?.forEach(t=>{t.removeEventListener(co.CHANGE,U(this,$r)),t.removeEventListener("blur",U(this,_r))}),wr(this,H,null),wr(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(co.CHANGE,U(this,$r)),t.addEventListener("blur",U(this,_r))}),j(this,B,gs).call(this,this.name),this.disabled&&j(this,B,ys).call(this,!0),this.readonly&&j(this,B,ws).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,wr(this,H,U(this,T).indexOf(t))}},gs=function(i){U(this,T)?.forEach(e=>e.name=i)},fs=function(i){const e=[];U(this,T).forEach((t,r)=>{t.value===i?(t.checked=!0,t.makeFocusable(),wr(this,H,r)):(t.checked=!1,e.push(t))}),U(this,H)!==null&&e.forEach(t=>t.makeUnfocusable())},ys=function(i){U(this,T)?.forEach(e=>e.disabled=i)},ws=function(i){U(this,T)?.forEach(e=>e.readonly=i)},Lt=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},Uu=function(){this.value=j(this,B,Lt).call(this,-1)?.value??"",U(this,T)[U(this,H)??0]?.focus(),j(this,B,ho).call(this)},Eu=function(){this.value=j(this,B,Lt).call(this)?.value??"",U(this,T)[U(this,H)??0]?.focus(),j(this,B,ho).call(this)},ho=function(){this.pristine=!1,this.dispatchEvent(new hs(hs.CHANGE))},s.UUIRadioGroupElement.formAssociated=!0,s.UUIRadioGroupElement.styles=[v`
|
|
5003
5003
|
:host {
|
|
5004
5004
|
display: inline-block;
|
|
5005
5005
|
padding-right: 3px;
|
|
@@ -5016,7 +5016,7 @@
|
|
|
5016
5016
|
71
|
|
5017
5017
|
));
|
|
5018
5018
|
}
|
|
5019
|
-
`],
|
|
5019
|
+
`],ds([l({type:Boolean,reflect:!0})],s.UUIRadioGroupElement.prototype,"disabled",2),ds([l({type:Boolean,reflect:!0})],s.UUIRadioGroupElement.prototype,"readonly",2),s.UUIRadioGroupElement=ds([m("uui-radio-group")],s.UUIRadioGroupElement);let ut=class extends M{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var rm=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,xu=i=>{throw TypeError(i)},V=(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},Iu=(i,e,t)=>e.has(i)||xu("Cannot "+t),sm=(i,e,t)=>(Iu(i,e,"read from private field"),t?t.call(i):e.get(i)),Cu=(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),yi=(i,e,t)=>(Iu(i,e,"access private method"),t),ct,Ot,_s;const $s={TOP:3,CENTER:2},po=18,wi=3,qe=12,am=24,ks=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};s.UUIRangeSliderElement=class extends xe(f,""){constructor(){super(),Cu(this,ct),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,Cu(this,_s,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",sm(this,_s)),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,yi(this,ct,Ot).call(this)}get max(){return this._max}set max(e){this._max=e,yi(this,ct,Ot).call(this)}get step(){return this._step}set step(e){this._step=e,yi(this,ct,Ot).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,yi(this,ct,Ot).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,yi(this,ct,Ot).call(this)}get value(){return super.value}set value(e){super.value=e,yi(this,ct,Ot).call(this)}setValueLow(e){e=z(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=z(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=z(e,this.min,this.max-o),t=z(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=z(o,0,100),this._highValuePercentEnd=z(n,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-qe)/(this._trackWidth-qe*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+qe*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 ut(ut.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 ut(ut.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 ut(ut.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 ut(ut.CHANGE))}render(){return h`
|
|
5020
5020
|
<div id="range-slider">
|
|
5021
5021
|
${this._renderNativeInputs()}
|
|
5022
5022
|
<div id="inner-track">
|
|
@@ -5030,26 +5030,26 @@
|
|
|
5030
5030
|
${this._renderSteps()}
|
|
5031
5031
|
</div>
|
|
5032
5032
|
</div>
|
|
5033
|
-
`}_renderThumbValues(){return
|
|
5033
|
+
`}_renderThumbValues(){return h`<div class="thumb-values">
|
|
5034
5034
|
<span
|
|
5035
5035
|
><span
|
|
5036
|
-
>${this._lowInputValue.toFixed(
|
|
5036
|
+
>${this._lowInputValue.toFixed(ks(this._step))}</span
|
|
5037
5037
|
></span
|
|
5038
5038
|
>
|
|
5039
5039
|
<span
|
|
5040
5040
|
><span
|
|
5041
|
-
>${this._highInputValue.toFixed(
|
|
5041
|
+
>${this._highInputValue.toFixed(ks(this._step))}</span
|
|
5042
5042
|
></span
|
|
5043
5043
|
>
|
|
5044
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-
|
|
5044
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-qe*2)/e;if(t<am||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
5045
|
<svg height="100%" width="100%">
|
|
5046
|
-
<rect x="9" y="9" height="${
|
|
5046
|
+
<rect x="9" y="9" height="${wi}" rx="2" />
|
|
5047
5047
|
${this._renderStepCircles(o)}
|
|
5048
5048
|
</svg>
|
|
5049
5049
|
${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
|
|
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(ks(this._step)));return h`<div class="step-values">
|
|
5051
|
+
${r.map(o=>h`<span><span>${o}</span></span>`)}
|
|
5052
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return p`${e.map(r=>{const o=r+qe,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="${wi*2}" r="4.5" />`:p`<circle class="track-step regular" cx="${o}" cy="${wi*2}" r="4.5" />`})}`}_renderNativeInputs(){return h` <div class="native-wrapper">
|
|
5053
5053
|
<input
|
|
5054
5054
|
id="inputLow"
|
|
5055
5055
|
class="${this._movement?"focus":""}"
|
|
@@ -5074,7 +5074,7 @@
|
|
|
5074
5074
|
?disabled="${this.disabled||this.readonly}"
|
|
5075
5075
|
@input=${this._onHighInput}
|
|
5076
5076
|
@change=${this._onHighChange} />
|
|
5077
|
-
</div>`}},
|
|
5077
|
+
</div>`}},ct=new WeakSet,Ot=function(){const i=this.value.split(",");let e=Number(i[0])||0,t=Number(i[1])||0;t=z(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=z(e,this._min,this._minGap?t-this._minGap:t-this._step),this._highInputValue=z(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()},_s=new WeakMap,s.UUIRangeSliderElement.formAssociated=!0,s.UUIRangeSliderElement.styles=[v`
|
|
5078
5078
|
:host {
|
|
5079
5079
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
5080
5080
|
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
@@ -5110,8 +5110,8 @@
|
|
|
5110
5110
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5111
5111
|
position: absolute;
|
|
5112
5112
|
height: 3px;
|
|
5113
|
-
left: ${
|
|
5114
|
-
right: ${
|
|
5113
|
+
left: ${qe}px; /* Match TRACK_MARGIN */
|
|
5114
|
+
right: ${qe}px; /* Match TRACK_MARGIN */
|
|
5115
5115
|
}
|
|
5116
5116
|
|
|
5117
5117
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -5125,10 +5125,10 @@
|
|
|
5125
5125
|
display: flex;
|
|
5126
5126
|
flex-direction: column;
|
|
5127
5127
|
justify-content: center;
|
|
5128
|
-
height: ${
|
|
5128
|
+
height: ${po}px;
|
|
5129
5129
|
cursor: grab;
|
|
5130
5130
|
user-select: none;
|
|
5131
|
-
z-index: ${
|
|
5131
|
+
z-index: ${$s.CENTER};
|
|
5132
5132
|
}
|
|
5133
5133
|
|
|
5134
5134
|
:host([disabled]) #inner-color-thumb,
|
|
@@ -5152,16 +5152,16 @@
|
|
|
5152
5152
|
}
|
|
5153
5153
|
|
|
5154
5154
|
:host(:not([readonly])) #inner-color-thumb:hover .color {
|
|
5155
|
-
height: ${
|
|
5155
|
+
height: ${wi*2}px;
|
|
5156
5156
|
background-color: var(--color-hover);
|
|
5157
|
-
transform: translateY(-${
|
|
5157
|
+
transform: translateY(-${wi/2}px);
|
|
5158
5158
|
}
|
|
5159
5159
|
|
|
5160
5160
|
.color {
|
|
5161
5161
|
user-select: none;
|
|
5162
5162
|
position: absolute;
|
|
5163
5163
|
inset-inline: 0;
|
|
5164
|
-
height: ${
|
|
5164
|
+
height: ${wi}px;
|
|
5165
5165
|
top: 50%;
|
|
5166
5166
|
transform: translateY(0);
|
|
5167
5167
|
background-color: var(--color-interactive);
|
|
@@ -5186,7 +5186,7 @@
|
|
|
5186
5186
|
|
|
5187
5187
|
/** Steps */
|
|
5188
5188
|
.step-wrapper {
|
|
5189
|
-
margin: 0 ${-1*
|
|
5189
|
+
margin: 0 ${-1*qe}px;
|
|
5190
5190
|
height: 11px;
|
|
5191
5191
|
position: absolute;
|
|
5192
5192
|
left: 0;
|
|
@@ -5229,7 +5229,7 @@
|
|
|
5229
5229
|
|
|
5230
5230
|
.step-values {
|
|
5231
5231
|
box-sizing: border-box;
|
|
5232
|
-
margin: 0 ${
|
|
5232
|
+
margin: 0 ${qe}px; /* Match TRACK_MARGIN */
|
|
5233
5233
|
display: flex;
|
|
5234
5234
|
justify-content: space-between;
|
|
5235
5235
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -5311,9 +5311,9 @@
|
|
|
5311
5311
|
pointer-events: all;
|
|
5312
5312
|
cursor: grab;
|
|
5313
5313
|
position: relative;
|
|
5314
|
-
z-index: ${
|
|
5315
|
-
width: ${
|
|
5316
|
-
height: ${
|
|
5314
|
+
z-index: ${$s.TOP};
|
|
5315
|
+
width: ${po}px;
|
|
5316
|
+
height: ${po}px;
|
|
5317
5317
|
border-radius: 24px;
|
|
5318
5318
|
border: none;
|
|
5319
5319
|
background-color: var(--color-interactive);
|
|
@@ -5357,9 +5357,9 @@
|
|
|
5357
5357
|
pointer-events: all;
|
|
5358
5358
|
cursor: grab;
|
|
5359
5359
|
position: relative;
|
|
5360
|
-
z-index: ${
|
|
5361
|
-
width: ${
|
|
5362
|
-
height: ${
|
|
5360
|
+
z-index: ${$s.TOP};
|
|
5361
|
+
width: ${po}px;
|
|
5362
|
+
height: ${po}px;
|
|
5363
5363
|
border-radius: 24px;
|
|
5364
5364
|
border: none;
|
|
5365
5365
|
background-color: var(--color-interactive);
|
|
@@ -5394,7 +5394,7 @@
|
|
|
5394
5394
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
5395
5395
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
5396
5396
|
}
|
|
5397
|
-
`],
|
|
5397
|
+
`],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 lm=(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
5398
|
:host {
|
|
5399
5399
|
display: block;
|
|
5400
5400
|
}
|
|
@@ -5410,7 +5410,7 @@
|
|
|
5410
5410
|
right: 0;
|
|
5411
5411
|
border-top: 1px solid var(--uui-color-border,#d8d7d9);
|
|
5412
5412
|
}
|
|
5413
|
-
`],
|
|
5413
|
+
`],s.UUIRefListElement=lm([m("uui-ref-list")],s.UUIRefListElement);let bo=class extends M{static{this.OPEN="open"}};var um=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,kr=(i,e,t,r)=>{for(var o=r>1?void 0:r?cm(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&&um(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 bo(bo.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new bo(bo.OPEN)))}},s.UUIRefElement.styles=[v`
|
|
5414
5414
|
:host {
|
|
5415
5415
|
position: relative;
|
|
5416
5416
|
display: flex;
|
|
@@ -5587,7 +5587,7 @@
|
|
|
5587
5587
|
justify-content: flex-end;
|
|
5588
5588
|
align-items: center;
|
|
5589
5589
|
}
|
|
5590
|
-
`],
|
|
5590
|
+
`],kr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"disabled",2),kr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"readonly",2),kr([l({type:Boolean,reflect:!0})],s.UUIRefElement.prototype,"error",2),s.UUIRefElement=kr([m("uui-ref")],s.UUIRefElement);var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Su=i=>{throw TypeError(i)},ht=(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},pm=(i,e,t)=>e.has(i)||Su("Cannot "+t),bm=(i,e,t)=>e.has(i)?Su("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),dt=(i,e,t)=>(pm(i,e,"access private method"),t),Ae,Au,Pu,Ur,Mu,zu,Lu;s.UUIRefNodeElement=class extends s.UUIRefElement{constructor(){super(...arguments),bm(this,Ae),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
5591
5591
|
xmlns="http://www.w3.org/2000/svg"
|
|
5592
5592
|
viewBox="0 0 24 24"
|
|
5593
5593
|
fill="none"
|
|
@@ -5598,36 +5598,36 @@
|
|
|
5598
5598
|
id="icon">
|
|
5599
5599
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
5600
5600
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
5601
|
-
</svg>`}connectedCallback(){super.connectedCallback(),
|
|
5601
|
+
</svg>`}connectedCallback(){super.connectedCallback(),k(this,"uui-icon")}async focus(){await this.updateComplete,this._openPart?.focus()}renderDetail(){return h`<small id="detail"
|
|
5602
5602
|
>${this.detail}<slot name="detail"></slot
|
|
5603
|
-
></small>`}render(){return
|
|
5604
|
-
${
|
|
5603
|
+
></small>`}render(){return h`
|
|
5604
|
+
${dt(this,Ae,Lu).call(this)}
|
|
5605
5605
|
<!-- Select border must be right after #open-part -->
|
|
5606
5606
|
<div id="select-border"></div>
|
|
5607
5607
|
|
|
5608
5608
|
<slot></slot>
|
|
5609
5609
|
<slot name="tag" id="tag-container"></slot>
|
|
5610
5610
|
<slot name="actions" id="actions-container"></slot>
|
|
5611
|
-
`}}
|
|
5611
|
+
`}},Ae=new WeakSet,Au=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},Pu=function(){return h`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Ur=function(){return h`
|
|
5612
5612
|
<span id="content" class="uui-text">
|
|
5613
5613
|
<span id="icon">
|
|
5614
|
-
<slot name="icon" @slotchange=${
|
|
5615
|
-
${this._iconSlotHasContent===!1?
|
|
5614
|
+
<slot name="icon" @slotchange=${dt(this,Ae,Au)}></slot>
|
|
5615
|
+
${this._iconSlotHasContent===!1?dt(this,Ae,Pu).call(this):""}
|
|
5616
5616
|
</span>
|
|
5617
5617
|
<div id="info">
|
|
5618
5618
|
<div id="name">${this.name}<slot name="name"></slot></div>
|
|
5619
5619
|
${this.renderDetail()}
|
|
5620
5620
|
</div>
|
|
5621
5621
|
</span>
|
|
5622
|
-
`},
|
|
5622
|
+
`},Mu=function(){return h`<a
|
|
5623
5623
|
id="open-part"
|
|
5624
5624
|
class="uui-text"
|
|
5625
|
-
tabindex=${this.disabled?
|
|
5626
|
-
href=${
|
|
5627
|
-
target=${
|
|
5628
|
-
rel=${
|
|
5629
|
-
${
|
|
5630
|
-
</a>`},
|
|
5625
|
+
tabindex=${this.disabled?C:"0"}
|
|
5626
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
5627
|
+
target=${_(this.target||void 0)}
|
|
5628
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
5629
|
+
${dt(this,Ae,Ur).call(this)}
|
|
5630
|
+
</a>`},zu=function(){return h`
|
|
5631
5631
|
<button
|
|
5632
5632
|
type="button"
|
|
5633
5633
|
id="open-part"
|
|
@@ -5636,9 +5636,9 @@
|
|
|
5636
5636
|
@click=${this.handleOpenClick}
|
|
5637
5637
|
@keydown=${this.handleOpenKeydown}
|
|
5638
5638
|
?disabled=${this.disabled}>
|
|
5639
|
-
${
|
|
5639
|
+
${dt(this,Ae,Ur).call(this)}
|
|
5640
5640
|
</button>
|
|
5641
|
-
`},
|
|
5641
|
+
`},Lu=function(){return this.readonly?h`${dt(this,Ae,Ur).call(this)}`:this.href?dt(this,Ae,Mu).call(this):dt(this,Ae,zu).call(this)},s.UUIRefNodeElement.styles=[...s.UUIRefElement.styles,v`
|
|
5642
5642
|
:host {
|
|
5643
5643
|
min-width: 250px;
|
|
5644
5644
|
padding: 1px;
|
|
@@ -5725,17 +5725,17 @@
|
|
|
5725
5725
|
:host([disabled]) #detail {
|
|
5726
5726
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5727
5727
|
}
|
|
5728
|
-
`],
|
|
5728
|
+
`],ht([l({type:String})],s.UUIRefNodeElement.prototype,"name",2),ht([l({type:String})],s.UUIRefNodeElement.prototype,"detail",2),ht([l({type:String})],s.UUIRefNodeElement.prototype,"href",2),ht([l({type:String})],s.UUIRefNodeElement.prototype,"target",2),ht([l({type:String})],s.UUIRefNodeElement.prototype,"rel",2),ht([S("#open-part")],s.UUIRefNodeElement.prototype,"_openPart",2),ht([w()],s.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),s.UUIRefNodeElement=ht([m("uui-ref-node")],s.UUIRefNodeElement);var vm=Object.defineProperty,mm=Object.getOwnPropertyDescriptor,Ou=(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};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
5729
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5730
|
-
></small>`}},
|
|
5730
|
+
></small>`}},s.UUIRefNodeDataTypeElement.styles=[...s.UUIRefNodeElement.styles],Ou([l({type:String})],s.UUIRefNodeDataTypeElement.prototype,"alias",2),s.UUIRefNodeDataTypeElement=Ou([m("uui-ref-node-data-type")],s.UUIRefNodeDataTypeElement);var gm=Object.defineProperty,fm=Object.getOwnPropertyDescriptor,Tu=(i,e,t,r)=>{for(var o=r>1?void 0:r?fm(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&&gm(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
5731
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5732
|
-
></small>`}},
|
|
5732
|
+
></small>`}},s.UUIRefNodeDocumentTypeElement.styles=[...s.UUIRefNodeElement.styles],Tu([l({type:String})],s.UUIRefNodeDocumentTypeElement.prototype,"alias",2),s.UUIRefNodeDocumentTypeElement=Tu([m("uui-ref-node-document-type")],s.UUIRefNodeDocumentTypeElement);var ym=(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=ym([m("uui-ref-node-form")],s.UUIRefNodeFormElement);var wm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,Nu=(i,e,t,r)=>{for(var o=r>1?void 0:r?_m(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&&wm(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
5733
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5734
|
-
></small>`}},
|
|
5734
|
+
></small>`}},s.UUIRefNodeMemberElement.styles=[...s.UUIRefNodeElement.styles],Nu([l({type:String,attribute:"group-name"})],s.UUIRefNodeMemberElement.prototype,"groupName",2),s.UUIRefNodeMemberElement=Nu([m("uui-ref-node-member")],s.UUIRefNodeMemberElement);var $m=Object.defineProperty,km=Object.getOwnPropertyDescriptor,Us=(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&&$m(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
5735
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5736
|
-
></small>`}},
|
|
5736
|
+
></small>`}},s.UUIRefNodePackageElement.styles=[...s.UUIRefNodeElement.styles],Us([l({type:String})],s.UUIRefNodePackageElement.prototype,"version",2),Us([l({type:String})],s.UUIRefNodePackageElement.prototype,"author",2),s.UUIRefNodePackageElement=Us([m("uui-ref-node-package")],s.UUIRefNodePackageElement);var Um=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,Bu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Em(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&&Um(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
5737
|
>${e.join(" | ")}<slot name="detail"></slot
|
|
5738
|
-
></small>`}},
|
|
5738
|
+
></small>`}},s.UUIRefNodeUserElement.styles=[...s.UUIRefNodeElement.styles],Bu([l({type:String,attribute:"group-name"})],s.UUIRefNodeUserElement.prototype,"groupName",2),s.UUIRefNodeUserElement=Bu([m("uui-ref-node-user")],s.UUIRefNodeUserElement);var xm=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,Vu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Im(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.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
5739
|
:host {
|
|
5740
5740
|
display: block;
|
|
5741
5741
|
scrollbar-width: thin;
|
|
@@ -5761,18 +5761,18 @@
|
|
|
5761
5761
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
5762
5762
|
border-radius: 3px;
|
|
5763
5763
|
}
|
|
5764
|
-
`],
|
|
5764
|
+
`],Vu([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],s.UUIScrollContainerElement.prototype,"enforceScroll",2),s.UUIScrollContainerElement=Vu([m("uui-scroll-container")],s.UUIScrollContainerElement);let Es=class extends M{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Cm=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,_e=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sm(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&&Cm(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 Es(Es.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,r,o){return h`<option
|
|
5765
5765
|
value="${t}"
|
|
5766
5766
|
?selected=${r}
|
|
5767
5767
|
?disabled=${o}>
|
|
5768
5768
|
${e}
|
|
5769
|
-
</option>`}_renderGrouped(){return this._groups.length===0?
|
|
5770
|
-
${this._groups.map(e=>
|
|
5769
|
+
</option>`}_renderGrouped(){return this._groups.length===0?C:h`
|
|
5770
|
+
${this._groups.map(e=>h`<optgroup
|
|
5771
5771
|
label=${e}
|
|
5772
5772
|
?disabled=${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}>
|
|
5773
5773
|
${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}
|
|
5774
5774
|
</optgroup>`)}
|
|
5775
|
-
`}_getDisplayValue(){return this.options.find(e=>e.value===this.value)?.name||this.value}render(){return this.readonly?
|
|
5775
|
+
`}_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
5776
|
id="native"
|
|
5777
5777
|
aria-label=${this.label}
|
|
5778
5778
|
@change=${this.setValue}
|
|
@@ -5782,7 +5782,7 @@
|
|
|
5782
5782
|
<option disabled selected value="" hidden>${this.placeholder}</option>
|
|
5783
5783
|
${this._renderGrouped()}
|
|
5784
5784
|
${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}
|
|
5785
|
-
</select>`}},
|
|
5785
|
+
</select>`}},s.UUISelectElement.styles=[v`
|
|
5786
5786
|
:host {
|
|
5787
5787
|
display: inline-block;
|
|
5788
5788
|
position: relative;
|
|
@@ -5860,7 +5860,7 @@
|
|
|
5860
5860
|
71
|
|
5861
5861
|
));
|
|
5862
5862
|
}
|
|
5863
|
-
`],
|
|
5863
|
+
`],_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 Am=v`
|
|
5864
5864
|
input[type='range'] {
|
|
5865
5865
|
left: 0;
|
|
5866
5866
|
position: absolute;
|
|
@@ -5967,15 +5967,15 @@
|
|
|
5967
5967
|
input[type='range']:focus::-ms-fill-upper {
|
|
5968
5968
|
background: transparent;
|
|
5969
5969
|
}
|
|
5970
|
-
`;let
|
|
5971
|
-
${this._steps.map(e=>{if(this._stepWidth>=
|
|
5972
|
-
`}renderStepValues(){return this.hideStepValues?
|
|
5973
|
-
${this._steps.map(e=>
|
|
5970
|
+
`;let vo=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,Du=i=>{throw TypeError(i)},Z=(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},xs=(i,e,t)=>e.has(i)||Du("Cannot "+t),ju=(i,e,t)=>(xs(i,e,"read from private field"),t?t.call(i):e.get(i)),Is=(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),Hu=(i,e,t,r)=>(xs(i,e,"write to private field"),e.set(i,t),t),zm=(i,e,t)=>(xs(i,e,"access private method"),t),Er,xr,Cs,Ru;const mo=12,Fu=24,Lm=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t),Om=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};s.UUISliderElement=class extends xe(f,""){constructor(){super(),Is(this,Cs),Is(this,Er,0),this.hideStepValues=!1,this.hideValueLabel=!1,this.min=0,this.max=100,Is(this,xr,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",zm(this,Cs,Ru))}get step(){return ju(this,xr)}set step(e){Hu(this,xr,e),Hu(this,Er,(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(ju(this,Er)).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=Lm(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-mo*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 vo(vo.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new vo(vo.CHANGE))}renderTrackSteps(){return p`
|
|
5971
|
+
${this._steps.map(e=>{if(this._stepWidth>=Fu){const t=Math.round(mo+this._stepWidth*this._steps.indexOf(e));return p`<circle class="track-step" cx="${t}" cy="50%" r="4.5" />`}return p``})}
|
|
5972
|
+
`}renderStepValues(){return this.hideStepValues?C:h`<div id="step-values">
|
|
5973
|
+
${this._steps.map(e=>h` <span
|
|
5974
5974
|
><span>
|
|
5975
|
-
${this._steps.length<=20&&this._stepWidth>=
|
|
5975
|
+
${this._steps.length<=20&&this._stepWidth>=Fu?e.toFixed(Om(this.step)):C}
|
|
5976
5976
|
</span></span
|
|
5977
5977
|
>`)}
|
|
5978
|
-
</div>`}render(){return
|
|
5978
|
+
</div>`}render(){return h`
|
|
5979
5979
|
<input
|
|
5980
5980
|
id="input"
|
|
5981
5981
|
type="range"
|
|
@@ -5995,13 +5995,13 @@
|
|
|
5995
5995
|
</svg>
|
|
5996
5996
|
|
|
5997
5997
|
<div id="track-inner" aria-hidden="true">
|
|
5998
|
-
<div id="thumb" style=${
|
|
5999
|
-
${this.hideValueLabel?null:
|
|
5998
|
+
<div id="thumb" style=${Ve({left:this._sliderPosition})}>
|
|
5999
|
+
${this.hideValueLabel?null:h`<div id="thumb-label">${this.value}</div>`}
|
|
6000
6000
|
</div>
|
|
6001
6001
|
</div>
|
|
6002
6002
|
</div>
|
|
6003
6003
|
${this.renderStepValues()}
|
|
6004
|
-
`}},
|
|
6004
|
+
`}},Er=new WeakMap,xr=new WeakMap,Cs=new WeakSet,Ru=function(i){i.key=="Enter"&&this.submit()},s.UUISliderElement.formAssociated=!0,s.UUISliderElement.styles=[cd,Am,v`
|
|
6005
6005
|
:host {
|
|
6006
6006
|
display: inline-block;
|
|
6007
6007
|
width: 100%;
|
|
@@ -6050,8 +6050,8 @@
|
|
|
6050
6050
|
|
|
6051
6051
|
#track-inner {
|
|
6052
6052
|
position: absolute;
|
|
6053
|
-
left: ${
|
|
6054
|
-
right: ${
|
|
6053
|
+
left: ${mo}px; /* Match TRACK_MARGIN */
|
|
6054
|
+
right: ${mo}px; /* Match TRACK_MARGIN */
|
|
6055
6055
|
}
|
|
6056
6056
|
|
|
6057
6057
|
#thumb {
|
|
@@ -6113,7 +6113,7 @@
|
|
|
6113
6113
|
}
|
|
6114
6114
|
|
|
6115
6115
|
#step-values {
|
|
6116
|
-
margin: 0 ${
|
|
6116
|
+
margin: 0 ${mo}px; /* Match TRACK_MARGIN */
|
|
6117
6117
|
margin-top: 6px;
|
|
6118
6118
|
display: flex;
|
|
6119
6119
|
align-items: flex-end;
|
|
@@ -6162,7 +6162,7 @@
|
|
|
6162
6162
|
:host([readonly]) #thumb-label {
|
|
6163
6163
|
opacity: 1;
|
|
6164
6164
|
}
|
|
6165
|
-
`],
|
|
6165
|
+
`],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 Tm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,Wu=(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.UUISymbolExpandElement=class extends f{constructor(){super(...arguments),this.open=!1}render(){return h`<svg
|
|
6166
6166
|
xmlns="http://www.w3.org/2000/svg"
|
|
6167
6167
|
viewBox="0 0 24 24"
|
|
6168
6168
|
fill="none"
|
|
@@ -6171,7 +6171,7 @@
|
|
|
6171
6171
|
stroke-linecap="round"
|
|
6172
6172
|
stroke-linejoin="round">
|
|
6173
6173
|
<path d="m4 9 8 8 8-8"></path>
|
|
6174
|
-
</svg>`}},
|
|
6174
|
+
</svg>`}},s.UUISymbolExpandElement.styles=[v`
|
|
6175
6175
|
:host {
|
|
6176
6176
|
display: inline-flex;
|
|
6177
6177
|
width: 12px;
|
|
@@ -6189,9 +6189,9 @@
|
|
|
6189
6189
|
:host([open]) svg {
|
|
6190
6190
|
transform: rotate(0deg);
|
|
6191
6191
|
}
|
|
6192
|
-
`],
|
|
6192
|
+
`],Wu([l({type:Boolean,reflect:!0})],s.UUISymbolExpandElement.prototype,"open",2),s.UUISymbolExpandElement=Wu([m("uui-symbol-expand")],s.UUISymbolExpandElement);var Bm=Object.defineProperty,Vm=Object.getOwnPropertyDescriptor,Ss=(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};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
6193
|
name="picture"
|
|
6194
|
-
.fallback=${
|
|
6194
|
+
.fallback=${_d.strings[0]}></uui-icon>`}},s.UUISymbolFileThumbnailElement.styles=[v`
|
|
6195
6195
|
:host {
|
|
6196
6196
|
display: block;
|
|
6197
6197
|
width: 100%;
|
|
@@ -6214,7 +6214,7 @@
|
|
|
6214
6214
|
color: var(--uui-color-surface,#fff);
|
|
6215
6215
|
background: var(--uui-color-surface-alt,#f3f3f5);
|
|
6216
6216
|
}
|
|
6217
|
-
`],
|
|
6217
|
+
`],Ss([l({type:String})],s.UUISymbolFileThumbnailElement.prototype,"src",2),Ss([l({type:String})],s.UUISymbolFileThumbnailElement.prototype,"alt",2),s.UUISymbolFileThumbnailElement=Ss([m("uui-symbol-file-thumbnail")],s.UUISymbolFileThumbnailElement);var Dm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,Gu=(i,e,t,r)=>{for(var o=r>1?void 0:r?jm(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&&Dm(e,t,o),o};s.UUISymbolFileElement=class extends f{constructor(){super(...arguments),this.type=""}render(){return h`
|
|
6218
6218
|
<svg
|
|
6219
6219
|
xmlns="http://www.w3.org/2000/svg"
|
|
6220
6220
|
viewBox="0 0 24 24"
|
|
@@ -6228,10 +6228,10 @@
|
|
|
6228
6228
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
6229
6229
|
</svg>
|
|
6230
6230
|
|
|
6231
|
-
${this.type?
|
|
6231
|
+
${this.type?h`<small id="file-type" class="uui-small"
|
|
6232
6232
|
>${this.type.toUpperCase()}</small
|
|
6233
6233
|
>`:""}
|
|
6234
|
-
`}},
|
|
6234
|
+
`}},s.UUISymbolFileElement.styles=[qt,v`
|
|
6235
6235
|
:host {
|
|
6236
6236
|
position: relative;
|
|
6237
6237
|
display: block;
|
|
@@ -6257,7 +6257,7 @@
|
|
|
6257
6257
|
width: 100%;
|
|
6258
6258
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6259
6259
|
}
|
|
6260
|
-
`],
|
|
6260
|
+
`],Gu([l({type:String})],s.UUISymbolFileElement.prototype,"type",2),s.UUISymbolFileElement=Gu([m("uui-symbol-file")],s.UUISymbolFileElement);var Hm=(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
6261
|
xmlns="http://www.w3.org/2000/svg"
|
|
6262
6262
|
viewBox="0 0 24 24"
|
|
6263
6263
|
fill="none"
|
|
@@ -6268,7 +6268,7 @@
|
|
|
6268
6268
|
id="icon">
|
|
6269
6269
|
<path
|
|
6270
6270
|
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>`}},
|
|
6271
|
+
</svg>`}},s.UUISymbolFolderElement.styles=[v`
|
|
6272
6272
|
:host {
|
|
6273
6273
|
display: block;
|
|
6274
6274
|
position: relative;
|
|
@@ -6279,9 +6279,9 @@
|
|
|
6279
6279
|
width: 100%;
|
|
6280
6280
|
color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6281
6281
|
}
|
|
6282
|
-
`],
|
|
6283
|
-
${this.open===!0?
|
|
6284
|
-
</svg>`}},
|
|
6282
|
+
`],s.UUISymbolFolderElement=Hm([m("uui-symbol-folder")],s.UUISymbolFolderElement);var Rm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,qu=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fm(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};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">
|
|
6283
|
+
${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>`}
|
|
6284
|
+
</svg>`}},s.UUISymbolLockElement.styles=[v`
|
|
6285
6285
|
:host {
|
|
6286
6286
|
display: inline-block;
|
|
6287
6287
|
vertical-align: middle;
|
|
@@ -6291,11 +6291,11 @@
|
|
|
6291
6291
|
svg {
|
|
6292
6292
|
fill: currentColor;
|
|
6293
6293
|
}
|
|
6294
|
-
`],
|
|
6294
|
+
`],qu([l({type:Boolean,reflect:!0})],s.UUISymbolLockElement.prototype,"open",2),s.UUISymbolLockElement=qu([m("uui-symbol-lock")],s.UUISymbolLockElement);var Wm=(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
6295
|
<circle cx="17" cy="50" r="9"></circle>
|
|
6296
6296
|
<circle cx="50" cy="50" r="9"></circle>
|
|
6297
6297
|
<circle cx="83" cy="50" r="9"></circle>
|
|
6298
|
-
</svg>`}},
|
|
6298
|
+
</svg>`}},s.UUISymbolMoreElement.styles=[v`
|
|
6299
6299
|
:host {
|
|
6300
6300
|
display: inline-block;
|
|
6301
6301
|
vertical-align: bottom;
|
|
@@ -6306,7 +6306,7 @@
|
|
|
6306
6306
|
svg {
|
|
6307
6307
|
fill: currentColor;
|
|
6308
6308
|
}
|
|
6309
|
-
`],
|
|
6309
|
+
`],s.UUISymbolMoreElement=Wm([m("uui-symbol-more")],s.UUISymbolMoreElement);var Gm=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&&Gm(e,t,o),o};s.UUISymbolSortElement=class extends Vi(f){constructor(){super(...arguments),this.descending=!1}render(){return h` <svg
|
|
6310
6310
|
id="up"
|
|
6311
6311
|
xmlns="http://www.w3.org/2000/svg"
|
|
6312
6312
|
width="24"
|
|
@@ -6331,7 +6331,7 @@
|
|
|
6331
6331
|
stroke-linecap="round"
|
|
6332
6332
|
stroke-linejoin="round">
|
|
6333
6333
|
<path d="m4 9 8 8 8-8"></path>
|
|
6334
|
-
</svg>`}},
|
|
6334
|
+
</svg>`}},s.UUISymbolSortElement.styles=[v`
|
|
6335
6335
|
:host {
|
|
6336
6336
|
position: relative;
|
|
6337
6337
|
display: inline-block;
|
|
@@ -6390,7 +6390,7 @@
|
|
|
6390
6390
|
:host([active][descending]) #down {
|
|
6391
6391
|
opacity: calc(0.25 * var(--uui-symbol-sort-hover, 0));
|
|
6392
6392
|
}
|
|
6393
|
-
`],
|
|
6393
|
+
`],Ku([l({type:Boolean,reflect:!0})],s.UUISymbolSortElement.prototype,"descending",2),s.UUISymbolSortElement=Ku([m("uui-symbol-sort")],s.UUISymbolSortElement);var Km=(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
6394
|
:host {
|
|
6395
6395
|
display: table;
|
|
6396
6396
|
width: 100%;
|
|
@@ -6398,7 +6398,7 @@
|
|
|
6398
6398
|
background-color: var(--uui-color-surface,#fff);
|
|
6399
6399
|
cursor: default;
|
|
6400
6400
|
}
|
|
6401
|
-
`],
|
|
6401
|
+
`],s.UUITableElement=Km([m("uui-table")],s.UUITableElement);var Xm=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,Ir=(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.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
6402
|
:host {
|
|
6403
6403
|
position: relative;
|
|
6404
6404
|
display: table-cell;
|
|
@@ -6432,20 +6432,20 @@
|
|
|
6432
6432
|
:host([no-padding]) {
|
|
6433
6433
|
padding: 0;
|
|
6434
6434
|
}
|
|
6435
|
-
`],
|
|
6435
|
+
`],Ir([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],s.UUITableCellElement.prototype,"disableChildInteraction",2),Ir([l({type:Boolean,reflect:!0,attribute:"no-padding"})],s.UUITableCellElement.prototype,"noPadding",2),Ir([l({type:Boolean,reflect:!0,attribute:"clip-text"})],s.UUITableCellElement.prototype,"clipText",2),s.UUITableCellElement=Ir([m("uui-table-cell")],s.UUITableCellElement);var Zm=(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
6436
|
:host {
|
|
6437
6437
|
display: table-column;
|
|
6438
6438
|
}
|
|
6439
|
-
`],
|
|
6439
|
+
`],s.UUITableColumnElement=Zm([m("uui-table-column")],s.UUITableColumnElement);var Qm=(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
6440
|
:host {
|
|
6441
6441
|
border-top: none;
|
|
6442
6442
|
}
|
|
6443
|
-
`],
|
|
6443
|
+
`],s.UUITableHeadCellElement=Qm([m("uui-table-head-cell")],s.UUITableHeadCellElement);var Jm=(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
6444
|
:host {
|
|
6445
6445
|
display: table-header-group;
|
|
6446
6446
|
font-weight: bold;
|
|
6447
6447
|
}
|
|
6448
|
-
`],
|
|
6448
|
+
`],s.UUITableHeadElement=Jm([m("uui-table-head")],s.UUITableHeadElement);var e0=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,Xu=(i,e,t,r)=>{for(var o=r>1?void 0:r?t0(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&&e0(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
6449
|
:host {
|
|
6450
6450
|
display: table-row;
|
|
6451
6451
|
position: relative;
|
|
@@ -6468,18 +6468,18 @@
|
|
|
6468
6468
|
:host([selected]:focus) {
|
|
6469
6469
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
6470
6470
|
}
|
|
6471
|
-
`],
|
|
6471
|
+
`],Xu([Be({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],s.UUITableRowElement.prototype,"slotCellNodes",2),s.UUITableRowElement=Xu([m("uui-table-row")],s.UUITableRowElement);var i0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,_i=(i,e,t,r)=>{for(var o=r>1?void 0:r?o0(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&&i0(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
6472
|
<a
|
|
6473
6473
|
id="button"
|
|
6474
|
-
href=${
|
|
6475
|
-
target=${
|
|
6476
|
-
rel=${
|
|
6474
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
6475
|
+
target=${_(this.target||void 0)}
|
|
6476
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}
|
|
6477
6477
|
role="tab">
|
|
6478
6478
|
<slot name="icon"></slot>
|
|
6479
6479
|
${this.renderLabel()}
|
|
6480
6480
|
<slot name="extra"></slot>
|
|
6481
6481
|
</a>
|
|
6482
|
-
`:
|
|
6482
|
+
`:h`
|
|
6483
6483
|
<button
|
|
6484
6484
|
type="button"
|
|
6485
6485
|
id="button"
|
|
@@ -6489,7 +6489,7 @@
|
|
|
6489
6489
|
${this.renderLabel()}
|
|
6490
6490
|
<slot name="extra"></slot>
|
|
6491
6491
|
</button>
|
|
6492
|
-
`}},
|
|
6492
|
+
`}},s.UUITabElement.styles=[v`
|
|
6493
6493
|
:host {
|
|
6494
6494
|
color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
|
|
6495
6495
|
font-family: inherit;
|
|
@@ -6619,10 +6619,10 @@
|
|
|
6619
6619
|
:host([orientation='vertical']) slot.label {
|
|
6620
6620
|
text-align: left;
|
|
6621
6621
|
}
|
|
6622
|
-
`],
|
|
6622
|
+
`],_i([l({type:Boolean,reflect:!0})],s.UUITabElement.prototype,"disabled",2),_i([l({type:String})],s.UUITabElement.prototype,"href",2),_i([l({type:String})],s.UUITabElement.prototype,"target",2),_i([l({type:String})],s.UUITabElement.prototype,"rel",2),_i([l({type:String,reflect:!0})],s.UUITabElement.prototype,"orientation",2),s.UUITabElement=_i([m("uui-tab")],s.UUITabElement);var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,Yu=i=>{throw TypeError(i)},$i=(i,e,t,r)=>{for(var o=r>1?void 0:r?n0(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&&r0(e,t,o),o},As=(i,e,t)=>e.has(i)||Yu("Cannot "+t),P=(i,e,t)=>(As(i,e,"read from private field"),t?t.call(i):e.get(i)),Pe=(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),go=(i,e,t,r)=>(As(i,e,"write to private field"),e.set(i,t),t),oe=(i,e,t)=>(As(i,e,"access private method"),t),Cr,Me,Ke,ki,Ui,Sr,fo,yo,Q,Zu,Qu,Ps,Ju,Ei,Ar,ec,Ms,zs;s.UUITabGroupElement=class extends f{constructor(){super(...arguments),Pe(this,Q),Pe(this,Cr,0),this.dropdownContentDirection="vertical",Pe(this,Me,[]),Pe(this,Ke,[]),Pe(this,ki,new Map),Pe(this,Ui,[]),Pe(this,Sr,new ResizeObserver(oe(this,Q,Qu).bind(this))),Pe(this,fo,[]),Pe(this,yo,!1),Pe(this,Ei,e=>{const t=e.currentTarget;if(oe(this,Q,zs).call(this,t)){t.active=!0;const r=P(this,ki).get(t);r&&(r.active=!0),[...P(this,Me),...P(this,Ke)].filter(o=>o!==t&&o!==r).forEach(o=>{oe(this,Q,zs).call(this,o)&&(o.active=!1)}),P(this,Ke).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),oe(this,Q,Zu).call(this)}disconnectedCallback(){super.disconnectedCallback(),P(this,Sr).unobserve(this),oe(this,Q,Ps).call(this)}render(){return h`
|
|
6623
6623
|
<div id="main">
|
|
6624
6624
|
<div id="grid" role="tablist">
|
|
6625
|
-
<slot @slotchange=${
|
|
6625
|
+
<slot @slotchange=${oe(this,Q,Ju)}></slot>
|
|
6626
6626
|
</div>
|
|
6627
6627
|
<uui-button
|
|
6628
6628
|
popovertarget="popover-container"
|
|
@@ -6638,10 +6638,10 @@
|
|
|
6638
6638
|
popover
|
|
6639
6639
|
placement="bottom-end">
|
|
6640
6640
|
<div id="hidden-tabs-container" role="tablist">
|
|
6641
|
-
${
|
|
6641
|
+
${dr(P(this,Ke),e=>h`${e}`)}
|
|
6642
6642
|
</div>
|
|
6643
6643
|
</uui-popover-container>
|
|
6644
|
-
`}},
|
|
6644
|
+
`}},Cr=new WeakMap,Me=new WeakMap,Ke=new WeakMap,ki=new WeakMap,Ui=new WeakMap,Sr=new WeakMap,fo=new WeakMap,yo=new WeakMap,Q=new WeakSet,Zu=async function(){k(this,"uui-button"),k(this,"uui-popover-container"),k(this,"uui-symbol-more"),await this.updateComplete,P(this,Sr).observe(this._mainElement)},Qu=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==P(this,Cr)?oe(this,Q,Ar).call(this):oe(this,Q,Ms).call(this,i[0].contentBoxSize[0].inlineSize)},Ps=function(){P(this,Me).forEach(i=>{i.removeEventListener("click",P(this,Ei)),P(this,fo).forEach(e=>e.disconnect())}),P(this,fo).length=0,P(this,Ui).length=0},Ju=function(){oe(this,Q,Ps).call(this),oe(this,Q,ec).call(this),P(this,Me).forEach(i=>{i.addEventListener("click",P(this,Ei));const e=new ResizeObserver(oe(this,Q,Ar).bind(this));e.observe(i),P(this,fo).push(e)})},Ei=new WeakMap,Ar=async function(){if(P(this,yo))return;go(this,yo,!0),requestAnimationFrame(()=>{go(this,yo,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;go(this,Cr,e);let t=0;for(let o=0;o<P(this,Me).length;o++)P(this,Me)[o].style.display="",t+=P(this,Me)[o].offsetWidth,P(this,Ui)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",oe(this,Q,Ms).call(this,this._mainElement.offsetWidth)},ec=function(){go(this,Me,this._slottedNodes?this._slottedNodes:[]),oe(this,Q,Ar).call(this)},Ms=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);P(this,Ke).forEach(n=>{n.removeEventListener("click",P(this,Ei))}),go(this,Ke,[]),P(this,ki).clear();let r=!1;const o=P(this,Ui).length;for(let n=0;n<o;n++){const a=P(this,Ui)[n],u=P(this,Me)[n];if(a<=(n===o-1?i:t))u.style.display="";else{const c=u.cloneNode(!0);c.addEventListener("click",P(this,Ei)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,P(this,ki).set(c,u),P(this,ki).set(u,c),P(this,Ke).push(c),u.style.display="none",u.active&&(r=!0)}}P(this,Ke).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()},zs=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},s.UUITabGroupElement.styles=[v`
|
|
6645
6645
|
:host {
|
|
6646
6646
|
min-width: 0;
|
|
6647
6647
|
display: flex;
|
|
@@ -6729,7 +6729,7 @@
|
|
|
6729
6729
|
opacity 120ms,
|
|
6730
6730
|
height ease-out 120ms;
|
|
6731
6731
|
}
|
|
6732
|
-
`]
|
|
6732
|
+
`],$i([S("#more-button")],s.UUITabGroupElement.prototype,"_moreButtonElement",2),$i([S("#popover-container")],s.UUITabGroupElement.prototype,"_popoverContainerElement",2),$i([S("#main")],s.UUITabGroupElement.prototype,"_mainElement",2),$i([Be({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],s.UUITabGroupElement.prototype,"_slottedNodes",2),$i([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],s.UUITabGroupElement.prototype,"dropdownContentDirection",2),s.UUITabGroupElement=$i([m("uui-tab-group")],s.UUITabGroupElement);class s0 extends M{}class a0 extends M{}var l0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,Ls=(i,e,t,r)=>{for(var o=r>1?void 0:r?u0(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&&l0(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
6733
|
:host {
|
|
6734
6734
|
display: inline-block;
|
|
6735
6735
|
font-size: var(--uui-tag-font-size, var(--uui-type-small-size,12px));
|
|
@@ -6819,14 +6819,14 @@
|
|
|
6819
6819
|
color: var(--color-standalone);
|
|
6820
6820
|
border-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
6821
6821
|
}
|
|
6822
|
-
`],
|
|
6822
|
+
`],Ls([l({reflect:!0})],s.UUITagElement.prototype,"color",2),Ls([l({reflect:!0})],s.UUITagElement.prototype,"look",2),s.UUITagElement=Ls([m("uui-tag")],s.UUITagElement);let Os=class extends M{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var c0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,Y=(i,e,t,r)=>{for(var o=r>1?void 0:r?h0(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&&c0(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 Os(Os.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
6823
|
<textarea
|
|
6824
6824
|
id="textarea"
|
|
6825
|
-
rows=${
|
|
6826
|
-
cols=${
|
|
6825
|
+
rows=${_(this.rows)}
|
|
6826
|
+
cols=${_(this.cols)}
|
|
6827
6827
|
.value=${this.value}
|
|
6828
6828
|
.name=${this.name}
|
|
6829
|
-
wrap=${
|
|
6829
|
+
wrap=${_(this.wrap)}
|
|
6830
6830
|
placeholder=${this.placeholder}
|
|
6831
6831
|
aria-label=${this.label}
|
|
6832
6832
|
.disabled=${this.disabled}
|
|
@@ -6834,7 +6834,7 @@
|
|
|
6834
6834
|
@input=${this.onInput}
|
|
6835
6835
|
@change=${this.onChange}>
|
|
6836
6836
|
</textarea>
|
|
6837
|
-
`}},
|
|
6837
|
+
`}},s.UUITextareaElement.formAssociated=!0,s.UUITextareaElement.styles=[v`
|
|
6838
6838
|
:host {
|
|
6839
6839
|
position: relative;
|
|
6840
6840
|
}
|
|
@@ -6919,7 +6919,7 @@
|
|
|
6919
6919
|
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
6920
6920
|
var(--uui-color-focus,#3879ff);
|
|
6921
6921
|
}
|
|
6922
|
-
`],
|
|
6922
|
+
`],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 $e=class extends M{static{this.OPENING="opening"}static{this.OPENED="opened"}static{this.CLOSING="closing"}static{this.CLOSED="closed"}};var d0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,xi=(i,e,t,r)=>{for(var o=r>1?void 0:r?p0(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&&d0(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 md(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 $e($e.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new $e($e.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new $e($e.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 $e($e.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return h`
|
|
6923
6923
|
<div id="toast" class=${this._animate?"animate":""}>
|
|
6924
6924
|
<div>
|
|
6925
6925
|
<div id="close">
|
|
@@ -6930,13 +6930,13 @@
|
|
|
6930
6930
|
@click=${()=>this.open=!1}>
|
|
6931
6931
|
<uui-icon
|
|
6932
6932
|
name="remove"
|
|
6933
|
-
.fallback=${
|
|
6933
|
+
.fallback=${cn.strings[0]}></uui-icon>
|
|
6934
6934
|
</uui-button>
|
|
6935
6935
|
</div>
|
|
6936
6936
|
<slot></slot>
|
|
6937
6937
|
</div>
|
|
6938
6938
|
</div>
|
|
6939
|
-
`}},
|
|
6939
|
+
`}},s.UUIToastNotificationElement.styles=[qt,v`
|
|
6940
6940
|
:host {
|
|
6941
6941
|
--uui-toast-notification-margin: var(--uui-size-space-2,6px);
|
|
6942
6942
|
|
|
@@ -7053,7 +7053,7 @@
|
|
|
7053
7053
|
71
|
|
7054
7054
|
));
|
|
7055
7055
|
}
|
|
7056
|
-
`],
|
|
7056
|
+
`],xi([l({reflect:!0})],s.UUIToastNotificationElement.prototype,"color",2),xi([l({type:Number})],s.UUIToastNotificationElement.prototype,"autoClose",1),xi([S("#toast")],s.UUIToastNotificationElement.prototype,"_toastEl",2),xi([w()],s.UUIToastNotificationElement.prototype,"_animate",2),xi([l({type:Boolean,reflect:!0})],s.UUIToastNotificationElement.prototype,"open",1),s.UUIToastNotificationElement=xi([m("uui-toast-notification")],s.UUIToastNotificationElement);var b0=Object.defineProperty,v0=Object.getOwnPropertyDescriptor,tc=(i,e,t,r)=>{for(var o=r>1?void 0:r?v0(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&&b0(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($e.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($e.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
7057
|
:host {
|
|
7058
7058
|
position: absolute;
|
|
7059
7059
|
overflow: hidden;
|
|
@@ -7081,7 +7081,7 @@
|
|
|
7081
7081
|
:host([left-align]) slot {
|
|
7082
7082
|
align-items: start;
|
|
7083
7083
|
}
|
|
7084
|
-
`],
|
|
7084
|
+
`],tc([l({type:Number,reflect:!0,attribute:"auto-close"})],s.UUIToastNotificationContainerElement.prototype,"_autoClose",2),s.UUIToastNotificationContainerElement=tc([m("uui-toast-notification-container")],s.UUIToastNotificationContainerElement);var m0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,Ts=(i,e,t,r)=>{for(var o=r>1?void 0:r?g0(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&&m0(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
7085
|
<div id="message" class="uui-text">
|
|
7086
7086
|
<h5
|
|
7087
7087
|
style=${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}>
|
|
@@ -7091,7 +7091,7 @@
|
|
|
7091
7091
|
<slot></slot>
|
|
7092
7092
|
<slot id="actions" name="actions"></slot>
|
|
7093
7093
|
</div>
|
|
7094
|
-
`}},
|
|
7094
|
+
`}},s.UUIToastNotificationLayoutElement.styles=[qt,v`
|
|
7095
7095
|
#message {
|
|
7096
7096
|
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
7097
7097
|
}
|
|
@@ -7112,12 +7112,12 @@
|
|
|
7112
7112
|
margin-top: var(--uui-size-space-4,12px);
|
|
7113
7113
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
7114
7114
|
}
|
|
7115
|
-
`],
|
|
7115
|
+
`],Ts([l({type:String})],s.UUIToastNotificationLayoutElement.prototype,"headline",2),Ts([w()],s.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),s.UUIToastNotificationLayoutElement=Ts([m("uui-toast-notification-layout")],s.UUIToastNotificationLayoutElement);var f0=(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
7116
|
<div id="toggle">
|
|
7117
|
-
<div id="icon-checked">${
|
|
7118
|
-
<div id="icon-unchecked">${
|
|
7117
|
+
<div id="icon-checked">${jo}</div>
|
|
7118
|
+
<div id="icon-unchecked">${cn}</div>
|
|
7119
7119
|
</div>
|
|
7120
|
-
`}},
|
|
7120
|
+
`}},s.UUIToggleElement.formAssociated=!0,s.UUIToggleElement.styles=[...ve.styles,Bo,v`
|
|
7121
7121
|
:host {
|
|
7122
7122
|
--uui-toggle-size: 18px;
|
|
7123
7123
|
--uui-toggle-switch-width: calc(2 * var(--uui-toggle-size));
|
|
@@ -7264,7 +7264,7 @@
|
|
|
7264
7264
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
7265
7265
|
}
|
|
7266
7266
|
:host([disabled]) label:active #toggle {
|
|
7267
|
-
animation: ${
|
|
7267
|
+
animation: ${Vo};
|
|
7268
7268
|
}
|
|
7269
7269
|
:host([disabled]) input:checked #toggle #icon-checked {
|
|
7270
7270
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
@@ -7281,7 +7281,7 @@
|
|
|
7281
7281
|
71
|
|
7282
7282
|
));
|
|
7283
7283
|
}
|
|
7284
|
-
`],
|
|
7284
|
+
`],s.UUIToggleElement=f0([m("uui-toggle")],s.UUIToggleElement);var y0=(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
7285
|
:host(:not(:focus-within)) {
|
|
7286
7286
|
position: absolute !important;
|
|
7287
7287
|
width: 1px !important;
|
|
@@ -7293,5 +7293,556 @@
|
|
|
7293
7293
|
white-space: nowrap !important;
|
|
7294
7294
|
padding: 0 !important;
|
|
7295
7295
|
}
|
|
7296
|
-
`],
|
|
7296
|
+
`],s.UUIVisuallyHiddenElement=y0([m("uui-visually-hidden")],s.UUIVisuallyHiddenElement);function Pr(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 Ii=(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)},w0=(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};v`
|
|
7297
|
+
@keyframes uui-blink {
|
|
7298
|
+
0%,
|
|
7299
|
+
100% {
|
|
7300
|
+
opacity: 0.5;
|
|
7301
|
+
}
|
|
7302
|
+
50% {
|
|
7303
|
+
opacity: 1;
|
|
7304
|
+
}
|
|
7305
|
+
}
|
|
7306
|
+
`,be("uui-blink 0.9s infinite both"),v`
|
|
7307
|
+
@keyframes pulse {
|
|
7308
|
+
0% {
|
|
7309
|
+
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
7310
|
+
transform: translate(-50%, -50%) scale(0.2);
|
|
7311
|
+
opacity: 0.9;
|
|
7312
|
+
}
|
|
7313
|
+
80% {
|
|
7314
|
+
-webkit-transform: translate(-50%, -50%) scale(1.2);
|
|
7315
|
+
transform: translate(-50%, -50%) scale(1.2);
|
|
7316
|
+
opacity: 0;
|
|
7317
|
+
}
|
|
7318
|
+
100% {
|
|
7319
|
+
-webkit-transform: translate(-50%, -50%) scale(2.2);
|
|
7320
|
+
transform: translate(-50%, -50%) scale(2.2);
|
|
7321
|
+
opacity: 0;
|
|
7322
|
+
}
|
|
7323
|
+
}
|
|
7324
|
+
`,be("pulse 0.8s ease-in-out infinite both");const _0=v`
|
|
7325
|
+
@keyframes uui-horizontal-shake {
|
|
7326
|
+
10%,
|
|
7327
|
+
90% {
|
|
7328
|
+
transform: translateX(-1px);
|
|
7329
|
+
}
|
|
7330
|
+
|
|
7331
|
+
20%,
|
|
7332
|
+
80% {
|
|
7333
|
+
transform: translateX(1px);
|
|
7334
|
+
}
|
|
7335
|
+
|
|
7336
|
+
30%,
|
|
7337
|
+
50%,
|
|
7338
|
+
70% {
|
|
7339
|
+
transform: translateX(-2px);
|
|
7340
|
+
}
|
|
7341
|
+
|
|
7342
|
+
40%,
|
|
7343
|
+
60% {
|
|
7344
|
+
transform: translateX(2px);
|
|
7345
|
+
}
|
|
7346
|
+
}
|
|
7347
|
+
`,$0=be("uui-horizontal-shake 600ms ease backwards");var k0=Object.defineProperty,ic=(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&&k0(e,t,o),o};const U0=(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`
|
|
7348
|
+
${this._labelSlotHasContent===!1?h`<span class="label">${this.label}</span>`:""}
|
|
7349
|
+
<slot
|
|
7350
|
+
class="label"
|
|
7351
|
+
style=${this._labelSlotHasContent?"":"display: none"}
|
|
7352
|
+
name=${""}
|
|
7353
|
+
@slotchange=${this.labelSlotChanged}></slot>
|
|
7354
|
+
`}}return ic([l({type:String})],t.prototype,"label"),ic([w()],t.prototype,"_labelSlotHasContent"),t};let E0=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}};(class extends E0{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}});class oc extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}}class Ci extends oc{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}}class X0 extends oc{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}}var x0=Object.defineProperty,I0=Object.getOwnPropertyDescriptor,Tt=(i,e,t,r)=>{for(var o=r>1?void 0:r?I0(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&&x0(e,t,o),o};const C0=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],S0=(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:C0.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(Ci.INVALID,()=>{this._runValidators()}),o.addEventListener(Ci.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 Ci(Ci.VALID)):this.dispatchEvent(new Ci(Ci.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 Tt([l({type:String})],t.prototype,"name",2),Tt([l()],t.prototype,"value",1),Tt([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Tt([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Tt([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Tt([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Tt([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},A0=(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 P0=Object.defineProperty,M0=(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&&P0(e,t,o),o};const z0=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=A0(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 M0([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 L0=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 O0=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 T0=Object.defineProperty,N0=Object.getOwnPropertyDescriptor,rc=i=>{throw TypeError(i)},he=(i,e,t,r)=>{for(var o=r>1?void 0:r?N0(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&&T0(e,t,o),o},nc=(i,e,t)=>e.has(i)||rc("Cannot "+t),B0=(i,e,t)=>(nc(i,e,"read from private field"),e.get(i)),V0=(i,e,t)=>e.has(i)?rc("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),D0=(i,e,t,r)=>(nc(i,e,"write to private field"),e.set(i,t),t),Mr;let ee=class extends S0(U0("",z0(f))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",V0(this,Mr),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(B0(this,Mr)),(this.state==="success"||this.state==="failed")&&D0(this,Mr,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let i;switch(this.state){case"waiting":Ii(this,"uui-loader-circle"),i=h`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":Ii(this,"uui-icon"),i=h`<uui-icon
|
|
7355
|
+
name="check"
|
|
7356
|
+
.fallback=${L0.strings[0]}></uui-icon>`;break;case"failed":Ii(this,"uui-icon"),i=h`<uui-icon
|
|
7357
|
+
name="wrong"
|
|
7358
|
+
.fallback=${O0.strings[0]}></uui-icon>`;break;default:return C}return h`<div id="state">${i}</div>`}render(){return this.href?h`
|
|
7359
|
+
<a
|
|
7360
|
+
id="button"
|
|
7361
|
+
aria-label=${_(this.label)}
|
|
7362
|
+
title=${_(this.title===""?void 0:this.title)}
|
|
7363
|
+
href=${_(this.disabled?void 0:this.href)}
|
|
7364
|
+
target=${_(this.target||void 0)}
|
|
7365
|
+
rel=${_(this.rel||_(this.target==="_blank"?"noopener noreferrer":void 0))}>
|
|
7366
|
+
${this.renderState()} ${this.renderLabel()}
|
|
7367
|
+
<slot name="extra"></slot>
|
|
7368
|
+
</a>
|
|
7369
|
+
`:h`
|
|
7370
|
+
<button
|
|
7371
|
+
id="button"
|
|
7372
|
+
type=${this.type}
|
|
7373
|
+
?disabled=${this.disabled}
|
|
7374
|
+
aria-label=${_(this.label)}
|
|
7375
|
+
title=${_(this.title===""?void 0:this.title)}>
|
|
7376
|
+
${this.renderState()} ${this.renderLabel()}
|
|
7377
|
+
<slot name="extra"></slot>
|
|
7378
|
+
</button>
|
|
7379
|
+
`}};Mr=new WeakMap,ee.styles=[_0,v`
|
|
7380
|
+
:host {
|
|
7381
|
+
position: relative;
|
|
7382
|
+
display: inline-flex;
|
|
7383
|
+
margin-left: calc(var(--uui-button-merge-border-left, 0) * -1px);
|
|
7384
|
+
--uui-button-padding-left-factor: 3;
|
|
7385
|
+
--uui-button-padding-right-factor: 3;
|
|
7386
|
+
--uui-button-padding-top-factor: 1;
|
|
7387
|
+
--uui-button-padding-bottom-factor: 1;
|
|
7388
|
+
|
|
7389
|
+
min-height: var(--uui-button-height, var(--uui-size-11,33px));
|
|
7390
|
+
max-height: 100%;
|
|
7391
|
+
cursor: pointer;
|
|
7392
|
+
|
|
7393
|
+
text-align: center;
|
|
7394
|
+
font-size: var(--uui-button-font-size, inherit);
|
|
7395
|
+
font-weight: var(--uui-button-font-weight, 500);
|
|
7396
|
+
transition:
|
|
7397
|
+
background-color 80ms,
|
|
7398
|
+
border-color 80ms,
|
|
7399
|
+
color 80ms;
|
|
7400
|
+
}
|
|
7401
|
+
|
|
7402
|
+
:host([compact]) {
|
|
7403
|
+
--uui-button-padding-left-factor: 1;
|
|
7404
|
+
--uui-button-padding-right-factor: 1;
|
|
7405
|
+
--uui-button-padding-top-factor: 0;
|
|
7406
|
+
--uui-button-padding-bottom-factor: 0;
|
|
7407
|
+
}
|
|
7408
|
+
|
|
7409
|
+
.label {
|
|
7410
|
+
line-height: 1; /** needed to reset 'a > span' */
|
|
7411
|
+
transition: opacity 120ms;
|
|
7412
|
+
display: flex;
|
|
7413
|
+
gap: var(--uui-size-1,3px);
|
|
7414
|
+
align-items: center;
|
|
7415
|
+
}
|
|
7416
|
+
|
|
7417
|
+
:host([state]:not([state=''])) .label {
|
|
7418
|
+
opacity: 0;
|
|
7419
|
+
}
|
|
7420
|
+
|
|
7421
|
+
#state {
|
|
7422
|
+
position: absolute;
|
|
7423
|
+
opacity: 0;
|
|
7424
|
+
animation-name: fadeIn;
|
|
7425
|
+
animation-delay: 40ms;
|
|
7426
|
+
animation-duration: 360ms;
|
|
7427
|
+
animation-fill-mode: forwards;
|
|
7428
|
+
display: flex;
|
|
7429
|
+
justify-content: center;
|
|
7430
|
+
width: 100%;
|
|
7431
|
+
height: 100%;
|
|
7432
|
+
align-items: center;
|
|
7433
|
+
}
|
|
7434
|
+
|
|
7435
|
+
#button {
|
|
7436
|
+
width: 100%;
|
|
7437
|
+
background-color: transparent;
|
|
7438
|
+
color: inherit;
|
|
7439
|
+
font-size: inherit;
|
|
7440
|
+
border-radius: inherit;
|
|
7441
|
+
font-family: inherit;
|
|
7442
|
+
font-weight: inherit;
|
|
7443
|
+
text-align: inherit;
|
|
7444
|
+
border: none;
|
|
7445
|
+
cursor: inherit;
|
|
7446
|
+
|
|
7447
|
+
display: inline-flex;
|
|
7448
|
+
align-items: center;
|
|
7449
|
+
justify-content: var(--uui-button-content-align, center);
|
|
7450
|
+
|
|
7451
|
+
/* for anchor tag: */
|
|
7452
|
+
text-decoration: none;
|
|
7453
|
+
color: currentColor;
|
|
7454
|
+
line-height: inherit;
|
|
7455
|
+
|
|
7456
|
+
border-width: var(--uui-button-border-width, 1px);
|
|
7457
|
+
border-style: solid;
|
|
7458
|
+
border-radius: var(
|
|
7459
|
+
--uui-button-border-radius,
|
|
7460
|
+
var(--uui-border-radius,3px)
|
|
7461
|
+
);
|
|
7462
|
+
cursor: pointer;
|
|
7463
|
+
|
|
7464
|
+
padding: calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor))
|
|
7465
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor))
|
|
7466
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor))
|
|
7467
|
+
calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));
|
|
7468
|
+
|
|
7469
|
+
box-shadow: none;
|
|
7470
|
+
|
|
7471
|
+
transition: var(--uui-button-transition, none);
|
|
7472
|
+
}
|
|
7473
|
+
|
|
7474
|
+
#button:focus-visible {
|
|
7475
|
+
outline: 2px solid var(--uui-focus-outline-color, var(--color-emphasis));
|
|
7476
|
+
}
|
|
7477
|
+
|
|
7478
|
+
button[disabled]:active,
|
|
7479
|
+
a:not([href]):active {
|
|
7480
|
+
animation: ${$0};
|
|
7481
|
+
}
|
|
7482
|
+
|
|
7483
|
+
/* ANIMATIONS */
|
|
7484
|
+
@keyframes fadeIn {
|
|
7485
|
+
0% {
|
|
7486
|
+
opacity: 0;
|
|
7487
|
+
}
|
|
7488
|
+
100% {
|
|
7489
|
+
opacity: 1;
|
|
7490
|
+
}
|
|
7491
|
+
}
|
|
7492
|
+
|
|
7493
|
+
@keyframes fadeOut {
|
|
7494
|
+
0% {
|
|
7495
|
+
opacity: 1;
|
|
7496
|
+
}
|
|
7497
|
+
100% {
|
|
7498
|
+
opacity: 0;
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7501
|
+
|
|
7502
|
+
#icon-check,
|
|
7503
|
+
#icon-wrong {
|
|
7504
|
+
display: grid;
|
|
7505
|
+
place-items: center;
|
|
7506
|
+
width: 1.5em;
|
|
7507
|
+
}
|
|
7508
|
+
|
|
7509
|
+
#loader {
|
|
7510
|
+
font-size: 1.5em;
|
|
7511
|
+
}
|
|
7512
|
+
:host([look]:not([look=''])) #loader {
|
|
7513
|
+
color: inherit;
|
|
7514
|
+
}
|
|
7515
|
+
|
|
7516
|
+
/* edge case for default color */
|
|
7517
|
+
:host(:not([color]):not([look='primary'])),
|
|
7518
|
+
:host([color='']:not([look='primary'])),
|
|
7519
|
+
:host([color='default']:not([look='primary'])) {
|
|
7520
|
+
--uui-button-contrast-hover: var(--uui-color-default-emphasis,#3544b1);
|
|
7521
|
+
}
|
|
7522
|
+
|
|
7523
|
+
:host([color='warning'][look='outline']) #button,
|
|
7524
|
+
:host([color='warning'][look='placeholder']) #button {
|
|
7525
|
+
--uui-button-contrast-hover: var(--color-standalone);
|
|
7526
|
+
}
|
|
7527
|
+
|
|
7528
|
+
/** Button color attribute: */
|
|
7529
|
+
#button {
|
|
7530
|
+
--color: var(--uui-color-default,#1b264f);
|
|
7531
|
+
--color-standalone: var(--uui-color-default-standalone,rgb(
|
|
7532
|
+
28,
|
|
7533
|
+
35,
|
|
7534
|
+
59
|
|
7535
|
+
));
|
|
7536
|
+
--color-emphasis: var(--uui-color-default-emphasis,#3544b1);
|
|
7537
|
+
--color-contrast: var(--uui-color-default-contrast,#fff);
|
|
7538
|
+
}
|
|
7539
|
+
:host([color='positive']) #button {
|
|
7540
|
+
--color: var(--uui-color-positive,#0b8152);
|
|
7541
|
+
--color-standalone: var(--uui-color-positive-standalone,rgb(
|
|
7542
|
+
10,
|
|
7543
|
+
115,
|
|
7544
|
+
73
|
|
7545
|
+
));
|
|
7546
|
+
--color-emphasis: var(--uui-color-positive-emphasis,rgb(
|
|
7547
|
+
13,
|
|
7548
|
+
155,
|
|
7549
|
+
98
|
|
7550
|
+
));
|
|
7551
|
+
--color-contrast: var(--uui-color-positive-contrast,#fff);
|
|
7552
|
+
}
|
|
7553
|
+
:host([color='warning']) #button {
|
|
7554
|
+
--color: var(--uui-color-warning,#fbd142);
|
|
7555
|
+
--color-standalone: var(--uui-color-warning-standalone,#a17700);
|
|
7556
|
+
--color-emphasis: var(--uui-color-warning-emphasis,rgb(
|
|
7557
|
+
251,
|
|
7558
|
+
224,
|
|
7559
|
+
101
|
|
7560
|
+
));
|
|
7561
|
+
--color-contrast: var(--uui-color-warning-contrast,#000);
|
|
7562
|
+
}
|
|
7563
|
+
:host([color='danger']) #button {
|
|
7564
|
+
--color: var(--uui-color-danger,#d42054);
|
|
7565
|
+
--color-standalone: var(--uui-color-danger-standalone,rgb(
|
|
7566
|
+
191,
|
|
7567
|
+
33,
|
|
7568
|
+
78
|
|
7569
|
+
));
|
|
7570
|
+
--color-emphasis: var(--uui-color-danger-emphasis,rgb(
|
|
7571
|
+
226,
|
|
7572
|
+
60,
|
|
7573
|
+
107
|
|
7574
|
+
));
|
|
7575
|
+
--color-contrast: var(--uui-color-danger-contrast,white);
|
|
7576
|
+
}
|
|
7577
|
+
:host([color='invalid']) #button {
|
|
7578
|
+
--color: var(--uui-color-invalid,#d42054);
|
|
7579
|
+
--color-standalone: var(--uui-color-invalid-standalone,rgb(
|
|
7580
|
+
191,
|
|
7581
|
+
33,
|
|
7582
|
+
78
|
|
7583
|
+
));
|
|
7584
|
+
--color-emphasis: var(--uui-color-invalid-emphasis,rgb(
|
|
7585
|
+
226,
|
|
7586
|
+
60,
|
|
7587
|
+
107
|
|
7588
|
+
));
|
|
7589
|
+
--color-contrast: var(--uui-color-invalid-contrast,white);
|
|
7590
|
+
}
|
|
7591
|
+
:host([disabled]) #button {
|
|
7592
|
+
--color: var(--uui-color-disabled,#f3f3f5);
|
|
7593
|
+
--color-standalone: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
7594
|
+
--color-emphasis: var(--uui-color-disabled,#f3f3f5);
|
|
7595
|
+
--color-contrast: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
7596
|
+
|
|
7597
|
+
cursor: default;
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
/** Button look attribute: */
|
|
7601
|
+
/* DEFAULT */
|
|
7602
|
+
#button {
|
|
7603
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
7604
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
7605
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
7606
|
+
}
|
|
7607
|
+
:host(:not([disabled]):hover) #button {
|
|
7608
|
+
background-color: var(
|
|
7609
|
+
--uui-button-background-color-hover,
|
|
7610
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
7611
|
+
250,
|
|
7612
|
+
250,
|
|
7613
|
+
250
|
|
7614
|
+
))
|
|
7615
|
+
);
|
|
7616
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
7617
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
7618
|
+
}
|
|
7619
|
+
:host([disabled]) #button {
|
|
7620
|
+
background-color: var(
|
|
7621
|
+
--uui-button-background-color-disabled,
|
|
7622
|
+
transparent
|
|
7623
|
+
);
|
|
7624
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
7625
|
+
border-color: var(--uui-button-border-color-disabled, transparent);
|
|
7626
|
+
}
|
|
7627
|
+
|
|
7628
|
+
/* PRIMARY */
|
|
7629
|
+
:host([look='primary']) #button {
|
|
7630
|
+
background-color: var(--uui-button-background-color, var(--color));
|
|
7631
|
+
color: var(--uui-button-contrast, var(--color-contrast));
|
|
7632
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
7633
|
+
|
|
7634
|
+
/* special for primary: */
|
|
7635
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
:host([look='primary']:hover) #button {
|
|
7639
|
+
background-color: var(
|
|
7640
|
+
--uui-button-background-color-hover,
|
|
7641
|
+
var(--color-emphasis)
|
|
7642
|
+
);
|
|
7643
|
+
color: var(--uui-button-contrast-hover, var(--color-contrast));
|
|
7644
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
7645
|
+
}
|
|
7646
|
+
|
|
7647
|
+
/* special outline offset tof primary style so you can see the outline */
|
|
7648
|
+
:host([look='primary']) #button:focus-visible {
|
|
7649
|
+
outline-offset: 2px;
|
|
7650
|
+
}
|
|
7651
|
+
|
|
7652
|
+
:host([look='primary'][disabled]) #button {
|
|
7653
|
+
background-color: var(
|
|
7654
|
+
--uui-button-background-color-disabled,
|
|
7655
|
+
var(--color)
|
|
7656
|
+
);
|
|
7657
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
7658
|
+
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
7659
|
+
}
|
|
7660
|
+
/* SECONDARY */
|
|
7661
|
+
:host([look='secondary']) #button {
|
|
7662
|
+
background-color: var(
|
|
7663
|
+
--uui-button-background-color,
|
|
7664
|
+
var(--uui-color-surface-alt,#f3f3f5)
|
|
7665
|
+
);
|
|
7666
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
7667
|
+
border-color: var(--uui-button-border-color, transparent);
|
|
7668
|
+
|
|
7669
|
+
/* special for secondary: */
|
|
7670
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
7671
|
+
}
|
|
7672
|
+
:host([look='secondary']:hover) #button {
|
|
7673
|
+
background-color: var(
|
|
7674
|
+
--uui-button-background-color-hover,
|
|
7675
|
+
var(--uui-color-surface-emphasis,rgb(
|
|
7676
|
+
250,
|
|
7677
|
+
250,
|
|
7678
|
+
250
|
|
7679
|
+
))
|
|
7680
|
+
);
|
|
7681
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
7682
|
+
border-color: var(--uui-button-border-color-hover, transparent);
|
|
7683
|
+
}
|
|
7684
|
+
:host([look='secondary'][disabled]) #button {
|
|
7685
|
+
background-color: var(
|
|
7686
|
+
--uui-button-background-color-disabled,
|
|
7687
|
+
var(--color)
|
|
7688
|
+
);
|
|
7689
|
+
color: var(--uui-button-contrast-disabled, var(--color-contrast));
|
|
7690
|
+
border-color: var(--uui-button-border-color-disabled, var(--color));
|
|
7691
|
+
}
|
|
7692
|
+
|
|
7693
|
+
/* OUTLINE */
|
|
7694
|
+
:host([look='outline']) #button {
|
|
7695
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
7696
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
7697
|
+
border-color: var(
|
|
7698
|
+
--uui-button-border-color,
|
|
7699
|
+
var(--uui-color-border-standalone,#c2c2c2)
|
|
7700
|
+
);
|
|
7701
|
+
|
|
7702
|
+
/* special for outline: */
|
|
7703
|
+
font-weight: var(--uui-button-font-weight, 700);
|
|
7704
|
+
}
|
|
7705
|
+
:host([look='outline']:not([disabled]):hover) #button {
|
|
7706
|
+
background-color: var(--uui-button-background-color-hover, transparent);
|
|
7707
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
7708
|
+
border-color: var(--uui-button-border-color-hover);
|
|
7709
|
+
}
|
|
7710
|
+
:host([look='outline'][disabled]) #button {
|
|
7711
|
+
background-color: var(
|
|
7712
|
+
--uui-button-background-color-disabled,
|
|
7713
|
+
transparent
|
|
7714
|
+
);
|
|
7715
|
+
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
7716
|
+
border-color: var(
|
|
7717
|
+
--uui-button-border-color-disabled,
|
|
7718
|
+
var(--color-standalone)
|
|
7719
|
+
);
|
|
7720
|
+
}
|
|
7721
|
+
|
|
7722
|
+
/* PLACEHOLDER */
|
|
7723
|
+
:host([look='placeholder']) #button {
|
|
7724
|
+
border-style: dashed;
|
|
7725
|
+
background-color: var(--uui-button-background-color, transparent);
|
|
7726
|
+
color: var(--uui-button-contrast, var(--color-standalone));
|
|
7727
|
+
border-color: var(
|
|
7728
|
+
--uui-button-border-color,
|
|
7729
|
+
var(--uui-color-border-standalone,#c2c2c2)
|
|
7730
|
+
);
|
|
7731
|
+
}
|
|
7732
|
+
:host([look='placeholder']:not([disabled]):hover) #button {
|
|
7733
|
+
background-color: var(--uui-button-background-color-hover, transparent);
|
|
7734
|
+
color: var(--uui-button-contrast-hover, var(--color-standalone));
|
|
7735
|
+
border-color: var(--uui-button-border-color-hover);
|
|
7736
|
+
}
|
|
7737
|
+
:host([look='placeholder'][disabled]) #button {
|
|
7738
|
+
background-color: var(
|
|
7739
|
+
--uui-button-background-color-disabled,
|
|
7740
|
+
var(--color)
|
|
7741
|
+
);
|
|
7742
|
+
color: var(--uui-button-contrast-disabled, var(--color-standalone));
|
|
7743
|
+
border-color: var(
|
|
7744
|
+
--uui-button-border-color-disabled,
|
|
7745
|
+
var(--color-standalone)
|
|
7746
|
+
);
|
|
7747
|
+
}
|
|
7748
|
+
`],he([l({type:String,reflect:!0})],ee.prototype,"type",2),he([l({type:Boolean,reflect:!0})],ee.prototype,"disabled",2),he([l({reflect:!0})],ee.prototype,"look",2),he([l({reflect:!0})],ee.prototype,"color",2),he([l({type:Boolean,reflect:!0})],ee.prototype,"compact",2),he([l({type:String,reflect:!0})],ee.prototype,"state",2),he([l({type:String})],ee.prototype,"href",2),he([l({type:String})],ee.prototype,"target",2),he([l({type:String})],ee.prototype,"rel",2),he([l({type:String})],ee.prototype,"title",2),he([S("#button")],ee.prototype,"_button",2),ee=he([Pr("uui-button")],ee);var j0=Object.defineProperty,H0=Object.getOwnPropertyDescriptor,sc=i=>{throw TypeError(i)},Nt=(i,e,t,r)=>{for(var o=r>1?void 0:r?H0(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&&j0(e,t,o),o},Ns=(i,e,t)=>e.has(i)||sc("Cannot "+t),O=(i,e,t)=>(Ns(i,e,"read from private field"),t?t.call(i):e.get(i)),Xe=(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),wo=(i,e,t,r)=>(Ns(i,e,"write to private field"),e.set(i,t),t),pt=(i,e,t)=>(Ns(i,e,"access private method"),t),Ye,bt,Bt,_o,Bs,Ze,$o,Vs,ze,Ds,ac,js,lc,Hs;let Qe=class extends f{constructor(){super(),Xe(this,ze),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Xe(this,Ye,null),Xe(this,bt,[]),Xe(this,Bt,null),Xe(this,_o,{width:0,height:0}),Xe(this,Bs,i=>{this._open=i.newState==="open",wo(this,Ye,w0(this,"popovertarget",this.id)),O(this,Ye)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:i.oldState,newState:i.newState}})),this._open?(pt(this,ze,lc).call(this),pt(this,ze,ac).call(this),requestAnimationFrame(()=>{O(this,Ze).call(this)})):pt(this,ze,js).call(this)}),Xe(this,Ze,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",O(this,$o).call(this,3))}),Xe(this,$o,i=>{if(O(this,Vs).call(this),i--,O(this,Ye)===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=O(this,Ye).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){pt(this,ze,Ds).call(this),O(this,$o).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){pt(this,ze,Ds).call(this),O(this,$o).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"}),Xe(this,Vs,()=>{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",O(this,Bs),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(i){this._placement=i,this._actualPlacement=i,O(this,Ze).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),O(this,Bt)||(wo(this,Bt,new ResizeObserver(i=>{const e=i[0],t=e.contentRect.width,r=e.contentRect.height;t===O(this,_o).width&&r===O(this,_o).height||(wo(this,_o,{width:t,height:r}),O(this,Ze).call(this))})),O(this,Bt).observe(this))}disconnectedCallback(){super.disconnectedCallback(),pt(this,ze,js).call(this),O(this,Bt)?.disconnect(),wo(this,Bt,null)}_getScrollParents(){return O(this,bt)}render(){return h`<slot></slot>`}};Ye=new WeakMap,bt=new WeakMap,Bt=new WeakMap,_o=new WeakMap,Bs=new WeakMap,Ze=new WeakMap,$o=new WeakMap,Vs=new WeakMap,ze=new WeakSet,Ds=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},ac=function(){O(this,bt).forEach(i=>{i.addEventListener("scroll",O(this,Ze),{passive:!0})}),document.addEventListener("scroll",O(this,Ze),{passive:!0})},js=function(){O(this,bt).forEach(i=>{i.removeEventListener("scroll",O(this,Ze))}),document.removeEventListener("scroll",O(this,Ze))},lc=function(){if(wo(this,bt,[]),!O(this,Ye))return;let i=getComputedStyle(O(this,Ye));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=O(this,Ye);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=pt(this,ze,Hs).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&O(this,bt).push(r),i.position==="fixed")return;r=pt(this,ze,Hs).call(this,r)}O(this,bt).push(document.body)},Hs=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},Qe.styles=[v`
|
|
7749
|
+
:host {
|
|
7750
|
+
margin: 0;
|
|
7751
|
+
width: fit-content;
|
|
7752
|
+
height: fit-content;
|
|
7753
|
+
border: none;
|
|
7754
|
+
border-radius: 0;
|
|
7755
|
+
padding: 0;
|
|
7756
|
+
background-color: none;
|
|
7757
|
+
background: none;
|
|
7758
|
+
overflow: visible;
|
|
7759
|
+
color: var(--uui-color-text,#060606);
|
|
7760
|
+
}
|
|
7761
|
+
`],Nt([l({type:Number})],Qe.prototype,"margin",2),Nt([l({type:Boolean})],Qe.prototype,"open",1),Nt([l({type:String,reflect:!0})],Qe.prototype,"placement",1),Nt([w()],Qe.prototype,"_placement",2),Nt([w()],Qe.prototype,"_open",2),Nt([w()],Qe.prototype,"_actualPlacement",2),Qe=Nt([Pr("uui-popover-container")],Qe);var R0=Object.getOwnPropertyDescriptor,F0=(i,e,t,r)=>{for(var o=r>1?void 0:r?R0(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(o=a(o)||o);return o};let Rs=class extends f{render(){return p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
7762
|
+
<circle cx="17" cy="50" r="9"></circle>
|
|
7763
|
+
<circle cx="50" cy="50" r="9"></circle>
|
|
7764
|
+
<circle cx="83" cy="50" r="9"></circle>
|
|
7765
|
+
</svg>`}};Rs.styles=[v`
|
|
7766
|
+
:host {
|
|
7767
|
+
display: inline-block;
|
|
7768
|
+
vertical-align: bottom;
|
|
7769
|
+
width: 1.15em;
|
|
7770
|
+
height: 1.15em;
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
svg {
|
|
7774
|
+
fill: currentColor;
|
|
7775
|
+
}
|
|
7776
|
+
`],Rs=F0([Pr("uui-symbol-more")],Rs);var W0=Object.defineProperty,G0=Object.getOwnPropertyDescriptor,uc=i=>{throw TypeError(i)},Si=(i,e,t,r)=>{for(var o=r>1?void 0:r?G0(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&&W0(e,t,o),o},Fs=(i,e,t)=>e.has(i)||uc("Cannot "+t),I=(i,e,t)=>(Fs(i,e,"read from private field"),t?t.call(i):e.get(i)),Le=(i,e,t)=>e.has(i)?uc("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Je=(i,e,t,r)=>(Fs(i,e,"write to private field"),e.set(i,t),t),Oe=(i,e,t)=>(Fs(i,e,"access private method"),t),Te,ke,et,vt,zr,ko,Uo,Eo,de,cc,hc,Ws,Gs,qs,Ks,Ai;s.UUIResponsiveContainerElement=class extends f{constructor(){super(...arguments),Le(this,de),this.collapse="end",Le(this,Te,[]),Le(this,ke,[]),Le(this,et,new Map),Le(this,vt,[]),Le(this,zr,new ResizeObserver(Oe(this,de,hc).bind(this))),Le(this,ko,[]),Le(this,Uo,!1),Le(this,Eo,!1),Le(this,Ai,e=>{const t=e.currentTarget,r=I(this,et).get(t);r&&(this._popoverContainerElement?.hidePopover(),r.click())})}connectedCallback(){super.connectedCallback(),Je(this,Eo,!0),Oe(this,de,cc).call(this)}disconnectedCallback(){super.disconnectedCallback(),Je(this,Eo,!1),I(this,zr).disconnect(),Oe(this,de,Gs).call(this)}render(){const e=h`
|
|
7777
|
+
<uui-button
|
|
7778
|
+
popovertarget="popover-container"
|
|
7779
|
+
style="display: none"
|
|
7780
|
+
id="more-button"
|
|
7781
|
+
label="More"
|
|
7782
|
+
compact>
|
|
7783
|
+
<slot name="trigger-content">
|
|
7784
|
+
<uui-symbol-more></uui-symbol-more>
|
|
7785
|
+
</slot>
|
|
7786
|
+
</uui-button>
|
|
7787
|
+
`;return h`
|
|
7788
|
+
<div id="main">
|
|
7789
|
+
${this.collapse==="start"?e:""}
|
|
7790
|
+
<div id="items-container">
|
|
7791
|
+
<slot @slotchange=${Oe(this,de,Ws)}></slot>
|
|
7792
|
+
</div>
|
|
7793
|
+
${this.collapse==="end"?e:""}
|
|
7794
|
+
</div>
|
|
7795
|
+
<uui-popover-container
|
|
7796
|
+
id="popover-container"
|
|
7797
|
+
popover
|
|
7798
|
+
placement=${this.collapse==="start"?"bottom-start":"bottom-end"}>
|
|
7799
|
+
<div id="dropdown-container">
|
|
7800
|
+
${dr(I(this,ke),t=>h`${t}`)}
|
|
7801
|
+
</div>
|
|
7802
|
+
</uui-popover-container>
|
|
7803
|
+
`}},Te=new WeakMap,ke=new WeakMap,et=new WeakMap,vt=new WeakMap,zr=new WeakMap,ko=new WeakMap,Uo=new WeakMap,Eo=new WeakMap,de=new WeakSet,cc=async function(){Ii(this,"uui-button"),Ii(this,"uui-popover-container"),Ii(this,"uui-symbol-more"),await this.updateComplete,I(this,zr).observe(this._mainElement),requestAnimationFrame(()=>{Oe(this,de,Ws).call(this)})},hc=function(i){const e=i[0].contentBoxSize[0].inlineSize;Oe(this,de,Ks).call(this,e)},Ws=function(){I(this,Eo)&&(Oe(this,de,Gs).call(this),Je(this,Te,this._slottedNodes?[...this._slottedNodes]:[]),I(this,Te).forEach(i=>{const e=new ResizeObserver(Oe(this,de,qs).bind(this));e.observe(i),I(this,ko).push(e)}),Oe(this,de,qs).call(this))},Gs=function(){I(this,ko).forEach(i=>i.disconnect()),Je(this,ko,[]),Je(this,vt,[]),I(this,ke).forEach(i=>{i.removeEventListener("click",I(this,Ai))}),Je(this,ke,[]),I(this,et).clear()},qs=async function(){if(I(this,Uo))return;Je(this,Uo,!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,Te).length;o++)I(this,Te)[o].style.display="",t+=I(this,Te)[o].offsetWidth,I(this,vt)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",Oe(this,de,Ks).call(this,this._mainElement.offsetWidth),Je(this,Uo,!1)},Ks=function(i){const e=this._moreButtonElement?.offsetWidth||40,t=i-e;I(this,ke).forEach(o=>{o.removeEventListener("click",I(this,Ai))}),Je(this,ke,[]),I(this,et).clear();const r=I(this,vt).length;if(this.collapse==="end")for(let o=0;o<r;o++){const n=I(this,vt)[o],a=I(this,Te)[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,Ai)),I(this,et).set(c,a),I(this,et).set(a,c),I(this,ke).push(c)}}else{const o=I(this,vt)[r-1]||0;for(let n=0;n<r;n++){const a=I(this,Te)[n],u=o-(n>0?I(this,vt)[n-1]:0),c=(n===0||I(this,Te)[n-1].style.display==="none")&&I(this,ke).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,Ai)),I(this,et).set(d,a),I(this,et).set(a,d),I(this,ke).push(d)}}}I(this,ke).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement?.hidePopover()):this._moreButtonElement.style.display="",this.requestUpdate()},Ai=new WeakMap,s.UUIResponsiveContainerElement.styles=[v`
|
|
7804
|
+
:host {
|
|
7805
|
+
display: flex;
|
|
7806
|
+
min-width: 0;
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
#main {
|
|
7810
|
+
display: flex;
|
|
7811
|
+
overflow: hidden;
|
|
7812
|
+
align-items: center;
|
|
7813
|
+
}
|
|
7814
|
+
|
|
7815
|
+
#items-container {
|
|
7816
|
+
display: flex;
|
|
7817
|
+
gap: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
7818
|
+
overflow: hidden;
|
|
7819
|
+
align-items: center;
|
|
7820
|
+
}
|
|
7821
|
+
|
|
7822
|
+
#more-button {
|
|
7823
|
+
--uui-button-background-color: transparent;
|
|
7824
|
+
--uui-button-background-color-hover: var(--uui-color-surface-alt,#f3f3f5);
|
|
7825
|
+
flex-shrink: 0;
|
|
7826
|
+
}
|
|
7827
|
+
|
|
7828
|
+
:host([collapse='end']) #more-button,
|
|
7829
|
+
:host(:not([collapse])) #more-button {
|
|
7830
|
+
margin-left: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
7831
|
+
}
|
|
7832
|
+
|
|
7833
|
+
:host([collapse='start']) #more-button {
|
|
7834
|
+
margin-right: var(--uui-responsive-container-gap, var(--uui-size-3,9px));
|
|
7835
|
+
}
|
|
7836
|
+
|
|
7837
|
+
#dropdown-container {
|
|
7838
|
+
display: flex;
|
|
7839
|
+
flex-direction: column;
|
|
7840
|
+
background-color: var(--uui-color-surface,#fff);
|
|
7841
|
+
border-radius: var(--uui-border-radius,3px);
|
|
7842
|
+
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));
|
|
7843
|
+
overflow: hidden;
|
|
7844
|
+
padding: var(--uui-size-space-2,6px);
|
|
7845
|
+
gap: var(--uui-size-space-1,3px);
|
|
7846
|
+
}
|
|
7847
|
+
`],Si([S("#more-button")],s.UUIResponsiveContainerElement.prototype,"_moreButtonElement",2),Si([S("#popover-container")],s.UUIResponsiveContainerElement.prototype,"_popoverContainerElement",2),Si([S("#main")],s.UUIResponsiveContainerElement.prototype,"_mainElement",2),Si([l({type:String,reflect:!0})],s.UUIResponsiveContainerElement.prototype,"collapse",2),Si([Be({flatten:!0})],s.UUIResponsiveContainerElement.prototype,"_slottedNodes",2),s.UUIResponsiveContainerElement=Si([Pr("uui-responsive-container")],s.UUIResponsiveContainerElement),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=ln,s.UUICardEvent=Hi,s.UUIColorAreaEvent=$n,s.UUIColorPickerChangeEvent=Ki,s.UUIColorSliderEvent=Mn,s.UUIColorSwatchesEvent=Zi,s.UUIComboboxEvent=we,s.UUIComboboxListEvent=ye,s.UUICopyTextEvent=Di,s.UUIEvent=rn,s.UUIFileDropzoneEvent=to,s.UUIFormControlEvent=kt,s.UUIFormControlMixin=ph,s.UUIHorizontalPulseAnimationValue=Xc,s.UUIHorizontalPulseKeyframes=Kc,s.UUIHorizontalShakeAnimationValue=Zc,s.UUIHorizontalShakeKeyframes=Yc,s.UUIIconHost=Rn,s.UUIIconRegistry=Fn,s.UUIIconRegistryEssential=tu,s.UUIIconRequestEvent=io,s.UUIInputEvent=oo,s.UUIInputLockEvent=Gn,s.UUIInterfaceColorValues=xh,s.UUIInterfaceHeadingValues=Ih,s.UUIInterfaceLookValues=Eh,s.UUIMenuItemEvent=pi,s.UUIModalCloseEndEvent=uu,s.UUIModalCloseEvent=vi,s.UUIModalElement=ce,s.UUIModalOpenEvent=lu,s.UUIPaginationEvent=Pt,s.UUIRadioEvent=co,s.UUIRadioGroupEvent=hs,s.UUIRefEvent=bo,s.UUISelectEvent=Es,s.UUISelectableEvent=Bi,s.UUISliderEvent=vo,s.UUITabEvent=s0,s.UUITabGroupEvent=a0,s.UUITextStyles=qt,s.UUITextareaEvent=Os,s.UUIToastNotificationEvent=$e,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
7848
|
//# sourceMappingURL=uui.min.js.map
|