@up_si_vale/sivale-componentes-angular 1.0.0 → 1.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.
- 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/alert/alert.component.mjs +79 -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/organisms/sidebar/sidebar-icon.component.mjs +91 -0
- package/esm2022/lib/organisms/sidebar/sidebar.component.mjs +115 -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 +37 -0
- package/esm2022/up_si_vale-sivale-componentes-angular.mjs +5 -0
- package/fesm2022/up_si_vale-sivale-componentes-angular.mjs +4116 -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/alert/alert.component.d.ts +29 -0
- 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/organisms/sidebar/sidebar-icon.component.d.ts +8 -0
- package/lib/organisms/sidebar/sidebar.component.d.ts +47 -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 +39 -28
- package/{src/public-api.ts → public-api.d.ts} +3 -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
|
@@ -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
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { Component, Input, forwardRef, ChangeDetectorRef, Output, EventEmitter, SimpleChanges, ElementRef } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-checkbox',
|
|
7
|
-
standalone: true,
|
|
8
|
-
imports: [CommonModule, ReactiveFormsModule, FormsModule],
|
|
9
|
-
template: `
|
|
10
|
-
<div class="checkbox-wrapper" [class.disabled]="disabled">
|
|
11
|
-
<div class="checkbox-container">
|
|
12
|
-
<label [for]="id" class="checkbox-label-input">
|
|
13
|
-
<input
|
|
14
|
-
type="checkbox"
|
|
15
|
-
[id]="id"
|
|
16
|
-
[disabled]="disabled"
|
|
17
|
-
[checked]="value"
|
|
18
|
-
(blur)="onTouched()"
|
|
19
|
-
(change)="onCheckboxChange($event)">
|
|
20
|
-
<span class="checkbox-custom" [class.checked]="value" [class.indeterminate]="indeterminate">
|
|
21
|
-
<!-- Paloma -->
|
|
22
|
-
<svg *ngIf="value && !indeterminate" class="check-icon" width="14" height="10" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
-
<path d="M9 1L3.5 6.5L1 4" stroke="#F59100" stroke-width="1.6666" stroke-linecap="round" stroke-linejoin="round"/>
|
|
24
|
-
</svg>
|
|
25
|
-
<!-- Guion -->
|
|
26
|
-
<svg *ngIf="indeterminate && !value" class="minus-icon" width="12" height="2" viewBox="0 0 12 2" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
27
|
-
<rect width="12" height="2" rx="1" fill="#F59100"/>
|
|
28
|
-
</svg>
|
|
29
|
-
</span>
|
|
30
|
-
</label>
|
|
31
|
-
<span class="checkbox-text" (click)="onTextClick($event)">
|
|
32
|
-
<ng-content></ng-content>
|
|
33
|
-
<span *ngIf="label" [innerHTML]="label"></span>
|
|
34
|
-
</span>
|
|
35
|
-
</div>
|
|
36
|
-
<div *ngIf="hasError && errorMessage" class="field-error">
|
|
37
|
-
{{ errorMessage }}
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
`,
|
|
41
|
-
styleUrls: ['./checkbox.component.scss'],
|
|
42
|
-
providers: [
|
|
43
|
-
{
|
|
44
|
-
provide: NG_VALUE_ACCESSOR,
|
|
45
|
-
useExisting: forwardRef(() => CheckboxComponent),
|
|
46
|
-
multi: true
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
export class CheckboxComponent implements ControlValueAccessor {
|
|
51
|
-
@Input() label = '';
|
|
52
|
-
@Input() id = '';
|
|
53
|
-
@Input() hasError = false;
|
|
54
|
-
@Input() errorMessage = '';
|
|
55
|
-
@Input() disabled = false;
|
|
56
|
-
@Input() indeterminate = false;
|
|
57
|
-
@Input()
|
|
58
|
-
set checked(value: boolean) {
|
|
59
|
-
this.value = !!value;
|
|
60
|
-
this.cdr.markForCheck();
|
|
61
|
-
}
|
|
62
|
-
get checked(): boolean {
|
|
63
|
-
return this.value;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@Output() changed = new EventEmitter<boolean>();
|
|
67
|
-
|
|
68
|
-
value = false;
|
|
69
|
-
onChange: any = () => {};
|
|
70
|
-
onTouched: any = () => {};
|
|
71
|
-
|
|
72
|
-
constructor(private cdr: ChangeDetectorRef, private elRef: ElementRef) {}
|
|
73
|
-
|
|
74
|
-
ngAfterViewInit() {
|
|
75
|
-
this.updateNativeIndeterminate();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
79
|
-
if (changes['indeterminate']) {
|
|
80
|
-
this.updateNativeIndeterminate();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
private updateNativeIndeterminate() {
|
|
85
|
-
const input = this.elRef.nativeElement.querySelector('input[type="checkbox"]') as HTMLInputElement;
|
|
86
|
-
if (input) input.indeterminate = this.indeterminate;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
onCheckboxChange(event: Event): void {
|
|
90
|
-
const target = event.target as HTMLInputElement;
|
|
91
|
-
this.value = target.checked;
|
|
92
|
-
this.onChange(this.value);
|
|
93
|
-
this.changed.emit(this.value); // ← EMITE EVENTO MANUAL PARA USO EXTERNO
|
|
94
|
-
this.cdr.markForCheck();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
onTextClick(event: Event): void {
|
|
98
|
-
const target = event.target as HTMLElement;
|
|
99
|
-
if (target.tagName === 'A' || target.closest('a')) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (this.disabled) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
this.value = !this.value;
|
|
108
|
-
this.onChange(this.value);
|
|
109
|
-
this.changed.emit(this.value);
|
|
110
|
-
this.cdr.markForCheck();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
writeValue(value: any): void {
|
|
114
|
-
this.value = !!value;
|
|
115
|
-
this.cdr.markForCheck();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
registerOnChange(fn: any): void {
|
|
119
|
-
this.onChange = fn;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
registerOnTouched(fn: any): void {
|
|
123
|
-
this.onTouched = fn;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
setDisabledState(isDisabled: boolean): void {
|
|
127
|
-
this.disabled = isDisabled;
|
|
128
|
-
this.cdr.markForCheck();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
<div class="date-picker-wrapper">
|
|
2
|
-
<label *ngIf="label" [for]="id">{{ label }}</label>
|
|
3
|
-
|
|
4
|
-
<div class="date-picker-container">
|
|
5
|
-
<div
|
|
6
|
-
#trigger
|
|
7
|
-
class="date-picker-input"
|
|
8
|
-
[class.error]="hasError"
|
|
9
|
-
[class.disabled]="disabled"
|
|
10
|
-
[class.open]="isOpen"
|
|
11
|
-
[class.icon-right]="iconPosition === 'right'"
|
|
12
|
-
(click)="toggleDropdown($event)">
|
|
13
|
-
|
|
14
|
-
<svg *ngIf="iconPosition === 'left'" class="calendar-icon" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
|
-
<path d="M6.66667 1.66667V4.16667M13.3333 1.66667V4.16667M2.5 7.5H17.5M4.16667 3.33333H15.8333C16.7538 3.33333 17.5 4.07953 17.5 5V16.6667C17.5 17.5871 16.7538 18.3333 15.8333 18.3333H4.16667C3.24619 18.3333 2.5 17.5871 2.5 16.6667V5C2.5 4.07953 3.24619 3.33333 4.16667 3.33333Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
16
|
-
</svg>
|
|
17
|
-
|
|
18
|
-
<span class="date-picker-placeholder" *ngIf="!getDisplayValue()">
|
|
19
|
-
{{ placeholder }}
|
|
20
|
-
</span>
|
|
21
|
-
<span class="date-picker-value" *ngIf="getDisplayValue()">
|
|
22
|
-
{{ getDisplayValue() }}
|
|
23
|
-
</span>
|
|
24
|
-
|
|
25
|
-
<svg *ngIf="iconPosition === 'right'" class="calendar-icon" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
26
|
-
<path d="M6.66667 1.66667V4.16667M13.3333 1.66667V4.16667M2.5 7.5H17.5M4.16667 3.33333H15.8333C16.7538 3.33333 17.5 4.07953 17.5 5V16.6667C17.5 17.5871 16.7538 18.3333 15.8333 18.3333H4.16667C3.24619 18.3333 2.5 17.5871 2.5 16.6667V5C2.5 4.07953 3.24619 3.33333 4.16667 3.33333Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
27
|
-
</svg>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div *ngIf="hasError && errorMessage" class="field-error">
|
|
32
|
-
{{ errorMessage }}
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<!-- Dropdown content (rendered with fixed position) -->
|
|
37
|
-
<div *ngIf="isOpen" class="date-picker-overlay">
|
|
38
|
-
<div #dropdown class="date-picker-dropdown" [class.open]="isOpen" [class.range-mode]="rangeMode" [ngStyle]="getDropdownStyle()">
|
|
39
|
-
<div class="date-picker-content">
|
|
40
|
-
<!-- Sidebar with filters (only for range mode) -->
|
|
41
|
-
<div class="filter-sidebar" *ngIf="rangeMode">
|
|
42
|
-
<div
|
|
43
|
-
*ngFor="let option of filterOptions"
|
|
44
|
-
class="filter-option"
|
|
45
|
-
[class.active]="selectedFilter === option.value"
|
|
46
|
-
(click)="selectFilter(option.value)">
|
|
47
|
-
{{ option.label }}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<!-- Main content (calendars + footer) -->
|
|
52
|
-
<div class="date-picker-main">
|
|
53
|
-
<!-- Calendars -->
|
|
54
|
-
<div class="calendars-container">
|
|
55
|
-
<!-- Left Calendar (or single calendar in single mode) -->
|
|
56
|
-
<div class="calendar">
|
|
57
|
-
<div class="calendar-header">
|
|
58
|
-
<button
|
|
59
|
-
type="button"
|
|
60
|
-
class="nav-button"
|
|
61
|
-
[disabled]="!canNavigatePreviousMonth()"
|
|
62
|
-
[class.disabled]="!canNavigatePreviousMonth()"
|
|
63
|
-
(click)="previousMonth()">
|
|
64
|
-
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
65
|
-
<path d="M7.5 2L3.5 6L7.5 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
66
|
-
</svg>
|
|
67
|
-
</button>
|
|
68
|
-
<div class="month-year-selector">
|
|
69
|
-
<button type="button" class="month-year" (click)="toggleLeftMonthPicker($event)">
|
|
70
|
-
{{ getMonthYear(leftMonthDate) }}
|
|
71
|
-
</button>
|
|
72
|
-
|
|
73
|
-
<!-- Month/Year Picker Dropdown -->
|
|
74
|
-
<div class="month-year-picker" *ngIf="showLeftMonthPicker" (click)="$event.stopPropagation()">
|
|
75
|
-
<div class="picker-section">
|
|
76
|
-
<div class="picker-title">Mes</div>
|
|
77
|
-
<div class="months-grid">
|
|
78
|
-
<button
|
|
79
|
-
type="button"
|
|
80
|
-
*ngFor="let month of months; let i = index"
|
|
81
|
-
class="month-option"
|
|
82
|
-
[class.active]="i === leftMonthDate.getMonth()"
|
|
83
|
-
[class.disabled]="isMonthDisabled(i, leftMonthDate)"
|
|
84
|
-
[disabled]="isMonthDisabled(i, leftMonthDate)"
|
|
85
|
-
(click)="selectLeftMonth(i, $event)">
|
|
86
|
-
{{ month.substring(0, 3) }}
|
|
87
|
-
</button>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="picker-section">
|
|
91
|
-
<div class="picker-header">
|
|
92
|
-
<button
|
|
93
|
-
type="button"
|
|
94
|
-
class="year-nav-button"
|
|
95
|
-
[disabled]="!canNavigateLeftYearsPrevious()"
|
|
96
|
-
[class.disabled]="!canNavigateLeftYearsPrevious()"
|
|
97
|
-
(click)="previousLeftYearPage($event)">
|
|
98
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
99
|
-
<path d="M6.25 2.5L3.75 5L6.25 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
100
|
-
</svg>
|
|
101
|
-
</button>
|
|
102
|
-
<div class="picker-title">{{ getLeftYearRangeLabel() }}</div>
|
|
103
|
-
<button
|
|
104
|
-
type="button"
|
|
105
|
-
class="year-nav-button"
|
|
106
|
-
[disabled]="!canNavigateLeftYearsNext()"
|
|
107
|
-
[class.disabled]="!canNavigateLeftYearsNext()"
|
|
108
|
-
(click)="nextLeftYearPage($event)">
|
|
109
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
110
|
-
<path d="M3.75 2.5L6.25 5L3.75 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
111
|
-
</svg>
|
|
112
|
-
</button>
|
|
113
|
-
</div>
|
|
114
|
-
<div class="years-grid">
|
|
115
|
-
<button
|
|
116
|
-
type="button"
|
|
117
|
-
*ngFor="let year of getLeftYears()"
|
|
118
|
-
class="year-option"
|
|
119
|
-
[class.active]="year === leftMonthDate.getFullYear()"
|
|
120
|
-
[class.disabled]="isYearDisabled(year)"
|
|
121
|
-
[disabled]="isYearDisabled(year)"
|
|
122
|
-
(click)="selectLeftYear(year, $event)">
|
|
123
|
-
{{ year }}
|
|
124
|
-
</button>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
<button
|
|
130
|
-
type="button"
|
|
131
|
-
class="nav-button"
|
|
132
|
-
[disabled]="!canNavigateNextMonth()"
|
|
133
|
-
[class.disabled]="!canNavigateNextMonth()"
|
|
134
|
-
(click)="nextMonth()">
|
|
135
|
-
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
136
|
-
<path d="M4.5 2L8.5 6L4.5 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
137
|
-
</svg>
|
|
138
|
-
</button>
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
<div class="calendar-grid">
|
|
142
|
-
<div class="weekday-header" *ngFor="let day of weekDays">
|
|
143
|
-
{{ day }}
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<div
|
|
147
|
-
*ngFor="let day of leftCalendarDays; trackBy: trackByDate"
|
|
148
|
-
class="calendar-day"
|
|
149
|
-
[class.other-month]="!day.isCurrentMonth"
|
|
150
|
-
[class.today]="day.isToday"
|
|
151
|
-
[class.selected]="day.isSelected"
|
|
152
|
-
[class.in-range]="rangeMode && isInRange(day.date)"
|
|
153
|
-
[class.range-start]="day.isRangeStart"
|
|
154
|
-
[class.range-end]="day.isRangeEnd"
|
|
155
|
-
[class.disabled]="day.isDisabled"
|
|
156
|
-
(click)="onDayClick(day)"
|
|
157
|
-
(mouseenter)="onDayHover(day)"
|
|
158
|
-
(mouseleave)="onDayLeave()">
|
|
159
|
-
<span>{{ day.date.getDate() }}</span>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
<!-- Right Calendar (only for range mode) -->
|
|
165
|
-
<div class="calendar" *ngIf="rangeMode">
|
|
166
|
-
<div class="calendar-header">
|
|
167
|
-
<div class="nav-button-placeholder"></div>
|
|
168
|
-
<div class="month-year-selector">
|
|
169
|
-
<button type="button" class="month-year" (click)="toggleRightMonthPicker($event)">
|
|
170
|
-
{{ getMonthYear(rightMonthDate) }}
|
|
171
|
-
</button>
|
|
172
|
-
|
|
173
|
-
<!-- Month/Year Picker Dropdown -->
|
|
174
|
-
<div class="month-year-picker" *ngIf="showRightMonthPicker" (click)="$event.stopPropagation()">
|
|
175
|
-
<div class="picker-section">
|
|
176
|
-
<div class="picker-title">Mes</div>
|
|
177
|
-
<div class="months-grid">
|
|
178
|
-
<button
|
|
179
|
-
type="button"
|
|
180
|
-
*ngFor="let month of months; let i = index"
|
|
181
|
-
class="month-option"
|
|
182
|
-
[class.active]="i === rightMonthDate.getMonth()"
|
|
183
|
-
[class.disabled]="isMonthDisabled(i, rightMonthDate)"
|
|
184
|
-
[disabled]="isMonthDisabled(i, rightMonthDate)"
|
|
185
|
-
(click)="selectRightMonth(i, $event)">
|
|
186
|
-
{{ month.substring(0, 3) }}
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div class="picker-section">
|
|
191
|
-
<div class="picker-header">
|
|
192
|
-
<button
|
|
193
|
-
type="button"
|
|
194
|
-
class="year-nav-button"
|
|
195
|
-
[disabled]="!canNavigateRightYearsPrevious()"
|
|
196
|
-
[class.disabled]="!canNavigateRightYearsPrevious()"
|
|
197
|
-
(click)="previousRightYearPage($event)">
|
|
198
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
199
|
-
<path d="M6.25 2.5L3.75 5L6.25 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
200
|
-
</svg>
|
|
201
|
-
</button>
|
|
202
|
-
<div class="picker-title">{{ getRightYearRangeLabel() }}</div>
|
|
203
|
-
<button
|
|
204
|
-
type="button"
|
|
205
|
-
class="year-nav-button"
|
|
206
|
-
[disabled]="!canNavigateRightYearsNext()"
|
|
207
|
-
[class.disabled]="!canNavigateRightYearsNext()"
|
|
208
|
-
(click)="nextRightYearPage($event)">
|
|
209
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
210
|
-
<path d="M3.75 2.5L6.25 5L3.75 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
211
|
-
</svg>
|
|
212
|
-
</button>
|
|
213
|
-
</div>
|
|
214
|
-
<div class="years-grid">
|
|
215
|
-
<button
|
|
216
|
-
type="button"
|
|
217
|
-
*ngFor="let year of getRightYears()"
|
|
218
|
-
class="year-option"
|
|
219
|
-
[class.active]="year === rightMonthDate.getFullYear()"
|
|
220
|
-
[class.disabled]="isYearDisabled(year)"
|
|
221
|
-
[disabled]="isYearDisabled(year)"
|
|
222
|
-
(click)="selectRightYear(year, $event)">
|
|
223
|
-
{{ year }}
|
|
224
|
-
</button>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
<button
|
|
230
|
-
type="button"
|
|
231
|
-
class="nav-button"
|
|
232
|
-
[disabled]="!canNavigateNextMonth()"
|
|
233
|
-
[class.disabled]="!canNavigateNextMonth()"
|
|
234
|
-
(click)="nextMonth()">
|
|
235
|
-
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
236
|
-
<path d="M4.5 2L8.5 6L4.5 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
237
|
-
</svg>
|
|
238
|
-
</button>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
<div class="calendar-grid">
|
|
242
|
-
<div class="weekday-header" *ngFor="let day of weekDays">
|
|
243
|
-
{{ day }}
|
|
244
|
-
</div>
|
|
245
|
-
|
|
246
|
-
<div
|
|
247
|
-
*ngFor="let day of rightCalendarDays; trackBy: trackByDate"
|
|
248
|
-
class="calendar-day"
|
|
249
|
-
[class.other-month]="!day.isCurrentMonth"
|
|
250
|
-
[class.today]="day.isToday"
|
|
251
|
-
[class.selected]="day.isSelected"
|
|
252
|
-
[class.in-range]="isInRange(day.date)"
|
|
253
|
-
[class.range-start]="day.isRangeStart"
|
|
254
|
-
[class.range-end]="day.isRangeEnd"
|
|
255
|
-
[class.disabled]="day.isDisabled"
|
|
256
|
-
(click)="onDayClick(day)"
|
|
257
|
-
(mouseenter)="onDayHover(day)"
|
|
258
|
-
(mouseleave)="onDayLeave()">
|
|
259
|
-
<span>{{ day.date.getDate() }}</span>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
264
|
-
|
|
265
|
-
<!-- Footer with dates and actions (only for range mode) -->
|
|
266
|
-
<div class="footer" *ngIf="rangeMode">
|
|
267
|
-
<div class="selected-dates">
|
|
268
|
-
<div class="date-display">
|
|
269
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
270
|
-
<path d="M5.33333 1.33333V3.33333M10.6667 1.33333V3.33333M2 6H14M3.33333 2.66667H12.6667C13.403 2.66667 14 3.26362 14 4V13.3333C14 14.0697 13.403 14.6667 12.6667 14.6667H3.33333C2.59695 14.6667 2 14.0697 2 13.3333V4C2 3.26362 2.59695 2.66667 3.33333 2.66667Z" stroke="#6B7280" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
271
|
-
</svg>
|
|
272
|
-
<span class="date-text">{{ getStartDateDisplay() }}</span>
|
|
273
|
-
</div>
|
|
274
|
-
<span class="date-separator">-</span>
|
|
275
|
-
<div class="date-display">
|
|
276
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
277
|
-
<path d="M5.33333 1.33333V3.33333M10.6667 1.33333V3.33333M2 6H14M3.33333 2.66667H12.6667C13.403 2.66667 14 3.26362 14 4V13.3333C14 14.0697 13.403 14.6667 12.6667 14.6667H3.33333C2.59695 14.6667 2 14.0697 2 13.3333V4C2 3.26362 2.59695 2.66667 3.33333 2.66667Z" stroke="#6B7280" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
278
|
-
</svg>
|
|
279
|
-
<span class="date-text">{{ getEndDateDisplay() }}</span>
|
|
280
|
-
</div>
|
|
281
|
-
</div>
|
|
282
|
-
|
|
283
|
-
<div class="action-buttons">
|
|
284
|
-
<button type="button" class="btn-cancel" (click)="cancel()">
|
|
285
|
-
Cancelar
|
|
286
|
-
</button>
|
|
287
|
-
<button type="button" class="btn-apply" (click)="apply()">
|
|
288
|
-
Aplicar
|
|
289
|
-
</button>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
</div>
|