@nuralyui/grid 0.0.2 → 0.0.4

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 +3 -247
  2. package/package.json +1 -1
package/bundle.js CHANGED
@@ -1,256 +1,12 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t=window,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),e=new WeakMap;class o{constructor(t,s,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const i=this.t;if(s&&void 0===t){const s=void 0!==i&&1===i.length;s&&(t=e.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&e.set(i,t))}return t}toString(){return this.cssText}}const n=(t,...s)=>{const e=1===t.length?t[0]:s.reduce(((s,i,e)=>s+(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.")})(i)+t[e+1]),t[0]);return new o(e,t,i)},r=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(s)})(t):t
7
- /**
8
- * @license
9
- * Copyright 2017 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */;var h;const a=window,l=a.trustedTypes,d=l?l.emptyScript:"",u=a.reactiveElementPolyfillSupport,c={toAttribute(t,s){switch(s){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,s)=>s!==t&&(s==s||t==t),f={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:v},p="finalized";class m extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var s;this.finalize(),(null!==(s=this.h)&&void 0!==s?s:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((s,i)=>{const e=this._$Ep(i,s);void 0!==e&&(this._$Ev.set(e,i),t.push(e))})),t}static createProperty(t,s=f){if(s.state&&(s.attribute=!1),this.finalize(),this.elementProperties.set(t,s),!s.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,i,s);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,s,i){return{get(){return this[s]},set(e){const o=this[t];this[s]=e,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||f}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,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of s)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)s.unshift(r(t))}else void 0!==t&&s.push(r(t));return s}static _$Ep(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"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 s,i;(null!==(s=this._$ES)&&void 0!==s?s:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var s;null===(s=this._$ES)||void 0===s||s.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,s)=>{this.hasOwnProperty(s)&&(this._$Ei.set(s,this[s]),delete this[s])}))}createRenderRoot(){var i;const e=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,e)=>{s?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((s=>{const e=document.createElement("style"),o=t.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,i.appendChild(e)}))})(e,this.constructor.elementStyles),e}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 s;return null===(s=t.hostConnected)||void 0===s?void 0:s.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var s;return null===(s=t.hostDisconnected)||void 0===s?void 0:s.call(t)}))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s,i=f){var e;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==(null===(e=i.converter)||void 0===e?void 0:e.toAttribute)?i.converter:c).toAttribute(s,i.type);this._$El=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$El=null}}_$AK(t,s){var i;const e=this.constructor,o=e._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=e.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:c;this._$El=o,this[o]=n.fromAttribute(s,t.type),this._$El=null}}requestUpdate(t,s,i){let e=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],s)?(this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):e=!1),!this.isUpdatePending&&e&&(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,s)=>this[s]=t)),this._$Ei=void 0);let s=!1;const i=this._$AL;try{s=this.shouldUpdate(i),s?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var s;return null===(s=t.hostUpdate)||void 0===s?void 0:s.call(t)})),this.update(i)):this._$Ek()}catch(t){throw s=!1,this._$Ek(),t}s&&this._$AE(i)}willUpdate(t){}_$AE(t){var s;null===(s=this._$ES)||void 0===s||s.forEach((t=>{var s;return null===(s=t.hostUpdated)||void 0===s?void 0:s.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,s)=>this._$EO(s,this[s],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 g;m[p]=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:m}),(null!==(h=a.reactiveElementVersions)&&void 0!==h?h:a.reactiveElementVersions=[]).push("1.6.3");const w=window,y=w.trustedTypes,x=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,b="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,A="?"+$,j=`<${A}>`,S=document,C=()=>S.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,k="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,T=/>/g,N=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,M=/"/g,z=/^(?:script|style|textarea|title)$/i,P=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),I=new WeakMap,B=S.createTreeWalker(S,129,null,!1);function L(t,s){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==x?x.createHTML(s):s}class V{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const r=t.length-1,h=this.parts,[a,l]=((t,s)=>{const i=t.length-1,e=[];let o,n=2===s?"<svg>":"",r=O;for(let s=0;s<i;s++){const i=t[s];let h,a,l=-1,d=0;for(;d<i.length&&(r.lastIndex=d,a=r.exec(i),null!==a);)d=r.lastIndex,r===O?"!--"===a[1]?r=R:void 0!==a[1]?r=T:void 0!==a[2]?(z.test(a[2])&&(o=RegExp("</"+a[2],"g")),r=N):void 0!==a[3]&&(r=N):r===N?">"===a[0]?(r=null!=o?o:O,l=-1):void 0===a[1]?l=-2:(l=r.lastIndex-a[2].length,h=a[1],r=void 0===a[3]?N:'"'===a[3]?M:U):r===M||r===U?r=N:r===R||r===T?r=O:(r=N,o=void 0);const u=r===N&&t[s+1].startsWith("/>")?" ":"";n+=r===O?i+j:l>=0?(e.push(h),i.slice(0,l)+b+i.slice(l)+$+u):i+$+(-2===l?(e.push(void 0),s):u)}return[L(t,n+(t[i]||"<?>")+(2===s?"</svg>":"")),e]})(t,s);if(this.el=V.createElement(a,i),B.currentNode=this.el.content,2===s){const t=this.el.content,s=t.firstChild;s.remove(),t.append(...s.childNodes)}for(;null!==(e=B.nextNode())&&h.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const s of e.getAttributeNames())if(s.endsWith(b)||s.startsWith($)){const i=l[n++];if(t.push(s),void 0!==i){const t=e.getAttribute(i.toLowerCase()+b).split($),s=/([.?@])?(.*)/.exec(i);h.push({type:1,index:o,name:s[2],strings:t,ctor:"."===s[1]?F:"?"===s[1]?Z:"@"===s[1]?J:q})}else h.push({type:6,index:o})}for(const s of t)e.removeAttribute(s)}if(z.test(e.tagName)){const t=e.textContent.split($),s=t.length-1;if(s>0){e.textContent=y?y.emptyScript:"";for(let i=0;i<s;i++)e.append(t[i],C()),B.nextNode(),h.push({type:2,index:++o});e.append(t[s],C())}}}else if(8===e.nodeType)if(e.data===A)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=e.data.indexOf($,t+1));)h.push({type:7,index:o}),t+=$.length-1}o++}}static createElement(t,s){const i=S.createElement("template");return i.innerHTML=t,i}}function H(t,s,i=t,e){var o,n,r,h;if(s===P)return s;let a=void 0!==e?null===(o=i._$Co)||void 0===o?void 0:o[e]:i._$Cl;const l=E(s)?void 0:s._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,e)),void 0!==e?(null!==(r=(h=i)._$Co)&&void 0!==r?r:h._$Co=[])[e]=a:i._$Cl=a),void 0!==a&&(s=H(t,a._$AS(t,s.values),a,e)),s}class K{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var s;const{el:{content:i},parts:e}=this._$AD,o=(null!==(s=null==t?void 0:t.creationScope)&&void 0!==s?s:S).importNode(i,!0);B.currentNode=o;let n=B.nextNode(),r=0,h=0,a=e[0];for(;void 0!==a;){if(r===a.index){let s;2===a.type?s=new W(n,n.nextSibling,this,t):1===a.type?s=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(s=new Q(n,this,t)),this._$AV.push(s),a=e[++h]}r!==(null==a?void 0:a.index)&&(n=B.nextNode(),r++)}return B.currentNode=S,o}v(t){let s=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}}class W{constructor(t,s,i,e){var o;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,s;return null!==(s=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==s?s:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===(null==t?void 0:t.nodeType)&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=H(this,t,s),E(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==P&&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!==D&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var s;const{values:i,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(L(e.h,e.h[0]),this.options)),e);if((null===(s=this._$AH)||void 0===s?void 0:s._$AD)===o)this._$AH.v(i);else{const t=new K(o,this),s=t.u(this.options);t.v(i),this.$(s),this._$AH=t}}_$AC(t){let s=I.get(t.strings);return void 0===s&&I.set(t.strings,s=new V(t)),s}T(t){_(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const o of t)e===s.length?s.push(i=new W(this.k(C()),this.k(C()),this,this.options)):i=s[e],i._$AI(o),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var s;void 0===this._$AM&&(this._$Cp=t,null===(s=this._$AP)||void 0===s||s.call(this,t))}}class q{constructor(t,s,i,e,o){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,s=this,i,e){const o=this.strings;let n=!1;if(void 0===o)t=H(this,t,s,0),n=!E(t)||t!==this._$AH&&t!==P,n&&(this._$AH=t);else{const e=t;let r,h;for(t=o[0],r=0;r<o.length-1;r++)h=H(this,e[i+r],s,r),h===P&&(h=this._$AH[r]),n||(n=!E(h)||h!==this._$AH[r]),h===D?t=D:t!==D&&(t+=(null!=h?h:"")+o[r+1]),this._$AH[r]=h}n&&!e&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const G=y?y.emptyScript:"";class Z extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class J extends q{constructor(t,s,i,e,o){super(t,s,i,e,o),this.type=5}_$AI(t,s=this){var i;if((t=null!==(i=H(this,t,s,0))&&void 0!==i?i:D)===P)return;const e=this._$AH,o=t===D&&e!==D||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==D&&(e===D||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(s=this.options)||void 0===s?void 0:s.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const X=w.litHtmlPolyfillSupport;
18
- /**
19
- * @license
20
- * Copyright 2017 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */
23
- var Y;null==X||X(V,W),(null!==(g=w.litHtmlVersions)&&void 0!==g?g:w.litHtmlVersions=[]).push("2.8.0");const tt=window,st=tt.trustedTypes,it=st?st.createPolicy("lit-html",{createHTML:t=>t}):void 0,et="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,nt="?"+ot,rt=`<${nt}>`,ht=document,at=()=>ht.createComment(""),lt=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,ft=/>/g,pt=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,gt=/"/g,wt=/^(?:script|style|textarea|title)$/i,yt=(t=>(s,...i)=>({_$litType$:t,strings:s,values:i}))(1),xt=Symbol.for("lit-noChange"),bt=Symbol.for("lit-nothing"),$t=new WeakMap,At=ht.createTreeWalker(ht,129,null,!1);function jt(t,s){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==it?it.createHTML(s):s}const St=(t,s)=>{const i=t.length-1,e=[];let o,n=2===s?"<svg>":"",r=ct;for(let s=0;s<i;s++){const i=t[s];let h,a,l=-1,d=0;for(;d<i.length&&(r.lastIndex=d,a=r.exec(i),null!==a);)d=r.lastIndex,r===ct?"!--"===a[1]?r=vt:void 0!==a[1]?r=ft:void 0!==a[2]?(wt.test(a[2])&&(o=RegExp("</"+a[2],"g")),r=pt):void 0!==a[3]&&(r=pt):r===pt?">"===a[0]?(r=null!=o?o:ct,l=-1):void 0===a[1]?l=-2:(l=r.lastIndex-a[2].length,h=a[1],r=void 0===a[3]?pt:'"'===a[3]?gt:mt):r===gt||r===mt?r=pt:r===vt||r===ft?r=ct:(r=pt,o=void 0);const u=r===pt&&t[s+1].startsWith("/>")?" ":"";n+=r===ct?i+rt:l>=0?(e.push(h),i.slice(0,l)+et+i.slice(l)+ot+u):i+ot+(-2===l?(e.push(void 0),s):u)}return[jt(t,n+(t[i]||"<?>")+(2===s?"</svg>":"")),e]};class Ct{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const r=t.length-1,h=this.parts,[a,l]=St(t,s);if(this.el=Ct.createElement(a,i),At.currentNode=this.el.content,2===s){const t=this.el.content,s=t.firstChild;s.remove(),t.append(...s.childNodes)}for(;null!==(e=At.nextNode())&&h.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const s of e.getAttributeNames())if(s.endsWith(et)||s.startsWith(ot)){const i=l[n++];if(t.push(s),void 0!==i){const t=e.getAttribute(i.toLowerCase()+et).split(ot),s=/([.?@])?(.*)/.exec(i);h.push({type:1,index:o,name:s[2],strings:t,ctor:"."===s[1]?Rt:"?"===s[1]?Nt:"@"===s[1]?Ut:Ot})}else h.push({type:6,index:o})}for(const s of t)e.removeAttribute(s)}if(wt.test(e.tagName)){const t=e.textContent.split(ot),s=t.length-1;if(s>0){e.textContent=st?st.emptyScript:"";for(let i=0;i<s;i++)e.append(t[i],at()),At.nextNode(),h.push({type:2,index:++o});e.append(t[s],at())}}}else if(8===e.nodeType)if(e.data===nt)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=e.data.indexOf(ot,t+1));)h.push({type:7,index:o}),t+=ot.length-1}o++}}static createElement(t,s){const i=ht.createElement("template");return i.innerHTML=t,i}}function Et(t,s,i=t,e){var o,n,r,h;if(s===xt)return s;let a=void 0!==e?null===(o=i._$Co)||void 0===o?void 0:o[e]:i._$Cl;const l=lt(s)?void 0:s._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,e)),void 0!==e?(null!==(r=(h=i)._$Co)&&void 0!==r?r:h._$Co=[])[e]=a:i._$Cl=a),void 0!==a&&(s=Et(t,a._$AS(t,s.values),a,e)),s}class _t{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var s;const{el:{content:i},parts:e}=this._$AD,o=(null!==(s=null==t?void 0:t.creationScope)&&void 0!==s?s:ht).importNode(i,!0);At.currentNode=o;let n=At.nextNode(),r=0,h=0,a=e[0];for(;void 0!==a;){if(r===a.index){let s;2===a.type?s=new kt(n,n.nextSibling,this,t):1===a.type?s=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(s=new Mt(n,this,t)),this._$AV.push(s),a=e[++h]}r!==(null==a?void 0:a.index)&&(n=At.nextNode(),r++)}return At.currentNode=ht,o}v(t){let s=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}}class kt{constructor(t,s,i,e){var o;this.type=2,this._$AH=bt,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,s;return null!==(s=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==s?s:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===(null==t?void 0:t.nodeType)&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Et(this,t,s),lt(t)?t===bt||null==t||""===t?(this._$AH!==bt&&this._$AR(),this._$AH=bt):t!==this._$AH&&t!==xt&&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!==bt&&lt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ht.createTextNode(t)),this._$AH=t}g(t){var s;const{values:i,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=Ct.createElement(jt(e.h,e.h[0]),this.options)),e);if((null===(s=this._$AH)||void 0===s?void 0:s._$AD)===o)this._$AH.v(i);else{const t=new _t(o,this),s=t.u(this.options);t.v(i),this.$(s),this._$AH=t}}_$AC(t){let s=$t.get(t.strings);return void 0===s&&$t.set(t.strings,s=new Ct(t)),s}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const o of t)e===s.length?s.push(i=new kt(this.k(at()),this.k(at()),this,this.options)):i=s[e],i._$AI(o),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var s;void 0===this._$AM&&(this._$Cp=t,null===(s=this._$AP)||void 0===s||s.call(this,t))}}class Ot{constructor(t,s,i,e,o){this.type=1,this._$AH=bt,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=bt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,s=this,i,e){const o=this.strings;let n=!1;if(void 0===o)t=Et(this,t,s,0),n=!lt(t)||t!==this._$AH&&t!==xt,n&&(this._$AH=t);else{const e=t;let r,h;for(t=o[0],r=0;r<o.length-1;r++)h=Et(this,e[i+r],s,r),h===xt&&(h=this._$AH[r]),n||(n=!lt(h)||h!==this._$AH[r]),h===bt?t=bt:t!==bt&&(t+=(null!=h?h:"")+o[r+1]),this._$AH[r]=h}n&&!e&&this.j(t)}j(t){t===bt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Rt extends Ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===bt?void 0:t}}const Tt=st?st.emptyScript:"";class Nt extends Ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==bt?this.element.setAttribute(this.name,Tt):this.element.removeAttribute(this.name)}}class Ut extends Ot{constructor(t,s,i,e,o){super(t,s,i,e,o),this.type=5}_$AI(t,s=this){var i;if((t=null!==(i=Et(this,t,s,0))&&void 0!==i?i:bt)===xt)return;const e=this._$AH,o=t===bt&&e!==bt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==bt&&(e===bt||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(s=this.options)||void 0===s?void 0:s.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Mt{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Et(this,t)}}const zt=tt.litHtmlPolyfillSupport;null==zt||zt(Ct,kt),(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 Pt,Dt;class It extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,s;const i=super.createRenderRoot();return null!==(t=(s=this.renderOptions).renderBefore)&&void 0!==t||(s.renderBefore=i.firstChild),i}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,i)=>{var e,o;const n=null!==(e=null==i?void 0:i.renderBefore)&&void 0!==e?e:s;let r=n._$litPart$;if(void 0===r){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;n._$litPart$=r=new kt(s.insertBefore(at(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(s,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 xt}}It.finalized=!0,It._$litElement$=!0,null===(Pt=globalThis.litElementHydrateSupport)||void 0===Pt||Pt.call(globalThis,{LitElement:It});const Bt=globalThis.litElementPolyfillSupport;null==Bt||Bt({LitElement:It}),(null!==(Dt=globalThis.litElementVersions)&&void 0!==Dt?Dt:globalThis.litElementVersions=[]).push("3.3.3");
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */
35
- const Lt=t=>s=>"function"==typeof s?((t,s)=>(customElements.define(t,s),s))(t,s):((t,s)=>{const{kind:i,elements:e}=s;return{kind:i,elements:e,finisher(s){customElements.define(t,s)}}})(t,s)
36
- /**
37
- * @license
38
- * Copyright 2017 Google LLC
39
- * SPDX-License-Identifier: BSD-3-Clause
40
- */,Vt=(t,s)=>"method"===s.kind&&s.descriptor&&!("value"in s.descriptor)?{...s,finisher(i){i.createProperty(s.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:s.key,initializer(){"function"==typeof s.initializer&&(this[s.key]=s.initializer.call(this))},finisher(i){i.createProperty(s.key,t)}},Ht=(t,s,i)=>{s.constructor.createProperty(i,t)};function Kt(t){return(s,i)=>void 0!==i?Ht(t,s,i):Vt(t,s)
41
- /**
42
- * @license
43
- * Copyright 2017 Google LLC
44
- * SPDX-License-Identifier: BSD-3-Clause
45
- */}function Wt(t){return Kt({...t,state:!0})}
46
- /**
47
- * @license
48
- * Copyright 2021 Google LLC
49
- * SPDX-License-Identifier: BSD-3-Clause
50
- */var qt;null===(qt=window.HTMLSlotElement)||void 0===qt||qt.prototype.assignedElements;const Ft=n`
51
- :host {
52
- display: block;
53
- width: 100%;
54
- }
55
-
56
- .nr-row {
57
- display: flex;
58
- flex-flow: row wrap;
59
- min-width: 0;
60
-
61
- /* Theme-aware */
62
- color: var(--nuraly-color-text);
63
- }
64
-
65
- /* Wrap control */
66
- .nr-row[data-wrap="false"] {
67
- flex-wrap: nowrap;
68
- }
69
-
70
- /* Horizontal alignment (justify-content) */
71
- .nr-row[data-justify="start"] {
72
- justify-content: flex-start;
73
- }
74
-
75
- .nr-row[data-justify="end"] {
76
- justify-content: flex-end;
77
- }
78
-
79
- .nr-row[data-justify="center"] {
80
- justify-content: center;
81
- }
82
-
83
- .nr-row[data-justify="space-around"] {
84
- justify-content: space-around;
85
- }
86
-
87
- .nr-row[data-justify="space-between"] {
88
- justify-content: space-between;
89
- }
90
-
91
- .nr-row[data-justify="space-evenly"] {
92
- justify-content: space-evenly;
93
- }
94
-
95
- /* Vertical alignment (align-items) */
96
- .nr-row[data-align="top"] {
97
- align-items: flex-start;
98
- }
99
-
100
- .nr-row[data-align="middle"] {
101
- align-items: center;
102
- }
103
-
104
- .nr-row[data-align="bottom"] {
105
- align-items: flex-end;
106
- }
107
-
108
- .nr-row[data-align="stretch"] {
109
- align-items: stretch;
110
- }
111
- `
112
- /**
113
- * @license
114
- * Copyright 2023 Nuraly, Laabidi Aymen
115
- * SPDX-License-Identifier: MIT
116
- */,Gt=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,s,i;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(s=this.designSystemObserver)||void 0===s||s.disconnect(),null===(i=this.mediaQuery)||void 0===i||i.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,s;const i=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return i||((null===(s=window.matchMedia)||void 0===s?void 0:s.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const s=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===s?s:"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))}},Zt=()=>{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(Zt())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(!Zt())return!0;let s=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){s=!1;const e=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(i,e):console.error(e.message)}return s}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 s=this.requiredComponents.indexOf(t);s>-1&&this.requiredComponents.splice(s,1)}},Qt=t=>class extends t{dispatchCustomEvent(t,s){this.dispatchEvent(new CustomEvent(t,{detail:s,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,s){var i;const e=Object.assign(Object.assign({},s),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,e)}dispatchInputEvent(t,s){const i=Object.assign({target:s.target||this,value:s.value,originalEvent:s.originalEvent},s);this.dispatchCustomEvent(t,i)}dispatchFocusEvent(t,s){const i=Object.assign({target:s.target||this,value:s.value,focused:s.focused,cursorPosition:s.cursorPosition,selectedText:s.selectedText},s);this.dispatchCustomEvent(t,i)}dispatchValidationEvent(t,s){var i;const e=Object.assign({target:s.target||this,value:s.value,isValid:null!==(i=s.isValid)&&void 0!==i&&i,error:s.error},s);this.dispatchCustomEvent(t,e)}dispatchActionEvent(t,s){const i=Object.assign({target:s.target||this,action:s.action,previousValue:s.previousValue,newValue:s.newValue},s);this.dispatchCustomEvent(t,i)}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}},Xt=t=>Jt(Gt(Qt(t))),Yt="",ts={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600};
1
+ import{css as t,LitElement as a,html as s}from"lit";import{property as e,state as o,customElement as r}from"lit/decorators.js";import{NuralyUIBaseMixin as i}from"@nuralyui/common/mixins";const d=t`:host{display:block;width:100%}.nr-row{display:flex;flex-flow:row wrap;min-width:0;color:var(--nuraly-color-text)}.nr-row[data-wrap=false]{flex-wrap:nowrap}.nr-row[data-justify=start]{justify-content:flex-start}.nr-row[data-justify=end]{justify-content:flex-end}.nr-row[data-justify=center]{justify-content:center}.nr-row[data-justify=space-around]{justify-content:space-around}.nr-row[data-justify=space-between]{justify-content:space-between}.nr-row[data-justify=space-evenly]{justify-content:space-evenly}.nr-row[data-align=top]{align-items:flex-start}.nr-row[data-align=middle]{align-items:center}.nr-row[data-align=bottom]{align-items:flex-end}.nr-row[data-align=stretch]{align-items:stretch}`,h="",n={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600};
117
2
  /**
118
3
  * @license
119
4
  * Copyright 2023 Nuraly, Laabidi Aymen
120
5
  * SPDX-License-Identifier: MIT
121
6
  */
122
- var ss=function(t,s,i,e){for(var o,n=arguments.length,r=n<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e,h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(s,i,r):o(s,i))||r);return n>3&&r&&Object.defineProperty(s,i,r),r};let is=class extends(Xt(It)){constructor(){super(...arguments),this.align="",this.justify="",this.gutter=0,this.wrap=!0,this.currentBreakpoint="xs"}connectedCallback(){super.connectedCallback(),this.setupResponsiveGutter()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}setupResponsiveGutter(){"object"!=typeof this.gutter||Array.isArray(this.gutter)||(this.updateBreakpoint(),this.resizeObserver=new ResizeObserver((()=>{this.updateBreakpoint()})),this.resizeObserver.observe(document.documentElement))}updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t>=ts.xxl?"xxl":t>=ts.xl?"xl":t>=ts.lg?"lg":t>=ts.md?"md":t>=ts.sm?"sm":"xs"}getGutterValues(){if("number"==typeof this.gutter)return[this.gutter,this.gutter];if(Array.isArray(this.gutter))return this.gutter;const t=[this.currentBreakpoint,"xl","lg","md","sm","xs"];for(const s of t){const t=this.gutter[s];if(void 0!==t)return"number"==typeof t?[t,t]:t}return[0,0]}getRowStyle(){const[t,s]=this.getGutterValues(),i={};return t>0&&(i["margin-left"]=`-${t/2}px`,i["margin-right"]=`-${t/2}px`),s>0&&(i["row-gap"]=`${s}px`),i}getGutterContext(){const[t]=this.getGutterValues();return t}render(){const t=this.getRowStyle(),s=this.getGutterContext();return yt`
123
- <div
124
- class="nr-row"
125
- data-align="${this.align}"
126
- data-justify="${this.justify}"
127
- data-wrap="${this.wrap}"
128
- data-theme="${this.currentTheme}"
129
- style="${Object.entries(t).map((([t,s])=>`${t}: ${s}`)).join("; ")}"
130
- data-gutter="${s}"
131
- >
132
- <slot></slot>
133
- </div>
134
- `}};is.styles=Ft,ss([Kt({type:String})],is.prototype,"align",void 0),ss([Kt({type:String})],is.prototype,"justify",void 0),ss([Kt({type:Object})],is.prototype,"gutter",void 0),ss([Kt({type:Boolean})],is.prototype,"wrap",void 0),ss([Wt()],is.prototype,"currentBreakpoint",void 0),is=ss([Lt("nr-row")],is);const es=n`
135
- :host {
136
- display: block;
137
- box-sizing: border-box;
138
- flex-shrink: 0;
139
- }
140
-
141
- .nr-col {
142
- position: relative;
143
- box-sizing: border-box;
144
- width: 100%;
145
- height: 100%;
146
-
147
- /* Theme-aware */
148
- color: var(--nuraly-color-text);
149
- }
150
-
151
- /* Column spans (1-24) - Apply flex to :host */
152
- :host([data-span="1"]) { flex: 0 0 4.16666667%; max-width: 4.16666667%; }
153
- :host([data-span="2"]) { flex: 0 0 8.33333333%; max-width: 8.33333333%; }
154
- :host([data-span="3"]) { flex: 0 0 12.5%; max-width: 12.5%; }
155
- :host([data-span="4"]) { flex: 0 0 16.66666667%; max-width: 16.66666667%; }
156
- :host([data-span="5"]) { flex: 0 0 20.83333333%; max-width: 20.83333333%; }
157
- :host([data-span="6"]) { flex: 0 0 25%; max-width: 25%; }
158
- :host([data-span="7"]) { flex: 0 0 29.16666667%; max-width: 29.16666667%; }
159
- :host([data-span="8"]) { flex: 0 0 33.33333333%; max-width: 33.33333333%; }
160
- :host([data-span="9"]) { flex: 0 0 37.5%; max-width: 37.5%; }
161
- :host([data-span="10"]) { flex: 0 0 41.66666667%; max-width: 41.66666667%; }
162
- :host([data-span="11"]) { flex: 0 0 45.83333333%; max-width: 45.83333333%; }
163
- :host([data-span="12"]) { flex: 0 0 50%; max-width: 50%; }
164
- :host([data-span="13"]) { flex: 0 0 54.16666667%; max-width: 54.16666667%; }
165
- :host([data-span="14"]) { flex: 0 0 58.33333333%; max-width: 58.33333333%; }
166
- :host([data-span="15"]) { flex: 0 0 62.5%; max-width: 62.5%; }
167
- :host([data-span="16"]) { flex: 0 0 66.66666667%; max-width: 66.66666667%; }
168
- :host([data-span="17"]) { flex: 0 0 70.83333333%; max-width: 70.83333333%; }
169
- :host([data-span="18"]) { flex: 0 0 75%; max-width: 75%; }
170
- :host([data-span="19"]) { flex: 0 0 79.16666667%; max-width: 79.16666667%; }
171
- :host([data-span="20"]) { flex: 0 0 83.33333333%; max-width: 83.33333333%; }
172
- :host([data-span="21"]) { flex: 0 0 87.5%; max-width: 87.5%; }
173
- :host([data-span="22"]) { flex: 0 0 91.66666667%; max-width: 91.66666667%; }
174
- :host([data-span="23"]) { flex: 0 0 95.83333333%; max-width: 95.83333333%; }
175
- :host([data-span="24"]) { flex: 0 0 100%; max-width: 100%; }
176
-
177
- /* Column offsets (0-24) - Apply to :host */
178
- :host([data-offset="0"]) { margin-left: 0; }
179
- :host([data-offset="1"]) { margin-left: 4.16666667%; }
180
- :host([data-offset="2"]) { margin-left: 8.33333333%; }
181
- :host([data-offset="3"]) { margin-left: 12.5%; }
182
- :host([data-offset="4"]) { margin-left: 16.66666667%; }
183
- :host([data-offset="5"]) { margin-left: 20.83333333%; }
184
- :host([data-offset="6"]) { margin-left: 25%; }
185
- :host([data-offset="7"]) { margin-left: 29.16666667%; }
186
- :host([data-offset="8"]) { margin-left: 33.33333333%; }
187
- :host([data-offset="9"]) { margin-left: 37.5%; }
188
- :host([data-offset="10"]) { margin-left: 41.66666667%; }
189
- :host([data-offset="11"]) { margin-left: 45.83333333%; }
190
- :host([data-offset="12"]) { margin-left: 50%; }
191
- :host([data-offset="13"]) { margin-left: 54.16666667%; }
192
- :host([data-offset="14"]) { margin-left: 58.33333333%; }
193
- :host([data-offset="15"]) { margin-left: 62.5%; }
194
- :host([data-offset="16"]) { margin-left: 66.66666667%; }
195
- :host([data-offset="17"]) { margin-left: 70.83333333%; }
196
- :host([data-offset="18"]) { margin-left: 75%; }
197
- :host([data-offset="19"]) { margin-left: 79.16666667%; }
198
- :host([data-offset="20"]) { margin-left: 83.33333333%; }
199
- :host([data-offset="21"]) { margin-left: 87.5%; }
200
- :host([data-offset="22"]) { margin-left: 91.66666667%; }
201
- :host([data-offset="23"]) { margin-left: 95.83333333%; }
202
-
203
- /* Order - Apply to :host */
204
- :host([data-order="1"]) { order: 1; }
205
- :host([data-order="2"]) { order: 2; }
206
- :host([data-order="3"]) { order: 3; }
207
- :host([data-order="4"]) { order: 4; }
208
- :host([data-order="5"]) { order: 5; }
209
- :host([data-order="6"]) { order: 6; }
210
- :host([data-order="7"]) { order: 7; }
211
- :host([data-order="8"]) { order: 8; }
212
- :host([data-order="9"]) { order: 9; }
213
- :host([data-order="10"]) { order: 10; }
214
-
215
- /* Pull (right positioning) - Apply to :host */
216
- :host([data-pull="0"]) { right: auto; }
217
- :host([data-pull="1"]) { right: 4.16666667%; }
218
- :host([data-pull="2"]) { right: 8.33333333%; }
219
- :host([data-pull="3"]) { right: 12.5%; }
220
- :host([data-pull="4"]) { right: 16.66666667%; }
221
- :host([data-pull="5"]) { right: 20.83333333%; }
222
- :host([data-pull="6"]) { right: 25%; }
223
- :host([data-pull="7"]) { right: 29.16666667%; }
224
- :host([data-pull="8"]) { right: 33.33333333%; }
225
- :host([data-pull="9"]) { right: 37.5%; }
226
- :host([data-pull="10"]) { right: 41.66666667%; }
227
- :host([data-pull="11"]) { right: 45.83333333%; }
228
- :host([data-pull="12"]) { right: 50%; }
229
-
230
- /* Push (left positioning) - Apply to :host */
231
- :host([data-push="0"]) { left: auto; }
232
- :host([data-push="1"]) { left: 4.16666667%; }
233
- :host([data-push="2"]) { left: 8.33333333%; }
234
- :host([data-push="3"]) { left: 12.5%; }
235
- :host([data-push="4"]) { left: 16.66666667%; }
236
- :host([data-push="5"]) { left: 20.83333333%; }
237
- :host([data-push="6"]) { left: 25%; }
238
- :host([data-push="7"]) { left: 29.16666667%; }
239
- :host([data-push="8"]) { left: 33.33333333%; }
240
- :host([data-push="9"]) { left: 37.5%; }
241
- :host([data-push="10"]) { left: 41.66666667%; }
242
- :host([data-push="11"]) { left: 45.83333333%; }
243
- :host([data-push="12"]) { left: 50%; }
244
- `
7
+ var l=function(t,a,s,e){for(var o,r=arguments.length,i=r<3?a:null===e?e=Object.getOwnPropertyDescriptor(a,s):e,d=t.length-1;d>=0;d--)(o=t[d])&&(i=(r<3?o(i):r>3?o(a,s,i):o(a,s))||i);return r>3&&i&&Object.defineProperty(a,s,i),i};let f=class extends(i(a)){constructor(){super(...arguments),this.align="",this.justify="",this.gutter=0,this.wrap=!0,this.currentBreakpoint="xs"}connectedCallback(){super.connectedCallback(),this.setupResponsiveGutter()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}setupResponsiveGutter(){"object"!=typeof this.gutter||Array.isArray(this.gutter)||(this.updateBreakpoint(),this.resizeObserver=new ResizeObserver((()=>{this.updateBreakpoint()})),this.resizeObserver.observe(document.documentElement))}updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t>=n.xxl?"xxl":t>=n.xl?"xl":t>=n.lg?"lg":t>=n.md?"md":t>=n.sm?"sm":"xs"}getGutterValues(){if("number"==typeof this.gutter)return[this.gutter,this.gutter];if(Array.isArray(this.gutter))return this.gutter;const t=[this.currentBreakpoint,"xl","lg","md","sm","xs"];for(const a of t){const t=this.gutter[a];if(void 0!==t)return"number"==typeof t?[t,t]:t}return[0,0]}getRowStyle(){const[t,a]=this.getGutterValues(),s={};return t>0&&(s["margin-left"]=`-${t/2}px`,s["margin-right"]=`-${t/2}px`),a>0&&(s["row-gap"]=`${a}px`),s}getGutterContext(){const[t]=this.getGutterValues();return t}render(){const t=this.getRowStyle(),a=this.getGutterContext();return s`<div class="nr-row" data-align="${this.align}" data-justify="${this.justify}" data-wrap="${this.wrap}" data-theme="${this.currentTheme}" style="${Object.entries(t).map((([t,a])=>`${t}: ${a}`)).join("; ")}" data-gutter="${a}"><slot></slot></div>`}};f.styles=d,l([e({type:String})],f.prototype,"align",void 0),l([e({type:String})],f.prototype,"justify",void 0),l([e({type:Object})],f.prototype,"gutter",void 0),l([e({type:Boolean})],f.prototype,"wrap",void 0),l([o()],f.prototype,"currentBreakpoint",void 0),f=l([r("nr-row")],f);const p=t`:host{display:block;box-sizing:border-box;flex-shrink:0}.nr-col{position:relative;box-sizing:border-box;width:100%;height:100%;color:var(--nuraly-color-text)}:host([data-span="1"]){flex:0 0 4.16666667%;max-width:4.16666667%}:host([data-span="2"]){flex:0 0 8.33333333%;max-width:8.33333333%}:host([data-span="3"]){flex:0 0 12.5%;max-width:12.5%}:host([data-span="4"]){flex:0 0 16.66666667%;max-width:16.66666667%}:host([data-span="5"]){flex:0 0 20.83333333%;max-width:20.83333333%}:host([data-span="6"]){flex:0 0 25%;max-width:25%}:host([data-span="7"]){flex:0 0 29.16666667%;max-width:29.16666667%}:host([data-span="8"]){flex:0 0 33.33333333%;max-width:33.33333333%}:host([data-span="9"]){flex:0 0 37.5%;max-width:37.5%}:host([data-span="10"]){flex:0 0 41.66666667%;max-width:41.66666667%}:host([data-span="11"]){flex:0 0 45.83333333%;max-width:45.83333333%}:host([data-span="12"]){flex:0 0 50%;max-width:50%}:host([data-span="13"]){flex:0 0 54.16666667%;max-width:54.16666667%}:host([data-span="14"]){flex:0 0 58.33333333%;max-width:58.33333333%}:host([data-span="15"]){flex:0 0 62.5%;max-width:62.5%}:host([data-span="16"]){flex:0 0 66.66666667%;max-width:66.66666667%}:host([data-span="17"]){flex:0 0 70.83333333%;max-width:70.83333333%}:host([data-span="18"]){flex:0 0 75%;max-width:75%}:host([data-span="19"]){flex:0 0 79.16666667%;max-width:79.16666667%}:host([data-span="20"]){flex:0 0 83.33333333%;max-width:83.33333333%}:host([data-span="21"]){flex:0 0 87.5%;max-width:87.5%}:host([data-span="22"]){flex:0 0 91.66666667%;max-width:91.66666667%}:host([data-span="23"]){flex:0 0 95.83333333%;max-width:95.83333333%}:host([data-span="24"]){flex:0 0 100%;max-width:100%}:host([data-offset="0"]){margin-left:0}:host([data-offset="1"]){margin-left:4.16666667%}:host([data-offset="2"]){margin-left:8.33333333%}:host([data-offset="3"]){margin-left:12.5%}:host([data-offset="4"]){margin-left:16.66666667%}:host([data-offset="5"]){margin-left:20.83333333%}:host([data-offset="6"]){margin-left:25%}:host([data-offset="7"]){margin-left:29.16666667%}:host([data-offset="8"]){margin-left:33.33333333%}:host([data-offset="9"]){margin-left:37.5%}:host([data-offset="10"]){margin-left:41.66666667%}:host([data-offset="11"]){margin-left:45.83333333%}:host([data-offset="12"]){margin-left:50%}:host([data-offset="13"]){margin-left:54.16666667%}:host([data-offset="14"]){margin-left:58.33333333%}:host([data-offset="15"]){margin-left:62.5%}:host([data-offset="16"]){margin-left:66.66666667%}:host([data-offset="17"]){margin-left:70.83333333%}:host([data-offset="18"]){margin-left:75%}:host([data-offset="19"]){margin-left:79.16666667%}:host([data-offset="20"]){margin-left:83.33333333%}:host([data-offset="21"]){margin-left:87.5%}:host([data-offset="22"]){margin-left:91.66666667%}:host([data-offset="23"]){margin-left:95.83333333%}:host([data-order="1"]){order:1}:host([data-order="2"]){order:2}:host([data-order="3"]){order:3}:host([data-order="4"]){order:4}:host([data-order="5"]){order:5}:host([data-order="6"]){order:6}:host([data-order="7"]){order:7}:host([data-order="8"]){order:8}:host([data-order="9"]){order:9}:host([data-order="10"]){order:10}:host([data-pull="0"]){right:auto}:host([data-pull="1"]){right:4.16666667%}:host([data-pull="2"]){right:8.33333333%}:host([data-pull="3"]){right:12.5%}:host([data-pull="4"]){right:16.66666667%}:host([data-pull="5"]){right:20.83333333%}:host([data-pull="6"]){right:25%}:host([data-pull="7"]){right:29.16666667%}:host([data-pull="8"]){right:33.33333333%}:host([data-pull="9"]){right:37.5%}:host([data-pull="10"]){right:41.66666667%}:host([data-pull="11"]){right:45.83333333%}:host([data-pull="12"]){right:50%}:host([data-push="0"]){left:auto}:host([data-push="1"]){left:4.16666667%}:host([data-push="2"]){left:8.33333333%}:host([data-push="3"]){left:12.5%}:host([data-push="4"]){left:16.66666667%}:host([data-push="5"]){left:20.83333333%}:host([data-push="6"]){left:25%}:host([data-push="7"]){left:29.16666667%}:host([data-push="8"]){left:33.33333333%}:host([data-push="9"]){left:37.5%}:host([data-push="10"]){left:41.66666667%}:host([data-push="11"]){left:45.83333333%}:host([data-push="12"]){left:50%}`
245
8
  /**
246
9
  * @license
247
10
  * Copyright 2023 Nuraly, Laabidi Aymen
248
11
  * SPDX-License-Identifier: MIT
249
- */;var os=function(t,s,i,e){for(var o,n=arguments.length,r=n<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e,h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(s,i,r):o(s,i))||r);return n>3&&r&&Object.defineProperty(s,i,r),r};let ns=class extends(Xt(It)){constructor(){super(...arguments),this.offset=0,this.pull=0,this.push=0,this.flex="",this.currentBreakpoint="xs"}connectedCallback(){super.connectedCallback(),this.setupResponsive()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}setupResponsive(){this.updateBreakpoint(),this.resizeObserver=new ResizeObserver((()=>{this.updateBreakpoint()})),this.resizeObserver.observe(document.documentElement)}updateBreakpoint(){const t=window.innerWidth;let s;s=t>=ts.xxl?"xxl":t>=ts.xl?"xl":t>=ts.lg?"lg":t>=ts.md?"md":t>=ts.sm?"sm":"xs",s!==this.currentBreakpoint&&(this.currentBreakpoint=s)}getResponsiveConfig(){const t=[this.currentBreakpoint,"xl","lg","md","sm","xs"];for(const s of t){const t=this[s];if(void 0!==t)return"number"==typeof t?{span:t}:t}return{}}getColProperties(){var t,s,i,e,o;const n=this.getResponsiveConfig();return{span:null!==(t=n.span)&&void 0!==t?t:this.span,offset:null!==(s=n.offset)&&void 0!==s?s:this.offset,order:null!==(i=n.order)&&void 0!==i?i:this.order,pull:null!==(e=n.pull)&&void 0!==e?e:this.pull,push:null!==(o=n.push)&&void 0!==o?o:this.push}}getGutterFromParent(){const t=this.closest("nr-row");if(t){const s=t.getAttribute("data-gutter");return s?parseInt(s,10):0}return 0}getColStyle(){const t={},s=this.getGutterFromParent();return s>0&&(t["padding-left"]=s/2+"px",t["padding-right"]=s/2+"px"),this.flex&&("auto"===this.flex?t.flex="1 1 auto":"none"===this.flex?t.flex="0 0 auto":"number"==typeof this.flex?t.flex=`${this.flex} ${this.flex} auto`:t.flex=this.flex),t}render(){var t;const s=this.getColStyle(),i=this.getColProperties();return this.setAttribute("data-span",(null===(t=i.span)||void 0===t?void 0:t.toString())||""),this.setAttribute("data-offset",i.offset.toString()),void 0!==i.order?this.setAttribute("data-order",i.order.toString()):this.removeAttribute("data-order"),this.setAttribute("data-pull",i.pull.toString()),this.setAttribute("data-push",i.push.toString()),this.setAttribute("data-theme",this.currentTheme),yt`
250
- <div
251
- class="nr-col"
252
- style="${Object.entries(s).map((([t,s])=>`${t}: ${s}`)).join("; ")}"
253
- >
254
- <slot></slot>
255
- </div>
256
- `}};ns.styles=es,os([Kt({type:Number})],ns.prototype,"span",void 0),os([Kt({type:Number})],ns.prototype,"offset",void 0),os([Kt({type:Number})],ns.prototype,"order",void 0),os([Kt({type:Number})],ns.prototype,"pull",void 0),os([Kt({type:Number})],ns.prototype,"push",void 0),os([Kt({type:String})],ns.prototype,"flex",void 0),os([Kt({type:Object})],ns.prototype,"xs",void 0),os([Kt({type:Object})],ns.prototype,"sm",void 0),os([Kt({type:Object})],ns.prototype,"md",void 0),os([Kt({type:Object})],ns.prototype,"lg",void 0),os([Kt({type:Object})],ns.prototype,"xl",void 0),os([Kt({type:Object})],ns.prototype,"xxl",void 0),os([Wt()],ns.prototype,"currentBreakpoint",void 0),ns=os([Lt("nr-col")],ns);export{ts as BREAKPOINTS,Yt as EMPTY_STRING,ns as NrColElement,is as NrRowElement};
12
+ */;var u=function(t,a,s,e){for(var o,r=arguments.length,i=r<3?a:null===e?e=Object.getOwnPropertyDescriptor(a,s):e,d=t.length-1;d>=0;d--)(o=t[d])&&(i=(r<3?o(i):r>3?o(a,s,i):o(a,s))||i);return r>3&&i&&Object.defineProperty(a,s,i),i};let x=class extends(i(a)){constructor(){super(...arguments),this.offset=0,this.pull=0,this.push=0,this.flex="",this.currentBreakpoint="xs"}connectedCallback(){super.connectedCallback(),this.setupResponsive()}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}setupResponsive(){this.updateBreakpoint(),this.resizeObserver=new ResizeObserver((()=>{this.updateBreakpoint()})),this.resizeObserver.observe(document.documentElement)}updateBreakpoint(){const t=window.innerWidth;let a;a=t>=n.xxl?"xxl":t>=n.xl?"xl":t>=n.lg?"lg":t>=n.md?"md":t>=n.sm?"sm":"xs",a!==this.currentBreakpoint&&(this.currentBreakpoint=a)}getResponsiveConfig(){const t=[this.currentBreakpoint,"xl","lg","md","sm","xs"];for(const a of t){const t=this[a];if(void 0!==t)return"number"==typeof t?{span:t}:t}return{}}getColProperties(){var t,a,s,e,o;const r=this.getResponsiveConfig();return{span:null!==(t=r.span)&&void 0!==t?t:this.span,offset:null!==(a=r.offset)&&void 0!==a?a:this.offset,order:null!==(s=r.order)&&void 0!==s?s:this.order,pull:null!==(e=r.pull)&&void 0!==e?e:this.pull,push:null!==(o=r.push)&&void 0!==o?o:this.push}}getGutterFromParent(){const t=this.closest("nr-row");if(t){const a=t.getAttribute("data-gutter");return a?parseInt(a,10):0}return 0}getColStyle(){const t={},a=this.getGutterFromParent();return a>0&&(t["padding-left"]=a/2+"px",t["padding-right"]=a/2+"px"),this.flex&&("auto"===this.flex?t.flex="1 1 auto":"none"===this.flex?t.flex="0 0 auto":"number"==typeof this.flex?t.flex=`${this.flex} ${this.flex} auto`:t.flex=this.flex),t}render(){var t;const a=this.getColStyle(),e=this.getColProperties();return this.setAttribute("data-span",(null===(t=e.span)||void 0===t?void 0:t.toString())||""),this.setAttribute("data-offset",e.offset.toString()),void 0!==e.order?this.setAttribute("data-order",e.order.toString()):this.removeAttribute("data-order"),this.setAttribute("data-pull",e.pull.toString()),this.setAttribute("data-push",e.push.toString()),this.setAttribute("data-theme",this.currentTheme),s`<div class="nr-col" style="${Object.entries(a).map((([t,a])=>`${t}: ${a}`)).join("; ")}"><slot></slot></div>`}};x.styles=p,u([e({type:Number})],x.prototype,"span",void 0),u([e({type:Number})],x.prototype,"offset",void 0),u([e({type:Number})],x.prototype,"order",void 0),u([e({type:Number})],x.prototype,"pull",void 0),u([e({type:Number})],x.prototype,"push",void 0),u([e({type:String})],x.prototype,"flex",void 0),u([e({type:Object})],x.prototype,"xs",void 0),u([e({type:Object})],x.prototype,"sm",void 0),u([e({type:Object})],x.prototype,"md",void 0),u([e({type:Object})],x.prototype,"lg",void 0),u([e({type:Object})],x.prototype,"xl",void 0),u([e({type:Object})],x.prototype,"xxl",void 0),u([o()],x.prototype,"currentBreakpoint",void 0),x=u([r("nr-col")],x);export{n as BREAKPOINTS,h as EMPTY_STRING,x as NrColElement,f as NrRowElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuralyui/grid",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Grid layout system (Row and Col) components for NuralyUI library",
5
5
  "main": "index.js",
6
6
  "type": "module",