@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.
Files changed (94) hide show
  1. package/esm2022/lib/atoms/button/button.component.mjs +55 -0
  2. package/esm2022/lib/atoms/checkbox/checkbox.component.mjs +174 -0
  3. package/esm2022/lib/atoms/date-picker/date-picker.component.mjs +835 -0
  4. package/esm2022/lib/atoms/input/input.component.mjs +218 -0
  5. package/esm2022/lib/atoms/loader/loader.component.mjs +81 -0
  6. package/esm2022/lib/atoms/radio/radio.component.mjs +142 -0
  7. package/esm2022/lib/atoms/textarea/textarea.component.mjs +126 -0
  8. package/esm2022/lib/directives/asset-source.directive.mjs +68 -0
  9. package/esm2022/lib/directives/icon-source.directive.mjs +65 -0
  10. package/esm2022/lib/directives/no-leading-space.directive.mjs +24 -0
  11. package/esm2022/lib/directives/only-letters.directive.mjs +25 -0
  12. package/esm2022/lib/directives/only-number.directive.mjs +21 -0
  13. package/esm2022/lib/directives/rfc.directive.mjs +67 -0
  14. package/esm2022/lib/directives/tooltip.directive.mjs +199 -0
  15. package/esm2022/lib/models/snackbar.models.mjs +2 -0
  16. package/esm2022/lib/molecules/alert/alert.component.mjs +79 -0
  17. package/esm2022/lib/molecules/copy-input/copy-input.component.mjs +46 -0
  18. package/esm2022/lib/molecules/multiselect/multiselect.component.mjs +466 -0
  19. package/esm2022/lib/molecules/option/option.component.mjs +55 -0
  20. package/esm2022/lib/molecules/phone-input/phone-input.component.mjs +64 -0
  21. package/esm2022/lib/molecules/select/select.component.mjs +498 -0
  22. package/esm2022/lib/molecules/snackbar/snackbar.component.mjs +581 -0
  23. package/esm2022/lib/organisms/sidebar/sidebar-icon.component.mjs +91 -0
  24. package/esm2022/lib/organisms/sidebar/sidebar.component.mjs +115 -0
  25. package/esm2022/lib/services/snackbar.service.mjs +96 -0
  26. package/esm2022/lib/tokens/asset-base-url.token.mjs +10 -0
  27. package/esm2022/public-api.mjs +37 -0
  28. package/esm2022/up_si_vale-sivale-componentes-angular.mjs +5 -0
  29. package/fesm2022/up_si_vale-sivale-componentes-angular.mjs +4116 -0
  30. package/fesm2022/up_si_vale-sivale-componentes-angular.mjs.map +1 -0
  31. package/index.d.ts +5 -0
  32. package/lib/atoms/button/button.component.d.ts +20 -0
  33. package/lib/atoms/checkbox/checkbox.component.d.ts +31 -0
  34. package/lib/atoms/date-picker/date-picker.component.d.ts +134 -0
  35. package/lib/atoms/input/input.component.d.ts +35 -0
  36. package/lib/atoms/loader/loader.component.d.ts +10 -0
  37. package/lib/atoms/radio/radio.component.d.ts +25 -0
  38. package/lib/atoms/textarea/textarea.component.d.ts +27 -0
  39. package/lib/directives/asset-source.directive.d.ts +19 -0
  40. package/lib/directives/icon-source.directive.d.ts +18 -0
  41. package/lib/directives/no-leading-space.directive.d.ts +6 -0
  42. package/lib/directives/only-letters.directive.d.ts +7 -0
  43. package/lib/directives/only-number.directive.d.ts +6 -0
  44. package/lib/directives/rfc.directive.d.ts +12 -0
  45. package/lib/directives/tooltip.directive.d.ts +27 -0
  46. package/{src/lib/models/snackbar.models.ts → lib/models/snackbar.models.d.ts} +8 -10
  47. package/lib/molecules/alert/alert.component.d.ts +29 -0
  48. package/lib/molecules/copy-input/copy-input.component.d.ts +14 -0
  49. package/lib/molecules/multiselect/multiselect.component.d.ts +74 -0
  50. package/lib/molecules/option/option.component.d.ts +19 -0
  51. package/lib/molecules/phone-input/phone-input.component.d.ts +12 -0
  52. package/lib/molecules/select/select.component.d.ts +88 -0
  53. package/lib/molecules/snackbar/snackbar.component.d.ts +17 -0
  54. package/lib/organisms/sidebar/sidebar-icon.component.d.ts +8 -0
  55. package/lib/organisms/sidebar/sidebar.component.d.ts +47 -0
  56. package/lib/services/snackbar.service.d.ts +40 -0
  57. package/{src/lib/tokens/asset-base-url.token.ts → lib/tokens/asset-base-url.token.d.ts} +1 -5
  58. package/package.json +39 -28
  59. package/{src/public-api.ts → public-api.d.ts} +3 -15
  60. package/ng-package.json +0 -9
  61. package/src/lib/atoms/button/button.component.html +0 -21
  62. package/src/lib/atoms/button/button.component.scss +0 -242
  63. package/src/lib/atoms/button/button.component.ts +0 -43
  64. package/src/lib/atoms/checkbox/checkbox.component.scss +0 -131
  65. package/src/lib/atoms/checkbox/checkbox.component.ts +0 -130
  66. package/src/lib/atoms/date-picker/date-picker.component.html +0 -295
  67. package/src/lib/atoms/date-picker/date-picker.component.scss +0 -1002
  68. package/src/lib/atoms/date-picker/date-picker.component.ts +0 -942
  69. package/src/lib/atoms/input/input.component.ts +0 -239
  70. package/src/lib/atoms/loader/loader.component.scss +0 -144
  71. package/src/lib/atoms/loader/loader.component.ts +0 -44
  72. package/src/lib/atoms/radio/radio.component.scss +0 -115
  73. package/src/lib/atoms/radio/radio.component.ts +0 -103
  74. package/src/lib/atoms/textarea/textarea.component.ts +0 -155
  75. package/src/lib/directives/asset-source.directive.ts +0 -64
  76. package/src/lib/directives/icon-source.directive.ts +0 -74
  77. package/src/lib/directives/no-leading-space.directive.ts +0 -18
  78. package/src/lib/directives/only-letters.directive.ts +0 -21
  79. package/src/lib/directives/only-number.directive.ts +0 -15
  80. package/src/lib/directives/rfc.directive.ts +0 -60
  81. package/src/lib/directives/tooltip.directive.ts +0 -211
  82. package/src/lib/molecules/copy-input/copy-input.component.html +0 -29
  83. package/src/lib/molecules/copy-input/copy-input.component.scss +0 -101
  84. package/src/lib/molecules/copy-input/copy-input.component.ts +0 -41
  85. package/src/lib/molecules/multiselect/multiselect.component.scss +0 -298
  86. package/src/lib/molecules/multiselect/multiselect.component.ts +0 -487
  87. package/src/lib/molecules/option/option.component.ts +0 -45
  88. package/src/lib/molecules/phone-input/phone-input.component.scss +0 -78
  89. package/src/lib/molecules/phone-input/phone-input.component.ts +0 -43
  90. package/src/lib/molecules/select/select.component.ts +0 -482
  91. package/src/lib/molecules/snackbar/snackbar.component.scss +0 -201
  92. package/src/lib/molecules/snackbar/snackbar.component.ts +0 -321
  93. package/src/lib/services/snackbar.service.ts +0 -103
  94. package/tsconfig.json +0 -31
