sn-spinner-x 0.0.1 → 0.0.2

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,38 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, Component } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule, NgClass } from '@angular/common';
5
+
6
+ class SnSpinnerXComponent {
7
+ constructor() {
8
+ this.scheme = 'primary';
9
+ this.size = 'md';
10
+ this.label = 'Loading...';
11
+ }
12
+ get classes() {
13
+ return {
14
+ 'sn-spinner': true,
15
+ [`scheme-${this.scheme}`]: true,
16
+ [`size-${this.size}`]: true,
17
+ };
18
+ }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: SnSpinnerXComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: SnSpinnerXComponent, isStandalone: true, selector: "sn-spinner-x", inputs: { scheme: "scheme", size: "size", label: "label" }, ngImport: i0, template: "<span [ngClass]=\"classes\" role=\"status\" [attr.aria-label]=\"label\">\n <span class=\"sr-only\">{{ label }}</span>\n</span>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;@keyframes sn-spin{to{transform:rotate(360deg)}}.sn-spinner{display:inline-block;border-style:solid;border-radius:50%;animation:sn-spin .75s linear infinite}.sn-spinner.size-sm{width:1rem;height:1rem;border-width:2px}.sn-spinner.size-md{width:1.5rem;height:1.5rem;border-width:3px}.sn-spinner.size-lg{width:2.5rem;height:2.5rem;border-width:4px}.sn-spinner.scheme-primary{border-color:#3b82f6;border-top-color:transparent}.sn-spinner.scheme-warn{border-color:#f59e0b;border-top-color:transparent}.sn-spinner.scheme-danger{border-color:#ef4444;border-top-color:transparent}.sn-spinner.scheme-success{border-color:#22c55e;border-top-color:transparent}.sn-spinner.scheme-default{border-color:#6b7280;border-top-color:transparent}.sn-spinner .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: SnSpinnerXComponent, decorators: [{
23
+ type: Component,
24
+ args: [{ selector: 'sn-spinner-x', standalone: true, imports: [CommonModule, NgClass], template: "<span [ngClass]=\"classes\" role=\"status\" [attr.aria-label]=\"label\">\n <span class=\"sr-only\">{{ label }}</span>\n</span>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;@keyframes sn-spin{to{transform:rotate(360deg)}}.sn-spinner{display:inline-block;border-style:solid;border-radius:50%;animation:sn-spin .75s linear infinite}.sn-spinner.size-sm{width:1rem;height:1rem;border-width:2px}.sn-spinner.size-md{width:1.5rem;height:1.5rem;border-width:3px}.sn-spinner.size-lg{width:2.5rem;height:2.5rem;border-width:4px}.sn-spinner.scheme-primary{border-color:#3b82f6;border-top-color:transparent}.sn-spinner.scheme-warn{border-color:#f59e0b;border-top-color:transparent}.sn-spinner.scheme-danger{border-color:#ef4444;border-top-color:transparent}.sn-spinner.scheme-success{border-color:#22c55e;border-top-color:transparent}.sn-spinner.scheme-default{border-color:#6b7280;border-top-color:transparent}.sn-spinner .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}\n"] }]
25
+ }], propDecorators: { scheme: [{
26
+ type: Input
27
+ }], size: [{
28
+ type: Input
29
+ }], label: [{
30
+ type: Input
31
+ }] } });
32
+
33
+ /**
34
+ * Generated bundle index. Do not edit.
35
+ */
36
+
37
+ export { SnSpinnerXComponent };
38
+ //# sourceMappingURL=sn-spinner-x.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sn-spinner-x.mjs","sources":["../../../projects/sn-spinner-x/src/lib/sn-spinner-x.component.ts","../../../projects/sn-spinner-x/src/lib/sn-spinner-x.html","../../../projects/sn-spinner-x/src/sn-spinner-x.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { CommonModule, NgClass } from '@angular/common';\n\n@Component({\n selector: 'sn-spinner-x',\n standalone: true,\n imports: [CommonModule, NgClass],\n templateUrl: './sn-spinner-x.html',\n styleUrl: 'sn-spinner-x.scss',\n})\nexport class SnSpinnerXComponent {\n @Input() scheme: string = 'primary';\n @Input() size: string = 'md';\n @Input() label: string = 'Loading...';\n\n get classes(): Record<string, boolean> {\n return {\n 'sn-spinner': true,\n [`scheme-${this.scheme}`]: true,\n [`size-${this.size}`]: true,\n };\n }\n}\n","<span [ngClass]=\"classes\" role=\"status\" [attr.aria-label]=\"label\">\n <span class=\"sr-only\">{{ label }}</span>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,mBAAmB,CAAA;AAPhC,IAAA,WAAA,GAAA;QAQW,IAAA,CAAA,MAAM,GAAW,SAAS;QAC1B,IAAA,CAAA,IAAI,GAAW,IAAI;QACnB,IAAA,CAAA,KAAK,GAAW,YAAY;AAStC,IAAA;AAPC,IAAA,IAAI,OAAO,GAAA;QACT,OAAO;AACL,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,CAAC,UAAU,IAAI,CAAC,MAAM,CAAA,CAAE,GAAG,IAAI;AAC/B,YAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI;SAC5B;IACH;8GAXW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVhC,mIAGA,EAAA,MAAA,EAAA,CAAA,y6BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDGY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,cACZ,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,mIAAA,EAAA,MAAA,EAAA,CAAA,y6BAAA,CAAA,EAAA;;sBAK/B;;sBACA;;sBACA;;;AEbH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sn-spinner-x",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "SnSpinner is an Angular 21 standalone loading spinner component",
5
5
  "author": {
6
6
  "name": "Swapnil Nakate",
@@ -24,5 +24,16 @@
24
24
  "type": "git",
25
25
  "directory": "projects/sn-spinner"
26
26
  },
