@umbraco-cms/backoffice 14.0.0--preview004-63582e12 → 14.0.0--preview004-b290cf8b
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.
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const mr=window,zo=mr.ShadowRoot&&(mr.ShadyCSS===void 0||mr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Io=Symbol(),un=new WeakMap;let cn=class{constructor(e,i,o){if(this._$cssResult$=!0,o!==Io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o;const i=this.t;if(zo&&e===void 0){const o=i!==void 0&&i.length===1;o&&(e=un.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&un.set(i,e))}return e}toString(){return this.cssText}};const he=t=>new cn(typeof t=="string"?t:t+"",void 0,Io),d=(t,...e)=>{const i=t.length===1?t[0]:e.reduce((o,r,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1],t[0]);return new cn(i,t,Io)},rc=(t,e)=>{zo?t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet):e.forEach(i=>{const o=document.createElement("style"),r=mr.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,t.appendChild(o)})},hn=zo?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let i="";for(const o of e.cssRules)i+=o.cssText;return he(i)})(t):t;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ao;const _r=window,dn=_r.trustedTypes,oc=dn?dn.emptyScript:"",pn=_r.reactiveElementPolyfillSupport,Uo={toAttribute(t,e){switch(e){case Boolean:t=t?oc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},vn=(t,e)=>e!==t&&(e==e||t==t),Do={attribute:!0,type:String,converter:Uo,reflect:!1,hasChanged:vn};let Nt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var i;this.finalize(),((i=this.h)!==null&&i!==void 0?i:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((i,o)=>{const r=this._$Ep(o,i);r!==void 0&&(this._$Ev.set(r,o),e.push(r))}),e}static createProperty(e,i=Do){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(e,i),!i.noAccessor&&!this.prototype.hasOwnProperty(e)){const o=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,o,i);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,i,o){return{get(){return this[i]},set(r){const s=this[e];this[i]=r,this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Do}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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 i=this.properties,o=[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)];for(const r of o)this.createProperty(r,i[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const i=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const r of o)i.unshift(hn(r))}else e!==void 0&&i.push(hn(e));return i}static _$Ep(e,i){const o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(i=>i(this))}addController(e){var i,o;((i=this._$ES)!==null&&i!==void 0?i:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)===null||o===void 0||o.call(e))}removeController(e){var i;(i=this._$ES)===null||i===void 0||i.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])})}createRenderRoot(){var e;const i=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return rc(i,this.constructor.elementStyles),i}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostConnected)===null||o===void 0?void 0:o.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostDisconnected)===null||o===void 0?void 0:o.call(i)})}attributeChangedCallback(e,i,o){this._$AK(e,o)}_$EO(e,i,o=Do){var r;const s=this.constructor._$Ep(e,o);if(s!==void 0&&o.reflect===!0){const n=(((r=o.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?o.converter:Uo).toAttribute(i,o.type);this._$El=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$El=null}}_$AK(e,i){var o;const r=this.constructor,s=r._$Ev.get(e);if(s!==void 0&&this._$El!==s){const n=r.getPropertyOptions(s),u=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?n.converter:Uo;this._$El=s,this[s]=u.fromAttribute(i,n.type),this._$El=null}}requestUpdate(e,i,o){let r=!0;e!==void 0&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||vn)(this[e],i)?(this._$AL.has(e)||this._$AL.set(e,i),o.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(i){Promise.reject(i)}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((r,s)=>this[s]=r),this._$Ei=void 0);let i=!1;const o=this._$AL;try{i=this.shouldUpdate(o),i?(this.willUpdate(o),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var s;return(s=r.hostUpdate)===null||s===void 0?void 0:s.call(r)}),this.update(o)):this._$Ek()}catch(r){throw i=!1,this._$Ek(),r}i&&this._$AE(o)}willUpdate(e){}_$AE(e){var i;(i=this._$ES)===null||i===void 0||i.forEach(o=>{var r;return(r=o.hostUpdated)===null||r===void 0?void 0:r.call(o)}),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((i,o)=>this._$EO(o,this[o],i)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Nt.finalized=!0,Nt.elementProperties=new Map,Nt.elementStyles=[],Nt.shadowRootOptions={mode:"open"},pn?.({ReactiveElement:Nt}),((Ao=_r.reactiveElementVersions)!==null&&Ao!==void 0?Ao:_r.reactiveElementVersions=[]).push("1.6.1");/**
|
|
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 Lo;const yr=window,Vt=yr.trustedTypes,fn=Vt?Vt.createPolicy("lit-html",{createHTML:t=>t}):void 0,xr="$lit$",Le=`lit$${(Math.random()+"").slice(9)}$`,Mo="?"+Le,sc=`<${Mo}>`,ct=document,Oi=()=>ct.createComment(""),ki=t=>t===null||typeof t!="object"&&typeof t!="function",bn=Array.isArray,gn=t=>bn(t)||typeof t?.[Symbol.iterator]=="function",To=`[
|
|
14
|
+
\f\r]`,Si=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mn=/-->/g,_n=/>/g,ht=RegExp(`>|${To}(?:([^\\s"'>=/]+)(${To}*=${To}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),yn=/'/g,xn=/"/g,wn=/^(?:script|style|textarea|title)$/i,$n=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),l=$n(1),_=$n(2),K=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),En=new WeakMap,dt=ct.createTreeWalker(ct,129,null,!1);function Cn(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return fn!==void 0?fn.createHTML(e):e}const Pn=(t,e)=>{const i=t.length-1,o=[];let r,s=e===2?"<svg>":"",n=Si;for(let u=0;u<i;u++){const c=t[u];let h,f,m=-1,g=0;for(;g<c.length&&(n.lastIndex=g,f=n.exec(c),f!==null);)g=n.lastIndex,n===Si?f[1]==="!--"?n=mn:f[1]!==void 0?n=_n:f[2]!==void 0?(wn.test(f[2])&&(r=RegExp("</"+f[2],"g")),n=ht):f[3]!==void 0&&(n=ht):n===ht?f[0]===">"?(n=r??Si,m=-1):f[1]===void 0?m=-2:(m=n.lastIndex-f[2].length,h=f[1],n=f[3]===void 0?ht:f[3]==='"'?xn:yn):n===xn||n===yn?n=ht:n===mn||n===_n?n=Si:(n=ht,r=void 0);const x=n===ht&&t[u+1].startsWith("/>")?" ":"";s+=n===Si?c+sc:m>=0?(o.push(h),c.slice(0,m)+xr+c.slice(m)+Le+x):c+Le+(m===-2?(o.push(void 0),u):x)}return[Cn(t,s+(t[i]||"<?>")+(e===2?"</svg>":"")),o]};let No=class tc{constructor({strings:e,_$litType$:i},o){let r;this.parts=[];let s=0,n=0;const u=e.length-1,c=this.parts,[h,f]=Pn(e,i);if(this.el=tc.createElement(h,o),dt.currentNode=this.el.content,i===2){const m=this.el.content,g=m.firstChild;g.remove(),m.append(...g.childNodes)}for(;(r=dt.nextNode())!==null&&c.length<u;){if(r.nodeType===1){if(r.hasAttributes()){const m=[];for(const g of r.getAttributeNames())if(g.endsWith(xr)||g.startsWith(Le)){const x=f[n++];if(m.push(g),x!==void 0){const $=r.getAttribute(x.toLowerCase()+xr).split(Le),P=/([.?@])?(.*)/.exec(x);c.push({type:1,index:s,name:P[2],strings:$,ctor:P[1]==="."?kn:P[1]==="?"?Sn:P[1]==="@"?zn:zi})}else c.push({type:6,index:s})}for(const g of m)r.removeAttribute(g)}if(wn.test(r.tagName)){const m=r.textContent.split(Le),g=m.length-1;if(g>0){r.textContent=Vt?Vt.emptyScript:"";for(let x=0;x<g;x++)r.append(m[x],Oi()),dt.nextNode(),c.push({type:2,index:++s});r.append(m[g],Oi())}}}else if(r.nodeType===8)if(r.data===Mo)c.push({type:2,index:s});else{let m=-1;for(;(m=r.data.indexOf(Le,m+1))!==-1;)c.push({type:7,index:s}),m+=Le.length-1}s++}}static createElement(e,i){const o=ct.createElement("template");return o.innerHTML=e,o}};function pt(t,e,i=t,o){var r,s,n,u;if(e===K)return e;let c=o!==void 0?(r=i._$Co)===null||r===void 0?void 0:r[o]:i._$Cl;const h=ki(e)?void 0:e._$litDirective$;return c?.constructor!==h&&((s=c?._$AO)===null||s===void 0||s.call(c,!1),h===void 0?c=void 0:(c=new h(t),c._$AT(t,i,o)),o!==void 0?((n=(u=i)._$Co)!==null&&n!==void 0?n:u._$Co=[])[o]=c:i._$Cl=c),c!==void 0&&(e=pt(t,c._$AS(t,e.values),c,o)),e}let On=class{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var i;const{el:{content:o},parts:r}=this._$AD,s=((i=e?.creationScope)!==null&&i!==void 0?i:ct).importNode(o,!0);dt.currentNode=s;let n=dt.nextNode(),u=0,c=0,h=r[0];for(;h!==void 0;){if(u===h.index){let f;h.type===2?f=new Ci(n,n.nextSibling,this,e):h.type===1?f=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(f=new In(n,this,e)),this._$AV.push(f),h=r[++c]}u!==h?.index&&(n=dt.nextNode(),u++)}return dt.currentNode=ct,s}v(e){let i=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,i),i+=o.strings.length-2):o._$AI(e[i])),i++}};class Ci{constructor(e,i,o,r){var s;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=o,this.options=r,this._$Cp=(s=r?.isConnected)===null||s===void 0||s}get _$AU(){var e,i;return(i=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&i!==void 0?i:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=pt(this,e,i),ki(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==K&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):gn(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!==w&&ki(this._$AH)?this._$AA.nextSibling.data=e:this.$(ct.createTextNode(e)),this._$AH=e}g(e){var i;const{values:o,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=No.createElement(Cn(r.h,r.h[0]),this.options)),r);if(((i=this._$AH)===null||i===void 0?void 0:i._$AD)===s)this._$AH.v(o);else{const n=new On(s,this),u=n.u(this.options);n.v(o),this.$(u),this._$AH=n}}_$AC(e){let i=En.get(e.strings);return i===void 0&&En.set(e.strings,i=new No(e)),i}T(e){bn(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,r=0;for(const s of e)r===i.length?i.push(o=new Ci(this.k(Oi()),this.k(Oi()),this,this.options)):o=i[r],o._$AI(s),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(e=this._$AA.nextSibling,i){var o;for((o=this._$AP)===null||o===void 0||o.call(this,!1,!0,i);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var i;this._$AM===void 0&&(this._$Cp=e,(i=this._$AP)===null||i===void 0||i.call(this,e))}}let zi=class{constructor(e,i,o,r,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=i,this._$AM=r,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,i=this,o,r){const s=this.strings;let n=!1;if(s===void 0)e=pt(this,e,i,0),n=!ki(e)||e!==this._$AH&&e!==K,n&&(this._$AH=e);else{const u=e;let c,h;for(e=s[0],c=0;c<s.length-1;c++)h=pt(this,u[o+c],i,c),h===K&&(h=this._$AH[c]),n||(n=!ki(h)||h!==this._$AH[c]),h===w?e=w:e!==w&&(e+=(h??"")+s[c+1]),this._$AH[c]=h}n&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},kn=class extends zi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}};const nc=Vt?Vt.emptyScript:"";class Sn extends zi{constructor(){super(...arguments),this.type=4}j(e){e&&e!==w?this.element.setAttribute(this.name,nc):this.element.removeAttribute(this.name)}}class zn extends zi{constructor(e,i,o,r,s){super(e,i,o,r,s),this.type=5}_$AI(e,i=this){var o;if((e=(o=pt(this,e,i,0))!==null&&o!==void 0?o:w)===K)return;const r=this._$AH,s=e===w&&r!==w||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==w&&(r===w||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var i,o;typeof this._$AH=="function"?this._$AH.call((o=(i=this.options)===null||i===void 0?void 0:i.host)!==null&&o!==void 0?o:this.element,e):this._$AH.handleEvent(e)}}class In{constructor(e,i,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){pt(this,e)}}const ac={O:xr,P:Le,A:Mo,C:1,M:Pn,L:On,R:gn,D:pt,I:Ci,V:zi,H:Sn,N:zn,U:kn,F:In},An=yr.litHtmlPolyfillSupport;An?.(No,Ci),((Lo=yr.litHtmlVersions)!==null&&Lo!==void 0?Lo:yr.litHtmlVersions=[]).push("2.8.0");const lc=(t,e,i)=>{var o,r;const s=(o=i?.renderBefore)!==null&&o!==void 0?o:e;let n=s._$litPart$;if(n===void 0){const u=(r=i?.renderBefore)!==null&&r!==void 0?r:null;s._$litPart$=n=new Ci(e.insertBefore(Oi(),u),u,void 0,i??{})}return n._$AI(t),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
19
|
+
*/var Vo,jo;let v=class extends Nt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,i;const o=super.createRenderRoot();return(e=(i=this.renderOptions).renderBefore)!==null&&e!==void 0||(i.renderBefore=o.firstChild),o}update(e){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=lc(i,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 K}};v.finalized=!0,v._$litElement$=!0,(Vo=globalThis.litElementHydrateSupport)===null||Vo===void 0||Vo.call(globalThis,{LitElement:v});const Un=globalThis.litElementPolyfillSupport;Un?.({LitElement:v}),((jo=globalThis.litElementVersions)!==null&&jo!==void 0?jo:globalThis.litElementVersions=[]).push("3.3.2");var uc=`.uui-text {
|
|
20
20
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
21
21
|
font-size: 15px;
|
|
22
22
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -184,15 +184,11 @@
|
|
|
184
184
|
margin-top: var(--uui-size-layout-1,24px);
|
|
185
185
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
186
186
|
}
|
|
187
|
-
`;const
|
|
187
|
+
`;const cc=he(uc);/**
|
|
188
188
|
* @license
|
|
189
189
|
* Copyright 2017 Google LLC
|
|
190
190
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
191
|
-
*/const
|
|
192
|
-
* @license
|
|
193
|
-
* Copyright 2017 Google LLC
|
|
194
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
195
|
-
*/const Uu=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function a(t){return(e,i)=>i!==void 0?((o,r,s)=>{r.constructor.createProperty(s,o)})(t,e,i):Uu(t,e)}/**
|
|
191
|
+
*/const hc=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function a(t){return(e,i)=>i!==void 0?((o,r,s)=>{r.constructor.createProperty(s,o)})(t,e,i):hc(t,e)}/**
|
|
196
192
|
* @license
|
|
197
193
|
* Copyright 2017 Google LLC
|
|
198
194
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -200,19 +196,19 @@
|
|
|
200
196
|
* @license
|
|
201
197
|
* Copyright 2017 Google LLC
|
|
202
198
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
203
|
-
*/const
|
|
199
|
+
*/const Ho=({finisher:t,descriptor:e})=>(i,o)=>{var r;if(o===void 0){const s=(r=i.originalKey)!==null&&r!==void 0?r:i.key,n=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return t!=null&&(n.finisher=function(u){t(u,s)}),n}{const s=i.constructor;e!==void 0&&Object.defineProperty(i,o,e(o)),t?.(s,o)}};/**
|
|
204
200
|
* @license
|
|
205
201
|
* Copyright 2017 Google LLC
|
|
206
202
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
207
|
-
*/function O(t,e){return
|
|
203
|
+
*/function O(t,e){return Ho({descriptor:i=>{const o={get(){var r,s;return(s=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){const r=typeof i=="symbol"?Symbol():"__"+i;o.get=function(){var s,n;return this[r]===void 0&&(this[r]=(n=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&n!==void 0?n:null),this[r]}}return o}})}/**
|
|
208
204
|
* @license
|
|
209
205
|
* Copyright 2017 Google LLC
|
|
210
206
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
211
|
-
*/function
|
|
207
|
+
*/function dc(t){return Ho({descriptor:e=>({get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelectorAll(t))!==null&&o!==void 0?o:[]},enumerable:!0,configurable:!0})})}/**
|
|
212
208
|
* @license
|
|
213
209
|
* Copyright 2021 Google LLC
|
|
214
210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
215
|
-
*/var
|
|
211
|
+
*/var Bo;const pc=((Bo=window.HTMLSlotElement)===null||Bo===void 0?void 0:Bo.prototype.assignedElements)!=null?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter(i=>i.nodeType===Node.ELEMENT_NODE);function Ye(t){const{slot:e,selector:i}=t??{};return Ho({descriptor:o=>({get(){var r;const s="slot"+(e?`[name=${e}]`:":not([name])"),n=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(s),u=n!=null?pc(n,t):[];return i?u.filter(c=>c.matches(i)):u},enumerable:!0,configurable:!0})})}const vc=d`
|
|
216
212
|
@keyframes uui-blink {
|
|
217
213
|
0%,
|
|
218
214
|
100% {
|
|
@@ -222,7 +218,7 @@
|
|
|
222
218
|
opacity: 1;
|
|
223
219
|
}
|
|
224
220
|
}
|
|
225
|
-
`,
|
|
221
|
+
`,fc=he("uui-blink 0.9s infinite both"),bc=d`
|
|
226
222
|
@keyframes pulse {
|
|
227
223
|
0% {
|
|
228
224
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -240,7 +236,7 @@
|
|
|
240
236
|
opacity: 0;
|
|
241
237
|
}
|
|
242
238
|
}
|
|
243
|
-
`,
|
|
239
|
+
`,gc=he("pulse 0.8s ease-in-out infinite both"),mc=d`
|
|
244
240
|
@keyframes uui-horizontal-shake {
|
|
245
241
|
10%,
|
|
246
242
|
90% {
|
|
@@ -263,14 +259,14 @@
|
|
|
263
259
|
transform: translateX(2px);
|
|
264
260
|
}
|
|
265
261
|
}
|
|
266
|
-
`,
|
|
262
|
+
`,_c=he("uui-horizontal-shake 600ms ease backwards");var yc=Object.defineProperty,Dn=Object.getOwnPropertySymbols,xc=Object.prototype.hasOwnProperty,wc=Object.prototype.propertyIsEnumerable,Ln=(t,e,i)=>e in t?yc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,$c=(t,e)=>{for(var i in e||(e={}))xc.call(e,i)&&Ln(t,i,e[i]);if(Dn)for(var i of Dn(e))wc.call(e,i)&&Ln(t,i,e[i]);return t};let Ro=class extends Event{constructor(e,i={}){super(e,$c({},i)),this.detail=i.detail||{}}};var Ec=Object.defineProperty,Mn=Object.getOwnPropertySymbols,Cc=Object.prototype.hasOwnProperty,Pc=Object.prototype.propertyIsEnumerable,Tn=(t,e,i)=>e in t?Ec(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Nn=(t,e)=>{for(var i in e||(e={}))Cc.call(e,i)&&Tn(t,i,e[i]);if(Mn)for(var i of Mn(e))Pc.call(e,i)&&Tn(t,i,e[i]);return t};let vt=class extends Ro{constructor(e,i={}){super(e,Nn(Nn({},{bubbles:!0}),i))}};vt.VALID="valid",vt.INVALID="invalid";var Oc=Object.defineProperty,Vn=Object.getOwnPropertySymbols,kc=Object.prototype.hasOwnProperty,Sc=Object.prototype.propertyIsEnumerable,jn=(t,e,i)=>e in t?Oc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Hn=(t,e)=>{for(var i in e||(e={}))kc.call(e,i)&&jn(t,i,e[i]);if(Vn)for(var i of Vn(e))Sc.call(e,i)&&jn(t,i,e[i]);return t};let ft=class extends Ro{constructor(e,i={}){super(e,Hn(Hn({},{bubbles:!0,cancelable:!0}),i))}};ft.SELECTED="selected",ft.DESELECTED="deselected";var zc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,Ac=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ic(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zc(e,i,r),r};const Uc=t=>{class e extends t{constructor(){super(...arguments),this.active=!1}}return Ac([a({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var Dc=Object.defineProperty,Lc=Object.getOwnPropertyDescriptor,Bn=(t,e,i,o)=>{for(var r=o>1?void 0:o?Lc(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Dc(e,i,r),r};const Mc=(t,e)=>{class i extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(r){this._labelSlotHasContent=r.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return l`
|
|
267
263
|
${this._labelSlotHasContent===!1?l`<span class="label">${this.label}</span>`:""}
|
|
268
264
|
<slot
|
|
269
265
|
class="label"
|
|
270
266
|
style=${this._labelSlotHasContent?"":"visibility: hidden"}
|
|
271
267
|
name=${t||""}
|
|
272
268
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
273
|
-
`}}return
|
|
269
|
+
`}}return Bn([a({type:String})],i.prototype,"label",2),Bn([b()],i.prototype,"_labelSlotHasContent",2),i};var Tc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Rn=(t,e,i,o)=>{for(var r=o>1?void 0:o?Nc(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Tc(e,i,r),r};const Vc=t=>{class e extends t{constructor(...o){super(...o),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=r=>{if(this.selectableTarget===this){if(r.key!==" "&&r.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(o){const r=this._selectable;this._selectable=o,this.selectableTarget||this.setAttribute("tabindex",`${o?"0":"-1"}`),this.requestUpdate("selectable",r)}_select(){if(!this.selectable)return;const o=new ft(ft.SELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const o=new ft(ft.DESELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!1)}_handleClick(o){o.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Rn([a({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Rn([a({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var jc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,Bc=(t,e,i,o)=>{for(var r=o>1?void 0:o?Hc(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&jc(e,i,r),r};const Rc=t=>{class e extends t{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return Bc([a({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var Fc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,bt=(t,e,i,o)=>{for(var r=o>1?void 0:o?Gc(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Fc(e,i,r),r};const Wc=t=>{class e extends t{constructor(...o){super(...o),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(o){const r=this._value;this._value=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",r)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(o,r,s){const n={flagKey:o,getMessageMethod:r,checkMethod:s};return this._validators.push(n),n}removeValidator(o){const r=this._validators.indexOf(o);r!==-1&&this._validators.splice(r,1)}addFormControlElement(o){this._formCtrlElements.push(o)}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(r=>{for(const s in r.validity)s!=="valid"&&r.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,r.validationMessage,r))}),this._validators.forEach(r=>{r.checkMethod()&&(this._validityState[r.flagKey]=!0,this._internals.setValidity(this._validityState,r.getMessageMethod(),this.getFormElement()))});const o=Object.values(this._validityState).includes(!0);this._validityState.valid=!o,o?this.dispatchEvent(new vt(vt.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new vt(vt.VALID)))}updated(o){super.updated(o),this._runValidators()}submit(){var o;(o=this._form)==null||o.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var o;for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return(o=this._internals)==null?void 0:o.checkValidity()}get validity(){return this._validityState}get validationMessage(){var o;return(o=this._internals)==null?void 0:o.validationMessage}}return e.formAssociated=!0,bt([a({type:String})],e.prototype,"name",2),bt([a()],e.prototype,"value",1),bt([a({type:Boolean,reflect:!0})],e.prototype,"pristine",2),bt([a({type:Boolean,reflect:!0})],e.prototype,"required",2),bt([a({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),bt([a({type:Boolean,reflect:!0})],e.prototype,"error",2),bt([a({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e};let qc=class{constructor(e,i){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}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 Kc=(t,e,i=`This element has to be present for ${t.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${t.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",i,t)},Xc=(t,e)=>{function i(r){const s=t.getBoundingClientRect(),n=t.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let h;r instanceof TouchEvent?h=r.touches[0]:h=r;const f=h.pageX-u,m=h.pageY-c;e?.onMove&&e.onMove(f,m)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),e?.onStop&&e.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),e?.initialEvent&&i(e.initialEvent)},Yc=(t,e,i)=>Math.min(Math.max(t,e),i),Zc=(t,e,i)=>i+e-t,Qc=t=>{const e=Math.round(t).toString(16);return e.length===1?`0${e}`:e},Fn=(t,e,i)=>{let o=t;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(e)&&o.getAttribute(e)===i,s=o.querySelector(`[${e}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${e}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function Jc(t){return t?t.assignedNodes({flatten:!0}).length>0:!1}var eh=Object.defineProperty,th=Object.getOwnPropertyDescriptor,ih=(t,e,i,o)=>{for(var r=o>1?void 0:o?th(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&eh(e,i,r),r},Gn=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Wn=(t,e,i)=>(Gn(t,e,"read from private field"),i?i.call(t):e.get(t)),qn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},rh=(t,e,i,o)=>(Gn(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i);const oh=t=>{var e,i;class o extends t{constructor(...s){super(...s),qn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Fn(this,"id",this.popoverContainerElement);n&&(Wn(this,e)?n.hidePopover():n.showPopover())},qn(this,i,n=>{requestAnimationFrame(()=>{rh(this,e,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",Wn(this,i))}}return e=new WeakMap,i=new WeakMap,ih([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement",2),o};function sh(t,e){return i=>{if(t.indexOf("-")>0===!1){console.error(`${t} 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(t)||window.customElements.define(t,i,e)}}const nh=["default","primary","secondary","outline","placeholder"],ah=["default","positive","warning","danger"],lh=["h1","h2","h3","h4","h5","h6"];function p(t,e){return i=>{if(t.indexOf("-")>0===!1){console.error(`${t} 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(t)||window.customElements.define(t,i,e)}}var uh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,hh=(t,e,i,o)=>{for(var r=o>1?void 0:o?ch(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&uh(e,i,r),r};let jt=class extends v{render(){return l`<slot></slot>`}};jt.styles=[d`
|
|
274
270
|
:host {
|
|
275
271
|
display: inline-flex;
|
|
276
272
|
align-items: stretch;
|
|
@@ -297,26 +293,10 @@
|
|
|
297
293
|
var(--uui-border-radius,3px) 0;
|
|
298
294
|
}
|
|
299
295
|
|
|
300
|
-
::slotted(uui-popover) {
|
|
301
|
-
width: unset;
|
|
302
|
-
--uui-popover-toggle-slot-button-border-radius: 0;
|
|
303
|
-
}
|
|
304
|
-
::slotted(uui-popover:not(:first-child)) {
|
|
305
|
-
--uui-popover-toggle-slot-button-merge-border-left: 1;
|
|
306
|
-
}
|
|
307
|
-
::slotted(uui-popover:first-child) {
|
|
308
|
-
--uui-popover-toggle-slot-button-border-radius: var(--uui-border-radius,3px)
|
|
309
|
-
0 0 var(--uui-border-radius,3px);
|
|
310
|
-
}
|
|
311
|
-
::slotted(uui-popover:last-child) {
|
|
312
|
-
--uui-popover-toggle-slot-button-border-radius: 0
|
|
313
|
-
var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
296
|
::slotted(*:hover) {
|
|
317
297
|
z-index: 1;
|
|
318
298
|
}
|
|
319
|
-
`],
|
|
299
|
+
`],jt=hh([p("uui-button-group")],jt);var dh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,vh=(t,e,i,o)=>{for(var r=o>1?void 0:o?ph(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&dh(e,i,r),r};let wr=class extends jt{};wr.styles=[...jt.styles,d`
|
|
320
300
|
::slotted(*) {
|
|
321
301
|
--uui-button-padding-left-factor: 0.5;
|
|
322
302
|
--uui-button-padding-right-factor: 0.5;
|
|
@@ -358,10 +338,10 @@
|
|
|
358
338
|
--uui-button-padding-left-factor: 1.5;
|
|
359
339
|
--uui-button-padding-right-factor: 1.5;
|
|
360
340
|
}
|
|
361
|
-
`],
|
|
341
|
+
`],wr=vh([p("uui-action-bar")],wr);var fh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,$r=(t,e,i,o)=>{for(var r=o>1?void 0:o?bh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&fh(e,i,r),r};let gt=class extends v{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(t){t.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((t,e)=>{t.style.display=e<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return l`
|
|
362
342
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
363
343
|
${this._isLimitExceeded()?l`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}
|
|
364
|
-
`}};
|
|
344
|
+
`}};gt.styles=[d`
|
|
365
345
|
:host {
|
|
366
346
|
display: inline-flex;
|
|
367
347
|
align-items: center;
|
|
@@ -378,7 +358,7 @@
|
|
|
378
358
|
#overflow-indication {
|
|
379
359
|
margin-left: 6px;
|
|
380
360
|
}
|
|
381
|
-
`]
|
|
361
|
+
`],$r([Ye({selector:"uui-avatar, [uui-avatar]",flatten:!0})],gt.prototype,"_avatarNodes",2),$r([b()],gt.prototype,"_avatarArray",2),$r([a({type:Number,attribute:!0})],gt.prototype,"limit",2),gt=$r([p("uui-avatar-group")],gt);var gh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,Ht=(t,e,i,o)=>{for(var r=o>1?void 0:o?mh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&gh(e,i,r),r};let Me=class extends v{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this._name="",this.initials=""}get name(){return this._name}set name(t){const e=this._name;this._name=t,this.initials=this.createInitials(this._name),this.requestUpdate("title",e)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(t){let e="";if(!t)return e;const i=t.match(/(\w+)/g);return i?.length?(e=i[0].substring(0,1),i.length>1&&(e+=i[i.length-1].substring(0,1)),e.toUpperCase()):e}renderImage(){return l` <img
|
|
382
362
|
src="${this.imgSrc}"
|
|
383
363
|
srcset="${this.imgSrcset}"
|
|
384
364
|
alt="${this.initials}"
|
|
@@ -386,7 +366,7 @@
|
|
|
386
366
|
${this.imgSrc?this.renderImage():""}
|
|
387
367
|
${this.imgSrc?"":this.initials}
|
|
388
368
|
<slot></slot>
|
|
389
|
-
`}};
|
|
369
|
+
`}};Me.styles=[d`
|
|
390
370
|
:host {
|
|
391
371
|
display: inline-flex;
|
|
392
372
|
align-items: center;
|
|
@@ -417,7 +397,7 @@
|
|
|
417
397
|
overflow: hidden;
|
|
418
398
|
border-radius: 50%;
|
|
419
399
|
}
|
|
420
|
-
`],
|
|
400
|
+
`],Ht([a({type:Boolean,attribute:!0,reflect:!0})],Me.prototype,"overflow",2),Ht([a({type:String,attribute:"img-src"})],Me.prototype,"imgSrc",2),Ht([a({type:String,attribute:"img-srcset"})],Me.prototype,"imgSrcset",2),Ht([a({type:String,reflect:!0})],Me.prototype,"name",1),Ht([b()],Me.prototype,"initials",2),Me=Ht([p("uui-avatar")],Me);var _h=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,Er=(t,e,i,o)=>{for(var r=o>1?void 0:o?yh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&_h(e,i,r),r};let mt=class extends v{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return l` <slot></slot> `}};mt.styles=[d`
|
|
421
401
|
:host {
|
|
422
402
|
position: var(--uui-badge-position, absolute);
|
|
423
403
|
display: flex;
|
|
@@ -527,14 +507,14 @@
|
|
|
527
507
|
animation: none;
|
|
528
508
|
}
|
|
529
509
|
}
|
|
530
|
-
`],
|
|
510
|
+
`],Er([a({reflect:!0})],mt.prototype,"color",2),Er([a({reflect:!0})],mt.prototype,"look",2),Er([a({type:Boolean,reflect:!0})],mt.prototype,"attention",2),mt=Er([p("uui-badge")],mt);var xh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,$h=(t,e,i,o)=>{for(var r=o>1?void 0:o?wh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&xh(e,i,r),r};const Ii=t=>{class e extends t{constructor(){super(...arguments),this.active=!1}}return $h([a({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var Eh=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,Kn=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ch(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Eh(e,i,r),r};const me=(t,e)=>{class i extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(r){this._labelSlotHasContent=r.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return l`
|
|
531
511
|
${this._labelSlotHasContent===!1?l`<span class="label">${this.label}</span>`:""}
|
|
532
512
|
<slot
|
|
533
513
|
class="label"
|
|
534
514
|
style=${this._labelSlotHasContent?"":"visibility: hidden"}
|
|
535
515
|
name=${t||""}
|
|
536
516
|
@slotchange=${this.labelSlotChanged}></slot>
|
|
537
|
-
`}}return yn([a({type:String})],i.prototype,"label",2),yn([b()],i.prototype,"_labelSlotHasContent",2),i};var Wc=Object.defineProperty,xn=Object.getOwnPropertySymbols,Kc=Object.prototype.hasOwnProperty,Xc=Object.prototype.propertyIsEnumerable,wn=(t,e,i)=>e in t?Wc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Yc=(t,e)=>{for(var i in e||(e={}))Kc.call(e,i)&&wn(t,i,e[i]);if(xn)for(var i of xn(e))Xc.call(e,i)&&wn(t,i,e[i]);return t};let Zc=class extends Event{constructor(e,i={}){super(e,Yc({},i)),this.detail=i.detail||{}}};var Qc=Object.defineProperty,$n=Object.getOwnPropertySymbols,Jc=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,En=(t,e,i)=>e in t?Qc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Pn=(t,e)=>{for(var i in e||(e={}))Jc.call(e,i)&&En(t,i,e[i]);if($n)for(var i of $n(e))eh.call(e,i)&&En(t,i,e[i]);return t};let Tt=class extends Zc{constructor(e,i={}){super(e,Pn(Pn({},{bubbles:!0,cancelable:!0}),i))}};Tt.SELECTED="selected",Tt.DESELECTED="deselected";var th=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,Cn=(t,e,i,o)=>{for(var r=o>1?void 0:o?ih(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&th(e,i,r),r};const Nt=t=>{class e extends t{constructor(...o){super(...o),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=r=>{if(this.selectableTarget===this){if(r.key!==" "&&r.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(o){const r=this._selectable;this._selectable=o,this.selectableTarget||this.setAttribute("tabindex",`${o?"0":"-1"}`),this.requestUpdate("selectable",r)}_select(){if(!this.selectable)return;const o=new Tt(Tt.SELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const o=new Tt(Tt.DESELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!1)}_handleClick(o){o.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Cn([a({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Cn([a({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var rh=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,sh=(t,e,i,o)=>{for(var r=o>1?void 0:o?oh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&rh(e,i,r),r};const br=t=>{class e extends t{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return sh([a({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var nh=Object.defineProperty,On=Object.getOwnPropertySymbols,ah=Object.prototype.hasOwnProperty,lh=Object.prototype.propertyIsEnumerable,kn=(t,e,i)=>e in t?nh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,uh=(t,e)=>{for(var i in e||(e={}))ah.call(e,i)&&kn(t,i,e[i]);if(On)for(var i of On(e))lh.call(e,i)&&kn(t,i,e[i]);return t};let Sn=class extends Event{constructor(e,i={}){super(e,uh({},i)),this.detail=i.detail||{}}};var ch=Object.defineProperty,In=Object.getOwnPropertySymbols,hh=Object.prototype.hasOwnProperty,dh=Object.prototype.propertyIsEnumerable,zn=(t,e,i)=>e in t?ch(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,An=(t,e)=>{for(var i in e||(e={}))hh.call(e,i)&&zn(t,i,e[i]);if(In)for(var i of In(e))dh.call(e,i)&&zn(t,i,e[i]);return t};let Vt=class extends Sn{constructor(e,i={}){super(e,An(An({},{bubbles:!0}),i))}};Vt.VALID="valid",Vt.INVALID="invalid";var ph=Object.defineProperty,Un=Object.getOwnPropertySymbols,vh=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,Dn=(t,e,i)=>e in t?ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ln=(t,e)=>{for(var i in e||(e={}))vh.call(e,i)&&Dn(t,i,e[i]);if(Un)for(var i of Un(e))fh.call(e,i)&&Dn(t,i,e[i]);return t};let Mn=class extends Sn{constructor(e,i={}){super(e,Ln(Ln({},{bubbles:!0,cancelable:!0}),i))}};Mn.SELECTED="selected",Mn.DESELECTED="deselected";var bh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,ft=(t,e,i,o)=>{for(var r=o>1?void 0:o?gh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&bh(e,i,r),r};const fe=t=>{class e extends t{constructor(...o){super(...o),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(o){const r=this._value;this._value=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",r)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(o,r,s){const n={flagKey:o,getMessageMethod:r,checkMethod:s};return this._validators.push(n),n}removeValidator(o){const r=this._validators.indexOf(o);r!==-1&&this._validators.splice(r,1)}addFormControlElement(o){this._formCtrlElements.push(o)}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(r=>{for(const s in r.validity)s!=="valid"&&r.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,r.validationMessage,r))}),this._validators.forEach(r=>{r.checkMethod()&&(this._validityState[r.flagKey]=!0,this._internals.setValidity(this._validityState,r.getMessageMethod(),this.getFormElement()))});const o=Object.values(this._validityState).includes(!0);this._validityState.valid=!o,o?this.dispatchEvent(new Vt(Vt.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new Vt(Vt.VALID)))}updated(o){super.updated(o),this._runValidators()}submit(){var o;(o=this._form)==null||o.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var o;for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return(o=this._internals)==null?void 0:o.checkValidity()}get validity(){return this._validityState}get validationMessage(){var o;return(o=this._internals)==null?void 0:o.validationMessage}}return e.formAssociated=!0,ft([a({type:String})],e.prototype,"name",2),ft([a()],e.prototype,"value",1),ft([a({type:Boolean,reflect:!0})],e.prototype,"pristine",2),ft([a({type:Boolean,reflect:!0})],e.prototype,"required",2),ft([a({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),ft([a({type:Boolean,reflect:!0})],e.prototype,"error",2),ft([a({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e},mh=(t,e,i)=>{let o=t;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(e)&&o.getAttribute(e)===i,s=o.querySelector(`[${e}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${e}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};var _h=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,xh=(t,e,i,o)=>{for(var r=o>1?void 0:o?yh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&_h(e,i,r),r},Tn=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Nn=(t,e,i)=>(Tn(t,e,"read from private field"),i?i.call(t):e.get(t)),Vn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},wh=(t,e,i,o)=>(Tn(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i);const $h=t=>{var e,i;class o extends t{constructor(...s){super(...s),Vn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=mh(this,"id",this.popoverContainerElement);n&&(Nn(this,e)?n.hidePopover():n.showPopover())},Vn(this,i,n=>{requestAnimationFrame(()=>{wh(this,e,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",Nn(this,i))}}return e=new WeakMap,i=new WeakMap,xh([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement",2),o};var Eh=Object.defineProperty,jn=Object.getOwnPropertySymbols,Ph=Object.prototype.hasOwnProperty,Ch=Object.prototype.propertyIsEnumerable,Hn=(t,e,i)=>e in t?Eh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Oh=(t,e)=>{for(var i in e||(e={}))Ph.call(e,i)&&Hn(t,i,e[i]);if(jn)for(var i of jn(e))Ch.call(e,i)&&Hn(t,i,e[i]);return t};class k extends Event{constructor(e,i={}){super(e,Oh({},i)),this.detail=i.detail||{}}}var kh=Object.defineProperty,Bn=Object.getOwnPropertySymbols,Sh=Object.prototype.hasOwnProperty,Ih=Object.prototype.propertyIsEnumerable,Rn=(t,e,i)=>e in t?kh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Fn=(t,e)=>{for(var i in e||(e={}))Sh.call(e,i)&&Rn(t,i,e[i]);if(Bn)for(var i of Bn(e))Ih.call(e,i)&&Rn(t,i,e[i]);return t};class jt extends k{constructor(e,i={}){super(e,Fn(Fn({},{bubbles:!0}),i))}}jt.VALID="valid",jt.INVALID="invalid";var zh=Object.defineProperty,Gn=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Uh=Object.prototype.propertyIsEnumerable,qn=(t,e,i)=>e in t?zh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Wn=(t,e)=>{for(var i in e||(e={}))Ah.call(e,i)&&qn(t,i,e[i]);if(Gn)for(var i of Gn(e))Uh.call(e,i)&&qn(t,i,e[i]);return t};class Xe extends k{constructor(e,i={}){super(e,Wn(Wn({},{bubbles:!0,cancelable:!0}),i))}}Xe.SELECTED="selected",Xe.DESELECTED="deselected";var Dh=Object.defineProperty,Kn=Object.getOwnPropertySymbols,Lh=Object.prototype.hasOwnProperty,Mh=Object.prototype.propertyIsEnumerable,Xn=(t,e,i)=>e in t?Dh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Yn=(t,e)=>{for(var i in e||(e={}))Lh.call(e,i)&&Xn(t,i,e[i]);if(Kn)for(var i of Kn(e))Mh.call(e,i)&&Xn(t,i,e[i]);return t};class gr extends k{constructor(e,i={}){super(e,Yn(Yn({},{bubbles:!0}),i))}}gr.CHANGE="change";var Th=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,mr=(t,e,i,o)=>{for(var r=o>1?void 0:o?Nh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Th(e,i,r),r};class be extends fe(ve("",v)){constructor(e="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){const i=this._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",i)}get checked(){return this._checked}set checked(e){const i=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",i)}getFormElement(){return this._input}_onKeypress(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){var i;super.firstUpdated(e);const o=(i=this.shadowRoot)==null?void 0:i.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),o.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),o.addEventListener("mouseup",()=>{r=!1})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new gr(gr.CHANGE))}render(){return l`
|
|
517
|
+
`}}return Kn([a({type:String})],i.prototype,"label",2),Kn([b()],i.prototype,"_labelSlotHasContent",2),i};var Ph=Object.defineProperty,Xn=Object.getOwnPropertySymbols,Oh=Object.prototype.hasOwnProperty,kh=Object.prototype.propertyIsEnumerable,Yn=(t,e,i)=>e in t?Ph(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Sh=(t,e)=>{for(var i in e||(e={}))Oh.call(e,i)&&Yn(t,i,e[i]);if(Xn)for(var i of Xn(e))kh.call(e,i)&&Yn(t,i,e[i]);return t};let zh=class extends Event{constructor(e,i={}){super(e,Sh({},i)),this.detail=i.detail||{}}};var Ih=Object.defineProperty,Zn=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Uh=Object.prototype.propertyIsEnumerable,Qn=(t,e,i)=>e in t?Ih(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Jn=(t,e)=>{for(var i in e||(e={}))Ah.call(e,i)&&Qn(t,i,e[i]);if(Zn)for(var i of Zn(e))Uh.call(e,i)&&Qn(t,i,e[i]);return t};let Bt=class extends zh{constructor(e,i={}){super(e,Jn(Jn({},{bubbles:!0,cancelable:!0}),i))}};Bt.SELECTED="selected",Bt.DESELECTED="deselected";var Dh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,ea=(t,e,i,o)=>{for(var r=o>1?void 0:o?Lh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Dh(e,i,r),r};const Rt=t=>{class e extends t{constructor(...o){super(...o),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=r=>{if(this.selectableTarget===this){if(r.key!==" "&&r.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(o){const r=this._selectable;this._selectable=o,this.selectableTarget||this.setAttribute("tabindex",`${o?"0":"-1"}`),this.requestUpdate("selectable",r)}_select(){if(!this.selectable)return;const o=new Bt(Bt.SELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const o=new Bt(Bt.DESELECTED);this.dispatchEvent(o),!o.defaultPrevented&&(this.selected=!1)}_handleClick(o){o.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return ea([a({type:Boolean,reflect:!0})],e.prototype,"selectable",1),ea([a({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Mh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Nh=(t,e,i,o)=>{for(var r=o>1?void 0:o?Th(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Mh(e,i,r),r};const Cr=t=>{class e extends t{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(o){const r=this._selectOnly;this._selectOnly=o,this.requestUpdate("selectOnly",r)}}return Nh([a({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var Vh=Object.defineProperty,ta=Object.getOwnPropertySymbols,jh=Object.prototype.hasOwnProperty,Hh=Object.prototype.propertyIsEnumerable,ia=(t,e,i)=>e in t?Vh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Bh=(t,e)=>{for(var i in e||(e={}))jh.call(e,i)&&ia(t,i,e[i]);if(ta)for(var i of ta(e))Hh.call(e,i)&&ia(t,i,e[i]);return t};let ra=class extends Event{constructor(e,i={}){super(e,Bh({},i)),this.detail=i.detail||{}}};var Rh=Object.defineProperty,oa=Object.getOwnPropertySymbols,Fh=Object.prototype.hasOwnProperty,Gh=Object.prototype.propertyIsEnumerable,sa=(t,e,i)=>e in t?Rh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,na=(t,e)=>{for(var i in e||(e={}))Fh.call(e,i)&&sa(t,i,e[i]);if(oa)for(var i of oa(e))Gh.call(e,i)&&sa(t,i,e[i]);return t};let Ft=class extends ra{constructor(e,i={}){super(e,na(na({},{bubbles:!0}),i))}};Ft.VALID="valid",Ft.INVALID="invalid";var Wh=Object.defineProperty,aa=Object.getOwnPropertySymbols,qh=Object.prototype.hasOwnProperty,Kh=Object.prototype.propertyIsEnumerable,la=(t,e,i)=>e in t?Wh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ua=(t,e)=>{for(var i in e||(e={}))qh.call(e,i)&&la(t,i,e[i]);if(aa)for(var i of aa(e))Kh.call(e,i)&&la(t,i,e[i]);return t};let ca=class extends ra{constructor(e,i={}){super(e,ua(ua({},{bubbles:!0,cancelable:!0}),i))}};ca.SELECTED="selected",ca.DESELECTED="deselected";var Xh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,_t=(t,e,i,o)=>{for(var r=o>1?void 0:o?Yh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Xh(e,i,r),r};const _e=t=>{class e extends t{constructor(...o){super(...o),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(o){const r=this._value;this._value=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",r)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(o,r,s){const n={flagKey:o,getMessageMethod:r,checkMethod:s};return this._validators.push(n),n}removeValidator(o){const r=this._validators.indexOf(o);r!==-1&&this._validators.splice(r,1)}addFormControlElement(o){this._formCtrlElements.push(o)}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(r=>{for(const s in r.validity)s!=="valid"&&r.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,r.validationMessage,r))}),this._validators.forEach(r=>{r.checkMethod()&&(this._validityState[r.flagKey]=!0,this._internals.setValidity(this._validityState,r.getMessageMethod(),this.getFormElement()))});const o=Object.values(this._validityState).includes(!0);this._validityState.valid=!o,o?this.dispatchEvent(new Ft(Ft.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new Ft(Ft.VALID)))}updated(o){super.updated(o),this._runValidators()}submit(){var o;(o=this._form)==null||o.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){var o;for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return(o=this._internals)==null?void 0:o.checkValidity()}get validity(){return this._validityState}get validationMessage(){var o;return(o=this._internals)==null?void 0:o.validationMessage}}return e.formAssociated=!0,_t([a({type:String})],e.prototype,"name",2),_t([a()],e.prototype,"value",1),_t([a({type:Boolean,reflect:!0})],e.prototype,"pristine",2),_t([a({type:Boolean,reflect:!0})],e.prototype,"required",2),_t([a({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),_t([a({type:Boolean,reflect:!0})],e.prototype,"error",2),_t([a({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e},Zh=(t,e,i)=>{let o=t;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(e)&&o.getAttribute(e)===i,s=o.querySelector(`[${e}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${e}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,ed=(t,e,i,o)=>{for(var r=o>1?void 0:o?Jh(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Qh(e,i,r),r},ha=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},da=(t,e,i)=>(ha(t,e,"read from private field"),i?i.call(t):e.get(t)),pa=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},td=(t,e,i,o)=>(ha(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i);const id=t=>{var e,i;class o extends t{constructor(...s){super(...s),pa(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Zh(this,"id",this.popoverContainerElement);n&&(da(this,e)?n.hidePopover():n.showPopover())},pa(this,i,n=>{requestAnimationFrame(()=>{td(this,e,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",da(this,i))}}return e=new WeakMap,i=new WeakMap,ed([a({type:String,attribute:"popovertarget"})],o.prototype,"popoverContainerElement",2),o};var rd=Object.defineProperty,va=Object.getOwnPropertySymbols,od=Object.prototype.hasOwnProperty,sd=Object.prototype.propertyIsEnumerable,fa=(t,e,i)=>e in t?rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,nd=(t,e)=>{for(var i in e||(e={}))od.call(e,i)&&fa(t,i,e[i]);if(va)for(var i of va(e))sd.call(e,i)&&fa(t,i,e[i]);return t};class S extends Event{constructor(e,i={}){super(e,nd({},i)),this.detail=i.detail||{}}}var ad=Object.defineProperty,ba=Object.getOwnPropertySymbols,ld=Object.prototype.hasOwnProperty,ud=Object.prototype.propertyIsEnumerable,ga=(t,e,i)=>e in t?ad(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ma=(t,e)=>{for(var i in e||(e={}))ld.call(e,i)&&ga(t,i,e[i]);if(ba)for(var i of ba(e))ud.call(e,i)&&ga(t,i,e[i]);return t};class Gt extends S{constructor(e,i={}){super(e,ma(ma({},{bubbles:!0}),i))}}Gt.VALID="valid",Gt.INVALID="invalid";var cd=Object.defineProperty,_a=Object.getOwnPropertySymbols,hd=Object.prototype.hasOwnProperty,dd=Object.prototype.propertyIsEnumerable,ya=(t,e,i)=>e in t?cd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,xa=(t,e)=>{for(var i in e||(e={}))hd.call(e,i)&&ya(t,i,e[i]);if(_a)for(var i of _a(e))dd.call(e,i)&&ya(t,i,e[i]);return t};class Ze extends S{constructor(e,i={}){super(e,xa(xa({},{bubbles:!0,cancelable:!0}),i))}}Ze.SELECTED="selected",Ze.DESELECTED="deselected";var pd=Object.defineProperty,wa=Object.getOwnPropertySymbols,vd=Object.prototype.hasOwnProperty,fd=Object.prototype.propertyIsEnumerable,$a=(t,e,i)=>e in t?pd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ea=(t,e)=>{for(var i in e||(e={}))vd.call(e,i)&&$a(t,i,e[i]);if(wa)for(var i of wa(e))fd.call(e,i)&&$a(t,i,e[i]);return t};class Pr extends S{constructor(e,i={}){super(e,Ea(Ea({},{bubbles:!0}),i))}}Pr.CHANGE="change";var bd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,Or=(t,e,i,o)=>{for(var r=o>1?void 0:o?gd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&bd(e,i,r),r};class ye extends _e(me("",v)){constructor(e="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){const i=this._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",i)}get checked(){return this._checked}set checked(e){const i=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",i)}getFormElement(){return this._input}_onKeypress(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){var i;super.firstUpdated(e);const o=(i=this.shadowRoot)==null?void 0:i.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),o.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),o.addEventListener("mouseup",()=>{r=!1})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new Pr(Pr.CHANGE))}render(){return l`
|
|
538
518
|
<label>
|
|
539
519
|
<input
|
|
540
520
|
id="input"
|
|
@@ -547,7 +527,7 @@
|
|
|
547
527
|
role="${this.inputRole}" />
|
|
548
528
|
${this.renderCheckbox()} ${this.renderLabel()}
|
|
549
529
|
</label>
|
|
550
|
-
`}}
|
|
530
|
+
`}}ye.styles=[d`
|
|
551
531
|
:host {
|
|
552
532
|
display: inline-block;
|
|
553
533
|
}
|
|
@@ -587,7 +567,7 @@
|
|
|
587
567
|
:host([disabled]) .label {
|
|
588
568
|
opacity: 0.5;
|
|
589
569
|
}
|
|
590
|
-
`],
|
|
570
|
+
`],Or([a({type:String,attribute:"label-position",reflect:!0})],ye.prototype,"labelPosition",2),Or([a({type:Boolean})],ye.prototype,"checked",1),Or([a({type:Boolean,reflect:!0})],ye.prototype,"disabled",2),Or([O("#input")],ye.prototype,"_input",2);var md=`.uui-text {
|
|
591
571
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
592
572
|
font-size: 15px;
|
|
593
573
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -755,15 +735,15 @@
|
|
|
755
735
|
margin-top: var(--uui-size-layout-1,24px);
|
|
756
736
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
757
737
|
}
|
|
758
|
-
`;const
|
|
738
|
+
`;const _d=he(md);/**
|
|
759
739
|
* @license
|
|
760
740
|
* Copyright 2020 Google LLC
|
|
761
741
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
762
|
-
*/const
|
|
763
|
-
take care to ensure page security.`)})(o)+t[r+1],t[0]),r:
|
|
742
|
+
*/const Fo=Symbol.for(""),yd=t=>{if(t?.r===Fo)return t?._$litStatic$},xd=t=>({_$litStatic$:t,r:Fo}),Ca=(t,...e)=>({_$litStatic$:e.reduce((i,o,r)=>i+(s=>{if(s._$litStatic$!==void 0)return s._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${s}. Use 'unsafeStatic' to pass non-literal values, but
|
|
743
|
+
take care to ensure page security.`)})(o)+t[r+1],t[0]),r:Fo}),Pa=new Map,wd=t=>(e,...i)=>{const o=i.length;let r,s;const n=[],u=[];let c,h=0,f=!1;for(;h<o;){for(c=e[h];h<o&&(s=i[h],(r=yd(s))!==void 0);)c+=r+e[++h],f=!0;h!==o&&u.push(s),n.push(c),h++}if(h===o&&n.push(e[o]),f){const m=n.join("$$lit$$");(e=Pa.get(m))===void 0&&(n.raw=n,Pa.set(m,e=n)),i=u}return t(e,...i)},Oa=wd(l);var $d=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,yt=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ed(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&$d(e,i,r),r};function Go(t){return t?t.assignedNodes({flatten:!0}).length>0:!1}let xe=class extends v{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag=Ca`h5`,this._headlineSlotHasContent=!1,this._headlineSlotChanged=t=>{this._headlineSlotHasContent=Go(t.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=t=>{this._headerSlotHasContent=Go(t.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=t=>{this._headerActionsSlotHasContent=Go(t.target)}}set headlineVariant(t){t?this._headlineVariantTag=xd(t):this._headlineVariantTag=Ca`h5`}renderHeader(){return Oa`<div
|
|
764
744
|
id="header"
|
|
765
745
|
class="uui-text"
|
|
766
|
-
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
746
|
+
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
767
747
|
<${this._headlineVariantTag}
|
|
768
748
|
id="headline"
|
|
769
749
|
class="uui-h5"
|
|
@@ -772,10 +752,11 @@
|
|
|
772
752
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
773
753
|
</${this._headlineVariantTag}>
|
|
774
754
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
775
|
-
|
|
755
|
+
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
756
|
+
</div>`}render(){return Oa`
|
|
776
757
|
${this.renderHeader()}
|
|
777
758
|
<slot></slot>
|
|
778
|
-
`}};
|
|
759
|
+
`}};xe.styles=[_d,d`
|
|
779
760
|
:host {
|
|
780
761
|
display: block;
|
|
781
762
|
box-shadow: var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,0.12) , 0 1px 2px rgba(0,0,0,0.24));
|
|
@@ -784,7 +765,8 @@
|
|
|
784
765
|
}
|
|
785
766
|
|
|
786
767
|
#header {
|
|
787
|
-
display:
|
|
768
|
+
display: flex;
|
|
769
|
+
column-gap: var(--uui-size-space-5,18px);
|
|
788
770
|
border-bottom: 1px solid var(--uui-color-divider-standalone,#e9e9eb);
|
|
789
771
|
padding: var(--uui-size-space-4,12px) var(--uui-size-space-5,18px);
|
|
790
772
|
}
|
|
@@ -793,8 +775,13 @@
|
|
|
793
775
|
display: block;
|
|
794
776
|
padding: var(--uui-box-default-padding, var(--uui-size-space-5,18px));
|
|
795
777
|
}
|
|
796
|
-
|
|
797
|
-
|
|
778
|
+
|
|
779
|
+
slot[name='header-actions'] {
|
|
780
|
+
display: block;
|
|
781
|
+
margin-left: auto;
|
|
782
|
+
}
|
|
783
|
+
`],yt([a({type:String})],xe.prototype,"headline",2),yt([a({attribute:"headline-variant"})],xe.prototype,"headlineVariant",1),yt([b()],xe.prototype,"_headlineVariantTag",2),yt([b()],xe.prototype,"_headlineSlotHasContent",2),yt([b()],xe.prototype,"_headerSlotHasContent",2),yt([b()],xe.prototype,"_headerActionsSlotHasContent",2),xe=yt([p("uui-box")],xe);var Cd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,Wo=(t,e,i,o)=>{for(var r=o>1?void 0:o?Pd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Cd(e,i,r),r};let xt=class extends v{constructor(){super(...arguments),this.href="#",this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}renderLinkAndSeparator(){return l`<a id="link" href=${this.href}><slot></slot></a
|
|
784
|
+
><span part="separator"></span>`}renderCurrent(){return l`<span id="last-item"><slot></slot></span>`}render(){return l`${this.lastItem?this.renderCurrent():this.renderLinkAndSeparator()}`}};xt.styles=[d`
|
|
798
785
|
:host {
|
|
799
786
|
font-size: var(--uui-type-small-size,12px);
|
|
800
787
|
color: currentColor;
|
|
@@ -832,9 +819,9 @@
|
|
|
832
819
|
#link {
|
|
833
820
|
cursor: pointer;
|
|
834
821
|
}
|
|
835
|
-
`],
|
|
822
|
+
`],Wo([a()],xt.prototype,"href",2),Wo([a({type:Boolean,attribute:"last-item"})],xt.prototype,"lastItem",2),xt=Wo([p("uui-breadcrumb-item")],xt);var Od=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,ka=(t,e,i,o)=>{for(var r=o>1?void 0:o?kd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Od(e,i,r),r};let Ai=class extends v{elementIsBreadcrumbItem(t){return t instanceof xt}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation")}handleSlotChange(){if(this.slotNodes.length>0){const t=this.slotNodes[this.slotNodes.length-1];t.setAttribute("aria-current","page"),this.elementIsBreadcrumbItem(t)&&(t.lastItem=!0)}}render(){return l`<ol id="breadcrumbs-list">
|
|
836
823
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
837
|
-
</ol>`}};
|
|
824
|
+
</ol>`}};Ai.styles=[d`
|
|
838
825
|
:host {
|
|
839
826
|
display: flex;
|
|
840
827
|
}
|
|
@@ -848,7 +835,7 @@
|
|
|
848
835
|
margin-inline-end: 0px;
|
|
849
836
|
padding-inline-start: 0px;
|
|
850
837
|
}
|
|
851
|
-
`],
|
|
838
|
+
`],ka([Ye({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],Ai.prototype,"slotNodes",2),Ai=ka([p("uui-breadcrumbs")],Ai);const Sd=d`
|
|
852
839
|
@keyframes uui-blink {
|
|
853
840
|
0%,
|
|
854
841
|
100% {
|
|
@@ -858,7 +845,7 @@
|
|
|
858
845
|
opacity: 1;
|
|
859
846
|
}
|
|
860
847
|
}
|
|
861
|
-
`,
|
|
848
|
+
`,zd=he("uui-blink 0.9s infinite both"),Id=d`
|
|
862
849
|
@keyframes pulse {
|
|
863
850
|
0% {
|
|
864
851
|
-webkit-transform: translate(-50%, -50%) scale(0.2);
|
|
@@ -876,7 +863,7 @@
|
|
|
876
863
|
opacity: 0;
|
|
877
864
|
}
|
|
878
865
|
}
|
|
879
|
-
`;
|
|
866
|
+
`;he("pulse 0.8s ease-in-out infinite both");const kr=d`
|
|
880
867
|
@keyframes uui-horizontal-shake {
|
|
881
868
|
10%,
|
|
882
869
|
90% {
|
|
@@ -899,15 +886,15 @@
|
|
|
899
886
|
transform: translateX(2px);
|
|
900
887
|
}
|
|
901
888
|
}
|
|
902
|
-
`,
|
|
889
|
+
`,Sr=he("uui-horizontal-shake 600ms ease backwards");/**
|
|
903
890
|
* @license
|
|
904
891
|
* Copyright 2017 Google LLC
|
|
905
892
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
906
|
-
*/const
|
|
893
|
+
*/const de={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Wt=t=>(...e)=>({_$litDirective$:t,values:e});let qt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,o){this._$Ct=e,this._$AM=i,this._$Ci=o}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};/**
|
|
907
894
|
* @license
|
|
908
895
|
* Copyright 2018 Google LLC
|
|
909
896
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
910
|
-
*/const
|
|
897
|
+
*/const Sa="important",Ad=" !"+Sa,we=Wt(class extends qt{constructor(t){var e;if(super(t),t.type!==de.ATTRIBUTE||t.name!=="style"||((e=t.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(t){return Object.keys(t).reduce((e,i)=>{const o=t[i];return o==null?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(t,[e]){const{style:i}=t.element;if(this.ht===void 0){this.ht=new Set;for(const o in e)this.ht.add(o);return this.render(e)}this.ht.forEach(o=>{e[o]==null&&(this.ht.delete(o),o.includes("-")?i.removeProperty(o):i[o]="")});for(const o in e){const r=e[o];if(r!=null){this.ht.add(o);const s=typeof r=="string"&&r.endsWith(Ad);o.includes("-")||s?i.setProperty(o,s?r.slice(0,-11):r,s?Sa:""):i[o]=r}}return K}});var Ud=Object.defineProperty,za=Object.getOwnPropertySymbols,Dd=Object.prototype.hasOwnProperty,Ld=Object.prototype.propertyIsEnumerable,Ia=(t,e,i)=>e in t?Ud(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Aa=(t,e)=>{for(var i in e||(e={}))Dd.call(e,i)&&Ia(t,i,e[i]);if(za)for(var i of za(e))Ld.call(e,i)&&Ia(t,i,e[i]);return t};class zr extends S{constructor(e,i={}){super(e,Aa(Aa({},{bubbles:!0,composed:!0}),i))}}zr.CLICK="click";var Md=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,Ir=(t,e,i,o)=>{for(var r=o>1?void 0:o?Td(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Md(e,i,r),r};let wt=class extends v{constructor(){super(...arguments),this._position=0,this.vertical=!1}_onMouseMove(t){this._position=this.vertical?t.offsetY:t.offsetX}_handleClick(t){t.preventDefault(),t.stopImmediatePropagation(),this.dispatchEvent(new zr(zr.CLICK))}render(){return l`
|
|
911
898
|
<button
|
|
912
899
|
id="button-wrapper"
|
|
913
900
|
@mousemove=${this._onMouseMove}
|
|
@@ -915,7 +902,7 @@
|
|
|
915
902
|
aria-label=${this.label?this.label:"create new element"}>
|
|
916
903
|
<div
|
|
917
904
|
id="plus"
|
|
918
|
-
style=${
|
|
905
|
+
style=${we({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}>
|
|
919
906
|
<svg
|
|
920
907
|
id="plus-icon"
|
|
921
908
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -925,7 +912,7 @@
|
|
|
925
912
|
</svg>
|
|
926
913
|
</div>
|
|
927
914
|
</button>
|
|
928
|
-
`}};
|
|
915
|
+
`}};wt.styles=[Sd,d`
|
|
929
916
|
:host {
|
|
930
917
|
display: flex;
|
|
931
918
|
position: relative;
|
|
@@ -979,7 +966,7 @@
|
|
|
979
966
|
:host(:focus) #button-wrapper:before,
|
|
980
967
|
:host(:focus-within) #button-wrapper:before,
|
|
981
968
|
:host(:hover) #button-wrapper:before {
|
|
982
|
-
animation: ${
|
|
969
|
+
animation: ${zd};
|
|
983
970
|
background-color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
984
971
|
border-color: var(--uui-color-surface,#fff) !important;
|
|
985
972
|
}
|
|
@@ -1075,21 +1062,21 @@
|
|
|
1075
1062
|
#button-wrapper:active #plus {
|
|
1076
1063
|
transform: scale(1.1);
|
|
1077
1064
|
}
|
|
1078
|
-
`],
|
|
1065
|
+
`],Ir([b()],wt.prototype,"_position",2),Ir([a({type:String})],wt.prototype,"label",2),Ir([a({type:Boolean,reflect:!0})],wt.prototype,"vertical",2),wt=Ir([p("uui-button-inline-create")],wt);class Nd{constructor(e,i){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(i)}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 y=(t,e,i=`This element has to be present for ${t.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${t.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",i,t)},Ua=(t,e)=>{function i(r){const s=t.getBoundingClientRect(),n=t.ownerDocument.defaultView,u=s.left+n.scrollX,c=s.top+n.scrollY;let h;r instanceof TouchEvent?h=r.touches[0]:h=r;const f=h.pageX-u,m=h.pageY-c;e?.onMove&&e.onMove(f,m)}function o(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",o),e?.onStop&&e.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",o),e?.initialEvent&&i(e.initialEvent)},z=(t,e,i)=>Math.min(Math.max(t,e),i),Da=(t,e,i)=>i+e-t,Vd=(t,e,i)=>{let o=t;for(;o!==null;){const r=o instanceof HTMLElement&&o.hasAttribute(e)&&o.getAttribute(e)===i,s=o.querySelector(`[${e}="${i}"]`)!==null;if(r)return o;if(s)return o.querySelector(`[${e}="${i}"]`);o=o.parentElement||o.parentNode||o.host||null}return null};function jd(t){return t?t.assignedNodes({flatten:!0}).length>0:!1}const Ar=_`<svg xmlns="http://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>`,Hd=_`<svg xmlns="http://www.w3.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>`,Bd=_`<svg xmlns="http://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>`,Rd=_`<svg xmlns="http://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>`,qo=_`<svg xmlns="http://www.w3.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>`,Fd=_`<svg xmlns="http://www.w3.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>`,Gd=_`<svg xmlns="http://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>`,Wd=_`<svg xmlns="http://www.w3.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>`,qd=_`<svg xmlns="http://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>`;/**
|
|
1079
1066
|
* @license
|
|
1080
1067
|
* Copyright 2018 Google LLC
|
|
1081
1068
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1082
|
-
*/const
|
|
1069
|
+
*/const C=t=>t??w;var Kd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,$e=(t,e,i,o)=>{for(var r=o>1?void 0:o?Xd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Kd(e,i,r),r};let X=class extends _e(me("",id(v))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}_onHostClick(t){var e;if(this.disabled){t.preventDefault(),t.stopImmediatePropagation();return}if((e=this._internals)!=null&&e.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(t){super.updated(t),t.has("state")&&(clearTimeout(this._resetStateTimeout),(this.state==="success"||this.state==="failed")&&(this._resetStateTimeout=setTimeout(()=>this.state=void 0,2e3)))}renderState(){let t;switch(this.state){case"waiting":y(this,"uui-loader-circle"),t=l`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":y(this,"uui-icon"),t=l`<uui-icon
|
|
1083
1070
|
name="check"
|
|
1084
|
-
.fallback=${
|
|
1071
|
+
.fallback=${Ar.strings[0]}></uui-icon>`;break;case"failed":y(this,"uui-icon"),t=l`<uui-icon
|
|
1085
1072
|
name="wrong"
|
|
1086
|
-
.fallback=${
|
|
1073
|
+
.fallback=${qd.strings[0]}></uui-icon>`;break;default:return w}return l`<div id="state">${t}</div>`}render(){return this.href?l`
|
|
1087
1074
|
<a
|
|
1088
1075
|
id="button"
|
|
1089
1076
|
aria-label=${this.label}
|
|
1090
|
-
href=${
|
|
1091
|
-
target=${
|
|
1092
|
-
rel=${
|
|
1077
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
1078
|
+
target=${C(this.target||void 0)}
|
|
1079
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}>
|
|
1093
1080
|
${this.renderState()} ${this.renderLabel()}
|
|
1094
1081
|
<slot name="extra"></slot>
|
|
1095
1082
|
</a>
|
|
@@ -1101,7 +1088,7 @@
|
|
|
1101
1088
|
${this.renderState()} ${this.renderLabel()}
|
|
1102
1089
|
<slot name="extra"></slot>
|
|
1103
1090
|
</button>
|
|
1104
|
-
`}};
|
|
1091
|
+
`}};X.styles=[kr,d`
|
|
1105
1092
|
:host {
|
|
1106
1093
|
position: relative;
|
|
1107
1094
|
display: inline-flex;
|
|
@@ -1189,11 +1176,10 @@
|
|
|
1189
1176
|
}
|
|
1190
1177
|
button[disabled]:active,
|
|
1191
1178
|
a:not([href]):active {
|
|
1192
|
-
animation: ${
|
|
1179
|
+
animation: ${Sr};
|
|
1193
1180
|
}
|
|
1194
1181
|
#icon-check,
|
|
1195
1182
|
#icon-wrong {
|
|
1196
|
-
fill: currentColor;
|
|
1197
1183
|
display: grid;
|
|
1198
1184
|
place-items: center;
|
|
1199
1185
|
width: 1.5em;
|
|
@@ -1404,7 +1390,7 @@
|
|
|
1404
1390
|
var(--color-standalone)
|
|
1405
1391
|
);
|
|
1406
1392
|
}
|
|
1407
|
-
`]
|
|
1393
|
+
`],$e([a({type:String,reflect:!0})],X.prototype,"type",2),$e([a({type:Boolean,reflect:!0})],X.prototype,"disabled",2),$e([a({reflect:!0})],X.prototype,"look",2),$e([a({reflect:!0})],X.prototype,"color",2),$e([a({type:Boolean,reflect:!0})],X.prototype,"compact",2),$e([a({type:String,reflect:!0})],X.prototype,"state",2),$e([a({type:String})],X.prototype,"href",2),$e([a({type:String})],X.prototype,"target",2),$e([O("#button")],X.prototype,"_button",2),X=$e([p("uui-button")],X);class Kt extends S{}Kt.OPEN="open";var Yd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,Ui=(t,e,i,o)=>{for(var r=o>1?void 0:o?Zd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Yd(e,i,r),r};let R=class extends Cr(Rt(v)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(t){this.disabled||(t.stopPropagation(),this.dispatchEvent(new Kt(Kt.OPEN)))}handleOpenKeydown(t){this.disabled||t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new Kt(Kt.OPEN)))}render(){return l`<slot></slot>`}};R.styles=[d`
|
|
1408
1394
|
:host {
|
|
1409
1395
|
position: relative;
|
|
1410
1396
|
display: flex;
|
|
@@ -1419,12 +1405,17 @@
|
|
|
1419
1405
|
transition: box-shadow 100ms ease-out;
|
|
1420
1406
|
}
|
|
1421
1407
|
|
|
1422
|
-
:host(*)
|
|
1408
|
+
:host(*) {
|
|
1423
1409
|
/* TODO: implement globally shared outline style */
|
|
1424
1410
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
1425
1411
|
outline-offset: 4px;
|
|
1426
1412
|
}
|
|
1427
1413
|
|
|
1414
|
+
:host(*) * {
|
|
1415
|
+
/* TODO: implement globally shared outline style */
|
|
1416
|
+
outline-color: var(--uui-color-focus,#3879ff);
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1428
1419
|
:host(:focus) {
|
|
1429
1420
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
1430
1421
|
outline-width: var(--uui-card-border-width);
|
|
@@ -1488,17 +1479,141 @@
|
|
|
1488
1479
|
text-decoration: none;
|
|
1489
1480
|
color: inherit;
|
|
1490
1481
|
}
|
|
1491
|
-
`],
|
|
1492
|
-
|
|
1482
|
+
`],Ui([a({type:Boolean,reflect:!0,attribute:"disabled"})],R.prototype,"disabled",2),Ui([a({type:Boolean,reflect:!0})],R.prototype,"error",2),Ui([a({type:String})],R.prototype,"href",2),Ui([a({type:String})],R.prototype,"target",2),R=Ui([p("uui-card")],R);var Qd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,Ur=(t,e,i,o)=>{for(var r=o>1?void 0:o?Jd(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Qd(e,i,r),r},ep=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},La=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ma=(t,e,i)=>(ep(t,e,"access private method"),i),Ko,Ta,Xo,Na;let $t=class extends R{constructor(){super(...arguments),La(this,Ko),La(this,Xo),this.name=""}render(){return l`
|
|
1483
|
+
<div
|
|
1484
|
+
id="portrait"
|
|
1485
|
+
style=${we({backgroundColor:this.background})}>
|
|
1486
|
+
<slot></slot>
|
|
1487
|
+
</div>
|
|
1488
|
+
${this.href?Ma(this,Xo,Na).call(this):Ma(this,Ko,Ta).call(this)}
|
|
1489
|
+
|
|
1490
|
+
<slot name="tag"></slot>
|
|
1491
|
+
<slot name="actions"></slot>
|
|
1492
|
+
`}};Ko=new WeakSet,Ta=function(){return l`
|
|
1493
|
+
<button
|
|
1494
|
+
id="open-part"
|
|
1495
|
+
tabindex=${this.disabled?w:"0"}
|
|
1496
|
+
@click=${this.handleOpenClick}
|
|
1497
|
+
@keydown=${this.handleOpenKeydown}>
|
|
1498
|
+
<strong>${this.name}</strong><small>${this.description}</small>
|
|
1499
|
+
</button>
|
|
1500
|
+
`},Xo=new WeakSet,Na=function(){return l`
|
|
1501
|
+
<a
|
|
1502
|
+
id="open-part"
|
|
1503
|
+
tabindex=${this.disabled?w:"0"}
|
|
1504
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
1505
|
+
target=${C(this.target||void 0)}
|
|
1506
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}>
|
|
1507
|
+
<strong>${this.name}</strong><small>${this.description}</small>
|
|
1508
|
+
</a>
|
|
1509
|
+
`},$t.styles=[...R.styles,d`
|
|
1510
|
+
:host {
|
|
1511
|
+
flex-direction: column;
|
|
1512
|
+
justify-content: flex-start;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
:host(:hover) #info {
|
|
1516
|
+
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
#portrait {
|
|
1520
|
+
background-color: var(--uui-color-surface-alt,#f3f3f5);
|
|
1521
|
+
display: flex;
|
|
1522
|
+
justify-content: center;
|
|
1523
|
+
min-height: 150px;
|
|
1524
|
+
max-height: 150px;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
slot:not([name])::slotted(*) {
|
|
1528
|
+
align-self: center;
|
|
1529
|
+
font-size: var(--uui-size-8,24px);
|
|
1530
|
+
border-radius: var(--uui-border-radius,3px);
|
|
1531
|
+
object-fit: cover;
|
|
1532
|
+
max-width: 100%;
|
|
1533
|
+
max-height: 100%;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
#open-part {
|
|
1537
|
+
text-align: left;
|
|
1538
|
+
background-color: var(--uui-color-surface,#fff);
|
|
1539
|
+
cursor: pointer;
|
|
1540
|
+
color: var(--uui-color-interactive,#1b264f);
|
|
1541
|
+
border: none;
|
|
1542
|
+
border-top: 1px solid var(--uui-color-divider,#f6f6f7);
|
|
1543
|
+
border-radius: 0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);
|
|
1544
|
+
font-family: inherit;
|
|
1545
|
+
font-size: var(--uui-type-small-size,12px);
|
|
1546
|
+
box-sizing: border-box;
|
|
1547
|
+
padding: var(--uui-size-2,6px) var(--uui-size-4,12px);
|
|
1548
|
+
display: flex;
|
|
1549
|
+
flex-direction: column;
|
|
1550
|
+
line-height: var(--uui-size-6,18px);
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
:host([disabled]) #open-part {
|
|
1554
|
+
pointer-events: none;
|
|
1555
|
+
background: var(--uui-color-disabled,#f3f3f5);
|
|
1556
|
+
color: var(--uui-color-contrast-disabled);
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
#open-part:hover strong {
|
|
1560
|
+
text-decoration: underline;
|
|
1561
|
+
}
|
|
1562
|
+
#open-part:hover {
|
|
1563
|
+
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
:host([image]:not([image=''])) #open-part {
|
|
1567
|
+
transition: opacity 0.5s 0.5s;
|
|
1568
|
+
opacity: 0;
|
|
1569
|
+
}
|
|
1570
|
+
slot[name='tag'] {
|
|
1571
|
+
position: absolute;
|
|
1572
|
+
top: var(--uui-size-4,12px);
|
|
1573
|
+
right: var(--uui-size-4,12px);
|
|
1574
|
+
display: flex;
|
|
1575
|
+
justify-content: right;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
slot[name='actions'] {
|
|
1579
|
+
position: absolute;
|
|
1580
|
+
top: var(--uui-size-4,12px);
|
|
1581
|
+
right: var(--uui-size-4,12px);
|
|
1582
|
+
display: flex;
|
|
1583
|
+
justify-content: right;
|
|
1584
|
+
|
|
1585
|
+
opacity: 0;
|
|
1586
|
+
transition: opacity 120ms;
|
|
1587
|
+
}
|
|
1588
|
+
:host(:focus) slot[name='actions'],
|
|
1589
|
+
:host(:focus-within) slot[name='actions'],
|
|
1590
|
+
:host(:hover) slot[name='actions'] {
|
|
1591
|
+
opacity: 1;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
:host(
|
|
1595
|
+
[image]:not([image='']):hover,
|
|
1596
|
+
[image]:not([image='']):focus,
|
|
1597
|
+
[image]:not([image='']):focus-within,
|
|
1598
|
+
[selected][image]:not([image='']),
|
|
1599
|
+
[error][image]:not([image=''])
|
|
1600
|
+
)
|
|
1601
|
+
#open-part {
|
|
1602
|
+
opacity: 1;
|
|
1603
|
+
transition-duration: 120ms;
|
|
1604
|
+
transition-delay: 0s;
|
|
1605
|
+
}
|
|
1606
|
+
`],Ur([a({type:String})],$t.prototype,"name",2),Ur([a({type:String})],$t.prototype,"description",2),Ur([a({type:String,attribute:"background"})],$t.prototype,"background",2),$t=Ur([p("uui-card-block-type")],$t);var tp=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,Yo=(t,e,i,o)=>{for(var r=o>1?void 0:o?ip(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&tp(e,i,r),r},rp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Va=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ja=(t,e,i)=>(rp(t,e,"access private method"),i),Zo,Ha,Qo,Ba;let Xt=class extends R{constructor(){super(...arguments),Va(this,Zo),Va(this,Qo),this.name="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}_onSlotIconChange(t){this._iconSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return y(this,"uui-icon"),l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return l`
|
|
1607
|
+
${this.href?ja(this,Qo,Ba).call(this):ja(this,Zo,Ha).call(this)}
|
|
1493
1608
|
<!-- Select border must be right after #open-part -->
|
|
1494
1609
|
<div id="select-border"></div>
|
|
1495
1610
|
|
|
1496
1611
|
<slot></slot>
|
|
1497
1612
|
<slot name="tag"></slot>
|
|
1498
1613
|
<slot name="actions"></slot>
|
|
1499
|
-
`}};
|
|
1614
|
+
`}};Zo=new WeakSet,Ha=function(){return l`<div
|
|
1500
1615
|
id="open-part"
|
|
1501
|
-
tabindex=${this.disabled
|
|
1616
|
+
tabindex=${this.disabled?w:0}
|
|
1502
1617
|
@click=${this.handleOpenClick}
|
|
1503
1618
|
@keydown=${this.handleOpenKeydown}>
|
|
1504
1619
|
<span id="icon">
|
|
@@ -1506,18 +1621,18 @@
|
|
|
1506
1621
|
${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}
|
|
1507
1622
|
</span>
|
|
1508
1623
|
<span id="name"> ${this.name} </span>
|
|
1509
|
-
</div>`},
|
|
1624
|
+
</div>`},Qo=new WeakSet,Ba=function(){return l`<a
|
|
1510
1625
|
id="open-part"
|
|
1511
|
-
tabindex=${this.disabled
|
|
1512
|
-
href=${
|
|
1513
|
-
target=${
|
|
1514
|
-
rel=${
|
|
1626
|
+
tabindex=${this.disabled?w:0}
|
|
1627
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
1628
|
+
target=${C(this.target||void 0)}
|
|
1629
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}>
|
|
1515
1630
|
<span id="icon">
|
|
1516
1631
|
<slot name="icon" @slotchange=${this._onSlotIconChange}></slot>
|
|
1517
1632
|
${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}
|
|
1518
1633
|
</span>
|
|
1519
1634
|
<span id="name"> ${this.name} </span>
|
|
1520
|
-
</a>`},
|
|
1635
|
+
</a>`},Xt.styles=[...R.styles,d`
|
|
1521
1636
|
:host {
|
|
1522
1637
|
min-width: 250px;
|
|
1523
1638
|
flex-direction: column;
|
|
@@ -1585,14 +1700,14 @@
|
|
|
1585
1700
|
#name {
|
|
1586
1701
|
margin-top: 4px;
|
|
1587
1702
|
}
|
|
1588
|
-
`],
|
|
1703
|
+
`],Yo([a({type:String})],Xt.prototype,"name",2),Yo([b()],Xt.prototype,"_iconSlotHasContent",2),Xt=Yo([p("uui-card-content-node")],Xt);var op=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,np=(t,e,i,o)=>{for(var r=o>1?void 0:o?sp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&op(e,i,r),r};let Dr=class extends v{render(){return l`<svg
|
|
1589
1704
|
xmlns="http://www.w3.org/2000/svg"
|
|
1590
1705
|
viewBox="0 0 512 512"
|
|
1591
1706
|
width="100%"
|
|
1592
1707
|
id="icon">
|
|
1593
1708
|
<path
|
|
1594
1709
|
d="M450.962 169.833v-19.248c0-23.398-19.035-42.436-42.434-42.436H257.306c-5.885-16.926-21.99-29.1-40.885-29.1h-89.758c-20.545 0-37.795 14.391-42.191 33.623-13.891 7.016-23.486 21.45-23.486 37.912V169.897c-7.148 7.774-11.443 18.122-11.443 29.287v.956l.062.953c.045.704 4.639 70.713 5.469 95.492l3.137 93.62c.033 6.024.682 14.788 5.271 23.301 6.564 12.175 19.002 19.442 33.273 19.442h318.49c14.273 0 26.713-7.268 33.275-19.445 4.588-8.512 5.236-17.275 5.271-23.298l3.135-93.62c.832-24.782 5.424-94.788 5.471-95.492l.061-.953v-.956c0-11.203-4.314-21.574-11.496-29.351zM90.093 150.585c0-7.281 5.84-13.189 13.09-13.318h-.125c5.324 0 9.441-9.694 9.441-13.382l-.006-1.562c0-7.824 6.344-14.168 14.17-14.168h89.758c7.826 0 14.166 6.344 14.166 14.168v1.562c0 3.663 4.062 13.239 9.332 13.37h168.609c7.363 0 13.328 5.969 13.328 13.33v9.201H90.093v-9.201zm337.744 145.028c-.854 25.538-3.15 94.062-3.15 94.062 0 7.825-1.617 14.171-9.441 14.171H96.755c-7.822 0-9.439-6.346-9.439-14.171l-3.152-94.062c-.855-25.538-5.516-96.428-5.516-96.428 0-6.893 4.926-12.631 11.445-13.9l331.764-.009c6.547 1.251 11.494 6.998 11.494 13.909 0 .001-4.657 70.89-5.514 96.428z" />
|
|
1595
|
-
</svg> `}};
|
|
1710
|
+
</svg> `}};Dr.styles=[d`
|
|
1596
1711
|
:host {
|
|
1597
1712
|
display: block;
|
|
1598
1713
|
box-sizing: border-box;
|
|
@@ -1603,7 +1718,7 @@
|
|
|
1603
1718
|
#icon {
|
|
1604
1719
|
fill: var(--uui-color-border,#d8d7d9);
|
|
1605
1720
|
}
|
|
1606
|
-
`],
|
|
1721
|
+
`],Dr=np([p("uui-symbol-folder")],Dr);var ap=Object.defineProperty,lp=Object.getOwnPropertyDescriptor,Ra=(t,e,i,o)=>{for(var r=o>1?void 0:o?lp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&ap(e,i,r),r};let Di=class extends v{constructor(){super(...arguments),this.type=""}render(){return l`<svg
|
|
1607
1722
|
xmlns="http://www.w3.org/2000/svg"
|
|
1608
1723
|
viewBox="0 0 512 512"
|
|
1609
1724
|
width="100%"
|
|
@@ -1611,7 +1726,7 @@
|
|
|
1611
1726
|
<path
|
|
1612
1727
|
d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z" />
|
|
1613
1728
|
</svg>
|
|
1614
|
-
${this.type?l`<span id="file-type">${this.type.toUpperCase()}</span>`:""} `}};
|
|
1729
|
+
${this.type?l`<span id="file-type">${this.type.toUpperCase()}</span>`:""} `}};Di.styles=[d`
|
|
1615
1730
|
:host {
|
|
1616
1731
|
position: relative;
|
|
1617
1732
|
display: block;
|
|
@@ -1634,19 +1749,19 @@
|
|
|
1634
1749
|
#icon {
|
|
1635
1750
|
fill: var(--uui-color-border-standalone,#c2c2c2);
|
|
1636
1751
|
}
|
|
1637
|
-
`],
|
|
1752
|
+
`],Ra([a({type:String})],Di.prototype,"type",2),Di=Ra([p("uui-symbol-file")],Di);var up=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,Lr=(t,e,i,o)=>{for(var r=o>1?void 0:o?cp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&up(e,i,r),r},hp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Fa=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ga=(t,e,i)=>(hp(t,e,"access private method"),i),Jo,Wa,es,qa;let Et=class extends R{constructor(){super(...arguments),Fa(this,Jo),Fa(this,es),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),y(this,"uui-symbol-folder"),y(this,"uui-symbol-file")}queryPreviews(t){this.hasPreview=t.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?l`<uui-symbol-folder id="folder-symbol"></uui-symbol-folder>`:l`<uui-symbol-file
|
|
1638
1753
|
id="file-symbol"
|
|
1639
1754
|
type="${this.fileExt}"></uui-symbol-file>`}render(){return l` ${this.renderMedia()}
|
|
1640
1755
|
<slot @slotchange=${this.queryPreviews}></slot>
|
|
1641
|
-
${this.href?
|
|
1756
|
+
${this.href?Ga(this,es,qa).call(this):Ga(this,Jo,Wa).call(this)}
|
|
1642
1757
|
<!-- Select border must be right after .open-part -->
|
|
1643
1758
|
<div id="select-border"></div>
|
|
1644
1759
|
|
|
1645
1760
|
<slot name="tag"></slot>
|
|
1646
|
-
<slot name="actions"></slot>`}};
|
|
1761
|
+
<slot name="actions"></slot>`}};Jo=new WeakSet,Wa=function(){return l`
|
|
1647
1762
|
<button
|
|
1648
1763
|
id="open-part"
|
|
1649
|
-
tabindex=${this.disabled
|
|
1764
|
+
tabindex=${this.disabled?w:"0"}
|
|
1650
1765
|
@click=${this.handleOpenClick}
|
|
1651
1766
|
@keydown=${this.handleOpenKeydown}>
|
|
1652
1767
|
<!--
|
|
@@ -1659,13 +1774,13 @@
|
|
|
1659
1774
|
-->
|
|
1660
1775
|
<span>${this.name}</span>
|
|
1661
1776
|
</button>
|
|
1662
|
-
`},
|
|
1777
|
+
`},es=new WeakSet,qa=function(){return l`
|
|
1663
1778
|
<a
|
|
1664
1779
|
id="open-part"
|
|
1665
|
-
tabindex=${this.disabled
|
|
1666
|
-
href=${
|
|
1667
|
-
target=${
|
|
1668
|
-
rel=${
|
|
1780
|
+
tabindex=${this.disabled?w:"0"}
|
|
1781
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
1782
|
+
target=${C(this.target||void 0)}
|
|
1783
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}>
|
|
1669
1784
|
<!--
|
|
1670
1785
|
TODO: Implement when pop-out is ready
|
|
1671
1786
|
<uui-icon
|
|
@@ -1676,7 +1791,7 @@
|
|
|
1676
1791
|
-->
|
|
1677
1792
|
<span>${this.name}</span>
|
|
1678
1793
|
</a>
|
|
1679
|
-
`},
|
|
1794
|
+
`},Et.styles=[...R.styles,d`
|
|
1680
1795
|
#file-symbol,
|
|
1681
1796
|
#folder-symbol {
|
|
1682
1797
|
align-self: center;
|
|
@@ -1771,26 +1886,33 @@
|
|
|
1771
1886
|
height: var(--uui-size-8);
|
|
1772
1887
|
}
|
|
1773
1888
|
*/
|
|
1774
|
-
`],
|
|
1775
|
-
|
|
1776
|
-
|
|
1889
|
+
`],Lr([a({type:String})],Et.prototype,"name",2),Lr([a({type:String,attribute:"file-ext"})],Et.prototype,"fileExt",2),Lr([b()],Et.prototype,"hasPreview",2),Et=Lr([p("uui-card-media")],Et);var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,ts=(t,e,i,o)=>{for(var r=o>1?void 0:o?pp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&dp(e,i,r),r},vp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ka=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Xa=(t,e,i)=>(vp(t,e,"access private method"),i),is,Ya,rs,Za;let Yt=class extends R{constructor(){super(...arguments),Ka(this,is),Ka(this,rs),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=t=>{this._avatarSlotHasContent=jd(t.target)}}connectedCallback(){super.connectedCallback(),y(this,"uui-avatar")}render(){return l`
|
|
1890
|
+
${this._avatarSlotHasContent?w:l`<uui-avatar
|
|
1891
|
+
id="avatar"
|
|
1892
|
+
name=${this.name}
|
|
1893
|
+
size="m"></uui-avatar>`}
|
|
1894
|
+
<slot
|
|
1895
|
+
name="avatar"
|
|
1896
|
+
id="avatar"
|
|
1897
|
+
@slotchange=${this._avatarSlotChanged}></slot>
|
|
1898
|
+
${this.href?Xa(this,rs,Za).call(this):Xa(this,is,Ya).call(this)}
|
|
1777
1899
|
<slot></slot>
|
|
1778
1900
|
<slot name="tag"></slot>
|
|
1779
1901
|
<slot name="actions"></slot>
|
|
1780
|
-
`}};
|
|
1902
|
+
`}};is=new WeakSet,Ya=function(){return l`<div
|
|
1781
1903
|
id="open-part"
|
|
1782
|
-
tabindex=${this.disabled
|
|
1904
|
+
tabindex=${this.disabled?w:"0"}
|
|
1783
1905
|
@click=${this.handleOpenClick}
|
|
1784
1906
|
@keydown=${this.handleOpenKeydown}>
|
|
1785
1907
|
<span> ${this.name} </span>
|
|
1786
|
-
</div>`},
|
|
1908
|
+
</div>`},rs=new WeakSet,Za=function(){return l`<a
|
|
1787
1909
|
id="open-part"
|
|
1788
|
-
tabindex=${this.disabled
|
|
1789
|
-
href=${
|
|
1790
|
-
target=${
|
|
1791
|
-
rel=${
|
|
1910
|
+
tabindex=${this.disabled?w:"0"}
|
|
1911
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
1912
|
+
target=${C(this.target||void 0)}
|
|
1913
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}>
|
|
1792
1914
|
<span>${this.name}</span>
|
|
1793
|
-
</a>`},
|
|
1915
|
+
</a>`},Yt.styles=[...R.styles,d`
|
|
1794
1916
|
:host {
|
|
1795
1917
|
min-width: 250px;
|
|
1796
1918
|
flex-direction: column;
|
|
@@ -1862,9 +1984,9 @@
|
|
|
1862
1984
|
text-decoration: underline;
|
|
1863
1985
|
color: var(--uui-color-interactive-emphasis,#3544b1);
|
|
1864
1986
|
}
|
|
1865
|
-
`],
|
|
1987
|
+
`],ts([a({type:String})],Yt.prototype,"name",2),ts([b()],Yt.prototype,"_avatarSlotHasContent",2),Yt=ts([p("uui-card-user")],Yt);var fp=Object.defineProperty,bp=Object.getOwnPropertyDescriptor,Qa=(t,e,i,o)=>{for(var r=o>1?void 0:o?bp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&fp(e,i,r),r};let Li=class extends v{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 l`<svg viewBox="0 0 512 512">
|
|
1866
1988
|
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
|
|
1867
|
-
</svg>`}};
|
|
1989
|
+
</svg>`}};Li.styles=[d`
|
|
1868
1990
|
:host {
|
|
1869
1991
|
display: inline-block;
|
|
1870
1992
|
width: 12px;
|
|
@@ -1880,11 +2002,11 @@
|
|
|
1880
2002
|
:host([open]) svg {
|
|
1881
2003
|
transform: rotate(180deg);
|
|
1882
2004
|
}
|
|
1883
|
-
`]
|
|
2005
|
+
`],Qa([a({type:Boolean,reflect:!0})],Li.prototype,"open",2),Li=Qa([p("uui-caret")],Li);var gp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,_p=(t,e,i,o)=>{for(var r=o>1?void 0:o?mp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&gp(e,i,r),r};let Mi=class extends ye{renderCheckbox(){return l`
|
|
1884
2006
|
<div id="ticker">
|
|
1885
|
-
<div id="icon-check">${
|
|
2007
|
+
<div id="icon-check">${Ar}</div>
|
|
1886
2008
|
</div>
|
|
1887
|
-
`}};
|
|
2009
|
+
`}};Mi.formAssociated=!0,Mi.styles=[...ye.styles,kr,d`
|
|
1888
2010
|
:host {
|
|
1889
2011
|
--uui-checkbox-size: 18px;
|
|
1890
2012
|
}
|
|
@@ -1951,7 +2073,7 @@
|
|
|
1951
2073
|
height: 1em;
|
|
1952
2074
|
line-height: 0;
|
|
1953
2075
|
transition: fill 120ms, opacity 120ms;
|
|
1954
|
-
|
|
2076
|
+
color: var(--uui-color-selected-contrast,#fff);
|
|
1955
2077
|
opacity: 0;
|
|
1956
2078
|
}
|
|
1957
2079
|
|
|
@@ -2017,35 +2139,35 @@
|
|
|
2017
2139
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
2018
2140
|
}
|
|
2019
2141
|
:host([disabled]) #ticker #icon-check {
|
|
2020
|
-
|
|
2142
|
+
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2021
2143
|
}
|
|
2022
2144
|
:host([disabled]) label:active #ticker {
|
|
2023
|
-
animation: ${
|
|
2145
|
+
animation: ${Sr};
|
|
2024
2146
|
}
|
|
2025
2147
|
:host([disabled]) input:checked + #ticker #icon-check {
|
|
2026
|
-
|
|
2148
|
+
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2027
2149
|
}
|
|
2028
|
-
`],
|
|
2150
|
+
`],Mi=_p([p("uui-checkbox")],Mi);/**
|
|
2029
2151
|
* @license
|
|
2030
2152
|
* Copyright 2018 Google LLC
|
|
2031
2153
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2032
|
-
*/const
|
|
2154
|
+
*/const os=Wt(class extends qt{constructor(t){var e;if(super(t),t.type!==de.ATTRIBUTE||t.name!=="class"||((e=t.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(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var i,o;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!(!((i=this.nt)===null||i===void 0)&&i.has(s))&&this.it.add(s);return this.render(e)}const r=t.element.classList;this.it.forEach(s=>{s in e||(r.remove(s),this.it.delete(s))});for(const s in e){const n=!!e[s];n===this.it.has(s)||!((o=this.nt)===null||o===void 0)&&o.has(s)||(n?(r.add(s),this.it.add(s)):(r.remove(s),this.it.delete(s)))}return K}});var yp={grad:.9,turn:360,rad:360/(2*Math.PI)},Te=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},N=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},re=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),t>i?i:t>e?t:e},Ja=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},el=function(t){return{r:re(t.r,0,255),g:re(t.g,0,255),b:re(t.b,0,255),a:re(t.a)}},ss=function(t){return{r:N(t.r),g:N(t.g),b:N(t.b),a:N(t.a,3)}},xp=/^#([0-9a-f]{3,8})$/i,Mr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},tl=function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=Math.max(e,i,o),n=s-Math.min(e,i,o),u=n?s===e?(i-o)/n:s===i?2+(o-e)/n:4+(e-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},il=function(t){var e=t.h,i=t.s,o=t.v,r=t.a;e=e/360*6,i/=100,o/=100;var s=Math.floor(e),n=o*(1-i),u=o*(1-(e-s)*i),c=o*(1-(1-e+s)*i),h=s%6;return{r:255*[o,u,n,n,c,o][h],g:255*[c,o,o,u,n,n][h],b:255*[n,n,c,o,o,u][h],a:r}},rl=function(t){return{h:Ja(t.h),s:re(t.s,0,100),l:re(t.l,0,100),a:re(t.a)}},ol=function(t){return{h:N(t.h),s:N(t.s),l:N(t.l),a:N(t.a,3)}},sl=function(t){return il((i=(e=t).s,{h:e.h,s:(i*=((o=e.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:e.a}));var e,i,o},Ti=function(t){return{h:(e=tl(t)).h,s:(r=(200-(i=e.s))*(o=e.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,i,o,r},wp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ep=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Cp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nl={string:[[function(t){var e=xp.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?N(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?N(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Ep.exec(t)||Cp.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:el({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(t){var e=wp.exec(t)||$p.exec(t);if(!e)return null;var i,o,r=rl({h:(i=e[1],o=e[2],o===void 0&&(o="deg"),Number(i)*(yp[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return sl(r)},"hsl"]],object:[[function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=r===void 0?1:r;return Te(e)&&Te(i)&&Te(o)?el({r:Number(e),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,i=t.s,o=t.l,r=t.a,s=r===void 0?1:r;if(!Te(e)||!Te(i)||!Te(o))return null;var n=rl({h:Number(e),s:Number(i),l:Number(o),a:Number(s)});return sl(n)},"hsl"],[function(t){var e=t.h,i=t.s,o=t.v,r=t.a,s=r===void 0?1:r;if(!Te(e)||!Te(i)||!Te(o))return null;var n=function(u){return{h:Ja(u.h),s:re(u.s,0,100),v:re(u.v,0,100),a:re(u.a)}}({h:Number(e),s:Number(i),v:Number(o),a:Number(s)});return il(n)},"hsv"]]},al=function(t,e){for(var i=0;i<e.length;i++){var o=e[i][0](t);if(o)return[o,e[i][1]]}return[null,void 0]},Pp=function(t){return typeof t=="string"?al(t.trim(),nl.string):typeof t=="object"&&t!==null?al(t,nl.object):[null,void 0]},ns=function(t,e){var i=Ti(t);return{h:i.h,s:re(i.s+100*e,0,100),l:i.l,a:i.a}},as=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},ll=function(t,e){var i=Ti(t);return{h:i.h,s:i.s,l:re(i.l+100*e,0,100),a:i.a}},ul=function(){function t(e){this.parsed=Pp(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return N(as(this.rgba),2)},t.prototype.isDark=function(){return as(this.rgba)<.5},t.prototype.isLight=function(){return as(this.rgba)>=.5},t.prototype.toHex=function(){return e=ss(this.rgba),i=e.r,o=e.g,r=e.b,n=(s=e.a)<1?Mr(N(255*s)):"","#"+Mr(i)+Mr(o)+Mr(r)+n;var e,i,o,r,s,n},t.prototype.toRgb=function(){return ss(this.rgba)},t.prototype.toRgbString=function(){return e=ss(this.rgba),i=e.r,o=e.g,r=e.b,(s=e.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var e,i,o,r,s},t.prototype.toHsl=function(){return ol(Ti(this.rgba))},t.prototype.toHslString=function(){return e=ol(Ti(this.rgba)),i=e.h,o=e.s,r=e.l,(s=e.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var e,i,o,r,s},t.prototype.toHsv=function(){return e=tl(this.rgba),{h:N(e.h),s:N(e.s),v:N(e.v),a:N(e.a,3)};var e},t.prototype.invert=function(){return oe({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),oe(ns(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),oe(ns(this.rgba,-e))},t.prototype.grayscale=function(){return oe(ns(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),oe(ll(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),oe(ll(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?oe({r:(i=this.rgba).r,g:i.g,b:i.b,a:e}):N(this.rgba.a,3);var i},t.prototype.hue=function(e){var i=Ti(this.rgba);return typeof e=="number"?oe({h:e,s:i.s,l:i.l,a:i.a}):N(i.h)},t.prototype.isEqual=function(e){return this.toHex()===oe(e).toHex()},t}(),oe=function(t){return t instanceof ul?t:new ul(t)},Op=Object.defineProperty,cl=Object.getOwnPropertySymbols,kp=Object.prototype.hasOwnProperty,Sp=Object.prototype.propertyIsEnumerable,hl=(t,e,i)=>e in t?Op(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,dl=(t,e)=>{for(var i in e||(e={}))kp.call(e,i)&&hl(t,i,e[i]);if(cl)for(var i of cl(e))Sp.call(e,i)&&hl(t,i,e[i]);return t};class Tr extends S{constructor(e,i={}){super(e,dl(dl({},{bubbles:!0}),i))}}Tr.CHANGE="change";var zp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,Ne=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ip(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zp(e,i,r),r};let se=class extends v{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000",this.disabled=!1}get value(){return this._value}set value(t){const e=this._value;this._value=t,this.requestUpdate("value",e);try{const i=oe(t);if(i.isValid()){const{h:o,s:r,l:s}=i.toHsl();this.hue=o,this.saturation=r,this.lightness=s,this.brightness=this.getBrightness(s)}}catch(i){console.error("Something went wrong parsing the color string.",i)}}handleGridDrag(t){if(this.disabled)return;const e=this.shadowRoot.querySelector(".color-area"),i=e.querySelector(".color-area__handle"),{width:o,height:r}=e.getBoundingClientRect();i.focus(),t.preventDefault(),t.stopPropagation(),this.isDraggingGridHandle=!0,Ua(e,{onMove:(s,n)=>{isNaN(s)||isNaN(n)||(this.saturation=z(s/o*100,0,100),this.brightness=z(100-n/r*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:t})}handleGridKeyDown(t){if(this.disabled)return;const e=t.shiftKey?10:1;t.key==="ArrowLeft"&&(t.preventDefault(),this.saturation=z(this.saturation-e,0,100),this.syncValues()),t.key==="ArrowRight"&&(t.preventDefault(),this.saturation=z(this.saturation+e,0,100),this.syncValues()),t.key==="ArrowUp"&&(t.preventDefault(),this.brightness=z(this.brightness+e,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),t.key==="ArrowDown"&&(t.preventDefault(),this.brightness=z(this.brightness-e,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(t){return z(-1*(200*t/(this.saturation-200)),0,100)}getLightness(t){return z((200-this.saturation)*t/100*5/10,0,100)}syncValues(){const t=oe({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=t.toRgbString(),this.dispatchEvent(new Tr(Tr.CHANGE))}getHexString(t,e,i,o=100){const r=oe(`hsla(${t}, ${e}%, ${i}%, ${o/100})`);return r.isValid()?r.toHex():""}render(){const t=this.saturation,e=100-this.brightness;return l`
|
|
2033
2155
|
<div
|
|
2034
2156
|
part="grid"
|
|
2035
2157
|
class="color-area"
|
|
2036
|
-
style=${
|
|
2158
|
+
style=${we({backgroundColor:this.getHexString(this.hue,100,50)})}
|
|
2037
2159
|
@mousedown=${this.handleGridDrag}
|
|
2038
2160
|
@touchstart=${this.handleGridDrag}>
|
|
2039
2161
|
<span
|
|
2040
2162
|
part="grid-handle"
|
|
2041
|
-
class=${
|
|
2042
|
-
style=${
|
|
2163
|
+
class=${os({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}
|
|
2164
|
+
style=${we({top:`${e}%`,left:`${t}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}
|
|
2043
2165
|
role="application"
|
|
2044
|
-
tabindex=${
|
|
2166
|
+
tabindex=${C(this.disabled?void 0:"0")}
|
|
2045
2167
|
aria-label="HSB"
|
|
2046
2168
|
@keydown=${this.handleGridKeyDown}></span>
|
|
2047
2169
|
</div>
|
|
2048
|
-
`}};
|
|
2170
|
+
`}};se.styles=[d`
|
|
2049
2171
|
:host {
|
|
2050
2172
|
display: inline-block;
|
|
2051
2173
|
width: 280px;
|
|
@@ -2095,17 +2217,17 @@
|
|
|
2095
2217
|
.color-area__handle--empty {
|
|
2096
2218
|
display: none;
|
|
2097
2219
|
}
|
|
2098
|
-
`],
|
|
2220
|
+
`],Ne([b()],se.prototype,"isDraggingGridHandle",2),Ne([a({type:Number})],se.prototype,"hue",2),Ne([a({type:Number})],se.prototype,"saturation",2),Ne([a({type:Number})],se.prototype,"lightness",2),Ne([a({type:Number})],se.prototype,"brightness",2),Ne([a({type:Number})],se.prototype,"alpha",2),Ne([a({type:String})],se.prototype,"value",1),Ne([a({type:Boolean,reflect:!0})],se.prototype,"disabled",2),se=Ne([p("uui-color-area")],se);/**
|
|
2099
2221
|
* @license
|
|
2100
2222
|
* Copyright 2020 Google LLC
|
|
2101
2223
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2102
|
-
*/const{I:
|
|
2224
|
+
*/const{I:Ap}=ac,pl=t=>t.strings===void 0,vl=()=>document.createComment(""),Ni=(t,e,i)=>{var o;const r=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(i===void 0){const n=r.insertBefore(vl(),s),u=r.insertBefore(vl(),s);i=new Ap(n,u,t,t.options)}else{const n=i._$AB.nextSibling,u=i._$AM,c=u!==t;if(c){let h;(o=i._$AQ)===null||o===void 0||o.call(i,t),i._$AM=t,i._$AP!==void 0&&(h=t._$AU)!==u._$AU&&i._$AP(h)}if(n!==s||c){let h=i._$AA;for(;h!==n;){const f=h.nextSibling;r.insertBefore(h,s),h=f}}}return i},Ct=(t,e,i=t)=>(t._$AI(e,i),t),Up={},fl=(t,e=Up)=>t._$AH=e,Dp=t=>t._$AH,ls=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const r=i.nextSibling;i.remove(),i=r}};/**
|
|
2103
2225
|
* @license
|
|
2104
2226
|
* Copyright 2020 Google LLC
|
|
2105
2227
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2106
|
-
*/const Zd=Bt(class extends Rt{constructor(t){if(super(t),t.type!==ue.PROPERTY&&t.type!==ue.ATTRIBUTE&&t.type!==ue.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Na(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===F||e===$)return e;const i=t.element,o=t.name;if(t.type===ue.PROPERTY){if(e===i[o])return F}else if(t.type===ue.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(o))return F}else if(t.type===ue.ATTRIBUTE&&i.getAttribute(o)===e+"")return F;return ja(t),e}});var Qd={grad:.9,turn:360,rad:360/(2*Math.PI)},Le=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},N=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},oe=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),t>i?i:t>e?t:e},Ha=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Ba=function(t){return{r:oe(t.r,0,255),g:oe(t.g,0,255),b:oe(t.b,0,255),a:oe(t.a)}},Ro=function(t){return{r:N(t.r),g:N(t.g),b:N(t.b),a:N(t.a,3)}},Jd=/^#([0-9a-f]{3,8})$/i,kr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Ra=function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=Math.max(e,i,o),n=s-Math.min(e,i,o),u=n?s===e?(i-o)/n:s===i?2+(o-e)/n:4+(e-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},Fa=function(t){var e=t.h,i=t.s,o=t.v,r=t.a;e=e/360*6,i/=100,o/=100;var s=Math.floor(e),n=o*(1-i),u=o*(1-(e-s)*i),c=o*(1-(1-e+s)*i),h=s%6;return{r:255*[o,u,n,n,c,o][h],g:255*[c,o,o,u,n,n][h],b:255*[n,n,c,o,o,u][h],a:r}},Ga=function(t){return{h:Ha(t.h),s:oe(t.s,0,100),l:oe(t.l,0,100),a:oe(t.a)}},qa=function(t){return{h:N(t.h),s:N(t.s),l:N(t.l),a:N(t.a,3)}},Wa=function(t){return Fa((i=(e=t).s,{h:e.h,s:(i*=((o=e.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:e.a}));var e,i,o},Ui=function(t){return{h:(e=Ra(t)).h,s:(r=(200-(i=e.s))*(o=e.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,i,o,r},ep=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,tp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ip=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fo={string:[[function(t){var e=Jd.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?N(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?N(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=ip.exec(t)||rp.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ba({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(t){var e=ep.exec(t)||tp.exec(t);if(!e)return null;var i,o,r=Ga({h:(i=e[1],o=e[2],o===void 0&&(o="deg"),Number(i)*(Qd[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Wa(r)},"hsl"]],object:[[function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=r===void 0?1:r;return Le(e)&&Le(i)&&Le(o)?Ba({r:Number(e),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,i=t.s,o=t.l,r=t.a,s=r===void 0?1:r;if(!Le(e)||!Le(i)||!Le(o))return null;var n=Ga({h:Number(e),s:Number(i),l:Number(o),a:Number(s)});return Wa(n)},"hsl"],[function(t){var e=t.h,i=t.s,o=t.v,r=t.a,s=r===void 0?1:r;if(!Le(e)||!Le(i)||!Le(o))return null;var n=function(u){return{h:Ha(u.h),s:oe(u.s,0,100),v:oe(u.v,0,100),a:oe(u.a)}}({h:Number(e),s:Number(i),v:Number(o),a:Number(s)});return Fa(n)},"hsv"]]},Ka=function(t,e){for(var i=0;i<e.length;i++){var o=e[i][0](t);if(o)return[o,e[i][1]]}return[null,void 0]},op=function(t){return typeof t=="string"?Ka(t.trim(),Fo.string):typeof t=="object"&&t!==null?Ka(t,Fo.object):[null,void 0]},Go=function(t,e){var i=Ui(t);return{h:i.h,s:oe(i.s+100*e,0,100),l:i.l,a:i.a}},qo=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Xa=function(t,e){var i=Ui(t);return{h:i.h,s:i.s,l:oe(i.l+100*e,0,100),a:i.a}},Sr=function(){function t(e){this.parsed=op(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return N(qo(this.rgba),2)},t.prototype.isDark=function(){return qo(this.rgba)<.5},t.prototype.isLight=function(){return qo(this.rgba)>=.5},t.prototype.toHex=function(){return e=Ro(this.rgba),i=e.r,o=e.g,r=e.b,n=(s=e.a)<1?kr(N(255*s)):"","#"+kr(i)+kr(o)+kr(r)+n;var e,i,o,r,s,n},t.prototype.toRgb=function(){return Ro(this.rgba)},t.prototype.toRgbString=function(){return e=Ro(this.rgba),i=e.r,o=e.g,r=e.b,(s=e.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var e,i,o,r,s},t.prototype.toHsl=function(){return qa(Ui(this.rgba))},t.prototype.toHslString=function(){return e=qa(Ui(this.rgba)),i=e.h,o=e.s,r=e.l,(s=e.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var e,i,o,r,s},t.prototype.toHsv=function(){return e=Ra(this.rgba),{h:N(e.h),s:N(e.s),v:N(e.v),a:N(e.a,3)};var e},t.prototype.invert=function(){return me({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),me(Go(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),me(Go(this.rgba,-e))},t.prototype.grayscale=function(){return me(Go(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),me(Xa(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),me(Xa(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?me({r:(i=this.rgba).r,g:i.g,b:i.b,a:e}):N(this.rgba.a,3);var i},t.prototype.hue=function(e){var i=Ui(this.rgba);return typeof e=="number"?me({h:e,s:i.s,l:i.l,a:i.a}):N(i.h)},t.prototype.isEqual=function(e){return this.toHex()===me(e).toHex()},t}(),me=function(t){return t instanceof Sr?t:new Sr(t)},Ya=[],sp=function(t){t.forEach(function(e){Ya.indexOf(e)<0&&(e(Sr,Fo),Ya.push(e))})};function np(t,e){var i={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"},o={};for(var r in i)o[i[r]]=r;var s={};t.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,h=o[this.toHex()];if(h)return h;if(n?.closest){var f=this.toRgb(),m=1/0,g="black";if(!s.length)for(var x in i)s[x]=new t(i[x]).toRgb();for(var w in i){var E=(u=f,c=s[w],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));E<m&&(m=E,g=w)}return g}},e.string.push([function(n){var u=n.toLowerCase(),c=u==="transparent"?"#0000":i[u];return c?new t(c).toRgb():null},"name"])}var ap=Object.defineProperty,Za=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,up=Object.prototype.propertyIsEnumerable,Qa=(t,e,i)=>e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ja=(t,e)=>{for(var i in e||(e={}))lp.call(e,i)&&Qa(t,i,e[i]);if(Za)for(var i of Za(e))up.call(e,i)&&Qa(t,i,e[i]);return t};class Ir extends k{constructor(e,i={}){super(e,Ja(Ja({},{bubbles:!0}),i))}}Ir.CHANGE="change";var cp=Object.defineProperty,hp=Object.getOwnPropertyDescriptor,D=(t,e,i,o)=>{for(var r=o>1?void 0:o?hp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&cp(e,i,r),r};sp([np]);const el="EyeDropper"in window;let A=class extends ve("label",v){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=me("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),y(this,"uui-icon"),y(this,"uui-icon-registry-essential"),y(this,"uui-input"),y(this,"uui-button"),y(this,"uui-button-group"),y(this,"uui-popover"),y(this,"uui-color-swatches"),y(this,"uui-color-swatch"),y(this,"uui-color-area"),y(this,"uui-color-slider")}getFormattedValue(t){const e=this.opacity?`${t}a`:t,i=this._colord.toHex(),o=i.length>7?i.substring(0,i.length-2):i,{r,g:s,b:n}=this._colord.toRgb(),{h:u,s:c,l:h}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),m=this._colord.alpha();switch(e){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(i);case"rgb":return this.setLetterCase(`rgb(${r}, ${s}, ${n})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${u}, ${c}%, ${h}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${u}, ${c}%, ${h}%)`);case"hsva":return this.setLetterCase(`hsva(${u}, ${c}%, ${f}%, ${m})`);default:return""}}getBrightness(t){return S(-1*(200*t/(this.saturation-200)),0,100)}getLightness(t){return S((200-this.saturation)*t/100*5/10,0,100)}handleFormatToggle(){const t=["hex","rgb","hsl","hsv"],e=(t.indexOf(this.format)+1)%t.length;this.format=t[e],this._syncValues()}handleAlphaChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const i=t.target,o={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(i.value)/100};this.setColor(o)}handleHueChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const o={h:t.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(o)}handleGridChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const i=t.target,o={h:this.hue,s:i.saturation,l:i.lightness,a:this.alpha/100};this.setColor(o)}handleInputChange(t){var e;(e=this._swatches)==null||e.resetSelection();const i=t.target;i.value?(this.setColor(i.value),i.value=this.value):this.setColor("#000"),t.stopPropagation()}handleInputKeyDown(t){var e;t.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),(e=this._swatches)==null||e.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(t){t.stopImmediatePropagation();const e=t.target;e.value?this.setColor(e.value):this.setColor("#000")}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")})})}openColorPicker(t){t.stopImmediatePropagation();const e=t.target,i=e.parentElement;i.open=!i?.open,e.setAttribute("aria-expanded",i.open.toString())}closeColorPicker(t){const i=t.target.querySelector("button[part=trigger]");i&&i.setAttribute("aria-expanded","false")}handleEyeDropper(){if(!el)return;new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(t){this._colord=new Sr(t);const{h:e,l:i,s:o,a:r}=this._colord.toHsl();return this.hue=e,this.saturation=o,this.lightness=i,this.alpha=this.opacity?r*100:100,this._syncValues(),this.dispatchEvent(new Ir(Ir.CHANGE)),!0}setLetterCase(t){return typeof t!="string"?"":this.uppercase?t.toUpperCase():t.toLowerCase()}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return l`
|
|
2228
|
+
*/const Lp=Wt(class extends qt{constructor(t){if(super(t),t.type!==de.PROPERTY&&t.type!==de.ATTRIBUTE&&t.type!==de.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pl(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===K||e===w)return e;const i=t.element,o=t.name;if(t.type===de.PROPERTY){if(e===i[o])return K}else if(t.type===de.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(o))return K}else if(t.type===de.ATTRIBUTE&&i.getAttribute(o)===e+"")return K;return fl(t),e}});var Mp={grad:.9,turn:360,rad:360/(2*Math.PI)},Ve=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},V=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},ne=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),t>i?i:t>e?t:e},bl=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},gl=function(t){return{r:ne(t.r,0,255),g:ne(t.g,0,255),b:ne(t.b,0,255),a:ne(t.a)}},us=function(t){return{r:V(t.r),g:V(t.g),b:V(t.b),a:V(t.a,3)}},Tp=/^#([0-9a-f]{3,8})$/i,Nr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},ml=function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=Math.max(e,i,o),n=s-Math.min(e,i,o),u=n?s===e?(i-o)/n:s===i?2+(o-e)/n:4+(e-i)/n:0;return{h:60*(u<0?u+6:u),s:s?n/s*100:0,v:s/255*100,a:r}},_l=function(t){var e=t.h,i=t.s,o=t.v,r=t.a;e=e/360*6,i/=100,o/=100;var s=Math.floor(e),n=o*(1-i),u=o*(1-(e-s)*i),c=o*(1-(1-e+s)*i),h=s%6;return{r:255*[o,u,n,n,c,o][h],g:255*[c,o,o,u,n,n][h],b:255*[n,n,c,o,o,u][h],a:r}},yl=function(t){return{h:bl(t.h),s:ne(t.s,0,100),l:ne(t.l,0,100),a:ne(t.a)}},xl=function(t){return{h:V(t.h),s:V(t.s),l:V(t.l),a:V(t.a,3)}},wl=function(t){return _l((i=(e=t).s,{h:e.h,s:(i*=((o=e.l)<50?o:100-o)/100)>0?2*i/(o+i)*100:0,v:o+i,a:e.a}));var e,i,o},Vi=function(t){return{h:(e=ml(t)).h,s:(r=(200-(i=e.s))*(o=e.v)/100)>0&&r<200?i*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,i,o,r},Np=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vp=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Hp=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,cs={string:[[function(t){var e=Tp.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?V(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?V(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=jp.exec(t)||Hp.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:gl({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(t){var e=Np.exec(t)||Vp.exec(t);if(!e)return null;var i,o,r=yl({h:(i=e[1],o=e[2],o===void 0&&(o="deg"),Number(i)*(Mp[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return wl(r)},"hsl"]],object:[[function(t){var e=t.r,i=t.g,o=t.b,r=t.a,s=r===void 0?1:r;return Ve(e)&&Ve(i)&&Ve(o)?gl({r:Number(e),g:Number(i),b:Number(o),a:Number(s)}):null},"rgb"],[function(t){var e=t.h,i=t.s,o=t.l,r=t.a,s=r===void 0?1:r;if(!Ve(e)||!Ve(i)||!Ve(o))return null;var n=yl({h:Number(e),s:Number(i),l:Number(o),a:Number(s)});return wl(n)},"hsl"],[function(t){var e=t.h,i=t.s,o=t.v,r=t.a,s=r===void 0?1:r;if(!Ve(e)||!Ve(i)||!Ve(o))return null;var n=function(u){return{h:bl(u.h),s:ne(u.s,0,100),v:ne(u.v,0,100),a:ne(u.a)}}({h:Number(e),s:Number(i),v:Number(o),a:Number(s)});return _l(n)},"hsv"]]},$l=function(t,e){for(var i=0;i<e.length;i++){var o=e[i][0](t);if(o)return[o,e[i][1]]}return[null,void 0]},Bp=function(t){return typeof t=="string"?$l(t.trim(),cs.string):typeof t=="object"&&t!==null?$l(t,cs.object):[null,void 0]},hs=function(t,e){var i=Vi(t);return{h:i.h,s:ne(i.s+100*e,0,100),l:i.l,a:i.a}},ds=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},El=function(t,e){var i=Vi(t);return{h:i.h,s:i.s,l:ne(i.l+100*e,0,100),a:i.a}},Vr=function(){function t(e){this.parsed=Bp(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return V(ds(this.rgba),2)},t.prototype.isDark=function(){return ds(this.rgba)<.5},t.prototype.isLight=function(){return ds(this.rgba)>=.5},t.prototype.toHex=function(){return e=us(this.rgba),i=e.r,o=e.g,r=e.b,n=(s=e.a)<1?Nr(V(255*s)):"","#"+Nr(i)+Nr(o)+Nr(r)+n;var e,i,o,r,s,n},t.prototype.toRgb=function(){return us(this.rgba)},t.prototype.toRgbString=function(){return e=us(this.rgba),i=e.r,o=e.g,r=e.b,(s=e.a)<1?"rgba("+i+", "+o+", "+r+", "+s+")":"rgb("+i+", "+o+", "+r+")";var e,i,o,r,s},t.prototype.toHsl=function(){return xl(Vi(this.rgba))},t.prototype.toHslString=function(){return e=xl(Vi(this.rgba)),i=e.h,o=e.s,r=e.l,(s=e.a)<1?"hsla("+i+", "+o+"%, "+r+"%, "+s+")":"hsl("+i+", "+o+"%, "+r+"%)";var e,i,o,r,s},t.prototype.toHsv=function(){return e=ml(this.rgba),{h:V(e.h),s:V(e.s),v:V(e.v),a:V(e.a,3)};var e},t.prototype.invert=function(){return Ee({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Ee(hs(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ee(hs(this.rgba,-e))},t.prototype.grayscale=function(){return Ee(hs(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Ee(El(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Ee(El(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Ee({r:(i=this.rgba).r,g:i.g,b:i.b,a:e}):V(this.rgba.a,3);var i},t.prototype.hue=function(e){var i=Vi(this.rgba);return typeof e=="number"?Ee({h:e,s:i.s,l:i.l,a:i.a}):V(i.h)},t.prototype.isEqual=function(e){return this.toHex()===Ee(e).toHex()},t}(),Ee=function(t){return t instanceof Vr?t:new Vr(t)},Cl=[],Rp=function(t){t.forEach(function(e){Cl.indexOf(e)<0&&(e(Vr,cs),Cl.push(e))})};function Fp(t,e){var i={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"},o={};for(var r in i)o[i[r]]=r;var s={};t.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,c,h=o[this.toHex()];if(h)return h;if(n?.closest){var f=this.toRgb(),m=1/0,g="black";if(!s.length)for(var x in i)s[x]=new t(i[x]).toRgb();for(var $ in i){var P=(u=f,c=s[$],Math.pow(u.r-c.r,2)+Math.pow(u.g-c.g,2)+Math.pow(u.b-c.b,2));P<m&&(m=P,g=$)}return g}},e.string.push([function(n){var u=n.toLowerCase(),c=u==="transparent"?"#0000":i[u];return c?new t(c).toRgb():null},"name"])}var Gp=Object.defineProperty,Pl=Object.getOwnPropertySymbols,Wp=Object.prototype.hasOwnProperty,qp=Object.prototype.propertyIsEnumerable,Ol=(t,e,i)=>e in t?Gp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,kl=(t,e)=>{for(var i in e||(e={}))Wp.call(e,i)&&Ol(t,i,e[i]);if(Pl)for(var i of Pl(e))qp.call(e,i)&&Ol(t,i,e[i]);return t};class jr extends S{constructor(e,i={}){super(e,kl(kl({},{bubbles:!0}),i))}}jr.CHANGE="change";var Kp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,L=(t,e,i,o)=>{for(var r=o>1?void 0:o?Xp(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Kp(e,i,r),r};Rp([Fp]);const Sl="EyeDropper"in window;let U=class extends me("label",v){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=Ee("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),y(this,"uui-icon"),y(this,"uui-icon-registry-essential"),y(this,"uui-input"),y(this,"uui-button"),y(this,"uui-button-group"),y(this,"uui-color-swatches"),y(this,"uui-color-swatch"),y(this,"uui-color-area"),y(this,"uui-color-slider"),y(this,"uui-popover-container")}getFormattedValue(t){const e=this.opacity?`${t}a`:t,i=this._colord.toHex(),o=i.length>7?i.substring(0,i.length-2):i,{r,g:s,b:n}=this._colord.toRgb(),{h:u,s:c,l:h}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),m=this._colord.alpha();switch(e){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(i);case"rgb":return this.setLetterCase(`rgb(${r}, ${s}, ${n})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${u}, ${c}%, ${h}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${u}, ${c}%, ${h}%)`);case"hsva":return this.setLetterCase(`hsva(${u}, ${c}%, ${f}%, ${m})`);default:return""}}getBrightness(t){return z(-1*(200*t/(this.saturation-200)),0,100)}getLightness(t){return z((200-this.saturation)*t/100*5/10,0,100)}handleFormatToggle(){const t=["hex","rgb","hsl","hsv"],e=(t.indexOf(this.format)+1)%t.length;this.format=t[e],this._syncValues()}handleAlphaChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const i=t.target,o={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(i.value)/100};this.setColor(o)}handleHueChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const o={h:t.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(o)}handleGridChange(t){var e;t.stopPropagation(),(e=this._swatches)==null||e.resetSelection();const i=t.target,o={h:this.hue,s:i.saturation,l:i.lightness,a:this.alpha/100};this.setColor(o)}handleInputChange(t){var e;(e=this._swatches)==null||e.resetSelection();const i=t.target;i.value?(this.setColor(i.value),i.value=this.value):this.setColor("#000"),t.stopPropagation()}handleInputKeyDown(t){var e;t.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),(e=this._swatches)==null||e.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(t){t.stopImmediatePropagation();const e=t.target;e.value?this.setColor(e.value):this.setColor("#000")}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(){if(!Sl)return;new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(t){this._colord=new Vr(t);const{h:e,l:i,s:o,a:r}=this._colord.toHsl();return this.hue=e,this.saturation=o,this.lightness=i,this.alpha=this.opacity?r*100:100,this._syncValues(),this.dispatchEvent(new jr(jr.CHANGE)),!0}setLetterCase(t){return typeof t!="string"?"":this.uppercase?t.toUpperCase():t.toLowerCase()}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return l`
|
|
2107
2229
|
<div
|
|
2108
|
-
class=${
|
|
2230
|
+
class=${os({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}
|
|
2109
2231
|
aria-disabled=${this.disabled?"true":"false"}>
|
|
2110
2232
|
<uui-color-area
|
|
2111
2233
|
.value="${this.value}"
|
|
@@ -2139,7 +2261,7 @@
|
|
|
2139
2261
|
class="color-picker__preview color-picker__transparent-bg"
|
|
2140
2262
|
title="Copy"
|
|
2141
2263
|
aria-label="Copy"
|
|
2142
|
-
style=${
|
|
2264
|
+
style=${we({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}
|
|
2143
2265
|
@click=${this.handleCopy}></button>
|
|
2144
2266
|
</div>
|
|
2145
2267
|
<div class="color-picker__user-input" aria-live="polite">
|
|
@@ -2151,7 +2273,7 @@
|
|
|
2151
2273
|
autocomplete="off"
|
|
2152
2274
|
autocapitalize="off"
|
|
2153
2275
|
spellcheck="false"
|
|
2154
|
-
.value=${
|
|
2276
|
+
.value=${Lp(this.inputValue)}
|
|
2155
2277
|
?disabled=${this.disabled}
|
|
2156
2278
|
@keydown=${this.handleInputKeyDown}
|
|
2157
2279
|
@change=${this.handleInputChange}>
|
|
@@ -2165,7 +2287,7 @@
|
|
|
2165
2287
|
compact>
|
|
2166
2288
|
<span>${this.format}</span>
|
|
2167
2289
|
</uui-button>`}
|
|
2168
|
-
${
|
|
2290
|
+
${Sl?l`<uui-button
|
|
2169
2291
|
label="Select a color"
|
|
2170
2292
|
?disabled=${this.disabled}
|
|
2171
2293
|
@click=${this.handleEyeDropper}
|
|
@@ -2185,22 +2307,19 @@
|
|
|
2185
2307
|
@change=${this.handleColorSwatchChange}>
|
|
2186
2308
|
${this.swatches.map(t=>l`<uui-color-swatch label="${t}" .value=${t}>
|
|
2187
2309
|
</uui-color-swatch>`)}
|
|
2188
|
-
</uui-color-swatches
|
|
2189
|
-
placement="bottom-start"
|
|
2190
|
-
@close=${this.closeColorPicker}>
|
|
2191
|
-
<button
|
|
2310
|
+
</uui-color-swatches>`:w}_renderPreviewButton(){return l` <button
|
|
2192
2311
|
type="button"
|
|
2193
2312
|
part="trigger"
|
|
2194
|
-
slot="trigger"
|
|
2195
2313
|
aria-label="${this.label||"Open Color picker"}"
|
|
2196
|
-
class=${
|
|
2197
|
-
style=${
|
|
2314
|
+
class=${os({"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})}
|
|
2315
|
+
style=${we({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}
|
|
2198
2316
|
?disabled=${this.disabled}
|
|
2199
|
-
@click=${this.openColorPicker}
|
|
2200
2317
|
aria-haspopup="true"
|
|
2201
|
-
aria-expanded="false"
|
|
2202
|
-
|
|
2203
|
-
|
|
2318
|
+
aria-expanded="false"
|
|
2319
|
+
popovertarget="color-picker-popover"></button>
|
|
2320
|
+
<uui-popover-container id="color-picker-popover">
|
|
2321
|
+
${this._renderColorPicker()}
|
|
2322
|
+
</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}};U.styles=[d`
|
|
2204
2323
|
:host {
|
|
2205
2324
|
--uui-look-outline-border: #ddd;
|
|
2206
2325
|
--uui-look-outline-border-hover: #aaa;
|
|
@@ -2208,6 +2327,9 @@
|
|
|
2208
2327
|
display: block;
|
|
2209
2328
|
width: var(--uui-color-picker-width, 280px);
|
|
2210
2329
|
}
|
|
2330
|
+
uui-popover-container {
|
|
2331
|
+
width: inherit;
|
|
2332
|
+
}
|
|
2211
2333
|
.color-picker {
|
|
2212
2334
|
width: 100%;
|
|
2213
2335
|
background-color: #fff;
|
|
@@ -2325,12 +2447,6 @@
|
|
|
2325
2447
|
height: 36px;
|
|
2326
2448
|
}
|
|
2327
2449
|
|
|
2328
|
-
uui-popover {
|
|
2329
|
-
display: block;
|
|
2330
|
-
width: 100%;
|
|
2331
|
-
margin: 5px 0;
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
2450
|
uui-input {
|
|
2335
2451
|
/* lower the font size to avoid overflow with hlsa format */
|
|
2336
2452
|
font-size: 0.85rem;
|
|
@@ -2341,7 +2457,7 @@
|
|
|
2341
2457
|
uui-color-area {
|
|
2342
2458
|
width: 100%;
|
|
2343
2459
|
}
|
|
2344
|
-
`],
|
|
2460
|
+
`],L([O('[part="input"]')],U.prototype,"_input",2),L([O(".color-picker__preview")],U.prototype,"_previewButton",2),L([O("#swatches")],U.prototype,"_swatches",2),L([b()],U.prototype,"inputValue",2),L([b()],U.prototype,"hue",2),L([b()],U.prototype,"saturation",2),L([b()],U.prototype,"lightness",2),L([b()],U.prototype,"alpha",2),L([b()],U.prototype,"_colord",2),L([a()],U.prototype,"value",2),L([a()],U.prototype,"format",2),L([a()],U.prototype,"name",2),L([a()],U.prototype,"size",2),L([a({attribute:"no-format-toggle",type:Boolean})],U.prototype,"noFormatToggle",2),L([a({type:Boolean,reflect:!0})],U.prototype,"inline",2),L([a({type:Boolean,reflect:!0})],U.prototype,"disabled",2),L([a({type:Boolean})],U.prototype,"opacity",2),L([a({type:Boolean})],U.prototype,"uppercase",2),L([a({attribute:!1})],U.prototype,"swatches",2),U=L([p("uui-color-picker")],U);var Yp=Object.defineProperty,zl=Object.getOwnPropertySymbols,Zp=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Il=(t,e,i)=>e in t?Yp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Al=(t,e)=>{for(var i in e||(e={}))Zp.call(e,i)&&Il(t,i,e[i]);if(zl)for(var i of zl(e))Qp.call(e,i)&&Il(t,i,e[i]);return t};class Hr extends S{constructor(e,i={}){super(e,Al(Al({},{bubbles:!0}),i))}}Hr.CHANGE="change";var Jp=Object.defineProperty,ev=Object.getOwnPropertyDescriptor,je=(t,e,i,o)=>{for(var r=o>1?void 0:o?ev(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Jp(e,i,r),r};let ae=class extends me("label",v){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.disabled=!1}willUpdate(t){t.has("type")&&(this.type==="hue"?(this.max=360,this.precision=1):this.type==="opacity"&&(this.max=100,this.precision=1))}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(t){if(this.disabled||!this.container||!this.handle)return;const{width:e,height:i}=this.container.getBoundingClientRect();this.handle.focus(),t.preventDefault(),Ua(this.container,{onMove:(o,r)=>{this.vertical?this.value=Da(z(r/i*this.max,this.min,this.max),this.min,this.max):this.value=z(o/e*this.max,this.min,this.max),this.syncValues()},initialEvent:t})}handleClick(t){this.disabled||(this.value=this.getValueFromMousePosition(t),this.syncValues())}handleKeyDown(t){const e=t.shiftKey?10:1;t.key==="ArrowLeft"?(t.preventDefault(),this.value=z(this.value-e,this.min,this.max),this.syncValues()):t.key==="ArrowRight"?(t.preventDefault(),this.value=z(this.value+e,this.min,this.max),this.syncValues()):t.key==="ArrowUp"?(t.preventDefault(),this.value=z(this.value+e,this.min,this.max),this.syncValues()):t.key==="ArrowDown"?(t.preventDefault(),this.value=z(this.value-e,this.min,this.max),this.syncValues()):t.key==="Home"?(t.preventDefault(),this.value=this.min,this.syncValues()):t.key==="End"&&(t.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(t){return this.vertical?this.getValueFromYCoordinate(t.clientY):this.getValueFromXCoordinate(t.clientX)}getValueFromTouchPosition(t){return this.vertical?this.getValueFromYCoordinate(t.touches[0].clientY):this.getValueFromXCoordinate(t.touches[0].clientX)}getValueFromXCoordinate(t){const{left:e,width:i}=this.container.getBoundingClientRect();return z(this.roundToPrecision((t-e)/i*this.max),this.min,this.max)}getValueFromYCoordinate(t){const{top:e,height:i}=this.container.getBoundingClientRect();return z(this.roundToPrecision((t-e)/i*this.max),this.min,this.max)}roundToPrecision(t){const e=1/this.precision;return Math.ceil(t*e)/e}syncValues(){this.dispatchEvent(new Hr(Hr.CHANGE))}get ccsPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Da(this.value,this.min,this.max):this.max/this.value)}render(){return l` <div
|
|
2345
2461
|
part="slider"
|
|
2346
2462
|
id="color-slider"
|
|
2347
2463
|
role="slider"
|
|
@@ -2356,7 +2472,7 @@
|
|
|
2356
2472
|
@keydown=${this.handleKeyDown}>
|
|
2357
2473
|
${this.type==="opacity"?l`<div
|
|
2358
2474
|
id="current-hue"
|
|
2359
|
-
style=${
|
|
2475
|
+
style=${we({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
2360
2476
|
transparent 0%,
|
|
2361
2477
|
${this.color} 100%
|
|
2362
2478
|
)`})}></div>`:""}
|
|
@@ -2364,9 +2480,9 @@
|
|
|
2364
2480
|
<span
|
|
2365
2481
|
id="color-slider__handle"
|
|
2366
2482
|
style="--current-value: ${this.ccsPropCurrentValue}%;"
|
|
2367
|
-
tabindex=${
|
|
2483
|
+
tabindex=${C(this.disabled?void 0:"0")}></span>
|
|
2368
2484
|
</div>
|
|
2369
|
-
${Math.round(this.value)}`}};
|
|
2485
|
+
${Math.round(this.value)}`}};ae.styles=[d`
|
|
2370
2486
|
:host {
|
|
2371
2487
|
--uui-slider-height: 15px;
|
|
2372
2488
|
--uui-slider-handle-size: 17px;
|
|
@@ -2475,7 +2591,7 @@
|
|
|
2475
2591
|
position: absolute;
|
|
2476
2592
|
inset: 0 0 0 0;
|
|
2477
2593
|
}
|
|
2478
|
-
`],
|
|
2594
|
+
`],je([a({reflect:!0})],ae.prototype,"type",2),je([a()],ae.prototype,"color",2),je([a({type:Number})],ae.prototype,"min",2),je([a({type:Number})],ae.prototype,"max",2),je([a({type:Number})],ae.prototype,"precision",2),je([a({type:Boolean,reflect:!0})],ae.prototype,"vertical",2),je([a()],ae.prototype,"value",2),je([a({type:Boolean,reflect:!0})],ae.prototype,"disabled",2),ae=je([p("uui-color-slider")],ae);var tv=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,ji=(t,e,i,o)=>{for(var r=o>1?void 0:o?iv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&tv(e,i,r),r};let Qe=class extends me("label",Rt(Ii(v))){constructor(){super(),this.disabled=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){var t;return(t=this._value)!=null?t:""}set value(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}get color(){return this._color}set color(t){const e=this._color;this._color=t,this.requestUpdate("color",e)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(t){t.has("disabled")&&this.selectable&&(this.selectable=!this.disabled,this.deselectable=!this.disabled),(t.has("selectable")||t.has("selected"))&&this._setAriaAttributes()}render(){var t,e;return l`
|
|
2479
2595
|
<button
|
|
2480
2596
|
id="swatch"
|
|
2481
2597
|
aria-label=${this.label}
|
|
@@ -2487,8 +2603,8 @@
|
|
|
2487
2603
|
style="background-color: var(--uui-swatch-color, ${(t=this.color)!=null?t:this.value})"></div>
|
|
2488
2604
|
<div
|
|
2489
2605
|
class="color-swatch__check"
|
|
2490
|
-
style="
|
|
2491
|
-
${
|
|
2606
|
+
style="color: var(--uui-swatch-color, ${(e=this.color)!=null?e:this.value})">
|
|
2607
|
+
${Ar}
|
|
2492
2608
|
</div>
|
|
2493
2609
|
</div>
|
|
2494
2610
|
${this._renderWithLabel()}
|
|
@@ -2496,7 +2612,7 @@
|
|
|
2496
2612
|
`}_renderWithLabel(){return this.showLabel?l`<div class="color-swatch__label">
|
|
2497
2613
|
<strong>${this.renderLabel()}</strong>
|
|
2498
2614
|
${this.value}
|
|
2499
|
-
</div
|
|
2615
|
+
</div>`:w}};Qe.styles=[d`
|
|
2500
2616
|
:host {
|
|
2501
2617
|
position: relative;
|
|
2502
2618
|
display: inline-flex;
|
|
@@ -2654,27 +2770,29 @@
|
|
|
2654
2770
|
white-space: nowrap;
|
|
2655
2771
|
box-sizing: border-box;
|
|
2656
2772
|
}
|
|
2657
|
-
`],
|
|
2773
|
+
`],ji([a()],Qe.prototype,"value",1),ji([a()],Qe.prototype,"color",1),ji([a({type:Boolean,reflect:!0})],Qe.prototype,"disabled",2),ji([a({type:Boolean,attribute:"show-label",reflect:!0})],Qe.prototype,"showLabel",2),Qe=ji([p("uui-color-swatch")],Qe);var rv=Object.defineProperty,Ul=Object.getOwnPropertySymbols,ov=Object.prototype.hasOwnProperty,sv=Object.prototype.propertyIsEnumerable,Dl=(t,e,i)=>e in t?rv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ll=(t,e)=>{for(var i in e||(e={}))ov.call(e,i)&&Dl(t,i,e[i]);if(Ul)for(var i of Ul(e))sv.call(e,i)&&Dl(t,i,e[i]);return t};class Zt extends S{constructor(e,i={}){super(e,Ll(Ll({},{bubbles:!0}),i))}}Zt.CHANGE="change";var nv=Object.defineProperty,av=Object.getOwnPropertyDescriptor,Br=(t,e,i,o)=>{for(var r=o>1?void 0:o?av(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&nv(e,i,r),r};let Pt=class extends me("label",v){constructor(){super(),this.value="",this.disabled=!1,this._onSelected=t=>{const e=t.target;this.swatches.includes(e)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new Zt(Zt.CHANGE)))},this._onDeselected=t=>{const e=t.target;this.swatches.includes(e)&&(this._activeElement===e&&(this._activeElement=void 0),this._selectedElement===e&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new Zt(Zt.CHANGE))))},this.addEventListener(Ze.SELECTED,this._onSelected),this.addEventListener(Ze.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(t){this.__activeElement&&(this.__activeElement.active=!1),t&&(t.active=!0,this.__activeElement=t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(t){t.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this.swatches||this.swatches.length===0||this.swatches.forEach(t=>{t.setAttribute("aria-checked","false"),t.setAttribute("role","radio"),this.disabled?t.setAttribute("disabled",""):t.setAttribute("selectable","selectable"),this.value!==""&&t.value===this.value&&(t.selected=!0,t.setAttribute("aria-checked","true"),this._selectedElement=t,this._activeElement=this._selectedElement)})}resetSelection(){this.swatches.forEach(t=>{t.selected=!1,t.active=!1,t.selectable=!t.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return l`<slot @slotchange=${this._handleSlotChange}></slot>`}};Pt.styles=[d`
|
|
2658
2774
|
:host {
|
|
2659
2775
|
display: flex;
|
|
2660
2776
|
flex-wrap: wrap;
|
|
2661
2777
|
gap: 0.4rem;
|
|
2662
2778
|
}
|
|
2663
|
-
`],
|
|
2779
|
+
`],Br([a()],Pt.prototype,"value",2),Br([a({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),Br([Ye({selector:"uui-color-swatch"})],Pt.prototype,"swatches",2),Pt=Br([p("uui-color-swatches")],Pt);var lv=Object.defineProperty,Ml=Object.getOwnPropertySymbols,uv=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,Tl=(t,e,i)=>e in t?lv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Nl=(t,e)=>{for(var i in e||(e={}))uv.call(e,i)&&Tl(t,i,e[i]);if(Ml)for(var i of Ml(e))cv.call(e,i)&&Tl(t,i,e[i]);return t};class pe extends S{constructor(e,i={}){super(e,Nl(Nl({},{bubbles:!0}),i))}}pe.CHANGE="change",pe.INNER_SLOT_CHANGE="inner-slot-change";var hv=Object.defineProperty,dv=Object.getOwnPropertyDescriptor,Je=(t,e,i,o)=>{for(var r=o>1?void 0:o?dv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&hv(e,i,r),r},pv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},vv=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Vl=(t,e,i)=>(pv(t,e,"access private method"),i),Rr,ps;let ve=class extends v{constructor(){super(...arguments),vv(this,Rr),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{Vl(this,Rr,ps).call(this),this._updateSelection(),this.dispatchEvent(new pe(pe.INNER_SLOT_CHANGE))},this._onSelected=t=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new pe(pe.CHANGE))},this._onDeselected=t=>{const e=t.composedPath()[0];this._selectedElement===e&&(this.value="",this.displayValue="",this.dispatchEvent(new pe(pe.CHANGE)))},this._moveIndex=t=>{const e=Math.min(Math.max(this._getActiveIndex+t,0),this._options.length-1);this._goToIndex(e)},this._onKeyDown=t=>{var e;if(!(this._options.length<=0))switch(t.key){case"ArrowUp":t.preventDefault(),t.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":t.preventDefault(),t.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{t.preventDefault(),this._goToIndex(0);break}case"Enter":{t.preventDefault(),(e=this._getActiveElement)==null||e.click();break}case"End":{t.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(t){if(this._value===t)return;const e=this._value;this._value=t,this._updateSelection(),this.requestUpdate("value",e)}get for(){return this._for}set for(t){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=t,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(Ze.SELECTED,this._onSelected),this.addEventListener(Ze.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Ze.SELECTED,this._onSelected),this.removeEventListener(Ze.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const t of this._options)t.value===this._value?(this.displayValue=t.displayValue||"",t.selected=!0):t.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(t=>t.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(t=>t.value===this._activeElementValue)}_goToIndex(t){if(this._options.length===0)return;t=Math.min(Math.max(t,0),this._options.length-1);const e=this._options[t];this._activeElementValue=e.value,Vl(this,Rr,ps).call(this),e&&e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return l` <slot @slotchange=${this._onSlotChange}></slot> `}};Rr=new WeakSet,ps=function(){for(let e=0;e<this._activeOptions.length;e++)this._activeOptions[e].active=!1;const t=this._getActiveElement;t?t.active=!0:this._goToIndex(0)},ve.styles=[d`
|
|
2664
2780
|
:host {
|
|
2665
2781
|
display: flex;
|
|
2666
2782
|
flex-direction: column;
|
|
2667
2783
|
box-sizing: border-box;
|
|
2668
2784
|
}
|
|
2669
|
-
`],
|
|
2785
|
+
`],Je([a()],ve.prototype,"value",1),Je([a({type:String})],ve.prototype,"displayValue",2),Je([a({attribute:!1})],ve.prototype,"for",1),Je([Ye({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],ve.prototype,"_options",2),Je([Ye({flatten:!0,selector:"uui-combobox-list-option[active]"})],ve.prototype,"_activeOptions",2),Je([b()],ve.prototype,"_value",2),Je([b()],ve.prototype,"_activeElementValue",2),ve=Je([p("uui-combobox-list")],ve);var fv=Object.defineProperty,bv=Object.getOwnPropertyDescriptor,Qt=(t,e,i,o)=>{for(var r=o>1?void 0:o?bv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&fv(e,i,r),r};let He=class extends Rt(Ii(v)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){var t;return this._value?this._value:((t=this.textContent)==null?void 0:t.trim())||""}set value(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}get displayValue(){var t;return this._displayValue?this._displayValue:((t=this.textContent)==null?void 0:t.trim())||""}set displayValue(t){const e=this._displayValue;this._displayValue=t,this.requestUpdate("displayValue",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.selectable=!this._disabled,this.requestUpdate("disabled",e)}render(){return l`<slot></slot>`}};He.styles=[d`
|
|
2670
2786
|
:host {
|
|
2671
2787
|
position: relative;
|
|
2672
2788
|
cursor: pointer;
|
|
2673
|
-
margin: 0
|
|
2789
|
+
margin: 0 4px;
|
|
2674
2790
|
border-radius: var(--uui-border-radius,3px);
|
|
2675
2791
|
outline: 2px solid transparent;
|
|
2676
2792
|
outline-offset: -2px;
|
|
2793
|
+
padding-left: 4px;
|
|
2677
2794
|
}
|
|
2795
|
+
|
|
2678
2796
|
:host(:first-child) {
|
|
2679
2797
|
margin-top: 6px;
|
|
2680
2798
|
}
|
|
@@ -2715,6 +2833,7 @@
|
|
|
2715
2833
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2716
2834
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
2717
2835
|
}
|
|
2836
|
+
|
|
2718
2837
|
:host([disabled]:hover) {
|
|
2719
2838
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
2720
2839
|
}
|
|
@@ -2727,6 +2846,7 @@
|
|
|
2727
2846
|
color: var(--uui-color-selected-contrast,#fff);
|
|
2728
2847
|
background-color: var(--uui-color-selected,#3544b1);
|
|
2729
2848
|
}
|
|
2849
|
+
|
|
2730
2850
|
:host([selected]:hover) {
|
|
2731
2851
|
color: var(--uui-color-selected-contrast,#fff);
|
|
2732
2852
|
background-color: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
|
|
@@ -2735,7 +2855,7 @@
|
|
|
2735
2855
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2736
2856
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
2737
2857
|
}
|
|
2738
|
-
`],
|
|
2858
|
+
`],Qt([b()],He.prototype,"_disabled",2),Qt([b()],He.prototype,"_displayValue",2),Qt([a({type:String})],He.prototype,"value",1),Qt([a({type:String,attribute:"display-value"})],He.prototype,"displayValue",1),Qt([a({type:Boolean,reflect:!0})],He.prototype,"disabled",1),He=Qt([p("uui-combobox-list-option")],He);var gv=Object.defineProperty,jl=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,_v=Object.prototype.propertyIsEnumerable,Hl=(t,e,i)=>e in t?gv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Bl=(t,e)=>{for(var i in e||(e={}))mv.call(e,i)&&Hl(t,i,e[i]);if(jl)for(var i of jl(e))_v.call(e,i)&&Hl(t,i,e[i]);return t};class Y extends S{constructor(e,i={}){super(e,Bl(Bl({},{bubbles:!0}),i))}}Y.SEARCH="search",Y.CHANGE="change";var yv=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,Z=(t,e,i,o)=>{for(var r=o>1?void 0:o?xv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&yv(e,i,r),r},vs=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},E=(t,e,i)=>(vs(t,e,"read from private field"),i?i.call(t):e.get(t)),j=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rl=(t,e,i,o)=>(vs(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),fs=(t,e,i)=>(vs(t,e,"access private method"),i),fe,Jt,Hi,Bi,Fr,Gr,Wr,bs,gs,ms,_s,qr,ei,ys,Kr,Xr,xs,Yr;let F=class extends _e(v){constructor(){super(...arguments),j(this,Bi),this.closeLabel="Close",this.disabled=!1,j(this,fe,void 0),j(this,Jt,void 0),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,j(this,Hi,()=>{this._isPhone=E(this,Jt).matches}),j(this,Gr,()=>requestAnimationFrame(()=>this._inputElement.focus())),j(this,Wr,()=>requestAnimationFrame(()=>{var t;(t=this.shadowRoot)!=null&&t.activeElement||E(this,ei).call(this)})),j(this,bs,t=>{t.preventDefault(),t.stopImmediatePropagation(),this.search=t.target.value,this.dispatchEvent(new Y(Y.SEARCH)),E(this,qr).call(this)}),j(this,gs,()=>{var t;this.value&&this.value!==((t=E(this,fe))==null?void 0:t.value)&&fs(this,Bi,Fr).call(this,this.value)}),j(this,ms,()=>{var t;this.value=((t=E(this,fe))==null?void 0:t.value)||"",this.search=this.value?this.search:"",E(this,ei).call(this),this.dispatchEvent(new Y(Y.CHANGE))}),j(this,_s,()=>{this.open=!this.open}),j(this,qr,()=>{this.open||(this.open=!0)}),j(this,ei,()=>{this.open&&(this.open=!1,this.search="",this._inputElement.value=this._displayValue,this.dispatchEvent(new Y(Y.SEARCH)))}),j(this,ys,t=>{this.open===!1&&t.key==="Enter"&&(t.preventDefault(),t.stopImmediatePropagation()),(t.key==="ArrowUp"||t.key==="ArrowDown")&&E(this,qr).call(this),(t.key==="Escape"||t.key==="Enter")&&E(this,ei).call(this)}),j(this,Kr,t=>{t.key&&t.key!=="Enter"||(t.preventDefault(),t.stopImmediatePropagation(),this.value="",this.search="",this._inputElement.value=this._displayValue,this._inputElement.focus(),this.dispatchEvent(new Y(Y.SEARCH)),this.dispatchEvent(new Y(Y.CHANGE)))}),j(this,Xr,()=>l` <uui-input
|
|
2739
2859
|
slot="trigger"
|
|
2740
2860
|
id="combobox-input"
|
|
2741
2861
|
label="combobox-input"
|
|
@@ -2743,40 +2863,43 @@
|
|
|
2743
2863
|
.value=${this._displayValue}
|
|
2744
2864
|
autocomplete="off"
|
|
2745
2865
|
.disabled=${this.disabled}
|
|
2746
|
-
|
|
2747
|
-
@
|
|
2748
|
-
@
|
|
2866
|
+
popovertarget="combobox-popover"
|
|
2867
|
+
@click=${E(this,_s)}
|
|
2868
|
+
@input=${E(this,bs)}
|
|
2869
|
+
@keydown=${E(this,ys)}>
|
|
2749
2870
|
<slot name="input-prepend" slot="prepend"></slot>
|
|
2750
|
-
${this.disabled?"":this.
|
|
2871
|
+
${this.disabled?"":E(this,xs).call(this)}
|
|
2872
|
+
<div id="expand-symbol-wrapper" slot="append">
|
|
2873
|
+
<uui-symbol-expand .open=${this._isOpen}></uui-symbol-expand>
|
|
2874
|
+
</div>
|
|
2751
2875
|
<slot name="input-append" slot="append"></slot>
|
|
2752
|
-
</uui-input
|
|
2753
|
-
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
|
|
2754
|
-
</svg>`,this._renderClearButton=()=>this.value||this.search?l`<uui-button
|
|
2876
|
+
</uui-input>`),j(this,xs,()=>this.value||this.search?l`<uui-button
|
|
2755
2877
|
id="clear-button"
|
|
2756
|
-
@click=${this
|
|
2757
|
-
@keydown=${this
|
|
2878
|
+
@click=${E(this,Kr)}
|
|
2879
|
+
@keydown=${E(this,Kr)}
|
|
2758
2880
|
label="clear"
|
|
2759
2881
|
slot="append"
|
|
2760
2882
|
compact
|
|
2761
2883
|
style="height: 100%;">
|
|
2762
|
-
<uui-icon name="remove" .fallback=${
|
|
2763
|
-
</uui-button>`:"",this
|
|
2884
|
+
<uui-icon name="remove" .fallback=${qo.strings[0]}></uui-icon>
|
|
2885
|
+
</uui-button>`:""),j(this,Yr,()=>l`<div id="dropdown">
|
|
2764
2886
|
<uui-scroll-container tabindex="-1" id="scroll-container">
|
|
2765
2887
|
<slot></slot>
|
|
2766
2888
|
</uui-scroll-container>
|
|
2767
|
-
</div>`}get value(){return this._value}set value(t){typeof t=="string"&&this.
|
|
2768
|
-
<uui-button label="close" look="primary" @click=${this
|
|
2889
|
+
</div>`)}get value(){return this._value}set value(t){typeof t=="string"&&fs(this,Bi,Fr).call(this,t),super.value=t}get search(){return this._search}set search(t){if(this.search===t)return;const e=this._search;this._search=t,this.requestUpdate("search",e)}get open(){return this._isOpen}set open(t){const e=t;this._isOpen=t;const i=this._comboboxPopoverElement;if(i)if(t){const o=this._inputElement.offsetWidth;i.style.setProperty("--popover-width",`${o}px`),i.showPopover()}else i.hidePopover();this.requestUpdate("open",e)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",E(this,Wr)),this.addEventListener("mousedown",E(this,Gr)),Rl(this,Jt,window.matchMedia("(max-width: 600px)")),E(this,Hi).call(this),E(this,Jt).addEventListener("change",E(this,Hi)),y(this,"uui-icon"),y(this,"uui-input"),y(this,"uui-button"),y(this,"uui-combobox-list"),y(this,"uui-scroll-container"),y(this,"uui-popover-container"),y(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",E(this,Wr)),this.removeEventListener("mousedown",E(this,Gr)),E(this,Jt).removeEventListener("change",E(this,Hi))}async firstUpdated(){var t;const e=(t=this._comboboxListElements)==null?void 0:t[0];e&&(Rl(this,fe,e),E(this,fe).for=this,E(this,fe).addEventListener(pe.CHANGE,E(this,ms)),E(this,fe).addEventListener(pe.INNER_SLOT_CHANGE,E(this,gs)),await this.updateComplete,fs(this,Bi,Fr).call(this,this.value))}getFormElement(){return this._inputElement}render(){return this._isPhone&&this.open?l` <div id="phone-wrapper">
|
|
2890
|
+
<uui-button label="close" look="primary" @click=${E(this,ei)}>
|
|
2769
2891
|
${this.closeLabel}
|
|
2770
2892
|
</uui-button>
|
|
2771
|
-
${this.
|
|
2893
|
+
${E(this,Xr).call(this)} ${E(this,Yr).call(this)}
|
|
2772
2894
|
</div>`:l`
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2895
|
+
${E(this,Xr).call(this)}
|
|
2896
|
+
<uui-popover-container
|
|
2897
|
+
id="combobox-popover"
|
|
2898
|
+
popover="manual"
|
|
2899
|
+
placement="bottom-end">
|
|
2900
|
+
${E(this,Yr).call(this)}
|
|
2901
|
+
</uui-popover-container>
|
|
2902
|
+
`}};fe=new WeakMap,Jt=new WeakMap,Hi=new WeakMap,Bi=new WeakSet,Fr=function(t){E(this,fe)&&(E(this,fe).value=t,requestAnimationFrame(()=>this._displayValue=E(this,fe).displayValue||""))},Gr=new WeakMap,Wr=new WeakMap,bs=new WeakMap,gs=new WeakMap,ms=new WeakMap,_s=new WeakMap,qr=new WeakMap,ei=new WeakMap,ys=new WeakMap,Kr=new WeakMap,Xr=new WeakMap,xs=new WeakMap,Yr=new WeakMap,F.styles=[d`
|
|
2780
2903
|
:host {
|
|
2781
2904
|
display: inline-block;
|
|
2782
2905
|
}
|
|
@@ -2786,11 +2909,21 @@
|
|
|
2786
2909
|
border-radius: var(--uui-size-1,3px);
|
|
2787
2910
|
}
|
|
2788
2911
|
|
|
2912
|
+
#combobox-popover {
|
|
2913
|
+
width: var(--uui-dropdown-width, var(--popover-width, inherit));
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2789
2916
|
#scroll-container {
|
|
2790
2917
|
overflow-y: auto;
|
|
2791
2918
|
width: 100%;
|
|
2792
2919
|
max-height: var(--uui-combobox-popover-max-height, 500px);
|
|
2793
2920
|
}
|
|
2921
|
+
#expand-symbol-wrapper {
|
|
2922
|
+
height: 100%;
|
|
2923
|
+
padding-right: var(--uui-size-space-3,9px);
|
|
2924
|
+
display: flex;
|
|
2925
|
+
justify-content: center;
|
|
2926
|
+
}
|
|
2794
2927
|
|
|
2795
2928
|
#dropdown {
|
|
2796
2929
|
overflow: hidden;
|
|
@@ -2807,14 +2940,6 @@
|
|
|
2807
2940
|
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));
|
|
2808
2941
|
}
|
|
2809
2942
|
|
|
2810
|
-
#caret {
|
|
2811
|
-
margin-right: var(--uui-size-3, 9px);
|
|
2812
|
-
display: flex;
|
|
2813
|
-
width: 1.15em;
|
|
2814
|
-
flex-shrink: 0;
|
|
2815
|
-
margin-top: -1px;
|
|
2816
|
-
}
|
|
2817
|
-
|
|
2818
2943
|
:host([disabled]) #caret {
|
|
2819
2944
|
fill: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
2820
2945
|
}
|
|
@@ -2844,12 +2969,12 @@
|
|
|
2844
2969
|
#phone-wrapper #scroll-container {
|
|
2845
2970
|
max-height: unset;
|
|
2846
2971
|
}
|
|
2847
|
-
`],
|
|
2972
|
+
`],Z([a({attribute:"value",reflect:!0})],F.prototype,"value",1),Z([a({type:String})],F.prototype,"search",1),Z([a({type:Boolean})],F.prototype,"open",1),Z([a({type:String})],F.prototype,"closeLabel",2),Z([a({type:Boolean,reflect:!0})],F.prototype,"disabled",2),Z([O("#combobox-input")],F.prototype,"_inputElement",2),Z([O("#combobox-popover")],F.prototype,"_comboboxPopoverElement",2),Z([Ye({flatten:!0,selector:"uui-combobox-list"})],F.prototype,"_comboboxListElements",2),Z([b()],F.prototype,"_displayValue",2),Z([b()],F.prototype,"_search",2),Z([b()],F.prototype,"_isPhone",2),Z([b()],F.prototype,"_isOpen",2),F=Z([p("uui-combobox")],F);var wv=Object.defineProperty,$v=Object.getOwnPropertyDescriptor,ws=(t,e,i,o)=>{for(var r=o>1?void 0:o?$v(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&wv(e,i,r),r};let ti=class extends v{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=t=>{this._headlineSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return l` <h3
|
|
2848
2973
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
2849
2974
|
${this.headline}
|
|
2850
2975
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
2851
2976
|
</h3>`}renderContent(){return l`<slot></slot>`}renderActions(){return l`<slot id="actions" name="actions"></slot>`}render(){return l`${this.renderHeadline()} ${this.renderContent()}
|
|
2852
|
-
${this.renderActions()} `}};
|
|
2977
|
+
${this.renderActions()} `}};ti.styles=[d`
|
|
2853
2978
|
:host {
|
|
2854
2979
|
display: block;
|
|
2855
2980
|
padding: var(--uui-size-10,30px) var(--uui-size-14,42px);
|
|
@@ -2862,7 +2987,7 @@
|
|
|
2862
2987
|
justify-content: end;
|
|
2863
2988
|
gap: var(--uui-size-4,12px);
|
|
2864
2989
|
}
|
|
2865
|
-
`],
|
|
2990
|
+
`],ws([a({type:String})],ti.prototype,"headline",2),ws([b()],ti.prototype,"_headlineSlotHasContent",2),ti=ws([p("uui-dialog-layout")],ti);var Ev=Object.defineProperty,Cv=Object.getOwnPropertyDescriptor,Pv=(t,e,i,o)=>{for(var r=o>1?void 0:o?Cv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Ev(e,i,r),r};let Zr=class extends v{render(){return l`<slot></slot>`}};Zr.styles=[d`
|
|
2866
2991
|
:host {
|
|
2867
2992
|
position: relative;
|
|
2868
2993
|
display: block;
|
|
@@ -2880,7 +3005,7 @@
|
|
|
2880
3005
|
calc(var(--uui-border-radius,3px) * 2)
|
|
2881
3006
|
);
|
|
2882
3007
|
}
|
|
2883
|
-
`],
|
|
3008
|
+
`],Zr=Pv([p("uui-dialog")],Zr);var Ov=Object.defineProperty,Fl=Object.getOwnPropertySymbols,kv=Object.prototype.hasOwnProperty,Sv=Object.prototype.propertyIsEnumerable,Gl=(t,e,i)=>e in t?Ov(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Wl=(t,e)=>{for(var i in e||(e={}))kv.call(e,i)&&Gl(t,i,e[i]);if(Fl)for(var i of Fl(e))Sv.call(e,i)&&Gl(t,i,e[i]);return t};class ii extends S{constructor(e,i={}){super(e,Wl(Wl({},{bubbles:!0}),i))}}ii.CHANGE="change";var zv=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,Ri=(t,e,i,o)=>{for(var r=o>1?void 0:o?Iv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zv(e,i,r),r};let et=class extends me("",v){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",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(t){if(t){const i=[],o=[];t.split(",").forEach(r=>{r=r.trim().toLowerCase(),new RegExp("[a-z]+\\/[a-z*]","s").test(r)?i.push(r):o.push(r.replace(/^\./,""))}),this._acceptedMimeTypes=i,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const e=this._accept;this._accept=t,this.requestUpdate("accept",e)}get accept(){return this._accept}browse(){this._input.click()}connectedCallback(){super.connectedCallback(),y(this,"uui-symbol-file-dropzone")}async _getAllFileEntries(t){const e=[],i=[...t];for(;i.length>0;){const o=i.shift();if(o.kind==="file"){const r=o.getAsFile();if(!r)continue;this._isAccepted(r)&&e.push(r)}else if(o.kind==="directory"){if(!("webkitGetAsEntry"in o))continue;const r=o.webkitGetAsEntry();i.push(...await this._readAllDirectoryEntries(r.createReader()))}}return e}async _readAllDirectoryEntries(t){const e=[];let i=await this._readEntriesPromise(t);for(;i.length>0;)e.push(...i),i=await this._readEntriesPromise(t);return e}async _readEntriesPromise(t){return new Promise((e,i)=>{try{t.readEntries(e,i)}catch(o){console.log(o),i(o)}})}_isAccepted(t){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const e=t.type.toLowerCase(),i=t.name.split(".").pop();if(i&&this._acceptedFileExtensions.includes(i.toLowerCase()))return!0;for(const o in this._acceptedMimeTypes){if(e===o)return!0;if(o.endsWith("/*")&&e.startsWith(o.replace("/*","")))return!0}return!1}async _onDrop(t){var e;t.preventDefault(),this._dropzone.classList.remove("hover");const i=(e=t.dataTransfer)==null?void 0:e.items;if(i){let o=await this._getAllFileEntries(i);this.multiple===!1&&o.length&&(o=[o[0]]),this.dispatchEvent(new ii(ii.CHANGE,{detail:{files:o}}))}}_onDragOver(t){t.preventDefault()}_onDragEnter(t){this._dropzone.classList.add("hover"),t.preventDefault()}_onDragLeave(t){this._dropzone.classList.remove("hover"),t.preventDefault()}_onFileInputChange(){const t=this._input.files?Array.from(this._input.files):[];this.dispatchEvent(new ii(ii.CHANGE,{detail:{files:t}}))}render(){return l`
|
|
2884
3009
|
<div id="dropzone">
|
|
2885
3010
|
<uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>
|
|
2886
3011
|
${this.renderLabel()}
|
|
@@ -2894,7 +3019,7 @@
|
|
|
2894
3019
|
aria-label="${this.label}" />
|
|
2895
3020
|
<slot></slot>
|
|
2896
3021
|
</div>
|
|
2897
|
-
`}};
|
|
3022
|
+
`}};et.styles=[d`
|
|
2898
3023
|
#dropzone {
|
|
2899
3024
|
display: flex;
|
|
2900
3025
|
flex-direction: column;
|
|
@@ -2932,7 +3057,7 @@
|
|
|
2932
3057
|
opacity: 0;
|
|
2933
3058
|
display: none;
|
|
2934
3059
|
}
|
|
2935
|
-
`],
|
|
3060
|
+
`],Ri([O("#input")],et.prototype,"_input",2),Ri([O("#dropzone")],et.prototype,"_dropzone",2),Ri([a({type:String})],et.prototype,"accept",1),Ri([a({type:Boolean})],et.prototype,"multiple",2),et=Ri([p("uui-file-dropzone")],et);class Av{static humanFileSize(e,i=!1,o=1){const r=i?1e3:1024;if(Math.abs(e)<r)return e+" B";const s=i?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let n=-1;const u=10**o;do e/=r,++n;while(Math.round(Math.abs(e)*u)/u>=r&&n<s.length-1);return e.toFixed(o)+" "+s[n]}}var Uv=Object.defineProperty,Dv=Object.getOwnPropertyDescriptor,Ce=(t,e,i,o)=>{for(var r=o>1?void 0:o?Dv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Uv(e,i,r),r};let Q=class extends v{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(t){const e=this._file;t instanceof File&&(this._name=t.name.split(".")[0],this._extension=t.name.split(".")[1],this._isDirectory=!1,this._size=t.size,this._isFileAnImage(t)&&(this._isImage=!0,this._getThumbnail(t).then(i=>{this._src=i})),this.requestUpdate("file",e))}connectedCallback(){super.connectedCallback(),y(this,"uui-symbol-file-thumbnail"),y(this,"uui-symbol-folder"),y(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?l`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?l`<uui-symbol-file-thumbnail
|
|
2936
3061
|
.src=${this._src}
|
|
2937
3062
|
.alt=${this._name}
|
|
2938
3063
|
id="file-symbol"></uui-symbol-file-thumbnail>`:l`<uui-symbol-file
|
|
@@ -2952,10 +3077,10 @@
|
|
|
2952
3077
|
<div id="file-info">
|
|
2953
3078
|
${this._renderLongName()}
|
|
2954
3079
|
<span id="file-size">
|
|
2955
|
-
${this._size&&!this._isDirectory?l`${
|
|
3080
|
+
${this._size&&!this._isDirectory?l`${Av.humanFileSize(this._size,!0)}`:""}
|
|
2956
3081
|
</span>
|
|
2957
3082
|
</div>
|
|
2958
|
-
`}};
|
|
3083
|
+
`}};Q.styles=[d`
|
|
2959
3084
|
:host {
|
|
2960
3085
|
position: relative;
|
|
2961
3086
|
display: grid;
|
|
@@ -3023,7 +3148,7 @@
|
|
|
3023
3148
|
text-decoration: underline;
|
|
3024
3149
|
cursor: pointer;
|
|
3025
3150
|
}
|
|
3026
|
-
`],
|
|
3151
|
+
`],Ce([b()],Q.prototype,"_name",2),Ce([b()],Q.prototype,"_url",2),Ce([b()],Q.prototype,"_extension",2),Ce([b()],Q.prototype,"_src",2),Ce([b()],Q.prototype,"_size",2),Ce([b()],Q.prototype,"_isDirectory",2),Ce([b()],Q.prototype,"_file",2),Ce([b()],Q.prototype,"_isImage",2),Ce([a({attribute:!1})],Q.prototype,"file",1),Q=Ce([p("uui-file-preview")],Q);var Lv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,Qr=(t,e,i,o)=>{for(var r=o>1?void 0:o?Mv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Lv(e,i,r),r};let Ot=class extends v{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=t=>{this._labelSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=t=>{this._descriptionSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),y(this,"uui-form-validation-message")}render(){return l`
|
|
3027
3152
|
<div id="label" style=${this._labelSlotHasContent?"":"display: none"}>
|
|
3028
3153
|
<slot name="label" @slotchange=${this._labelSlotChanged}></slot>
|
|
3029
3154
|
</div>
|
|
@@ -3039,7 +3164,7 @@
|
|
|
3039
3164
|
<slot></slot>
|
|
3040
3165
|
<slot name="message" slot="message"></slot>
|
|
3041
3166
|
</uui-form-validation-message>
|
|
3042
|
-
`}};
|
|
3167
|
+
`}};Ot.styles=[d`
|
|
3043
3168
|
:host {
|
|
3044
3169
|
position: relative;
|
|
3045
3170
|
display: block;
|
|
@@ -3058,25 +3183,25 @@
|
|
|
3058
3183
|
margin-top: -8px;
|
|
3059
3184
|
min-height: 8px;
|
|
3060
3185
|
}
|
|
3061
|
-
`],
|
|
3186
|
+
`],Qr([a({type:String})],Ot.prototype,"description",2),Qr([b()],Ot.prototype,"_labelSlotHasContent",2),Qr([b()],Ot.prototype,"_descriptionSlotHasContent",2),Ot=Qr([p("uui-form-layout-item")],Ot);/**
|
|
3062
3187
|
* @license
|
|
3063
3188
|
* Copyright 2017 Google LLC
|
|
3064
3189
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3065
|
-
*/const
|
|
3190
|
+
*/const ql=(t,e,i)=>{const o=new Map;for(let r=e;r<=i;r++)o.set(t[r],r);return o},$s=Wt(class extends qt{constructor(t){if(super(t),t.type!==de.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,i){let o;i===void 0?i=e:e!==void 0&&(o=e);const r=[],s=[];let n=0;for(const u of t)r[n]=o?o(u,n):n,s[n]=i(u,n),n++;return{values:s,keys:r}}render(t,e,i){return this.ct(t,e,i).values}update(t,[e,i,o]){var r;const s=Dp(t),{values:n,keys:u}=this.ct(e,i,o);if(!Array.isArray(s))return this.ut=u,n;const c=(r=this.ut)!==null&&r!==void 0?r:this.ut=[],h=[];let f,m,g=0,x=s.length-1,$=0,P=n.length-1;for(;g<=x&&$<=P;)if(s[g]===null)g++;else if(s[x]===null)x--;else if(c[g]===u[$])h[$]=Ct(s[g],n[$]),g++,$++;else if(c[x]===u[P])h[P]=Ct(s[x],n[P]),x--,P--;else if(c[g]===u[P])h[P]=Ct(s[g],n[P]),Ni(t,h[P+1],s[g]),g++,P--;else if(c[x]===u[$])h[$]=Ct(s[x],n[$]),Ni(t,s[g],s[x]),x--,$++;else if(f===void 0&&(f=ql(u,$,P),m=ql(c,g,x)),f.has(c[g]))if(f.has(c[x])){const W=m.get(u[$]),Ue=W!==void 0?s[W]:null;if(Ue===null){const De=Ni(t,s[g]);Ct(De,n[$]),h[$]=De}else h[$]=Ct(Ue,n[$]),Ni(t,s[g],Ue),s[W]=null;$++}else ls(s[x]),x--;else ls(s[g]),g++;for(;$<=P;){const W=Ni(t,h[P+1]);Ct(W,n[$]),h[$++]=W}for(;g<=x;){const W=s[g++];W!==null&&ls(W)}return this.ut=u,fl(t,h),K}});var Tv=Object.defineProperty,Nv=Object.getOwnPropertyDescriptor,Kl=(t,e,i,o)=>{for(var r=o>1?void 0:o?Nv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Tv(e,i,r),r};let Fi=class extends v{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=t=>{const e=t.composedPath()[0];e.pristine===!1?this._messages.set(e,e.validationMessage):this._messages.delete(e),this.requestUpdate()},this._onControlValid=t=>{const e=t.composedPath()[0];this._messages.delete(e),this.requestUpdate()},this.for===null&&(this.for=this)}get for(){return this._for}set for(t){let e=null;if(typeof t=="string"){const r=this.getRootNode();e=r?.getElementById(t)}const i=e||this,o=this._for;o!==i&&(o!==null&&(o.removeEventListener(Gt.INVALID,this._onControlInvalid),o.removeEventListener(Gt.VALID,this._onControlValid)),this._for=i,this._for.addEventListener(Gt.INVALID,this._onControlInvalid),this._for.addEventListener(Gt.VALID,this._onControlValid))}render(){return l`
|
|
3066
3191
|
<slot></slot>
|
|
3067
3192
|
<div id="messages">
|
|
3068
|
-
${
|
|
3193
|
+
${$s(this._messages,t=>l`<div>${t[1]}</div>`)}
|
|
3069
3194
|
<slot name="message"></slot>
|
|
3070
3195
|
</div>
|
|
3071
|
-
`}};
|
|
3196
|
+
`}};Fi.styles=[d`
|
|
3072
3197
|
#messages {
|
|
3073
3198
|
color: var(--uui-color-danger-standalone,rgb(191, 33, 78));
|
|
3074
3199
|
}
|
|
3075
|
-
`],
|
|
3200
|
+
`],Kl([a({reflect:!1,attribute:!0})],Fi.prototype,"for",1),Fi=Kl([p("uui-form-validation-message")],Fi);var Vv=Object.defineProperty,jv=Object.getOwnPropertyDescriptor,Hv=(t,e,i,o)=>{for(var r=o>1?void 0:o?jv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Vv(e,i,r),r};let Es=class extends v{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(t){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const e=t.target.assignedNodes({flatten:!0}).filter(i=>i instanceof HTMLFormElement);this._formElement=e.length>0?e[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(t){if(t.target===null)return;const e=t.target;if(!e.checkValidity()){e.setAttribute("submit-invalid","");return}e.removeAttribute("submit-invalid")}_onReset(t){t.target!==null&&t.target.removeAttribute("submit-invalid")}render(){return l`<slot @slotchange=${this._onSlotChanged}></slot>`}};Es=Hv([p("uui-form")],Es);/**
|
|
3076
3201
|
* @license
|
|
3077
3202
|
* Copyright 2017 Google LLC
|
|
3078
3203
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3079
|
-
*/class
|
|
3204
|
+
*/class Cs extends qt{constructor(e){if(super(e),this.et=w,e.type!==de.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this.ft=void 0,this.et=e;if(e===K)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 i=[e];return i.raw=i,this.ft={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Cs.directiveName="unsafeHTML",Cs.resultType=1;const Ps=Wt(Cs);var Bv=Object.defineProperty,Xl=Object.getOwnPropertySymbols,Rv=Object.prototype.hasOwnProperty,Fv=Object.prototype.propertyIsEnumerable,Yl=(t,e,i)=>e in t?Bv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Zl=(t,e)=>{for(var i in e||(e={}))Rv.call(e,i)&&Yl(t,i,e[i]);if(Xl)for(var i of Xl(e))Fv.call(e,i)&&Yl(t,i,e[i]);return t};class ri extends S{constructor(e,i={}){super(e,Zl(Zl({},{bubbles:!0,composed:!0}),i)),this.icon=null}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}}ri.ICON_REQUEST="icon-request";var Gv=Object.defineProperty,Wv=Object.getOwnPropertyDescriptor,kt=(t,e,i,o)=>{for(var r=o>1?void 0:o?Wv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Gv(e,i,r),r};let Pe=class extends v{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(t){this._name=t,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const t=new ri(ri.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(t),t.icon!==null?(this._retrievedNameIcon=!0,t.icon.then(e=>{this._useFallback=!1,this._nameSvg=e})):(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?l`<slot name="fallback"></slot>`:Ps(this.fallback):this._nameSvg!==null?Ps(this._nameSvg):this.svg!==null?Ps(this.svg):l`<slot></slot>`}};Pe.styles=[d`
|
|
3080
3205
|
:host {
|
|
3081
3206
|
display: inline-block;
|
|
3082
3207
|
vertical-align: bottom;
|
|
@@ -3096,16 +3221,16 @@
|
|
|
3096
3221
|
:host-context(div[slot='append']) {
|
|
3097
3222
|
margin-right: var(--uui-size-2, 6px);
|
|
3098
3223
|
}
|
|
3099
|
-
`],$t([b()],xe.prototype,"_nameSvg",2),$t([a()],xe.prototype,"label",2),$t([a()],xe.prototype,"name",1),$t([a({attribute:!1})],xe.prototype,"svg",2),$t([a({attribute:!1})],xe.prototype,"fallback",2),$t([b()],xe.prototype,"_useFallback",2),xe=$t([p("uui-icon")],xe);class Qo{constructor(e){this.promise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),e&&this.resolve(e)}set svg(e){this.resolve(e)}}class Jo{constructor(){this.icons={},this._onIconRequest=e=>{const i=this.getIcon(e.detail.iconName);i!==null&&e.acceptRequest(i)}}attach(e){e.addEventListener(Yt.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(Yt.ICON_REQUEST,this._onIconRequest)}defineIcon(e,i){if(this.icons[e]){this.icons[e].svg=i;return}this.icons[e]=new Qo(i)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Qo}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}}var av=Object.defineProperty,lv=Object.getOwnPropertyDescriptor,xl=(t,e,i,o)=>{for(var r=o>1?void 0:o?lv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&av(e,i,r),r};let Ti=class extends v{constructor(){super(),this._icons={},this._registry=new Jo,this._registry.attach(this)}get icons(){return this._icons}set icons(t){this._icons=t,this._registry&&Object.entries(this._icons).forEach(([e,i])=>this._registry.defineIcon(e,i))}get registry(){return this._registry}set registry(t){this.registry&&this.registry.detach(this),t.attach(this),this._registry=t}render(){return l`<slot></slot>`}};xl([a({attribute:!1})],Ti.prototype,"_icons",2),Ti=xl([p("uui-icon-registry")],Ti);const uv=_`<svg xmlns="http://www.w3.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 22v-5" /><path d="M9 8V2" /><path d="M15 8V2" /> <path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" /></svg>`,cv=_`<svg xmlns="http://www.w3.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>`,hv=_`<svg xmlns="http://www.w3.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>`,dv=_`<svg xmlns="http://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>`,pv=_`<svg xmlns="http://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>`,vv=_`<svg xmlns="http://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>`,fv=_`<svg xmlns="http://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>`,bv=_`<svg xmlns="http://www.w3.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>`,gv=_`<svg xmlns="http://www.w3.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>`,mv=_`<svg xmlns="http://www.w3.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>`,_v=_`<svg xmlns="http://www.w3.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>`,yv=_`<svg xmlns="http://www.w3.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>`,xv=_`<svg xmlns="http://www.w3.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>`,wv=_`<svg xmlns="http://www.w3.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>`,$v=_`<svg xmlns="http://www.w3.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>`,Ev=_`<svg xmlns="http://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>`,Pv=_`<svg xmlns="http://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>`,Cv=_`<svg xmlns="http://www.w3.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>`,Ov=_`<svg xmlns="http://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>`,kv=_`<svg xmlns="http://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>`,Sv=_`<svg xmlns="http://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>`,Iv=_`<svg xmlns="http://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>`,zv=_`<svg xmlns="http://www.w3.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>`,Av=_`<svg xmlns="http://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>`,Uv=_`<svg xmlns="http://www.w3.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>`,Dv=_`<svg xmlns="http://www.w3.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>`,Lv=_`<svg xmlns="http://www.w3.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>`,Mv=_`<svg xmlns="http://www.w3.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>`,Tv=_`<svg xmlns="http://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>`,Nv=_`<svg xmlns="http://www.w3.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>`,Vv=_`<svg xmlns="http://www.w3.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>`,jv=_`<svg xmlns="http://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>`;class wl extends Jo{constructor(){super(),this.defineIcon("add",uv.strings[0]),this.defineIcon("alert",cv.strings[0]),this.defineIcon("attachment",hv.strings[0]),this.defineIcon("calendar",dv.strings[0]),this.defineIcon("check",pv.strings[0]),this.defineIcon("clipboard",vv.strings[0]),this.defineIcon("code",fv.strings[0]),this.defineIcon("colorpicker",bv.strings[0]),this.defineIcon("copy",gv.strings[0]),this.defineIcon("delete",mv.strings[0]),this.defineIcon("document",_v.strings[0]),this.defineIcon("download",yv.strings[0]),this.defineIcon("edit",xv.strings[0]),this.defineIcon("favorite",wv.strings[0]),this.defineIcon("folder",$v.strings[0]),this.defineIcon("forbidden",Ev.strings[0]),this.defineIcon("info",Pv.strings[0]),this.defineIcon("link",Cv.strings[0]),this.defineIcon("lock",Ov.strings[0]),this.defineIcon("pause",kv.strings[0]),this.defineIcon("picture",Sv.strings[0]),this.defineIcon("play",Iv.strings[0]),this.defineIcon("remove",zv.strings[0]),this.defineIcon("search",Av.strings[0]),this.defineIcon("see",Uv.strings[0]),this.defineIcon("settings",Dv.strings[0]),this.defineIcon("subtract",Lv.strings[0]),this.defineIcon("sync",Mv.strings[0]),this.defineIcon("unlock",Tv.strings[0]),this.defineIcon("unsee",Nv.strings[0]),this.defineIcon("wand",Vv.strings[0]),this.defineIcon("wrong",jv.strings[0])}}var Hv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,Rv=(t,e,i,o)=>{for(var r=o>1?void 0:o?Bv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Hv(e,i,r),r};let es=class extends Ti{constructor(){super(),this.registry=new wl}};es=Rv([p("uui-icon-registry-essential")],es);var Fv=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,Zt=(t,e,i,o)=>{for(var r=o>1?void 0:o?Gv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Fv(e,i,r),r};let Ne=class extends fe(v){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=t=>{let e=[];for(const i of t)this.multiple?e.push(i):e=[i];this._files=e},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return this._value}set value(t){if(super.value=t,t instanceof FormData){const e=this.multiple?t.getAll(this.name):[t.get(this.name)];this._updateFileWrappers(e);return}if(t instanceof File){this._updateFileWrappers([t]);return}}connectedCallback(){super.connectedCallback(),y(this,"uui-icon"),y(this,"uui-file-dropzone"),y(this,"uui-button"),y(this,"uui-action-bar"),y(this,"uui-file-preview")}getFormElement(){return this._dropZone}_handleClick(t){t.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(t){const i=t.detail.files.filter(r=>r instanceof File||r.isFile);if(!this.multiple){const r=i[0],n=r instanceof File?r:await this._getFile(r);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 o=this.value;if(i.length>0&&!(this.value instanceof FormData)&&(o=new FormData),o instanceof FormData)for(const r of i){const s=r instanceof File;o.append(this.name,s?r:await this._getFile(r))}this.value=o}async _getFile(t){return await new Promise((e,i)=>t.file(e,i))}_removeFile(t){const e=this._files[t];if(this.value instanceof FormData){const o=this.value.getAll(this.name).filter(r=>r!==e);if(o.length===0)this.value="";else{this.value.delete(this.name);for(const r of o)this.value.append(this.name,r)}this._updateFileWrappers(o)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(t){t?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(t,e){return l`<uui-file-preview .file="${t}">
|
|
3224
|
+
`],kt([b()],Pe.prototype,"_nameSvg",2),kt([a()],Pe.prototype,"label",2),kt([a()],Pe.prototype,"name",1),kt([a({attribute:!1})],Pe.prototype,"svg",2),kt([a({attribute:!1})],Pe.prototype,"fallback",2),kt([b()],Pe.prototype,"_useFallback",2),Pe=kt([p("uui-icon")],Pe);class Os{constructor(e){this.promise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),e&&this.resolve(e)}set svg(e){this.resolve(e)}}class ks{constructor(){this.icons={},this._onIconRequest=e=>{const i=this.getIcon(e.detail.iconName);i!==null&&e.acceptRequest(i)}}attach(e){e.addEventListener(ri.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(ri.ICON_REQUEST,this._onIconRequest)}defineIcon(e,i){if(this.icons[e]){this.icons[e].svg=i;return}this.icons[e]=new Os(i)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Os}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}}var qv=Object.defineProperty,Kv=Object.getOwnPropertyDescriptor,Ql=(t,e,i,o)=>{for(var r=o>1?void 0:o?Kv(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&qv(e,i,r),r};let Gi=class extends v{constructor(){super(),this._icons={},this._registry=new ks,this._registry.attach(this)}get icons(){return this._icons}set icons(t){this._icons=t,this._registry&&Object.entries(this._icons).forEach(([e,i])=>this._registry.defineIcon(e,i))}get registry(){return this._registry}set registry(t){this.registry&&this.registry.detach(this),t.attach(this),this._registry=t}render(){return l`<slot></slot>`}};Ql([a({attribute:!1})],Gi.prototype,"_icons",2),Gi=Ql([p("uui-icon-registry")],Gi);const Xv=_`<svg xmlns="http://www.w3.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 22v-5" /><path d="M9 8V2" /><path d="M15 8V2" /> <path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" /></svg>`,Yv=_`<svg xmlns="http://www.w3.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>`,Zv=_`<svg xmlns="http://www.w3.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>`,Qv=_`<svg xmlns="http://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>`,Jv=_`<svg xmlns="http://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>`,ef=_`<svg xmlns="http://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>`,tf=_`<svg xmlns="http://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>`,rf=_`<svg xmlns="http://www.w3.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>`,of=_`<svg xmlns="http://www.w3.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>`,sf=_`<svg xmlns="http://www.w3.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>`,nf=_`<svg xmlns="http://www.w3.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>`,af=_`<svg xmlns="http://www.w3.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>`,lf=_`<svg xmlns="http://www.w3.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>`,uf=_`<svg xmlns="http://www.w3.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>`,cf=_`<svg xmlns="http://www.w3.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>`,hf=_`<svg xmlns="http://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>`,df=_`<svg xmlns="http://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>`,pf=_`<svg xmlns="http://www.w3.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>`,vf=_`<svg xmlns="http://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>`,ff=_`<svg xmlns="http://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>`,bf=_`<svg xmlns="http://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>`,gf=_`<svg xmlns="http://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>`,mf=_`<svg xmlns="http://www.w3.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>`,yf=_`<svg xmlns="http://www.w3.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>`,xf=_`<svg xmlns="http://www.w3.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>`,wf=_`<svg xmlns="http://www.w3.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>`,Ef=_`<svg xmlns="http://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>`,Cf=_`<svg xmlns="http://www.w3.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>`,Pf=_`<svg xmlns="http://www.w3.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>`,Of=_`<svg xmlns="http://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>`;class Jl extends ks{constructor(){super(),this.defineIcon("add",Xv.strings[0]),this.defineIcon("alert",Yv.strings[0]),this.defineIcon("attachment",Zv.strings[0]),this.defineIcon("calendar",Qv.strings[0]),this.defineIcon("check",Jv.strings[0]),this.defineIcon("clipboard",ef.strings[0]),this.defineIcon("code",tf.strings[0]),this.defineIcon("colorpicker",rf.strings[0]),this.defineIcon("copy",of.strings[0]),this.defineIcon("delete",sf.strings[0]),this.defineIcon("document",nf.strings[0]),this.defineIcon("download",af.strings[0]),this.defineIcon("edit",lf.strings[0]),this.defineIcon("favorite",uf.strings[0]),this.defineIcon("folder",cf.strings[0]),this.defineIcon("forbidden",hf.strings[0]),this.defineIcon("info",df.strings[0]),this.defineIcon("link",pf.strings[0]),this.defineIcon("lock",vf.strings[0]),this.defineIcon("pause",ff.strings[0]),this.defineIcon("picture",bf.strings[0]),this.defineIcon("play",gf.strings[0]),this.defineIcon("remove",mf.strings[0]),this.defineIcon("search",_f.strings[0]),this.defineIcon("see",yf.strings[0]),this.defineIcon("settings",xf.strings[0]),this.defineIcon("subtract",wf.strings[0]),this.defineIcon("sync",$f.strings[0]),this.defineIcon("unlock",Ef.strings[0]),this.defineIcon("unsee",Cf.strings[0]),this.defineIcon("wand",Pf.strings[0]),this.defineIcon("wrong",Of.strings[0])}}var kf=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,zf=(t,e,i,o)=>{for(var r=o>1?void 0:o?Sf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&kf(e,i,r),r};let Ss=class extends Gi{constructor(){super(),this.registry=new Jl}};Ss=zf([p("uui-icon-registry-essential")],Ss);var If=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,oi=(t,e,i,o)=>{for(var r=o>1?void 0:o?Af(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&If(e,i,r),r};let Be=class extends _e(v){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=t=>{let e=[];for(const i of t)this.multiple?e.push(i):e=[i];this._files=e},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return this._value}set value(t){if(super.value=t,t instanceof FormData){const e=this.multiple?t.getAll(this.name):[t.get(this.name)];this._updateFileWrappers(e);return}if(t instanceof File){this._updateFileWrappers([t]);return}}connectedCallback(){super.connectedCallback(),y(this,"uui-icon"),y(this,"uui-file-dropzone"),y(this,"uui-button"),y(this,"uui-action-bar"),y(this,"uui-file-preview")}getFormElement(){return this._dropZone}_handleClick(t){t.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(t){const i=t.detail.files.filter(r=>r instanceof File||r.isFile);if(!this.multiple){const r=i[0],n=r instanceof File?r:await this._getFile(r);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 o=this.value;if(i.length>0&&!(this.value instanceof FormData)&&(o=new FormData),o instanceof FormData)for(const r of i){const s=r instanceof File;o.append(this.name,s?r:await this._getFile(r))}this.value=o}async _getFile(t){return await new Promise((e,i)=>t.file(e,i))}_removeFile(t){const e=this._files[t];if(this.value instanceof FormData){const o=this.value.getAll(this.name).filter(r=>r!==e);if(o.length===0)this.value="";else{this.value.delete(this.name);for(const r of o)this.value.append(this.name,r)}this._updateFileWrappers(o)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(t){t?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(t,e){return l`<uui-file-preview .file="${t}">
|
|
3100
3225
|
<uui-action-bar slot="actions">
|
|
3101
3226
|
<uui-button
|
|
3102
3227
|
@click=${()=>this._removeFile(e)}
|
|
3103
3228
|
color="danger"
|
|
3104
3229
|
label=${`Delete ${t.name}`}>
|
|
3105
|
-
<uui-icon name="delete" .fallback=${
|
|
3230
|
+
<uui-icon name="delete" .fallback=${Hd.strings[0]}></uui-icon>
|
|
3106
3231
|
</uui-button>
|
|
3107
3232
|
</uui-action-bar>
|
|
3108
|
-
</uui-file-preview>`}_renderFiles(){return l`${
|
|
3233
|
+
</uui-file-preview>`}_renderFiles(){return l`${$s(this._files,t=>t.name+t.size,(t,e)=>this._renderFileItem(t,e))}`}render(){return l`
|
|
3109
3234
|
<uui-file-dropzone
|
|
3110
3235
|
id="dropzone"
|
|
3111
3236
|
?multiple=${this.multiple}
|
|
@@ -3118,9 +3243,9 @@
|
|
|
3118
3243
|
@click=${this._handleClick}
|
|
3119
3244
|
id="add-button"
|
|
3120
3245
|
look="placeholder"
|
|
3121
|
-
label="Add"></uui-button
|
|
3246
|
+
label="Add"></uui-button>`:w}
|
|
3122
3247
|
</div>
|
|
3123
|
-
`}};
|
|
3248
|
+
`}};Be.styles=[d`
|
|
3124
3249
|
:host {
|
|
3125
3250
|
width: 100%;
|
|
3126
3251
|
height: 100%;
|
|
@@ -3169,7 +3294,7 @@
|
|
|
3169
3294
|
justify-content: center;
|
|
3170
3295
|
align-items: stretch;
|
|
3171
3296
|
}
|
|
3172
|
-
`],
|
|
3297
|
+
`],oi([O("#dropzone")],Be.prototype,"_dropzone",2),oi([O("#dropzone")],Be.prototype,"_dropZone",2),oi([a({type:String})],Be.prototype,"accept",2),oi([a({type:Boolean})],Be.prototype,"multiple",2),oi([b()],Be.prototype,"_files",2),Be=oi([p("uui-input-file")],Be);var Uf=Object.defineProperty,eu=Object.getOwnPropertySymbols,Df=Object.prototype.hasOwnProperty,Lf=Object.prototype.propertyIsEnumerable,tu=(t,e,i)=>e in t?Uf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,iu=(t,e)=>{for(var i in e||(e={}))Df.call(e,i)&&tu(t,i,e[i]);if(eu)for(var i of eu(e))Lf.call(e,i)&&tu(t,i,e[i]);return t};class St extends S{constructor(e,i={}){super(e,iu(iu({},{bubbles:!0}),i))}}St.CHANGE="change",St.INPUT="input";var Mf=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,H=(t,e,i,o)=>{for(var r=o>1?void 0:o?Tf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Mf(e,i,r),r};let I=class extends _e(me("",v)){constructor(){super(),this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="",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("keypress",this._onKeypress),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&String(this._value).length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&String(this._value).length>this.maxlength)}get type(){return this._type}set type(t){this._type=t}firstUpdated(t){super.firstUpdated(t),this.addFormControlElement(this._input)}_onKeypress(t){this.type!=="color"&&t.key=="Enter"&&this.submit()}blur(){this._input.blur()}focus(){this._input.focus()}select(){this._input.select()}getFormElement(){return this._input}onInput(t){t.stopPropagation(),this.value=t.target.value,this.dispatchEvent(new St(St.INPUT))}onChange(t){t.stopPropagation(),this.pristine=!1,this.dispatchEvent(new St(St.CHANGE))}renderPrepend(){return l`<slot name="prepend"></slot>`}renderAppend(){return l`<slot name="append"></slot>`}render(){return l`
|
|
3173
3298
|
${this.renderPrepend()}
|
|
3174
3299
|
${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()}
|
|
3175
3300
|
${this.renderAppend()}
|
|
@@ -3180,15 +3305,15 @@
|
|
|
3180
3305
|
.type=${this.type}
|
|
3181
3306
|
.value=${this.value}
|
|
3182
3307
|
.name=${this.name}
|
|
3183
|
-
pattern=${
|
|
3184
|
-
min=${
|
|
3185
|
-
max=${
|
|
3186
|
-
step=${
|
|
3308
|
+
pattern=${C(this.pattern)}
|
|
3309
|
+
min=${C(this.min)}
|
|
3310
|
+
max=${C(this.max)}
|
|
3311
|
+
step=${C(this.step)}
|
|
3187
3312
|
spellcheck=${this.spellcheck}
|
|
3188
|
-
autocomplete=${
|
|
3189
|
-
placeholder=${
|
|
3190
|
-
aria-label=${
|
|
3191
|
-
inputmode=${
|
|
3313
|
+
autocomplete=${C(this.autocomplete)}
|
|
3314
|
+
placeholder=${C(this.placeholder)}
|
|
3315
|
+
aria-label=${C(this.label)}
|
|
3316
|
+
inputmode=${C(this.inputMode)}
|
|
3192
3317
|
?disabled=${this.disabled}
|
|
3193
3318
|
?autofocus=${this.autofocus}
|
|
3194
3319
|
?required=${this.required}
|
|
@@ -3319,20 +3444,21 @@
|
|
|
3319
3444
|
border: none;
|
|
3320
3445
|
}
|
|
3321
3446
|
|
|
3322
|
-
::slotted(uui-input)
|
|
3447
|
+
::slotted(uui-input),
|
|
3448
|
+
::slotted(uui-input-lock) {
|
|
3323
3449
|
height: 100%;
|
|
3324
3450
|
--uui-input-border-width: 0;
|
|
3325
3451
|
}
|
|
3326
|
-
`],
|
|
3452
|
+
`],H([a()],I.prototype,"min",2),H([a({type:Number})],I.prototype,"minlength",2),H([a({type:String,attribute:"minlength-message"})],I.prototype,"minlengthMessage",2),H([a()],I.prototype,"max",2),H([a({type:Number})],I.prototype,"maxlength",2),H([a({type:String,attribute:"maxlength-message"})],I.prototype,"maxlengthMessage",2),H([a({type:Number})],I.prototype,"step",2),H([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2),H([a({type:Boolean,reflect:!0})],I.prototype,"readonly",2),H([a()],I.prototype,"placeholder",2),H([a()],I.prototype,"autocomplete",2),H([a({type:Boolean,reflect:!0,attribute:"auto-width"})],I.prototype,"autoWidth",2),H([a({type:String})],I.prototype,"type",1),H([a({type:String})],I.prototype,"pattern",2),H([a({type:String})],I.prototype,"inputMode",2),H([O("#input")],I.prototype,"_input",2),I=H([p("uui-input")],I);var Nf=Object.defineProperty,Vf=Object.getOwnPropertyDescriptor,ru=(t,e,i,o)=>{for(var r=o>1?void 0:o?Vf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Nf(e,i,r),r};let Wi=class extends I{constructor(){super(),this.locked=!0,this.readonly=!0}connectedCallback(){super.connectedCallback(),y(this,"uui-icon"),y(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked}renderIcon(){return this.locked===!0?l`<uui-icon name="lock" .fallback=${Bd.strings[0]}></uui-icon>`:l`<uui-icon
|
|
3327
3453
|
name="unlock"
|
|
3328
|
-
.fallback=${
|
|
3454
|
+
.fallback=${Gd.strings[0]}></uui-icon>`}renderPrepend(){return l`<uui-button
|
|
3329
3455
|
.disabled=${this.disabled}
|
|
3330
3456
|
@click=${this._onLockToggle}
|
|
3331
3457
|
compact
|
|
3332
3458
|
id="lock"
|
|
3333
3459
|
label="${this.locked?"Unlock input":"Lock input"}">
|
|
3334
3460
|
${this.renderIcon()}
|
|
3335
|
-
</uui-button>`}};
|
|
3461
|
+
</uui-button>`}};Wi.styles=[...I.styles,d`
|
|
3336
3462
|
#lock {
|
|
3337
3463
|
height: 100%;
|
|
3338
3464
|
|
|
@@ -3345,16 +3471,16 @@
|
|
|
3345
3471
|
cursor: not-allowed;
|
|
3346
3472
|
opacity: 0.55;
|
|
3347
3473
|
}
|
|
3348
|
-
`],
|
|
3474
|
+
`],ru([a({type:Boolean,reflect:!0})],Wi.prototype,"locked",2),Wi=ru([p("uui-input-lock")],Wi);var jf=Object.defineProperty,Hf=Object.getOwnPropertyDescriptor,zs=(t,e,i,o)=>{for(var r=o>1?void 0:o?Hf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&jf(e,i,r),r};let si=class extends I{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(t){}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),y(this,"uui-icon"),y(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?l`<uui-icon name="see" .fallback=${Fd.strings[0]}></uui-icon>`:l`<uui-icon
|
|
3349
3475
|
name="unsee"
|
|
3350
|
-
.fallback=${
|
|
3476
|
+
.fallback=${Wd.strings[0]}></uui-icon>`}renderAppend(){return l`<uui-button
|
|
3351
3477
|
.disabled=${this.disabled}
|
|
3352
3478
|
@click=${this._onPasswordToggle}
|
|
3353
3479
|
compact
|
|
3354
3480
|
label="${this.passwordType==="password"?"Show password":"Hide password"}"
|
|
3355
3481
|
id="eye">
|
|
3356
3482
|
${this.renderIcon()}
|
|
3357
|
-
</uui-button>`}};
|
|
3483
|
+
</uui-button>`}};si.styles=[...I.styles,d`
|
|
3358
3484
|
#eye {
|
|
3359
3485
|
height: 100%;
|
|
3360
3486
|
margin-left: -6px;
|
|
@@ -3363,7 +3489,7 @@
|
|
|
3363
3489
|
#clear:hover {
|
|
3364
3490
|
color: black;
|
|
3365
3491
|
}
|
|
3366
|
-
`],
|
|
3492
|
+
`],zs([b()],si.prototype,"passwordType",2),zs([a()],si.prototype,"type",1),si=zs([p("uui-input-password")],si);var Bf=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Ff=(t,e,i,o)=>{for(var r=o>1?void 0:o?Rf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Bf(e,i,r),r};let Jr=class extends v{render(){return l`<slot></slot>`}};Jr.styles=[d`
|
|
3367
3493
|
:host {
|
|
3368
3494
|
display: inline-block;
|
|
3369
3495
|
font-family: inherit;
|
|
@@ -3378,7 +3504,7 @@
|
|
|
3378
3504
|
::slotted(*:last-child)uui-key {
|
|
3379
3505
|
margin-right: 0px;
|
|
3380
3506
|
}
|
|
3381
|
-
`],
|
|
3507
|
+
`],Jr=Ff([p("uui-keyboard-shortcut")],Jr);var Gf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,qf=(t,e,i,o)=>{for(var r=o>1?void 0:o?Wf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Gf(e,i,r),r};let eo=class extends v{render(){return l`<slot></slot>`}};eo.styles=[d`
|
|
3382
3508
|
:host {
|
|
3383
3509
|
background: var(--uui-color-surface,#fff);
|
|
3384
3510
|
border: 1px solid var(--uui-color-border,#d8d7d9);
|
|
@@ -3392,10 +3518,10 @@
|
|
|
3392
3518
|
user-select: none;
|
|
3393
3519
|
text-transform: lowercase;
|
|
3394
3520
|
}
|
|
3395
|
-
`],
|
|
3521
|
+
`],eo=qf([p("uui-key")],eo);var Kf=Object.defineProperty,Xf=Object.getOwnPropertyDescriptor,to=(t,e,i,o)=>{for(var r=o>1?void 0:o?Xf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Kf(e,i,r),r};let zt=class extends v{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const t=this.getForElement();t&&(t.focus(),t.click())}getForElement(){if(typeof this.for=="string"){const t=this.getRootNode();return t?.getElementById(this.for)||null}return this.for||null}render(){return l`
|
|
3396
3522
|
<slot></slot>
|
|
3397
3523
|
${this.required?l`<div id="required">*</div>`:""}
|
|
3398
|
-
`}};
|
|
3524
|
+
`}};zt.styles=[d`
|
|
3399
3525
|
:host {
|
|
3400
3526
|
font-weight: 700;
|
|
3401
3527
|
}
|
|
@@ -3410,7 +3536,7 @@
|
|
|
3410
3536
|
color: var(--uui-color-danger,#d42054);
|
|
3411
3537
|
font-weight: 900;
|
|
3412
3538
|
}
|
|
3413
|
-
`],
|
|
3539
|
+
`],to([a({type:Boolean,reflect:!0})],zt.prototype,"disabled",2),to([a({reflect:!0,attribute:!0})],zt.prototype,"for",2),to([a({type:Boolean,reflect:!0})],zt.prototype,"required",2),zt=to([p("uui-label")],zt);var Yf=Object.defineProperty,Zf=Object.getOwnPropertyDescriptor,Is=(t,e,i,o)=>{for(var r=o>1?void 0:o?Zf(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Yf(e,i,r),r};const Qf=(t,e,i)=>Math.min(Math.max(t,e),i);let ni=class extends v{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(t){const e=this._progress;this._progress=Qf(t,0,100),this.requestUpdate("progress",e)}get animationDuration(){return this._animationDuration}set animationDuration(t){const e=this._animationDuration;this._animationDuration=t>=0?t:1,this.requestUpdate("animationDuration",e)}render(){return l`
|
|
3414
3540
|
${this.progress?l`<div
|
|
3415
3541
|
id="bar"
|
|
3416
3542
|
style="max-width: ${this.progress.toString()}%;"></div>`:""}
|
|
@@ -3419,7 +3545,7 @@
|
|
|
3419
3545
|
class=${this.progress?"":"animate"}
|
|
3420
3546
|
style="animation-duration: ${this.animationDuration}s"></div>
|
|
3421
3547
|
<div id="bar-background"></div>
|
|
3422
|
-
`}};
|
|
3548
|
+
`}};ni.styles=[d`
|
|
3423
3549
|
:host {
|
|
3424
3550
|
position: relative;
|
|
3425
3551
|
display: block;
|
|
@@ -3478,7 +3604,7 @@
|
|
|
3478
3604
|
transform-origin: 175% 0%;
|
|
3479
3605
|
}
|
|
3480
3606
|
}
|
|
3481
|
-
`],
|
|
3607
|
+
`],Is([a({type:Number})],ni.prototype,"progress",1),Is([a({type:Number})],ni.prototype,"animationDuration",1),ni=Is([p("uui-loader-bar")],ni);var Jf=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,As=(t,e,i,o)=>{for(var r=o>1?void 0:o?eb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Jf(e,i,r),r};let ai=class extends v{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 t=this.clientHeight>=30;this._isLarge!=t&&(this._isLarge=t,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?l`<span id="progress-display">${this.progress}</span>`:""}render(){return l`
|
|
3482
3608
|
<svg
|
|
3483
3609
|
id="spinner"
|
|
3484
3610
|
class=${this.progress?"":"animate"}
|
|
@@ -3491,11 +3617,11 @@
|
|
|
3491
3617
|
cx="50%"
|
|
3492
3618
|
cy="50%"
|
|
3493
3619
|
r="16"
|
|
3494
|
-
style=${
|
|
3620
|
+
style=${we(this._circleStyle())} />
|
|
3495
3621
|
</g>
|
|
3496
3622
|
</svg>
|
|
3497
3623
|
${this.renderProgress()}
|
|
3498
|
-
`}};
|
|
3624
|
+
`}};ai.styles=[d`
|
|
3499
3625
|
:host {
|
|
3500
3626
|
vertical-align: middle;
|
|
3501
3627
|
line-height: 0;
|
|
@@ -3580,11 +3706,11 @@
|
|
|
3580
3706
|
/* Center the text */
|
|
3581
3707
|
padding-top: 0.09em;
|
|
3582
3708
|
}
|
|
3583
|
-
`],
|
|
3709
|
+
`],As([a({type:Number})],ai.prototype,"progress",2),As([a({type:Boolean,reflect:!0,attribute:"show-progress"})],ai.prototype,"showProgress",2),ai=As([p("uui-loader-circle")],ai);var tb=Object.defineProperty,ib=Object.getOwnPropertyDescriptor,rb=(t,e,i,o)=>{for(var r=o>1?void 0:o?ib(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&tb(e,i,r),r};let io=class extends v{render(){return l`
|
|
3584
3710
|
<div></div>
|
|
3585
3711
|
<div></div>
|
|
3586
3712
|
<div></div>
|
|
3587
|
-
`}};
|
|
3713
|
+
`}};io.styles=[d`
|
|
3588
3714
|
:host {
|
|
3589
3715
|
color: var(--uui-color-default,#1b264f);
|
|
3590
3716
|
}
|
|
@@ -3624,31 +3750,31 @@
|
|
|
3624
3750
|
background-color: currentColor;
|
|
3625
3751
|
}
|
|
3626
3752
|
}
|
|
3627
|
-
`],
|
|
3753
|
+
`],io=rb([p("uui-loader")],io);/**
|
|
3628
3754
|
* @license
|
|
3629
3755
|
* Copyright 2017 Google LLC
|
|
3630
3756
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3631
|
-
*/const
|
|
3757
|
+
*/const qi=(t,e)=>{var i,o;const r=t._$AN;if(r===void 0)return!1;for(const s of r)(o=(i=s)._$AO)===null||o===void 0||o.call(i,e,!1),qi(s,e);return!0},ro=t=>{let e,i;do{if((e=t._$AM)===void 0)break;i=e._$AN,i.delete(t),t=e}while(i?.size===0)},ou=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(i===void 0)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),nb(e)}};function ob(t){this._$AN!==void 0?(ro(this),this._$AM=t,ou(this)):this._$AM=t}function sb(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)qi(o[s],!1),ro(o[s]);else o!=null&&(qi(o,!1),ro(o));else qi(this,t)}const nb=t=>{var e,i,o,r;t.type==de.CHILD&&((e=(o=t)._$AP)!==null&&e!==void 0||(o._$AP=sb),(i=(r=t)._$AQ)!==null&&i!==void 0||(r._$AQ=ob))};class ab extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,i,o){super._$AT(e,i,o),ou(this),this.isConnected=e._$AU}_$AO(e,i=!0){var o,r;e!==this.isConnected&&(this.isConnected=e,e?(o=this.reconnected)===null||o===void 0||o.call(this):(r=this.disconnected)===null||r===void 0||r.call(this)),i&&(qi(this,e),ro(this))}setValue(e){if(pl(this._$Ct))this._$Ct._$AI(e,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=e,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}const Us=new WeakMap,Ds=Wt(class extends ab{render(t){return w}update(t,[e]){var i;const o=e!==this.G;return o&&this.G!==void 0&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=e,this.dt=(i=t.options)===null||i===void 0?void 0:i.host,this.ot(this.lt=t.element)),w}ot(t){var e;if(typeof this.G=="function"){const i=(e=this.dt)!==null&&e!==void 0?e:globalThis;let o=Us.get(i);o===void 0&&(o=new WeakMap,Us.set(i,o)),o.get(this.G)!==void 0&&this.G.call(this.dt,void 0),o.set(this.G,t),t!==void 0&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,i;return typeof this.G=="function"?(e=Us.get((t=this.dt)!==null&&t!==void 0?t:globalThis))===null||e===void 0?void 0:e.get(this.G):(i=this.G)===null||i===void 0?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});class Re extends S{}Re.SHOW_CHILDREN="show-children",Re.HIDE_CHILDREN="hide-children",Re.CLICK_LABEL="click-label";var lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,Fe=(t,e,i,o)=>{for(var r=o>1?void 0:o?ub(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&lb(e,i,r),r};let le=class extends Cr(Rt(Ii(me("label",v)))){constructor(){super(...arguments),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.iconSlotHasContent=!1,this._labelButtonChanged=t=>{this.selectableTarget=t||this},this._iconSlotChanged=t=>{this.iconSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const t=this.showChildren?Re.HIDE_CHILDREN:Re.SHOW_CHILDREN,e=new Re(t,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.showChildren=!this.showChildren)},this._onLabelClicked=()=>{const t=new Re(Re.CLICK_LABEL);this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),y(this,"uui-symbol-expand"),y(this,"uui-loader-bar")}_renderLabelInside(){return l` <slot
|
|
3632
3758
|
name="icon"
|
|
3633
3759
|
id="icon"
|
|
3634
3760
|
style=${this.iconSlotHasContent?"":"display: none;"}
|
|
3635
3761
|
@slotchange=${this._iconSlotChanged}></slot>
|
|
3636
3762
|
${this.renderLabel()}
|
|
3637
|
-
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?l` <span id="label-button" ${
|
|
3763
|
+
<slot name="badge" id="badge"> </slot>`}_renderLabelAsAnchor(){return this.disabled?l` <span id="label-button" ${Ds(this._labelButtonChanged)}>
|
|
3638
3764
|
${this._renderLabelInside()}
|
|
3639
3765
|
</span>`:l` <a
|
|
3640
3766
|
id="label-button"
|
|
3641
|
-
${
|
|
3642
|
-
href=${
|
|
3643
|
-
target=${
|
|
3644
|
-
rel=${
|
|
3767
|
+
${Ds(this._labelButtonChanged)}
|
|
3768
|
+
href=${C(this.href)}
|
|
3769
|
+
target=${C(this.target||void 0)}
|
|
3770
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}
|
|
3645
3771
|
@click=${this._onLabelClicked}
|
|
3646
3772
|
?disabled=${this.disabled}
|
|
3647
3773
|
aria-label="${this.label}">
|
|
3648
3774
|
${this._renderLabelInside()}
|
|
3649
3775
|
</a>`}_renderLabelAsButton(){return l` <button
|
|
3650
3776
|
id="label-button"
|
|
3651
|
-
${
|
|
3777
|
+
${Ds(this._labelButtonChanged)}
|
|
3652
3778
|
@click=${this._onLabelClicked}
|
|
3653
3779
|
?disabled=${this.disabled}
|
|
3654
3780
|
aria-label="${this.label}">
|
|
@@ -3665,7 +3791,7 @@
|
|
|
3665
3791
|
${this.loading?l`<uui-loader-bar id="loader"></uui-loader-bar>`:""}
|
|
3666
3792
|
</div>
|
|
3667
3793
|
${this.showChildren?l`<slot></slot>`:""}
|
|
3668
|
-
`}};
|
|
3794
|
+
`}};le.styles=[d`
|
|
3669
3795
|
:host {
|
|
3670
3796
|
box-sizing: border-box;
|
|
3671
3797
|
display: block;
|
|
@@ -3980,7 +4106,7 @@
|
|
|
3980
4106
|
--uui-button-height: calc(var(--uui-size-base-unit) * 4);
|
|
3981
4107
|
margin-right: var(--uui-size-base-unit);
|
|
3982
4108
|
}
|
|
3983
|
-
`],
|
|
4109
|
+
`],Fe([a({type:Boolean,reflect:!0})],le.prototype,"disabled",2),Fe([a({type:Boolean,reflect:!0,attribute:"show-children"})],le.prototype,"showChildren",2),Fe([a({type:Boolean,attribute:"has-children"})],le.prototype,"hasChildren",2),Fe([a({type:Boolean,attribute:"loading"})],le.prototype,"loading",2),Fe([a({type:String})],le.prototype,"href",2),Fe([a({type:String})],le.prototype,"target",2),Fe([a({type:String,attribute:"select-mode",reflect:!0})],le.prototype,"selectMode",2),Fe([b()],le.prototype,"iconSlotHasContent",2),le=Fe([p("uui-menu-item")],le);var cb=Object.defineProperty,hb=Object.getOwnPropertyDescriptor,li=(t,e,i,o)=>{for(var r=o>1?void 0:o?hb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&cb(e,i,r),r};class J extends v{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 i=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(i),!i.defaultPrevented&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const i=new CustomEvent("close",{cancelable:!0});this.dispatchEvent(i),!i.defaultPrevented&&this._closeModal()}}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(){var e,i;this.isOpen=!0,(e=this._dialogElement)==null||e.showModal(),(i=this._dialogElement)==null||i.addEventListener("cancel",this.close)}_closeModal(){var e;this.isClosing=!0,this.isOpen=!1,(e=this._dialogElement)==null||e.close(),this.dispatchEvent(new CustomEvent("close-end")),this.remove()}}J.styles=[d`
|
|
3984
4110
|
dialog {
|
|
3985
4111
|
display: block;
|
|
3986
4112
|
margin: 0;
|
|
@@ -4006,9 +4132,9 @@
|
|
|
4006
4132
|
:host([index='0']) dialog::after {
|
|
4007
4133
|
opacity: 0;
|
|
4008
4134
|
}
|
|
4009
|
-
`],
|
|
4135
|
+
`],li([O("dialog")],J.prototype,"_dialogElement",2),li([a({type:Boolean,reflect:!0,attribute:"is-open"})],J.prototype,"isOpen",2),li([a({type:Boolean,reflect:!0,attribute:"is-closing"})],J.prototype,"isClosing",2),li([a({type:Number,reflect:!0})],J.prototype,"index",2),li([a({type:Number,reflect:!0,attribute:"unique-index"})],J.prototype,"uniqueIndex",2),li([a({type:Number,attribute:"transition-duration"})],J.prototype,"transitionDuration",1);var db=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,su=(t,e,i,o)=>{for(var r=o>1?void 0:o?pb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&db(e,i,r),r},nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},au=(t,e,i)=>(nu(t,e,"read from private field"),i?i.call(t):e.get(t)),lu=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},vb=(t,e,i)=>(nu(t,e,"access private method"),i),oo,Ls,Ms,uu;let ui=class extends J{constructor(){super(),lu(this,oo),lu(this,Ms),this.size="full",this.addEventListener("close",vb(this,Ms,uu).bind(this))}firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--uui-modal-offset",-au(this,oo,Ls)+"px")}updated(t){super.updated(t),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}render(){return l`<dialog>
|
|
4010
4136
|
<slot></slot>
|
|
4011
|
-
</dialog>`}};
|
|
4137
|
+
</dialog>`}};oo=new WeakSet,Ls=function(){var t,e;return(e=(t=this._dialogElement)==null?void 0:t.getBoundingClientRect().width)!=null?e:0},Ms=new WeakSet,uu=function(t){t.preventDefault(),!this.isClosing&&(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-au(this,oo,Ls)+"px"),setTimeout(()=>{this._closeModal()},this.transitionDuration))},ui.styles=[...J.styles,d`
|
|
4012
4138
|
:host {
|
|
4013
4139
|
--uui-modal-sidebar-left-gap: 24px;
|
|
4014
4140
|
}
|
|
@@ -4044,7 +4170,7 @@
|
|
|
4044
4170
|
:host([size='small']) dialog {
|
|
4045
4171
|
max-width: min(400px, calc(100% - var(--uui-modal-sidebar-left-gap)));
|
|
4046
4172
|
}
|
|
4047
|
-
`],
|
|
4173
|
+
`],su([a({reflect:!0})],ui.prototype,"size",2),ui=su([p("uui-modal-sidebar")],ui);var fb=Object.defineProperty,bb=Object.getOwnPropertyDescriptor,ci=(t,e,i,o)=>{for(var r=o>1?void 0:o?bb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&fb(e,i,r),r},cu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},hu=(t,e,i)=>(cu(t,e,"read from private field"),i?i.call(t):e.get(t)),so=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},no=(t,e,i)=>(cu(t,e,"access private method"),i),Ts,Ns,ao,Vs,lo,js;let Ge=class extends v{constructor(){super(),so(this,ao),so(this,lo),this.sidebarGap=64,this.transitionDurationMS=250,so(this,Ts,()=>{var t,e;if(this._modals=(e=(t=this.modalSlot)==null?void 0:t.assignedElements({flatten:!0}).filter(i=>i instanceof J))!=null?e:[],this._sidebars=this._modals.filter(i=>i instanceof ui),this._modals.length===0){this.removeAttribute("backdrop");return}no(this,ao,Vs).call(this),no(this,lo,js).call(this)}),so(this,Ns,()=>{if(!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}no(this,ao,Vs).call(this),no(this,lo,js).call(this)}),this.addEventListener("close",hu(this,Ns))}firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return l`<slot @slotchange=${hu(this,Ts)}></slot>`}};Ts=new WeakMap,Ns=new WeakMap,ao=new WeakSet,Vs=function(){var t,e;this.setAttribute("backdrop","");const i=(e=(t=this._modals)==null?void 0:t.filter(o=>!o.isClosing).reverse())!=null?e:[];i?.forEach((o,r)=>{o.index=r,o.transitionDuration=this.transitionDurationMS}),i?.forEach(o=>{var r;const s=i?.filter(n=>n.constructor.name===o.constructor.name);o.uniqueIndex=(r=s?.indexOf(o))!=null?r:0})},lo=new WeakSet,js=function(){requestAnimationFrame(()=>{var t,e,i,o,r,s,n,u;let c=0;const h=(e=(t=this._sidebars)==null?void 0:t.filter(f=>!f.isClosing).reverse())!=null?e:[];for(let f=0;f<h.length;f++){const m=h[f],g=h[f+1];if(m.style.setProperty("--uui-modal-offset",c+"px"),g?.hasAttribute("hide"))break;const x=(r=(o=(i=m.shadowRoot)==null?void 0:i.querySelector("dialog"))==null?void 0:o.getBoundingClientRect().width)!=null?r:0,$=(u=(n=(s=g?.shadowRoot)==null?void 0:s.querySelector("dialog"))==null?void 0:n.getBoundingClientRect().width)!=null?u:0,P=x+c+this.sidebarGap-$;c=P>0?P:0}})},Ge.styles=d`
|
|
4048
4174
|
:host {
|
|
4049
4175
|
position: fixed;
|
|
4050
4176
|
--uui-modal-color-backdrop: rgba(0, 0, 0, 0.5);
|
|
@@ -4061,11 +4187,11 @@
|
|
|
4061
4187
|
:host([backdrop])::after {
|
|
4062
4188
|
opacity: 1;
|
|
4063
4189
|
}
|
|
4064
|
-
`,
|
|
4190
|
+
`,ci([O("slot")],Ge.prototype,"modalSlot",2),ci([b()],Ge.prototype,"_modals",2),ci([b()],Ge.prototype,"_sidebars",2),ci([a({type:Number})],Ge.prototype,"sidebarGap",2),ci([a({type:Number})],Ge.prototype,"transitionDurationMS",2),Ge=ci([p("uui-modal-container")],Ge);var gb=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,_b=(t,e,i,o)=>{for(var r=o>1?void 0:o?mb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&gb(e,i,r),r};let uo=class extends J{render(){return l`
|
|
4065
4191
|
<dialog>
|
|
4066
4192
|
<slot></slot>
|
|
4067
4193
|
</dialog>
|
|
4068
|
-
`}};
|
|
4194
|
+
`}};uo.styles=[...J.styles,d`
|
|
4069
4195
|
dialog {
|
|
4070
4196
|
margin: auto;
|
|
4071
4197
|
max-width: 100%;
|
|
@@ -4078,7 +4204,7 @@
|
|
|
4078
4204
|
:host(:not([index='0'])) dialog {
|
|
4079
4205
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
4080
4206
|
}
|
|
4081
|
-
`],
|
|
4207
|
+
`],uo=_b([p("uui-modal-dialog")],uo);var yb=Object.defineProperty,du=Object.getOwnPropertySymbols,xb=Object.prototype.hasOwnProperty,wb=Object.prototype.propertyIsEnumerable,pu=(t,e,i)=>e in t?yb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,vu=(t,e)=>{for(var i in e||(e={}))xb.call(e,i)&&pu(t,i,e[i]);if(du)for(var i of du(e))wb.call(e,i)&&pu(t,i,e[i]);return t};class tt extends S{constructor(e,i={}){super(e,vu(vu({},{bubbles:!0}),i))}}tt.CHANGE="change";var $b=Object.defineProperty,Eb=Object.getOwnPropertyDescriptor,We=(t,e,i,o)=>{for(var r=o>1?void 0:o?Eb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&$b(e,i,r),r};const Cb=45,Hs=(t,e,i)=>Math.min(Math.max(t,e),i),Pb=(t,e)=>Array.from({length:e-t+1},(i,o)=>t+o);let ue=class extends v{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",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),y(this,"uui-button"),y(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(t){(t.has("current")||t.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const t=this.offsetWidth,e=Array.from(this._navButtons).reduce((r,s)=>r+s.getBoundingClientRect().width,0),o=(t-e)/Cb/2;this._range=Math.max(1,Math.floor(o)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(t){const e=t<this._range?1:t<this.total-this._range?t-this._range:this.total-this._range*2,i=t<=this._range?this._range*2+1:t<this.total-this._range?t+this._range:this.total;return Pb(Hs(e,1,this.total),Hs(i,1,this.total))}get total(){return this._total}set total(t){this._total=t,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",t)}get current(){return this._current}set current(t){const e=this._current;this._current=Hs(t,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",e)}goToNextPage(){this.current++,this.dispatchEvent(new tt(tt.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new tt(tt.CHANGE))}goToPage(t){this.current=t,this.dispatchEvent(new tt(tt.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const t=this.renderRoot.querySelector(".active");t&&t.focus()})}renderFirst(){return l`<uui-button
|
|
4082
4208
|
compact
|
|
4083
4209
|
look="outline"
|
|
4084
4210
|
class="nav"
|
|
@@ -4140,7 +4266,7 @@
|
|
|
4140
4266
|
${this._visiblePages.map(t=>this.renderPage(t))}
|
|
4141
4267
|
${this.renderNavigationRight()}
|
|
4142
4268
|
</uui-button-group>
|
|
4143
|
-
`}};
|
|
4269
|
+
`}};ue.styles=[d`
|
|
4144
4270
|
uui-button-group {
|
|
4145
4271
|
width: 100%;
|
|
4146
4272
|
}
|
|
@@ -4170,7 +4296,7 @@
|
|
|
4170
4296
|
.active {
|
|
4171
4297
|
pointer-events: none;
|
|
4172
4298
|
}
|
|
4173
|
-
`],
|
|
4299
|
+
`],We([dc("uui-button.nav")],ue.prototype,"_navButtons",2),We([O("#pages")],ue.prototype,"_pagesGroup",2),We([a()],ue.prototype,"label",2),We([a({reflect:!0,attribute:"aria-label"})],ue.prototype,"ariaLabel",2),We([a({type:Number})],ue.prototype,"total",1),We([b()],ue.prototype,"_range",2),We([b()],ue.prototype,"_visiblePages",2),We([a({type:Number})],ue.prototype,"current",1),ue=We([p("uui-pagination")],ue);class Bs extends S{}Bs.CLOSE="close";var Ob=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,Ki=(t,e,i,o)=>{for(var r=o>1?void 0:o?kb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Ob(e,i,r),r};function co(t,e,i){return t<e?e:t>i?i:t}let it=class extends v{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=t=>{this._trigger=t.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=t=>{t.forEach(e=>{e.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=t=>{if(t.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=t=>{t.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(t){const e=this._placement;this._placement=t||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",e)}get open(){return this._open}set open(t){const e=this._open;this._open=t,t?this._openPopover():this._closePopover(),this.requestUpdate("open",e)}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 t=new Bs(Bs.CLOSE,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.open=!1)}_getScrollParents(){const t=this.shadowRoot.host;let e=getComputedStyle(t);if(e.position==="fixed")return;const i=e.position==="absolute",o=/(auto|scroll)/;let r=t;for(;r=r.parentElement;)if(e=getComputedStyle(r),!(i&&e.position==="static")&&(o.test(e.overflow+e.overflowY+e.overflowX)&&this._scrollParents.push(r),e.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const t={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,t),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(t=>{t.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(t=>{t.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){var t,e;if(!this.shadowRoot)return;const i=this.containerElement;if(!i)return;const o=(t=this.containerElement)==null?void 0:t.getBoundingClientRect(),r=(e=this._trigger)==null?void 0:e.getBoundingClientRect();if(r!=null&&o!=null){const s=this._scrollParents.map(ge=>ge.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,o,s));let n=this._currentPlacement.indexOf("top")!==-1,u=this._currentPlacement.indexOf("bottom")!==-1,c=this._currentPlacement.indexOf("left")!==-1,h=this._currentPlacement.indexOf("right")!==-1;const f=this._currentPlacement.indexOf("-start")!==-1,m=this._currentPlacement.indexOf("-end")!==-1;let g=.5,x=.5,$=.5,P=.5,W=0,Ue=0;if(this.placement==="auto"){const ge=this._scrollParents[0],Pi=ge.clientWidth,ut=ge.clientHeight,Mt=r.x-o.width,Tt=Pi-(r.x+r.width)-o.width,So=r.y-o.height,fr=ut-(r.y+r.height)-o.height;let br=.5,gr=.5;const ic=Math.max(Mt,Tt);let ln=Math.max(So,fr);fr>So&&fr>this.margin&&(ln+=9999),ic>ln?(Mt>Tt?(br=0,c=!0):(br=1,h=!0),W=this.margin):(So>fr?(gr=0,n=!0):(gr=1,u=!0),Ue=this.margin),g=br,x=gr,$=1-br,P=1-gr}else n&&(P=1,x=0),u&&(P=0,x=1),(n||u)&&(Ue=this.margin,f&&($=0,g=0),m&&($=1,g=1)),c&&($=1,g=0),h&&($=0,g=1),(c||h)&&(W=this.margin,f&&(P=0,x=0),m&&(P=1,x=1));const De=-o.width*$+r.width*g-W*($*2-1),vr=-o.height*P+r.height*x-Ue*(P*2-1);let at=De,lt=vr;n||u?(this._scrollParents.forEach((ge,Pi)=>{const ut=ge===document.body?0:s[Pi].x,Mt=-r.x+ut,Tt=ge.clientWidth-r.x-r.width+De+ut-(o.width-r.width)*(1-g);at=co(at,Mt,Tt)}),at=co(at,-o.width,r.width)):(c||h)&&(this._scrollParents.forEach((ge,Pi)=>{const ut=ge===document.body?0:s[Pi].y,Mt=-r.y+ut,Tt=ge.clientHeight-r.y-r.height+vr+ut-(o.height-r.height)*(1-x);lt=co(lt,Mt,Tt)}),lt=co(lt,-o.height,r.height)),(this._positionX!==at||this._positionY!==lt)&&(this._positionX=at,this._positionY=lt,De===at&&vr===lt&&this._stopScrollListener(),i.style.left=`${this._positionX}px`,i.style.top=`${this._positionY}px`)}}_managePlacementFlip(t,e,i){const r=t.split("-"),s=r[0],n=r[1]||null;let u;return this._scrollParents.some((c,h)=>{const f=c===document.body?0:i[h].x,m=c===document.body?0:i[h].y;return s==="top"&&e.y-2<=m?(u="bottom",!0):s==="bottom"&&e.y+e.height+2>=c.clientHeight+m?(u="top",!0):s==="left"&&e.x-2<=f?(u="right",!0):s==="right"&&e.x+e.width+2>=c.clientWidth+f?(u="left",!0):!1}),u?(this._startScrollListener(),u+(n?`-${n}`:"")):t}render(){return l`
|
|
4174
4300
|
<slot
|
|
4175
4301
|
id="trigger"
|
|
4176
4302
|
name="trigger"
|
|
@@ -4178,7 +4304,7 @@
|
|
|
4178
4304
|
<div id="container">
|
|
4179
4305
|
${this._open?l`<slot name="popover"></slot>`:""}
|
|
4180
4306
|
</div>
|
|
4181
|
-
`}};
|
|
4307
|
+
`}};it.styles=[d`
|
|
4182
4308
|
:host {
|
|
4183
4309
|
position: relative;
|
|
4184
4310
|
display: inline-block;
|
|
@@ -4205,7 +4331,7 @@
|
|
|
4205
4331
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
4206
4332
|
);
|
|
4207
4333
|
}
|
|
4208
|
-
`],
|
|
4334
|
+
`],Ki([O("#container")],it.prototype,"containerElement",2),Ki([a({type:Number})],it.prototype,"margin",2),Ki([a({type:String,reflect:!0})],it.prototype,"placement",1),Ki([a({type:Boolean,reflect:!0})],it.prototype,"open",1),it=Ki([p("uui-popover")],it);function Sb(){const t=this.addEventListener;this.addEventListener=function(i,o,r){if(i!=="focusout"){if(i==="beforetoggle"){this.polyfill_onBeforeToggle=s=>{this.dispatchEvent(new CustomEvent("polyfill-beforetoggle",{bubbles:!1,composed:!1,detail:{oldState:s.oldState,newState:s.newState}})),o(s)};return}t.call(this,i,o,r)}},this.polyfill_onFocusout=i=>{const o=i.relatedTarget;if(!o)return;const r=o?.closest("uui-popover-container"),s=o?.closest("[popovertarget]");!r&&!s&&this.hidePopover()},this.polyfill_onClick=i=>{i.composedPath().some(s=>{var n;return s.tagName==="UUI-POPOVER-CONTAINER"||((n=s.attributes)==null?void 0:n.popovertarget)})||this.hidePopover()},this.polyfill_onParentPopoverUpdate=i=>{i.detail.newState==="closed"&&this.hidePopover()};const e=i=>{var o;return i.parentElement?((o=i.parentElement)==null?void 0:o.tagName)==="UUI-POPOVER-CONTAINER"?i.parentElement:e(i.parentElement):null};this.polyfill_hasBeenMovedToBody||(this.style.display="none",this.style.position="fixed",this.style.inset="0",this.style.zIndex="9999"),this.showPopover=()=>{var i,o;this.polyfill_hasBeenMovedToBody||(this.polyfill_parentPopoverContainer=e(this)),this.polyfill_onBeforeToggle({oldState:"closed",newState:"open"}),this.style.display="block",(i=this.polyfill_parentPopoverContainer)==null||i.addEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),window.addEventListener("click",this.polyfill_onClick),window.addEventListener("focusout",this.polyfill_onFocusout),this.polyfill_originalParent=this.parentNode,this.polyfill_originalNextSibling=this.nextSibling;const r=this.getRootNode();if(r&&r.adoptedStyleSheets){const n=r.adoptedStyleSheets.reduce((h,f)=>h+Object.values(f.cssRules).reduce((m,g)=>m+`#${this.id} ${g.cssText}`,""),""),u=document.createElement("style");u.innerHTML=n,u.id="uui-popover-polyfill-style";const c=this.shadowRoot.host.querySelector("#uui-popover-polyfill-style");c&&c.parentNode.removeChild(c),this.insertAdjacentElement("beforeend",u)}this.parentNode!==document.body&&((o=this.parentNode)==null||o.removeChild(this),this.polyfill_hasBeenMovedToBody=!0,document.body.appendChild(this))},this.hidePopover=()=>{var i,o;this.polyfill_hasBeenMovedToBody&&(document.body.removeChild(this),this.polyfill_hasBeenMovedToBody=!1,(i=this.polyfill_originalParent)==null||i.insertBefore(this,this.polyfill_originalNextSibling)),window.removeEventListener("click",this.polyfill_onClick),window.removeEventListener("focusout",this.polyfill_onFocusout),(o=this.polyfill_parentPopoverContainer)==null||o.removeEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),this.polyfill_onBeforeToggle({oldState:"open",newState:"closed"}),this.style.display="none"}}var zb=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,It=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ib(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zb(e,i,r),r},Rs=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ee=(t,e,i)=>(Rs(t,e,"read from private field"),i?i.call(t):e.get(t)),hi=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ab=(t,e,i,o)=>(Rs(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),fu=(t,e,i)=>(Rs(t,e,"access private method"),i),di,ho,pi,Xi,Fs,po,Gs;let Oe=class extends v{constructor(){super(...arguments),hi(this,po),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,hi(this,di,null),hi(this,ho,t=>{var e;if(this._open=t.newState==="open",Ab(this,di,Vd(this,"popovertarget",this.id)),(e=ee(this,di))==null||e.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:t.oldState,newState:t.newState}})),!this._open){document.removeEventListener("scroll",ee(this,pi));return}document.addEventListener("scroll",ee(this,pi)),requestAnimationFrame(()=>{ee(this,pi).call(this)})}),hi(this,pi,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",ee(this,Xi).call(this,3))}),hi(this,Xi,t=>{if(ee(this,Fs).call(this),t--,ee(this,di)===null)return;const e=this._actualPlacement.indexOf("top")!==-1,i=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,r=this._actualPlacement.indexOf("right")!==-1,s=this._actualPlacement.indexOf("-start")!==-1,n=this._actualPlacement.indexOf("-end")!==-1,u=ee(this,di).getBoundingClientRect(),c=this.getBoundingClientRect();let h=0,f=0;i&&(h=u.top+u.height,s&&(f=u.left),n&&(f=u.left+u.width-c.width),!s&&!n&&(f=u.left+u.width/2-c.width/2)),e&&(h=u.top-c.height,s&&(f=u.left),n&&(f=u.left+u.width-c.width),!s&&!n&&(f=u.left+u.width/2-c.width/2)),o&&(f=u.left-c.width,s&&(h=u.top),n&&(h=u.top+u.height-c.height),!s&&!n&&(h=u.top+u.height/2-c.height/2)),r&&(f=u.left+u.width,s&&(h=u.top),n&&(h=u.top+u.height-c.height),!s&&!n&&(h=u.top+u.height/2-c.height/2));const m=window.innerWidth,g=window.innerHeight,x=Math.min(0,u.top+u.height),$=Math.max(Math.min(h,g-c.height),u.top-c.height);if(Math.max(x,$)!==h&&(e||i)&&t>0){fu(this,po,Gs).call(this),ee(this,Xi).call(this,t);return}h=Math.max(x,$);const W=Math.min(0,u.left+u.width),Ue=Math.max(Math.min(f,m-c.width),u.left-c.width),De=Math.max(W,Ue);if(De!==f&&(o||r)&&t>0){fu(this,po,Gs).call(this),ee(this,Xi).call(this,t);return}f=De,(h+c.height<0||h>g||f+c.width<0||f>m)&&this.hidePopover(),this.style.transform=`translate(${f}px, ${h}px)`,this.style.opacity="1"}),hi(this,Fs,()=>{const t={top:"bottom",bottom:"top",left:"right",right:"left"};let e=this._actualPlacement.split("-")[0];e=t[e]||e,e=e.charAt(0).toUpperCase()+e.slice(1);const i=`padding${e}`;this.style.padding="0",this.style[i]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(t){this._placement=t,this._actualPlacement=t,ee(this,pi).call(this)}connectedCallback(){!HTMLElement.prototype.hasOwnProperty("popover")&&Sb.bind(this)(),this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",ee(this,ho))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",ee(this,ho))}render(){return l`<slot></slot>`}};di=new WeakMap,ho=new WeakMap,pi=new WeakMap,Xi=new WeakMap,Fs=new WeakMap,po=new WeakSet,Gs=function(){const[t,e]=this._actualPlacement.split("-"),i=t==="top"?"bottom":t==="bottom"?"top":t==="left"?"right":"left";this._actualPlacement=`${i}-${e}`},Oe.styles=[d`
|
|
4209
4335
|
:host {
|
|
4210
4336
|
margin: 0;
|
|
4211
4337
|
width: fit-content;
|
|
@@ -4217,9 +4343,9 @@
|
|
|
4217
4343
|
background: none;
|
|
4218
4344
|
overflow: visible;
|
|
4219
4345
|
}
|
|
4220
|
-
`],
|
|
4221
|
-
<div id="bar" style=${
|
|
4222
|
-
`}};
|
|
4346
|
+
`],It([a({type:Number})],Oe.prototype,"margin",2),It([a({type:Boolean})],Oe.prototype,"open",1),It([a({type:String,reflect:!0})],Oe.prototype,"placement",1),It([b()],Oe.prototype,"_placement",2),It([b()],Oe.prototype,"_open",2),It([b()],Oe.prototype,"_actualPlacement",2),Oe=It([p("uui-popover-container")],Oe);var Ub=Object.defineProperty,Db=Object.getOwnPropertyDescriptor,bu=(t,e,i,o)=>{for(var r=o>1?void 0:o?Db(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Ub(e,i,r),r};const Lb=(t,e,i)=>Math.min(Math.max(t,e),i);let Yi=class extends v{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(t){const e=this._progress;this._progress=Lb(t,0,100),this.requestUpdate("progress",e)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return l`
|
|
4347
|
+
<div id="bar" style=${we(this._getProgressStyle())}></div>
|
|
4348
|
+
`}};Yi.styles=[d`
|
|
4223
4349
|
:host {
|
|
4224
4350
|
width: 100%;
|
|
4225
4351
|
height: 4px;
|
|
@@ -4236,7 +4362,7 @@
|
|
|
4236
4362
|
height: 100%;
|
|
4237
4363
|
width: 0%;
|
|
4238
4364
|
}
|
|
4239
|
-
`],
|
|
4365
|
+
`],bu([a({type:Number})],Yi.prototype,"progress",1),Yi=bu([p("uui-progress-bar")],Yi);var Mb=Object.defineProperty,gu=Object.getOwnPropertySymbols,Tb=Object.prototype.hasOwnProperty,Nb=Object.prototype.propertyIsEnumerable,mu=(t,e,i)=>e in t?Mb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_u=(t,e)=>{for(var i in e||(e={}))Tb.call(e,i)&&mu(t,i,e[i]);if(gu)for(var i of gu(e))Nb.call(e,i)&&mu(t,i,e[i]);return t};class vi extends S{constructor(e,i={}){super(e,_u(_u({},{bubbles:!0}),i))}}vi.CHANGE="change";var Vb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,At=(t,e,i,o)=>{for(var r=o>1?void 0:o?jb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Vb(e,i,r),r},Hb=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},yu=(t,e,i)=>(Hb(t,e,"read from private field"),i?i.call(t):e.get(t)),xu=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ws,qs;let be=class extends v{constructor(){super(),this.name="",this.value="",this.label="",this._checked=!1,this._disabled=!1,xu(this,Ws,()=>{this.style.setProperty("--uui-show-focus-outline","1")}),xu(this,qs,()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("mousedown",yu(this,qs)),this.addEventListener("blur",yu(this,Ws))}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,t===!0?(this.setAttribute("aria-checked",""),this.disabled||this.setAttribute("tabindex","0")):(this.setAttribute("tabindex","-1"),this.removeAttribute("aria-checked")),this.requestUpdate("checked",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-hidden",t?"true":"false"),this.setAttribute("tabindex",t?"-1":"0"),this.requestUpdate("disabled",e)}focus(){this.inputElement.focus()}click(){this.inputElement.click()}_onChange(t){t.stopPropagation();const e=this.inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new vi(vi.CHANGE))}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.setAttribute("tabindex","0")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.hasAttribute("aria-checked")||this.removeAttribute("aria-checked")}render(){return l` <label>
|
|
4240
4366
|
<input
|
|
4241
4367
|
id="input"
|
|
4242
4368
|
type="radio"
|
|
@@ -4249,7 +4375,7 @@
|
|
|
4249
4375
|
<div id="label">
|
|
4250
4376
|
${this.label?l`<span>${this.label}</span>`:l`<slot></slot>`}
|
|
4251
4377
|
</div>
|
|
4252
|
-
</label>`}};
|
|
4378
|
+
</label>`}};Ws=new WeakMap,qs=new WeakMap,be.styles=[kr,d`
|
|
4253
4379
|
:host {
|
|
4254
4380
|
display: block;
|
|
4255
4381
|
box-sizing: border-box;
|
|
@@ -4354,7 +4480,7 @@
|
|
|
4354
4480
|
}
|
|
4355
4481
|
|
|
4356
4482
|
:host([disabled]:active) #button {
|
|
4357
|
-
animation: ${
|
|
4483
|
+
animation: ${Sr};
|
|
4358
4484
|
}
|
|
4359
4485
|
|
|
4360
4486
|
@media (prefers-reduced-motion) {
|
|
@@ -4366,7 +4492,7 @@
|
|
|
4366
4492
|
transition: none;
|
|
4367
4493
|
}
|
|
4368
4494
|
}
|
|
4369
|
-
`],
|
|
4495
|
+
`],At([O("#input")],be.prototype,"inputElement",2),At([a({type:String})],be.prototype,"name",2),At([a({type:String})],be.prototype,"value",2),At([a({type:String})],be.prototype,"label",2),At([a({type:Boolean,reflect:!0})],be.prototype,"checked",1),At([a({type:Boolean,reflect:!0})],be.prototype,"disabled",1),be=At([p("uui-radio")],be);var Bb=Object.defineProperty,wu=Object.getOwnPropertySymbols,Rb=Object.prototype.hasOwnProperty,Fb=Object.prototype.propertyIsEnumerable,$u=(t,e,i)=>e in t?Bb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Eu=(t,e)=>{for(var i in e||(e={}))Rb.call(e,i)&&$u(t,i,e[i]);if(wu)for(var i of wu(e))Fb.call(e,i)&&$u(t,i,e[i]);return t};class vo extends S{constructor(e,i={}){super(e,Eu(Eu({},{bubbles:!0}),i))}}vo.CHANGE="change";var Gb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,Cu=(t,e,i,o)=>{for(var r=o>1?void 0:o?Wb(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Gb(e,i,r),r};const qb="ArrowLeft",Kb="ArrowUp",Xb="ArrowRight",Yb="ArrowDown",Zb=" ";let fi=class extends _e(v){constructor(){super(),this.disabled=!1,this._selected=null,this._radioElements=[],this._onChildBlur=()=>{this.pristine=!1},this._handleSelectOnClick=t=>{t.target.checked===!0&&(this.value=t.target.value,this._fireChangeEvent())},this.addEventListener("keydown",this._onKeydown),this.addEventListener("keypress",this._onKeypress),this.updateComplete.then(()=>{this._updateRadioElementsCheckedState(this.value)})}get value(){return this._value}set value(t){super.value=t,(t===null||t==="")&&this._makeFirstEnabledFocusable(),this._updateRadioElementsCheckedState(t)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}focus(){var t,e;this._selected!==null?(t=this._radioElements[this._selected])==null||t.focus():(e=this._findNextEnabledElement())==null||e.focus()}click(){var t,e;this._selected!==null?(t=this._radioElements[this._selected])==null||t.click():(e=this._findNextEnabledElement())==null||e.click()}getFormElement(){if(this._radioElements&&this._selected)return this._radioElements[this._selected]}_setNameOnRadios(t){var e;(e=this._radioElements)==null||e.forEach(i=>i.name=t)}_updateRadioElementsCheckedState(t){this._radioElements.forEach((e,i)=>{e.value===t?(e.checked=!0,this._selected=i):e.checked=!1})}_setDisableOnRadios(t){var e;(e=this._radioElements)==null||e.forEach(i=>i.disabled=t)}_handleSlotChange(t){var e;if(t.stopPropagation(),(e=this._radioElements)==null||e.forEach(o=>{o.removeEventListener(vi.CHANGE,this._handleSelectOnClick),o.removeEventListener("blur",this._onChildBlur)}),this._selected=null,this._radioElements=t.target.assignedElements({flatten:!0}).filter(o=>o instanceof be),this._radioElements.length===0)return;this._radioElements.forEach(o=>{o.addEventListener(vi.CHANGE,this._handleSelectOnClick),o.addEventListener("blur",this._onChildBlur)}),this._setNameOnRadios(this.name),this.disabled&&this._setDisableOnRadios(!0);const i=this._radioElements.filter(o=>o.checked===!0);i.length>1&&(this._radioElements.forEach(o=>{o.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),i.length===1?(this.value=i[0].value,this._selected=this._radioElements.indexOf(i[0]),i[0].disabled===!1?(this._radioElements.forEach(o=>{o.makeUnfocusable()}),i[0].makeFocusable()):this._makeFirstEnabledFocusable()):this._makeFirstEnabledFocusable()}_makeFirstEnabledFocusable(){var t,e;this._selected=null,(t=this._radioElements)==null||t.forEach(i=>{i.makeUnfocusable()}),(e=this._findNextEnabledElement())==null||e.makeFocusable()}_findNextEnabledElement(t=1){if(!this._radioElements)return null;const e=this._selected||0,i=this._radioElements.length;let o=this._selected===null?0:1;for(;o<i;){let r=(e+o*t)%i;if(r<0&&(r+=i),this._radioElements[r].disabled===!1)return this._radioElements[r];o++}return null}_selectPreviousElement(){var t,e;this.value=((t=this._findNextEnabledElement(-1))==null?void 0:t.value)||"",(e=this._radioElements[this._selected||0])==null||e.focus(),this._fireChangeEvent()}_selectNextElement(){var t,e;this.value=((t=this._findNextEnabledElement())==null?void 0:t.value)||"",(e=this._radioElements[this._selected||0])==null||e.focus(),this._fireChangeEvent()}_onKeydown(t){var e;switch(t.key){case qb:case Kb:{t.preventDefault(),this._selectPreviousElement();break}case Xb:case Yb:{t.preventDefault(),this._selectNextElement();break}case Zb:this._selected===null&&(this.value=(e=this._findNextEnabledElement())==null?void 0:e.value,this._fireChangeEvent())}}_onKeypress(t){t.key=="Enter"&&this.submit()}_fireChangeEvent(){this.pristine=!1,this.dispatchEvent(new vo(vo.CHANGE))}updated(t){super.updated(t),t.has("disabled")&&this._setDisableOnRadios(this.disabled),t.has("name")&&this._setNameOnRadios(t.get("name"))}render(){return l` <slot @slotchange=${this._handleSlotChange}></slot> `}};fi.formAssociated=!0,fi.styles=[d`
|
|
4370
4496
|
:host {
|
|
4371
4497
|
display: inline-block;
|
|
4372
4498
|
padding-right: 3px;
|
|
@@ -4379,7 +4505,7 @@
|
|
|
4379
4505
|
:host(:not([pristine])[internals-invalid]) {
|
|
4380
4506
|
border: 1px solid var(--uui-color-danger-standalone,rgb(191, 33, 78));
|
|
4381
4507
|
}
|
|
4382
|
-
`],
|
|
4508
|
+
`],Cu([a({type:Boolean,reflect:!0})],fi.prototype,"disabled",2),fi=Cu([p("uui-radio-group")],fi);var Qb=Object.defineProperty,Pu=Object.getOwnPropertySymbols,Jb=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,Ou=(t,e,i)=>e in t?Qb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ku=(t,e)=>{for(var i in e||(e={}))Jb.call(e,i)&&Ou(t,i,e[i]);if(Pu)for(var i of Pu(e))eg.call(e,i)&&Ou(t,i,e[i]);return t};class ke extends S{constructor(e,i={}){super(e,ku(ku({},{bubbles:!0}),i))}}ke.INPUT="input",ke.CHANGE="change";var tg=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,D=(t,e,i,o)=>{for(var r=o>1?void 0:o?ig(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&tg(e,i,r),r},rg=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},og=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bi=(t,e,i)=>(rg(t,e,"access private method"),i),rt,Ut;const Ks={TOP:3,CENTER:2,BACK:1},Zi=18,qe=12,sg=24;let A=class extends _e(v){constructor(){super(),og(this,rt),this.disabled=!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,this._onKeypress=t=>{t.key=="Enter"&&this.submit()},this._onTouchStart=t=>{if(this.disabled)return;const e=t.composedPath()[0];if(e!==this._outerTrack)if(e===this._innerColor||e===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(t.touches[0].pageX);else{const i=this._getClickedValue(t.touches[0].pageX),o=Math.abs(this._lowInputValue-i),r=Math.abs(this._highInputValue-i);o<r?this.setValueLow(i):this.setValueHigh(i)}},this._onTouchMove=t=>{this._dragBothValuesByMousePos(t.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=t=>{if(this.disabled)return;const e=t.composedPath()[0];if(e!==this._outerTrack)if(e===this._innerColor||e===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(t.pageX);else{const i=this._getClickedValue(t.pageX),o=Math.abs(this._lowInputValue-i),r=Math.abs(this._highInputValue-i);o<r?this.setValueLow(i):this.setValueHigh(i)}},this._onMouseMove=t=>{t.preventDefault(),this._dragBothValuesByMousePos(t.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keypress",this._onKeypress),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{var t;this._trackWidth=(t=this._outerTrack)==null?void 0:t.offsetWidth})}get min(){return this._min}set min(t){this._min=t,bi(this,rt,Ut).call(this)}get max(){return this._max}set max(t){this._max=t,bi(this,rt,Ut).call(this)}get step(){return this._step}set step(t){this._step=t,bi(this,rt,Ut).call(this)}get minGap(){return this._minGap}set minGap(t){this._minGap=t,bi(this,rt,Ut).call(this)}get maxGap(){return this._maxGap}set maxGap(t){this._maxGap=t,bi(this,rt,Ut).call(this)}get value(){return this._value}set value(t){super.value=t,bi(this,rt,Ut).call(this)}setValueLow(t){t=z(t,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(t,this._highInputValue)}setValueHigh(t){t=z(t,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,t)}setValue(t,e,i){if(i){const o=this.startPoint.high-this.startPoint.low;t=z(t,this.min,this.max-o),e=z(e,this.min+o,this.max)}this._inputLow.value=t.toString(),this._inputHigh.value=e.toString(),this.value=`${t},${e}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(t){super.updated(t),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 t=this._max-this._min,e=this._lowInputValue-this._min,i=this._highInputValue-this._min,o=e/t*100,r=100-i/t*100;this._lowValuePercentStart=z(o,0,100),this._highValuePercentEnd=z(r,0,100)}_getClickedValue(t){const e=this._outerTrack.getBoundingClientRect().left,r=(t-e-qe)/(this._trackWidth-qe*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(t){this.startPoint={mouse:t,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(t){const e=this._outerTrack.offsetWidth,i=t-this.startPoint.mouse,o=this._max-this._min,r=i/(e+qe*2),s=Math.round(r*o/this._step)*this._step,n=this.startPoint.low+s,u=this.startPoint.high+s;this.setValue(n,u,!0),this.dispatchEvent(new ke(ke.INPUT))}_onLowInput(t){this.disabled&&t.preventDefault(),this._currentFocus=this._inputLow;const e=Number(t.target.value);this.setValueLow(e),this.dispatchEvent(new ke(ke.INPUT))}_onHighInput(t){this.disabled&&t.preventDefault(),this._currentFocus=this._inputHigh;const e=Number(t.target.value);this.setValueHigh(e),this.dispatchEvent(new ke(ke.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 ke(ke.CHANGE))}render(){return l`
|
|
4383
4509
|
<div id="range-slider">
|
|
4384
4510
|
${this._renderNativeInputs()}
|
|
4385
4511
|
<div id="inner-track">
|
|
@@ -4396,7 +4522,7 @@
|
|
|
4396
4522
|
`}_renderThumbValues(){return l`<div class="thumb-values">
|
|
4397
4523
|
<span><span>${this._lowInputValue}</span></span>
|
|
4398
4524
|
<span><span>${this._highInputValue}</span></span>
|
|
4399
|
-
</div>`}_renderSteps(){const t=(this._max-this._min)/this._step,e=(this._trackWidth-
|
|
4525
|
+
</div>`}_renderSteps(){const t=(this._max-this._min)/this._step,e=(this._trackWidth-qe*2)/t;if(e<sg||t%1!==0)return;let i=0;const o=new Array(t+1).fill(e).map(r=>r*i++);return l`<div class="step-wrapper">
|
|
4400
4526
|
<svg height="100%" width="100%">
|
|
4401
4527
|
<rect x="9" y="9" height="3" rx="2" />
|
|
4402
4528
|
${this._renderStepCircles(o)}
|
|
@@ -4404,7 +4530,7 @@
|
|
|
4404
4530
|
${this._renderStepValues(t)}
|
|
4405
4531
|
</div>`}_renderStepValues(t){if(this.hideStepValues||t>20)return;let e=0;const i=new Array(t+1).fill(this._step).map(o=>this._min+o*e++);return l`<div class="step-values">
|
|
4406
4532
|
${i.map(o=>l`<span><span>${o}</span></span>`)}
|
|
4407
|
-
</div>`}_renderStepCircles(t){const e=this._trackWidth/(this._max-this._min);return _`${t.map(i=>{const o=i+
|
|
4533
|
+
</div>`}_renderStepCircles(t){const e=this._trackWidth/(this._max-this._min);return _`${t.map(i=>{const o=i+qe,r=this._lowInputValue-this._min,s=this._highInputValue-this._min;return o/e>=r&&o/e<=s?_`<circle class="track-step filled" cx="${o}" cy="5" r="4.5" />`:_`<circle class="track-step regular" cx="${o}" cy="5" r="4.5" />`})}`}_renderNativeInputs(){return l` <div class="native-wrapper">
|
|
4408
4534
|
<input
|
|
4409
4535
|
id="inputLow"
|
|
4410
4536
|
class="${this._movement?"focus":""}"
|
|
@@ -4429,7 +4555,7 @@
|
|
|
4429
4555
|
?disabled="${this.disabled}"
|
|
4430
4556
|
@input=${this._onHighInput}
|
|
4431
4557
|
@change=${this._onHighChange} />
|
|
4432
|
-
</div>`}};
|
|
4558
|
+
</div>`}};rt=new WeakSet,Ut=function(){const t=this.value.split(",");let e=Number(t[0])||0,i=Number(t[1])||0;i=z(i,this._min,this._max),e=this._min+Math.round((e-this._min)/this._step)*this._step,i=this._min+Math.round((i-this._min)/this._step)*this._step,this._lowInputValue=z(e,this._min,this._minGap?i-this._minGap:i-this._step),this._highInputValue=z(i,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()},A.formAssociated=!0,A.styles=[d`
|
|
4433
4559
|
:host {
|
|
4434
4560
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
4435
4561
|
--color-hover: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
|
|
@@ -4457,8 +4583,8 @@
|
|
|
4457
4583
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
4458
4584
|
position: absolute;
|
|
4459
4585
|
height: 3px;
|
|
4460
|
-
left: ${
|
|
4461
|
-
right: ${
|
|
4586
|
+
left: ${qe}px; /* Match TRACK_MARGIN */
|
|
4587
|
+
right: ${qe}px; /* Match TRACK_MARGIN */
|
|
4462
4588
|
}
|
|
4463
4589
|
|
|
4464
4590
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -4472,10 +4598,10 @@
|
|
|
4472
4598
|
display: flex;
|
|
4473
4599
|
flex-direction: column;
|
|
4474
4600
|
justify-content: center;
|
|
4475
|
-
height: ${
|
|
4601
|
+
height: ${Zi}px;
|
|
4476
4602
|
cursor: grab;
|
|
4477
4603
|
user-select: none;
|
|
4478
|
-
z-index: ${
|
|
4604
|
+
z-index: ${Ks.CENTER};
|
|
4479
4605
|
}
|
|
4480
4606
|
|
|
4481
4607
|
:host([disabled]) #inner-color-thumb {
|
|
@@ -4520,7 +4646,7 @@
|
|
|
4520
4646
|
|
|
4521
4647
|
/** Steps */
|
|
4522
4648
|
.step-wrapper {
|
|
4523
|
-
margin: 0 ${-1*
|
|
4649
|
+
margin: 0 ${-1*qe}px;
|
|
4524
4650
|
height: 11px;
|
|
4525
4651
|
position: absolute;
|
|
4526
4652
|
left: 0;
|
|
@@ -4559,7 +4685,7 @@
|
|
|
4559
4685
|
|
|
4560
4686
|
.step-values {
|
|
4561
4687
|
box-sizing: border-box;
|
|
4562
|
-
margin: 0 ${
|
|
4688
|
+
margin: 0 ${qe}px; /* Match TRACK_MARGIN */
|
|
4563
4689
|
display: flex;
|
|
4564
4690
|
justify-content: space-between;
|
|
4565
4691
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -4637,9 +4763,9 @@
|
|
|
4637
4763
|
pointer-events: all;
|
|
4638
4764
|
cursor: grab;
|
|
4639
4765
|
position: relative;
|
|
4640
|
-
z-index: ${
|
|
4641
|
-
width: ${
|
|
4642
|
-
height: ${
|
|
4766
|
+
z-index: ${Ks.TOP};
|
|
4767
|
+
width: ${Zi}px;
|
|
4768
|
+
height: ${Zi}px;
|
|
4643
4769
|
border-radius: 24px;
|
|
4644
4770
|
border: none;
|
|
4645
4771
|
background-color: var(--color-interactive);
|
|
@@ -4676,9 +4802,9 @@
|
|
|
4676
4802
|
pointer-events: all;
|
|
4677
4803
|
cursor: grab;
|
|
4678
4804
|
position: relative;
|
|
4679
|
-
z-index: ${
|
|
4680
|
-
width: ${
|
|
4681
|
-
height: ${
|
|
4805
|
+
z-index: ${Ks.TOP};
|
|
4806
|
+
width: ${Zi}px;
|
|
4807
|
+
height: ${Zi}px;
|
|
4682
4808
|
border-radius: 24px;
|
|
4683
4809
|
border: none;
|
|
4684
4810
|
background-color: var(--color-interactive);
|
|
@@ -4707,7 +4833,7 @@
|
|
|
4707
4833
|
box-shadow: inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
4708
4834
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
4709
4835
|
}
|
|
4710
|
-
`],
|
|
4836
|
+
`],D([a({type:String})],A.prototype,"label",2),D([a({type:Boolean,reflect:!0})],A.prototype,"disabled",2),D([a({type:Number})],A.prototype,"min",1),D([a({type:Number})],A.prototype,"max",1),D([a({type:Boolean,attribute:"hide-step-values"})],A.prototype,"hideStepValues",2),D([a({type:Number})],A.prototype,"step",1),D([a({type:Number,attribute:"min-gap"})],A.prototype,"minGap",1),D([a({type:Number,attribute:"max-gap"})],A.prototype,"maxGap",1),D([a({type:String})],A.prototype,"value",1),D([b()],A.prototype,"_movement",2),D([b()],A.prototype,"_lowInputValue",2),D([b()],A.prototype,"_highInputValue",2),D([b()],A.prototype,"_trackWidth",2),D([b()],A.prototype,"_lowValuePercentStart",2),D([b()],A.prototype,"_highValuePercentEnd",2),D([O("#range-slider")],A.prototype,"_outerTrack",2),D([O("#inputLow")],A.prototype,"_inputLow",2),D([O("#inputHigh")],A.prototype,"_inputHigh",2),D([O(".color")],A.prototype,"_innerColor",2),D([O("#inner-color-thumb")],A.prototype,"_innerColorThumb",2),A=D([p("uui-range-slider")],A);var ng=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,lg=(t,e,i,o)=>{for(var r=o>1?void 0:o?ag(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&ng(e,i,r),r};let fo=class extends v{render(){return l`<slot></slot>`}};fo.styles=[d`
|
|
4711
4837
|
:host {
|
|
4712
4838
|
display: block;
|
|
4713
4839
|
}
|
|
@@ -4723,7 +4849,7 @@
|
|
|
4723
4849
|
right: 0;
|
|
4724
4850
|
border-top: 1px solid var(--uui-color-border,#d8d7d9);
|
|
4725
4851
|
}
|
|
4726
|
-
`],
|
|
4852
|
+
`],fo=lg([p("uui-ref-list")],fo);class gi extends S{}gi.OPEN="open";var ug=Object.defineProperty,cg=Object.getOwnPropertyDescriptor,Xs=(t,e,i,o)=>{for(var r=o>1?void 0:o?cg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&ug(e,i,r),r};let ot=class extends Cr(Rt(v)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(t){t.stopPropagation(),this.dispatchEvent(new gi(gi.OPEN))}handleOpenKeydown(t){t.key!==" "&&t.key!=="Enter"||(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new gi(gi.OPEN)))}};ot.styles=[d`
|
|
4727
4853
|
:host {
|
|
4728
4854
|
position: relative;
|
|
4729
4855
|
display: flex;
|
|
@@ -4871,7 +4997,7 @@
|
|
|
4871
4997
|
justify-content: flex-end;
|
|
4872
4998
|
align-items: center;
|
|
4873
4999
|
}
|
|
4874
|
-
`],
|
|
5000
|
+
`],Xs([a({type:Boolean,reflect:!0})],ot.prototype,"disabled",2),Xs([a({type:Boolean,reflect:!0})],ot.prototype,"error",2),ot=Xs([p("uui-ref")],ot);var hg=Object.defineProperty,dg=Object.getOwnPropertyDescriptor,bo=(t,e,i,o)=>{for(var r=o>1?void 0:o?dg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&hg(e,i,r),r};let T=class extends ot{constructor(){super(...arguments),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}connectedCallback(){super.connectedCallback(),y(this,"uui-icon")}_onSlotIconChange(t){this._iconSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}renderDetail(){return l`<small id="detail"
|
|
4875
5001
|
>${this.detail}<slot name="detail"></slot
|
|
4876
5002
|
></small>`}_renderFallbackIcon(){return l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return l`
|
|
4877
5003
|
<button
|
|
@@ -4896,7 +5022,7 @@
|
|
|
4896
5022
|
<slot></slot>
|
|
4897
5023
|
<slot name="tag"></slot>
|
|
4898
5024
|
<slot name="actions" id="actions-container"></slot>
|
|
4899
|
-
`}};
|
|
5025
|
+
`}};T.styles=[...ot.styles,d`
|
|
4900
5026
|
:host {
|
|
4901
5027
|
min-width: 250px;
|
|
4902
5028
|
padding: calc(var(--uui-size-2,6px) + 1px);
|
|
@@ -4955,17 +5081,17 @@
|
|
|
4955
5081
|
:host([disabled]) #detail {
|
|
4956
5082
|
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
4957
5083
|
}
|
|
4958
|
-
`],
|
|
5084
|
+
`],bo([a({type:String})],T.prototype,"name",2),bo([a({type:String})],T.prototype,"detail",2),bo([b()],T.prototype,"_iconSlotHasContent",2),T=bo([p("uui-ref-node")],T);var pg=Object.defineProperty,vg=Object.getOwnPropertyDescriptor,Su=(t,e,i,o)=>{for(var r=o>1?void 0:o?vg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&pg(e,i,r),r};let Qi=class extends T{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 t=[];return this.alias!==""&&t.push(this.alias),this.detail!==""&&t.push(this.detail),l`<small id="detail"
|
|
4959
5085
|
>${t.join(" | ")}<slot name="detail"></slot
|
|
4960
|
-
></small>`}};
|
|
5086
|
+
></small>`}};Qi.styles=[...T.styles],Su([a({type:String})],Qi.prototype,"alias",2),Qi=Su([p("uui-ref-node-data-type")],Qi);var fg=Object.defineProperty,bg=Object.getOwnPropertyDescriptor,zu=(t,e,i,o)=>{for(var r=o>1?void 0:o?bg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&fg(e,i,r),r};let Ji=class extends T{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 t=[];return this.alias!==""&&t.push(this.alias),this.detail!==""&&t.push(this.detail),l`<small id="detail"
|
|
4961
5087
|
>${t.join(" | ")}<slot name="detail"></slot
|
|
4962
|
-
></small>`}};
|
|
5088
|
+
></small>`}};Ji.styles=[...T.styles],zu([a({type:String})],Ji.prototype,"alias",2),Ji=zu([p("uui-ref-node-document-type")],Ji);var gg=Object.defineProperty,mg=Object.getOwnPropertyDescriptor,_g=(t,e,i,o)=>{for(var r=o>1?void 0:o?mg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&gg(e,i,r),r};let go=class extends T{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>'}};go.styles=[...T.styles],go=_g([p("uui-ref-node-form")],go);var yg=Object.defineProperty,xg=Object.getOwnPropertyDescriptor,Iu=(t,e,i,o)=>{for(var r=o>1?void 0:o?xg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&yg(e,i,r),r};let er=class extends T{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 t=[];return this.detail!==""&&t.push(this.detail),this.groupName!==""&&t.push(this.groupName),l`<small id="detail"
|
|
4963
5089
|
>${t.join(" | ")}<slot name="detail"></slot
|
|
4964
|
-
></small>`}};
|
|
5090
|
+
></small>`}};er.styles=[...T.styles],Iu([a({type:String,attribute:"group-name"})],er.prototype,"groupName",2),er=Iu([p("uui-ref-node-member")],er);var wg=Object.defineProperty,$g=Object.getOwnPropertyDescriptor,Ys=(t,e,i,o)=>{for(var r=o>1?void 0:o?$g(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&wg(e,i,r),r};let mi=class extends T{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 t=[];return this.detail!==""&&t.push(this.detail),this.version!==""&&t.push(this.version),this.author!==""&&t.push(this.author),l`<small id="detail"
|
|
4965
5091
|
>${t.join(" | ")}<slot name="detail"></slot
|
|
4966
|
-
></small>`}};
|
|
5092
|
+
></small>`}};mi.styles=[...T.styles],Ys([a({type:String})],mi.prototype,"version",2),Ys([a({type:String})],mi.prototype,"author",2),mi=Ys([p("uui-ref-node-package")],mi);var Eg=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,Au=(t,e,i,o)=>{for(var r=o>1?void 0:o?Cg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Eg(e,i,r),r};let tr=class extends T{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 t=[];return this.detail!==""&&t.push(this.detail),this.groupName!==""&&t.push(this.groupName),l`<small id="detail"
|
|
4967
5093
|
>${t.join(" | ")}<slot name="detail"></slot
|
|
4968
|
-
></small>`}};
|
|
5094
|
+
></small>`}};tr.styles=[...T.styles],Au([a({type:String,attribute:"group-name"})],tr.prototype,"groupName",2),tr=Au([p("uui-ref-node-user")],tr);var Pg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,Uu=(t,e,i,o)=>{for(var r=o>1?void 0:o?Og(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Pg(e,i,r),r};let ir=class extends v{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return l`<slot></slot>`}};ir.styles=[d`
|
|
4969
5095
|
:host {
|
|
4970
5096
|
display: block;
|
|
4971
5097
|
scrollbar-width: thin;
|
|
@@ -4991,12 +5117,12 @@
|
|
|
4991
5117
|
background-color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
4992
5118
|
border-radius: 3px;
|
|
4993
5119
|
}
|
|
4994
|
-
`],
|
|
5120
|
+
`],Uu([a({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],ir.prototype,"enforceScroll",2),ir=Uu([p("uui-scroll-container")],ir);var kg=Object.defineProperty,Du=Object.getOwnPropertySymbols,Sg=Object.prototype.hasOwnProperty,zg=Object.prototype.propertyIsEnumerable,Lu=(t,e,i)=>e in t?kg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Mu=(t,e)=>{for(var i in e||(e={}))Sg.call(e,i)&&Lu(t,i,e[i]);if(Du)for(var i of Du(e))zg.call(e,i)&&Lu(t,i,e[i]);return t};class mo extends S{constructor(e,i={}){super(e,Mu(Mu({},{bubbles:!0}),i))}}mo.CHANGE="change";var Ig=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,Se=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ag(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Ig(e,i,r),r};let te=class extends _e(v){constructor(){super(),this.placeholder="",this.disabled=!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","")})}focus(){this._input.focus()}click(){this._input.click()}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(t=>t.group).map(t=>t.group))))}willUpdate(t){if(t.has("options")){this._extractGroups(),this._values=this.options.map(i=>i.value);const e=this.options.find(i=>i.selected);this.value=e?e.value:""}t.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),t.has("disabledGroups")&&this._createDisabledGroups()}setValue(t){t.stopPropagation();const e=t.target;t.target&&(this.value=e.value),this.dispatchEvent(new mo(mo.CHANGE,{bubbles:!0,composed:!1}))}getFormElement(){return this._input}_renderOption(t,e,i,o){return l`<option
|
|
4995
5121
|
value="${e}"
|
|
4996
5122
|
?selected=${i}
|
|
4997
5123
|
?disabled=${o}>
|
|
4998
5124
|
${t}
|
|
4999
|
-
</option>`}_renderGrouped(){return this._groups.length===0
|
|
5125
|
+
</option>`}_renderGrouped(){return this._groups.length===0?w:l`
|
|
5000
5126
|
${this._groups.map(t=>l`<optgroup
|
|
5001
5127
|
label=${t}
|
|
5002
5128
|
?disabled=${this._disabledGroups.some(e=>e.toLowerCase()===t.toLowerCase())}>
|
|
@@ -5012,7 +5138,7 @@
|
|
|
5012
5138
|
<option disabled selected value="" hidden>${this.placeholder}</option>
|
|
5013
5139
|
${this._renderGrouped()}
|
|
5014
5140
|
${this.options.filter(t=>!t.group).map(t=>this._renderOption(t.name,t.value,t.selected,t.disabled))}
|
|
5015
|
-
</select>`}};
|
|
5141
|
+
</select>`}};te.styles=[d`
|
|
5016
5142
|
:host {
|
|
5017
5143
|
display: inline-block;
|
|
5018
5144
|
position: relative;
|
|
@@ -5077,7 +5203,7 @@
|
|
|
5077
5203
|
:host([error]) #native[disabled] {
|
|
5078
5204
|
border: 1px solid var(--uui-color-danger-standalone,rgb(191, 33, 78));
|
|
5079
5205
|
}
|
|
5080
|
-
`],
|
|
5206
|
+
`],Se([a({type:String})],te.prototype,"label",2),Se([a()],te.prototype,"placeholder",2),Se([a({type:Boolean,reflect:!0})],te.prototype,"disabled",2),Se([a({type:Boolean,reflect:!0})],te.prototype,"error",2),Se([a({type:Array,attribute:!1})],te.prototype,"options",2),Se([b()],te.prototype,"_groups",2),Se([a()],te.prototype,"disabledGroups",2),Se([b()],te.prototype,"_disabledGroups",2),Se([O("#native")],te.prototype,"_input",2),te=Se([p("uui-select")],te);const Ug=d`
|
|
5081
5207
|
input[type='range'] {
|
|
5082
5208
|
left: 0;
|
|
5083
5209
|
position: absolute;
|
|
@@ -5184,15 +5310,15 @@
|
|
|
5184
5310
|
input[type='range']:focus::-ms-fill-upper {
|
|
5185
5311
|
background: transparent;
|
|
5186
5312
|
}
|
|
5187
|
-
`;var
|
|
5188
|
-
${t.map(i=>{if(e>=
|
|
5189
|
-
`,
|
|
5313
|
+
`;var Dg=Object.defineProperty,Tu=Object.getOwnPropertySymbols,Lg=Object.prototype.hasOwnProperty,Mg=Object.prototype.propertyIsEnumerable,Nu=(t,e,i)=>e in t?Dg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Vu=(t,e)=>{for(var i in e||(e={}))Lg.call(e,i)&&Nu(t,i,e[i]);if(Tu)for(var i of Tu(e))Mg.call(e,i)&&Nu(t,i,e[i]);return t};class Dt extends S{constructor(e,i={}){super(e,Vu(Vu({},{bubbles:!0}),i))}}Dt.INPUT="input",Dt.CHANGE="change";var Tg=Object.defineProperty,Ng=Object.getOwnPropertyDescriptor,ie=(t,e,i,o)=>{for(var r=o>1?void 0:o?Ng(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Tg(e,i,r),r};const rr=12,ju=24,Vg=(t,e)=>_`
|
|
5314
|
+
${t.map(i=>{if(e>=ju){const o=Math.round(rr+e*t.indexOf(i));return _`<circle class="track-step" cx="${o}" cy="50%" r="4.5" />`}return _``})}
|
|
5315
|
+
`,jg=(t,e,i)=>i?w:l`<div id="step-values">
|
|
5190
5316
|
${t.map(o=>l` <span
|
|
5191
5317
|
><span>
|
|
5192
|
-
${t.length<=20&&e>=
|
|
5318
|
+
${t.length<=20&&e>=ju?o.toFixed(0):w}
|
|
5193
5319
|
</span></span
|
|
5194
5320
|
>`)}
|
|
5195
|
-
</div>`,
|
|
5321
|
+
</div>`,Hg=(t,e,i)=>Array.from({length:(e-t)/i+1},(o,r)=>t+r*i);let B=class extends _e(v){constructor(){super(),this.hideStepValues=!1,this.min=0,this.max=100,this.step=1,this.disabled=!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("keypress",this._onKeypress)}get value(){return this._value}set value(t){if(t instanceof File)return;const e=this._value;let i=t?parseFloat(t):0;i=Math.min(Math.max(i,this.min),this.max),this.step>0&&(i=Math.round(i/this.step)*this.step),this._value=i.toString(),this._calculateSliderPosition(),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",e)}focus(){this._input.focus()}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(t){super.updated(t),(t.get("max")||t.get("min")||t.get("step"))&&(this.value=this.value,this._updateSteps())}_updateSteps(){this._steps=Hg(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-rr*2)/(this._steps.length-1)}_onKeypress(t){t.key=="Enter"&&this.submit()}_calculateSliderPosition(){const t=(parseFloat(this._value||"0")-this.min)/(this.max-this.min);this._sliderPosition=`${Math.floor(t*1e5)/1e3}%`}_onInput(t){t.stopPropagation(),this.value=this._input.value,this.dispatchEvent(new Dt(Dt.INPUT))}_onChange(t){t.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Dt(Dt.CHANGE))}render(){return l`
|
|
5196
5322
|
<input
|
|
5197
5323
|
id="input"
|
|
5198
5324
|
type="range"
|
|
@@ -5207,17 +5333,17 @@
|
|
|
5207
5333
|
<div id="track" aria-hidden="true">
|
|
5208
5334
|
<svg height="100%" width="100%">
|
|
5209
5335
|
<rect x="9" y="9" height="3" rx="2" />
|
|
5210
|
-
${
|
|
5336
|
+
${Vg(this._steps,this._stepWidth)}
|
|
5211
5337
|
</svg>
|
|
5212
5338
|
|
|
5213
5339
|
<div id="track-inner" aria-hidden="true">
|
|
5214
|
-
<div id="thumb" style=${
|
|
5340
|
+
<div id="thumb" style=${we({left:this._sliderPosition})}>
|
|
5215
5341
|
<div id="thumb-label">${this.value}</div>
|
|
5216
5342
|
</div>
|
|
5217
5343
|
</div>
|
|
5218
5344
|
</div>
|
|
5219
|
-
${
|
|
5220
|
-
`}};
|
|
5345
|
+
${jg(this._steps,this._stepWidth,this.hideStepValues)}
|
|
5346
|
+
`}};B.formAssociated=!0,B.styles=[Id,Ug,d`
|
|
5221
5347
|
:host {
|
|
5222
5348
|
display: inline-block;
|
|
5223
5349
|
width: 100%;
|
|
@@ -5265,8 +5391,8 @@
|
|
|
5265
5391
|
|
|
5266
5392
|
#track-inner {
|
|
5267
5393
|
position: absolute;
|
|
5268
|
-
left: ${
|
|
5269
|
-
right: ${
|
|
5394
|
+
left: ${rr}px; /* Match TRACK_MARGIN */
|
|
5395
|
+
right: ${rr}px; /* Match TRACK_MARGIN */
|
|
5270
5396
|
}
|
|
5271
5397
|
|
|
5272
5398
|
#thumb {
|
|
@@ -5325,7 +5451,7 @@
|
|
|
5325
5451
|
}
|
|
5326
5452
|
|
|
5327
5453
|
#step-values {
|
|
5328
|
-
margin: 0 ${
|
|
5454
|
+
margin: 0 ${rr}px; /* Match TRACK_MARGIN */
|
|
5329
5455
|
margin-top: 6px;
|
|
5330
5456
|
display: flex;
|
|
5331
5457
|
align-items: flex-end;
|
|
@@ -5356,9 +5482,9 @@
|
|
|
5356
5482
|
:host(:not([pristine]):invalid) #thumb:after {
|
|
5357
5483
|
background-color: var(--uui-color-danger,#d42054);
|
|
5358
5484
|
}
|
|
5359
|
-
`],
|
|
5485
|
+
`],ie([a({type:Boolean,attribute:"hide-step-values"})],B.prototype,"hideStepValues",2),ie([a({type:Number})],B.prototype,"min",2),ie([a({type:Number})],B.prototype,"max",2),ie([a({type:Number})],B.prototype,"step",2),ie([a({type:String})],B.prototype,"value",1),ie([a({type:Boolean,reflect:!0})],B.prototype,"disabled",2),ie([a({type:String})],B.prototype,"label",2),ie([O("#input")],B.prototype,"_input",2),ie([O("#track")],B.prototype,"_track",2),ie([b()],B.prototype,"_stepWidth",2),ie([b()],B.prototype,"_steps",2),ie([b()],B.prototype,"_sliderPosition",2),B=ie([p("uui-slider")],B);var Bg=Object.defineProperty,Rg=Object.getOwnPropertyDescriptor,Hu=(t,e,i,o)=>{for(var r=o>1?void 0:o?Rg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Bg(e,i,r),r};let or=class extends v{constructor(){super(...arguments),this.open=!1}render(){return l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
5360
5486
|
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
|
|
5361
|
-
</svg>`}};
|
|
5487
|
+
</svg>`}};or.styles=[d`
|
|
5362
5488
|
:host {
|
|
5363
5489
|
display: inline-block;
|
|
5364
5490
|
width: 12px;
|
|
@@ -5377,13 +5503,13 @@
|
|
|
5377
5503
|
:host([open]) svg {
|
|
5378
5504
|
transform: rotate(0deg);
|
|
5379
5505
|
}
|
|
5380
|
-
`],
|
|
5506
|
+
`],Hu([a({type:Boolean,reflect:!0})],or.prototype,"open",2),or=Hu([p("uui-symbol-expand")],or);var Fg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,Bu=(t,e,i,o)=>{for(var r=o>1?void 0:o?Gg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Fg(e,i,r),r};let sr=class extends v{constructor(){super(...arguments),this.error=!1}render(){return l`<svg
|
|
5381
5507
|
xmlns="http://www.w3.org/2000/svg"
|
|
5382
5508
|
viewBox="0 0 512 512"
|
|
5383
5509
|
id="upload-icon">
|
|
5384
5510
|
<path
|
|
5385
5511
|
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"} />
|
|
5386
|
-
</svg> `}};
|
|
5512
|
+
</svg> `}};sr.styles=[d`
|
|
5387
5513
|
:host {
|
|
5388
5514
|
display: flex;
|
|
5389
5515
|
flex-direction: column;
|
|
@@ -5402,9 +5528,9 @@
|
|
|
5402
5528
|
:host([error]) #upload-icon {
|
|
5403
5529
|
fill: var(--uui-color-danger,#d42054);
|
|
5404
5530
|
}
|
|
5405
|
-
`],
|
|
5531
|
+
`],Bu([a({type:Boolean,reflect:!0})],sr.prototype,"error",2),sr=Bu([p("uui-symbol-file-dropzone")],sr);var Wg=Object.defineProperty,qg=Object.getOwnPropertyDescriptor,Zs=(t,e,i,o)=>{for(var r=o>1?void 0:o?qg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Wg(e,i,r),r};let _i=class extends v{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),y(this,"uui-icon")}render(){return this.src?l`<img src=${this.src} alt=${this.alt} />`:l`<uui-icon
|
|
5406
5532
|
name="picture"
|
|
5407
|
-
.fallback=${
|
|
5533
|
+
.fallback=${Rd.strings[0]}></uui-icon>`}};_i.styles=[d`
|
|
5408
5534
|
:host {
|
|
5409
5535
|
display: block;
|
|
5410
5536
|
width: 100%;
|
|
@@ -5427,9 +5553,9 @@
|
|
|
5427
5553
|
color: var(--uui-color-surface,#fff);
|
|
5428
5554
|
background: var(--uui-color-surface-alt,#f3f3f5);
|
|
5429
5555
|
}
|
|
5430
|
-
`],
|
|
5556
|
+
`],Zs([a({type:String})],_i.prototype,"src",2),Zs([a({type:String})],_i.prototype,"alt",2),_i=Zs([p("uui-symbol-file-thumbnail")],_i);var Kg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,Ru=(t,e,i,o)=>{for(var r=o>1?void 0:o?Xg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Kg(e,i,r),r};let nr=class extends v{constructor(){super(...arguments),this.open=!1}render(){return _`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
5431
5557
|
${this.open===!0?_`<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>`:_`<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>`}
|
|
5432
|
-
</svg>`}};
|
|
5558
|
+
</svg>`}};nr.styles=[d`
|
|
5433
5559
|
:host {
|
|
5434
5560
|
display: inline-block;
|
|
5435
5561
|
vertical-align: middle;
|
|
@@ -5439,7 +5565,7 @@
|
|
|
5439
5565
|
svg {
|
|
5440
5566
|
fill: currentColor;
|
|
5441
5567
|
}
|
|
5442
|
-
`],
|
|
5568
|
+
`],Ru([a({type:Boolean,reflect:!0})],nr.prototype,"open",2),nr=Ru([p("uui-symbol-lock")],nr);var Yg=Object.defineProperty,Zg=Object.getOwnPropertyDescriptor,Qg=(t,e,i,o)=>{for(var r=o>1?void 0:o?Zg(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Yg(e,i,r),r};let _o=class extends v{render(){return l`•••`}};_o.styles=[d`
|
|
5443
5569
|
:host {
|
|
5444
5570
|
display: inline-block;
|
|
5445
5571
|
font-size: 0.8em;
|
|
@@ -5448,7 +5574,7 @@
|
|
|
5448
5574
|
line-height: 1em;
|
|
5449
5575
|
user-select: none;
|
|
5450
5576
|
}
|
|
5451
|
-
`],
|
|
5577
|
+
`],_o=Qg([p("uui-symbol-more")],_o);var Jg=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,Fu=(t,e,i,o)=>{for(var r=o>1?void 0:o?e0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&Jg(e,i,r),r};let ar=class extends Ii(v){constructor(){super(...arguments),this.descending=!1}render(){return l`<svg
|
|
5452
5578
|
id="up"
|
|
5453
5579
|
xmlns="http://www.w3.org/2000/svg"
|
|
5454
5580
|
viewBox="0 0 512 512">
|
|
@@ -5456,7 +5582,7 @@
|
|
|
5456
5582
|
</svg>
|
|
5457
5583
|
<svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
5458
5584
|
<path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path>
|
|
5459
|
-
</svg>`}};
|
|
5585
|
+
</svg>`}};ar.styles=[d`
|
|
5460
5586
|
:host {
|
|
5461
5587
|
position: relative;
|
|
5462
5588
|
display: inline-block;
|
|
@@ -5513,7 +5639,7 @@
|
|
|
5513
5639
|
:host([active][descending]) #down {
|
|
5514
5640
|
opacity: calc(0.25 * var(--uui-symbol-sort-hover, 0));
|
|
5515
5641
|
}
|
|
5516
|
-
`],
|
|
5642
|
+
`],Fu([a({type:Boolean,reflect:!0})],ar.prototype,"descending",2),ar=Fu([p("uui-symbol-sort")],ar);var t0=Object.defineProperty,i0=Object.getOwnPropertyDescriptor,r0=(t,e,i,o)=>{for(var r=o>1?void 0:o?i0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&t0(e,i,r),r};let yo=class extends v{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return l`<slot></slot>`}};yo.styles=[d`
|
|
5517
5643
|
:host {
|
|
5518
5644
|
display: table;
|
|
5519
5645
|
width: 100%;
|
|
@@ -5521,7 +5647,7 @@
|
|
|
5521
5647
|
background-color: var(--uui-color-surface,#fff);
|
|
5522
5648
|
cursor: default;
|
|
5523
5649
|
}
|
|
5524
|
-
`],
|
|
5650
|
+
`],yo=r0([p("uui-table")],yo);var o0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,xo=(t,e,i,o)=>{for(var r=o>1?void 0:o?s0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&o0(e,i,r),r};let ze=class extends v{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(t){super.updated(t),t.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return l` <slot @slotchange=${this._detectOverflow}></slot>`}};ze.styles=[d`
|
|
5525
5651
|
:host {
|
|
5526
5652
|
position: relative;
|
|
5527
5653
|
display: table-cell;
|
|
@@ -5555,20 +5681,20 @@
|
|
|
5555
5681
|
:host([no-padding]) {
|
|
5556
5682
|
padding: 0;
|
|
5557
5683
|
}
|
|
5558
|
-
`],
|
|
5684
|
+
`],xo([a({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],ze.prototype,"disableChildInteraction",2),xo([a({type:Boolean,reflect:!0,attribute:"no-padding"})],ze.prototype,"noPadding",2),xo([a({type:Boolean,reflect:!0,attribute:"clip-text"})],ze.prototype,"clipText",2),ze=xo([p("uui-table-cell")],ze);var n0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,l0=(t,e,i,o)=>{for(var r=o>1?void 0:o?a0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&n0(e,i,r),r};let wo=class extends v{};wo.styles=[d`
|
|
5559
5685
|
:host {
|
|
5560
5686
|
display: table-column;
|
|
5561
5687
|
}
|
|
5562
|
-
`],
|
|
5688
|
+
`],wo=l0([p("uui-table-column")],wo);var u0=Object.defineProperty,c0=Object.getOwnPropertyDescriptor,h0=(t,e,i,o)=>{for(var r=o>1?void 0:o?c0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&u0(e,i,r),r};let $o=class extends ze{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}};$o.styles=[...ze.styles,d`
|
|
5563
5689
|
:host {
|
|
5564
5690
|
border-top: none;
|
|
5565
5691
|
}
|
|
5566
|
-
`]
|
|
5692
|
+
`],$o=h0([p("uui-table-head-cell")],$o);var d0=Object.defineProperty,p0=Object.getOwnPropertyDescriptor,v0=(t,e,i,o)=>{for(var r=o>1?void 0:o?p0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&d0(e,i,r),r};let Eo=class extends v{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return l`<slot></slot>`}};Eo.styles=[d`
|
|
5567
5693
|
:host {
|
|
5568
5694
|
display: table-header-group;
|
|
5569
5695
|
font-weight: bold;
|
|
5570
5696
|
}
|
|
5571
|
-
`],
|
|
5697
|
+
`],Eo=v0([p("uui-table-head")],Eo);var f0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,Gu=(t,e,i,o)=>{for(var r=o>1?void 0:o?b0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&f0(e,i,r),r};let lr=class extends Cr(Rt(v)){constructor(){super();let t=!1;this.addEventListener("blur",()=>{t===!1&&this.style.setProperty("--uui-show-focus-outline","1"),t=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),t=!0}),this.addEventListener("mouseup",()=>{t=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(t){t.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(t=>{this.elementIsTableCell(t)&&(t.disableChildInteraction=this.selectOnly)})}elementIsTableCell(t){return t instanceof ze}render(){return l` <slot @slotchanged=${this.updateChildSelectOnly}></slot> `}};lr.styles=[d`
|
|
5572
5698
|
:host {
|
|
5573
5699
|
display: table-row;
|
|
5574
5700
|
position: relative;
|
|
@@ -5590,12 +5716,12 @@
|
|
|
5590
5716
|
:host([selected]:focus) {
|
|
5591
5717
|
outline-color: var(--uui-color-focus,#3879ff);
|
|
5592
5718
|
}
|
|
5593
|
-
`],
|
|
5719
|
+
`],Gu([Ye({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],lr.prototype,"slotCellNodes",2),lr=Gu([p("uui-table-row")],lr);var g0=Object.defineProperty,m0=Object.getOwnPropertyDescriptor,ur=(t,e,i,o)=>{for(var r=o>1?void 0:o?m0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&g0(e,i,r),r};let Ke=class extends Ii(me("",v)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}render(){return this.href?l`
|
|
5594
5720
|
<a
|
|
5595
5721
|
id="button"
|
|
5596
|
-
href=${
|
|
5597
|
-
target=${
|
|
5598
|
-
rel=${
|
|
5722
|
+
href=${C(this.disabled?void 0:this.href)}
|
|
5723
|
+
target=${C(this.target||void 0)}
|
|
5724
|
+
rel=${C(this.target==="_blank"?"noopener noreferrer":void 0)}
|
|
5599
5725
|
role="tab">
|
|
5600
5726
|
<slot name="icon"></slot>
|
|
5601
5727
|
${this.renderLabel()}
|
|
@@ -5611,7 +5737,7 @@
|
|
|
5611
5737
|
${this.renderLabel()}
|
|
5612
5738
|
<slot name="extra"></slot>
|
|
5613
5739
|
</button>
|
|
5614
|
-
`}};
|
|
5740
|
+
`}};Ke.styles=[d`
|
|
5615
5741
|
:host {
|
|
5616
5742
|
color: var(--uui-tab-text, var(--uui-color-interactive,#1b264f));
|
|
5617
5743
|
font-family: inherit;
|
|
@@ -5658,6 +5784,10 @@
|
|
|
5658
5784
|
0 1px 2px rgba(0, 0, 0, 0.05);
|
|
5659
5785
|
}
|
|
5660
5786
|
|
|
5787
|
+
:host([active]) {
|
|
5788
|
+
color: var(--uui-tab-text-active, unset);
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5661
5791
|
:host([active]) #button {
|
|
5662
5792
|
cursor: default;
|
|
5663
5793
|
}
|
|
@@ -5732,8 +5862,8 @@
|
|
|
5732
5862
|
:host([orientation='vertical']) slot.label {
|
|
5733
5863
|
text-align: left;
|
|
5734
5864
|
}
|
|
5735
|
-
`],
|
|
5736
|
-
<slot @slotchange=${
|
|
5865
|
+
`],ur([a({type:Boolean,reflect:!0})],Ke.prototype,"disabled",2),ur([a({type:String})],Ke.prototype,"href",2),ur([a({type:String})],Ke.prototype,"target",2),ur([a({type:String,reflect:!0})],Ke.prototype,"orientation",2),Ke=ur([p("uui-tab")],Ke);var _0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,cr=(t,e,i,o)=>{for(var r=o>1?void 0:o?y0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&_0(e,i,r),r},Qs=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},k=(t,e,i)=>(Qs(t,e,"read from private field"),i?i.call(t):e.get(t)),ce=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Wu=(t,e,i,o)=>(Qs(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),st=(t,e,i)=>(Qs(t,e,"access private method"),i),Ie,Ae,yi,Lt,Co,Js,qu,en,Ku,xi,Po,tn,rn,Xu,on,Yu,Oo,sn;let nt=class extends v{constructor(){super(...arguments),ce(this,Js),ce(this,en),ce(this,Po),ce(this,rn),ce(this,on),ce(this,Oo),this.dropdownContentDirection="vertical",ce(this,Ie,[]),ce(this,Ae,[]),ce(this,yi,new Map),ce(this,Lt,[]),ce(this,Co,new ResizeObserver(st(this,Js,qu).bind(this))),ce(this,xi,t=>{const e=t.currentTarget;if(st(this,Oo,sn).call(this,e)){e.active=!0;const i=k(this,yi).get(e);i&&(i.active=!0),[...k(this,Ie),...k(this,Ae)].filter(s=>s!==e&&s!==i).forEach(s=>{st(this,Oo,sn).call(this,s)&&(s.active=!1)}),k(this,Ae).some(s=>s.active&&s!==i)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),k(this,Co).observe(this),this.hasAttribute("role")||this.setAttribute("role","tablist")}disconnectedCallback(){super.disconnectedCallback(),k(this,Co).unobserve(this)}render(){return l`
|
|
5866
|
+
<slot @slotchange=${st(this,en,Ku)}></slot>
|
|
5737
5867
|
<uui-button
|
|
5738
5868
|
popovertarget="popover-container"
|
|
5739
5869
|
style="display: none"
|
|
@@ -5745,20 +5875,32 @@
|
|
|
5745
5875
|
<uui-popover-container
|
|
5746
5876
|
id="popover-container"
|
|
5747
5877
|
popover
|
|
5748
|
-
margin="10"
|
|
5749
5878
|
placement="bottom-end">
|
|
5750
5879
|
<div id="hidden-tabs-container">
|
|
5751
|
-
${
|
|
5880
|
+
${$s(k(this,Ae),t=>l`${t}`)}
|
|
5752
5881
|
</div>
|
|
5753
5882
|
</uui-popover-container>
|
|
5754
|
-
`}};
|
|
5883
|
+
`}};Ie=new WeakMap,Ae=new WeakMap,yi=new WeakMap,Lt=new WeakMap,Co=new WeakMap,Js=new WeakSet,qu=function(t){st(this,Po,tn).call(this,t[0].contentBoxSize[0].inlineSize)},en=new WeakSet,Ku=function(){k(this,Ie).forEach(t=>{t.removeEventListener("click",k(this,xi))}),st(this,on,Yu).call(this),k(this,Ie).forEach(t=>{t.addEventListener("click",k(this,xi))})},xi=new WeakMap,Po=new WeakSet,tn=function(t){const e=this._moreButtonElement.offsetWidth;if(k(this,Lt).slice(-1)[0]<t&&k(this,Ae).length===0)return;k(this,Ae).forEach(r=>{r.removeEventListener("click",k(this,xi))}),Wu(this,Ae,[]),k(this,yi).clear();let o=!1;for(let r=0;r<k(this,Lt).length;r++){const s=k(this,Lt)[r],n=k(this,Ie)[r],u=t-(r!==k(this,Lt).length-1?e:0);if(s<u)n.style.display="",this._moreButtonElement.style.display="none";else{const c=n.cloneNode(!0);c.addEventListener("click",k(this,xi)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,k(this,yi).set(c,n),k(this,yi).set(n,c),k(this,Ae).push(c),n.style.display="none",this._moreButtonElement.style.display="",n.active&&(o=!0)}}k(this,Ae).length===0&&this._popoverContainerElement.hidePopover(),o?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},rn=new WeakSet,Xu=async function(){await this.updateComplete;let t=0;for(let i=0;i<k(this,Ie).length;i++)k(this,Ie)[i].style.display="",t+=k(this,Ie)[i].offsetWidth,k(this,Lt)[i]=t;const e=2;this.style.width=t+e+"px",st(this,Po,tn).call(this,this.offsetWidth)},on=new WeakSet,Yu=function(){Wu(this,Ie,this._slottedNodes?this._slottedNodes:[]),st(this,rn,Xu).call(this)},Oo=new WeakSet,sn=function(t){return t instanceof Ke||"active"in t},nt.styles=[d`
|
|
5755
5884
|
:host {
|
|
5756
5885
|
display: flex;
|
|
5757
|
-
flex-wrap:
|
|
5886
|
+
flex-wrap: nowrap;
|
|
5758
5887
|
color: var(--uui-tab-text);
|
|
5759
|
-
background: var(--uui-tab-background, none);
|
|
5760
5888
|
height: 100%;
|
|
5761
5889
|
min-height: 48px;
|
|
5890
|
+
overflow: hidden;
|
|
5891
|
+
text-wrap: nowrap;
|
|
5892
|
+
}
|
|
5893
|
+
|
|
5894
|
+
#popover-container {
|
|
5895
|
+
--uui-tab-text: var(--uui-tab-group-dropdown-tab-text, unset);
|
|
5896
|
+
--uui-tab-text-hover: var(
|
|
5897
|
+
--uui-tab-group-dropdown-tab-text-hover,
|
|
5898
|
+
unset
|
|
5899
|
+
);
|
|
5900
|
+
--uui-tab-text-active: var(
|
|
5901
|
+
--uui-tab-group-dropdown-tab-text-active,
|
|
5902
|
+
unset
|
|
5903
|
+
);
|
|
5762
5904
|
}
|
|
5763
5905
|
|
|
5764
5906
|
::slotted(*:not(:last-of-type)) {
|
|
@@ -5773,7 +5915,10 @@
|
|
|
5773
5915
|
width: fit-content;
|
|
5774
5916
|
display: flex;
|
|
5775
5917
|
flex-direction: column;
|
|
5776
|
-
background: var(
|
|
5918
|
+
background-color: var(
|
|
5919
|
+
--uui-tab-group-dropdown-background,
|
|
5920
|
+
var(--uui-color-surface,#fff)
|
|
5921
|
+
);
|
|
5777
5922
|
border-radius: var(--uui-border-radius,3px);
|
|
5778
5923
|
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));
|
|
5779
5924
|
overflow: hidden;
|
|
@@ -5783,8 +5928,12 @@
|
|
|
5783
5928
|
}
|
|
5784
5929
|
|
|
5785
5930
|
#more-button {
|
|
5786
|
-
margin-left: auto;
|
|
5787
5931
|
position: relative;
|
|
5932
|
+
|
|
5933
|
+
--uui-button-contrast: var(--uui-tab-text);
|
|
5934
|
+
--uui-button-contrast-hover: var(--uui-tab-text-hover);
|
|
5935
|
+
--uui-button-background-color: transparent;
|
|
5936
|
+
--uui-button-background-color-hover: transparent;
|
|
5788
5937
|
}
|
|
5789
5938
|
#more-button::before {
|
|
5790
5939
|
content: '';
|
|
@@ -5802,7 +5951,7 @@
|
|
|
5802
5951
|
height: 4px;
|
|
5803
5952
|
transition: opacity 120ms, height ease-out 120ms;
|
|
5804
5953
|
}
|
|
5805
|
-
`],
|
|
5954
|
+
`],cr([O("#more-button")],nt.prototype,"_moreButtonElement",2),cr([O("#popover-container")],nt.prototype,"_popoverContainerElement",2),cr([Ye({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],nt.prototype,"_slottedNodes",2),cr([a({type:String,reflect:!0,attribute:"dropdown-content-direction"})],nt.prototype,"dropdownContentDirection",2),nt=cr([p("uui-tab-group")],nt);class x0 extends S{}class w0 extends S{}var $0=Object.defineProperty,E0=Object.getOwnPropertyDescriptor,nn=(t,e,i,o)=>{for(var r=o>1?void 0:o?E0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&$0(e,i,r),r};let wi=class extends v{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return l`<slot></slot>`}};wi.styles=[d`
|
|
5806
5955
|
:host {
|
|
5807
5956
|
display: inline-block;
|
|
5808
5957
|
font-size: var(--uui-tag-font-size, var(--uui-type-small-size,12px));
|
|
@@ -5869,14 +6018,14 @@
|
|
|
5869
6018
|
color: var(--color-standalone);
|
|
5870
6019
|
border-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
5871
6020
|
}
|
|
5872
|
-
`],
|
|
6021
|
+
`],nn([a({reflect:!0})],wi.prototype,"color",2),nn([a({reflect:!0})],wi.prototype,"look",2),wi=nn([p("uui-tag")],wi);var C0=Object.defineProperty,Zu=Object.getOwnPropertySymbols,P0=Object.prototype.hasOwnProperty,O0=Object.prototype.propertyIsEnumerable,Qu=(t,e,i)=>e in t?C0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ju=(t,e)=>{for(var i in e||(e={}))P0.call(e,i)&&Qu(t,i,e[i]);if(Zu)for(var i of Zu(e))O0.call(e,i)&&Qu(t,i,e[i]);return t};class hr extends S{constructor(e,i={}){super(e,Ju(Ju({},{bubbles:!0}),i))}}hr.CHANGE="change",hr.INPUT="input";var k0=Object.defineProperty,S0=Object.getOwnPropertyDescriptor,G=(t,e,i,o)=>{for(var r=o>1?void 0:o?S0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&k0(e,i,r),r};let M=class extends _e(v){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",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",()=>this.minlengthMessage,()=>!!this.minlength&&this._value.length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!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()})}focus(){var t;(t=this._textarea)==null||t.focus()}getFormElement(){return this._textarea}onInput(t){this.value=t.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(t){t.stopPropagation(),this.pristine=!1,this.dispatchEvent(new hr(hr.CHANGE))}autoUpdateHeight(){const t=this.shadowRoot.host,e=this._textarea,i=t.scrollTop,o=getComputedStyle(t).height;t.style.display="block",t.style.height=o,e.style.height="auto",e.scrollHeight+2>e.clientHeight?e.style.height=e.scrollHeight+2+"px":e.scrollHeight+2<e.clientHeight&&e.style.removeProperty("height"),t.style.removeProperty("display"),t.style.removeProperty("height"),t.scrollTop=i}render(){return l`
|
|
5873
6022
|
<textarea
|
|
5874
6023
|
id="textarea"
|
|
5875
|
-
rows=${
|
|
5876
|
-
cols=${
|
|
6024
|
+
rows=${C(this.rows)}
|
|
6025
|
+
cols=${C(this.cols)}
|
|
5877
6026
|
.value=${this.value}
|
|
5878
6027
|
.name=${this.name}
|
|
5879
|
-
wrap=${
|
|
6028
|
+
wrap=${C(this.wrap)}
|
|
5880
6029
|
placeholder=${this.placeholder}
|
|
5881
6030
|
aria-label=${this.label}
|
|
5882
6031
|
.disabled=${this.disabled}
|
|
@@ -5884,7 +6033,7 @@
|
|
|
5884
6033
|
@input=${this.onInput}
|
|
5885
6034
|
@change=${this.onChange}>
|
|
5886
6035
|
</textarea>
|
|
5887
|
-
`}};
|
|
6036
|
+
`}};M.formAssociated=!0,M.styles=[d`
|
|
5888
6037
|
:host {
|
|
5889
6038
|
position: relative;
|
|
5890
6039
|
}
|
|
@@ -5968,7 +6117,7 @@
|
|
|
5968
6117
|
outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
|
|
5969
6118
|
var(--uui-color-focus,#3879ff);
|
|
5970
6119
|
}
|
|
5971
|
-
`],
|
|
6120
|
+
`],G([a()],M.prototype,"placeholder",2),G([a({type:Boolean,reflect:!0})],M.prototype,"disabled",2),G([a({type:Boolean,reflect:!0})],M.prototype,"readonly",2),G([a({type:String})],M.prototype,"name",2),G([a({type:Boolean,reflect:!0})],M.prototype,"error",2),G([a({type:Number})],M.prototype,"minlength",2),G([a({type:String,attribute:"minlength-message"})],M.prototype,"minlengthMessage",2),G([a({type:Number})],M.prototype,"maxlength",2),G([a({type:String,attribute:"maxlength-message"})],M.prototype,"maxlengthMessage",2),G([O("#textarea")],M.prototype,"_textarea",2),G([a({type:Boolean,attribute:"auto-height",reflect:!0})],M.prototype,"autoHeight",2),G([a({type:String})],M.prototype,"label",2),G([a({type:Number})],M.prototype,"rows",2),G([a({type:Number})],M.prototype,"cols",2),G([a({type:String})],M.prototype,"wrap",2),M=G([p("uui-textarea")],M);var z0=`.uui-text {
|
|
5972
6121
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
5973
6122
|
font-size: 15px;
|
|
5974
6123
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -6136,7 +6285,7 @@
|
|
|
6136
6285
|
margin-top: var(--uui-size-layout-1,24px);
|
|
6137
6286
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
6138
6287
|
}
|
|
6139
|
-
`;const
|
|
6288
|
+
`;const I0=he(z0);class q extends S{}q.OPENING="opening",q.OPENED="opened",q.CLOSING="closing",q.CLOSED="closed";var A0=Object.defineProperty,U0=Object.getOwnPropertyDescriptor,$i=(t,e,i,o)=>{for(var r=o>1?void 0:o?U0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&A0(e,i,r),r};let Xe=class extends v{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",t=>{t.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(t){var e;this._autoClose=t,t!==null?(this._timer===null?this._timer=new Nd(this._onOpenTimerComplete,t):this._timer.setDuration(t),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):((e=this._timer)==null||e.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(t){t===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),y(this,"uui-button"),y(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 q(q.OPENING)),this._animationTimeout=window.setTimeout(()=>{var t;this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&((t=this._timer)==null||t.start()),this.dispatchEvent(new q(q.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){var t;if(this._open===!1)return;const e=new q(q.CLOSING,{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented!==!0&&(this._open=!1,(t=this._timer)==null||t.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 q(q.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return l`
|
|
6140
6289
|
<div id="toast" class=${this._animate?"animate":""}>
|
|
6141
6290
|
<div>
|
|
6142
6291
|
<div id="close">
|
|
@@ -6147,13 +6296,13 @@
|
|
|
6147
6296
|
@click=${()=>this.open=!1}>
|
|
6148
6297
|
<uui-icon
|
|
6149
6298
|
name="remove"
|
|
6150
|
-
.fallback=${
|
|
6299
|
+
.fallback=${qo.strings[0]}></uui-icon>
|
|
6151
6300
|
</uui-button>
|
|
6152
6301
|
</div>
|
|
6153
6302
|
<slot></slot>
|
|
6154
6303
|
</div>
|
|
6155
6304
|
</div>
|
|
6156
|
-
`}};
|
|
6305
|
+
`}};Xe.styles=[I0,d`
|
|
6157
6306
|
:host {
|
|
6158
6307
|
--uui-toast-notification-margin: var(--uui-size-space-2,6px);
|
|
6159
6308
|
|
|
@@ -6249,7 +6398,7 @@
|
|
|
6249
6398
|
color: var(--uui-color-danger-contrast,white);
|
|
6250
6399
|
border-color: var(--uui-color-danger-standalone,rgb(191, 33, 78));
|
|
6251
6400
|
}
|
|
6252
|
-
`]
|
|
6401
|
+
`],$i([a({reflect:!0})],Xe.prototype,"color",2),$i([a({type:Number})],Xe.prototype,"autoClose",1),$i([O("#toast")],Xe.prototype,"_toastEl",2),$i([b()],Xe.prototype,"_animate",2),$i([a({type:Boolean,reflect:!0})],Xe.prototype,"open",1),Xe=$i([p("uui-toast-notification")],Xe);var D0=Object.defineProperty,L0=Object.getOwnPropertyDescriptor,ec=(t,e,i,o)=>{for(var r=o>1?void 0:o?L0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&D0(e,i,r),r};let dr=class extends v{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{var t;this._autoClosePause=!0,(t=this._toasts)==null||t.forEach(e=>e.pauseAutoClose())},this.resumeAutoClose=()=>{var t;this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,(t=this._toasts)==null||t.forEach(e=>e.resumeAutoClose()))},this.onToastClosed=t=>{this.removeToast(t.target)},this._toasts=[],this.onSlotChanged=t=>{const e=[...this._toasts];this._toasts=t.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),e.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(q.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=>e.indexOf(r)===-1).forEach(r=>{r.addEventListener(q.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(t){var e;this._autoClose=t,(e=this._toasts)==null||e.forEach(i=>i.autoClose=t)}removeToast(t){if(!t)t=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(t)===-1){console.warn("Toast-notification",t,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(t)}closeToast(t){let e=t;e||(e=this._toasts[this._toasts.length-1]),e.open=!1}render(){return l` <slot @slotchange=${this.onSlotChanged}></slot> `}};dr.styles=[d`
|
|
6253
6402
|
:host {
|
|
6254
6403
|
position: absolute;
|
|
6255
6404
|
overflow: hidden;
|
|
@@ -6277,7 +6426,7 @@
|
|
|
6277
6426
|
:host([left-align]) slot {
|
|
6278
6427
|
align-items: start;
|
|
6279
6428
|
}
|
|
6280
|
-
`],
|
|
6429
|
+
`],ec([a({type:Number,reflect:!0,attribute:"auto-close"})],dr.prototype,"_autoClose",2),dr=ec([p("uui-toast-notification-container")],dr);var M0=`.uui-text {
|
|
6281
6430
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
6282
6431
|
font-size: 15px;
|
|
6283
6432
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -6445,7 +6594,7 @@
|
|
|
6445
6594
|
margin-top: var(--uui-size-layout-1,24px);
|
|
6446
6595
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
6447
6596
|
}
|
|
6448
|
-
`;const
|
|
6597
|
+
`;const T0=he(M0);var N0=Object.defineProperty,V0=Object.getOwnPropertyDescriptor,an=(t,e,i,o)=>{for(var r=o>1?void 0:o?V0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&N0(e,i,r),r};let Ei=class extends v{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=t=>{this._headlineSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}}render(){return l`
|
|
6449
6598
|
<div id="message" class="uui-text">
|
|
6450
6599
|
<h5
|
|
6451
6600
|
style=${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}>
|
|
@@ -6455,7 +6604,7 @@
|
|
|
6455
6604
|
<slot></slot>
|
|
6456
6605
|
<slot id="actions" name="actions"></slot>
|
|
6457
6606
|
</div>
|
|
6458
|
-
`}};
|
|
6607
|
+
`}};Ei.styles=[T0,d`
|
|
6459
6608
|
#message {
|
|
6460
6609
|
margin-bottom: calc(var(--uui-size-space-1,3px) * -1);
|
|
6461
6610
|
}
|
|
@@ -6476,12 +6625,12 @@
|
|
|
6476
6625
|
margin-top: var(--uui-size-space-4,12px);
|
|
6477
6626
|
margin-bottom: calc(var(--uui-size-space-2,6px) * -1);
|
|
6478
6627
|
}
|
|
6479
|
-
`],
|
|
6628
|
+
`],an([a({type:String})],Ei.prototype,"headline",2),an([b()],Ei.prototype,"_headlineSlotHasContent",2),Ei=an([p("uui-toast-notification-layout")],Ei);var j0=Object.defineProperty,H0=Object.getOwnPropertyDescriptor,B0=(t,e,i,o)=>{for(var r=o>1?void 0:o?H0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&j0(e,i,r),r};let pr=class extends ye{constructor(){super("switch")}renderCheckbox(){return l`
|
|
6480
6629
|
<div id="slider">
|
|
6481
|
-
<div id="icon-
|
|
6482
|
-
<div id="icon-
|
|
6630
|
+
<div id="icon-checked">${Ar}</div>
|
|
6631
|
+
<div id="icon-unchecked">${qo}</div>
|
|
6483
6632
|
</div>
|
|
6484
|
-
`}};
|
|
6633
|
+
`}};pr.formAssociated=!0,pr.styles=[...ye.styles,kr,d`
|
|
6485
6634
|
:host {
|
|
6486
6635
|
--uui-toggle-size: 18px;
|
|
6487
6636
|
--uui-toggle-switch-width: calc(2 * var(--uui-toggle-size));
|
|
@@ -6535,29 +6684,29 @@
|
|
|
6535
6684
|
background-color: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
|
|
6536
6685
|
}
|
|
6537
6686
|
|
|
6538
|
-
#icon-
|
|
6539
|
-
#icon-
|
|
6687
|
+
#icon-checked,
|
|
6688
|
+
#icon-unchecked {
|
|
6540
6689
|
position: absolute;
|
|
6541
6690
|
vertical-align: middle;
|
|
6542
6691
|
width: 1em;
|
|
6543
6692
|
height: 1em;
|
|
6544
6693
|
line-height: 0;
|
|
6545
|
-
transition:
|
|
6694
|
+
transition: color 120ms;
|
|
6546
6695
|
}
|
|
6547
6696
|
|
|
6548
|
-
#icon-
|
|
6697
|
+
#icon-checked {
|
|
6549
6698
|
margin-left: -0.5em;
|
|
6550
6699
|
left: calc(var(--uui-toggle-size) * 0.5);
|
|
6551
|
-
|
|
6700
|
+
color: var(--uui-color-interactive,#1b264f);
|
|
6552
6701
|
}
|
|
6553
6702
|
|
|
6554
|
-
#icon-
|
|
6703
|
+
#icon-unchecked {
|
|
6555
6704
|
margin-right: -0.5em;
|
|
6556
6705
|
right: calc(var(--uui-toggle-size) * 0.5);
|
|
6557
|
-
|
|
6706
|
+
color: var(--uui-color-interactive,#1b264f);
|
|
6558
6707
|
}
|
|
6559
|
-
input:checked ~ #slider #icon-
|
|
6560
|
-
|
|
6708
|
+
input:checked ~ #slider #icon-checked {
|
|
6709
|
+
color: var(--uui-color-selected-contrast,#fff);
|
|
6561
6710
|
}
|
|
6562
6711
|
|
|
6563
6712
|
#slider::after {
|
|
@@ -6597,14 +6746,14 @@
|
|
|
6597
6746
|
:host([disabled]) #slider::after {
|
|
6598
6747
|
background-color: var(--uui-color-disabled,#f3f3f5);
|
|
6599
6748
|
}
|
|
6600
|
-
:host([disabled]) #slider #icon-
|
|
6601
|
-
|
|
6749
|
+
:host([disabled]) #slider #icon-unchecked {
|
|
6750
|
+
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
6602
6751
|
}
|
|
6603
6752
|
:host([disabled]) label:active #slider {
|
|
6604
|
-
animation: ${
|
|
6753
|
+
animation: ${Sr};
|
|
6605
6754
|
}
|
|
6606
|
-
:host([disabled]) input:checked #slider #icon-
|
|
6607
|
-
|
|
6755
|
+
:host([disabled]) input:checked #slider #icon-checked {
|
|
6756
|
+
color: var(--uui-color-disabled-contrast,#c4c4c4);
|
|
6608
6757
|
}
|
|
6609
6758
|
|
|
6610
6759
|
:host(:not([pristine]):invalid) #slider,
|
|
@@ -6614,7 +6763,7 @@
|
|
|
6614
6763
|
:host(:not([pristine])[internals-invalid]) label:hover #slider {
|
|
6615
6764
|
border: 1px solid var(--uui-color-danger-standalone,rgb(191, 33, 78));
|
|
6616
6765
|
}
|
|
6617
|
-
`],
|
|
6766
|
+
`],pr=B0([p("uui-toggle")],pr);var R0=Object.defineProperty,F0=Object.getOwnPropertyDescriptor,G0=(t,e,i,o)=>{for(var r=o>1?void 0:o?F0(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&R0(e,i,r),r};let ko=class extends v{render(){return l`<slot></slot>`}};ko.styles=[d`
|
|
6618
6767
|
:host(:not(:focus-within)) {
|
|
6619
6768
|
position: absolute !important;
|
|
6620
6769
|
width: 1px !important;
|
|
@@ -6626,4 +6775,4 @@
|
|
|
6626
6775
|
white-space: nowrap !important;
|
|
6627
6776
|
padding: 0 !important;
|
|
6628
6777
|
}
|
|
6629
|
-
`],
|
|
6778
|
+
`],ko=G0([p("uui-visually-hidden")],ko);export{Uc as ActiveMixin,Wc as FormControlMixin,ah as InterfaceColorValues,lh as InterfaceHeadingValues,nh as InterfaceLookValues,Mc as LabelMixin,oh as PopoverTargetMixin,Rc as SelectOnlyMixin,Vc as SelectableMixin,qc as Timer,wr as UUIActionBarElement,Me as UUIAvatarElement,gt as UUIAvatarGroupElement,mt as UUIBadgeElement,fc as UUIBlinkAnimationValue,vc as UUIBlinkKeyframes,ye as UUIBooleanInputElement,Pr as UUIBooleanInputEvent,xe as UUIBoxElement,xt as UUIBreadcrumbItemElement,Ai as UUIBreadcrumbsElement,X as UUIButtonElement,jt as UUIButtonGroupElement,wt as UUIButtonInlineCreateElement,zr as UUIButtonInlineCreateEvent,$t as UUICardBlockTypeElement,Xt as UUICardContentNodeElement,R as UUICardElement,Kt as UUICardEvent,Et as UUICardMediaElement,Yt as UUICardUserElement,Li as UUICaretElement,Mi as UUICheckboxElement,se as UUIColorAreaElement,Tr as UUIColorAreaEvent,jr as UUIColorPickerChangeEvent,U as UUIColorPickerElement,ae as UUIColorSliderElement,Hr as UUIColorSliderEvent,Qe as UUIColorSwatchElement,Pt as UUIColorSwatchesElement,Zt as UUIColorSwatchesEvent,F as UUIComboboxElement,Y as UUIComboboxEvent,ve as UUIComboboxListElement,pe as UUIComboboxListEvent,He as UUIComboboxListOptionElement,Zr as UUIDialogElement,ti as UUIDialogLayoutElement,Ro as UUIEvent,et as UUIFileDropzoneElement,ii as UUIFileDropzoneEvent,Q as UUIFilePreviewElement,vt as UUIFormControlEvent,Es as UUIFormElement,Ot as UUIFormLayoutItemElement,Fi as UUIFormValidationMessageElement,gc as UUIHorizontalPulseAnimationValue,bc as UUIHorizontalPulseKeyframes,_c as UUIHorizontalShakeAnimationValue,mc as UUIHorizontalShakeKeyframes,Pe as UUIIconElement,Os as UUIIconHost,ks as UUIIconRegistry,Gi as UUIIconRegistryElement,Jl as UUIIconRegistryEssential,Ss as UUIIconRegistryEssentialElement,ri as UUIIconRequestEvent,I as UUIInputElement,St as UUIInputEvent,Be as UUIInputFileElement,Wi as UUIInputLockElement,si as UUIInputPasswordElement,eo as UUIKeyElement,Jr as UUIKeyboardShortcutElement,zt as UUILabelElement,ni as UUILoaderBarElement,ai as UUILoaderCircleElement,io as UUILoaderElement,le as UUIMenuItemElement,Re as UUIMenuItemEvent,Ge as UUIModalContainerElement,uo as UUIModalDialogElement,J as UUIModalElement,ui as UUIModalSidebarElement,ue as UUIPaginationElement,tt as UUIPaginationEvent,Oe as UUIPopoverContainerElement,it as UUIPopoverElement,Yi as UUIProgressBarElement,be as UUIRadioElement,vi as UUIRadioEvent,fi as UUIRadioGroupElement,vo as UUIRadioGroupEvent,A as UUIRangeSliderElement,ot as UUIRefElement,gi as UUIRefEvent,fo as UUIRefListElement,Qi as UUIRefNodeDataTypeElement,Ji as UUIRefNodeDocumentTypeElement,T as UUIRefNodeElement,go as UUIRefNodeFormElement,er as UUIRefNodeMemberElement,mi as UUIRefNodePackageElement,tr as UUIRefNodeUserElement,ir as UUIScrollContainerElement,te as UUISelectElement,mo as UUISelectEvent,ft as UUISelectableEvent,B as UUISliderElement,Dt as UUISliderEvent,or as UUISymbolExpandElement,sr as UUISymbolFileDropzoneElement,Di as UUISymbolFileElement,_i as UUISymbolFileThumbnailElement,Dr as UUISymbolFolderElement,nr as UUISymbolLockElement,_o as UUISymbolMoreElement,ar as UUISymbolSortElement,Ke as UUITabElement,x0 as UUITabEvent,nt as UUITabGroupElement,w0 as UUITabGroupEvent,ze as UUITableCellElement,wo as UUITableColumnElement,yo as UUITableElement,$o as UUITableHeadCellElement,Eo as UUITableHeadElement,lr as UUITableRowElement,wi as UUITagElement,cc as UUITextStyles,M as UUITextareaElement,hr as UUITextareaEvent,dr as UUIToastNotificationContainerElement,Xe as UUIToastNotificationElement,q as UUIToastNotificationEvent,Ei as UUIToastNotificationLayoutElement,pr as UUIToggleElement,ko as UUIVisuallyHiddenElement,Yc as clamp,sh as defineElement,Kc as demandCustomElement,Xc as drag,Fn as findAncestorByAttributeValue,Zc as reverseNumberInRange,Jc as slotHasContent,Qc as toHex};
|