@nuralyui/layout 0.0.3 → 0.0.5

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.
Files changed (2) hide show
  1. package/bundle.js +14 -91
  2. package/package.json +1 -1
package/bundle.js CHANGED
@@ -1,60 +1,4 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=window,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),s=new WeakMap;class r{constructor(t,i,s){if(this._$cssResult$=!0,s!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&s.set(e,t))}return t}toString(){return this.cssText}}const o=(t,...i)=>{const s=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[s+1]),t[0]);return new r(s,t,e)},n=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(i)})(t):t
7
- /**
8
- * @license
9
- * Copyright 2017 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */;var l;const h=window,a=h.trustedTypes,d=a?a.emptyScript:"",u=h.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},v=(t,i)=>i!==t&&(i==i||t==t),g={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:v},p="finalized";class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Ep(e,i);void 0!==s&&(this._$Ev.set(s,e),t.push(s))})),t}static createProperty(t,i=g){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const r=this[t];this[i]=s,this.requestUpdate(t,r,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty(p))return!1;this[p]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var e;const s=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,s)=>{i?e.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((i=>{const s=document.createElement("style"),r=t.litNonce;void 0!==r&&s.setAttribute("nonce",r),s.textContent=i.cssText,e.appendChild(s)}))})(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$EO(t,i,e=g){var s;const r=this.constructor._$Ep(t,e);if(void 0!==r&&!0===e.reflect){const o=(void 0!==(null===(s=e.converter)||void 0===s?void 0:s.toAttribute)?e.converter:c).toAttribute(i,e.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,i){var e;const s=this.constructor,r=s._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=s.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(e=t.converter)||void 0===e?void 0:e.fromAttribute)?t.converter:c;this._$El=r,this[r]=o.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
12
- /**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- */
17
- var f;y[p]=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:y}),(null!==(l=h.reactiveElementVersions)&&void 0!==l?l:h.reactiveElementVersions=[]).push("1.6.3");const b=window,m=b.trustedTypes,w=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,k="?"+x,S=`<${k}>`,A=document,E=()=>A.createComment(""),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,j="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,T=/>/g,U=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,R=/"/g,N=/^(?:script|style|textarea|title)$/i,D=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),P=new WeakMap,B=A.createTreeWalker(A,129,null,!1);function W(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(i):i}class L{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let r=0,o=0;const n=t.length-1,l=this.parts,[h,a]=((t,i)=>{const e=t.length-1,s=[];let r,o=2===i?"<svg>":"",n=O;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,d=0;for(;d<e.length&&(n.lastIndex=d,h=n.exec(e),null!==h);)d=n.lastIndex,n===O?"!--"===h[1]?n=z:void 0!==h[1]?n=T:void 0!==h[2]?(N.test(h[2])&&(r=RegExp("</"+h[2],"g")),n=U):void 0!==h[3]&&(n=U):n===U?">"===h[0]?(n=null!=r?r:O,a=-1):void 0===h[1]?a=-2:(a=n.lastIndex-h[2].length,l=h[1],n=void 0===h[3]?U:'"'===h[3]?R:M):n===R||n===M?n=U:n===z||n===T?n=O:(n=U,r=void 0);const u=n===U&&t[i+1].startsWith("/>")?" ":"";o+=n===O?e+S:a>=0?(s.push(l),e.slice(0,a)+$+e.slice(a)+x+u):e+x+(-2===a?(s.push(void 0),i):u)}return[W(t,o+(t[e]||"<?>")+(2===i?"</svg>":"")),s]})(t,i);if(this.el=L.createElement(h,e),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=B.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith($)||i.startsWith(x)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+$).split(x),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?Z:"?"===i[1]?J:"@"===i[1]?G:V})}else l.push({type:6,index:r})}for(const i of t)s.removeAttribute(i)}if(N.test(s.tagName)){const t=s.textContent.split(x),i=t.length-1;if(i>0){s.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],E()),B.nextNode(),l.push({type:2,index:++r});s.append(t[i],E())}}}else if(8===s.nodeType)if(s.data===k)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(x,t+1));)l.push({type:7,index:r}),t+=x.length-1}r++}}static createElement(t,i){const e=A.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,s){var r,o,n,l;if(i===D)return i;let h=void 0!==s?null===(r=e._$Co)||void 0===r?void 0:r[s]:e._$Cl;const a=C(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(n=(l=e)._$Co)&&void 0!==n?n:l._$Co=[])[s]=h:e._$Cl=h),void 0!==h&&(i=K(t,h._$AS(t,i.values),h,s)),i}class q{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:s}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:A).importNode(e,!0);B.currentNode=r;let o=B.nextNode(),n=0,l=0,h=s[0];for(;void 0!==h;){if(n===h.index){let i;2===h.type?i=new H(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new Q(o,this,t)),this._$AV.push(i),h=s[++l]}n!==(null==h?void 0:h.index)&&(o=B.nextNode(),n++)}return B.currentNode=A,r}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,s){var r;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=K(this,t,i),C(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==D&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&C(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=L.createElement(W(s.h,s.h[0]),this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(e);else{const t=new q(r,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=P.get(t.strings);return void 0===i&&P.set(t.strings,i=new L(t)),i}T(t){_(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const r of t)s===i.length?i.push(e=new H(this.k(E()),this.k(E()),this,this.options)):e=i[s],e._$AI(r),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class V{constructor(t,i,e,s,r){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const r=this.strings;let o=!1;if(void 0===r)t=K(this,t,i,0),o=!C(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const s=t;let n,l;for(t=r[0],n=0;n<r.length-1;n++)l=K(this,s[e+n],i,n),l===D&&(l=this._$AH[n]),o||(o=!C(l)||l!==this._$AH[n]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+r[n+1]),this._$AH[n]=l}o&&!s&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}const F=m?m.emptyScript:"";class J extends V{constructor(){super(...arguments),this.type=4}j(t){t&&t!==I?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class G extends V{constructor(t,i,e,s,r){super(t,i,e,s,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=K(this,t,i,0))&&void 0!==e?e:I)===D)return;const s=this._$AH,r=t===I&&s!==I||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==I&&(s===I||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const X=b.litHtmlPolyfillSupport;
18
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */
23
- var Y;null==X||X(L,H),(null!==(f=b.litHtmlVersions)&&void 0!==f?f:b.litHtmlVersions=[]).push("2.8.0");const tt=window,it=tt.trustedTypes,et=it?it.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",rt=`lit$${(Math.random()+"").slice(9)}$`,ot="?"+rt,nt=`<${ot}>`,lt=document,ht=()=>lt.createComment(""),at=t=>null===t||"object"!=typeof t&&"function"!=typeof t,dt=Array.isArray,ut="[ \t\n\f\r]",ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vt=/-->/g,gt=/>/g,pt=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),yt=/'/g,ft=/"/g,bt=/^(?:script|style|textarea|title)$/i,mt=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),wt=Symbol.for("lit-noChange"),$t=Symbol.for("lit-nothing"),xt=new WeakMap,kt=lt.createTreeWalker(lt,129,null,!1);function St(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==et?et.createHTML(i):i}const At=(t,i)=>{const e=t.length-1,s=[];let r,o=2===i?"<svg>":"",n=ct;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,d=0;for(;d<e.length&&(n.lastIndex=d,h=n.exec(e),null!==h);)d=n.lastIndex,n===ct?"!--"===h[1]?n=vt:void 0!==h[1]?n=gt:void 0!==h[2]?(bt.test(h[2])&&(r=RegExp("</"+h[2],"g")),n=pt):void 0!==h[3]&&(n=pt):n===pt?">"===h[0]?(n=null!=r?r:ct,a=-1):void 0===h[1]?a=-2:(a=n.lastIndex-h[2].length,l=h[1],n=void 0===h[3]?pt:'"'===h[3]?ft:yt):n===ft||n===yt?n=pt:n===vt||n===gt?n=ct:(n=pt,r=void 0);const u=n===pt&&t[i+1].startsWith("/>")?" ":"";o+=n===ct?e+nt:a>=0?(s.push(l),e.slice(0,a)+st+e.slice(a)+rt+u):e+rt+(-2===a?(s.push(void 0),i):u)}return[St(t,o+(t[e]||"<?>")+(2===i?"</svg>":"")),s]};class Et{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let r=0,o=0;const n=t.length-1,l=this.parts,[h,a]=At(t,i);if(this.el=Et.createElement(h,e),kt.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=kt.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith(st)||i.startsWith(rt)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+st).split(rt),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?zt:"?"===i[1]?Ut:"@"===i[1]?Mt:Ot})}else l.push({type:6,index:r})}for(const i of t)s.removeAttribute(i)}if(bt.test(s.tagName)){const t=s.textContent.split(rt),i=t.length-1;if(i>0){s.textContent=it?it.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],ht()),kt.nextNode(),l.push({type:2,index:++r});s.append(t[i],ht())}}}else if(8===s.nodeType)if(s.data===ot)l.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(rt,t+1));)l.push({type:7,index:r}),t+=rt.length-1}r++}}static createElement(t,i){const e=lt.createElement("template");return e.innerHTML=t,e}}function Ct(t,i,e=t,s){var r,o,n,l;if(i===wt)return i;let h=void 0!==s?null===(r=e._$Co)||void 0===r?void 0:r[s]:e._$Cl;const a=at(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(n=(l=e)._$Co)&&void 0!==n?n:l._$Co=[])[s]=h:e._$Cl=h),void 0!==h&&(i=Ct(t,h._$AS(t,i.values),h,s)),i}class _t{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:s}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:lt).importNode(e,!0);kt.currentNode=r;let o=kt.nextNode(),n=0,l=0,h=s[0];for(;void 0!==h;){if(n===h.index){let i;2===h.type?i=new jt(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new Rt(o,this,t)),this._$AV.push(i),h=s[++l]}n!==(null==h?void 0:h.index)&&(o=kt.nextNode(),n++)}return kt.currentNode=lt,r}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class jt{constructor(t,i,e,s){var r;this.type=2,this._$AH=$t,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Ct(this,t,i),at(t)?t===$t||null==t||""===t?(this._$AH!==$t&&this._$AR(),this._$AH=$t):t!==this._$AH&&t!==wt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>dt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==$t&&at(this._$AH)?this._$AA.nextSibling.data=t:this.$(lt.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Et.createElement(St(s.h,s.h[0]),this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(e);else{const t=new _t(r,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=xt.get(t.strings);return void 0===i&&xt.set(t.strings,i=new Et(t)),i}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const r of t)s===i.length?i.push(e=new jt(this.k(ht()),this.k(ht()),this,this.options)):e=i[s],e._$AI(r),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Ot{constructor(t,i,e,s,r){this.type=1,this._$AH=$t,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=$t}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const r=this.strings;let o=!1;if(void 0===r)t=Ct(this,t,i,0),o=!at(t)||t!==this._$AH&&t!==wt,o&&(this._$AH=t);else{const s=t;let n,l;for(t=r[0],n=0;n<r.length-1;n++)l=Ct(this,s[e+n],i,n),l===wt&&(l=this._$AH[n]),o||(o=!at(l)||l!==this._$AH[n]),l===$t?t=$t:t!==$t&&(t+=(null!=l?l:"")+r[n+1]),this._$AH[n]=l}o&&!s&&this.j(t)}j(t){t===$t?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class zt extends Ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===$t?void 0:t}}const Tt=it?it.emptyScript:"";class Ut extends Ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==$t?this.element.setAttribute(this.name,Tt):this.element.removeAttribute(this.name)}}class Mt extends Ot{constructor(t,i,e,s,r){super(t,i,e,s,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=Ct(this,t,i,0))&&void 0!==e?e:$t)===wt)return;const s=this._$AH,r=t===$t&&s!==$t||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==$t&&(s===$t||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Rt{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Ct(this,t)}}const Nt=tt.litHtmlPolyfillSupport;null==Nt||Nt(Et,jt),(null!==(Y=tt.litHtmlVersions)&&void 0!==Y?Y:tt.litHtmlVersions=[]).push("2.8.0");
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- var Dt,It;class Pt extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,i,e)=>{var s,r;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==e?void 0:e.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new jt(i.insertBefore(ht(),t),t,void 0,null!=e?e:{})}return n._$AI(t),n})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return wt}}Pt.finalized=!0,Pt._$litElement$=!0,null===(Dt=globalThis.litElementHydrateSupport)||void 0===Dt||Dt.call(globalThis,{LitElement:Pt});const Bt=globalThis.litElementPolyfillSupport;null==Bt||Bt({LitElement:Pt}),(null!==(It=globalThis.litElementVersions)&&void 0!==It?It:globalThis.litElementVersions=[]).push("3.3.3");
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */
35
- const Wt=t=>i=>"function"==typeof i?((t,i)=>(customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:s}=i;return{kind:e,elements:s,finisher(i){customElements.define(t,i)}}})(t,i)
36
- /**
37
- * @license
38
- * Copyright 2017 Google LLC
39
- * SPDX-License-Identifier: BSD-3-Clause
40
- */,Lt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}},Kt=(t,i,e)=>{i.constructor.createProperty(e,t)};function qt(t){return(i,e)=>void 0!==e?Kt(t,i,e):Lt(t,i)
41
- /**
42
- * @license
43
- * Copyright 2017 Google LLC
44
- * SPDX-License-Identifier: BSD-3-Clause
45
- */}
46
- /**
47
- * @license
48
- * Copyright 2021 Google LLC
49
- * SPDX-License-Identifier: BSD-3-Clause
50
- */
51
- var Ht;const Vt=null!=(null===(Ht=window.HTMLSlotElement)||void 0===Ht?void 0:Ht.prototype.assignedElements)?(t,i)=>t.assignedElements(i):(t,i)=>t.assignedNodes(i).filter((t=>t.nodeType===Node.ELEMENT_NODE));
52
- /**
53
- * @license
54
- * Copyright 2023 Nuraly, Laabidi Aymen
55
- * SPDX-License-Identifier: MIT
56
- */
57
- const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupDesignSystemObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,i,e;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(i=this.designSystemObserver)||void 0===i||i.disconnect(),null===(e=this.mediaQuery)||void 0===e||e.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,i;const e=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return e||((null===(i=window.matchMedia)||void 0===i?void 0:i.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const i=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===i?i:"default"}setupThemeObserver(){this.themeObserver=new MutationObserver((()=>{this.requestUpdate()})),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupDesignSystemObserver(){this.designSystemObserver=new MutationObserver((()=>{this.requestUpdate()})),this.designSystemObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["design-system"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},Ft=()=>{var t;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(t=process.env)||void 0===t?void 0:t.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},Jt=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(Ft())for(const t of this.requiredComponents)if(!this.isComponentAvailable(t))throw new Error(`Required component "${t}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${t}';`)}validateDependenciesWithHandler(t){if(!Ft())return!0;let i=!0;for(const e of this.requiredComponents)if(!this.isComponentAvailable(e)){i=!1;const s=new Error(`Required component "${e}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(e,s):console.error(s.message)}return i}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter((t=>!this.isComponentAvailable(t)))}areDependenciesAvailable(){return this.requiredComponents.every((t=>this.isComponentAvailable(t)))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const i=this.requiredComponents.indexOf(t);i>-1&&this.requiredComponents.splice(i,1)}},Gt=t=>class extends t{dispatchCustomEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,i){var e;const s=Object.assign(Object.assign({},i),{timestamp:Date.now(),componentName:(null===(e=this.tagName)||void 0===e?void 0:e.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,s)}dispatchInputEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,originalEvent:i.originalEvent},i);this.dispatchCustomEvent(t,e)}dispatchFocusEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,focused:i.focused,cursorPosition:i.cursorPosition,selectedText:i.selectedText},i);this.dispatchCustomEvent(t,e)}dispatchValidationEvent(t,i){var e;const s=Object.assign({target:i.target||this,value:i.value,isValid:null!==(e=i.isValid)&&void 0!==e&&e,error:i.error},i);this.dispatchCustomEvent(t,s)}dispatchActionEvent(t,i){const e=Object.assign({target:i.target||this,action:i.action,previousValue:i.previousValue,newValue:i.newValue},i);this.dispatchCustomEvent(t,e)}isReadonlyKeyAllowed(t){if(t.ctrlKey||t.metaKey){return["KeyA","KeyC"].includes(t.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return"Enter"===t.key||" "===t.key}},Qt=t=>Jt(Zt(Gt(t))),Xt=o`
1
+ import{css as r,LitElement as t,html as e}from"lit";import{property as i,queryAssignedElements as o,customElement as a,state as n}from"lit/decorators.js";import{NuralyUIBaseMixin as l}from"@nuralyui/common/mixins";import{classMap as s}from"lit/directives/class-map.js";const d=r`
58
2
  :host {
59
3
  display: flex;
60
4
  flex: auto;
@@ -74,16 +18,11 @@ const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemT
74
18
  min-height: 0;
75
19
  width: 100%;
76
20
  }
77
- `;
78
- /**
79
- * @license
80
- * Copyright 2023 Nuraly, Laabidi Aymen
81
- * SPDX-License-Identifier: MIT
82
- */var Yt=function(t,i,e,s){for(var r,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(i,e,n):r(i,e))||n);return o>3&&n&&Object.defineProperty(i,e,n),n};let ti=class extends(Qt(Pt)){constructor(){super(...arguments),this.hasSider=!1}connectedCallback(){super.connectedCallback(),this.detectSider()}updated(t){super.updated(t),this.detectSider()}detectSider(){var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("slot");if(i){const t=i.assignedElements().some((t=>"nr-sider"===t.tagName.toLowerCase()));this.hasSider!==t&&(this.hasSider=t)}}handleSlotChange(){this.detectSider()}render(){return mt`
21
+ `;var u=function(r,t,e,i){for(var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i,l=r.length-1;l>=0;l--)(o=r[l])&&(n=(a<3?o(n):a>3?o(t,e,n):o(t,e))||n);return a>3&&n&&Object.defineProperty(t,e,n),n};let h=class extends(l(t)){constructor(){super(...arguments),this.hasSider=!1}connectedCallback(){super.connectedCallback(),this.detectSider()}updated(r){super.updated(r),this.detectSider()}detectSider(){var r;const t=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector("slot");if(t){const r=t.assignedElements().some((r=>"nr-sider"===r.tagName.toLowerCase()));this.hasSider!==r&&(this.hasSider=r)}}handleSlotChange(){this.detectSider()}render(){return e`
83
22
  <div class="nr-layout" part="layout">
84
23
  <slot @slotchange=${this.handleSlotChange}></slot>
85
24
  </div>
86
- `}};ti.styles=Xt,Yt([qt({type:Boolean,reflect:!0,attribute:"has-sider"})],ti.prototype,"hasSider",void 0),Yt([function(t){const{slot:i,selector:e}=null!=t?t:{};return(({finisher:t,descriptor:i})=>(e,s)=>{var r;if(void 0===s){const s=null!==(r=e.originalKey)&&void 0!==r?r:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const r=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(r,s)}})({descriptor:s=>({get(){var s;const r="slot"+(i?`[name=${i}]`:":not([name])"),o=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(r),n=null!=o?Vt(o,t):[];return e?n.filter((t=>t.matches(e))):n},enumerable:!0,configurable:!0})})}({selector:"nr-sider"})],ti.prototype,"connectedCallback",null),ti=Yt([Wt("nr-layout")],ti);const ii=o`
25
+ `}};h.styles=d,u([i({type:Boolean,reflect:!0,attribute:"has-sider"})],h.prototype,"hasSider",void 0),u([o({selector:"nr-sider"})],h.prototype,"connectedCallback",null),h=u([a("nr-layout")],h);const g=r`
87
26
  :host {
88
27
  display: block;
89
28
  }
@@ -99,7 +38,7 @@ const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemT
99
38
  border-bottom: 1px solid var(--nuraly-layout-header-border);
100
39
  transition: var(--nuraly-layout-transition);
101
40
  }
102
- `;var ei=function(t,i,e,s){for(var r,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(i,e,n):r(i,e))||n);return o>3&&n&&Object.defineProperty(i,e,n),n};let si=class extends(Qt(Pt)){constructor(){super(...arguments),this.height="64px"}render(){return mt`
41
+ `;var c=function(r,t,e,i){for(var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i,l=r.length-1;l>=0;l--)(o=r[l])&&(n=(a<3?o(n):a>3?o(t,e,n):o(t,e))||n);return a>3&&n&&Object.defineProperty(t,e,n),n};let y=class extends(l(t)){constructor(){super(...arguments),this.height="64px"}render(){return e`
103
42
  <header
104
43
  class="nr-header"
105
44
  part="header"
@@ -107,7 +46,7 @@ const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemT
107
46
  >
108
47
  <slot></slot>
109
48
  </header>
110
- `}};si.styles=ii,ei([qt({type:String})],si.prototype,"height",void 0),si=ei([Wt("nr-header")],si);const ri=o`
49
+ `}};y.styles=g,c([i({type:String})],y.prototype,"height",void 0),y=c([a("nr-header")],y);const p=r`
111
50
  :host {
112
51
  display: block;
113
52
  }
@@ -121,7 +60,7 @@ const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemT
121
60
  line-height: var(--nuraly-layout-line-height);
122
61
  transition: var(--nuraly-layout-transition);
123
62
  }
124
- `;var oi=function(t,i,e,s){for(var r,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(i,e,n):r(i,e))||n);return o>3&&n&&Object.defineProperty(i,e,n),n};let ni=class extends(Qt(Pt)){constructor(){super(...arguments),this.padding="24px 50px"}render(){return mt`
63
+ `;var v=function(r,t,e,i){for(var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i,l=r.length-1;l>=0;l--)(o=r[l])&&(n=(a<3?o(n):a>3?o(t,e,n):o(t,e))||n);return a>3&&n&&Object.defineProperty(t,e,n),n};let b=class extends(l(t)){constructor(){super(...arguments),this.padding="24px 50px"}render(){return e`
125
64
  <footer
126
65
  class="nr-footer"
127
66
  part="footer"
@@ -129,18 +68,7 @@ const Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemT
129
68
  >
130
69
  <slot></slot>
131
70
  </footer>
132
- `}};ni.styles=ri,oi([qt({type:String})],ni.prototype,"padding",void 0),ni=oi([Wt("nr-footer")],ni);
133
- /**
134
- * @license
135
- * Copyright 2017 Google LLC
136
- * SPDX-License-Identifier: BSD-3-Clause
137
- */
138
- const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}
139
- /**
140
- * @license
141
- * Copyright 2018 Google LLC
142
- * SPDX-License-Identifier: BSD-3-Clause
143
- */const ai=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends hi{constructor(t){var i;if(super(t),t.type!==li||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(t,[i]){var e,s;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(e=this.nt)||void 0===e?void 0:e.has(t))&&this.it.add(t);return this.render(i)}const r=t.element.classList;this.it.forEach((t=>{t in i||(r.remove(t),this.it.delete(t))}));for(const t in i){const e=!!i[t];e===this.it.has(t)||(null===(s=this.nt)||void 0===s?void 0:s.has(t))||(e?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return D}}),di=o`
71
+ `}};b.styles=p,v([i({type:String})],b.prototype,"padding",void 0),b=v([a("nr-footer")],b);const f=r`
144
72
  :host {
145
73
  display: block;
146
74
  position: relative;
@@ -241,7 +169,7 @@ const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e)
241
169
  min-width: 0 !important;
242
170
  flex: 0 0 0 !important;
243
171
  }
244
- `,ui={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600};var ci=function(t,i,e,s){for(var r,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(i,e,n):r(i,e))||n);return o>3&&n&&Object.defineProperty(i,e,n),n};let vi=class extends(Qt(Pt)){constructor(){super(...arguments),this.collapsed=!1,this.collapsedWidth=80,this.collapsible=!1,this.defaultCollapsed=!1,this.reverseArrow=!1,this.theme="dark",this.trigger="default",this.width=200,this.zeroWidthTriggerStyle="",this.belowBreakpoint=!1}connectedCallback(){super.connectedCallback(),this.defaultCollapsed&&!this.hasAttribute("collapsed")&&(this.collapsed=!0),this.breakpoint&&this.setupResizeObserver()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}updated(t){var i;super.updated(t),t.has("breakpoint")&&(null===(i=this.resizeObserver)||void 0===i||i.disconnect(),this.breakpoint&&this.setupResizeObserver())}setupResizeObserver(){if(!this.breakpoint)return;const t=ui[this.breakpoint];this.resizeObserver=new ResizeObserver((i=>{for(const e of i){const i=e.contentRect.width<t;i!==this.belowBreakpoint&&(this.belowBreakpoint=i,this.collapsible&&i!==this.collapsed&&(this.collapsed=i,this.dispatchCollapseEvent("responsive")),this.dispatchBreakpointEvent(i))}}));const i=this.closest("nr-layout")||document.body;this.resizeObserver.observe(i)}toggleCollapse(){this.collapsed=!this.collapsed,this.dispatchCollapseEvent("clickTrigger")}dispatchCollapseEvent(t){this.dispatchEvent(new CustomEvent("collapse",{detail:{collapsed:this.collapsed,type:t},bubbles:!0,composed:!0}))}dispatchBreakpointEvent(t){this.dispatchEvent(new CustomEvent("breakpoint",{detail:{broken:t},bubbles:!0,composed:!0}))}getCurrentWidth(){return this.collapsed?`${this.collapsedWidth}px`:"number"==typeof this.width?`${this.width}px`:this.width.toString()}renderTrigger(){if(null===this.trigger||!this.collapsible)return null;return this.querySelector('[slot="trigger"]')?mt`<slot name="trigger"></slot>`:0===this.collapsedWidth&&this.collapsed?mt`
172
+ `,x={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600};var m=function(r,t,e,i){for(var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i,l=r.length-1;l>=0;l--)(o=r[l])&&(n=(a<3?o(n):a>3?o(t,e,n):o(t,e))||n);return a>3&&n&&Object.defineProperty(t,e,n),n};let k=class extends(l(t)){constructor(){super(...arguments),this.collapsed=!1,this.collapsedWidth=80,this.collapsible=!1,this.defaultCollapsed=!1,this.reverseArrow=!1,this.theme="dark",this.trigger="default",this.width=200,this.zeroWidthTriggerStyle="",this.belowBreakpoint=!1}connectedCallback(){super.connectedCallback(),this.defaultCollapsed&&!this.hasAttribute("collapsed")&&(this.collapsed=!0),this.breakpoint&&this.setupResizeObserver()}disconnectedCallback(){var r;super.disconnectedCallback(),null===(r=this.resizeObserver)||void 0===r||r.disconnect()}updated(r){var t;super.updated(r),r.has("breakpoint")&&(null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.breakpoint&&this.setupResizeObserver())}setupResizeObserver(){if(!this.breakpoint)return;const r=x[this.breakpoint];this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.contentRect.width<r;t!==this.belowBreakpoint&&(this.belowBreakpoint=t,this.collapsible&&t!==this.collapsed&&(this.collapsed=t,this.dispatchCollapseEvent("responsive")),this.dispatchBreakpointEvent(t))}}));const t=this.closest("nr-layout")||document.body;this.resizeObserver.observe(t)}toggleCollapse(){this.collapsed=!this.collapsed,this.dispatchCollapseEvent("clickTrigger")}dispatchCollapseEvent(r){this.dispatchEvent(new CustomEvent("collapse",{detail:{collapsed:this.collapsed,type:r},bubbles:!0,composed:!0}))}dispatchBreakpointEvent(r){this.dispatchEvent(new CustomEvent("breakpoint",{detail:{broken:r},bubbles:!0,composed:!0}))}getCurrentWidth(){return this.collapsed?`${this.collapsedWidth}px`:"number"==typeof this.width?`${this.width}px`:this.width.toString()}renderTrigger(){if(null===this.trigger||!this.collapsible)return null;return this.querySelector('[slot="trigger"]')?e`<slot name="trigger"></slot>`:0===this.collapsedWidth&&this.collapsed?e`
245
173
  <div
246
174
  class="nr-sider-zero-width-trigger"
247
175
  part="trigger"
@@ -250,7 +178,7 @@ const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e)
250
178
  >
251
179
  <span class="trigger-icon">${this.reverseArrow?"◀":"▶"}</span>
252
180
  </div>
253
- `:mt`
181
+ `:e`
254
182
  <div
255
183
  class="nr-sider-trigger"
256
184
  part="trigger"
@@ -260,9 +188,9 @@ const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e)
260
188
  ${this.collapsed?this.reverseArrow?"◀":"▶":this.reverseArrow?"▶":"◀"}
261
189
  </span>
262
190
  </div>
263
- `}render(){const t={"nr-sider":!0,"nr-sider-collapsed":this.collapsed,"nr-sider-has-trigger":this.collapsible&&null!==this.trigger,"nr-sider-below-breakpoint":this.belowBreakpoint,"nr-sider-zero-width":this.collapsed&&0===this.collapsedWidth};return mt`
191
+ `}render(){const r={"nr-sider":!0,"nr-sider-collapsed":this.collapsed,"nr-sider-has-trigger":this.collapsible&&null!==this.trigger,"nr-sider-below-breakpoint":this.belowBreakpoint,"nr-sider-zero-width":this.collapsed&&0===this.collapsedWidth};return e`
264
192
  <aside
265
- class=${ai(t)}
193
+ class=${s(r)}
266
194
  part="sider"
267
195
  style="width: ${this.getCurrentWidth()}; flex: 0 0 ${this.getCurrentWidth()};"
268
196
  >
@@ -271,12 +199,7 @@ const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e)
271
199
  </div>
272
200
  ${this.renderTrigger()}
273
201
  </aside>
274
- `}};vi.styles=di,ci([qt({type:String})],vi.prototype,"breakpoint",void 0),ci([qt({type:Boolean,reflect:!0})],vi.prototype,"collapsed",void 0),ci([qt({type:Number,attribute:"collapsed-width"})],vi.prototype,"collapsedWidth",void 0),ci([qt({type:Boolean})],vi.prototype,"collapsible",void 0),ci([qt({type:Boolean,attribute:"default-collapsed"})],vi.prototype,"defaultCollapsed",void 0),ci([qt({type:Boolean,attribute:"reverse-arrow"})],vi.prototype,"reverseArrow",void 0),ci([qt({type:String,reflect:!0})],vi.prototype,"theme",void 0),ci([qt({type:String})],vi.prototype,"trigger",void 0),ci([qt({type:String})],vi.prototype,"width",void 0),ci([qt({type:String,attribute:"zero-width-trigger-style"})],vi.prototype,"zeroWidthTriggerStyle",void 0),ci([function(t){return qt({...t,state:!0})}
275
- /**
276
- * @license
277
- * Copyright 2017 Google LLC
278
- * SPDX-License-Identifier: BSD-3-Clause
279
- */()],vi.prototype,"belowBreakpoint",void 0),vi=ci([Wt("nr-sider")],vi);const gi=o`
202
+ `}};k.styles=f,m([i({type:String})],k.prototype,"breakpoint",void 0),m([i({type:Boolean,reflect:!0})],k.prototype,"collapsed",void 0),m([i({type:Number,attribute:"collapsed-width"})],k.prototype,"collapsedWidth",void 0),m([i({type:Boolean})],k.prototype,"collapsible",void 0),m([i({type:Boolean,attribute:"default-collapsed"})],k.prototype,"defaultCollapsed",void 0),m([i({type:Boolean,attribute:"reverse-arrow"})],k.prototype,"reverseArrow",void 0),m([i({type:String,reflect:!0})],k.prototype,"theme",void 0),m([i({type:String})],k.prototype,"trigger",void 0),m([i({type:String})],k.prototype,"width",void 0),m([i({type:String,attribute:"zero-width-trigger-style"})],k.prototype,"zeroWidthTriggerStyle",void 0),m([n()],k.prototype,"belowBreakpoint",void 0),k=m([a("nr-sider")],k);const w=r`
280
203
  :host {
281
204
  display: block;
282
205
  flex: auto;
@@ -290,8 +213,8 @@ const li=1;class hi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e)
290
213
  color: var(--nuraly-layout-content-text);
291
214
  transition: var(--nuraly-layout-transition);
292
215
  }
293
- `;var pi=function(t,i,e,s){for(var r,o=arguments.length,n=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(i,e,n):r(i,e))||n);return o>3&&n&&Object.defineProperty(i,e,n),n};let yi=class extends(Qt(Pt)){render(){return mt`
216
+ `;var z=function(r,t,e,i){for(var o,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i,l=r.length-1;l>=0;l--)(o=r[l])&&(n=(a<3?o(n):a>3?o(t,e,n):o(t,e))||n);return a>3&&n&&Object.defineProperty(t,e,n),n};let j=class extends(l(t)){render(){return e`
294
217
  <main class="nr-content" part="content">
295
218
  <slot></slot>
296
219
  </main>
297
- `}};yi.styles=gi,yi=pi([Wt("nr-content")],yi);export{ui as BREAKPOINT_VALUES,yi as NrContentElement,ni as NrFooterElement,si as NrHeaderElement,ti as NrLayoutElement,vi as NrSiderElement};
220
+ `}};j.styles=w,j=z([a("nr-content")],j);export{x as BREAKPOINT_VALUES,j as NrContentElement,b as NrFooterElement,y as NrHeaderElement,h as NrLayoutElement,k as NrSiderElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuralyui/layout",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Layout components for NuralyUI - includes Layout, Header, Footer, Sider, and Content",
5
5
  "type": "module",
6
6
  "main": "index.js",