@@ -1,101 +0,0 @@
1
- .copy-input-wrapper {
2
- position: relative;
3
- display: inline-block;
4
- max-width: 100%;
5
- }
6
-
7
- /* Tooltip */
8
- .copy-tooltip {
9
- position: absolute;
10
- top: -2rem; /* espacio superior */
11
- left: 50%;
12
- transform: translateX(-50%);
13
- padding: 0.375rem 0.625rem;
14
- background: #2f2f2f;
15
- color: #fff;
16
- font-size: 0.75rem;
17
- border-radius: 0.375rem;
18
- white-space: nowrap;
19
- opacity: 0;
20
- animation: fadeSlide 0.25s forwards;
21
-
22
- /* Flecha */
23
- &::after {
24
- content: "";
25
- position: absolute;
26
- bottom: -0.375rem;
27
- left: 50%;
28
- transform: translateX(-50%);
29
- border-width: 0.375rem;
30
- border-style: solid;
31
- border-color: #2f2f2f transparent transparent transparent;
32
- }
33
- }
34
-
35
- @keyframes fadeSlide {
36
- from {
37
- opacity: 0;
38
- transform: translate(-50%, -5px);
39
- }
40
- to {
41
- opacity: 1;
42
- transform: translate(-50%, 0);
43
- }
44
- }
45
-
46
-
47
- /* INPUT BASE */
48
- .copy-input {
49
- display: flex;
50
- align-items: center;
51
- gap: 0.5rem;
52
- width: 100%;
53
- box-sizing: border-box;
54
- padding: 0.625rem 1.125rem;
55
- border: 2px solid #6D7275;
56
- border-radius: 0.5rem;
57
-
58
- // background: #fff;
59
- cursor: pointer;
60
- user-select: none;
61
- transition: background 0.2s ease, border-color 0.2s ease;
62
-
63
- &:hover {
64
- background: #f9f9f9;
65
- border-color: #d8d8d8;
66
- }
67
-
68
- &:active {
69
- background: #f0f0f0;
70
- }
71
-
72
- &:focus {
73
- // outline: 1px solid #cfd9ff;
74
- outline-offset: 2px;
75
- }
76
-
77
- &__icon {
78
- font-size: 1.1rem;
79
- color: #444;
80
- transition: transform 0.2s ease, color 0.2s ease;
81
-
82
- /* animación al copiar */
83
- &.icon-done {
84
- transform: scale(1.2);
85
- color: #27ae60;
86
- }
87
- }
88
-
89
- &__text {
90
- flex: 1;
91
- min-width: 0;
92
- white-space: nowrap;
93
- overflow: hidden;
94
- text-overflow: ellipsis;
95
- font-family: 'Quicksand', sans-serif;
96
- font-weight: 600;
97
- font-size: 1rem;
98
- line-height: 1.5rem;
99
- color: #2E353A;
100
- }
101
- }
@@ -1,41 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, EventEmitter, Input, Output } from '@angular/core';
3
-
4
- @Component({
5
- selector: 'copy-input',
6
- standalone: true,
7
- imports: [
8
- CommonModule
9
- ],
10
- templateUrl: './copy-input.component.html',
11
- styleUrl: './copy-input.component.scss'
12
- })
13
- export class CopyInputComponent {
14
- @Input() value: string = '';
15
- @Input() icon: string = 'icon-copy-clipboard';
16
- @Input() copiedIcon: string = 'icon-done';
17
- @Input() ariaLabel: string = 'Copiar';
18
-
19
- @Output() copied = new EventEmitter<void>();
20
-
21
- isCopied = false;
22
- timeoutRef: any;
23
-
24
- async copyToClipboard() {
25
- try {
26
- await navigator.clipboard.writeText(this.value);
27
-
28
- this.isCopied = true;
29
- this.copied.emit();
30
-
31
- clearTimeout(this.timeoutRef);
32
-
33
- this.timeoutRef = setTimeout(() => {
34
- this.isCopied = false;
35
- }, 1200);
36
-
37
- } catch (err) {
38
- console.error('Error copiando:', err);
39
- }
40
- }
41
- }
@@ -1,298 +0,0 @@
1
- .multiselect-wrapper {
2
- width: 100%;
3
- margin-bottom: 6px;
4
- padding: 0 4px;
5
-
6
- label {
7
- display: block;
8
- margin-bottom: 0.5rem;
9
- font-family: 'Quicksand', sans-serif;
10
- font-weight: 500;
11
- font-size: 14px;
12
- color: #585D61;
13
- }
14
- }
15
-
16
- .multiselect-container {
17
- position: relative;
18
- width: 100%;
19
- }
20
-
21
- .multiselect-header {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- padding: 0.75rem 1rem;
26
- border: 1px solid #EAECF5;
27
- box-shadow: 0 1px 2px 0 #A1AFEC66;
28
- border-radius: 8px;
29
- background: white;
30
- cursor: pointer;
31
- transition: all 0.2s;
32
- min-height: 44px;
33
- height: 44px;
34
-
35
- &:hover:not(.disabled) {
36
- border-color: #FBD399;
37
- }
38
-
39
- &:focus-within {
40
- border-color: #FBD399;
41
- box-shadow: 0 0 0 4px #FFE8C8, 0 1px 2px 0 #0A0D120D;
42
- }
43
-
44
- &.disabled {
45
- background: #f5f5f5;
46
- cursor: not-allowed;
47
- opacity: 0.6;
48
- }
49
-
50
- &.error {
51
- border-color: #DC3545 !important;
52
-
53
- &.open {
54
- box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
55
- }
56
- }
57
-
58
- .multiselect-placeholder {
59
- font-family: 'Quicksand', sans-serif;
60
- font-size: 14px;
61
- color: #969A9C;
62
- }
63
-
64
- .multiselect-selected {
65
- font-family: 'Quicksand', sans-serif;
66
- font-size: 14px;
67
- color: #1A1D20;
68
- font-weight: 500;
69
- flex: 1;
70
- overflow: hidden;
71
- text-overflow: ellipsis;
72
- white-space: nowrap;
73
- }
74
-
75
- .multiselect-arrow {
76
- color: #969A9C;
77
- transition: transform 0.3s ease;
78
- margin-left: 0.5rem;
79
- flex-shrink: 0;
80
- display: flex;
81
- align-items: center;
82
-
83
- &.open {
84
- transform: rotate(180deg);
85
- }
86
- }
87
- }
88
-
89
- .multiselect-dropdown {
90
- margin-top: 8px;
91
- background: white;
92
- border: 1px solid #EAECF5;
93
- border-radius: 8px;
94
- box-shadow: 0 10px 16px -4px #EDEFFB;
95
- max-height: 290px !important;
96
- width: 100%;
97
- overflow-x: hidden;
98
- overflow-y: auto;
99
- animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
100
-
101
- // Custom scrollbar
102
- &::-webkit-scrollbar {
103
- width: 8px;
104
- }
105
-
106
- &::-webkit-scrollbar-track {
107
- background: #f1f1f1;
108
- border-radius: 0 12px 12px 0;
109
- }
110
-
111
- &::-webkit-scrollbar-thumb {
112
- background: #D5D7D8;
113
- border-radius: 4px;
114
-
115
- &:hover {
116
- background: #969A9C;
117
- }
118
- }
119
- }
120
-
121
- @keyframes dropdownSlide {
122
- from {
123
- opacity: 0;
124
- transform: translateY(-8px) scale(0.98);
125
- }
126
- to {
127
- opacity: 1;
128
- transform: translateY(0) scale(1);
129
- }
130
- }
131
-
132
- .multiselect-option {
133
- display: flex !important;
134
- align-items: center;
135
- padding: 0.6rem 1.25rem;
136
- cursor: pointer;
137
- transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
138
- border-bottom: 1px solid #F1F2F4;
139
- gap: 1rem;
140
- margin: 0 !important;
141
- position: relative;
142
-
143
- &:first-child {
144
- border-radius: 12px 12px 0 0;
145
- }
146
-
147
- &:last-child {
148
- border-bottom: none;
149
- border-radius: 0 0 12px 12px;
150
- }
151
-
152
- &:hover:not(.disabled) {
153
- background: linear-gradient(90deg, #FFF9F0 0%, #FFFEF9 100%);
154
-
155
- &::before {
156
- opacity: 0.5;
157
- }
158
- }
159
-
160
- &.disabled {
161
- opacity: 0.5;
162
- cursor: not-allowed;
163
- background: #F8F9FC;
164
-
165
- &:hover {
166
- transform: none;
167
- background: #F8F9FC;
168
- }
169
- }
170
-
171
- .option-checkbox {
172
- position: relative;
173
- display: flex;
174
- align-items: center;
175
- flex-shrink: 0;
176
-
177
- input[type="checkbox"] {
178
- position: absolute;
179
- opacity: 0;
180
- cursor: pointer;
181
- width: 22px;
182
- height: 22px;
183
- margin: 0;
184
- }
185
-
186
- .checkbox-custom {
187
- width: 22px;
188
- height: 22px;
189
- border: 2.5px solid #D5D7D8;
190
- border-radius: 6px;
191
- display: flex;
192
- align-items: center;
193
- justify-content: center;
194
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
195
- background: white;
196
- position: relative;
197
-
198
- &::after {
199
- content: '';
200
- position: absolute;
201
- width: 100%;
202
- height: 100%;
203
- border-radius: 4px;
204
- background: #F59100;
205
- opacity: 0;
206
- transform: scale(0.5);
207
- transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
208
- }
209
-
210
- &.checked {
211
- background: white;
212
- border-color: #F59100;
213
- border-width: 2.5px;
214
- transform: scale(1.05);
215
-
216
- &::after {
217
- opacity: 0;
218
- }
219
- }
220
-
221
- .check-icon {
222
- position: relative;
223
- z-index: 1;
224
- display: flex;
225
- align-items: center;
226
- justify-content: center;
227
- animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
228
- }
229
- }
230
-
231
- // Hover effect on checkbox
232
- input[type="checkbox"]:hover ~ .checkbox-custom:not(.checked) {
233
- border-color: #F26D00;
234
- transform: scale(1.05);
235
- }
236
- }
237
-
238
- .option-text {
239
- flex: 1;
240
- font-family: 'Quicksand', sans-serif;
241
- font-weight: 500;
242
- font-size: 14px;
243
- color: #1A1D20;
244
- line-height: 1.5;
245
- transition: color 0.2s ease, font-weight 0.2s ease;
246
- }
247
- }
248
-
249
- @keyframes checkPop {
250
- 0% {
251
- transform: scale(0);
252
- opacity: 0;
253
- }
254
- 50% {
255
- transform: scale(1.2);
256
- }
257
- 100% {
258
- transform: scale(1);
259
- opacity: 1;
260
- }
261
- }
262
-
263
- .field-error {
264
- color: #F04438;
265
- font-size: 0.875rem;
266
- margin-top: 0.25rem;
267
- font-family: 'Quicksand', sans-serif;
268
- }
269
-
270
- // Custom backdrop for dynamic dropdown
271
- ::ng-deep .multiselect-custom-backdrop {
272
- position: fixed;
273
- top: 0;
274
- left: 0;
275
- width: 100%;
276
- height: 100%;
277
- background: transparent;
278
- z-index: 99999;
279
- pointer-events: auto;
280
- }
281
-
282
- // Custom dropdown container
283
- ::ng-deep .multiselect-custom-dropdown {
284
- position: fixed;
285
- background: white;
286
- border-radius: 8px;
287
- overflow: hidden;
288
- z-index: 1000;
289
- opacity: 0;
290
- transform: translateY(-8px) scale(0.98);
291
- transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
292
- transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
293
-
294
- &.multiselect-dropdown-open {
295
- opacity: 1;
296
- transform: translateY(0) scale(1);
297
- }
298
- }