lit-litelements 1.0.0

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.
@@ -0,0 +1,16 @@
1
+ import { LitElement } from "lit";
2
+ declare class MyElement extends LitElement {
3
+ name: string;
4
+ size: string;
5
+ backgroundColor: string;
6
+ center: boolean;
7
+ static styles: import("lit").CSSResult[];
8
+ updated(changedProperties: any): void;
9
+ render(): import("lit-html").TemplateResult<1>;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ "loading-spinner-element": MyElement;
14
+ }
15
+ }
16
+ export {};
@@ -0,0 +1,56 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { LitElement, html } from "lit";
11
+ import { customElement, property } from "lit/decorators.js";
12
+ import { SpinnerStyle, SpinnerName } from "../styles/spinner-styles";
13
+ let MyElement = class MyElement extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.name = "spinner1";
17
+ this.size = "64px";
18
+ this.backgroundColor = "rgb(153, 153, 153)";
19
+ this.center = false;
20
+ }
21
+ updated(changedProperties) {
22
+ if (changedProperties.has("size")) {
23
+ this.style.setProperty("--lds-dual-ring-size", this.size);
24
+ }
25
+ if (changedProperties.has("backgroundColor")) {
26
+ this.style.setProperty("--lds-backgroundColor", this.backgroundColor);
27
+ }
28
+ }
29
+ render() {
30
+ return html `
31
+ <div class="${this.center ? "spin-container" : ""}">
32
+ <div class="${SpinnerName[this.name]}"></div>
33
+ </div>
34
+ `;
35
+ }
36
+ };
37
+ MyElement.styles = [SpinnerStyle];
38
+ __decorate([
39
+ property({ type: String }),
40
+ __metadata("design:type", Object)
41
+ ], MyElement.prototype, "name", void 0);
42
+ __decorate([
43
+ property({ type: String }),
44
+ __metadata("design:type", Object)
45
+ ], MyElement.prototype, "size", void 0);
46
+ __decorate([
47
+ property({ type: String }),
48
+ __metadata("design:type", Object)
49
+ ], MyElement.prototype, "backgroundColor", void 0);
50
+ __decorate([
51
+ property({ type: Boolean }),
52
+ __metadata("design:type", Object)
53
+ ], MyElement.prototype, "center", void 0);
54
+ MyElement = __decorate([
55
+ customElement("loading-spinner-element")
56
+ ], MyElement);
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import './component/spinner.lit';
package/dist/main.js ADDED
@@ -0,0 +1,517 @@
1
+ function t(t,e,i,r){var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n}function e(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const i=globalThis,r=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&o.set(e,t))}return t}toString(){return this.cssText}}const a=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,s))(e)})(t):t
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */,{is:l,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:p,getOwnPropertySymbols:c,getPrototypeOf:u}=Object,f=globalThis,g=f.trustedTypes,b=g?g.emptyScript:"",m=f.reactiveElementPolyfillSupport,x=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},$=(t,e)=>!l(t,e),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class v extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&d(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:s}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const o=r?.call(this);s.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...p(t),...c(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(r)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const r of e){const e=document.createElement("style"),s=i.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=r.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==i.converter?.toAttribute?i.converter:y).toAttribute(e,i.type);this._$Em=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=r,this[r]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??$)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[x("elementProperties")]=new Map,v[x("finalized")]=new Map,m?.({ReactiveElement:v}),(f.reactiveElementVersions??=[]).push("2.0.4");
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ const A=globalThis,w=A.trustedTypes,S=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+C,P=`<${k}>`,z=document,U=()=>z.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,R="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,j=RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,L=/"/g,B=/^(?:script|style|textarea|title)$/i,I=(t=>function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];return{_$litType$:t,strings:e,values:r}})(1),Y=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),V=new WeakMap,q=z.createTreeWalker(z,129);function F(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const Z=(t,e)=>{const i=t.length-1,r=[];let s,o=2===e?"<svg>":"",n=H;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(n.lastIndex=h,l=n.exec(i),null!==l);)h=n.lastIndex,n===H?"!--"===l[1]?n=N:void 0!==l[1]?n=M:void 0!==l[2]?(B.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=j):void 0!==l[3]&&(n=j):n===j?">"===l[0]?(n=s??H,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?j:'"'===l[3]?L:D):n===L||n===D?n=j:n===N||n===M?n=H:(n=j,s=void 0);const p=n===j&&t[e+1].startsWith("/>")?" ":"";o+=n===H?i+P:d>=0?(r.push(a),i.slice(0,d)+E+i.slice(d)+C+p):i+C+(-2===d?e:p)}return[F(t,o+(t[i]||"<?>")+(2===e?"</svg>":"")),r]};class J{constructor(t,e){let i,{strings:r,_$litType$:s}=t;this.parts=[];let o=0,n=0;const a=r.length-1,l=this.parts,[d,h]=Z(r,s);if(this.el=J.createElement(d,e),q.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=q.nextNode())&&l.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(E)){const e=h[n++],r=i.getAttribute(t).split(C),s=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:s[2],strings:r,ctor:"."===s[1]?tt:"?"===s[1]?et:"@"===s[1]?it:X}),i.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(B.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=w?w.emptyScript:"";for(let r=0;r<e;r++)i.append(t[r],U()),q.nextNode(),l.push({type:2,index:++o});i.append(t[e],U())}}}else if(8===i.nodeType)if(i.data===k)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function K(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3?arguments[3]:void 0;if(e===Y)return e;let s=void 0!==r?i._$Co?.[r]:i._$Cl;const o=O(e)?void 0:e._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(t),s._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=s:i._$Cl=s),void 0!==s&&(e=K(t,s._$AS(t,e.values),s,r)),e}class G{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??z).importNode(e,!0);q.currentNode=r;let s=q.nextNode(),o=0,n=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new Q(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new rt(s,this,t)),this._$AV.push(e),a=i[++n]}o!==a?.index&&(s=q.nextNode(),o++)}return q.currentNode=z,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t){t=K(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),O(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==Y&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==W&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=J.createElement(F(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new G(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new J(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const s of t)r===e.length?e.push(i=new Q(this.S(U()),this.S(U()),this,this.options)):i=e[r],i._$AI(s),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class X{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,s){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}_$AI(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const s=this.strings;let o=!1;if(void 0===s)t=K(this,t,e,0),o=!O(t)||t!==this._$AH&&t!==Y,o&&(this._$AH=t);else{const r=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=K(this,r[i+n],e,n),a===Y&&(a=this._$AH[n]),o||=!O(a)||a!==this._$AH[n],a===W?t=W:t!==W&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}o&&!r&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends X{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class et extends X{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class it extends X{constructor(t,e,i,r,s){super(t,e,i,r,s),this.type=5}_$AI(t){if((t=K(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??W)===Y)return;const e=this._$AH,i=t===W&&e!==W||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==W&&(e===W||i);i&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class rt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st=A.litHtmlPolyfillSupport;st?.(J,Q),(A.litHtmlVersions??=[]).push("3.1.4");
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+ class ot extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const r=i?.renderBefore??e;let s=r._$litPart$;if(void 0===s){const t=i?.renderBefore??null;r._$litPart$=s=new Q(e.insertBefore(U(),t),t,void 0,i??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}}ot._$litElement$=!0,ot.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ot});const nt=globalThis.litElementPolyfillSupport;nt?.({LitElement:ot}),(globalThis.litElementVersions??=[]).push("4.0.6");
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+ const at={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:$},lt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at,e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const{kind:r,metadata:s}=i;let o=globalThis.litPropertyMetadata.get(s);if(void 0===o&&globalThis.litPropertyMetadata.set(s,o=new Map),o.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const s=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,s,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=i;return function(i){const s=this[r];e.call(this,i),this.requestUpdate(r,s,t)}}throw Error("Unsupported decorator location: "+r)};
31
+ /**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */function dt(t){return(e,i)=>"object"==typeof i?lt(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}const ht={spinner1:"lds-dual-ring",spinner2:"lds-circle",spinner3:"loader",spinner4:"lds-hourglass",spinner5:"loader-3rd",spinner6:"loader-ying-yang",spinner7:"loader-in-out-circle",spinner8:"loader-arrow",spinner9:"loader-jump-stair",spinner10:"loader-yin-yang-2",spinner11:"loader-sent-email"},pt=(function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];const o=1===t.length?t[0]:i.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new n(o,t,s)})`
36
+ .spin-container {
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ background-color: var(--lds-backgroundColor, rgb(153, 153, 153));
41
+ z-index: 99999;
42
+ position: fixed;
43
+ top: 0;
44
+ left: 0;
45
+ right: 0;
46
+ bottom: 0;
47
+ width: 100%;
48
+ height: 100%;
49
+ opacity: 1;
50
+ }
51
+
52
+ .lds-dual-ring,
53
+ .lds-dual-ring:after {
54
+ box-sizing: border-box;
55
+ }
56
+ .lds-dual-ring {
57
+ display: inline-block;
58
+ width: 80px;
59
+ height: 80px;
60
+ }
61
+ .lds-dual-ring:after {
62
+ content: " ";
63
+ display: block;
64
+ width: var(--lds-dual-ring-size, 64px);
65
+ height: var(--lds-dual-ring-size, 64px);
66
+ margin: 8px;
67
+ border-radius: 50%;
68
+ border: 6.4px solid currentColor;
69
+ border-color: currentColor transparent currentColor transparent;
70
+ animation: lds-dual-ring 1.2s linear infinite;
71
+ }
72
+ @keyframes lds-dual-ring {
73
+ 0% {
74
+ transform: rotate(0deg);
75
+ }
76
+ 100% {
77
+ transform: rotate(360deg);
78
+ }
79
+ }
80
+
81
+ .loader {
82
+ width: var(--lds-dual-ring-size, 64px);
83
+ aspect-ratio: 1;
84
+ border-radius: 50%;
85
+ border: 8px solid;
86
+ animation: l20-1 0.8s infinite linear alternate, l20-2 1.6s infinite linear;
87
+ }
88
+ @keyframes l20-1 {
89
+ 0% {
90
+ clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
91
+ }
92
+ 12.5% {
93
+ clip-path: polygon(
94
+ 50% 50%,
95
+ 0 0,
96
+ 50% 0%,
97
+ 100% 0%,
98
+ 100% 0%,
99
+ 100% 0%,
100
+ 100% 0%
101
+ );
102
+ }
103
+ 25% {
104
+ clip-path: polygon(
105
+ 50% 50%,
106
+ 0 0,
107
+ 50% 0%,
108
+ 100% 0%,
109
+ 100% 100%,
110
+ 100% 100%,
111
+ 100% 100%
112
+ );
113
+ }
114
+ 50% {
115
+ clip-path: polygon(
116
+ 50% 50%,
117
+ 0 0,
118
+ 50% 0%,
119
+ 100% 0%,
120
+ 100% 100%,
121
+ 50% 100%,
122
+ 0% 100%
123
+ );
124
+ }
125
+ 62.5% {
126
+ clip-path: polygon(
127
+ 50% 50%,
128
+ 100% 0,
129
+ 100% 0%,
130
+ 100% 0%,
131
+ 100% 100%,
132
+ 50% 100%,
133
+ 0% 100%
134
+ );
135
+ }
136
+ 75% {
137
+ clip-path: polygon(
138
+ 50% 50%,
139
+ 100% 100%,
140
+ 100% 100%,
141
+ 100% 100%,
142
+ 100% 100%,
143
+ 50% 100%,
144
+ 0% 100%
145
+ );
146
+ }
147
+ 100% {
148
+ clip-path: polygon(
149
+ 50% 50%,
150
+ 50% 100%,
151
+ 50% 100%,
152
+ 50% 100%,
153
+ 50% 100%,
154
+ 50% 100%,
155
+ 0% 100%
156
+ );
157
+ }
158
+ }
159
+ @keyframes l20-2 {
160
+ 0% {
161
+ transform: scaleY(1) rotate(0deg);
162
+ }
163
+ 49.99% {
164
+ transform: scaleY(1) rotate(135deg);
165
+ }
166
+ 50% {
167
+ transform: scaleY(-1) rotate(0deg);
168
+ }
169
+ 100% {
170
+ transform: scaleY(-1) rotate(-135deg);
171
+ }
172
+ }
173
+
174
+ .lds-circle,
175
+ .lds-circle {
176
+ box-sizing: border-box;
177
+ }
178
+ .lds-circle {
179
+ display: inline-block;
180
+ transform: translateZ(1px);
181
+ }
182
+ .lds-circle {
183
+ display: inline-block;
184
+ width: 64px;
185
+ height: 64px;
186
+ margin: 8px;
187
+ background: currentColor;
188
+ border-radius: 50%;
189
+ animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
190
+ }
191
+ @keyframes lds-circle {
192
+ 0%,
193
+ 100% {
194
+ animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
195
+ }
196
+ 0% {
197
+ transform: rotateY(0deg);
198
+ }
199
+ 50% {
200
+ transform: rotateY(1800deg);
201
+ animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
202
+ }
203
+ 100% {
204
+ transform: rotateY(3600deg);
205
+ }
206
+ }
207
+
208
+ .lds-hourglass,
209
+ .lds-hourglass:after {
210
+ box-sizing: border-box;
211
+ }
212
+ .lds-hourglass {
213
+ display: inline-block;
214
+ position: relative;
215
+ width: 80px;
216
+ height: 80px;
217
+ }
218
+ .lds-hourglass:after {
219
+ content: " ";
220
+ display: block;
221
+ border-radius: 50%;
222
+ width: 0;
223
+ height: 0;
224
+ margin: 8px;
225
+ box-sizing: border-box;
226
+ border: 32px solid currentColor;
227
+ border-color: currentColor transparent currentColor transparent;
228
+ animation: lds-hourglass 1.2s infinite;
229
+ }
230
+ @keyframes lds-hourglass {
231
+ 0% {
232
+ transform: rotate(0);
233
+ animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
234
+ }
235
+ 50% {
236
+ transform: rotate(900deg);
237
+ animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
238
+ }
239
+ 100% {
240
+ transform: rotate(1800deg);
241
+ }
242
+ }
243
+
244
+ .loader-3rd {
245
+ width: var(--lds-dual-ring-size, 64px);
246
+ aspect-ratio: 1;
247
+ display: grid;
248
+ border: 4px solid #0000;
249
+ border-radius: 50%;
250
+ border-right-color: inherit;
251
+ animation: l15 1s infinite linear;
252
+ }
253
+ .loader-3rd::before,
254
+ .loader-3rd::after {
255
+ content: "";
256
+ grid-area: 1/1;
257
+ margin: 2px;
258
+ border: inherit;
259
+ border-radius: 50%;
260
+ animation: l15 2s infinite;
261
+ }
262
+ .loader-3rd::after {
263
+ margin: 8px;
264
+ animation-duration: 3s;
265
+ }
266
+ @keyframes l15 {
267
+ 100% {
268
+ transform: rotate(1turn);
269
+ }
270
+ }
271
+
272
+ .loader-ying-yang {
273
+ width: var(--lds-dual-ring-size, 64px);
274
+ height: var(--lds-dual-ring-size, 64px);
275
+ border-radius: 50%;
276
+ display: inline-block;
277
+ border-top: 4px solid #fff;
278
+ border-right: 4px solid transparent;
279
+ box-sizing: border-box;
280
+ animation: rotation 1s linear infinite;
281
+ }
282
+ .loader-ying-yang::after {
283
+ content: "";
284
+ box-sizing: border-box;
285
+ position: absolute;
286
+ left: 0;
287
+ top: 0;
288
+ width: var(--lds-dual-ring-size, 64px);
289
+ height: var(--lds-dual-ring-size, 64px);
290
+ border-radius: 50%;
291
+ border-left: 4px solid #ff3d00;
292
+ border-bottom: 4px solid transparent;
293
+ animation: rotation 0.5s linear infinite reverse;
294
+ }
295
+ @keyframes rotation {
296
+ 0% {
297
+ transform: rotate(0deg);
298
+ }
299
+ 100% {
300
+ transform: rotate(360deg);
301
+ }
302
+ }
303
+
304
+ .loader-in-out-circle {
305
+ width: var(--lds-dual-ring-size, 64px);
306
+ height: var(--lds-dual-ring-size, 64px);
307
+ border-radius: 50%;
308
+ display: inline-block;
309
+ position: relative;
310
+ border: 4px solid #ff3d00;
311
+ box-sizing: border-box;
312
+ animation: rotation 1s linear infinite;
313
+ }
314
+ .loader-in-out-circle::after {
315
+ content: "";
316
+ box-sizing: border-box;
317
+ position: absolute;
318
+ left: 4px;
319
+ top: 4px;
320
+ border: 4px solid #fff;
321
+ width: 20px;
322
+ height: 20px;
323
+ border-radius: 50%;
324
+ }
325
+
326
+ @keyframes rotation {
327
+ 0% {
328
+ transform: rotate(0deg);
329
+ }
330
+ 100% {
331
+ transform: rotate(360deg);
332
+ }
333
+ }
334
+
335
+ .loader-arrow {
336
+ width: 48px;
337
+ height: 48px;
338
+ display: inline-block;
339
+ position: relative;
340
+ border: 3px solid;
341
+ border-color: #de3500 #0000 #fff #0000;
342
+ border-radius: 50%;
343
+ box-sizing: border-box;
344
+ animation: 1s rotate linear infinite;
345
+ }
346
+ .loader-arrow:before,
347
+ .loader-arrow:after {
348
+ content: "";
349
+ top: 0;
350
+ left: 0;
351
+ position: absolute;
352
+ border: 10px solid transparent;
353
+ border-bottom-color: #fff;
354
+ transform: translate(-10px, 19px) rotate(-35deg);
355
+ }
356
+ .loader-arrow:after {
357
+ border-color: #de3500 #0000 #0000 #0000;
358
+ transform: translate(32px, 3px) rotate(-35deg);
359
+ }
360
+ @keyframes rotate {
361
+ 100% {
362
+ transform: rotate(360deg);
363
+ }
364
+ }
365
+
366
+ .loader-jump-stair {
367
+ position: relative;
368
+ width: 120px;
369
+ height: 90px;
370
+ margin: 0 auto;
371
+ }
372
+ .loader-jump-stair:before {
373
+ content: "";
374
+ position: absolute;
375
+ bottom: 30px;
376
+ left: 50px;
377
+ height: 30px;
378
+ width: 30px;
379
+ border-radius: 50%;
380
+ background: #ff3d00;
381
+ animation: loading-bounce 0.5s ease-in-out infinite alternate;
382
+ }
383
+ .loader-jump-stair:after {
384
+ content: "";
385
+ position: absolute;
386
+ right: 0;
387
+ top: 0;
388
+ height: 7px;
389
+ width: 45px;
390
+ border-radius: 4px;
391
+ box-shadow: 0 5px 0 #fff, -35px 50px 0 #fff, -70px 95px 0 #fff;
392
+ animation: loading-step 1s ease-in-out infinite;
393
+ }
394
+
395
+ @keyframes loading-bounce {
396
+ 0% {
397
+ transform: scale(1, 0.7);
398
+ }
399
+ 40% {
400
+ transform: scale(0.8, 1.2);
401
+ }
402
+ 60% {
403
+ transform: scale(1, 1);
404
+ }
405
+ 100% {
406
+ bottom: 140px;
407
+ }
408
+ }
409
+ @keyframes loading-step {
410
+ 0% {
411
+ box-shadow: 0 10px 0 rgba(0, 0, 0, 0), 0 10px 0 #fff, -35px 50px 0 #fff,
412
+ -70px 90px 0 #fff;
413
+ }
414
+ 100% {
415
+ box-shadow: 0 10px 0 #fff, -35px 50px 0 #fff, -70px 90px 0 #fff,
416
+ -70px 90px 0 rgba(0, 0, 0, 0);
417
+ }
418
+ }
419
+
420
+ .loader-yin-yang-2 {
421
+ width: 96px;
422
+ box-sizing: content-box;
423
+ height: 48px;
424
+ background: #fff;
425
+ border-color: #de3500;
426
+ border-style: solid;
427
+ border-width: 2px 2px 50px 2px;
428
+ border-radius: 100%;
429
+ position: relative;
430
+ animation: 3s yinYang linear infinite;
431
+ }
432
+ .loader-yin-yang-2:before {
433
+ content: "";
434
+ position: absolute;
435
+ top: 50%;
436
+ left: 0;
437
+ background: #fff;
438
+ border: 18px solid #de3500;
439
+ border-radius: 100%;
440
+ width: 12px;
441
+ height: 12px;
442
+ box-sizing: content-box;
443
+ }
444
+ .loader-yin-yang-2:after {
445
+ content: "";
446
+ position: absolute;
447
+ top: 50%;
448
+ left: 50%;
449
+ background: #de3500;
450
+ border: 18px solid #fff;
451
+ border-radius: 100%;
452
+ width: 12px;
453
+ height: 12px;
454
+ box-sizing: content-box;
455
+ }
456
+ @keyframes yinYang {
457
+ 100% {
458
+ transform: rotate(360deg);
459
+ }
460
+ }
461
+
462
+ .loader-sent-email {
463
+ position: relative;
464
+ border-style: solid;
465
+ box-sizing: border-box;
466
+ border-width: 40px 60px 30px 60px;
467
+ border-color: #3760c9 #96ddfc #96ddfc #36bbf7;
468
+ animation: envFloating 1s ease-in infinite alternate;
469
+ }
470
+
471
+ .loader-sent-email:after {
472
+ content: "";
473
+ position: absolute;
474
+ right: 62px;
475
+ top: -40px;
476
+ height: 70px;
477
+ width: 50px;
478
+ background-image: linear-gradient(#fff 45px, transparent 0),
479
+ linear-gradient(#fff 45px, transparent 0),
480
+ linear-gradient(#fff 45px, transparent 0);
481
+ background-repeat: no-repeat;
482
+ background-size: 30px 4px;
483
+ background-position: 0px 11px, 8px 35px, 0px 60px;
484
+ animation: envDropping 0.75s linear infinite;
485
+ }
486
+
487
+ @keyframes envFloating {
488
+ 0% {
489
+ transform: translate(-2px, -5px);
490
+ }
491
+ 100% {
492
+ transform: translate(0, 5px);
493
+ }
494
+ }
495
+
496
+ @keyframes envDropping {
497
+ 0% {
498
+ background-position: 100px 11px, 115px 35px, 105px 60px;
499
+ opacity: 1;
500
+ }
501
+ 50% {
502
+ background-position: 0px 11px, 20px 35px, 5px 60px;
503
+ }
504
+ 60% {
505
+ background-position: -30px 11px, 0px 35px, -10px 60px;
506
+ }
507
+ 75%,
508
+ 100% {
509
+ background-position: -30px 11px, -30px 35px, -30px 60px;
510
+ opacity: 0;
511
+ }
512
+ }
513
+ `;let ct=class extends ot{constructor(){super(...arguments),this.name="spinner1",this.size="64px",this.backgroundColor="rgb(153, 153, 153)",this.center=!1}updated(t){t.has("size")&&this.style.setProperty("--lds-dual-ring-size",this.size),t.has("backgroundColor")&&this.style.setProperty("--lds-backgroundColor",this.backgroundColor)}render(){return I`
514
+ <div class="${this.center?"spin-container":""}">
515
+ <div class="${ht[this.name]}"></div>
516
+ </div>
517
+ `}};ct.styles=[pt],t([dt({type:String}),e("design:type",Object)],ct.prototype,"name",void 0),t([dt({type:String}),e("design:type",Object)],ct.prototype,"size",void 0),t([dt({type:String}),e("design:type",Object)],ct.prototype,"backgroundColor",void 0),t([dt({type:Boolean}),e("design:type",Object)],ct.prototype,"center",void 0),ct=t([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("loading-spinner-element")],ct);
@@ -0,0 +1,14 @@
1
+ export declare const SpinnerName: {
2
+ spinner1: string;
3
+ spinner2: string;
4
+ spinner3: string;
5
+ spinner4: string;
6
+ spinner5: string;
7
+ spinner6: string;
8
+ spinner7: string;
9
+ spinner8: string;
10
+ spinner9: string;
11
+ spinner10: string;
12
+ spinner11: string;
13
+ };
14
+ export declare const SpinnerStyle: import("lit").CSSResult;
@@ -0,0 +1,493 @@
1
+ import { css } from "lit";
2
+ export const SpinnerName = {
3
+ spinner1: "lds-dual-ring",
4
+ spinner2: "lds-circle",
5
+ spinner3: "loader",
6
+ spinner4: "lds-hourglass",
7
+ spinner5: "loader-3rd",
8
+ spinner6: "loader-ying-yang",
9
+ spinner7: "loader-in-out-circle",
10
+ spinner8: "loader-arrow",
11
+ spinner9: "loader-jump-stair",
12
+ spinner10: "loader-yin-yang-2",
13
+ spinner11: "loader-sent-email",
14
+ };
15
+ export const SpinnerStyle = css `
16
+ .spin-container {
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ background-color: var(--lds-backgroundColor, rgb(153, 153, 153));
21
+ z-index: 99999;
22
+ position: fixed;
23
+ top: 0;
24
+ left: 0;
25
+ right: 0;
26
+ bottom: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ opacity: 1;
30
+ }
31
+
32
+ .lds-dual-ring,
33
+ .lds-dual-ring:after {
34
+ box-sizing: border-box;
35
+ }
36
+ .lds-dual-ring {
37
+ display: inline-block;
38
+ width: 80px;
39
+ height: 80px;
40
+ }
41
+ .lds-dual-ring:after {
42
+ content: " ";
43
+ display: block;
44
+ width: var(--lds-dual-ring-size, 64px);
45
+ height: var(--lds-dual-ring-size, 64px);
46
+ margin: 8px;
47
+ border-radius: 50%;
48
+ border: 6.4px solid currentColor;
49
+ border-color: currentColor transparent currentColor transparent;
50
+ animation: lds-dual-ring 1.2s linear infinite;
51
+ }
52
+ @keyframes lds-dual-ring {
53
+ 0% {
54
+ transform: rotate(0deg);
55
+ }
56
+ 100% {
57
+ transform: rotate(360deg);
58
+ }
59
+ }
60
+
61
+ .loader {
62
+ width: var(--lds-dual-ring-size, 64px);
63
+ aspect-ratio: 1;
64
+ border-radius: 50%;
65
+ border: 8px solid;
66
+ animation: l20-1 0.8s infinite linear alternate, l20-2 1.6s infinite linear;
67
+ }
68
+ @keyframes l20-1 {
69
+ 0% {
70
+ clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
71
+ }
72
+ 12.5% {
73
+ clip-path: polygon(
74
+ 50% 50%,
75
+ 0 0,
76
+ 50% 0%,
77
+ 100% 0%,
78
+ 100% 0%,
79
+ 100% 0%,
80
+ 100% 0%
81
+ );
82
+ }
83
+ 25% {
84
+ clip-path: polygon(
85
+ 50% 50%,
86
+ 0 0,
87
+ 50% 0%,
88
+ 100% 0%,
89
+ 100% 100%,
90
+ 100% 100%,
91
+ 100% 100%
92
+ );
93
+ }
94
+ 50% {
95
+ clip-path: polygon(
96
+ 50% 50%,
97
+ 0 0,
98
+ 50% 0%,
99
+ 100% 0%,
100
+ 100% 100%,
101
+ 50% 100%,
102
+ 0% 100%
103
+ );
104
+ }
105
+ 62.5% {
106
+ clip-path: polygon(
107
+ 50% 50%,
108
+ 100% 0,
109
+ 100% 0%,
110
+ 100% 0%,
111
+ 100% 100%,
112
+ 50% 100%,
113
+ 0% 100%
114
+ );
115
+ }
116
+ 75% {
117
+ clip-path: polygon(
118
+ 50% 50%,
119
+ 100% 100%,
120
+ 100% 100%,
121
+ 100% 100%,
122
+ 100% 100%,
123
+ 50% 100%,
124
+ 0% 100%
125
+ );
126
+ }
127
+ 100% {
128
+ clip-path: polygon(
129
+ 50% 50%,
130
+ 50% 100%,
131
+ 50% 100%,
132
+ 50% 100%,
133
+ 50% 100%,
134
+ 50% 100%,
135
+ 0% 100%
136
+ );
137
+ }
138
+ }
139
+ @keyframes l20-2 {
140
+ 0% {
141
+ transform: scaleY(1) rotate(0deg);
142
+ }
143
+ 49.99% {
144
+ transform: scaleY(1) rotate(135deg);
145
+ }
146
+ 50% {
147
+ transform: scaleY(-1) rotate(0deg);
148
+ }
149
+ 100% {
150
+ transform: scaleY(-1) rotate(-135deg);
151
+ }
152
+ }
153
+
154
+ .lds-circle,
155
+ .lds-circle {
156
+ box-sizing: border-box;
157
+ }
158
+ .lds-circle {
159
+ display: inline-block;
160
+ transform: translateZ(1px);
161
+ }
162
+ .lds-circle {
163
+ display: inline-block;
164
+ width: 64px;
165
+ height: 64px;
166
+ margin: 8px;
167
+ background: currentColor;
168
+ border-radius: 50%;
169
+ animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
170
+ }
171
+ @keyframes lds-circle {
172
+ 0%,
173
+ 100% {
174
+ animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
175
+ }
176
+ 0% {
177
+ transform: rotateY(0deg);
178
+ }
179
+ 50% {
180
+ transform: rotateY(1800deg);
181
+ animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
182
+ }
183
+ 100% {
184
+ transform: rotateY(3600deg);
185
+ }
186
+ }
187
+
188
+ .lds-hourglass,
189
+ .lds-hourglass:after {
190
+ box-sizing: border-box;
191
+ }
192
+ .lds-hourglass {
193
+ display: inline-block;
194
+ position: relative;
195
+ width: 80px;
196
+ height: 80px;
197
+ }
198
+ .lds-hourglass:after {
199
+ content: " ";
200
+ display: block;
201
+ border-radius: 50%;
202
+ width: 0;
203
+ height: 0;
204
+ margin: 8px;
205
+ box-sizing: border-box;
206
+ border: 32px solid currentColor;
207
+ border-color: currentColor transparent currentColor transparent;
208
+ animation: lds-hourglass 1.2s infinite;
209
+ }
210
+ @keyframes lds-hourglass {
211
+ 0% {
212
+ transform: rotate(0);
213
+ animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
214
+ }
215
+ 50% {
216
+ transform: rotate(900deg);
217
+ animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
218
+ }
219
+ 100% {
220
+ transform: rotate(1800deg);
221
+ }
222
+ }
223
+
224
+ .loader-3rd {
225
+ width: var(--lds-dual-ring-size, 64px);
226
+ aspect-ratio: 1;
227
+ display: grid;
228
+ border: 4px solid #0000;
229
+ border-radius: 50%;
230
+ border-right-color: inherit;
231
+ animation: l15 1s infinite linear;
232
+ }
233
+ .loader-3rd::before,
234
+ .loader-3rd::after {
235
+ content: "";
236
+ grid-area: 1/1;
237
+ margin: 2px;
238
+ border: inherit;
239
+ border-radius: 50%;
240
+ animation: l15 2s infinite;
241
+ }
242
+ .loader-3rd::after {
243
+ margin: 8px;
244
+ animation-duration: 3s;
245
+ }
246
+ @keyframes l15 {
247
+ 100% {
248
+ transform: rotate(1turn);
249
+ }
250
+ }
251
+
252
+ .loader-ying-yang {
253
+ width: var(--lds-dual-ring-size, 64px);
254
+ height: var(--lds-dual-ring-size, 64px);
255
+ border-radius: 50%;
256
+ display: inline-block;
257
+ border-top: 4px solid #fff;
258
+ border-right: 4px solid transparent;
259
+ box-sizing: border-box;
260
+ animation: rotation 1s linear infinite;
261
+ }
262
+ .loader-ying-yang::after {
263
+ content: "";
264
+ box-sizing: border-box;
265
+ position: absolute;
266
+ left: 0;
267
+ top: 0;
268
+ width: var(--lds-dual-ring-size, 64px);
269
+ height: var(--lds-dual-ring-size, 64px);
270
+ border-radius: 50%;
271
+ border-left: 4px solid #ff3d00;
272
+ border-bottom: 4px solid transparent;
273
+ animation: rotation 0.5s linear infinite reverse;
274
+ }
275
+ @keyframes rotation {
276
+ 0% {
277
+ transform: rotate(0deg);
278
+ }
279
+ 100% {
280
+ transform: rotate(360deg);
281
+ }
282
+ }
283
+
284
+ .loader-in-out-circle {
285
+ width: var(--lds-dual-ring-size, 64px);
286
+ height: var(--lds-dual-ring-size, 64px);
287
+ border-radius: 50%;
288
+ display: inline-block;
289
+ position: relative;
290
+ border: 4px solid #ff3d00;
291
+ box-sizing: border-box;
292
+ animation: rotation 1s linear infinite;
293
+ }
294
+ .loader-in-out-circle::after {
295
+ content: "";
296
+ box-sizing: border-box;
297
+ position: absolute;
298
+ left: 4px;
299
+ top: 4px;
300
+ border: 4px solid #fff;
301
+ width: 20px;
302
+ height: 20px;
303
+ border-radius: 50%;
304
+ }
305
+
306
+ @keyframes rotation {
307
+ 0% {
308
+ transform: rotate(0deg);
309
+ }
310
+ 100% {
311
+ transform: rotate(360deg);
312
+ }
313
+ }
314
+
315
+ .loader-arrow {
316
+ width: 48px;
317
+ height: 48px;
318
+ display: inline-block;
319
+ position: relative;
320
+ border: 3px solid;
321
+ border-color: #de3500 #0000 #fff #0000;
322
+ border-radius: 50%;
323
+ box-sizing: border-box;
324
+ animation: 1s rotate linear infinite;
325
+ }
326
+ .loader-arrow:before,
327
+ .loader-arrow:after {
328
+ content: "";
329
+ top: 0;
330
+ left: 0;
331
+ position: absolute;
332
+ border: 10px solid transparent;
333
+ border-bottom-color: #fff;
334
+ transform: translate(-10px, 19px) rotate(-35deg);
335
+ }
336
+ .loader-arrow:after {
337
+ border-color: #de3500 #0000 #0000 #0000;
338
+ transform: translate(32px, 3px) rotate(-35deg);
339
+ }
340
+ @keyframes rotate {
341
+ 100% {
342
+ transform: rotate(360deg);
343
+ }
344
+ }
345
+
346
+ .loader-jump-stair {
347
+ position: relative;
348
+ width: 120px;
349
+ height: 90px;
350
+ margin: 0 auto;
351
+ }
352
+ .loader-jump-stair:before {
353
+ content: "";
354
+ position: absolute;
355
+ bottom: 30px;
356
+ left: 50px;
357
+ height: 30px;
358
+ width: 30px;
359
+ border-radius: 50%;
360
+ background: #ff3d00;
361
+ animation: loading-bounce 0.5s ease-in-out infinite alternate;
362
+ }
363
+ .loader-jump-stair:after {
364
+ content: "";
365
+ position: absolute;
366
+ right: 0;
367
+ top: 0;
368
+ height: 7px;
369
+ width: 45px;
370
+ border-radius: 4px;
371
+ box-shadow: 0 5px 0 #fff, -35px 50px 0 #fff, -70px 95px 0 #fff;
372
+ animation: loading-step 1s ease-in-out infinite;
373
+ }
374
+
375
+ @keyframes loading-bounce {
376
+ 0% {
377
+ transform: scale(1, 0.7);
378
+ }
379
+ 40% {
380
+ transform: scale(0.8, 1.2);
381
+ }
382
+ 60% {
383
+ transform: scale(1, 1);
384
+ }
385
+ 100% {
386
+ bottom: 140px;
387
+ }
388
+ }
389
+ @keyframes loading-step {
390
+ 0% {
391
+ box-shadow: 0 10px 0 rgba(0, 0, 0, 0), 0 10px 0 #fff, -35px 50px 0 #fff,
392
+ -70px 90px 0 #fff;
393
+ }
394
+ 100% {
395
+ box-shadow: 0 10px 0 #fff, -35px 50px 0 #fff, -70px 90px 0 #fff,
396
+ -70px 90px 0 rgba(0, 0, 0, 0);
397
+ }
398
+ }
399
+
400
+ .loader-yin-yang-2 {
401
+ width: 96px;
402
+ box-sizing: content-box;
403
+ height: 48px;
404
+ background: #fff;
405
+ border-color: #de3500;
406
+ border-style: solid;
407
+ border-width: 2px 2px 50px 2px;
408
+ border-radius: 100%;
409
+ position: relative;
410
+ animation: 3s yinYang linear infinite;
411
+ }
412
+ .loader-yin-yang-2:before {
413
+ content: "";
414
+ position: absolute;
415
+ top: 50%;
416
+ left: 0;
417
+ background: #fff;
418
+ border: 18px solid #de3500;
419
+ border-radius: 100%;
420
+ width: 12px;
421
+ height: 12px;
422
+ box-sizing: content-box;
423
+ }
424
+ .loader-yin-yang-2:after {
425
+ content: "";
426
+ position: absolute;
427
+ top: 50%;
428
+ left: 50%;
429
+ background: #de3500;
430
+ border: 18px solid #fff;
431
+ border-radius: 100%;
432
+ width: 12px;
433
+ height: 12px;
434
+ box-sizing: content-box;
435
+ }
436
+ @keyframes yinYang {
437
+ 100% {
438
+ transform: rotate(360deg);
439
+ }
440
+ }
441
+
442
+ .loader-sent-email {
443
+ position: relative;
444
+ border-style: solid;
445
+ box-sizing: border-box;
446
+ border-width: 40px 60px 30px 60px;
447
+ border-color: #3760c9 #96ddfc #96ddfc #36bbf7;
448
+ animation: envFloating 1s ease-in infinite alternate;
449
+ }
450
+
451
+ .loader-sent-email:after {
452
+ content: "";
453
+ position: absolute;
454
+ right: 62px;
455
+ top: -40px;
456
+ height: 70px;
457
+ width: 50px;
458
+ background-image: linear-gradient(#fff 45px, transparent 0),
459
+ linear-gradient(#fff 45px, transparent 0),
460
+ linear-gradient(#fff 45px, transparent 0);
461
+ background-repeat: no-repeat;
462
+ background-size: 30px 4px;
463
+ background-position: 0px 11px, 8px 35px, 0px 60px;
464
+ animation: envDropping 0.75s linear infinite;
465
+ }
466
+
467
+ @keyframes envFloating {
468
+ 0% {
469
+ transform: translate(-2px, -5px);
470
+ }
471
+ 100% {
472
+ transform: translate(0, 5px);
473
+ }
474
+ }
475
+
476
+ @keyframes envDropping {
477
+ 0% {
478
+ background-position: 100px 11px, 115px 35px, 105px 60px;
479
+ opacity: 1;
480
+ }
481
+ 50% {
482
+ background-position: 0px 11px, 20px 35px, 5px 60px;
483
+ }
484
+ 60% {
485
+ background-position: -30px 11px, 0px 35px, -10px 60px;
486
+ }
487
+ 75%,
488
+ 100% {
489
+ background-position: -30px 11px, -30px 35px, -30px 60px;
490
+ opacity: 0;
491
+ }
492
+ }
493
+ `;
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "lit-litelements",
3
+ "version": "1.0.0",
4
+ "description": "My LitElement component build for loading spinner with 10 types",
5
+ "main": "dist/main.js",
6
+ "module": "dist/main.js",
7
+ "types": "dist/main.d.js",
8
+ "scripts": {
9
+ "test": "echo \"Error: no test specified\" && exit 1",
10
+ "start": "concurrently \"tsc --watch\" \"rollup -c --watch\"",
11
+ "build": "tsc && rollup -c"
12
+ },
13
+ "files": [
14
+ "dist/*"
15
+ ],
16
+ "keywords": [
17
+ "lit-element",
18
+ "web-components",
19
+ "loading-spiner"
20
+ ],
21
+ "author": "Someone using other to build",
22
+ "license": "ISC",
23
+ "dependencies": {
24
+ "lit": "^3.1.4",
25
+ "tslib": "^2.6.3"
26
+ },
27
+ "devDependencies": {
28
+ "@babel/core": "^7.24.7",
29
+ "@babel/plugin-proposal-decorators": "^7.24.7",
30
+ "@babel/preset-env": "^7.24.7",
31
+ "@rollup/plugin-babel": "^6.0.4",
32
+ "@rollup/plugin-commonjs": "^26.0.1",
33
+ "@rollup/plugin-node-resolve": "^15.2.3",
34
+ "@rollup/plugin-typescript": "^11.1.6",
35
+ "@types/node": "^20.14.9",
36
+ "concurrently": "^8.2.2",
37
+ "rollup": "^2.79.1",
38
+ "rollup-plugin-commonjs": "^10.1.0",
39
+ "rollup-plugin-node-resolve": "^5.2.0",
40
+ "rollup-plugin-terser": "^7.0.2",
41
+ "typescript": "^5.5.3"
42
+ }
43
+ }
package/readme.md ADDED
@@ -0,0 +1,14 @@
1
+ # This is web-component using lit
2
+ ## loading spinner
3
+ get data form https://cssloaders.github.io/
4
+ and https://loading.io/css/
5
+
6
+ and combine to a component call
7
+
8
+ <loading-spinner-element ></loading-spinner-element>
9
+
10
+ This element have 4 property:
11
+ 1. name : by default will be spinner1, option spinner1 to spinner11
12
+ 2. size : size for some loader, default 64px
13
+ 3. backgroundColor: the color background of the spinner
14
+ 4. center: to make the spinner in the center of page or not