@nuralyui/carousel 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle.js ADDED
@@ -0,0 +1,161 @@
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 o{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 n=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return(t=>new o("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 r;const l=window,h=l.trustedTypes,c=h?h.emptyScript:"",u=l.reactiveElementPolyfillSupport,d={toAttribute(t,i){switch(i){case Boolean:t=t?c: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}},a=(t,i)=>i!==t&&(i==i||t==t),v={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:a},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 o=this[t];this[i]=e,this.requestUpdate(t,o,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(n(t))}else void 0!==t&&i.push(n(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"),o=t.litNonce;void 0!==o&&e.setAttribute("nonce",o),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 o=this.constructor._$Ep(t,s);if(void 0!==o&&!0===s.reflect){const n=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:d).toAttribute(i,s.type);this._$El=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,o=e._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=e.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:d;this._$El=o,this[o]=n.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(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==u||u({ReactiveElement:p}),(null!==(r=l.reactiveElementVersions)&&void 0!==r?r:l.reactiveElementVersions=[]).push("1.6.3");const y=window,b=y.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,A="?"+w,S=`<${A}>`,_=document,k=()=>_.createComment(""),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,C=t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),U="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,T=/>/g,N=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),O=/'/g,I=/"/g,R=/^(?:script|style|textarea|title)$/i,z=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),L=new WeakMap,D=_.createTreeWalker(_,129,null,!1);function H(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==m?m.createHTML(i):i}const Z=(t,i)=>{const s=t.length-1,e=[];let o,n=2===i?"<svg>":"",r=j;for(let i=0;i<s;i++){const s=t[i];let l,h,c=-1,u=0;for(;u<s.length&&(r.lastIndex=u,h=r.exec(s),null!==h);)u=r.lastIndex,r===j?"!--"===h[1]?r=M:void 0!==h[1]?r=T:void 0!==h[2]?(R.test(h[2])&&(o=RegExp("</"+h[2],"g")),r=N):void 0!==h[3]&&(r=N):r===N?">"===h[0]?(r=null!=o?o:j,c=-1):void 0===h[1]?c=-2:(c=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?N:'"'===h[3]?I:O):r===I||r===O?r=N:r===M||r===T?r=j:(r=N,o=void 0);const d=r===N&&t[i+1].startsWith("/>")?" ":"";n+=r===j?s+S:c>=0?(e.push(l),s.slice(0,c)+$+s.slice(c)+w+d):s+w+(-2===c?(e.push(void 0),i):d)}return[H(t,n+(t[s]||"<?>")+(2===i?"</svg>":"")),e]};class W{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let o=0,n=0;const r=t.length-1,l=this.parts,[h,c]=Z(t,i);if(this.el=W.createElement(h,s),D.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=D.nextNode())&&l.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const s=c[n++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(s);l.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?q:"?"===i[1]?G:"@"===i[1]?Q:V})}else l.push({type:6,index:o})}for(const i of t)e.removeAttribute(i)}if(R.test(e.tagName)){const t=e.textContent.split(w),i=t.length-1;if(i>0){e.textContent=b?b.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],k()),D.nextNode(),l.push({type:2,index:++o});e.append(t[i],k())}}}else if(8===e.nodeType)if(e.data===A)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=e.data.indexOf(w,t+1));)l.push({type:7,index:o}),t+=w.length-1}o++}}static createElement(t,i){const s=_.createElement("template");return s.innerHTML=t,s}}function B(t,i,s=t,e){var o,n,r,l;if(i===z)return i;let h=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const c=x(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==c&&(null===(n=null==h?void 0:h._$AO)||void 0===n||n.call(h,!1),void 0===c?h=void 0:(h=new c(t),h._$AT(t,s,e)),void 0!==e?(null!==(r=(l=s)._$Co)&&void 0!==r?r:l._$Co=[])[e]=h:s._$Cl=h),void 0!==h&&(i=B(t,h._$AS(t,i.values),h,e)),i}class J{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,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:_).importNode(s,!0);D.currentNode=o;let n=D.nextNode(),r=0,l=0,h=e[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new K(n,n.nextSibling,this,t):1===h.type?i=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(i=new X(n,this,t)),this._$AV.push(i),h=e[++l]}r!==(null==h?void 0:h.index)&&(n=D.nextNode(),r++)}return D.currentNode=_,o}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 K{constructor(t,i,s,e){var o;this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}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=B(this,t,i),x(t)?t===P||null==t||""===t?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==z&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):C(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!==P&&x(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=W.createElement(H(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new J(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=L.get(t.strings);return void 0===i&&L.set(t.strings,i=new W(t)),i}T(t){E(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new K(this.k(k()),this.k(k()),this,this.options)):s=i[e],s._$AI(o),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 V{constructor(t,i,s,e,o){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=P}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=B(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==z,n&&(this._$AH=t);else{const e=t;let r,l;for(t=o[0],r=0;r<o.length-1;r++)l=B(this,e[s+r],i,r),l===z&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===P?t=P:t!==P&&(t+=(null!=l?l:"")+o[r+1]),this._$AH[r]=l}n&&!e&&this.j(t)}j(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===P?void 0:t}}const F=b?b.emptyScript:"";class G extends V{constructor(){super(...arguments),this.type=4}j(t){t&&t!==P?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class Q extends V{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=B(this,t,i,0))&&void 0!==s?s:P)===z)return;const e=this._$AH,o=t===P&&e!==P||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==P&&(e===P||o);o&&this.element.removeEventListener(this.name,this,e),n&&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 X{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){B(this,t)}}const Y={O:$,P:w,A,C:1,M:Z,L:J,R:C,D:B,I:K,V,H:G,N:Q,U:q,F:X},tt=y.litHtmlPolyfillSupport;
18
+ /**
19
+ * @license
20
+ * Copyright 2017 Google LLC
21
+ * SPDX-License-Identifier: BSD-3-Clause
22
+ */
23
+ var it;null==tt||tt(W,K),(null!==(g=y.litHtmlVersions)&&void 0!==g?g:y.litHtmlVersions=[]).push("2.8.0");const st=window,et=st.trustedTypes,ot=et?et.createPolicy("lit-html",{createHTML:t=>t}):void 0,nt="$lit$",rt=`lit$${(Math.random()+"").slice(9)}$`,lt="?"+rt,ht=`<${lt}>`,ct=document,ut=()=>ct.createComment(""),dt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,at=Array.isArray,vt="[ \t\n\f\r]",ft=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,gt=/>/g,yt=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),bt=/'/g,mt=/"/g,$t=/^(?:script|style|textarea|title)$/i,wt=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),At=Symbol.for("lit-noChange"),St=Symbol.for("lit-nothing"),_t=new WeakMap,kt=ct.createTreeWalker(ct,129,null,!1);function xt(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ot?ot.createHTML(i):i}const Et=(t,i)=>{const s=t.length-1,e=[];let o,n=2===i?"<svg>":"",r=ft;for(let i=0;i<s;i++){const s=t[i];let l,h,c=-1,u=0;for(;u<s.length&&(r.lastIndex=u,h=r.exec(s),null!==h);)u=r.lastIndex,r===ft?"!--"===h[1]?r=pt:void 0!==h[1]?r=gt:void 0!==h[2]?($t.test(h[2])&&(o=RegExp("</"+h[2],"g")),r=yt):void 0!==h[3]&&(r=yt):r===yt?">"===h[0]?(r=null!=o?o:ft,c=-1):void 0===h[1]?c=-2:(c=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?yt:'"'===h[3]?mt:bt):r===mt||r===bt?r=yt:r===pt||r===gt?r=ft:(r=yt,o=void 0);const d=r===yt&&t[i+1].startsWith("/>")?" ":"";n+=r===ft?s+ht:c>=0?(e.push(l),s.slice(0,c)+nt+s.slice(c)+rt+d):s+rt+(-2===c?(e.push(void 0),i):d)}return[xt(t,n+(t[s]||"<?>")+(2===i?"</svg>":"")),e]};class Ct{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let o=0,n=0;const r=t.length-1,l=this.parts,[h,c]=Et(t,i);if(this.el=Ct.createElement(h,s),kt.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=kt.nextNode())&&l.length<r;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith(nt)||i.startsWith(rt)){const s=c[n++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+nt).split(rt),i=/([.?@])?(.*)/.exec(s);l.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?Nt:"?"===i[1]?It:"@"===i[1]?Rt:Tt})}else l.push({type:6,index:o})}for(const i of t)e.removeAttribute(i)}if($t.test(e.tagName)){const t=e.textContent.split(rt),i=t.length-1;if(i>0){e.textContent=et?et.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],ut()),kt.nextNode(),l.push({type:2,index:++o});e.append(t[i],ut())}}}else if(8===e.nodeType)if(e.data===lt)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=e.data.indexOf(rt,t+1));)l.push({type:7,index:o}),t+=rt.length-1}o++}}static createElement(t,i){const s=ct.createElement("template");return s.innerHTML=t,s}}function Ut(t,i,s=t,e){var o,n,r,l;if(i===At)return i;let h=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const c=dt(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==c&&(null===(n=null==h?void 0:h._$AO)||void 0===n||n.call(h,!1),void 0===c?h=void 0:(h=new c(t),h._$AT(t,s,e)),void 0!==e?(null!==(r=(l=s)._$Co)&&void 0!==r?r:l._$Co=[])[e]=h:s._$Cl=h),void 0!==h&&(i=Ut(t,h._$AS(t,i.values),h,e)),i}class jt{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,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:ct).importNode(s,!0);kt.currentNode=o;let n=kt.nextNode(),r=0,l=0,h=e[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new Mt(n,n.nextSibling,this,t):1===h.type?i=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(i=new zt(n,this,t)),this._$AV.push(i),h=e[++l]}r!==(null==h?void 0:h.index)&&(n=kt.nextNode(),r++)}return kt.currentNode=ct,o}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 Mt{constructor(t,i,s,e){var o;this.type=2,this._$AH=St,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}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=Ut(this,t,i),dt(t)?t===St||null==t||""===t?(this._$AH!==St&&this._$AR(),this._$AH=St):t!==this._$AH&&t!==At&&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!==St&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ct.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=Ct.createElement(xt(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new jt(o,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 Ct(t)),i}T(t){at(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new Mt(this.k(ut()),this.k(ut()),this,this.options)):s=i[e],s._$AI(o),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 Tt{constructor(t,i,s,e,o){this.type=1,this._$AH=St,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=St}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=Ut(this,t,i,0),n=!dt(t)||t!==this._$AH&&t!==At,n&&(this._$AH=t);else{const e=t;let r,l;for(t=o[0],r=0;r<o.length-1;r++)l=Ut(this,e[s+r],i,r),l===At&&(l=this._$AH[r]),n||(n=!dt(l)||l!==this._$AH[r]),l===St?t=St:t!==St&&(t+=(null!=l?l:"")+o[r+1]),this._$AH[r]=l}n&&!e&&this.j(t)}j(t){t===St?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Nt extends Tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===St?void 0:t}}const Ot=et?et.emptyScript:"";class It extends Tt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==St?this.element.setAttribute(this.name,Ot):this.element.removeAttribute(this.name)}}class Rt extends Tt{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=Ut(this,t,i,0))&&void 0!==s?s:St)===At)return;const e=this._$AH,o=t===St&&e!==St||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==St&&(e===St||o);o&&this.element.removeEventListener(this.name,this,e),n&&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){Ut(this,t)}}const Pt=st.litHtmlPolyfillSupport;null==Pt||Pt(Ct,Mt),(null!==(it=st.litHtmlVersions)&&void 0!==it?it:st.litHtmlVersions=[]).push("2.8.0");
24
+ /**
25
+ * @license
26
+ * Copyright 2017 Google LLC
27
+ * SPDX-License-Identifier: BSD-3-Clause
28
+ */
29
+ var Lt,Dt;class Ht 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,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let r=n._$litPart$;if(void 0===r){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=r=new Mt(i.insertBefore(ut(),t),t,void 0,null!=s?s:{})}return r._$AI(t),r})(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 At}}Ht.finalized=!0,Ht._$litElement$=!0,null===(Lt=globalThis.litElementHydrateSupport)||void 0===Lt||Lt.call(globalThis,{LitElement:Ht});const Zt=globalThis.litElementPolyfillSupport;null==Zt||Zt({LitElement:Ht}),(null!==(Dt=globalThis.litElementVersions)&&void 0!==Dt?Dt:globalThis.litElementVersions=[]).push("3.3.3");const Wt=((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 o(e,t,s)})`
30
+ :host {
31
+ position: relative;
32
+ }
33
+
34
+ .carousel {
35
+ width: 100%;
36
+ display: flex;
37
+ justify-content: center;
38
+ flex-direction: column;
39
+ align-items: center;
40
+ }
41
+
42
+ ::slotted(.carousel-item-hidden) {
43
+ position: absolute;
44
+ opacity: 0;
45
+ }
46
+ ::slotted(:not(.carousel-item-hidden)) {
47
+ opacity: 1;
48
+ transition: opacity 0.5s ease;
49
+ }
50
+
51
+ .controls {
52
+ position: absolute;
53
+ width: 100%;
54
+ top: 50%;
55
+ display: flex;
56
+ justify-content: space-between;
57
+ }
58
+ .button-control {
59
+ --nuraly-button-ghost-text-color: grey;
60
+ --nuraly-button-ghost-active-border-color: transparent;
61
+ --nuraly-button-ghost-hover-background-color: transparent;
62
+ --nuraly-button-ghost-hover-border-color: transparent;
63
+ }
64
+
65
+ .dot {
66
+ height: 8px;
67
+ width: 8px;
68
+ margin: 0 5px;
69
+ background-color: var(--carousel-dot-background-color);
70
+ display: inline-block;
71
+ cursor: pointer;
72
+ opacity: 0.4;
73
+ }
74
+
75
+ .dot.active {
76
+ background-color: var(--carousel-dot-active-background-color);
77
+ opacity: 0.9;
78
+ }
79
+
80
+ :host {
81
+ --carousel-dot-background-color: #bebebe;
82
+ --carousel-dot-active-background-color: gray;
83
+ }
84
+ @media (prefers-color-scheme: dark) {
85
+ :host {
86
+ --carousel-dot-background-color: gray;
87
+ --carousel-dot-active-background-color: lightgray;
88
+ .button-control {
89
+ --nuraly-button-ghost-text-color: #ffffff;
90
+ }
91
+ }
92
+ }
93
+ `,Bt=Wt,Jt=(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)}},Kt=(t,i,s)=>{i.constructor.createProperty(s,t)};function Vt(t){return(i,s)=>void 0!==s?Kt(t,i,s):Jt(t,i)
94
+ /**
95
+ * @license
96
+ * Copyright 2017 Google LLC
97
+ * SPDX-License-Identifier: BSD-3-Clause
98
+ */}
99
+ /**
100
+ * @license
101
+ * Copyright 2021 Google LLC
102
+ * SPDX-License-Identifier: BSD-3-Clause
103
+ */
104
+ var qt;const Ft=null!=(null===(qt=window.HTMLSlotElement)||void 0===qt?void 0:qt.prototype.assignedElements)?(t,i)=>t.assignedElements(i):(t,i)=>t.assignedNodes(i).filter((t=>t.nodeType===Node.ELEMENT_NODE));
105
+ /**
106
+ * @license
107
+ * Copyright 2017 Google LLC
108
+ * SPDX-License-Identifier: BSD-3-Clause
109
+ */
110
+ const Gt=2;class Qt{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)}}
111
+ /**
112
+ * @license
113
+ * Copyright 2020 Google LLC
114
+ * SPDX-License-Identifier: BSD-3-Clause
115
+ */const{I:Xt}=Y,Yt=()=>document.createComment(""),ti=(t,i,s)=>{var e;const o=t._$AA.parentNode,n=void 0===i?t._$AB:i._$AA;if(void 0===s){const i=o.insertBefore(Yt(),n),e=o.insertBefore(Yt(),n);s=new Xt(i,e,t,t.options)}else{const i=s._$AB.nextSibling,r=s._$AM,l=r!==t;if(l){let i;null===(e=s._$AQ)||void 0===e||e.call(s,t),s._$AM=t,void 0!==s._$AP&&(i=t._$AU)!==r._$AU&&s._$AP(i)}if(i!==n||l){let t=s._$AA;for(;t!==i;){const i=t.nextSibling;o.insertBefore(t,n),t=i}}}return s},ii=(t,i,s=t)=>(t._$AI(i,s),t),si={},ei=(t,i=si)=>t._$AH=i,oi=t=>{var i;null===(i=t._$AP)||void 0===i||i.call(t,!1,!0);let s=t._$AA;const e=t._$AB.nextSibling;for(;s!==e;){const t=s.nextSibling;s.remove(),s=t}},ni=(t,i,s)=>{const e=new Map;for(let o=i;o<=s;o++)e.set(t[o],o);return e},ri=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends Qt{constructor(t){if(super(t),t.type!==Gt)throw Error("repeat() can only be used in text expressions")}ct(t,i,s){let e;void 0===s?s=i:void 0!==i&&(e=i);const o=[],n=[];let r=0;for(const i of t)o[r]=e?e(i,r):r,n[r]=s(i,r),r++;return{values:n,keys:o}}render(t,i,s){return this.ct(t,i,s).values}update(t,[i,s,e]){var o;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.ct(i,s,e);if(!Array.isArray(n))return this.ut=l,r;const h=null!==(o=this.ut)&&void 0!==o?o:this.ut=[],c=[];let u,d,a=0,v=n.length-1,f=0,p=r.length-1;for(;a<=v&&f<=p;)if(null===n[a])a++;else if(null===n[v])v--;else if(h[a]===l[f])c[f]=ii(n[a],r[f]),a++,f++;else if(h[v]===l[p])c[p]=ii(n[v],r[p]),v--,p--;else if(h[a]===l[p])c[p]=ii(n[a],r[p]),ti(t,c[p+1],n[a]),a++,p--;else if(h[v]===l[f])c[f]=ii(n[v],r[f]),ti(t,n[a],n[v]),v--,f++;else if(void 0===u&&(u=ni(l,f,p),d=ni(h,a,v)),u.has(h[a]))if(u.has(h[v])){const i=d.get(l[f]),s=void 0!==i?n[i]:null;if(null===s){const i=ti(t,n[a]);ii(i,r[f]),c[f]=i}else c[f]=ii(s,r[f]),ti(t,n[a],s),n[i]=null;f++}else oi(n[v]),v--;else oi(n[a]),a++;for(;f<=p;){const i=ti(t,c[p+1]);ii(i,r[f]),c[f++]=i}for(;a<=v;){const t=n[a++];null!==t&&oi(t)}return this.ut=l,ei(t,c),z}});
116
+ /**
117
+ * @license
118
+ * Copyright 2017 Google LLC
119
+ * SPDX-License-Identifier: BSD-3-Clause
120
+ */var li=function(t,i,s,e){for(var o,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(i,s,r):o(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};let hi=class extends Ht{constructor(){super(...arguments),this.currentIndex=0,this.autoPlay=!1,this.autoplaySpeed=3e3,this.intervalId=null}firstUpdated(){this.displayedElements=this.slideElements.map(((t,i)=>(i!=this.currentIndex&&t.classList.add("carousel-item-hidden"),t))),this.autoPlay&&this.startAutoPlay()}startAutoPlay(){this.intervalId=window.setInterval((()=>{this.next()}),this.autoplaySpeed)}stopAutoPlay(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}next(){this.displayedElements[this.currentIndex].classList.add("carousel-item-hidden"),this.displayedElements.length-1==this.currentIndex?this.currentIndex=0:this.currentIndex++,this.displayedElements[this.currentIndex].classList.remove("carousel-item-hidden")}prev(){this.displayedElements[this.currentIndex].classList.add("carousel-item-hidden"),0==this.currentIndex?this.currentIndex=this.displayedElements.length-1:this.currentIndex--,this.displayedElements[this.currentIndex].classList.remove("carousel-item-hidden")}goTo(t){this.displayedElements[this.currentIndex].classList.add("carousel-item-hidden"),this.currentIndex=t,this.displayedElements[this.currentIndex].classList.remove("carousel-item-hidden")}disconnectedCallback(){super.disconnectedCallback(),this.stopAutoPlay()}render(){var t;return wt`
121
+ <div class="carousel">
122
+ <slot></slot>
123
+ ${this.autoPlay?St:wt`
124
+ <div class="controls">
125
+ <nr-button
126
+ @click="${this.prev}"
127
+ type="ghost"
128
+ size="small"
129
+ class="button-control"
130
+ .icon="${["chevron-left"]}"
131
+ ></nr-button>
132
+ <nr-button
133
+ @click="${this.next}"
134
+ type="ghost"
135
+ size="small"
136
+ class="button-control"
137
+ .icon="${["chevron-right"]}"
138
+ ></nr-button>
139
+ </div>
140
+ `}
141
+
142
+ <div class="dots">
143
+ ${ri(Array.from({length:null===(t=this.displayedElements)||void 0===t?void 0:t.length}),((t,i)=>wt`
144
+ <span
145
+ class="dot ${i===this.currentIndex?"active":""}"
146
+ @click="${()=>this.goTo(i)}"
147
+ ></span>
148
+ `))}
149
+ </div
150
+ </div>
151
+ `}};hi.styles=Bt,li([Vt()],hi.prototype,"currentIndex",void 0),li([Vt()],hi.prototype,"autoPlay",void 0),li([Vt()],hi.prototype,"autoplaySpeed",void 0),li([function(t){const{slot:i,selector:s}=null!=t?t:{};return(({finisher:t,descriptor:i})=>(s,e)=>{var o;if(void 0===e){const e=null!==(o=s.originalKey)&&void 0!==o?o:s.key,n=null!=i?{kind:"method",placement:"prototype",key:e,descriptor:i(s.key)}:{...s,key:e};return null!=t&&(n.finisher=function(i){t(i,e)}),n}{const o=s.constructor;void 0!==i&&Object.defineProperty(s,e,i(e)),null==t||t(o,e)}})({descriptor:e=>({get(){var e;const o="slot"+(i?`[name=${i}]`:":not([name])"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o),r=null!=n?Ft(n,t):[];return s?r.filter((t=>t.matches(s))):r},enumerable:!0,configurable:!0})})}()],hi.prototype,"slideElements",void 0),li([function(t){return Vt({...t,state:!0})}
152
+ /**
153
+ * @license
154
+ * Copyright 2017 Google LLC
155
+ * SPDX-License-Identifier: BSD-3-Clause
156
+ */()],hi.prototype,"displayedElements",void 0),hi=li([(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)
157
+ /**
158
+ * @license
159
+ * Copyright 2017 Google LLC
160
+ * SPDX-License-Identifier: BSD-3-Clause
161
+ */)("hy-carousel")],hi);export{hi as CarouselComponent};
@@ -75,20 +75,20 @@ let CarouselComponent = class CarouselComponent extends LitElement {
75
75
  ${!this.autoPlay
76
76
  ? html `
77
77
  <div class="controls">
78
- <hy-button
78
+ <nr-button
79
79
  @click="${this.prev}"
80
80
  type="ghost"
81
81
  size="small"
82
82
  class="button-control"
83
83
  .icon="${['chevron-left']}"
84
- ></hy-button>
85
- <hy-button
84
+ ></nr-button>
85
+ <nr-button
86
86
  @click="${this.next}"
87
87
  type="ghost"
88
88
  size="small"
89
89
  class="button-control"
90
90
  .icon="${['chevron-right']}"
91
- ></hy-button>
91
+ ></nr-button>
92
92
  </div>
93
93
  `
94
94
  : nothing}
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.component.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAGhD,IAA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E,MAAM,EAAC,CAAC,EACpD,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;;6BAED,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;0BAC9C,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;;aAEnC,CACF;;;KAGN,CAAC;IACJ,CAAC;CACF,CAAA;AA5GiB,wBAAM,GAAG,MAAO,CAAA;AAEpB;IAAX,QAAQ,EAAE;uDAAkB;AACjB;IAAX,QAAQ,EAAE;mDAAkB;AACjB;IAAX,QAAQ,EAAE;wDAAsB;AAEjC;IADC,qBAAqB,EAAE;wDACc;AAEtC;IADC,KAAK,EAAE;4DACkC;AAT/B,iBAAiB;IAD7B,aAAa,CAAC,aAAa,CAAC;GAChB,iBAAiB,CA6G7B;SA7GY,iBAAiB","sourcesContent":["import {html, LitElement, nothing} from 'lit';\nimport {styles} from './carousel.style.js';\nimport {customElement, property, queryAssignedElements, state} from 'lit/decorators.js';\nimport {repeat} from 'lit/directives/repeat.js';\n\n@customElement('hy-carousel')\nexport class CarouselComponent extends LitElement {\n static override styles = styles;\n\n @property() currentIndex = 0;\n @property() autoPlay = false;\n @property() autoplaySpeed = 3000;\n @queryAssignedElements()\n private slideElements!: HTMLElement[];\n @state()\n private displayedElements!: HTMLElement[];\n private intervalId: number | null = null;\n\n override firstUpdated() {\n this.displayedElements = this.slideElements.map((element, index) => {\n if (index != this.currentIndex) {\n element.classList.add('carousel-item-hidden');\n }\n return element;\n });\n if (this.autoPlay) {\n this.startAutoPlay();\n }\n }\n\n startAutoPlay() {\n this.intervalId = window.setInterval(() => {\n this.next();\n }, this.autoplaySpeed);\n }\n\n stopAutoPlay() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = null;\n }\n }\n\n next() {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n if (this.displayedElements.length - 1 == this.currentIndex) {\n this.currentIndex = 0;\n } else {\n this.currentIndex++;\n }\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n prev() {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n if (this.currentIndex == 0) {\n this.currentIndex = this.displayedElements.length - 1;\n } else {\n this.currentIndex--;\n }\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n goTo(index: number) {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n this.currentIndex = index;\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.stopAutoPlay();\n }\n\n override render() {\n return html`\n <div class=\"carousel\">\n <slot></slot>\n ${\n !this.autoPlay\n ? html`\n <div class=\"controls\">\n <hy-button\n @click=\"${this.prev}\"\n type=\"ghost\"\n size=\"small\"\n class=\"button-control\"\n .icon=\"${['chevron-left']}\"\n ></hy-button>\n <hy-button\n @click=\"${this.next}\"\n type=\"ghost\"\n size=\"small\"\n class=\"button-control\"\n .icon=\"${['chevron-right']}\"\n ></hy-button>\n </div>\n `\n : nothing\n }\n\n <div class=\"dots\">\n ${repeat(\n Array.from({length: this.displayedElements?.length}),\n (_, index) => html`\n <span\n class=\"dot ${index === this.currentIndex ? 'active' : ''}\"\n @click=\"${() => this.goTo(index)}\"\n ></span>\n `\n )}\n </div\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"carousel.component.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0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CAAC,iBAAiB,0CAAE,MAAM,EAAC,CAAC,EACpD,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;;6BAED,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;0BAC9C,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;;aAEnC,CACF;;;KAGN,CAAC;IACJ,CAAC;CACF,CAAA;AA5GiB,wBAAM,GAAG,MAAO,CAAA;AAEpB;IAAX,QAAQ,EAAE;uDAAkB;AACjB;IAAX,QAAQ,EAAE;mDAAkB;AACjB;IAAX,QAAQ,EAAE;wDAAsB;AAEjC;IADC,qBAAqB,EAAE;wDACc;AAEtC;IADC,KAAK,EAAE;4DACkC;AAT/B,iBAAiB;IAD7B,aAAa,CAAC,aAAa,CAAC;GAChB,iBAAiB,CA6G7B;SA7GY,iBAAiB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { styles } from './carousel.style.js';\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\n\n@customElement('hy-carousel')\nexport class CarouselComponent extends LitElement {\n static override styles = styles;\n\n @property() currentIndex = 0;\n @property() autoPlay = false;\n @property() autoplaySpeed = 3000;\n @queryAssignedElements()\n private slideElements!: HTMLElement[];\n @state()\n private displayedElements!: HTMLElement[];\n private intervalId: number | null = null;\n\n override firstUpdated() {\n this.displayedElements = this.slideElements.map((element, index) => {\n if (index != this.currentIndex) {\n element.classList.add('carousel-item-hidden');\n }\n return element;\n });\n if (this.autoPlay) {\n this.startAutoPlay();\n }\n }\n\n startAutoPlay() {\n this.intervalId = window.setInterval(() => {\n this.next();\n }, this.autoplaySpeed);\n }\n\n stopAutoPlay() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = null;\n }\n }\n\n next() {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n if (this.displayedElements.length - 1 == this.currentIndex) {\n this.currentIndex = 0;\n } else {\n this.currentIndex++;\n }\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n prev() {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n if (this.currentIndex == 0) {\n this.currentIndex = this.displayedElements.length - 1;\n } else {\n this.currentIndex--;\n }\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n goTo(index: number) {\n this.displayedElements[this.currentIndex].classList.add('carousel-item-hidden');\n this.currentIndex = index;\n this.displayedElements[this.currentIndex].classList.remove('carousel-item-hidden');\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.stopAutoPlay();\n }\n\n override render() {\n return html`\n <div class=\"carousel\">\n <slot></slot>\n ${\n !this.autoPlay\n ? html`\n <div class=\"controls\">\n <nr-button\n @click=\"${this.prev}\"\n type=\"ghost\"\n size=\"small\"\n class=\"button-control\"\n .icon=\"${['chevron-left']}\"\n ></nr-button>\n <nr-button\n @click=\"${this.next}\"\n type=\"ghost\"\n size=\"small\"\n class=\"button-control\"\n .icon=\"${['chevron-right']}\"\n ></nr-button>\n </div>\n `\n : nothing\n }\n\n <div class=\"dots\">\n ${repeat(\n Array.from({length: this.displayedElements?.length}),\n (_, index) => html`\n <span\n class=\"dot ${index === this.currentIndex ? 'active' : ''}\"\n @click=\"${() => this.goTo(index)}\"\n ></span>\n `\n )}\n </div\n </div>\n `;\n }\n}\n"]}
package/carousel.style.js CHANGED
@@ -29,10 +29,10 @@ const carouselStyles = css `
29
29
  justify-content: space-between;
30
30
  }
31
31
  .button-control {
32
- --hybrid-button-ghost-text-color: grey;
33
- --hybrid-button-ghost-active-border-color: transparent;
34
- --hybrid-button-ghost-hover-background-color: transparent;
35
- --hybrid-button-ghost-hover-border-color: transparent;
32
+ --nuraly-button-ghost-text-color: grey;
33
+ --nuraly-button-ghost-active-border-color: transparent;
34
+ --nuraly-button-ghost-hover-background-color: transparent;
35
+ --nuraly-button-ghost-hover-border-color: transparent;
36
36
  }
37
37
 
38
38
  .dot {
@@ -59,7 +59,7 @@ const carouselStyles = css `
59
59
  --carousel-dot-background-color: gray;
60
60
  --carousel-dot-active-background-color: lightgray;
61
61
  .button-control {
62
- --hybrid-button-ghost-text-color: #ffffff;
62
+ --nuraly-button-ghost-text-color: #ffffff;
63
63
  }
64
64
  }
65
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.style.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEzB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC","sourcesContent":["import {css} from 'lit';\n\nconst carouselStyles = css`\n :host {\n position: relative;\n }\n\n .carousel {\n width: 100%;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n }\n\n ::slotted(.carousel-item-hidden) {\n position: absolute;\n opacity: 0;\n }\n ::slotted(:not(.carousel-item-hidden)) {\n opacity: 1;\n transition: opacity 0.5s ease;\n }\n\n .controls {\n position: absolute;\n width: 100%;\n top: 50%;\n display: flex;\n justify-content: space-between;\n }\n .button-control {\n --hybrid-button-ghost-text-color: grey;\n --hybrid-button-ghost-active-border-color: transparent;\n --hybrid-button-ghost-hover-background-color: transparent;\n --hybrid-button-ghost-hover-border-color: transparent;\n }\n\n .dot {\n height: 8px;\n width: 8px;\n margin: 0 5px;\n background-color: var(--carousel-dot-background-color);\n display: inline-block;\n cursor: pointer;\n opacity: 0.4;\n }\n\n .dot.active {\n background-color: var(--carousel-dot-active-background-color);\n opacity: 0.9;\n }\n\n :host {\n --carousel-dot-background-color: #bebebe;\n --carousel-dot-active-background-color: gray;\n }\n @media (prefers-color-scheme: dark) {\n :host {\n --carousel-dot-background-color: gray;\n --carousel-dot-active-background-color: lightgray;\n .button-control {\n --hybrid-button-ghost-text-color: #ffffff;\n }\n }\n }\n`;\n\nexport const styles = carouselStyles;\n"]}
1
+ {"version":3,"file":"carousel.style.js","sourceRoot":"","sources":["../../../src/components/carousel/carousel.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEzB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC","sourcesContent":["import { css } from 'lit';\n\nconst carouselStyles = css`\n :host {\n position: relative;\n }\n\n .carousel {\n width: 100%;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n }\n\n ::slotted(.carousel-item-hidden) {\n position: absolute;\n opacity: 0;\n }\n ::slotted(:not(.carousel-item-hidden)) {\n opacity: 1;\n transition: opacity 0.5s ease;\n }\n\n .controls {\n position: absolute;\n width: 100%;\n top: 50%;\n display: flex;\n justify-content: space-between;\n }\n .button-control {\n --nuraly-button-ghost-text-color: grey;\n --nuraly-button-ghost-active-border-color: transparent;\n --nuraly-button-ghost-hover-background-color: transparent;\n --nuraly-button-ghost-hover-border-color: transparent;\n }\n\n .dot {\n height: 8px;\n width: 8px;\n margin: 0 5px;\n background-color: var(--carousel-dot-background-color);\n display: inline-block;\n cursor: pointer;\n opacity: 0.4;\n }\n\n .dot.active {\n background-color: var(--carousel-dot-active-background-color);\n opacity: 0.9;\n }\n\n :host {\n --carousel-dot-background-color: #bebebe;\n --carousel-dot-active-background-color: gray;\n }\n @media (prefers-color-scheme: dark) {\n :host {\n --carousel-dot-background-color: gray;\n --carousel-dot-active-background-color: lightgray;\n .button-control {\n --nuraly-button-ghost-text-color: #ffffff;\n }\n }\n }\n`;\n\nexport const styles = carouselStyles;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuralyui/carousel",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/carousel/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,iBAAiB;IAC/B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,WAAW,EAAE,cAAc;KAC5B;CACF,CAAC,CAAC","sourcesContent":["import {createComponent} from '@lit-labs/react';\nimport * as React from 'react';\nimport {CarouselComponent} from './carousel.component.js';\n\nexport const HyCarousel = createComponent({\n tagName: 'hy-carousel',\n elementClass: CarouselComponent,\n react: React,\n events: {\n slideChange: 'slide-change',\n },\n});\n"]}
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/carousel/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,iBAAiB;IAC/B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,WAAW,EAAE,cAAc;KAC5B;CACF,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { CarouselComponent } from './carousel.component.js';\n\nexport const HyCarousel = createComponent({\n tagName: 'hy-carousel',\n elementClass: CarouselComponent,\n react: React,\n events: {\n slideChange: 'slide-change',\n },\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"carousel.component.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAU,MAAM,KAAK,CAAC;AAK9C,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,0BAAU;IAEpB,YAAY,SAAK;IACjB,QAAQ,UAAS;IACjB,aAAa,SAAQ;IAEjC,OAAO,CAAC,aAAa,CAAiB;IAEtC,OAAO,CAAC,iBAAiB,CAAiB;IAC1C,OAAO,CAAC,UAAU,CAAuB;IAEhC,YAAY;IAYrB,aAAa;IAMb,YAAY;IAOZ,IAAI;IAUJ,IAAI;IAUJ,IAAI,CAAC,KAAK,EAAE,MAAM;IAMT,oBAAoB;IAKpB,MAAM;CAyChB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"carousel.style.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.style.ts"],"names":[],"mappings":"AAoEA,eAAO,MAAM,MAAM,yBAAiB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import '../carousel.component';
3
- export declare class CarouselDemo extends LitElement {
4
- render(): import("lit").TemplateResult<1>;
5
- }
6
- //# sourceMappingURL=carousel-demo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"carousel-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/demo/carousel-demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,UAAU,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,uBAAuB,CAAC;AAG/B,qBACa,YAAa,SAAQ,UAAU;IACjC,MAAM;CAoDhB"}
@@ -1,68 +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 { html, LitElement } from 'lit';
8
- import '../carousel.component';
9
- import { customElement } from 'lit/decorators.js';
10
- let CarouselDemo = class CarouselDemo extends LitElement {
11
- render() {
12
- return html `
13
- AUTOPLAY
14
- <hy-carousel ?autoplay=${true}>
15
- <div>
16
- <h3>Slide 1</h3>
17
- <p>Content for Slide 1</p>
18
- </div>
19
- <div>
20
- <h3>Slide 2</h3>
21
- <p>Content for Slide 2</p>
22
- </div>
23
- <div>
24
- <h3>Slide 3</h3>
25
- <p>Content for Slide 3</p>
26
- </div>
27
- </hy-carousel>
28
- <hr />
29
-
30
- WITH CONTROLS
31
- <hy-carousel>
32
- <div>
33
- <h3>Slide 1</h3>
34
- <p>Content for Slide 1</p>
35
- </div>
36
- <div>
37
- <h3>Slide 2</h3>
38
- <p>Content for Slide 2</p>
39
- </div>
40
- <div>
41
- <h3>Slide 3</h3>
42
- <p>Content for Slide 3</p>
43
- </div>
44
- </hy-carousel>
45
- <hr />
46
- <hy-carousel>
47
- <div>
48
- <img src="https://via.placeholder.com/150" alt="Image 1" />
49
- </div>
50
- <div>
51
- <img src="https://via.placeholder.com/150" alt="Image 2" />
52
- </div>
53
-
54
- <div>
55
- <img src="https://via.placeholder.com/150" alt="Image 4" />
56
- </div>
57
- <div>
58
- <img src="https://via.placeholder.com/150" alt="Image 6" />
59
- </div>
60
- </hy-carousel>
61
- `;
62
- }
63
- };
64
- CarouselDemo = __decorate([
65
- customElement('hy-carousel-demo')
66
- ], CarouselDemo);
67
- export { CarouselDemo };
68
- //# sourceMappingURL=carousel-demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"carousel-demo.js","sourceRoot":"","sources":["../../../../src/components/carousel/demo/carousel-demo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAGhD,IAAa,YAAY,GAAzB,MAAa,YAAa,SAAQ,UAAU;IACjC,MAAM;QACb,OAAO,IAAI,CAAA;;+BAEgB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+C9B,CAAC;IACJ,CAAC;CACF,CAAA;AArDY,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAqDxB;SArDY,YAAY","sourcesContent":["import {html, LitElement} from 'lit';\nimport '../carousel.component';\nimport {customElement} from 'lit/decorators.js';\n\n@customElement('hy-carousel-demo')\nexport class CarouselDemo extends LitElement {\n override render() {\n return html`\n AUTOPLAY\n <hy-carousel ?autoplay=${true}>\n <div>\n <h3>Slide 1</h3>\n <p>Content for Slide 1</p>\n </div>\n <div>\n <h3>Slide 2</h3>\n <p>Content for Slide 2</p>\n </div>\n <div>\n <h3>Slide 3</h3>\n <p>Content for Slide 3</p>\n </div>\n </hy-carousel>\n <hr />\n\n WITH CONTROLS\n <hy-carousel>\n <div>\n <h3>Slide 1</h3>\n <p>Content for Slide 1</p>\n </div>\n <div>\n <h3>Slide 2</h3>\n <p>Content for Slide 2</p>\n </div>\n <div>\n <h3>Slide 3</h3>\n <p>Content for Slide 3</p>\n </div>\n </hy-carousel>\n <hr />\n <hy-carousel>\n <div>\n <img src=\"https://via.placeholder.com/150\" alt=\"Image 1\" />\n </div>\n <div>\n <img src=\"https://via.placeholder.com/150\" alt=\"Image 2\" />\n </div>\n\n <div>\n <img src=\"https://via.placeholder.com/150\" alt=\"Image 4\" />\n </div>\n <div>\n <img src=\"https://via.placeholder.com/150\" alt=\"Image 6\" />\n </div>\n </hy-carousel>\n `;\n }\n}\n"]}
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
package/react.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAE1D,eAAO,MAAM,UAAU;;EAOrB,CAAC"}