27
- "license": "MIT"
28
- }
27
+ "license": "MIT",
28
+ "module": "fesm2022/sn-spinner-x.mjs",
29
+ "typings": "types/sn-spinner-x.d.ts",
30
+ "exports": {
31
+ "./package.json": {
32
+ "default": "./package.json"
33
+ },
34
+ ".": {
35
+ "types": "./types/sn-spinner-x.d.ts",
36
+ "default": "./fesm2022/sn-spinner-x.mjs"
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class SnSpinnerXComponent {
4
+ scheme: string;
5
+ size: string;
6
+ label: string;
7
+ get classes(): Record<string, boolean>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnSpinnerXComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnSpinnerXComponent, "sn-spinner-x", never, { "scheme": { "alias": "scheme"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
11
+
12
+ export { SnSpinnerXComponent };
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/sn-spinner",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,33 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { SnSpinnerXComponent } from './sn-spinner-x.component';
3
-
4
- describe('SnSpinnerXComponent', () => {
5
- let component: SnSpinnerXComponent;
6
- let fixture: ComponentFixture<SnSpinnerXComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [SnSpinnerXComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(SnSpinnerXComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
-
22
- it('should default scheme to "primary"', () => {
23
- expect(component.scheme).toBe('primary');
24
- });
25
-
26
- it('should default size to "md"', () => {
27
- expect(component.size).toBe('md');
28
- });
29
-
30
- it('should default label to "Loading..."', () => {
31
- expect(component.label).toBe('Loading...');
32
- });
33
- });
@@ -1,23 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { CommonModule, NgClass } from '@angular/common';
3
-
4
- @Component({
5
- selector: 'sn-spinner-x',
6
- standalone: true,
7
- imports: [CommonModule, NgClass],
8
- templateUrl: './sn-spinner-x.html',
9
- styleUrl: 'sn-spinner-x.scss',
10
- })
11
- export class SnSpinnerXComponent {
12
- @Input() scheme: string = 'primary';
13
- @Input() size: string = 'md';
14
- @Input() label: string = 'Loading...';
15
-
16
- get classes(): Record<string, boolean> {
17
- return {
18
- 'sn-spinner': true,
19
- [`scheme-${this.scheme}`]: true,
20
- [`size-${this.size}`]: true,
21
- };
22
- }
23
- }
@@ -1,3 +0,0 @@
1
- <span [ngClass]="classes" role="status" [attr.aria-label]="label">
2
- <span class="sr-only">{{ label }}</span>
3
- </span>
@@ -1,51 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @keyframes sn-spin {
6
- to { transform: rotate(360deg); }
7
- }
8
-
9
- .sn-spinner {
10
- display: inline-block;
11
- border-style: solid;
12
- border-radius: 50%;
13
- animation: sn-spin 0.75s linear infinite;
14
-
15
- &.size-sm { width: 1rem; height: 1rem; border-width: 2px; }
16
- &.size-md { width: 1.5rem; height: 1.5rem; border-width: 3px; }
17
- &.size-lg { width: 2.5rem; height: 2.5rem; border-width: 4px; }
18
-
19
- &.scheme-primary {
20
- border-color: #3b82f6;
21
- border-top-color: transparent;
22
- }
23
- &.scheme-warn {
24
- border-color: #f59e0b;
25
- border-top-color: transparent;
26
- }
27
- &.scheme-danger {
28
- border-color: #ef4444;
29
- border-top-color: transparent;
30
- }
31
- &.scheme-success {
32
- border-color: #22c55e;
33
- border-top-color: transparent;
34
- }
35
- &.scheme-default {
36
- border-color: #6b7280;
37
- border-top-color: transparent;
38
- }
39
-
40
- .sr-only {
41
- position: absolute;
42
- width: 1px;
43
- height: 1px;
44
- padding: 0;
45
- margin: -1px;
46
- overflow: hidden;
47
- clip: rect(0, 0, 0, 0);
48
- white-space: nowrap;
49
- border-width: 0;
50
- }
51
- }
package/src/public-api.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/sn-spinner-x.component';
package/tsconfig.lib.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/lib",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "inlineSources": true,
8
- "types": []
9
- },
10
- "exclude": ["**/*.spec.ts"]
11
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {
7
- "compilationMode": "partial"
8
- }
9
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/spec",
5
- "types": ["jasmine"]
6
- },
7
- "include": ["**/*.spec.ts", "**/*.d.ts"]
8
- }