@up_si_vale/sivale-componentes-angular 1.0.0 → 1.0.1
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/esm2022/lib/atoms/button/button.component.mjs +55 -0
- package/esm2022/lib/atoms/checkbox/checkbox.component.mjs +174 -0
- package/esm2022/lib/atoms/date-picker/date-picker.component.mjs +835 -0
- package/esm2022/lib/atoms/input/input.component.mjs +218 -0
- package/esm2022/lib/atoms/loader/loader.component.mjs +81 -0
- package/esm2022/lib/atoms/radio/radio.component.mjs +142 -0
- package/esm2022/lib/atoms/textarea/textarea.component.mjs +126 -0
- package/esm2022/lib/directives/asset-source.directive.mjs +68 -0
- package/esm2022/lib/directives/icon-source.directive.mjs +65 -0
- package/esm2022/lib/directives/no-leading-space.directive.mjs +24 -0
- package/esm2022/lib/directives/only-letters.directive.mjs +25 -0
- package/esm2022/lib/directives/only-number.directive.mjs +21 -0
- package/esm2022/lib/directives/rfc.directive.mjs +67 -0
- package/esm2022/lib/directives/tooltip.directive.mjs +199 -0
- package/esm2022/lib/models/snackbar.models.mjs +2 -0
- package/esm2022/lib/molecules/copy-input/copy-input.component.mjs +46 -0
- package/esm2022/lib/molecules/multiselect/multiselect.component.mjs +466 -0
- package/esm2022/lib/molecules/option/option.component.mjs +55 -0
- package/esm2022/lib/molecules/phone-input/phone-input.component.mjs +64 -0
- package/esm2022/lib/molecules/select/select.component.mjs +498 -0
- package/esm2022/lib/molecules/snackbar/snackbar.component.mjs +581 -0
- package/esm2022/lib/services/snackbar.service.mjs +96 -0
- package/esm2022/lib/tokens/asset-base-url.token.mjs +10 -0
- package/esm2022/public-api.mjs +33 -0
- package/esm2022/up_si_vale-sivale-componentes-angular.mjs +5 -0
- package/fesm2022/up_si_vale-sivale-componentes-angular.mjs +3844 -0
- package/fesm2022/up_si_vale-sivale-componentes-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/atoms/button/button.component.d.ts +20 -0
- package/lib/atoms/checkbox/checkbox.component.d.ts +31 -0
- package/lib/atoms/date-picker/date-picker.component.d.ts +134 -0
- package/lib/atoms/input/input.component.d.ts +35 -0
- package/lib/atoms/loader/loader.component.d.ts +10 -0
- package/lib/atoms/radio/radio.component.d.ts +25 -0
- package/lib/atoms/textarea/textarea.component.d.ts +27 -0
- package/lib/directives/asset-source.directive.d.ts +19 -0
- package/lib/directives/icon-source.directive.d.ts +18 -0
- package/lib/directives/no-leading-space.directive.d.ts +6 -0
- package/lib/directives/only-letters.directive.d.ts +7 -0
- package/lib/directives/only-number.directive.d.ts +6 -0
- package/lib/directives/rfc.directive.d.ts +12 -0
- package/lib/directives/tooltip.directive.d.ts +27 -0
- package/{src/lib/models/snackbar.models.ts → lib/models/snackbar.models.d.ts} +8 -10
- package/lib/molecules/copy-input/copy-input.component.d.ts +14 -0
- package/lib/molecules/multiselect/multiselect.component.d.ts +74 -0
- package/lib/molecules/option/option.component.d.ts +19 -0
- package/lib/molecules/phone-input/phone-input.component.d.ts +12 -0
- package/lib/molecules/select/select.component.d.ts +88 -0
- package/lib/molecules/snackbar/snackbar.component.d.ts +17 -0
- package/lib/services/snackbar.service.d.ts +40 -0
- package/{src/lib/tokens/asset-base-url.token.ts → lib/tokens/asset-base-url.token.d.ts} +1 -5
- package/package.json +30 -24
- package/{src/public-api.ts → public-api.d.ts} +0 -15
- package/ng-package.json +0 -9
- package/src/lib/atoms/button/button.component.html +0 -21
- package/src/lib/atoms/button/button.component.scss +0 -242
- package/src/lib/atoms/button/button.component.ts +0 -43
- package/src/lib/atoms/checkbox/checkbox.component.scss +0 -131
- package/src/lib/atoms/checkbox/checkbox.component.ts +0 -130
- package/src/lib/atoms/date-picker/date-picker.component.html +0 -295
- package/src/lib/atoms/date-picker/date-picker.component.scss +0 -1002
- package/src/lib/atoms/date-picker/date-picker.component.ts +0 -942
- package/src/lib/atoms/input/input.component.ts +0 -239
- package/src/lib/atoms/loader/loader.component.scss +0 -144
- package/src/lib/atoms/loader/loader.component.ts +0 -44
- package/src/lib/atoms/radio/radio.component.scss +0 -115
- package/src/lib/atoms/radio/radio.component.ts +0 -103
- package/src/lib/atoms/textarea/textarea.component.ts +0 -155
- package/src/lib/directives/asset-source.directive.ts +0 -64
- package/src/lib/directives/icon-source.directive.ts +0 -74
- package/src/lib/directives/no-leading-space.directive.ts +0 -18
- package/src/lib/directives/only-letters.directive.ts +0 -21
- package/src/lib/directives/only-number.directive.ts +0 -15
- package/src/lib/directives/rfc.directive.ts +0 -60
- package/src/lib/directives/tooltip.directive.ts +0 -211
- package/src/lib/molecules/copy-input/copy-input.component.html +0 -29
- package/src/lib/molecules/copy-input/copy-input.component.scss +0 -101
- package/src/lib/molecules/copy-input/copy-input.component.ts +0 -41
- package/src/lib/molecules/multiselect/multiselect.component.scss +0 -298
- package/src/lib/molecules/multiselect/multiselect.component.ts +0 -487
- package/src/lib/molecules/option/option.component.ts +0 -45
- package/src/lib/molecules/phone-input/phone-input.component.scss +0 -78
- package/src/lib/molecules/phone-input/phone-input.component.ts +0 -43
- package/src/lib/molecules/select/select.component.ts +0 -482
- package/src/lib/molecules/snackbar/snackbar.component.scss +0 -201
- package/src/lib/molecules/snackbar/snackbar.component.ts +0 -321
- package/src/lib/services/snackbar.service.ts +0 -103
- package/tsconfig.json +0 -31
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SnackbarService } from '../../services/snackbar.service';
|
|
3
|
+
import { SnackbarData } from '../../models/snackbar.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SnackbarComponent implements OnInit, OnDestroy {
|
|
6
|
+
private snackbarService;
|
|
7
|
+
snackbars: SnackbarData[];
|
|
8
|
+
private subscriptions;
|
|
9
|
+
constructor(snackbarService: SnackbarService);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
getSnackbarsByPosition(position: string): SnackbarData[];
|
|
13
|
+
dismiss(id: string): void;
|
|
14
|
+
handleAction(snackbar: SnackbarData): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "app-snackbar", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SnackbarConfig, SnackbarData, SnackbarPosition } from '../models/snackbar.models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackbarService {
|
|
4
|
+
private snackbarSubject;
|
|
5
|
+
snackbar$: import("rxjs").Observable<SnackbarData>;
|
|
6
|
+
private dismissSubject;
|
|
7
|
+
dismiss$: import("rxjs").Observable<string>;
|
|
8
|
+
private snackbarIdCounter;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Show success snackbar
|
|
12
|
+
*/
|
|
13
|
+
success(message: string, duration?: number, position?: SnackbarPosition): void;
|
|
14
|
+
/**
|
|
15
|
+
* Show error snackbar
|
|
16
|
+
*/
|
|
17
|
+
error(message: string, duration?: number, position?: SnackbarPosition): void;
|
|
18
|
+
/**
|
|
19
|
+
* Show warning snackbar
|
|
20
|
+
*/
|
|
21
|
+
warning(message: string, duration?: number, position?: SnackbarPosition): void;
|
|
22
|
+
/**
|
|
23
|
+
* Show info snackbar
|
|
24
|
+
*/
|
|
25
|
+
info(message: string, duration?: number, position?: SnackbarPosition): void;
|
|
26
|
+
/**
|
|
27
|
+
* Show snackbar with custom configuration
|
|
28
|
+
*/
|
|
29
|
+
show(config: SnackbarConfig): void;
|
|
30
|
+
/**
|
|
31
|
+
* Dismiss specific snackbar by id
|
|
32
|
+
*/
|
|
33
|
+
dismiss(id: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Dismiss all snackbars
|
|
36
|
+
*/
|
|
37
|
+
dismissAll(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
40
|
+
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Base URL para los assets remotos del microfrontend (íconos, imágenes).
|
|
5
4
|
* El consumidor debe proveerlo, normalmente con el valor de `environment.mfAssetsUrl`.
|
|
6
5
|
*/
|
|
7
|
-
export const ASSET_BASE_URL
|
|
8
|
-
providedIn: 'root',
|
|
9
|
-
factory: () => ''
|
|
10
|
-
});
|
|
6
|
+
export declare const ASSET_BASE_URL: InjectionToken<string>;
|
package/package.json
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up_si_vale/sivale-componentes-angular",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Librería de componentes Angular standalone (atoms + molecules) para los frontends de Sivale.",
|
|
5
|
+
"author": "Up Sí Vale — Frontend Team",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://dev.azure.com/UP-SiVale/SI%20VALE%20Agile/_git/biblioteca_componentes_angular_sivale"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"angular",
|
|
13
|
+
"componentes",
|
|
14
|
+
"ui",
|
|
15
|
+
"design-system",
|
|
16
|
+
"sivale",
|
|
17
|
+
"standalone"
|
|
18
|
+
],
|
|
5
19
|
"publishConfig": {
|
|
6
|
-
"access": "
|
|
7
|
-
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "ng-packagr -p ng-package.json",
|
|
10
|
-
"build:watch": "ng-packagr -p ng-package.json --watch",
|
|
11
|
-
"prepublishOnly": "npm run build"
|
|
20
|
+
"access": "public"
|
|
12
21
|
},
|
|
13
22
|
"peerDependencies": {
|
|
14
23
|
"@angular/common": "^17.3.0",
|
|
@@ -20,21 +29,18 @@
|
|
|
20
29
|
"dependencies": {
|
|
21
30
|
"tslib": "^2.3.0"
|
|
22
31
|
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@angular/common": "^17.3.0",
|
|
25
|
-
"@angular/compiler": "^17.3.0",
|
|
26
|
-
"@angular/compiler-cli": "^17.3.0",
|
|
27
|
-
"@angular/core": "^17.3.0",
|
|
28
|
-
"@angular/forms": "^17.3.0",
|
|
29
|
-
"ng-packagr": "^17.3.0",
|
|
30
|
-
"rxjs": "^7.8.0",
|
|
31
|
-
"tslib": "^2.3.0",
|
|
32
|
-
"typescript": "~5.4.2",
|
|
33
|
-
"zone.js": "~0.14.3"
|
|
34
|
-
},
|
|
35
32
|
"sideEffects": false,
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
"module": "fesm2022/up_si_vale-sivale-componentes-angular.mjs",
|
|
34
|
+
"typings": "index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": {
|
|
37
|
+
"default": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./index.d.ts",
|
|
41
|
+
"esm2022": "./esm2022/up_si_vale-sivale-componentes-angular.mjs",
|
|
42
|
+
"esm": "./esm2022/up_si_vale-sivale-componentes-angular.mjs",
|
|
43
|
+
"default": "./fesm2022/up_si_vale-sivale-componentes-angular.mjs"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of @up_si_vale/sivale-componentes-angular
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// Tokens
|
|
6
1
|
export * from './lib/tokens/asset-base-url.token';
|
|
7
|
-
|
|
8
|
-
// Models
|
|
9
2
|
export * from './lib/models/snackbar.models';
|
|
10
|
-
|
|
11
|
-
// Services
|
|
12
3
|
export * from './lib/services/snackbar.service';
|
|
13
|
-
|
|
14
|
-
// Directives
|
|
15
4
|
export * from './lib/directives/asset-source.directive';
|
|
16
5
|
export * from './lib/directives/icon-source.directive';
|
|
17
6
|
export * from './lib/directives/only-number.directive';
|
|
@@ -19,8 +8,6 @@ export * from './lib/directives/only-letters.directive';
|
|
|
19
8
|
export * from './lib/directives/rfc.directive';
|
|
20
9
|
export * from './lib/directives/no-leading-space.directive';
|
|
21
10
|
export * from './lib/directives/tooltip.directive';
|
|
22
|
-
|
|
23
|
-
// Atoms
|
|
24
11
|
export * from './lib/atoms/button/button.component';
|
|
25
12
|
export * from './lib/atoms/input/input.component';
|
|
26
13
|
export * from './lib/atoms/textarea/textarea.component';
|
|
@@ -28,8 +15,6 @@ export * from './lib/atoms/checkbox/checkbox.component';
|
|
|
28
15
|
export * from './lib/atoms/radio/radio.component';
|
|
29
16
|
export * from './lib/atoms/date-picker/date-picker.component';
|
|
30
17
|
export * from './lib/atoms/loader/loader.component';
|
|
31
|
-
|
|
32
|
-
// Molecules
|
|
33
18
|
export * from './lib/molecules/option/option.component';
|
|
34
19
|
export * from './lib/molecules/select/select.component';
|
|
35
20
|
export * from './lib/molecules/multiselect/multiselect.component';
|
package/ng-package.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<button
|
|
2
|
-
[type]="type"
|
|
3
|
-
[class]="buttonClasses"
|
|
4
|
-
[disabled]="disabled || loading"
|
|
5
|
-
[id]="id"
|
|
6
|
-
[attr.aria-label]="ariaLabel"
|
|
7
|
-
[attr.aria-busy]="loading"
|
|
8
|
-
(click)="handleClick($event)">
|
|
9
|
-
|
|
10
|
-
<!-- Loading spinner -->
|
|
11
|
-
<span *ngIf="loading" class="svu-btn__spinner">
|
|
12
|
-
<svg class="svu-spinner" viewBox="0 0 24 24">
|
|
13
|
-
<circle class="svu-spinner__circle" cx="12" cy="12" r="10" fill="none" stroke-width="3"></circle>
|
|
14
|
-
</svg>
|
|
15
|
-
</span>
|
|
16
|
-
|
|
17
|
-
<!-- Content -->
|
|
18
|
-
<span [class.svu-btn__content--hidden]="loading" class="svu-btn__content">
|
|
19
|
-
<ng-content></ng-content>
|
|
20
|
-
</span>
|
|
21
|
-
</button>
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
.svu-btn {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
gap: 0.5rem;
|
|
7
|
-
font-family: 'Quicksand', sans-serif;
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
border: none;
|
|
10
|
-
border-radius: 8px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
transition: all 0.2s ease-in-out;
|
|
13
|
-
outline: none !important;
|
|
14
|
-
text-decoration: none;
|
|
15
|
-
white-space: nowrap;
|
|
16
|
-
width: 100%;
|
|
17
|
-
|
|
18
|
-
&:focus-visible {
|
|
19
|
-
outline: 2px solid transparent;
|
|
20
|
-
outline-offset: 2px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Sizes
|
|
24
|
-
&--small {
|
|
25
|
-
padding: 0.5rem 1rem;
|
|
26
|
-
font-size: 0.875rem;
|
|
27
|
-
line-height: 1.25rem;
|
|
28
|
-
height: inherit;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&--medium {
|
|
32
|
-
padding: 0.75rem 1.5rem;
|
|
33
|
-
font-size: 1rem;
|
|
34
|
-
line-height: 1.5rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--large {
|
|
38
|
-
padding: 1rem 2rem;
|
|
39
|
-
font-size: 1.125rem;
|
|
40
|
-
line-height: 1.75rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Full width
|
|
44
|
-
&--full-width {
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Primary variant
|
|
49
|
-
&--primary {
|
|
50
|
-
background: #364B9F;
|
|
51
|
-
color: white;
|
|
52
|
-
|
|
53
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
54
|
-
background: #2A3B7F;
|
|
55
|
-
transform: translateY(-1px);
|
|
56
|
-
box-shadow: 0 4px 12px rgba(54, 75, 159, 0.3);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
60
|
-
transform: translateY(0);
|
|
61
|
-
background: #1F2D5F;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:focus-visible {
|
|
65
|
-
box-shadow: 0 0 0 3px rgba(54, 75, 159, 0.3);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Secondary variant
|
|
70
|
-
&--secondary {
|
|
71
|
-
background: #F3F4F6;
|
|
72
|
-
color: #374151;
|
|
73
|
-
|
|
74
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
75
|
-
background: #E5E7EB;
|
|
76
|
-
transform: translateY(-1px);
|
|
77
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
81
|
-
transform: translateY(0);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&:focus-visible {
|
|
85
|
-
box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.2);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Outline variant
|
|
90
|
-
&--outline {
|
|
91
|
-
background: transparent;
|
|
92
|
-
color: #364B9F;
|
|
93
|
-
border: 1px solid #364B9F;
|
|
94
|
-
|
|
95
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
96
|
-
background: rgba(54, 75, 159, 0.05);
|
|
97
|
-
border-color: #2A3B7F;
|
|
98
|
-
color: #2A3B7F;
|
|
99
|
-
transform: translateY(-1px);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
103
|
-
transform: translateY(0);
|
|
104
|
-
background: rgba(54, 75, 159, 0.1);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:focus-visible {
|
|
108
|
-
box-shadow: 0 0 0 3px rgba(54, 75, 159, 0.2);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Ghost variant
|
|
113
|
-
&--ghost {
|
|
114
|
-
background: transparent;
|
|
115
|
-
color: #364B9F;
|
|
116
|
-
|
|
117
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
118
|
-
background: rgba(54, 75, 159, 0.1);
|
|
119
|
-
transform: translateY(-1px);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
123
|
-
transform: translateY(0);
|
|
124
|
-
background: rgba(54, 75, 159, 0.15);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&:focus-visible {
|
|
128
|
-
box-shadow: 0 0 0 3px rgba(54, 75, 159, 0.2);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// Danger variant
|
|
133
|
-
&--danger {
|
|
134
|
-
background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
|
|
135
|
-
color: white;
|
|
136
|
-
|
|
137
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
138
|
-
background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
|
|
139
|
-
transform: translateY(-1px);
|
|
140
|
-
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
144
|
-
transform: translateY(0);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:focus-visible {
|
|
148
|
-
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Success variant
|
|
153
|
-
&--success {
|
|
154
|
-
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
|
|
155
|
-
color: white;
|
|
156
|
-
|
|
157
|
-
&:hover:not(:disabled):not(.btn--loading) {
|
|
158
|
-
background: linear-gradient(135deg, #059669 0%, #047857 100%);
|
|
159
|
-
transform: translateY(-1px);
|
|
160
|
-
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
&:active:not(:disabled):not(.btn--loading) {
|
|
164
|
-
transform: translateY(0);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&:focus-visible {
|
|
168
|
-
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Disabled state
|
|
173
|
-
&:disabled,
|
|
174
|
-
&--disabled {
|
|
175
|
-
opacity: 0.5;
|
|
176
|
-
cursor: not-allowed;
|
|
177
|
-
transform: none !important;
|
|
178
|
-
box-shadow: none !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Loading state
|
|
182
|
-
&--loading {
|
|
183
|
-
cursor: wait;
|
|
184
|
-
pointer-events: none;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
&__spinner {
|
|
188
|
-
position: absolute;
|
|
189
|
-
left: 50%;
|
|
190
|
-
top: 50%;
|
|
191
|
-
transform: translate(-50%, -50%);
|
|
192
|
-
display: flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
justify-content: center;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&__content {
|
|
198
|
-
display: flex;
|
|
199
|
-
align-items: center;
|
|
200
|
-
gap: 0.5rem;
|
|
201
|
-
|
|
202
|
-
&--hidden {
|
|
203
|
-
visibility: hidden;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Spinner animation
|
|
209
|
-
.svu-spinner {
|
|
210
|
-
width: 1.25rem;
|
|
211
|
-
height: 1.25rem;
|
|
212
|
-
animation: svu-spin 0.8s linear infinite;
|
|
213
|
-
|
|
214
|
-
&__circle {
|
|
215
|
-
stroke: currentColor;
|
|
216
|
-
stroke-dasharray: 50;
|
|
217
|
-
stroke-dashoffset: 25;
|
|
218
|
-
stroke-linecap: round;
|
|
219
|
-
animation: svu-spinner-dash 1.5s ease-in-out infinite;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@keyframes svu-spin {
|
|
224
|
-
to {
|
|
225
|
-
transform: rotate(360deg);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@keyframes svu-spinner-dash {
|
|
230
|
-
0% {
|
|
231
|
-
stroke-dasharray: 1, 150;
|
|
232
|
-
stroke-dashoffset: 0;
|
|
233
|
-
}
|
|
234
|
-
50% {
|
|
235
|
-
stroke-dasharray: 90, 150;
|
|
236
|
-
stroke-dashoffset: -35;
|
|
237
|
-
}
|
|
238
|
-
100% {
|
|
239
|
-
stroke-dasharray: 90, 150;
|
|
240
|
-
stroke-dashoffset: -124;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success';
|
|
5
|
-
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
6
|
-
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'app-button',
|
|
10
|
-
standalone: true,
|
|
11
|
-
imports: [CommonModule],
|
|
12
|
-
templateUrl: './button.component.html',
|
|
13
|
-
styleUrls: ['./button.component.scss']
|
|
14
|
-
})
|
|
15
|
-
export class ButtonComponent {
|
|
16
|
-
@Input() variant: ButtonVariant = 'primary';
|
|
17
|
-
@Input() size: ButtonSize = 'medium';
|
|
18
|
-
@Input() type: ButtonType = 'button';
|
|
19
|
-
@Input() disabled: boolean = false;
|
|
20
|
-
@Input() loading: boolean = false;
|
|
21
|
-
@Input() fullWidth: boolean = false;
|
|
22
|
-
@Input() id?: string;
|
|
23
|
-
@Input() ariaLabel?: string;
|
|
24
|
-
|
|
25
|
-
@Output() onClick = new EventEmitter<MouseEvent>();
|
|
26
|
-
|
|
27
|
-
get buttonClasses(): string {
|
|
28
|
-
return [
|
|
29
|
-
'svu-btn',
|
|
30
|
-
`svu-btn--${this.variant}`,
|
|
31
|
-
`svu-btn--${this.size}`,
|
|
32
|
-
this.fullWidth ? 'svu-btn--full-width' : '',
|
|
33
|
-
this.loading ? 'svu-btn--loading' : '',
|
|
34
|
-
this.disabled ? 'svu-btn--disabled' : ''
|
|
35
|
-
].filter(Boolean).join(' ');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
handleClick(event: MouseEvent): void {
|
|
39
|
-
if (!this.disabled && !this.loading) {
|
|
40
|
-
this.onClick.emit(event);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
.checkbox-wrapper {
|
|
2
|
-
width: 100%;
|
|
3
|
-
padding: 0 4px;
|
|
4
|
-
|
|
5
|
-
&.disabled {
|
|
6
|
-
opacity: 0.6;
|
|
7
|
-
cursor: not-allowed;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.checkbox-container {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: flex-start;
|
|
14
|
-
gap: 0.75rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.checkbox-label-input {
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
position: relative;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
|
|
23
|
-
input[type="checkbox"] {
|
|
24
|
-
position: absolute;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
width: 22px;
|
|
28
|
-
height: 22px;
|
|
29
|
-
margin: 0;
|
|
30
|
-
z-index: 2;
|
|
31
|
-
top: 2px;
|
|
32
|
-
left: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.checkbox-custom {
|
|
36
|
-
width: 22px;
|
|
37
|
-
height: 22px;
|
|
38
|
-
min-width: 22px;
|
|
39
|
-
border: 2.5px solid #D5D7D8;
|
|
40
|
-
border-radius: 6px;
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
45
|
-
background: white;
|
|
46
|
-
margin-top: 2px;
|
|
47
|
-
position: relative;
|
|
48
|
-
|
|
49
|
-
&::after {
|
|
50
|
-
content: '';
|
|
51
|
-
position: absolute;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
border-radius: 4px;
|
|
55
|
-
background: #F59100;
|
|
56
|
-
opacity: 0;
|
|
57
|
-
transform: scale(0.5);
|
|
58
|
-
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&.checked, &.indeterminate {
|
|
62
|
-
background: white;
|
|
63
|
-
border-color: #F59100;
|
|
64
|
-
border-width: 2.5px;
|
|
65
|
-
box-shadow: 0 3px 8px rgba(242, 109, 0, 0.25), 0 1px 3px rgba(242, 109, 0, 0.15);
|
|
66
|
-
transform: scale(1.05);
|
|
67
|
-
|
|
68
|
-
&::after {
|
|
69
|
-
opacity: 0;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.check-icon {
|
|
74
|
-
position: relative;
|
|
75
|
-
z-index: 1;
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:hover .checkbox-custom:not(.checked) {
|
|
84
|
-
border-color: #F26D00;
|
|
85
|
-
transform: scale(1.05);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.checkbox-text {
|
|
90
|
-
flex: 1;
|
|
91
|
-
font-family: 'Quicksand', sans-serif;
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
font-weight: 500;
|
|
94
|
-
line-height: 1.7;
|
|
95
|
-
user-select: none;
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
|
|
98
|
-
::ng-deep a {
|
|
99
|
-
color: #364B9F;
|
|
100
|
-
font-family: 'Quicksand', sans-serif;
|
|
101
|
-
font-size: 14px;
|
|
102
|
-
font-weight: 500;
|
|
103
|
-
line-height: 1.7;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.checkbox-wrapper.disabled .checkbox-text {
|
|
109
|
-
cursor: not-allowed;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@keyframes checkPop {
|
|
113
|
-
0% {
|
|
114
|
-
transform: scale(0);
|
|
115
|
-
opacity: 0;
|
|
116
|
-
}
|
|
117
|
-
50% {
|
|
118
|
-
transform: scale(1.2);
|
|
119
|
-
}
|
|
120
|
-
100% {
|
|
121
|
-
transform: scale(1);
|
|
122
|
-
opacity: 1;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.field-error {
|
|
127
|
-
color: #F04438;
|
|
128
|
-
font-size: 0.875rem;
|
|
129
|
-
margin-top: 0.25rem;
|
|
130
|
-
font-family: 'Quicksand', sans-serif;
|
|
131
|
-
}
|