@nuralyui/card 0.0.5 → 0.0.7
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/bundle.js +128 -0
- package/card.component.d.ts +23 -2
- package/card.component.js +37 -13
- package/card.component.js.map +1 -1
- package/card.style.js +45 -51
- package/card.style.js.map +1 -1
- package/card.types.d.ts +17 -0
- package/card.types.js +2 -0
- package/card.types.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +16 -2
- package/react.d.ts +2 -2
- package/react.js +4 -4
- package/react.js.map +1 -1
- package/card.component.d.ts.map +0 -1
- package/card.style.d.ts.map +0 -1
- package/card.type.d.ts +0 -6
- package/card.type.d.ts.map +0 -1
- package/card.type.js +0 -2
- package/card.type.js.map +0 -1
- package/demo/hy-card-demo.d.ts +0 -8
- package/demo/hy-card-demo.d.ts.map +0 -1
- package/demo/hy-card-demo.js +0 -44
- package/demo/hy-card-demo.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/react.d.ts.map +0 -1
package/bundle.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t=window,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),e=new WeakMap;class n{constructor(t,i,e){if(this._$cssResult$=!0,e!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const s=this.t;if(i&&void 0===t){const i=void 0!==s&&1===s.length;i&&(t=e.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&e.set(s,t))}return t}toString(){return this.cssText}}const r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,s))(i)})(t):t
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/;var o;const h=window,l=h.trustedTypes,a=l?l.emptyScript:"",d=h.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},u=(t,i)=>i!==t&&(i==i||t==t),v={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:u},f="finalized";class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=v){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const n=this[t];this[i]=e,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty(f))return!1;this[f]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(r(t))}else void 0!==t&&i.push(r(t));return i}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var s;const e=null!==(s=this.shadowRoot)&&void 0!==s?s:this.attachShadow(this.constructor.shadowRootOptions);return((s,e)=>{i?s.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((i=>{const e=document.createElement("style"),n=t.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,s.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 i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=v){var e;const n=this.constructor._$Ep(t,s);if(void 0!==n&&!0===s.reflect){const r=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:c).toAttribute(i,s.type);this._$El=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,n=e._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=e.getPropertyOptions(n),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:c;this._$El=n,this[n]=r.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):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,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
var g;p[f]=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:p}),(null!==(o=h.reactiveElementVersions)&&void 0!==o?o:h.reactiveElementVersions=[]).push("1.6.3");const y=window,m=y.trustedTypes,b=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,_="?"+$,A=`<${_}>`,S=document,E=()=>S.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,C="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,T=/>/g,U=RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,z=/"/g,R=/^(?:script|style|textarea|title)$/i,N=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),I=new WeakMap,P=S.createTreeWalker(S,129,null,!1);function L(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==b?b.createHTML(i):i}class K{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[l,a]=((t,i)=>{const s=t.length-1,e=[];let n,r=2===i?"<svg>":"",o=j;for(let i=0;i<s;i++){const s=t[i];let h,l,a=-1,d=0;for(;d<s.length&&(o.lastIndex=d,l=o.exec(s),null!==l);)d=o.lastIndex,o===j?"!--"===l[1]?o=O:void 0!==l[1]?o=T:void 0!==l[2]?(R.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=U):void 0!==l[3]&&(o=U):o===U?">"===l[0]?(o=null!=n?n:j,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?U:'"'===l[3]?z:M):o===z||o===M?o=U:o===O||o===T?o=j:(o=U,n=void 0);const c=o===U&&t[i+1].startsWith("/>")?" ":"";r+=o===j?s+A:a>=0?(e.push(h),s.slice(0,a)+w+s.slice(a)+$+c):s+$+(-2===a?(e.push(void 0),i):c)}return[L(t,r+(t[s]||"<?>")+(2===i?"</svg>":"")),e]})(t,i);if(this.el=K.createElement(l,s),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=P.nextNode())&&h.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith(w)||i.startsWith($)){const s=a[r++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+w).split($),i=/([.?@])?(.*)/.exec(s);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?F:"?"===i[1]?B:"@"===i[1]?J:W})}else h.push({type:6,index:n})}for(const i of t)e.removeAttribute(i)}if(R.test(e.tagName)){const t=e.textContent.split($),i=t.length-1;if(i>0){e.textContent=m?m.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],E()),P.nextNode(),h.push({type:2,index:++n});e.append(t[i],E())}}}else if(8===e.nodeType)if(e.data===_)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf($,t+1));)h.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,i){const s=S.createElement("template");return s.innerHTML=t,s}}function q(t,i,s=t,e){var n,r,o,h;if(i===N)return i;let l=void 0!==e?null===(n=s._$Co)||void 0===n?void 0:n[e]:s._$Cl;const a=x(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,s,e)),void 0!==e?(null!==(o=(h=s)._$Co)&&void 0!==o?o:h._$Co=[])[e]=l:s._$Cl=l),void 0!==l&&(i=q(t,l._$AS(t,i.values),l,e)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(s,!0);P.currentNode=n;let r=P.nextNode(),o=0,h=0,l=e[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new V(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new G(r,this,t)),this._$AV.push(i),l=e[++h]}o!==(null==l?void 0:l.index)&&(r=P.nextNode(),o++)}return P.currentNode=S,n}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class V{constructor(t,i,s,e){var n;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(n=null==e?void 0:e.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=q(this,t,i),x(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>k(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&&x(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,n="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=K.createElement(L(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(s);else{const t=new H(n,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=I.get(t.strings);return void 0===i&&I.set(t.strings,i=new K(t)),i}T(t){k(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const n of t)e===i.length?i.push(s=new V(this.k(E()),this.k(E()),this,this.options)):s=i[e],s._$AI(n),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class W{constructor(t,i,s,e,n){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const n=this.strings;let r=!1;if(void 0===n)t=q(this,t,i,0),r=!x(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const e=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=q(this,e[s+o],i,o),h===N&&(h=this._$AH[o]),r||(r=!x(h)||h!==this._$AH[o]),h===D?t=D:t!==D&&(t+=(null!=h?h:"")+n[o+1]),this._$AH[o]=h}r&&!e&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends W{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const Z=m?m.emptyScript:"";class B extends W{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class J extends W{constructor(t,i,s,e,n){super(t,i,s,e,n),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=q(this,t,i,0))&&void 0!==s?s:D)===N)return;const e=this._$AH,n=t===D&&e!==D||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==D&&(e===D||n);n&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class G{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){q(this,t)}}const Q=y.litHtmlPolyfillSupport;
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/
|
|
23
|
+
var X;null==Q||Q(K,V),(null!==(g=y.litHtmlVersions)&&void 0!==g?g:y.litHtmlVersions=[]).push("2.8.0");const Y=window,tt=Y.trustedTypes,it=tt?tt.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",et=`lit$${(Math.random()+"").slice(9)}$`,nt="?"+et,rt=`<${nt}>`,ot=document,ht=()=>ot.createComment(""),lt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,at=Array.isArray,dt="[ \t\n\f\r]",ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,vt=/>/g,ft=RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,gt=/"/g,yt=/^(?:script|style|textarea|title)$/i,mt=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),bt=Symbol.for("lit-noChange"),wt=Symbol.for("lit-nothing"),$t=new WeakMap,_t=ot.createTreeWalker(ot,129,null,!1);function At(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==it?it.createHTML(i):i}const St=(t,i)=>{const s=t.length-1,e=[];let n,r=2===i?"<svg>":"",o=ct;for(let i=0;i<s;i++){const s=t[i];let h,l,a=-1,d=0;for(;d<s.length&&(o.lastIndex=d,l=o.exec(s),null!==l);)d=o.lastIndex,o===ct?"!--"===l[1]?o=ut:void 0!==l[1]?o=vt:void 0!==l[2]?(yt.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=ft):void 0!==l[3]&&(o=ft):o===ft?">"===l[0]?(o=null!=n?n:ct,a=-1):void 0===l[1]?a=-2:(a=o.lastIndex-l[2].length,h=l[1],o=void 0===l[3]?ft:'"'===l[3]?gt:pt):o===gt||o===pt?o=ft:o===ut||o===vt?o=ct:(o=ft,n=void 0);const c=o===ft&&t[i+1].startsWith("/>")?" ":"";r+=o===ct?s+rt:a>=0?(e.push(h),s.slice(0,a)+st+s.slice(a)+et+c):s+et+(-2===a?(e.push(void 0),i):c)}return[At(t,r+(t[s]||"<?>")+(2===i?"</svg>":"")),e]};class Et{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[l,a]=St(t,i);if(this.el=Et.createElement(l,s),_t.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=_t.nextNode())&&h.length<o;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith(st)||i.startsWith(et)){const s=a[r++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+st).split(et),i=/([.?@])?(.*)/.exec(s);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?Ot:"?"===i[1]?Ut:"@"===i[1]?Mt:jt})}else h.push({type:6,index:n})}for(const i of t)e.removeAttribute(i)}if(yt.test(e.tagName)){const t=e.textContent.split(et),i=t.length-1;if(i>0){e.textContent=tt?tt.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],ht()),_t.nextNode(),h.push({type:2,index:++n});e.append(t[i],ht())}}}else if(8===e.nodeType)if(e.data===nt)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=e.data.indexOf(et,t+1));)h.push({type:7,index:n}),t+=et.length-1}n++}}static createElement(t,i){const s=ot.createElement("template");return s.innerHTML=t,s}}function xt(t,i,s=t,e){var n,r,o,h;if(i===bt)return i;let l=void 0!==e?null===(n=s._$Co)||void 0===n?void 0:n[e]:s._$Cl;const a=lt(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,s,e)),void 0!==e?(null!==(o=(h=s)._$Co)&&void 0!==o?o:h._$Co=[])[e]=l:s._$Cl=l),void 0!==l&&(i=xt(t,l._$AS(t,i.values),l,e)),i}class kt{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:ot).importNode(s,!0);_t.currentNode=n;let r=_t.nextNode(),o=0,h=0,l=e[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new Ct(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new zt(r,this,t)),this._$AV.push(i),l=e[++h]}o!==(null==l?void 0:l.index)&&(r=_t.nextNode(),o++)}return _t.currentNode=ot,n}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class Ct{constructor(t,i,s,e){var n;this.type=2,this._$AH=wt,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(n=null==e?void 0:e.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=xt(this,t,i),lt(t)?t===wt||null==t||""===t?(this._$AH!==wt&&this._$AR(),this._$AH=wt):t!==this._$AH&&t!==bt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>at(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!==wt&<(this._$AH)?this._$AA.nextSibling.data=t:this.$(ot.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,n="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=Et.createElement(At(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(s);else{const t=new kt(n,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=$t.get(t.strings);return void 0===i&&$t.set(t.strings,i=new Et(t)),i}T(t){at(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const n of t)e===i.length?i.push(s=new Ct(this.k(ht()),this.k(ht()),this,this.options)):s=i[e],s._$AI(n),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class jt{constructor(t,i,s,e,n){this.type=1,this._$AH=wt,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=wt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const n=this.strings;let r=!1;if(void 0===n)t=xt(this,t,i,0),r=!lt(t)||t!==this._$AH&&t!==bt,r&&(this._$AH=t);else{const e=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=xt(this,e[s+o],i,o),h===bt&&(h=this._$AH[o]),r||(r=!lt(h)||h!==this._$AH[o]),h===wt?t=wt:t!==wt&&(t+=(null!=h?h:"")+n[o+1]),this._$AH[o]=h}r&&!e&&this.j(t)}j(t){t===wt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Ot extends jt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===wt?void 0:t}}const Tt=tt?tt.emptyScript:"";class Ut extends jt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==wt?this.element.setAttribute(this.name,Tt):this.element.removeAttribute(this.name)}}class Mt extends jt{constructor(t,i,s,e,n){super(t,i,s,e,n),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=xt(this,t,i,0))&&void 0!==s?s:wt)===bt)return;const e=this._$AH,n=t===wt&&e!==wt||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==wt&&(e===wt||n);n&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class zt{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){xt(this,t)}}const Rt=Y.litHtmlPolyfillSupport;null==Rt||Rt(Et,Ct),(null!==(X=Y.litHtmlVersions)&&void 0!==X?X:Y.litHtmlVersions=[]).push("2.8.0");
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2017 Google LLC
|
|
27
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
+
*/
|
|
29
|
+
var Nt,Dt;class It extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,i,s)=>{var e,n;const r=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new Ct(i.insertBefore(ht(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return bt}}It.finalized=!0,It._$litElement$=!0,null===(Nt=globalThis.litElementHydrateSupport)||void 0===Nt||Nt.call(globalThis,{LitElement:It});const Pt=globalThis.litElementPolyfillSupport;null==Pt||Pt({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,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(s){s.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(s){s.createProperty(i.key,t)}};
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright 2017 Google LLC
|
|
39
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
+
*/function Kt(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):Lt(t,i)
|
|
41
|
+
/**
|
|
42
|
+
* @license
|
|
43
|
+
* Copyright 2021 Google LLC
|
|
44
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
+
*/}var qt;null===(qt=window.HTMLSlotElement)||void 0===qt||qt.prototype.assignedElements;const Ht=((t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,s,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[e+1]),t[0]);return new n(e,t,s)})`
|
|
46
|
+
:host {
|
|
47
|
+
display: block;
|
|
48
|
+
color: var(--nuraly-color-text);
|
|
49
|
+
background-color: var(--nuraly-color-background);
|
|
50
|
+
font-family: var(--nuraly-card-font-family);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.card {
|
|
54
|
+
background-color: var(--nuraly-card-background-color);
|
|
55
|
+
border-radius: var(--nuraly-card-border-radius);
|
|
56
|
+
border: var(--nuraly-card-border);
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
transition: var(--nuraly-card-transition);
|
|
59
|
+
box-shadow: var(--nuraly-card-shadow);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.card:hover {
|
|
63
|
+
cursor: var(--nuraly-card-cursor);
|
|
64
|
+
box-shadow: var(--nuraly-card-hover-shadow);
|
|
65
|
+
background-color: var(--nuraly-card-hover-background-color);
|
|
66
|
+
border-color: var(--nuraly-card-hover-border-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.card__header {
|
|
70
|
+
font-weight: var(--nuraly-card-header-font-weight);
|
|
71
|
+
border-bottom: var(--nuraly-card-header-border-bottom);
|
|
72
|
+
padding: var(--nuraly-card-padding);
|
|
73
|
+
background-color: var(--nuraly-card-header-background-color);
|
|
74
|
+
font-size: var(--nuraly-card-font-size);
|
|
75
|
+
color: var(--nuraly-card-header-color);
|
|
76
|
+
line-height: var(--nuraly-card-line-height);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.card__content {
|
|
80
|
+
padding: var(--nuraly-card-padding);
|
|
81
|
+
color: var(--nuraly-card-content-color);
|
|
82
|
+
font-size: var(--nuraly-card-font-size);
|
|
83
|
+
line-height: var(--nuraly-card-line-height);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Size variants */
|
|
87
|
+
.card--small .card__header,
|
|
88
|
+
.card--small .card__content {
|
|
89
|
+
padding: var(--nuraly-card-small-padding);
|
|
90
|
+
font-size: var(--nuraly-card-small-font-size);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.card--large .card__header,
|
|
94
|
+
.card--large .card__content {
|
|
95
|
+
padding: var(--nuraly-card-large-padding);
|
|
96
|
+
font-size: var(--nuraly-card-large-font-size);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Focus styles for accessibility */
|
|
100
|
+
.card:focus-within {
|
|
101
|
+
outline: var(--nuraly-card-focus-outline);
|
|
102
|
+
outline-offset: var(--nuraly-card-focus-offset);
|
|
103
|
+
}
|
|
104
|
+
`
|
|
105
|
+
/**
|
|
106
|
+
* @license
|
|
107
|
+
* Copyright 2017 Google LLC
|
|
108
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
109
|
+
*/,Vt=1;class Wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,s){this._$Ct=t,this._$AM=i,this._$Ci=s}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}
|
|
110
|
+
/**
|
|
111
|
+
* @license
|
|
112
|
+
* Copyright 2018 Google LLC
|
|
113
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
+
*/const Ft=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends Wt{constructor(t){var i;if(super(t),t.type!==Vt||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var s,e;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(s=this.nt)||void 0===s?void 0:s.has(t))&&this.it.add(t);return this.render(i)}const n=t.element.classList;this.it.forEach((t=>{t in i||(n.remove(t),this.it.delete(t))}));for(const t in i){const s=!!i[t];s===this.it.has(t)||(null===(e=this.nt)||void 0===e?void 0:e.has(t))||(s?(n.add(t),this.it.add(t)):(n.remove(t),this.it.delete(t)))}return N}}),Zt=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupDesignSystemObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,i,s;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(i=this.designSystemObserver)||void 0===i||i.disconnect(),null===(s=this.mediaQuery)||void 0===s||s.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,i;const s=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return s||((null===(i=window.matchMedia)||void 0===i?void 0:i.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const i=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===i?i:"default"}setupThemeObserver(){this.themeObserver=new MutationObserver((()=>{this.requestUpdate()})),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupDesignSystemObserver(){this.designSystemObserver=new MutationObserver((()=>{this.requestUpdate()})),this.designSystemObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["design-system"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},Bt=()=>{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(Bt())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(!Bt())return!0;let i=!0;for(const s of this.requiredComponents)if(!this.isComponentAvailable(s)){i=!1;const e=new Error(`Required component "${s}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(s,e):console.error(e.message)}return i}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter((t=>!this.isComponentAvailable(t)))}areDependenciesAvailable(){return this.requiredComponents.every((t=>this.isComponentAvailable(t)))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const i=this.requiredComponents.indexOf(t);i>-1&&this.requiredComponents.splice(i,1)}},Gt=t=>class extends t{dispatchCustomEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,i){var s;const e=Object.assign(Object.assign({},i),{timestamp:Date.now(),componentName:(null===(s=this.tagName)||void 0===s?void 0:s.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,e)}dispatchInputEvent(t,i){const s=Object.assign({target:i.target||this,value:i.value,originalEvent:i.originalEvent},i);this.dispatchCustomEvent(t,s)}dispatchFocusEvent(t,i){const s=Object.assign({target:i.target||this,value:i.value,focused:i.focused,cursorPosition:i.cursorPosition,selectedText:i.selectedText},i);this.dispatchCustomEvent(t,s)}dispatchValidationEvent(t,i){var s;const e=Object.assign({target:i.target||this,value:i.value,isValid:null!==(s=i.isValid)&&void 0!==s&&s,error:i.error},i);this.dispatchCustomEvent(t,e)}dispatchActionEvent(t,i){const s=Object.assign({target:i.target||this,action:i.action,previousValue:i.previousValue,newValue:i.newValue},i);this.dispatchCustomEvent(t,s)}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}};
|
|
115
|
+
/**
|
|
116
|
+
* @license
|
|
117
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
118
|
+
* SPDX-License-Identifier: MIT
|
|
119
|
+
*/var Qt=function(t,i,s,e){for(var n,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(i,s,o):n(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o};let Xt=class extends((t=>Jt(Zt(Gt(t))))(It)){constructor(){super(...arguments),this.header="",this.size="default"}render(){return mt`
|
|
120
|
+
<div
|
|
121
|
+
class="card ${Ft({"card--small":"small"===this.size,"card--large":"large"===this.size})}"
|
|
122
|
+
>
|
|
123
|
+
${this.header?mt`<div class="card__header">${this.header}</div>`:""}
|
|
124
|
+
<div class="card__content">
|
|
125
|
+
<slot name="content"></slot>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
`}};Xt.styles=Ht,Qt([Kt({type:String})],Xt.prototype,"header",void 0),Qt([Kt({type:String})],Xt.prototype,"size",void 0),Xt=Qt([(t=>i=>"function"==typeof i?((t,i)=>(customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){customElements.define(t,i)}}})(t,i))("nr-card")],Xt);export{Xt as NrCardElement};
|
package/card.component.d.ts
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { CardSize } from './card.
|
|
3
|
-
|
|
2
|
+
import { CardSize } from './card.types.js';
|
|
3
|
+
declare const NrCardElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
|
|
4
|
+
/**
|
|
5
|
+
* Card component for displaying content in a structured container
|
|
6
|
+
*
|
|
7
|
+
* @element nr-card
|
|
8
|
+
* @slot content - Content to be displayed in the card body
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <nr-card header="Card Title" size="medium">
|
|
13
|
+
* <div slot="content">Card content goes here</div>
|
|
14
|
+
* </nr-card>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class NrCardElement extends NrCardElement_base {
|
|
4
18
|
static styles: import("lit").CSSResult;
|
|
19
|
+
/**
|
|
20
|
+
* Header text displayed at the top of the card
|
|
21
|
+
*/
|
|
5
22
|
header: string;
|
|
23
|
+
/**
|
|
24
|
+
* Size variant of the card
|
|
25
|
+
*/
|
|
6
26
|
size: CardSize;
|
|
7
27
|
render(): import("lit").TemplateResult<1>;
|
|
8
28
|
}
|
|
29
|
+
export {};
|
|
9
30
|
//# sourceMappingURL=card.component.d.ts.map
|
package/card.component.js
CHANGED
|
@@ -8,33 +8,57 @@ import { html, LitElement } from 'lit';
|
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
9
|
import { styles } from './card.style.js';
|
|
10
10
|
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
-
|
|
11
|
+
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
12
|
+
/**
|
|
13
|
+
* Card component for displaying content in a structured container
|
|
14
|
+
*
|
|
15
|
+
* @element nr-card
|
|
16
|
+
* @slot content - Content to be displayed in the card body
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <nr-card header="Card Title" size="medium">
|
|
21
|
+
* <div slot="content">Card content goes here</div>
|
|
22
|
+
* </nr-card>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
let NrCardElement = class NrCardElement extends NuralyUIBaseMixin(LitElement) {
|
|
12
26
|
constructor() {
|
|
13
27
|
super(...arguments);
|
|
28
|
+
/**
|
|
29
|
+
* Header text displayed at the top of the card
|
|
30
|
+
*/
|
|
31
|
+
this.header = '';
|
|
32
|
+
/**
|
|
33
|
+
* Size variant of the card
|
|
34
|
+
*/
|
|
14
35
|
this.size = "default" /* CardSize.Default */;
|
|
15
36
|
}
|
|
16
37
|
render() {
|
|
17
38
|
return html `
|
|
18
39
|
<div
|
|
19
|
-
class="card ${classMap({
|
|
40
|
+
class="card ${classMap({
|
|
41
|
+
'card--small': this.size === "small" /* CardSize.Small */,
|
|
42
|
+
'card--large': this.size === "large" /* CardSize.Large */
|
|
43
|
+
})}"
|
|
20
44
|
>
|
|
21
|
-
|
|
22
|
-
<div class="
|
|
45
|
+
${this.header ? html `<div class="card__header">${this.header}</div>` : ''}
|
|
46
|
+
<div class="card__content">
|
|
23
47
|
<slot name="content"></slot>
|
|
24
48
|
</div>
|
|
25
49
|
</div>
|
|
26
50
|
`;
|
|
27
51
|
}
|
|
28
52
|
};
|
|
29
|
-
|
|
53
|
+
NrCardElement.styles = styles;
|
|
30
54
|
__decorate([
|
|
31
|
-
property()
|
|
32
|
-
],
|
|
55
|
+
property({ type: String })
|
|
56
|
+
], NrCardElement.prototype, "header", void 0);
|
|
33
57
|
__decorate([
|
|
34
|
-
property()
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
customElement('
|
|
38
|
-
],
|
|
39
|
-
export {
|
|
58
|
+
property({ type: String })
|
|
59
|
+
], NrCardElement.prototype, "size", void 0);
|
|
60
|
+
NrCardElement = __decorate([
|
|
61
|
+
customElement('nr-card')
|
|
62
|
+
], NrCardElement);
|
|
63
|
+
export { NrCardElement };
|
|
40
64
|
//# sourceMappingURL=card.component.js.map
|
package/card.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.component.js","sourceRoot":"","sources":["../../../src/components/card/card.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card.component.js","sourceRoot":"","sources":["../../../src/components/card/card.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;;;;;;;;;GAYG;AAEH,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,iBAAiB,CAAC,UAAU,CAAC;IAAhE;;QAGE;;WAEG;QACyB,WAAM,GAAG,EAAE,CAAC;QAExC;;WAEG;QACyB,SAAI,oCAAoB;IAiBtD,CAAC;IAfU,MAAM;QACb,OAAO,IAAI,CAAA;;sBAEO,QAAQ,CAAC;YACrB,aAAa,EAAE,IAAI,CAAC,IAAI,iCAAmB;YAC3C,aAAa,EAAE,IAAI,CAAC,IAAI,iCAAmB;SAC5C,CAAC;;UAEA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,6BAA6B,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE;;;;;KAK5E,CAAC;IACJ,CAAC;CACF,CAAA;AA3BiB,oBAAM,GAAG,MAAO,CAAA;AAKJ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAa;AAKZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAyB;AAXzC,aAAa;IADzB,aAAa,CAAC,SAAS,CAAC;GACZ,aAAa,CA4BzB;SA5BY,aAAa","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './card.style.js';\nimport { CardSize } from './card.types.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { NuralyUIBaseMixin } from '@nuralyui/common/mixins';\n\n/**\n * Card component for displaying content in a structured container\n * \n * @element nr-card\n * @slot content - Content to be displayed in the card body\n * \n * @example\n * ```html\n * <nr-card header=\"Card Title\" size=\"medium\">\n * <div slot=\"content\">Card content goes here</div>\n * </nr-card>\n * ```\n */\n@customElement('nr-card')\nexport class NrCardElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n /**\n * Header text displayed at the top of the card\n */\n @property({ type: String }) header = '';\n\n /**\n * Size variant of the card\n */\n @property({ type: String }) size = CardSize.Default;\n\n override render() {\n return html`\n <div\n class=\"card ${classMap({\n 'card--small': this.size === CardSize.Small,\n 'card--large': this.size === CardSize.Large\n })}\"\n >\n ${this.header ? html`<div class=\"card__header\">${this.header}</div>` : ''}\n <div class=\"card__content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
|
package/card.style.js
CHANGED
|
@@ -1,68 +1,62 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.card-header {
|
|
10
|
-
font-weight: bold;
|
|
11
|
-
border-bottom: var(--hybrid-card-header-border-bottom);
|
|
12
|
-
padding: var(--hybrid-card-padding);
|
|
13
|
-
background-color: var(--hybrid-card-header-background-color);
|
|
14
|
-
font-size: var(--hybrid-card-font-size);
|
|
15
|
-
color: var(--hybrid-card-header-color);
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
color: var(--nuraly-color-text);
|
|
6
|
+
background-color: var(--nuraly-color-background);
|
|
7
|
+
font-family: var(--nuraly-card-font-family);
|
|
16
8
|
}
|
|
17
9
|
|
|
18
|
-
.card
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
.card {
|
|
11
|
+
background-color: var(--nuraly-card-background-color);
|
|
12
|
+
border-radius: var(--nuraly-card-border-radius);
|
|
13
|
+
border: var(--nuraly-card-border);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: var(--nuraly-card-transition);
|
|
16
|
+
box-shadow: var(--nuraly-card-shadow);
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
.card:hover {
|
|
25
|
-
cursor:
|
|
20
|
+
cursor: var(--nuraly-card-cursor);
|
|
21
|
+
box-shadow: var(--nuraly-card-hover-shadow);
|
|
22
|
+
background-color: var(--nuraly-card-hover-background-color);
|
|
23
|
+
border-color: var(--nuraly-card-hover-border-color);
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
.card__header {
|
|
27
|
+
font-weight: var(--nuraly-card-header-font-weight);
|
|
28
|
+
border-bottom: var(--nuraly-card-header-border-bottom);
|
|
29
|
+
padding: var(--nuraly-card-padding);
|
|
30
|
+
background-color: var(--nuraly-card-header-background-color);
|
|
31
|
+
font-size: var(--nuraly-card-font-size);
|
|
32
|
+
color: var(--nuraly-card-header-color);
|
|
33
|
+
line-height: var(--nuraly-card-line-height);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
font-size: var(--
|
|
36
|
+
.card__content {
|
|
37
|
+
padding: var(--nuraly-card-padding);
|
|
38
|
+
color: var(--nuraly-card-content-color);
|
|
39
|
+
font-size: var(--nuraly-card-font-size);
|
|
40
|
+
line-height: var(--nuraly-card-line-height);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
|
|
46
|
-
--hybrid-card-padding: 13px;
|
|
47
|
-
--hybrid-card-header-color: #000000;
|
|
48
|
-
--hybrid-card-content-color: #000000;
|
|
49
|
-
|
|
50
|
-
--hybrid-card-small-font-size: 13px;
|
|
51
|
-
--hybrid-card-small-padding: 8px;
|
|
43
|
+
/* Size variants */
|
|
44
|
+
.card--small .card__header,
|
|
45
|
+
.card--small .card__content {
|
|
46
|
+
padding: var(--nuraly-card-small-padding);
|
|
47
|
+
font-size: var(--nuraly-card-small-font-size);
|
|
48
|
+
}
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
.card--large .card__header,
|
|
51
|
+
.card--large .card__content {
|
|
52
|
+
padding: var(--nuraly-card-large-padding);
|
|
53
|
+
font-size: var(--nuraly-card-large-font-size);
|
|
55
54
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--hybrid-card-header-border-bottom: 1px solid #404040;
|
|
62
|
-
--hybrid-card-header-color: #ffffff;
|
|
63
|
-
--hybrid-card-content-color: #ffffff;
|
|
64
|
-
}
|
|
55
|
+
|
|
56
|
+
/* Focus styles for accessibility */
|
|
57
|
+
.card:focus-within {
|
|
58
|
+
outline: var(--nuraly-card-focus-outline);
|
|
59
|
+
outline-offset: var(--nuraly-card-focus-offset);
|
|
65
60
|
}
|
|
66
61
|
`;
|
|
67
|
-
export const styles = cardStyles;
|
|
68
62
|
//# sourceMappingURL=card.style.js.map
|
package/card.style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.style.js","sourceRoot":"","sources":["../../../src/components/card/card.style.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card.style.js","sourceRoot":"","sources":["../../../src/components/card/card.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: block;\n color: var(--nuraly-color-text);\n background-color: var(--nuraly-color-background);\n font-family: var(--nuraly-card-font-family);\n }\n\n .card {\n background-color: var(--nuraly-card-background-color);\n border-radius: var(--nuraly-card-border-radius);\n border: var(--nuraly-card-border);\n overflow: hidden;\n transition: var(--nuraly-card-transition);\n box-shadow: var(--nuraly-card-shadow);\n }\n\n .card:hover {\n cursor: var(--nuraly-card-cursor);\n box-shadow: var(--nuraly-card-hover-shadow);\n background-color: var(--nuraly-card-hover-background-color);\n border-color: var(--nuraly-card-hover-border-color);\n }\n\n .card__header {\n font-weight: var(--nuraly-card-header-font-weight);\n border-bottom: var(--nuraly-card-header-border-bottom);\n padding: var(--nuraly-card-padding);\n background-color: var(--nuraly-card-header-background-color);\n font-size: var(--nuraly-card-font-size);\n color: var(--nuraly-card-header-color);\n line-height: var(--nuraly-card-line-height);\n }\n\n .card__content {\n padding: var(--nuraly-card-padding);\n color: var(--nuraly-card-content-color);\n font-size: var(--nuraly-card-font-size);\n line-height: var(--nuraly-card-line-height);\n }\n\n /* Size variants */\n .card--small .card__header,\n .card--small .card__content {\n padding: var(--nuraly-card-small-padding);\n font-size: var(--nuraly-card-small-font-size);\n }\n\n .card--large .card__header,\n .card--large .card__content {\n padding: var(--nuraly-card-large-padding);\n font-size: var(--nuraly-card-large-font-size);\n }\n\n /* Focus styles for accessibility */\n .card:focus-within {\n outline: var(--nuraly-card-focus-outline);\n outline-offset: var(--nuraly-card-focus-offset);\n }\n`;\n"]}
|
package/card.types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card size variants
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum CardSize {
|
|
5
|
+
Small = "small",
|
|
6
|
+
Default = "default",
|
|
7
|
+
Large = "large"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Card configuration interface
|
|
11
|
+
*/
|
|
12
|
+
export interface CardConfig {
|
|
13
|
+
header?: string;
|
|
14
|
+
size?: CardSize;
|
|
15
|
+
clickable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=card.types.d.ts.map
|
package/card.types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.types.js","sourceRoot":"","sources":["../../../src/components/card/card.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Card size variants\n */\nexport const enum CardSize {\n Small = 'small',\n Default = 'default',\n Large = 'large',\n}\n\n/**\n * Card configuration interface\n */\nexport interface CardConfig {\n header?: string;\n size?: CardSize;\n clickable?: boolean;\n}\n"]}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './card.component.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './card.component.js';\nexport * from './card.types.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuralyui/card",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -8,5 +8,19 @@
|
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
9
|
},
|
|
10
10
|
"author": "Labidi Aymen",
|
|
11
|
-
"license": "ISC"
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./index.js"
|
|
15
|
+
},
|
|
16
|
+
"./bundle": {
|
|
17
|
+
"import": "./bundle.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bundle.js",
|
|
22
|
+
"*.js",
|
|
23
|
+
"*.d.ts",
|
|
24
|
+
"*.js.map"
|
|
25
|
+
]
|
|
12
26
|
}
|
package/react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
1
|
+
import { NrCardElement } from './card.component.js';
|
|
2
|
+
export declare const NrCard: import("@lit-labs/react").ReactWebComponent<NrCardElement, {
|
|
3
3
|
click: string;
|
|
4
4
|
}>;
|
|
5
5
|
//# sourceMappingURL=react.d.ts.map
|
package/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createComponent } from '@lit-labs/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export const
|
|
5
|
-
tagName: '
|
|
6
|
-
elementClass:
|
|
3
|
+
import { NrCardElement } from './card.component.js';
|
|
4
|
+
export const NrCard = createComponent({
|
|
5
|
+
tagName: 'nr-card',
|
|
6
|
+
elementClass: NrCardElement,
|
|
7
7
|
react: React,
|
|
8
8
|
events: {
|
|
9
9
|
click: 'click',
|
package/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/card/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/card/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC;IACpC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,aAAa;IAC3B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,KAAK,EAAE,OAAO;KACf;CACF,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { NrCardElement } from './card.component.js';\n\nexport const NrCard = createComponent({\n tagName: 'nr-card',\n elementClass: NrCardElement,\n react: React,\n events: {\n click: 'click',\n },\n});\n"]}
|
package/card.component.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAC,MAAM,KAAK,CAAC;AAGrC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAGxC,qBACa,eAAgB,SAAQ,UAAU;IAC7C,OAAgB,MAAM,0BAAU;IAEpB,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,WAAoB;IAE3B,MAAM;CAYhB"}
|
package/card.style.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.style.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.style.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,MAAM,yBAAa,CAAC"}
|
package/card.type.d.ts
DELETED
package/card.type.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.type.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.type.ts"],"names":[],"mappings":"AAAA,0BAAkB,QAAQ;IACxB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
package/card.type.js
DELETED
package/card.type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.type.js","sourceRoot":"","sources":["../../../src/components/card/card.type.ts"],"names":[],"mappings":"","sourcesContent":["export const enum CardSize {\n Small = 'small',\n Default = 'default',\n Large = 'large',\n}\n"]}
|
package/demo/hy-card-demo.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import '../card.component.js';
|
|
3
|
-
import '../../button/demo/nr-buttons-demo';
|
|
4
|
-
export declare class HyCardDemo extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult;
|
|
6
|
-
render(): import("lit").TemplateResult<1>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=hy-card-demo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hy-card-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/card/demo/hy-card-demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,sBAAsB,CAAC;AAE9B,OAAO,mCAAmC,CAAC;AAE3C,qBACa,UAAW,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAKpB;IACO,MAAM;CAqBhB"}
|
package/demo/hy-card-demo.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import '../card.component.js';
|
|
9
|
-
import { customElement } from 'lit/decorators.js';
|
|
10
|
-
import '../../button/demo/nr-buttons-demo';
|
|
11
|
-
let HyCardDemo = class HyCardDemo extends LitElement {
|
|
12
|
-
render() {
|
|
13
|
-
return html `
|
|
14
|
-
Default
|
|
15
|
-
<hy-card .header=${'welcome'}>
|
|
16
|
-
<p slot="content">hello</p>
|
|
17
|
-
</hy-card>
|
|
18
|
-
<br />
|
|
19
|
-
Small
|
|
20
|
-
|
|
21
|
-
<hy-card .size=${'small'} .header=${'welcome small'}>
|
|
22
|
-
<p slot="content">hello</p>
|
|
23
|
-
</hy-card>
|
|
24
|
-
<br />
|
|
25
|
-
|
|
26
|
-
Large
|
|
27
|
-
|
|
28
|
-
<hy-card .size=${'large'} .header=${'welcome large'}>
|
|
29
|
-
<p slot="content">hello</p>
|
|
30
|
-
</hy-card>
|
|
31
|
-
`;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
HyCardDemo.styles = css `
|
|
35
|
-
:host {
|
|
36
|
-
display: block;
|
|
37
|
-
width: 25%;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
HyCardDemo = __decorate([
|
|
41
|
-
customElement('hy-card-demo')
|
|
42
|
-
], HyCardDemo);
|
|
43
|
-
export { HyCardDemo };
|
|
44
|
-
//# sourceMappingURL=hy-card-demo.js.map
|
package/demo/hy-card-demo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hy-card-demo.js","sourceRoot":"","sources":["../../../../src/components/card/demo/hy-card-demo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,mCAAmC,CAAC;AAG3C,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,UAAU;IAO/B,MAAM;QACb,OAAO,IAAI,CAAA;;yBAEU,SAAS;;;;;;uBAMX,OAAO,YAAY,eAAe;;;;;;;uBAOlC,OAAO,YAAY,eAAe;;;KAGpD,CAAC;IACJ,CAAC;CACF,CAAA;AA3BiB,iBAAM,GAAG,GAAG,CAAA;;;;;GAK1B,CAAA;AANS,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CA4BtB;SA5BY,UAAU","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport '../card.component.js';\nimport { customElement } from 'lit/decorators.js';\nimport '../../button/demo/nr-buttons-demo';\n\n@customElement('hy-card-demo')\nexport class HyCardDemo extends LitElement {\n static override styles = css`\n :host {\n display: block;\n width: 25%;\n }\n `;\n override render() {\n return html`\n Default\n <hy-card .header=${'welcome'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n <br />\n Small\n\n <hy-card .size=${'small'} .header=${'welcome small'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n <br />\n\n Large\n\n <hy-card .size=${'large'} .header=${'welcome large'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n `;\n }\n}\n"]}
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
package/react.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/card/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,MAAM;;EAOjB,CAAC"}
|