@umbraco-ui/uui-box
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -5,15 +5,15 @@ (function(f){typeof define=="function"&&define.amd?define(f):f()})(function(){"use strict";/** | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const f=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,M=Symbol(),j=new Map;class W{constructor(t,e){if(this._$cssResult$=!0,e!==M)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=j.get(this.cssText);return f&&t===void 0&&(j.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const it=n=>new W(typeof n=="string"?n:n+"",M),nt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new W(e,M)},ot=(n,t)=>{f?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=window.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)})},q=f?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return it(e)})(n):n;/** | ||
*/const f=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,M=Symbol(),I=new Map;class D{constructor(t,e){if(this._$cssResult$=!0,e!==M)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=I.get(this.cssText);return f&&t===void 0&&(I.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const nt=n=>new D(typeof n=="string"?n:n+"",M),ot=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new D(e,M)},rt=(n,t)=>{f?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=window.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)})},V=f?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return nt(e)})(n):n;/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/var O,R;const k={toAttribute(n,t){switch(t){case Boolean:n=n?"":null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch(s){e=null}}return e}},J=(n,t)=>t!==n&&(t==t||n==n),z={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:J};class A extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;(e=this.l)!==null&&e!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Eh(s,e);i!==void 0&&(this._$Eu.set(i,s),t.push(i))}),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(q(i))}else t!==void 0&&e.push(q(t));return e}static _$Eh(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ev=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Ep(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$Em)!==null&&e!==void 0?e:this._$Em=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$Em)===null||e===void 0||e.splice(this._$Em.indexOf(t)>>>0,1)}_$Ep(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ot(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Em)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Em)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$Eg(t,e,s=z){var i,r;const o=this.constructor._$Eh(t,s);if(o!==void 0&&s.reflect===!0){const d=((r=(i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==null&&r!==void 0?r:k.toAttribute)(e,s.type);this._$Ei=t,d==null?this.removeAttribute(o):this.setAttribute(o,d),this._$Ei=null}}_$AK(t,e){var s,i,r;const o=this.constructor,d=o._$Eu.get(t);if(d!==void 0&&this._$Ei!==d){const l=o.getPropertyOptions(d),h=l.converter,p=(r=(i=(s=h)===null||s===void 0?void 0:s.fromAttribute)!==null&&i!==void 0?i:typeof h=="function"?h:null)!==null&&r!==void 0?r:k.fromAttribute;this._$Ei=d,this[d]=p(e,l.type),this._$Ei=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||J)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Ei!==t&&(this._$ES===void 0&&(this._$ES=new Map),this._$ES.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$Ev=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ev}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((i,r)=>this[r]=i),this._$Et=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$Em)===null||t===void 0||t.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$ET()}catch(i){throw e=!1,this._$ET(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$Em)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ev}shouldUpdate(t){return!0}update(t){this._$ES!==void 0&&(this._$ES.forEach((e,s)=>this._$Eg(s,this[s],e)),this._$ES=void 0),this._$ET()}updated(t){}firstUpdated(t){}}A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},(O=globalThis.reactiveElementPolyfillSupport)===null||O===void 0||O.call(globalThis,{ReactiveElement:A}),((R=globalThis.reactiveElementVersions)!==null&&R!==void 0?R:globalThis.reactiveElementVersions=[]).push("1.0.0");/** | ||
*/var O;const j=window.trustedTypes,lt=j?j.emptyScript:"",W=window.reactiveElementPolyfillSupport,R={toAttribute(n,t){switch(t){case Boolean:n=n?lt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch(s){e=null}}return e}},q=(n,t)=>t!==n&&(t==t||n==n),k={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:q};class A extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;(e=this.l)!==null&&e!==void 0||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Eh(s,e);i!==void 0&&(this._$Eu.set(i,s),t.push(i))}),t}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||k}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(V(i))}else t!==void 0&&e.push(V(t));return e}static _$Eh(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),(t=this.constructor.l)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$Eg)!==null&&e!==void 0?e:this._$Eg=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$Eg)===null||e===void 0||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return rt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$Eg)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ES(t,e,s=k){var i,r;const o=this.constructor._$Eh(t,s);if(o!==void 0&&s.reflect===!0){const d=((r=(i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==null&&r!==void 0?r:R.toAttribute)(e,s.type);this._$Ei=t,d==null?this.removeAttribute(o):this.setAttribute(o,d),this._$Ei=null}}_$AK(t,e){var s,i,r;const o=this.constructor,d=o._$Eu.get(t);if(d!==void 0&&this._$Ei!==d){const l=o.getPropertyOptions(d),h=l.converter,p=(r=(i=(s=h)===null||s===void 0?void 0:s.fromAttribute)!==null&&i!==void 0?i:typeof h=="function"?h:null)!==null&&r!==void 0?r:R.fromAttribute;this._$Ei=d,this[d]=p(e,l.type),this._$Ei=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||q)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Ei!==t&&(this._$E_===void 0&&(this._$E_=new Map),this._$E_.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((i,r)=>this[r]=i),this._$Et=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$Eg)===null||t===void 0||t.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$Eg)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){this._$E_!==void 0&&(this._$E_.forEach((e,s)=>this._$ES(s,this[s],e)),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},W==null||W({ReactiveElement:A}),((O=globalThis.reactiveElementVersions)!==null&&O!==void 0?O:globalThis.reactiveElementVersions=[]).push("1.0.2");/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/var L,B;const U=globalThis.trustedTypes,K=U?U.createPolicy("lit-html",{createHTML:n=>n}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,Z="?"+v,rt=`<${Z}>`,m=document,E=(n="")=>m.createComment(n),S=n=>n===null||typeof n!="object"&&typeof n!="function",F=Array.isArray,lt=n=>{var t;return F(n)||typeof((t=n)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,Q=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,X=/'/g,Y=/"/g,tt=/^(?:script|style|textarea)$/i,ht=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),at=ht(1),g=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),et=new WeakMap,dt=(n,t,e)=>{var s,i;const r=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:t;let o=r._$litPart$;if(o===void 0){const d=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new C(t.insertBefore(E(),d),d,void 0,e!=null?e:{})}return o._$AI(n),o},y=m.createTreeWalker(m,129,null,!1),ct=(n,t)=>{const e=n.length-1,s=[];let i,r=t===2?"<svg>":"",o=w;for(let l=0;l<e;l++){const h=n[l];let p,a,c=-1,$=0;for(;$<h.length&&(o.lastIndex=$,a=o.exec(h),a!==null);)$=o.lastIndex,o===w?a[1]==="!--"?o=G:a[1]!==void 0?o=Q:a[2]!==void 0?(tt.test(a[2])&&(i=RegExp("</"+a[2],"g")),o=_):a[3]!==void 0&&(o=_):o===_?a[0]===">"?(o=i!=null?i:w,c=-1):a[1]===void 0?c=-2:(c=o.lastIndex-a[2].length,p=a[1],o=a[3]===void 0?_:a[3]==='"'?Y:X):o===Y||o===X?o=_:o===G||o===Q?o=w:(o=_,i=void 0);const H=o===_&&n[l+1].startsWith("/>")?" ":"";r+=o===w?h+rt:c>=0?(s.push(p),h.slice(0,c)+"$lit$"+h.slice(c)+v+H):h+v+(c===-2?(s.push(void 0),l):H)}const d=r+(n[e]||"<?>")+(t===2?"</svg>":"");return[K!==void 0?K.createHTML(d):d,s]};class x{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const d=t.length-1,l=this.parts,[h,p]=ct(t,e);if(this.el=x.createElement(h,s),y.currentNode=this.el.content,e===2){const a=this.el.content,c=a.firstChild;c.remove(),a.append(...c.childNodes)}for(;(i=y.nextNode())!==null&&l.length<d;){if(i.nodeType===1){if(i.hasAttributes()){const a=[];for(const c of i.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(v)){const $=p[o++];if(a.push(c),$!==void 0){const H=i.getAttribute($.toLowerCase()+"$lit$").split(v),N=/([.?@])?(.*)/.exec($);l.push({type:1,index:r,name:N[2],strings:H,ctor:N[1]==="."?pt:N[1]==="?"?$t:N[1]==="@"?vt:P})}else l.push({type:6,index:r})}for(const c of a)i.removeAttribute(c)}if(tt.test(i.tagName)){const a=i.textContent.split(v),c=a.length-1;if(c>0){i.textContent=U?U.emptyScript:"";for(let $=0;$<c;$++)i.append(a[$],E()),y.nextNode(),l.push({type:2,index:++r});i.append(a[c],E())}}}else if(i.nodeType===8)if(i.data===Z)l.push({type:2,index:r});else{let a=-1;for(;(a=i.data.indexOf(v,a+1))!==-1;)l.push({type:7,index:r}),a+=v.length-1}r++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function b(n,t,e=n,s){var i,r,o,d;if(t===g)return t;let l=s!==void 0?(i=e._$Cl)===null||i===void 0?void 0:i[s]:e._$Cu;const h=S(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,s)),s!==void 0?((o=(d=e)._$Cl)!==null&&o!==void 0?o:d._$Cl=[])[s]=l:e._$Cu=l),l!==void 0&&(t=b(n,l._$AS(n,t.values),l,s)),t}class ut{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:s},parts:i}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:m).importNode(s,!0);y.currentNode=r;let o=y.nextNode(),d=0,l=0,h=i[0];for(;h!==void 0;){if(d===h.index){let p;h.type===2?p=new C(o,o.nextSibling,this,t):h.type===1?p=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(p=new _t(o,this,t)),this.v.push(p),h=i[++l]}d!==(h==null?void 0:h.index)&&(o=y.nextNode(),d++)}return r}m(t){let e=0;for(const s of this.v)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class C{constructor(t,e,s,i){var r;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cg=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),S(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==g&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.S(t):lt(t)?this.M(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==u&&S(this._$AH)?this._$AA.nextSibling.data=t:this.S(m.createTextNode(t)),this._$AH=t}T(t){var e;const{values:s,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=x.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(s);else{const o=new ut(r,this),d=o.p(this.options);o.m(s),this.S(d),this._$AH=o}}_$AC(t){let e=et.get(t.strings);return e===void 0&&et.set(t.strings,e=new x(t)),e}M(t){F(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new C(this.A(E()),this.A(E()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cg=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class P{constructor(t,e,s,i,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(r===void 0)t=b(this,t,e,0),o=!S(t)||t!==this._$AH&&t!==g,o&&(this._$AH=t);else{const d=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=b(this,d[s+l],e,l),h===g&&(h=this._$AH[l]),o||(o=!S(h)||h!==this._$AH[l]),h===u?t=u:t!==u&&(t+=(h!=null?h:"")+r[l+1]),this._$AH[l]=h}o&&!i&&this.k(t)}k(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class pt extends P{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===u?void 0:t}}class $t extends P{constructor(){super(...arguments),this.type=4}k(t){t&&t!==u?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class vt extends P{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=(s=b(this,t,e,0))!==null&&s!==void 0?s:u)===g)return;const i=this._$AH,r=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==u&&(i===u||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class _t{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}(L=globalThis.litHtmlPolyfillSupport)===null||L===void 0||L.call(globalThis,x,C),((B=globalThis.litHtmlVersions)!==null&&B!==void 0?B:globalThis.litHtmlVersions=[]).push("2.0.0");/** | ||
*/var z;const m=globalThis.trustedTypes,J=m?m.createPolicy("lit-html",{createHTML:n=>n}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,K="?"+v,ht=`<${K}>`,g=document,S=(n="")=>g.createComment(n),w=n=>n===null||typeof n!="object"&&typeof n!="function",Z=Array.isArray,at=n=>{var t;return Z(n)||typeof((t=n)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,G=/>/g,_=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,Q=/'/g,X=/"/g,Y=/^(?:script|style|textarea)$/i,dt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),ct=dt(1),y=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),tt=new WeakMap,ut=(n,t,e)=>{var s,i;const r=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:t;let o=r._$litPart$;if(o===void 0){const d=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new U(t.insertBefore(S(),d),d,void 0,e??{})}return o._$AI(n),o},E=g.createTreeWalker(g,129,null,!1),pt=(n,t)=>{const e=n.length-1,s=[];let i,r=t===2?"<svg>":"",o=x;for(let l=0;l<e;l++){const h=n[l];let p,a,c=-1,$=0;for(;$<h.length&&(o.lastIndex=$,a=o.exec(h),a!==null);)$=o.lastIndex,o===x?a[1]==="!--"?o=F:a[1]!==void 0?o=G:a[2]!==void 0?(Y.test(a[2])&&(i=RegExp("</"+a[2],"g")),o=_):a[3]!==void 0&&(o=_):o===_?a[0]===">"?(o=i??x,c=-1):a[1]===void 0?c=-2:(c=o.lastIndex-a[2].length,p=a[1],o=a[3]===void 0?_:a[3]==='"'?X:Q):o===X||o===Q?o=_:o===F||o===G?o=x:(o=_,i=void 0);const H=o===_&&n[l+1].startsWith("/>")?" ":"";r+=o===x?h+ht:c>=0?(s.push(p),h.slice(0,c)+"$lit$"+h.slice(c)+v+H):h+v+(c===-2?(s.push(void 0),l):H)}const d=r+(n[e]||"<?>")+(t===2?"</svg>":"");return[J!==void 0?J.createHTML(d):d,s]};class C{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const d=t.length-1,l=this.parts,[h,p]=pt(t,e);if(this.el=C.createElement(h,s),E.currentNode=this.el.content,e===2){const a=this.el.content,c=a.firstChild;c.remove(),a.append(...c.childNodes)}for(;(i=E.nextNode())!==null&&l.length<d;){if(i.nodeType===1){if(i.hasAttributes()){const a=[];for(const c of i.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(v)){const $=p[o++];if(a.push(c),$!==void 0){const H=i.getAttribute($.toLowerCase()+"$lit$").split(v),N=/([.?@])?(.*)/.exec($);l.push({type:1,index:r,name:N[2],strings:H,ctor:N[1]==="."?vt:N[1]==="?"?ft:N[1]==="@"?At:T})}else l.push({type:6,index:r})}for(const c of a)i.removeAttribute(c)}if(Y.test(i.tagName)){const a=i.textContent.split(v),c=a.length-1;if(c>0){i.textContent=m?m.emptyScript:"";for(let $=0;$<c;$++)i.append(a[$],S()),E.nextNode(),l.push({type:2,index:++r});i.append(a[c],S())}}}else if(i.nodeType===8)if(i.data===K)l.push({type:2,index:r});else{let a=-1;for(;(a=i.data.indexOf(v,a+1))!==-1;)l.push({type:7,index:r}),a+=v.length-1}r++}}static createElement(t,e){const s=g.createElement("template");return s.innerHTML=t,s}}function b(n,t,e=n,s){var i,r,o,d;if(t===y)return t;let l=s!==void 0?(i=e._$Cl)===null||i===void 0?void 0:i[s]:e._$Cu;const h=w(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,s)),s!==void 0?((o=(d=e)._$Cl)!==null&&o!==void 0?o:d._$Cl=[])[s]=l:e._$Cu=l),l!==void 0&&(t=b(n,l._$AS(n,t.values),l,s)),t}class $t{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:s},parts:i}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:g).importNode(s,!0);E.currentNode=r;let o=E.nextNode(),d=0,l=0,h=i[0];for(;h!==void 0;){if(d===h.index){let p;h.type===2?p=new U(o,o.nextSibling,this,t):h.type===1?p=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(p=new mt(o,this,t)),this.v.push(p),h=i[++l]}d!==(h==null?void 0:h.index)&&(o=E.nextNode(),d++)}return r}m(t){let e=0;for(const s of this.v)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class U{constructor(t,e,s,i){var r;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cg=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),w(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==y&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.S(t):at(t)?this.M(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==u&&w(this._$AH)?this._$AA.nextSibling.data=t:this.S(g.createTextNode(t)),this._$AH=t}T(t){var e;const{values:s,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=C.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.m(s);else{const o=new $t(r,this),d=o.p(this.options);o.m(s),this.S(d),this._$AH=o}}_$AC(t){let e=tt.get(t.strings);return e===void 0&&tt.set(t.strings,e=new C(t)),e}M(t){Z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new U(this.A(S()),this.A(S()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cg=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class T{constructor(t,e,s,i,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(r===void 0)t=b(this,t,e,0),o=!w(t)||t!==this._$AH&&t!==y,o&&(this._$AH=t);else{const d=t;let l,h;for(t=r[0],l=0;l<r.length-1;l++)h=b(this,d[s+l],e,l),h===y&&(h=this._$AH[l]),o||(o=!w(h)||h!==this._$AH[l]),h===u?t=u:t!==u&&(t+=(h??"")+r[l+1]),this._$AH[l]=h}o&&!i&&this.k(t)}k(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class vt extends T{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===u?void 0:t}}const _t=m?m.emptyScript:"";class ft extends T{constructor(){super(...arguments),this.type=4}k(t){t&&t!==u?this.element.setAttribute(this.name,_t):this.element.removeAttribute(this.name)}}class At extends T{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=(s=b(this,t,e,0))!==null&&s!==void 0?s:u)===y)return;const i=this._$AH,r=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==u&&(i===u||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class mt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}const et=window.litHtmlPolyfillSupport;et==null||et(C,U),((z=globalThis.litHtmlVersions)!==null&&z!==void 0?z:globalThis.litHtmlVersions=[]).push("2.0.2");/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/var I,D,V;class T extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return g}}T.finalized=!0,T._$litElement$=!0,(I=globalThis.litElementHydrateSupport)===null||I===void 0||I.call(globalThis,{LitElement:T}),(D=globalThis.litElementPolyfillSupport)===null||D===void 0||D.call(globalThis,{LitElement:T}),((V=globalThis.litElementVersions)!==null&&V!==void 0?V:globalThis.litElementVersions=[]).push("3.0.0");class st extends T{render(){return at`<slot name="header"></slot><slot name="main"></slot><slot></slot>`}}st.styles=[nt`:host{display:block;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:var(--uui-border-radius,3px);background-color:var(--uui-interface-surface,#fefefe)}::slotted([slot=header]){border-bottom:1px solid var(--uui-interface-border,#c4c4c4);padding:var(--uui-size-4,12px) var(--uui-size-5,15px)}::slotted([slot=main]){padding:var(--uui-size-5,15px)}`],((n,t,e)=>{if(n.indexOf("-")>0===!1){console.error(`${n} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}customElements.get(n)?console.error(`${n} is already defined`):customElements.define(n,t,e)})("uui-box",st)}); | ||
*/var L,B;class P extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=ut(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Dt)===null||t===void 0||t.setConnected(!1)}render(){return y}}P.finalized=!0,P._$litElement$=!0,(L=globalThis.litElementHydrateSupport)===null||L===void 0||L.call(globalThis,{LitElement:P});const st=globalThis.litElementPolyfillSupport;st==null||st({LitElement:P}),((B=globalThis.litElementVersions)!==null&&B!==void 0?B:globalThis.litElementVersions=[]).push("3.0.2");class it extends P{render(){return ct`<slot name="header"></slot><slot name="main"></slot><slot></slot>`}}it.styles=[ot`:host{display:block;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:var(--uui-border-radius,3px);background-color:var(--uui-interface-surface,#fefefe)}::slotted([slot=header]){border-bottom:1px solid var(--uui-interface-border,#c4c4c4);padding:var(--uui-size-4,12px) var(--uui-size-5,15px)}::slotted([slot=main]){padding:var(--uui-size-5,15px)}`],((n,t,e)=>{if(n.indexOf("-")>0===!1){console.error(`${n} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}customElements.get(n)?console.error(`${n} is already defined`):customElements.define(n,t,e)})("uui-box",it)}); | ||
//# sourceMappingURL=uui-box.min.js.map |
{ | ||
"name": "@umbraco-ui/uui-box", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "description": "A box web component for grouping elements", | ||
"dependencies": { | ||
"@umbraco-ui/uui-base": "0.0.12" | ||
"@umbraco-ui/uui-base": "0.0.13" | ||
}, | ||
@@ -42,3 +42,3 @@ "scripts": { | ||
}, | ||
"gitHead": "d93ca46ec731a6b06aaa977af2fa167e49f770c1" | ||
"gitHead": "fa4be54d3e80b0a6e14070b2881799dc56df089f" | ||
} |
# uui-box | ||
 | ||
[](https://www.npmjs.com/package/@umbraco-ui/uui-box) | ||
@@ -5,0 +5,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
58943
+ Added@umbraco-ui/uui-base@0.0.13(transitive)
- Removed@umbraco-ui/uui-base@0.0.12(transitive)
Updated@umbraco-ui/uui-base@0.0.13