@libs-ui/components-spinner 0.2.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/README.md +3 -0
- package/esm2022/index.mjs +3 -0
- package/esm2022/interfaces/index.mjs +2 -0
- package/esm2022/interfaces/spinner.type.mjs +2 -0
- package/esm2022/libs-ui-components-spinner.mjs +5 -0
- package/esm2022/spinner.component.mjs +37 -0
- package/fesm2022/libs-ui-components-spinner.mjs +44 -0
- package/fesm2022/libs-ui-components-spinner.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/spinner.type.d.ts +1 -0
- package/package.json +25 -0
- package/spinner.component.d.ts +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './spinner.component';
|
|
2
|
+
export * from './interfaces';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvc3Bpbm5lci9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3Bpbm5lci5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9pbnRlcmZhY2VzJztcbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './spinner.type';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvc3Bpbm5lci9zcmMvaW50ZXJmYWNlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdCQUFnQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcGlubmVyLnR5cGUnOyJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL3NwaW5uZXIvc3JjL2ludGVyZmFjZXMvc3Bpbm5lci50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBUWVBFX1NQSU5ORVIgPSAnc3Bpbi1hYnNvbHV0ZS1ibHVlJyB8ICdzcGluLWFic29sdXRlLXdoaXRlJyB8ICdzcGluLWJsdWUnIHwgJ3NwaW4td2hpdGUnOyJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlicy11aS1jb21wb25lbnRzLXNwaW5uZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvc3Bpbm5lci9zcmMvbGlicy11aS1jb21wb25lbnRzLXNwaW5uZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input, signal } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class LibsUiComponentsSpinnerComponent {
|
|
4
|
+
/* PROPERTY */
|
|
5
|
+
width = signal('100px');
|
|
6
|
+
height = signal('100px');
|
|
7
|
+
/* INPUT */
|
|
8
|
+
type = input('spin-absolute-blue', { transform: value => value || 'spin-absolute-blue' });
|
|
9
|
+
size = input('medium', { transform: value => value || 'medium' });
|
|
10
|
+
ngOnInit() {
|
|
11
|
+
switch (this.size()) {
|
|
12
|
+
case 'large':
|
|
13
|
+
this.width.set('64px');
|
|
14
|
+
this.height.set('64px');
|
|
15
|
+
break;
|
|
16
|
+
case 'medium':
|
|
17
|
+
this.width.set('20px');
|
|
18
|
+
this.height.set('20px');
|
|
19
|
+
break;
|
|
20
|
+
case 'small':
|
|
21
|
+
this.width.set('16px');
|
|
22
|
+
this.height.set('16px');
|
|
23
|
+
break;
|
|
24
|
+
case 'smaller':
|
|
25
|
+
this.width.set('12px');
|
|
26
|
+
this.height.set('12px');
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsSpinnerComponent, isStandalone: true, selector: "libs_ui-components-spinner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class='libs-ui-spinner-image'\n [class.libs-ui-spinner-image-absolute]=\"type() === 'spin-absolute-white' || type() === 'spin-absolute-blue'\">\n <div class=\"spin-loading\"\n [attr.color]=\"(type() === 'spin-blue' || type() === 'spin-absolute-blue')?'blue':'white'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"></div>\n</div>\n", styles: ["@keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.libs-ui-spinner-image{display:flex;align-items:center;justify-content:center;position:relative}.libs-ui-spinner-image.libs-ui-spinner-image-absolute{position:absolute;top:50%;left:50%;transform:translate(-50%) translateY(-50%);text-align:center;width:100px;height:100px;z-index:4}.libs-ui-spinner-image .spin-loading{--border-width: 15%;border-radius:50%;--color: white;--mask: radial-gradient(farthest-side, transparent calc(100% - var(--border-width) - .8px), #000 calc(100% - var(--border-width) + 0px));-webkit-mask:var(--mask);mask:var(--mask);background:conic-gradient(from 90deg at 50% 50%,#DBF1FF 0deg,rgba(43,128,255,0) .04deg,var(--color) 360deg);-webkit-animation:animation-frame-loading .7s linear infinite;animation:animation-frame-loading .7s linear infinite}.libs-ui-spinner-image .spin-loading[color=blue]{--color: var(--libs-ui-color-default, #226FF5)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsSpinnerComponent, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{ selector: 'libs_ui-components-spinner', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class='libs-ui-spinner-image'\n [class.libs-ui-spinner-image-absolute]=\"type() === 'spin-absolute-white' || type() === 'spin-absolute-blue'\">\n <div class=\"spin-loading\"\n [attr.color]=\"(type() === 'spin-blue' || type() === 'spin-absolute-blue')?'blue':'white'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"></div>\n</div>\n", styles: ["@keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.libs-ui-spinner-image{display:flex;align-items:center;justify-content:center;position:relative}.libs-ui-spinner-image.libs-ui-spinner-image-absolute{position:absolute;top:50%;left:50%;transform:translate(-50%) translateY(-50%);text-align:center;width:100px;height:100px;z-index:4}.libs-ui-spinner-image .spin-loading{--border-width: 15%;border-radius:50%;--color: white;--mask: radial-gradient(farthest-side, transparent calc(100% - var(--border-width) - .8px), #000 calc(100% - var(--border-width) + 0px));-webkit-mask:var(--mask);mask:var(--mask);background:conic-gradient(from 90deg at 50% 50%,#DBF1FF 0deg,rgba(43,128,255,0) .04deg,var(--color) 360deg);-webkit-animation:animation-frame-loading .7s linear infinite;animation:animation-frame-loading .7s linear infinite}.libs-ui-spinner-image .spin-loading[color=blue]{--color: var(--libs-ui-color-default, #226FF5)}\n"] }]
|
|
36
|
+
}] });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvc3Bpbm5lci9zcmMvc3Bpbm5lci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8u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nNldCgnMjBweCcpO1xuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAnc21hbGwnOlxuICAgICAgICB0aGlzLndpZHRoLnNldCgnMTZweCcpO1xuICAgICAgICB0aGlzLmhlaWdodC5zZXQoJzE2cHgnKTtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgJ3NtYWxsZXInOlxuICAgICAgICB0aGlzLndpZHRoLnNldCgnMTJweCcpO1xuICAgICAgICB0aGlzLmhlaWdodC5zZXQoJzEycHgnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG59XG4iLCI8ZGl2IGNsYXNzPSdsaWJzLXVpLXNwaW5uZXItaW1hZ2UnXG4gIFtjbGFzcy5saWJzLXVpLXNwaW5uZXItaW1hZ2UtYWJzb2x1dGVdPVwidHlwZSgpID09PSAnc3Bpbi1hYnNvbHV0ZS13aGl0ZScgfHwgdHlwZSgpID09PSAnc3Bpbi1hYnNvbHV0ZS1ibHVlJ1wiPlxuICA8ZGl2IGNsYXNzPVwic3Bpbi1sb2FkaW5nXCJcbiAgICBbYXR0ci5jb2xvcl09XCIodHlwZSgpID09PSAnc3Bpbi1ibHVlJyB8fCB0eXBlKCkgPT09ICdzcGluLWFic29sdXRlLWJsdWUnKT8nYmx1ZSc6J3doaXRlJ1wiXG4gICAgW3N0eWxlLndpZHRoXT1cIndpZHRoKClcIlxuICAgIFtzdHlsZS5oZWlnaHRdPVwiaGVpZ2h0KClcIj48L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, input, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class LibsUiComponentsSpinnerComponent {
|
|
5
|
+
/* PROPERTY */
|
|
6
|
+
width = signal('100px');
|
|
7
|
+
height = signal('100px');
|
|
8
|
+
/* INPUT */
|
|
9
|
+
type = input('spin-absolute-blue', { transform: value => value || 'spin-absolute-blue' });
|
|
10
|
+
size = input('medium', { transform: value => value || 'medium' });
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
switch (this.size()) {
|
|
13
|
+
case 'large':
|
|
14
|
+
this.width.set('64px');
|
|
15
|
+
this.height.set('64px');
|
|
16
|
+
break;
|
|
17
|
+
case 'medium':
|
|
18
|
+
this.width.set('20px');
|
|
19
|
+
this.height.set('20px');
|
|
20
|
+
break;
|
|
21
|
+
case 'small':
|
|
22
|
+
this.width.set('16px');
|
|
23
|
+
this.height.set('16px');
|
|
24
|
+
break;
|
|
25
|
+
case 'smaller':
|
|
26
|
+
this.width.set('12px');
|
|
27
|
+
this.height.set('12px');
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsSpinnerComponent, isStandalone: true, selector: "libs_ui-components-spinner", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class='libs-ui-spinner-image'\n [class.libs-ui-spinner-image-absolute]=\"type() === 'spin-absolute-white' || type() === 'spin-absolute-blue'\">\n <div class=\"spin-loading\"\n [attr.color]=\"(type() === 'spin-blue' || type() === 'spin-absolute-blue')?'blue':'white'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"></div>\n</div>\n", styles: ["@keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.libs-ui-spinner-image{display:flex;align-items:center;justify-content:center;position:relative}.libs-ui-spinner-image.libs-ui-spinner-image-absolute{position:absolute;top:50%;left:50%;transform:translate(-50%) translateY(-50%);text-align:center;width:100px;height:100px;z-index:4}.libs-ui-spinner-image .spin-loading{--border-width: 15%;border-radius:50%;--color: white;--mask: radial-gradient(farthest-side, transparent calc(100% - var(--border-width) - .8px), #000 calc(100% - var(--border-width) + 0px));-webkit-mask:var(--mask);mask:var(--mask);background:conic-gradient(from 90deg at 50% 50%,#DBF1FF 0deg,rgba(43,128,255,0) .04deg,var(--color) 360deg);-webkit-animation:animation-frame-loading .7s linear infinite;animation:animation-frame-loading .7s linear infinite}.libs-ui-spinner-image .spin-loading[color=blue]{--color: var(--libs-ui-color-default, #226FF5)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33
|
+
}
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsSpinnerComponent, decorators: [{
|
|
35
|
+
type: Component,
|
|
36
|
+
args: [{ selector: 'libs_ui-components-spinner', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class='libs-ui-spinner-image'\n [class.libs-ui-spinner-image-absolute]=\"type() === 'spin-absolute-white' || type() === 'spin-absolute-blue'\">\n <div class=\"spin-loading\"\n [attr.color]=\"(type() === 'spin-blue' || type() === 'spin-absolute-blue')?'blue':'white'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"></div>\n</div>\n", styles: ["@keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes animation-frame-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.libs-ui-spinner-image{display:flex;align-items:center;justify-content:center;position:relative}.libs-ui-spinner-image.libs-ui-spinner-image-absolute{position:absolute;top:50%;left:50%;transform:translate(-50%) translateY(-50%);text-align:center;width:100px;height:100px;z-index:4}.libs-ui-spinner-image .spin-loading{--border-width: 15%;border-radius:50%;--color: white;--mask: radial-gradient(farthest-side, transparent calc(100% - var(--border-width) - .8px), #000 calc(100% - var(--border-width) + 0px));-webkit-mask:var(--mask);mask:var(--mask);background:conic-gradient(from 90deg at 50% 50%,#DBF1FF 0deg,rgba(43,128,255,0) .04deg,var(--color) 360deg);-webkit-animation:animation-frame-loading .7s linear infinite;animation:animation-frame-loading .7s linear infinite}.libs-ui-spinner-image .spin-loading[color=blue]{--color: var(--libs-ui-color-default, #226FF5)}\n"] }]
|
|
37
|
+
}] });
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generated bundle index. Do not edit.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export { LibsUiComponentsSpinnerComponent };
|
|
44
|
+
//# sourceMappingURL=libs-ui-components-spinner.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libs-ui-components-spinner.mjs","sources":["../../../../../libs-ui/components/spinner/src/spinner.component.ts","../../../../../libs-ui/components/spinner/src/spinner.component.html","../../../../../libs-ui/components/spinner/src/libs-ui-components-spinner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, OnInit, signal } from '@angular/core';\nimport { TYPE_SPINNER } from './interfaces/spinner.type';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-spinner',\n templateUrl: 'spinner.component.html',\n styleUrls: ['./spinner.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class LibsUiComponentsSpinnerComponent implements OnInit {\n /* PROPERTY */\n protected width = signal<string>('100px');\n protected height = signal<string>('100px');\n\n /* INPUT */\n readonly type = input<TYPE_SPINNER, TYPE_SPINNER>('spin-absolute-blue', { transform: value => value || 'spin-absolute-blue' });\n readonly size = input<'large' | 'medium' | 'small' | 'smaller', 'large' | 'medium' | 'small' | 'smaller'>('medium', { transform: value => value || 'medium' });\n\n ngOnInit(): void {\n switch (this.size()) {\n case 'large':\n this.width.set('64px');\n this.height.set('64px');\n break;\n\n case 'medium':\n this.width.set('20px');\n this.height.set('20px');\n break;\n\n case 'small':\n this.width.set('16px');\n this.height.set('16px');\n break;\n\n case 'smaller':\n this.width.set('12px');\n this.height.set('12px');\n break;\n }\n }\n}\n","<div class='libs-ui-spinner-image'\n [class.libs-ui-spinner-image-absolute]=\"type() === 'spin-absolute-white' || type() === 'spin-absolute-blue'\">\n <div class=\"spin-loading\"\n [attr.color]=\"(type() === 'spin-blue' || type() === 'spin-absolute-blue')?'blue':'white'\"\n [style.width]=\"width()\"\n [style.height]=\"height()\"></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAWa,gCAAgC,CAAA;;AAEjC,IAAA,KAAK,GAAG,MAAM,CAAS,OAAO,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAS,OAAO,CAAC;;AAGjC,IAAA,IAAI,GAAG,KAAK,CAA6B,oBAAoB,EAAE,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,IAAI,oBAAoB,EAAE,CAAC;AACrH,IAAA,IAAI,GAAG,KAAK,CAAqF,QAAQ,EAAE,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,IAAI,QAAQ,EAAE,CAAC;IAE9J,QAAQ,GAAA;AACN,QAAA,QAAQ,IAAI,CAAC,IAAI,EAAE;AACjB,YAAA,KAAK,OAAO;AACV,gBAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;AACtB,gBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;gBACvB;AAE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|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@libs-ui/components-spinner",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^18.2.0",
|
|
6
|
+
"@angular/core": "^18.2.0"
|
|
7
|
+
},
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"module": "fesm2022/libs-ui-components-spinner.mjs",
|
|
10
|
+
"typings": "index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": {
|
|
13
|
+
"default": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./index.d.ts",
|
|
17
|
+
"esm2022": "./esm2022/libs-ui-components-spinner.mjs",
|
|
18
|
+
"esm": "./esm2022/libs-ui-components-spinner.mjs",
|
|
19
|
+
"default": "./fesm2022/libs-ui-components-spinner.mjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"tslib": "^2.3.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TYPE_SPINNER } from './interfaces/spinner.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class LibsUiComponentsSpinnerComponent implements OnInit {
|
|
5
|
+
protected width: import("@angular/core").WritableSignal<string>;
|
|
6
|
+
protected height: import("@angular/core").WritableSignal<string>;
|
|
7
|
+
readonly type: import("@angular/core").InputSignalWithTransform<TYPE_SPINNER, TYPE_SPINNER>;
|
|
8
|
+
readonly size: import("@angular/core").InputSignalWithTransform<"large" | "medium" | "small" | "smaller", "large" | "medium" | "small" | "smaller">;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsSpinnerComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsSpinnerComponent, "libs_ui-components-spinner", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|