@elenajs/components 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avatar.d.ts +7 -0
- package/dist/avatar.js +4 -0
- package/dist/avatar.js.map +1 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/dist/button.js +1 -1
- package/dist/button.js.map +1 -1
- package/dist/custom-elements.d.ts +12 -0
- package/dist/custom-elements.json +62 -0
- package/dist/elena-BN2AjG4V.js +2 -0
- package/dist/elena-BN2AjG4V.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/stack.js +1 -1
- package/package.json +3 -3
- package/dist/elena-BQHDXnxD.js +0 -2
- package/dist/elena-BQHDXnxD.js.map +0 -1
package/dist/avatar.d.ts
ADDED
package/dist/avatar.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{l as e,e as a,o as t}from"./elena-BN2AjG4V.js";const n={props:["icon","state"],tagName:"elena-avatar",element:".elena-avatar"};class s extends(e(HTMLElement,n)){constructor(){super(),this.state="initial"}renderImage(){return a`<img class="elena-image" src="..">`}renderFallback(){return a`
|
|
2
|
+
${this.icon?a`<elena-icon name="${this.icon}"></elena-icon>`:a`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27"></svg>`}
|
|
3
|
+
`}render(){return a`<div class="elena-avatar">${"initial"!==this.state?this.renderImage():t} ${"loaded"!==this.state?this.renderFallback():t}</div>`}}s.define();export{s as default};
|
|
4
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../src/avatar/avatar.js"],"sourcesContent":["import { Elena, html, nothing } from \"@elenajs/core\";\n\nconst options = {\n props: [\"icon\", \"state\"],\n tagName: \"elena-avatar\",\n element: \".elena-avatar\",\n};\n\nexport default class Avatar extends Elena(HTMLElement, options) {\n constructor() {\n super();\n this.state = \"initial\";\n }\n\n renderImage() {\n return html`<img class=\"elena-image\" src=\"..\" />`;\n }\n\n renderFallback() {\n return html`\n ${this.icon\n ? html`<elena-icon name=\"${this.icon}\"></elena-icon>`\n : html`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 27 27\"></svg>`}\n `;\n }\n\n render() {\n return html`\n <div class=\"elena-avatar\">\n ${this.state !== \"initial\" ? this.renderImage() : nothing}\n ${this.state !== \"loaded\" ? this.renderFallback() : nothing}\n </div>\n `;\n }\n}\n\n/**\n * Register the web component\n */\nAvatar.define();\n"],"names":["options","props","tagName","element","Avatar","Elena","HTMLElement","constructor","super","this","state","renderImage","html","renderFallback","icon","render","nothing","define"],"mappings":"sDAEA,MAAMA,EAAU,CACdC,MAAO,CAAC,OAAQ,SAChBC,QAAS,eACTC,QAAS,iBAGI,MAAMC,UAAeC,EAAMC,YAAaN,IACrD,WAAAO,GACEC,QACAC,KAAKC,MAAQ,SACf,CAEA,WAAAC,GACE,OAAOC,CAAI,oCACb,CAEA,cAAAC,GACE,OAAOD,CAAI;QACPH,KAAKK,KACHF,CAAI,qBAAqBH,KAAKK,sBAC9BF,CAAI;KAEZ,CAEA,MAAAG,GACE,OAAOH,CAAI,6BAEU,YAAfH,KAAKC,MAAsBD,KAAKE,cAAgBK,KACjC,WAAfP,KAAKC,MAAqBD,KAAKI,iBAAmBG,SAG1D,EAMFZ,EAAOa"}
|
package/dist/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,t,n){if(t="boolean"===e&&"boolean"!=typeof t?null!==t:t,!n)return t;if("toAttribute"===n)switch(e){case"object":case"array":return null===t?null:JSON.stringify(t);case"boolean":return t?"":null;case"number":return null===t?null:t;default:return""===t?null:t}else switch(e){case"object":case"array":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn("░█ [ELENA]: Invalid JSON for prop, received: "+t),null}case"boolean":return t;case"number":return null!==t?+t:t;default:return t}}function t(e,t,n){e?null===n?e.removeAttribute(t):e.setAttribute(t,n):console.warn("░█ [ELENA]: Cannot sync attributes to a null element.")}let n=class extends Event{constructor(e,t){super(e,{bubbles:!0,composed:!0,...t})}};function s(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,e=>t[e])}function r(e,...t){const n=e.reduce((e,n,r)=>e+n+s(String(
|
|
1
|
+
function e(e,t,n){if(t="boolean"===e&&"boolean"!=typeof t?null!==t:t,!n)return t;if("toAttribute"===n)switch(e){case"object":case"array":return null===t?null:JSON.stringify(t);case"boolean":return t?"":null;case"number":return null===t?null:t;default:return""===t?null:t}else switch(e){case"object":case"array":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn("░█ [ELENA]: Invalid JSON for prop, received: "+t),null}case"boolean":return t;case"number":return null!==t?+t:t;default:return t}}function t(e,t,n){e?null===n?e.removeAttribute(t):e.setAttribute(t,n):console.warn("░█ [ELENA]: Cannot sync attributes to a null element.")}let n=class extends Event{constructor(e,t){super(e,{bubbles:!0,composed:!0,...t})}};function s(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,e=>t[e])}function r(e,...t){const n=e.reduce((e,n,r)=>{const i=t[r];return e+n+(i&&i.__raw?String(i):s(String(i??"")))},"");return{__raw:!0,strings:e,values:t,toString:()=>n}}const i=new WeakMap;function l(e,t,n){(function(e,t,n){if(e._tplStrings!==t||!e._tplParts)return!1;let r=!1;for(let t=0;t<n.length;t++){const i=n[t],l=i&&i.__raw,a=l?String(i):s(String(i??""));if(a!==e._tplValues[t])if(e._tplValues[t]=a,l)r=!0;else{const n=e._tplParts[t];n?n.textContent=String(i??""):r=!0}}return!r})(e,t,n)||function(e,t,n){const r=n.map(e=>e&&e.__raw?String(e):s(String(e??"")));let l=i.get(t);l||(l=Array.from(t,e=>e.replace(/\n\s*/g," ")),i.set(t,l));const a=l.reduce((e,t,n)=>e+t+(r[n]??""),"").replace(/>\s+</g,"><").replace(/>\s+/g,">").replace(/\s+</g,"<").trim();(function(e,t){e?e.replaceChildren(e.ownerDocument.createRange().createContextualFragment(t)):console.warn("░█ [ELENA]: Cannot render to a null element.")})(e,a),e._tplStrings=t,e._tplValues=r,e._tplParts=function(e,t){const n=new Array(t.length),s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r,i=0;for(;(r=s.nextNode())&&i<t.length;)r.textContent===t[i]&&(n[i]=r,i++);return n}(e,r)}(e,t,n)}function a(s,r){const i=r&&r.element?/^[a-z][a-z0-9-]*$/i.test(r.element)?e=>e.getElementsByClassName(r.element)[0]:e=>e.querySelector(r.element):e=>e.firstElementChild;class a extends s{element=null;attributeChangedCallback(t,n,s){(function(t,n,s,r){if(s!==r){const s=e(typeof t[n],r,"toProp");t[n]=s}})(this,t,n,s),this._hydrated&&n!==s&&!this._isRendering&&(this._isRendering=!0,this._applyRender(),this._isRendering=!1)}static get observedAttributes(){return r&&r.props?r.props:[]}render(){}_applyRender(){const e=this.render();e&&e.strings&&l(this,e.strings,e.values)}connectedCallback(){if(this._applyRender(),this.element||(this.element=i(this),this.element||(r&&r.element&&console.warn("░█ [ELENA]: No element found, using firstElementChild as fallback."),this.element=this.firstElementChild)),this._props){const n=!(!r||!r.element);for(const[s,r]of this._props){const i=e(typeof r,r,"toAttribute");t(this,s,i),n&&t(this.element,s,i)}}!this._events&&r&&r.events&&(this._events=!0,r.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add("elena-hydrated"))}disconnectedCallback(){this._events&&(this._events=!1,r.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){r.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new n(e.type,{cancelable:!0})))}}return r&&r.props?.length&&function(n,s,r=!0){for(const i of s)Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(i):void 0},set(n){if(this._props||(this._props=new Map),n===this._props.get(i))return;if(this._props.set(i,n),!this.isConnected)return;const s=e(typeof n,n,"toAttribute");t(this,i,s),r&&this.element&&t(this.element,i,s)}})}(a.prototype,r.props,!(!r||!r.element)),r&&r.tagName&&(a._tagName=r.tagName),a.define=function(){this._tagName&&function(e,t){"undefined"!=typeof window&&"customElements"in window&&(window.customElements.get(e)||window.customElements.define(e,t))}(this._tagName,this)},a}const o={tagName:"elena-button",props:["variant","size","disabled","name","value","type"],events:["click","focus","blur"],element:".elena-button"};class c extends(a(HTMLElement,o)){constructor(){super(),this.variant="default",this.size="md",this.disabled=!1,this.name="",this.value="",this.type="button"}render(){return r`<button class="elena-button">${this.textContent.trim()}</button>`}}c.define();const u={tagName:"elena-input",props:["size","disabled","name","value","type","label","error","placeholder"],events:["click","focus","blur"],element:".elena-input"};class p extends(a(HTMLElement,u)){constructor(){super(),this.size="md",this.disabled=!1,this.name="",this.label="",this.value="",this.placeholder="",this.type="text",this.error=""}render(){return r`<label for="input">${this.label}</label><div class="elena-input-container"><span class="elena-input-start"></span> <input id="input" class="elena-input"> <span class="elena-input-end"></span></div>${this.error?r`<div class="elena-error" role="alert">${this.error}</div>`:""}`}}p.define();const d={tagName:"elena-stack",props:["direction"]};class h extends(a(HTMLElement,d)){constructor(){super(),this.direction="column"}}h.define();export{c as Button,p as Input,h as Stack};
|
|
2
2
|
//# sourceMappingURL=bundle.js.map
|
package/dist/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sources":["../../core/dist/props.js","../../core/dist/events.js","../../core/dist/utils.js","../../core/dist/render.js","../../core/dist/elena.js","../src/button/button.js","../src/input/input.js","../src/stack/stack.js"],"sourcesContent":["function e(e,t,r){if(t=\"boolean\"===e&&\"boolean\"!=typeof t?null!==t:t,!r)return t;if(\"toAttribute\"===r)switch(e){case\"object\":case\"array\":return null===t?null:JSON.stringify(t);case\"boolean\":return t?\"\":null;case\"number\":return null===t?null:t;default:return\"\"===t?null:t}else switch(e){case\"object\":case\"array\":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn(\"░█ [ELENA]: Invalid JSON for prop, received: \"+t),null}case\"boolean\":return t;case\"number\":return null!==t?+t:t;default:return t}}function t(e,t,r){e?null===r?e.removeAttribute(t):e.setAttribute(t,r):console.warn(\"░█ [ELENA]: Cannot sync attributes to a null element.\")}function r(r,n,o=!0){for(const s of n)Object.defineProperty(r,s,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(s):void 0},set(r){if(this._props||(this._props=new Map),r===this._props.get(s))return;if(this._props.set(s,r),!this.isConnected)return;const n=e(typeof r,r,\"toAttribute\");t(this,s,n),o&&this.element&&t(this.element,s,n)}})}function n(t,r,n,o){if(n!==o){const n=e(typeof t[r],o,\"toProp\");t[r]=n}}export{e as getPropValue,n as getProps,r as setProps,t as syncAttribute};\n//# sourceMappingURL=props.js.map\n","class e extends Event{constructor(e,s){super(e,{bubbles:!0,composed:!0,...s})}}export{e as ElenaEvent};\n//# sourceMappingURL=events.js.map\n","function n(n,t){\"undefined\"!=typeof window&&\"customElements\"in window&&(window.customElements.get(n)||window.customElements.define(n,t))}function t(n){const t={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"};return String(n).replace(/[&<>\"']/g,n=>t[n])}function e(n,...e){const o=n.reduce((n,o,i)=>n+o+t(String(e[i]??\"\")),\"\");return{__raw:!0,toString:()=>o}}export{n as defineElement,t as escapeHtml,e as html};\n//# sourceMappingURL=utils.js.map\n","import{escapeHtml as t}from\"./utils.js\";const e=new WeakMap;function n(n,l,o){(function(e,n,r){if(e._tplStrings!==n||!e._tplParts)return!1;let l=!1;for(let n=0;n<r.length;n++){const o=r[n],a=o&&o.__raw,c=a?String(o):t(String(o??\"\"));if(c!==e._tplValues[n])if(e._tplValues[n]=c,a)l=!0;else{const t=e._tplParts[n];t?t.textContent=String(o??\"\"):l=!0}}return!l})(n,l,o)||function(n,l,o){const a=o.map(e=>e&&e.__raw?String(e):t(String(e??\"\")));let c=e.get(l);c||(c=Array.from(l,t=>t.replace(/\\n\\s*/g,\" \")),e.set(l,c));const s=c.reduce((t,e,n)=>t+e+(a[n]??\"\"),\"\").replace(/>\\s+</g,\"><\").replace(/>\\s+/g,\">\").replace(/\\s+</g,\"<\").trim();r(n,s),n._tplStrings=l,n._tplValues=a,n._tplParts=function(t,e){const n=new Array(e.length),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let l,o=0;for(;(l=r.nextNode())&&o<e.length;)l.textContent===e[o]&&(n[o]=l,o++);return n}(n,a)}(n,l,o)}function r(t,e){t?t.replaceChildren(t.ownerDocument.createRange().createContextualFragment(e)):console.warn(\"░█ [ELENA]: Cannot render to a null element.\")}export{r as renderHtml,n as renderTemplate};\n//# sourceMappingURL=render.js.map\n","import{setProps as e,getProps as t,getPropValue as s,syncAttribute as n}from\"./props.js\";import{ElenaEvent as i}from\"./events.js\";import{defineElement as r}from\"./utils.js\";export{html}from\"./utils.js\";import{renderTemplate as h}from\"./render.js\";function l(l,a){const o=a&&a.element?/^[a-z][a-z0-9-]*$/i.test(a.element)?e=>e.getElementsByClassName(a.element)[0]:e=>e.querySelector(a.element):e=>e.firstElementChild;class m extends l{element=null;attributeChangedCallback(e,s,n){t(this,e,s,n),this._hydrated&&s!==n&&!this._isRendering&&(this._isRendering=!0,this.render(),this._isRendering=!1)}static get observedAttributes(){return a&&a.props?a.props:[]}render(){}template(e,...t){h(this,e,t)}connectedCallback(){if(this.render(),this.element||(this.element=o(this),this.element||(a&&a.element&&console.warn(\"░█ [ELENA]: No element found, using firstElementChild as fallback.\"),this.element=this.firstElementChild)),this._props){const e=!(!a||!a.element);for(const[t,i]of this._props){const r=s(typeof i,i,\"toAttribute\");n(this,t,r),e&&n(this.element,t,r)}}!this._events&&a&&a.events&&(this._events=!0,a.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add(\"elena-hydrated\"))}disconnectedCallback(){this._events&&(this._events=!1,a.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){a.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new i(e.type,{cancelable:!0})))}}return a&&a.props?.length&&e(m.prototype,a.props,!(!a||!a.element)),a&&a.tagName&&(m._tagName=a.tagName),m.define=function(){this._tagName&&r(this._tagName,this)},m}export{l as Elena};\n//# sourceMappingURL=elena.js.map\n","import { Elena } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-button\",\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n * Button component is used for interface actions.\n *\n * @displayName Button\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-button-color-text] - Controls the color of the text.\n * @cssprop [--elena-button-color-bg] - Controls the color of the background.\n * @cssprop [--elena-button-color-border] - Controls the color of the border.\n * @cssprop [--elena-button-radius] - Controls the radius of the component.\n */\nexport default class Button extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The style variant of the button.\n *\n * @attribute\n * @type {\"default\" | \"primary\" | \"danger\"}\n */\n this.variant = \"default\";\n\n /**\n * The size of the button.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The value used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The type of the button.\n *\n * @attribute\n * @type {\"submit\" | \"reset\" | \"button\"}\n */\n this.type = \"button\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n const slottedContent = this.textContent.trim();\n\n this.template`\n <button class=\"elena-button\">\n ${slottedContent}\n </button>\n `;\n }\n}\n\n/**\n * Register the web component\n */\nButton.define();\n","import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-input\",\n props: [\"size\", \"disabled\", \"name\", \"value\", \"type\", \"label\", \"error\", \"placeholder\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-input\",\n};\n\n/**\n * The description of the component goes here.\n *\n * @displayName Input\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-input-color-text] - Controls the color of the text.\n * @cssprop [--elena-input-color-bg] - Controls the color of the background.\n * @cssprop [--elena-input-color-border] - Controls the color of the border.\n * @cssprop [--elena-input-radius] - Controls the radius of the component.\n */\nexport default class Input extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The size of the input.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The label for the input\n *\n * @attribute\n * @type {string}\n */\n this.label = \"\";\n\n /**\n * The value used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The placeholder text for the input.\n *\n * @attribute\n * @type {string}\n */\n this.placeholder = \"\";\n\n /**\n * The type of the input\n *\n * @attribute\n * @type {\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\" | \"button\"}\n */\n this.type = \"text\";\n\n /**\n * The error to display\n *\n * @attribute\n * @type {string}\n */\n this.error = \"\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n this.template`\n <label for=\"input\">${this.label}</label>\n <div class=\"elena-input-container\">\n <span class=\"elena-input-start\"></span>\n <input\n id=\"input\"\n class=\"elena-input\"\n />\n <span class=\"elena-input-end\"></span>\n </div>\n ${this.error ? html`<div class=\"elena-error\" role=\"alert\">${this.error}</div>` : \"\"}\n `;\n }\n}\n\n/**\n * Register the web component\n */\nInput.define();\n","import { Elena } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-stack\",\n props: [\"direction\"],\n};\n\n/**\n * Stack component manages layout of immediate children\n * with optional spacing between each child.\n *\n * @displayName Stack\n * @slot - The stacked content\n * @status alpha\n */\nexport default class Stack extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The direction of the stack.\n *\n * @attribute\n * @type {\"column\" | \"row\"}\n */\n this.direction = \"column\";\n }\n}\n\n/**\n * Register the web component\n */\nStack.define();\n"],"names":["e","t","r","JSON","stringify","parse","console","warn","removeAttribute","setAttribute","e$2","Event","constructor","s","super","bubbles","composed","n","String","replace","o","reduce","i","__raw","toString","WeakMap","l","_tplStrings","_tplParts","length","a","c","_tplValues","textContent","map","get","Array","from","set","trim","replaceChildren","ownerDocument","createRange","createContextualFragment","document","createTreeWalker","NodeFilter","SHOW_TEXT","nextNode","element","test","getElementsByClassName","querySelector","firstElementChild","m","attributeChangedCallback","this","_hydrated","_isRendering","render","observedAttributes","props","template","h","connectedCallback","_props","_events","events","forEach","addEventListener","updated","classList","add","disconnectedCallback","removeEventListener","handleEvent","includes","type","stopPropagation","dispatchEvent","cancelable","Object","defineProperty","configurable","enumerable","Map","isConnected","prototype","tagName","_tagName","define","window","customElements","options","Button","Elena","HTMLElement","variant","size","disabled","name","value","slottedContent","Input","label","placeholder","error","html","Stack","direction"],"mappings":"AAAA,SAASA,EAAEA,EAAEC,EAAEC,GAAG,GAAGD,EAAE,YAAYD,GAAG,kBAAkBC,EAAE,OAAOA,EAAEA,GAAGC,EAAE,OAAOD,EAAE,GAAG,gBAAgBC,EAAE,OAAOF,GAAG,IAAI,SAAS,IAAI,QAAQ,OAAO,OAAOC,EAAE,KAAKE,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Q,sBACUN,KAAKgD,6KASxBhD,KAAKkD,MAAQC,CAAI,yCAAyCnD,KAAKkD,cAAgB,IAErF,EAMFH,EAAMb,SCnHN,MAAMG,EAAU,CACdL,QAAS,cACT3B,MAAO,CAAC,cAWK,MAAM+C,UAAcb,EAAMC,YAAaH,IACpD,WAAAjF,GACEE,QAQA0C,KAAKqD,UAAY,QACnB,EAMFD,EAAMlB"}
|
|
1
|
+
{"version":3,"file":"bundle.js","sources":["../../core/dist/props.js","../../core/dist/events.js","../../core/dist/utils.js","../../core/dist/render.js","../../core/dist/elena.js","../src/button/button.js","../src/input/input.js","../src/stack/stack.js"],"sourcesContent":["function e(e,t,r){if(t=\"boolean\"===e&&\"boolean\"!=typeof t?null!==t:t,!r)return t;if(\"toAttribute\"===r)switch(e){case\"object\":case\"array\":return null===t?null:JSON.stringify(t);case\"boolean\":return t?\"\":null;case\"number\":return null===t?null:t;default:return\"\"===t?null:t}else switch(e){case\"object\":case\"array\":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn(\"░█ [ELENA]: Invalid JSON for prop, received: \"+t),null}case\"boolean\":return t;case\"number\":return null!==t?+t:t;default:return t}}function t(e,t,r){e?null===r?e.removeAttribute(t):e.setAttribute(t,r):console.warn(\"░█ [ELENA]: Cannot sync attributes to a null element.\")}function r(r,n,o=!0){for(const s of n)Object.defineProperty(r,s,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(s):void 0},set(r){if(this._props||(this._props=new Map),r===this._props.get(s))return;if(this._props.set(s,r),!this.isConnected)return;const n=e(typeof r,r,\"toAttribute\");t(this,s,n),o&&this.element&&t(this.element,s,n)}})}function n(t,r,n,o){if(n!==o){const n=e(typeof t[r],o,\"toProp\");t[r]=n}}export{e as getPropValue,n as getProps,r as setProps,t as syncAttribute};\n//# sourceMappingURL=props.js.map\n","class e extends Event{constructor(e,s){super(e,{bubbles:!0,composed:!0,...s})}}export{e as ElenaEvent};\n//# sourceMappingURL=events.js.map\n","function n(n,t){\"undefined\"!=typeof window&&\"customElements\"in window&&(window.customElements.get(n)||window.customElements.define(n,t))}function t(n){const t={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"};return String(n).replace(/[&<>\"']/g,n=>t[n])}function e(n,...e){const o=n.reduce((n,o,r)=>{const i=e[r];return n+o+(i&&i.__raw?String(i):t(String(i??\"\")))},\"\");return{__raw:!0,strings:n,values:e,toString:()=>o}}const o={__raw:!0,toString:()=>\"\"};export{n as defineElement,t as escapeHtml,e as html,o as nothing};\n//# sourceMappingURL=utils.js.map\n","import{escapeHtml as t}from\"./utils.js\";const e=new WeakMap;function n(n,l,o){(function(e,n,r){if(e._tplStrings!==n||!e._tplParts)return!1;let l=!1;for(let n=0;n<r.length;n++){const o=r[n],a=o&&o.__raw,c=a?String(o):t(String(o??\"\"));if(c!==e._tplValues[n])if(e._tplValues[n]=c,a)l=!0;else{const t=e._tplParts[n];t?t.textContent=String(o??\"\"):l=!0}}return!l})(n,l,o)||function(n,l,o){const a=o.map(e=>e&&e.__raw?String(e):t(String(e??\"\")));let c=e.get(l);c||(c=Array.from(l,t=>t.replace(/\\n\\s*/g,\" \")),e.set(l,c));const s=c.reduce((t,e,n)=>t+e+(a[n]??\"\"),\"\").replace(/>\\s+</g,\"><\").replace(/>\\s+/g,\">\").replace(/\\s+</g,\"<\").trim();r(n,s),n._tplStrings=l,n._tplValues=a,n._tplParts=function(t,e){const n=new Array(e.length),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let l,o=0;for(;(l=r.nextNode())&&o<e.length;)l.textContent===e[o]&&(n[o]=l,o++);return n}(n,a)}(n,l,o)}function r(t,e){t?t.replaceChildren(t.ownerDocument.createRange().createContextualFragment(e)):console.warn(\"░█ [ELENA]: Cannot render to a null element.\")}export{r as renderHtml,n as renderTemplate};\n//# sourceMappingURL=render.js.map\n","import{setProps as e,getProps as t,getPropValue as s,syncAttribute as n}from\"./props.js\";import{ElenaEvent as i}from\"./events.js\";import{defineElement as r}from\"./utils.js\";export{html,nothing}from\"./utils.js\";import{renderTemplate as h}from\"./render.js\";function l(l,a){const o=a&&a.element?/^[a-z][a-z0-9-]*$/i.test(a.element)?e=>e.getElementsByClassName(a.element)[0]:e=>e.querySelector(a.element):e=>e.firstElementChild;class d extends l{element=null;attributeChangedCallback(e,s,n){t(this,e,s,n),this._hydrated&&s!==n&&!this._isRendering&&(this._isRendering=!0,this._applyRender(),this._isRendering=!1)}static get observedAttributes(){return a&&a.props?a.props:[]}render(){}_applyRender(){const e=this.render();e&&e.strings&&h(this,e.strings,e.values)}connectedCallback(){if(this._applyRender(),this.element||(this.element=o(this),this.element||(a&&a.element&&console.warn(\"░█ [ELENA]: No element found, using firstElementChild as fallback.\"),this.element=this.firstElementChild)),this._props){const e=!(!a||!a.element);for(const[t,i]of this._props){const r=s(typeof i,i,\"toAttribute\");n(this,t,r),e&&n(this.element,t,r)}}!this._events&&a&&a.events&&(this._events=!0,a.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add(\"elena-hydrated\"))}disconnectedCallback(){this._events&&(this._events=!1,a.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){a.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new i(e.type,{cancelable:!0})))}}return a&&a.props?.length&&e(d.prototype,a.props,!(!a||!a.element)),a&&a.tagName&&(d._tagName=a.tagName),d.define=function(){this._tagName&&r(this._tagName,this)},d}export{l as Elena};\n//# sourceMappingURL=elena.js.map\n","import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-button\",\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n * Button component is used for interface actions.\n *\n * @displayName Button\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-button-color-text] - Controls the color of the text.\n * @cssprop [--elena-button-color-bg] - Controls the color of the background.\n * @cssprop [--elena-button-color-border] - Controls the color of the border.\n * @cssprop [--elena-button-radius] - Controls the radius of the component.\n */\nexport default class Button extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The style variant of the button.\n *\n * @attribute\n * @type {\"default\" | \"primary\" | \"danger\"}\n */\n this.variant = \"default\";\n\n /**\n * The size of the button.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The value used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The type of the button.\n *\n * @attribute\n * @type {\"submit\" | \"reset\" | \"button\"}\n */\n this.type = \"button\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n const slottedContent = this.textContent.trim();\n\n return html`\n <button class=\"elena-button\">\n ${slottedContent}\n </button>\n `;\n }\n}\n\n/**\n * Register the web component\n */\nButton.define();\n","import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-input\",\n props: [\"size\", \"disabled\", \"name\", \"value\", \"type\", \"label\", \"error\", \"placeholder\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-input\",\n};\n\n/**\n * The description of the component goes here.\n *\n * @displayName Input\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-input-color-text] - Controls the color of the text.\n * @cssprop [--elena-input-color-bg] - Controls the color of the background.\n * @cssprop [--elena-input-color-border] - Controls the color of the border.\n * @cssprop [--elena-input-radius] - Controls the radius of the component.\n */\nexport default class Input extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The size of the input.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The label for the input\n *\n * @attribute\n * @type {string}\n */\n this.label = \"\";\n\n /**\n * The value used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The placeholder text for the input.\n *\n * @attribute\n * @type {string}\n */\n this.placeholder = \"\";\n\n /**\n * The type of the input\n *\n * @attribute\n * @type {\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\" | \"button\"}\n */\n this.type = \"text\";\n\n /**\n * The error to display\n *\n * @attribute\n * @type {string}\n */\n this.error = \"\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n return html`\n <label for=\"input\">${this.label}</label>\n <div class=\"elena-input-container\">\n <span class=\"elena-input-start\"></span>\n <input\n id=\"input\"\n class=\"elena-input\"\n />\n <span class=\"elena-input-end\"></span>\n </div>\n ${this.error ? html`<div class=\"elena-error\" role=\"alert\">${this.error}</div>` : \"\"}\n `;\n }\n}\n\n/**\n * Register the web component\n */\nInput.define();\n","import { Elena } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-stack\",\n props: [\"direction\"],\n};\n\n/**\n * Stack component manages layout of immediate children\n * with optional spacing between each child.\n *\n * @displayName Stack\n * @slot - The stacked content\n * @status alpha\n */\nexport default class Stack extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The direction of the stack.\n *\n * @attribute\n * @type {\"column\" | \"row\"}\n */\n this.direction = \"column\";\n }\n}\n\n/**\n * Register the web component\n */\nStack.define();\n"],"names":["e","t","r","JSON","stringify","parse","console","warn","removeAttribute","setAttribute","e$2","Event","constructor","s","super","bubbles","composed","n","String","replace","o","reduce","i","__raw","strings","values","toString","WeakMap","l","_tplStrings","_tplParts","length","a","c","_tplValues","textContent","map","get","Array","from","set","trim","replaceChildren","ownerDocument","createRange","createContextualFragment","document","createTreeWalker","NodeFilter","SHOW_TEXT","nextNode","element","test","getElementsByClassName","querySelector","firstElementChild","d","attributeChangedCallback","this","_hydrated","_isRendering","_applyRender","observedAttributes","props","render","h","connectedCallback","_props","_events","events","forEach","addEventListener","updated","classList","add","disconnectedCallback","removeEventListener","handleEvent","includes","type","stopPropagation","dispatchEvent","cancelable","Object","defineProperty","configurable","enumerable","Map","isConnected","prototype","tagName","_tagName","define","window","customElements","options","Button","Elena","HTMLElement","variant","size","disabled","name","value","html","Input","label","placeholder","error","Stack","direction"],"mappings":"AAAA,SAASA,EAAEA,EAAEC,EAAEC,GAAG,GAAGD,EAAE,YAAYD,GAAG,kBAAkBC,EAAE,OAAOA,EAAEA,GAAGC,EAAE,OAAOD,EAAE,GAAG,gBAAgBC,EAAE,OAAOF,GAAG,IAAI,SAAS,IAAI,QAAQ,OAAO,OAAOC,EAAE,KAAKE,KAAKC,UAAUH,GAAG,IAAI,UAAU,OAAOA,EAAE,GAAG,KAAK,IAAI,SAAS,OAAO,OAAOA,EAAE,KAAKA,EAAE,QAAQ,MAAM,KAAKA,EAAE,KAAKA,OAAO,OAAOD,GAAG,IAAI,SAAS,IAAI,QAAQ,IAAIC,EAAE,OAAOA,EAAE,IAAI,OAAOE,KAAKE,MAAMJ,EAAE,CAAC,MAAM,OAAOK,QAAQC,KAAK,gDAAgDN,GAAG,IAAI,CAAC,IAAI,UAAU,OAAOA,EAAE,IAAI,SAAS,OAAO,OAAOA,GAAGA,EAAEA,EAAE,QAAQ,OAAOA,EAAE,CAAC,SAASA,EAAED,EAAEC,EAAEC,GAAGF,EAAE,OAAOE,EAAEF,EAAEQ,gBAAgBP,GAAGD,EAAES,aAAaR,EAAEC,GAAGI,QAAQC,KAAK,wDAAwD,CCAvoB,IAAAG,EAAA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","value","type"],events:["click","focus","blur"],element:".elena-button"};class s extends(t(HTMLElement,n)){constructor(){super(),this.variant="default",this.size="md",this.disabled=!1,this.name="",this.value="",this.type="button"}render(){const t=this.textContent.trim();return e`<button class="elena-button">${t}</button>`}}s.define();export{s as default};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
package/dist/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../src/button/button.js"],"sourcesContent":["import { Elena } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-button\",\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n * Button component is used for interface actions.\n *\n * @displayName Button\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-button-color-text] - Controls the color of the text.\n * @cssprop [--elena-button-color-bg] - Controls the color of the background.\n * @cssprop [--elena-button-color-border] - Controls the color of the border.\n * @cssprop [--elena-button-radius] - Controls the radius of the component.\n */\nexport default class Button extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The style variant of the button.\n *\n * @attribute\n * @type {\"default\" | \"primary\" | \"danger\"}\n */\n this.variant = \"default\";\n\n /**\n * The size of the button.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The value used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The type of the button.\n *\n * @attribute\n * @type {\"submit\" | \"reset\" | \"button\"}\n */\n this.type = \"button\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n const slottedContent = this.textContent.trim();\n\n
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../src/button/button.js"],"sourcesContent":["import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-button\",\n props: [\"variant\", \"size\", \"disabled\", \"name\", \"value\", \"type\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-button\",\n};\n\n/**\n * Button component is used for interface actions.\n *\n * @displayName Button\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-button-color-text] - Controls the color of the text.\n * @cssprop [--elena-button-color-bg] - Controls the color of the background.\n * @cssprop [--elena-button-color-border] - Controls the color of the border.\n * @cssprop [--elena-button-radius] - Controls the radius of the component.\n */\nexport default class Button extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The style variant of the button.\n *\n * @attribute\n * @type {\"default\" | \"primary\" | \"danger\"}\n */\n this.variant = \"default\";\n\n /**\n * The size of the button.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The value used to identify the button in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The type of the button.\n *\n * @attribute\n * @type {\"submit\" | \"reset\" | \"button\"}\n */\n this.type = \"button\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n const slottedContent = this.textContent.trim();\n\n return html`\n <button class=\"elena-button\">\n ${slottedContent}\n </button>\n `;\n }\n}\n\n/**\n * Register the web component\n */\nButton.define();\n"],"names":["options","tagName","props","events","element","Button","Elena","HTMLElement","constructor","super","this","variant","size","disabled","name","value","type","render","slottedContent","textContent","trim","html","define"],"mappings":"0CAEA,MAAMA,EAAU,CACdC,QAAS,eACTC,MAAO,CAAC,UAAW,OAAQ,WAAY,OAAQ,QAAS,QACxDC,OAAQ,CAAC,QAAS,QAAS,QAC3BC,QAAS,iBAkBI,MAAMC,UAAeC,EAAMC,YAAaP,IACrD,WAAAQ,GACEC,QAQAC,KAAKC,QAAU,UAQfD,KAAKE,KAAO,KAQZF,KAAKG,UAAW,EAQhBH,KAAKI,KAAO,GAQZJ,KAAKK,MAAQ,GAQbL,KAAKM,KAAO,QACd,CAOA,MAAAC,GACE,MAAMC,EAAiBR,KAAKS,YAAYC,OAExC,OAAOC,CAAI,gCAELH,YAGR,EAMFb,EAAOiB"}
|
|
@@ -60,6 +60,11 @@ type BaseProps = {
|
|
|
60
60
|
|
|
61
61
|
type BaseEvents = {};
|
|
62
62
|
|
|
63
|
+
export type AvatarProps = {
|
|
64
|
+
/** */
|
|
65
|
+
state?: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
63
68
|
export type ButtonProps = {
|
|
64
69
|
/** The style variant of the button. */
|
|
65
70
|
variant?: "default" | "primary" | "danger";
|
|
@@ -114,6 +119,13 @@ export type StackProps = {
|
|
|
114
119
|
};
|
|
115
120
|
|
|
116
121
|
export type CustomElements = {
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* ---
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
"elena-avatar": Partial<AvatarProps & BaseProps & BaseEvents>;
|
|
128
|
+
|
|
117
129
|
/**
|
|
118
130
|
* Button component is used for interface actions.
|
|
119
131
|
* ---
|
|
@@ -33,6 +33,68 @@
|
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "javascript-module",
|
|
38
|
+
"path": "src/avatar/avatar.js",
|
|
39
|
+
"declarations": [
|
|
40
|
+
{
|
|
41
|
+
"kind": "class",
|
|
42
|
+
"description": "",
|
|
43
|
+
"name": "Avatar",
|
|
44
|
+
"members": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "method",
|
|
47
|
+
"name": "renderImage"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "method",
|
|
51
|
+
"name": "renderFallback"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "method",
|
|
55
|
+
"name": "render"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"kind": "field",
|
|
59
|
+
"name": "state",
|
|
60
|
+
"type": {
|
|
61
|
+
"text": "string"
|
|
62
|
+
},
|
|
63
|
+
"default": "\"initial\""
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"mixins": [
|
|
67
|
+
{
|
|
68
|
+
"name": "Elena",
|
|
69
|
+
"package": "@elenajs/core"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"superclass": {
|
|
73
|
+
"name": "HTMLElement"
|
|
74
|
+
},
|
|
75
|
+
"tagName": "elena-avatar",
|
|
76
|
+
"customElement": true
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"exports": [
|
|
80
|
+
{
|
|
81
|
+
"kind": "js",
|
|
82
|
+
"name": "default",
|
|
83
|
+
"declaration": {
|
|
84
|
+
"name": "Avatar",
|
|
85
|
+
"module": "src/avatar/avatar.js"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "custom-element-definition",
|
|
90
|
+
"name": "elena-avatar",
|
|
91
|
+
"declaration": {
|
|
92
|
+
"name": "Avatar",
|
|
93
|
+
"module": "src/avatar/avatar.js"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
36
98
|
{
|
|
37
99
|
"kind": "javascript-module",
|
|
38
100
|
"path": "src/button/button.js",
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t,n){if(t="boolean"===e&&"boolean"!=typeof t?null!==t:t,!n)return t;if("toAttribute"===n)switch(e){case"object":case"array":return null===t?null:JSON.stringify(t);case"boolean":return t?"":null;case"number":return null===t?null:t;default:return""===t?null:t}else switch(e){case"object":case"array":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn("░█ [ELENA]: Invalid JSON for prop, received: "+t),null}case"boolean":return t;case"number":return null!==t?+t:t;default:return t}}function t(e,t,n){e?null===n?e.removeAttribute(t):e.setAttribute(t,n):console.warn("░█ [ELENA]: Cannot sync attributes to a null element.")}let n=class extends Event{constructor(e,t){super(e,{bubbles:!0,composed:!0,...t})}};function s(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,e=>t[e])}function r(e,...t){const n=e.reduce((e,n,r)=>{const i=t[r];return e+n+(i&&i.__raw?String(i):s(String(i??"")))},"");return{__raw:!0,strings:e,values:t,toString:()=>n}}const i={__raw:!0,toString:()=>""},l=new WeakMap;function o(e,t,n){(function(e,t,n){if(e._tplStrings!==t||!e._tplParts)return!1;let r=!1;for(let t=0;t<n.length;t++){const i=n[t],l=i&&i.__raw,o=l?String(i):s(String(i??""));if(o!==e._tplValues[t])if(e._tplValues[t]=o,l)r=!0;else{const n=e._tplParts[t];n?n.textContent=String(i??""):r=!0}}return!r})(e,t,n)||function(e,t,n){const r=n.map(e=>e&&e.__raw?String(e):s(String(e??"")));let i=l.get(t);i||(i=Array.from(t,e=>e.replace(/\n\s*/g," ")),l.set(t,i));const o=i.reduce((e,t,n)=>e+t+(r[n]??""),"").replace(/>\s+</g,"><").replace(/>\s+/g,">").replace(/\s+</g,"<").trim();(function(e,t){e?e.replaceChildren(e.ownerDocument.createRange().createContextualFragment(t)):console.warn("░█ [ELENA]: Cannot render to a null element.")})(e,o),e._tplStrings=t,e._tplValues=r,e._tplParts=function(e,t){const n=new Array(t.length),s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let r,i=0;for(;(r=s.nextNode())&&i<t.length;)r.textContent===t[i]&&(n[i]=r,i++);return n}(e,r)}(e,t,n)}function a(s,r){const i=r&&r.element?/^[a-z][a-z0-9-]*$/i.test(r.element)?e=>e.getElementsByClassName(r.element)[0]:e=>e.querySelector(r.element):e=>e.firstElementChild;class l extends s{element=null;attributeChangedCallback(t,n,s){(function(t,n,s,r){if(s!==r){const s=e(typeof t[n],r,"toProp");t[n]=s}})(this,t,n,s),this._hydrated&&n!==s&&!this._isRendering&&(this._isRendering=!0,this._applyRender(),this._isRendering=!1)}static get observedAttributes(){return r&&r.props?r.props:[]}render(){}_applyRender(){const e=this.render();e&&e.strings&&o(this,e.strings,e.values)}connectedCallback(){if(this._applyRender(),this.element||(this.element=i(this),this.element||(r&&r.element&&console.warn("░█ [ELENA]: No element found, using firstElementChild as fallback."),this.element=this.firstElementChild)),this._props){const n=!(!r||!r.element);for(const[s,r]of this._props){const i=e(typeof r,r,"toAttribute");t(this,s,i),n&&t(this.element,s,i)}}!this._events&&r&&r.events&&(this._events=!0,r.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add("elena-hydrated"))}disconnectedCallback(){this._events&&(this._events=!1,r.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){r.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new n(e.type,{cancelable:!0})))}}return r&&r.props?.length&&function(n,s,r=!0){for(const i of s)Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(i):void 0},set(n){if(this._props||(this._props=new Map),n===this._props.get(i))return;if(this._props.set(i,n),!this.isConnected)return;const s=e(typeof n,n,"toAttribute");t(this,i,s),r&&this.element&&t(this.element,i,s)}})}(l.prototype,r.props,!(!r||!r.element)),r&&r.tagName&&(l._tagName=r.tagName),l.define=function(){this._tagName&&function(e,t){"undefined"!=typeof window&&"customElements"in window&&(window.customElements.get(e)||window.customElements.define(e,t))}(this._tagName,this)},l}export{r as e,a as l,i as o};
|
|
2
|
+
//# sourceMappingURL=elena-BN2AjG4V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elena-BN2AjG4V.js","sources":["../../core/dist/props.js","../../core/dist/events.js","../../core/dist/utils.js","../../core/dist/render.js","../../core/dist/elena.js"],"sourcesContent":["function e(e,t,r){if(t=\"boolean\"===e&&\"boolean\"!=typeof t?null!==t:t,!r)return t;if(\"toAttribute\"===r)switch(e){case\"object\":case\"array\":return null===t?null:JSON.stringify(t);case\"boolean\":return t?\"\":null;case\"number\":return null===t?null:t;default:return\"\"===t?null:t}else switch(e){case\"object\":case\"array\":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn(\"░█ [ELENA]: Invalid JSON for prop, received: \"+t),null}case\"boolean\":return t;case\"number\":return null!==t?+t:t;default:return t}}function t(e,t,r){e?null===r?e.removeAttribute(t):e.setAttribute(t,r):console.warn(\"░█ [ELENA]: Cannot sync attributes to a null element.\")}function r(r,n,o=!0){for(const s of n)Object.defineProperty(r,s,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(s):void 0},set(r){if(this._props||(this._props=new Map),r===this._props.get(s))return;if(this._props.set(s,r),!this.isConnected)return;const n=e(typeof r,r,\"toAttribute\");t(this,s,n),o&&this.element&&t(this.element,s,n)}})}function n(t,r,n,o){if(n!==o){const n=e(typeof t[r],o,\"toProp\");t[r]=n}}export{e as getPropValue,n as getProps,r as setProps,t as syncAttribute};\n//# sourceMappingURL=props.js.map\n","class e extends Event{constructor(e,s){super(e,{bubbles:!0,composed:!0,...s})}}export{e as ElenaEvent};\n//# sourceMappingURL=events.js.map\n","function n(n,t){\"undefined\"!=typeof window&&\"customElements\"in window&&(window.customElements.get(n)||window.customElements.define(n,t))}function t(n){const t={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"};return String(n).replace(/[&<>\"']/g,n=>t[n])}function e(n,...e){const o=n.reduce((n,o,r)=>{const i=e[r];return n+o+(i&&i.__raw?String(i):t(String(i??\"\")))},\"\");return{__raw:!0,strings:n,values:e,toString:()=>o}}const o={__raw:!0,toString:()=>\"\"};export{n as defineElement,t as escapeHtml,e as html,o as nothing};\n//# sourceMappingURL=utils.js.map\n","import{escapeHtml as t}from\"./utils.js\";const e=new WeakMap;function n(n,l,o){(function(e,n,r){if(e._tplStrings!==n||!e._tplParts)return!1;let l=!1;for(let n=0;n<r.length;n++){const o=r[n],a=o&&o.__raw,c=a?String(o):t(String(o??\"\"));if(c!==e._tplValues[n])if(e._tplValues[n]=c,a)l=!0;else{const t=e._tplParts[n];t?t.textContent=String(o??\"\"):l=!0}}return!l})(n,l,o)||function(n,l,o){const a=o.map(e=>e&&e.__raw?String(e):t(String(e??\"\")));let c=e.get(l);c||(c=Array.from(l,t=>t.replace(/\\n\\s*/g,\" \")),e.set(l,c));const s=c.reduce((t,e,n)=>t+e+(a[n]??\"\"),\"\").replace(/>\\s+</g,\"><\").replace(/>\\s+/g,\">\").replace(/\\s+</g,\"<\").trim();r(n,s),n._tplStrings=l,n._tplValues=a,n._tplParts=function(t,e){const n=new Array(e.length),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let l,o=0;for(;(l=r.nextNode())&&o<e.length;)l.textContent===e[o]&&(n[o]=l,o++);return n}(n,a)}(n,l,o)}function r(t,e){t?t.replaceChildren(t.ownerDocument.createRange().createContextualFragment(e)):console.warn(\"░█ [ELENA]: Cannot render to a null element.\")}export{r as renderHtml,n as renderTemplate};\n//# sourceMappingURL=render.js.map\n","import{setProps as e,getProps as t,getPropValue as s,syncAttribute as n}from\"./props.js\";import{ElenaEvent as i}from\"./events.js\";import{defineElement as r}from\"./utils.js\";export{html,nothing}from\"./utils.js\";import{renderTemplate as h}from\"./render.js\";function l(l,a){const o=a&&a.element?/^[a-z][a-z0-9-]*$/i.test(a.element)?e=>e.getElementsByClassName(a.element)[0]:e=>e.querySelector(a.element):e=>e.firstElementChild;class d extends l{element=null;attributeChangedCallback(e,s,n){t(this,e,s,n),this._hydrated&&s!==n&&!this._isRendering&&(this._isRendering=!0,this._applyRender(),this._isRendering=!1)}static get observedAttributes(){return a&&a.props?a.props:[]}render(){}_applyRender(){const e=this.render();e&&e.strings&&h(this,e.strings,e.values)}connectedCallback(){if(this._applyRender(),this.element||(this.element=o(this),this.element||(a&&a.element&&console.warn(\"░█ [ELENA]: No element found, using firstElementChild as fallback.\"),this.element=this.firstElementChild)),this._props){const e=!(!a||!a.element);for(const[t,i]of this._props){const r=s(typeof i,i,\"toAttribute\");n(this,t,r),e&&n(this.element,t,r)}}!this._events&&a&&a.events&&(this._events=!0,a.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add(\"elena-hydrated\"))}disconnectedCallback(){this._events&&(this._events=!1,a.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){a.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new i(e.type,{cancelable:!0})))}}return a&&a.props?.length&&e(d.prototype,a.props,!(!a||!a.element)),a&&a.tagName&&(d._tagName=a.tagName),d.define=function(){this._tagName&&r(this._tagName,this)},d}export{l as Elena};\n//# sourceMappingURL=elena.js.map\n"],"names":["e","t","r","JSON","stringify","parse","console","warn","removeAttribute","setAttribute","e$2","Event","constructor","s","super","bubbles","composed","n","String","replace","o","reduce","i","__raw","strings","values","toString","WeakMap","l","_tplStrings","_tplParts","length","a","c","_tplValues","textContent","map","get","Array","from","set","trim","replaceChildren","ownerDocument","createRange","createContextualFragment","document","createTreeWalker","NodeFilter","SHOW_TEXT","nextNode","element","test","getElementsByClassName","querySelector","firstElementChild","d","attributeChangedCallback","this","_hydrated","_isRendering","_applyRender","observedAttributes","props","render","h","connectedCallback","_props","_events","events","forEach","addEventListener","updated","classList","add","disconnectedCallback","removeEventListener","handleEvent","includes","type","stopPropagation","dispatchEvent","cancelable","Object","defineProperty","configurable","enumerable","Map","isConnected","prototype","tagName","_tagName","define","window","customElements"],"mappings":"AAAA,SAASA,EAAEA,EAAEC,EAAEC,GAAG,GAAGD,EAAE,YAAYD,GAAG,kBAA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AAIxB,QAAG,CAAM,EAAE,GAAA2B,CAAItC,GAAG,GAAGwD,KAAKS,SAAST,KAAKS,OAAO,IAAIoB,KAAKrF,IAAIwD,KAAKS,OAAO9B,IAAIxB,GAAG,OAAO,GAAG6C,KAAKS,OAAO3B,IAAI3B,EAAEX,IAAIwD,KAAK8B,YAAY,OAAO,MAAMvE,EAAEjB,SAASE,EAAEA,EAAE,eAAeD,EAAEyD,KAAK7C,EAAEI,GAAGG,GAAGsC,KAAKP,SAASlD,EAAEyD,KAAKP,QAAQtC,EAAEI,EAAE,GAAG,CIAqnBjB,CAAEwD,EAAEiC,UAAUzD,EAAE+B,SAAS/B,IAAIA,EAAEmB,UAAUnB,GAAGA,EAAE0D,UAAUlC,EAAEmC,SAAS3D,EAAE0D,SAASlC,EAAEoC,OAAO,WAAWlC,KAAKiC,UFA1sD,SAAW1E,EAAEhB,GAAG,oBAAoB4F,QAAQ,mBAAmBA,SAASA,OAAOC,eAAezD,IAAIpB,IAAI4E,OAAOC,eAAeF,OAAO3E,EAAEhB,GAAG,CEA4kDC,CAAEwD,KAAKiC,SAASjC,KAAK,EAAEF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as Button}from"./button.js";export{default as Input}from"./input.js";export{default as Stack}from"./stack.js";import"./elena-
|
|
1
|
+
export{default as Button}from"./button.js";export{default as Input}from"./input.js";export{default as Stack}from"./stack.js";import"./elena-BN2AjG4V.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as e,e as s}from"./elena-
|
|
1
|
+
import{l as e,e as s}from"./elena-BN2AjG4V.js";const t={tagName:"elena-input",props:["size","disabled","name","value","type","label","error","placeholder"],events:["click","focus","blur"],element:".elena-input"};class l extends(e(HTMLElement,t)){constructor(){super(),this.size="md",this.disabled=!1,this.name="",this.label="",this.value="",this.placeholder="",this.type="text",this.error=""}render(){return s`<label for="input">${this.label}</label><div class="elena-input-container"><span class="elena-input-start"></span> <input id="input" class="elena-input"> <span class="elena-input-end"></span></div>${this.error?s`<div class="elena-error" role="alert">${this.error}</div>`:""}`}}l.define();export{l as default};
|
|
2
2
|
//# sourceMappingURL=input.js.map
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../src/input/input.js"],"sourcesContent":["import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-input\",\n props: [\"size\", \"disabled\", \"name\", \"value\", \"type\", \"label\", \"error\", \"placeholder\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-input\",\n};\n\n/**\n * The description of the component goes here.\n *\n * @displayName Input\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-input-color-text] - Controls the color of the text.\n * @cssprop [--elena-input-color-bg] - Controls the color of the background.\n * @cssprop [--elena-input-color-border] - Controls the color of the border.\n * @cssprop [--elena-input-radius] - Controls the radius of the component.\n */\nexport default class Input extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The size of the input.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The label for the input\n *\n * @attribute\n * @type {string}\n */\n this.label = \"\";\n\n /**\n * The value used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The placeholder text for the input.\n *\n * @attribute\n * @type {string}\n */\n this.placeholder = \"\";\n\n /**\n * The type of the input\n *\n * @attribute\n * @type {\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\" | \"button\"}\n */\n this.type = \"text\";\n\n /**\n * The error to display\n *\n * @attribute\n * @type {string}\n */\n this.error = \"\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../src/input/input.js"],"sourcesContent":["import { Elena, html } from \"@elenajs/core\";\n\nconst options = {\n tagName: \"elena-input\",\n props: [\"size\", \"disabled\", \"name\", \"value\", \"type\", \"label\", \"error\", \"placeholder\"],\n events: [\"click\", \"focus\", \"blur\"],\n element: \".elena-input\",\n};\n\n/**\n * The description of the component goes here.\n *\n * @displayName Input\n * @status alpha\n *\n * @event click - Programmatically fire click on the component.\n * @event focus - Programmatically move focus to the component.\n * @event blur - Programmatically remove focus from the component.\n *\n * @cssprop [--elena-input-color-text] - Controls the color of the text.\n * @cssprop [--elena-input-color-bg] - Controls the color of the background.\n * @cssprop [--elena-input-color-border] - Controls the color of the border.\n * @cssprop [--elena-input-radius] - Controls the radius of the component.\n */\nexport default class Input extends Elena(HTMLElement, options) {\n constructor() {\n super();\n\n /**\n * The size of the input.\n *\n * @attribute\n * @type {\"sm\" | \"md\" | \"lg\"}\n */\n this.size = \"md\";\n\n /**\n * Makes the component disabled.\n *\n * @attribute\n * @type {Boolean}\n */\n this.disabled = false;\n\n /**\n * The name used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.name = \"\";\n\n /**\n * The label for the input\n *\n * @attribute\n * @type {string}\n */\n this.label = \"\";\n\n /**\n * The value used to identify the input in forms.\n *\n * @attribute\n * @type {string}\n */\n this.value = \"\";\n\n /**\n * The placeholder text for the input.\n *\n * @attribute\n * @type {string}\n */\n this.placeholder = \"\";\n\n /**\n * The type of the input\n *\n * @attribute\n * @type {\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\" | \"button\"}\n */\n this.type = \"text\";\n\n /**\n * The error to display\n *\n * @attribute\n * @type {string}\n */\n this.error = \"\";\n }\n\n /**\n * Renders the template.\n *\n * @internal\n */\n render() {\n return html`\n <label for=\"input\">${this.label}</label>\n <div class=\"elena-input-container\">\n <span class=\"elena-input-start\"></span>\n <input\n id=\"input\"\n class=\"elena-input\"\n />\n <span class=\"elena-input-end\"></span>\n </div>\n ${this.error ? html`<div class=\"elena-error\" role=\"alert\">${this.error}</div>` : \"\"}\n `;\n }\n}\n\n/**\n * Register the web component\n */\nInput.define();\n"],"names":["options","tagName","props","events","element","Input","Elena","HTMLElement","constructor","super","this","size","disabled","name","label","value","placeholder","type","error","render","html","define"],"mappings":"+CAEA,MAAMA,EAAU,CACdC,QAAS,cACTC,MAAO,CAAC,OAAQ,WAAY,OAAQ,QAAS,OAAQ,QAAS,QAAS,eACvEC,OAAQ,CAAC,QAAS,QAAS,QAC3BC,QAAS,gBAkBI,MAAMC,UAAcC,EAAMC,YAAaP,IACpD,WAAAQ,GACEC,QAQAC,KAAKC,KAAO,KAQZD,KAAKE,UAAW,EAQhBF,KAAKG,KAAO,GAQZH,KAAKI,MAAQ,GAQbJ,KAAKK,MAAQ,GAQbL,KAAKM,YAAc,GAQnBN,KAAKO,KAAO,OAQZP,KAAKQ,MAAQ,EACf,CAOA,MAAAC,GACE,OAAOC,CAAI,sBACYV,KAAKI,6KASxBJ,KAAKQ,MAAQE,CAAI,yCAAyCV,KAAKQ,cAAgB,IAErF,EAMFb,EAAMgB"}
|
package/dist/stack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as e}from"./elena-
|
|
1
|
+
import{l as e}from"./elena-BN2AjG4V.js";const t={tagName:"elena-stack",props:["direction"]};class s extends(e(HTMLElement,t)){constructor(){super(),this.direction="column"}}s.define();export{s as default};
|
|
2
2
|
//# sourceMappingURL=stack.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elenajs/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Elena component library demonstrating how to build progressive web components.",
|
|
5
5
|
"author": "Elena <hi@elenajs.com>",
|
|
6
6
|
"homepage": "https://elenajs.com/",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"clean": "rm -rf dist/"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@elenajs/core": "^0.0.
|
|
36
|
+
"@elenajs/core": "^0.0.14"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@elenajs/bundler": "^0.0.8",
|
|
40
40
|
"@web/dev-server": "0.4.6"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ce1ee9b4fe96c108f13c842390f42858f448de4f"
|
|
43
43
|
}
|
package/dist/elena-BQHDXnxD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(e,t,n){if(t="boolean"===e&&"boolean"!=typeof t?null!==t:t,!n)return t;if("toAttribute"===n)switch(e){case"object":case"array":return null===t?null:JSON.stringify(t);case"boolean":return t?"":null;case"number":return null===t?null:t;default:return""===t?null:t}else switch(e){case"object":case"array":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn("░█ [ELENA]: Invalid JSON for prop, received: "+t),null}case"boolean":return t;case"number":return null!==t?+t:t;default:return t}}function t(e,t,n){e?null===n?e.removeAttribute(t):e.setAttribute(t,n):console.warn("░█ [ELENA]: Cannot sync attributes to a null element.")}let n=class extends Event{constructor(e,t){super(e,{bubbles:!0,composed:!0,...t})}};function r(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,e=>t[e])}function s(e,...t){const n=e.reduce((e,n,s)=>e+n+r(String(t[s]??"")),"");return{__raw:!0,toString:()=>n}}const i=new WeakMap;function l(e,t,n){(function(e,t,n){if(e._tplStrings!==t||!e._tplParts)return!1;let s=!1;for(let t=0;t<n.length;t++){const i=n[t],l=i&&i.__raw,o=l?String(i):r(String(i??""));if(o!==e._tplValues[t])if(e._tplValues[t]=o,l)s=!0;else{const n=e._tplParts[t];n?n.textContent=String(i??""):s=!0}}return!s})(e,t,n)||function(e,t,n){const s=n.map(e=>e&&e.__raw?String(e):r(String(e??"")));let l=i.get(t);l||(l=Array.from(t,e=>e.replace(/\n\s*/g," ")),i.set(t,l));const o=l.reduce((e,t,n)=>e+t+(s[n]??""),"").replace(/>\s+</g,"><").replace(/>\s+/g,">").replace(/\s+</g,"<").trim();(function(e,t){e?e.replaceChildren(e.ownerDocument.createRange().createContextualFragment(t)):console.warn("░█ [ELENA]: Cannot render to a null element.")})(e,o),e._tplStrings=t,e._tplValues=s,e._tplParts=function(e,t){const n=new Array(t.length),r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let s,i=0;for(;(s=r.nextNode())&&i<t.length;)s.textContent===t[i]&&(n[i]=s,i++);return n}(e,s)}(e,t,n)}function o(r,s){const i=s&&s.element?/^[a-z][a-z0-9-]*$/i.test(s.element)?e=>e.getElementsByClassName(s.element)[0]:e=>e.querySelector(s.element):e=>e.firstElementChild;class o extends r{element=null;attributeChangedCallback(t,n,r){(function(t,n,r,s){if(r!==s){const r=e(typeof t[n],s,"toProp");t[n]=r}})(this,t,n,r),this._hydrated&&n!==r&&!this._isRendering&&(this._isRendering=!0,this.render(),this._isRendering=!1)}static get observedAttributes(){return s&&s.props?s.props:[]}render(){}template(e,...t){l(this,e,t)}connectedCallback(){if(this.render(),this.element||(this.element=i(this),this.element||(s&&s.element&&console.warn("░█ [ELENA]: No element found, using firstElementChild as fallback."),this.element=this.firstElementChild)),this._props){const n=!(!s||!s.element);for(const[r,s]of this._props){const i=e(typeof s,s,"toAttribute");t(this,r,i),n&&t(this.element,r,i)}}!this._events&&s&&s.events&&(this._events=!0,s.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add("elena-hydrated"))}disconnectedCallback(){this._events&&(this._events=!1,s.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){s.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new n(e.type,{cancelable:!0})))}}return s&&s.props?.length&&function(n,r,s=!0){for(const i of r)Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(i):void 0},set(n){if(this._props||(this._props=new Map),n===this._props.get(i))return;if(this._props.set(i,n),!this.isConnected)return;const r=e(typeof n,n,"toAttribute");t(this,i,r),s&&this.element&&t(this.element,i,r)}})}(o.prototype,s.props,!(!s||!s.element)),s&&s.tagName&&(o._tagName=s.tagName),o.define=function(){this._tagName&&function(e,t){"undefined"!=typeof window&&"customElements"in window&&(window.customElements.get(e)||window.customElements.define(e,t))}(this._tagName,this)},o}export{s as e,o as l};
|
|
2
|
-
//# sourceMappingURL=elena-BQHDXnxD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elena-BQHDXnxD.js","sources":["../../core/dist/props.js","../../core/dist/events.js","../../core/dist/utils.js","../../core/dist/render.js","../../core/dist/elena.js"],"sourcesContent":["function e(e,t,r){if(t=\"boolean\"===e&&\"boolean\"!=typeof t?null!==t:t,!r)return t;if(\"toAttribute\"===r)switch(e){case\"object\":case\"array\":return null===t?null:JSON.stringify(t);case\"boolean\":return t?\"\":null;case\"number\":return null===t?null:t;default:return\"\"===t?null:t}else switch(e){case\"object\":case\"array\":if(!t)return t;try{return JSON.parse(t)}catch{return console.warn(\"░█ [ELENA]: Invalid JSON for prop, received: \"+t),null}case\"boolean\":return t;case\"number\":return null!==t?+t:t;default:return t}}function t(e,t,r){e?null===r?e.removeAttribute(t):e.setAttribute(t,r):console.warn(\"░█ [ELENA]: Cannot sync attributes to a null element.\")}function r(r,n,o=!0){for(const s of n)Object.defineProperty(r,s,{configurable:!0,enumerable:!0,get(){return this._props?this._props.get(s):void 0},set(r){if(this._props||(this._props=new Map),r===this._props.get(s))return;if(this._props.set(s,r),!this.isConnected)return;const n=e(typeof r,r,\"toAttribute\");t(this,s,n),o&&this.element&&t(this.element,s,n)}})}function n(t,r,n,o){if(n!==o){const n=e(typeof t[r],o,\"toProp\");t[r]=n}}export{e as getPropValue,n as getProps,r as setProps,t as syncAttribute};\n//# sourceMappingURL=props.js.map\n","class e extends Event{constructor(e,s){super(e,{bubbles:!0,composed:!0,...s})}}export{e as ElenaEvent};\n//# sourceMappingURL=events.js.map\n","function n(n,t){\"undefined\"!=typeof window&&\"customElements\"in window&&(window.customElements.get(n)||window.customElements.define(n,t))}function t(n){const t={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"};return String(n).replace(/[&<>\"']/g,n=>t[n])}function e(n,...e){const o=n.reduce((n,o,i)=>n+o+t(String(e[i]??\"\")),\"\");return{__raw:!0,toString:()=>o}}export{n as defineElement,t as escapeHtml,e as html};\n//# sourceMappingURL=utils.js.map\n","import{escapeHtml as t}from\"./utils.js\";const e=new WeakMap;function n(n,l,o){(function(e,n,r){if(e._tplStrings!==n||!e._tplParts)return!1;let l=!1;for(let n=0;n<r.length;n++){const o=r[n],a=o&&o.__raw,c=a?String(o):t(String(o??\"\"));if(c!==e._tplValues[n])if(e._tplValues[n]=c,a)l=!0;else{const t=e._tplParts[n];t?t.textContent=String(o??\"\"):l=!0}}return!l})(n,l,o)||function(n,l,o){const a=o.map(e=>e&&e.__raw?String(e):t(String(e??\"\")));let c=e.get(l);c||(c=Array.from(l,t=>t.replace(/\\n\\s*/g,\" \")),e.set(l,c));const s=c.reduce((t,e,n)=>t+e+(a[n]??\"\"),\"\").replace(/>\\s+</g,\"><\").replace(/>\\s+/g,\">\").replace(/\\s+</g,\"<\").trim();r(n,s),n._tplStrings=l,n._tplValues=a,n._tplParts=function(t,e){const n=new Array(e.length),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let l,o=0;for(;(l=r.nextNode())&&o<e.length;)l.textContent===e[o]&&(n[o]=l,o++);return n}(n,a)}(n,l,o)}function r(t,e){t?t.replaceChildren(t.ownerDocument.createRange().createContextualFragment(e)):console.warn(\"░█ [ELENA]: Cannot render to a null element.\")}export{r as renderHtml,n as renderTemplate};\n//# sourceMappingURL=render.js.map\n","import{setProps as e,getProps as t,getPropValue as s,syncAttribute as n}from\"./props.js\";import{ElenaEvent as i}from\"./events.js\";import{defineElement as r}from\"./utils.js\";export{html}from\"./utils.js\";import{renderTemplate as h}from\"./render.js\";function l(l,a){const o=a&&a.element?/^[a-z][a-z0-9-]*$/i.test(a.element)?e=>e.getElementsByClassName(a.element)[0]:e=>e.querySelector(a.element):e=>e.firstElementChild;class m extends l{element=null;attributeChangedCallback(e,s,n){t(this,e,s,n),this._hydrated&&s!==n&&!this._isRendering&&(this._isRendering=!0,this.render(),this._isRendering=!1)}static get observedAttributes(){return a&&a.props?a.props:[]}render(){}template(e,...t){h(this,e,t)}connectedCallback(){if(this.render(),this.element||(this.element=o(this),this.element||(a&&a.element&&console.warn(\"░█ [ELENA]: No element found, using firstElementChild as fallback.\"),this.element=this.firstElementChild)),this._props){const e=!(!a||!a.element);for(const[t,i]of this._props){const r=s(typeof i,i,\"toAttribute\");n(this,t,r),e&&n(this.element,t,r)}}!this._events&&a&&a.events&&(this._events=!0,a.events?.forEach(e=>{this.element.addEventListener(e,this),this[e]=(...t)=>this.element[e](...t)})),this.updated()}updated(){this._hydrated||(this._hydrated=!0,this.classList.add(\"elena-hydrated\"))}disconnectedCallback(){this._events&&(this._events=!1,a.events?.forEach(e=>{this.element?.removeEventListener(e,this)}))}handleEvent(e){a.events?.includes(e.type)&&(e.stopPropagation(),this.dispatchEvent(new i(e.type,{cancelable:!0})))}}return a&&a.props?.length&&e(m.prototype,a.props,!(!a||!a.element)),a&&a.tagName&&(m._tagName=a.tagName),m.define=function(){this._tagName&&r(this._tagName,this)},m}export{l as Elena};\n//# sourceMappingURL=elena.js.map\n"],"names":["e","t","r","JSON","stringify","parse","console","warn","removeAttribute","setAttribute","e$2","Event","constructor","s","super","bubbles","composed","n","String","replace","o","reduce","i","__raw","toString","WeakMap","l","_tplStrings","_tplParts","length","a","c","_tplValues","textContent","map","get","Array","from","set","trim","replaceChildren","ownerDocument","createRange","createContextualFragment","document","createTreeWalker","NodeFilter","SHOW_TEXT","nextNode","element","test","getElementsByClassName","querySelector","firstElementChild","m","attributeChangedCallback","this","_hydrated","_isRendering","render","observedAttributes","props","template","h","connectedCallback","_props","_events","events","forEach","addEventListener","updated","classList","add","disconnectedCallback","removeEventListener","handleEvent","includes","type","stopPropagation","dispatchEvent","cancelable","Object","defineProperty","configurable","enumerable","Map","isConnected","prototype","tagName","_tagName","define","window","customElements"],"mappings":"AAAA,SAASA,EAAEA,EAAEC,EAAEC,GAAG,GAAGD,EAAE,YAAYD,GAAG,kBAAkBC,EAAE,OAAOA,EAAEA,GAAGC,EAAE,OAAOD,EAAE,GAAG,gBAAgBC,EAAE,OAAOF,GAAG,IAAI,SAAS,IAAI,QAAQ,OAAO,OAAOC,EAAE,KAAKE,KAAKC,UAAUH,GAAG,IAAI,UAAU,OAAOA,EAAE,GAAG,KAAK,IAAI,SAAS,OAAO,OAAOA,EAAE,KAAKA,EAAE,QAAQ,MAAM,KAAKA,EAAE,KAAKA,OAAO,OAAOD,GAAG,IAAI,SAAS,IAAI,QAAQ,IAAIC,EAAE,OAAOA,EAAE,IAAI,OAAOE,KAAKE,MAAMJ,EAAE,CAAC,MAAM,OAAOK,QAAQC,KAAK,gDAAgDN,GAAG,IAAI,CAAC,IAAI,UAAU,OAAOA,EAAE,IAAI,SAAS,OAAO,OAAOA,GAAGA,EAAEA,EAAE,QAAQ,OAAOA,EAAE,CAAC,SAASA,EAAED,EAAEC,EAAEC,GAAGF,EAAE,OAAOE,EAAEF,EAAEQ,gBAAgBP,GAAGD,EAAES,aAAaR,EAAEC,GAAGI,QAAQC,KAAK,wDAAwD,CCAvoB,IAAAG,EAAA,cAAgBC,MAAM,WAAAC,CAAYZ,EAAEa,GAAGC,MAAMd,EAAE,CAACe,SAAQ,EAAGC,UAAS,KAAMH,GAAG,GCA4D,SAASZ,EAAEgB,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