ui-core-abv 0.10.7 → 0.11.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.
Files changed (32) hide show
  1. package/fesm2022/ui-core-abv.mjs +1740 -302
  2. package/fesm2022/ui-core-abv.mjs.map +1 -1
  3. package/lib/components/button/button.component.d.ts +3 -1
  4. package/lib/components/dynamic-form/form/dynamic-form.component.d.ts +9 -1
  5. package/lib/components/dynamic-form/form-engine.service.d.ts +166 -0
  6. package/lib/components/dynamic-form/form-validators.d.ts +10 -0
  7. package/lib/components/dynamic-form/form-wrapper/form-wrapper.component.d.ts +48 -125
  8. package/lib/components/dynamic-form/form.models.d.ts +12 -1
  9. package/lib/components/inputs/multy-select/multy-select.component.d.ts +7 -1
  10. package/lib/components/inputs/select/select.component.d.ts +1 -0
  11. package/lib/components/inputs/ui-scale/ui-scale.component.d.ts +53 -0
  12. package/lib/components/pool-options/pool-options.component.d.ts +12 -1
  13. package/lib/components/survey/survey-templates.directive.d.ts +23 -0
  14. package/lib/components/survey/survey.component.d.ts +164 -0
  15. package/lib/components/survey/survey.models.d.ts +56 -0
  16. package/lib/components/table/table.models.d.ts +3 -2
  17. package/lib/components/tree-admin/tree-admin.component.d.ts +2 -1
  18. package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts +3 -0
  19. package/lib/components/user-formbuilder/block-editor/field-editor/field-options-editor/field-options-editor.component.d.ts +15 -1
  20. package/lib/components/user-formbuilder/block-editor/field-editor/field-options-editor/option-style-editor/option-style-editor.component.d.ts +36 -0
  21. package/lib/components/user-formbuilder/form-preview/form-preview.component.d.ts +30 -13
  22. package/lib/components/user-formbuilder/user-formbuilder.component.d.ts +7 -1
  23. package/lib/components/wizard/wizard.component.d.ts +1 -2
  24. package/lib/theme/colors.d.ts +24 -0
  25. package/lib/theme/theme-scope.d.ts +19 -0
  26. package/lib/translate/dictionary.en.d.ts +46 -0
  27. package/lib/translate/dictionary.es.d.ts +46 -0
  28. package/package.json +1 -1
  29. package/public-api.d.ts +9 -0
  30. package/src/lib/styles/_default_colors.scss +103 -0
  31. package/src/lib/styles/_tokens.scss +18 -0
  32. package/src/lib/styles/_variables.scss +75 -2
@@ -32,6 +32,7 @@ export declare const DICTIONARY_ES: {
32
32
  readonly none: "- Ninguno -";
33
33
  readonly empty: "No hay elementos para mostrar";
34
34
  readonly without_options: "Sin opciones disponibles";
35
+ readonly max_selections: "{{count}} de {{max}} seleccionadas";
35
36
  readonly pending_text: "TEXTO PENDIENTE";
36
37
  readonly search_placeholder: "Buscar...";
37
38
  };
@@ -126,6 +127,18 @@ export declare const DICTIONARY_ES: {
126
127
  readonly next: "Siguiente";
127
128
  readonly submit: "Enviar";
128
129
  };
130
+ readonly survey: {
131
+ readonly back: "Anterior";
132
+ readonly next: "Siguiente";
133
+ readonly submit: "Enviar";
134
+ readonly progress: "{{current}} de {{total}}";
135
+ readonly saving: "Guardando...";
136
+ readonly saved: "Guardado";
137
+ readonly save_error: "No se pudo guardar";
138
+ readonly press_enter: "o presiona Enter";
139
+ readonly announce_page: "Pregunta {{current}} de {{total}}";
140
+ readonly announce_errors: "Revisa las respuestas marcadas antes de continuar.";
141
+ };
129
142
  readonly wizard: {
130
143
  readonly back: "Anterior";
131
144
  readonly next: "Siguiente";
@@ -172,6 +185,8 @@ export declare const DICTIONARY_ES: {
172
185
  readonly preview_form: "Vista previa";
173
186
  readonly preview_form_label: "Esta es solo una vista previa";
174
187
  readonly preview_copy_response: "Validar y copiar respuesta";
188
+ readonly preview_survey_done: "Encuesta enviada. Respuesta:";
189
+ readonly preview_survey_restart: "Reiniciar";
175
190
  readonly submit_form: "Guardar";
176
191
  readonly select_field_to_edit: "Selecciona un campo para editar sus propiedades";
177
192
  readonly no_fields: "Añade campos a tu formulario";
@@ -242,6 +257,22 @@ export declare const DICTIONARY_ES: {
242
257
  readonly templateLinkLabel_tip: "Texto clickeable que se muestra para descargar el formato";
243
258
  readonly poolEnabledListView: "Ver lista habilitada";
244
259
  readonly poolEnabledListView_tip: "Mostrar opciones en lista";
260
+ readonly poolDisplayMode: "Disposición";
261
+ readonly minSelections: "Mínimo de selecciones";
262
+ readonly minSelections_tip: "Solo con selección múltiple. Vacío o 0: sin mínimo";
263
+ readonly maxSelections: "Máximo de selecciones";
264
+ readonly maxSelections_tip: "Solo con selección múltiple. Vacío: sin límite";
265
+ readonly scaleMode: "Tipo de escala";
266
+ readonly scaleMode_tip: "Números o íconos acumulativos";
267
+ readonly scaleIcon: "Ícono";
268
+ readonly scaleIcon_tip: "Clase de Remix Icon (por defecto, estrella)";
269
+ readonly scaleMin: "Valor inicial";
270
+ readonly scaleMin_tip: "Por defecto 1 (usa 0 para NPS)";
271
+ readonly scaleMax: "Valor final";
272
+ readonly scaleMax_tip: "Por defecto 5 (máximo 20 puntos)";
273
+ readonly poolDisplayMode_tip: "Cómo se ordenan las opciones";
274
+ readonly poolGridColumns: "Columnas";
275
+ readonly poolGridColumns_tip: "Opciones por fila en modo grid (1 a 6)";
245
276
  readonly poolTitle: "Título del listado";
246
277
  readonly poolTitle_tip: "Título del encabezado";
247
278
  readonly options: "Opciones";
@@ -297,6 +328,19 @@ export declare const DICTIONARY_ES: {
297
328
  readonly code_placeholder: "ID";
298
329
  readonly display_name_placeholder: "Nombre para mostrar";
299
330
  readonly add_option: "Nueva opción";
331
+ readonly scale_labels_title: "Leyendas de la escala";
332
+ readonly scale_value_label: "Valor";
333
+ readonly scale_text_label: "Leyenda";
334
+ readonly scale_text_placeholder: "Ej.: Nada probable";
335
+ readonly advanced: "Avanzado";
336
+ readonly advanced_title: "Ícono y color de las opciones";
337
+ readonly advanced_hint: "Escribe la clase de un ícono de Remix Icon o elige una sugerencia. El color se aplica al ícono. Más íconos en";
338
+ readonly icon_label: "Ícono";
339
+ readonly icon_suggestions: "Sugerencias de íconos";
340
+ readonly color_label: "Color";
341
+ readonly no_color: "Sin color";
342
+ readonly clear_style: "Quitar ícono y color";
343
+ readonly no_options: "Agrega opciones para configurar su ícono y color.";
300
344
  };
301
345
  readonly field_editor: {
302
346
  readonly dependency_title: "Dependencia";
@@ -360,6 +404,8 @@ export declare const DICTIONARY_ES: {
360
404
  readonly maxlength: "{{field}} no puede superar {{requiredLength}} caracteres.";
361
405
  readonly pattern: "{{field}} no tiene el formato correcto.";
362
406
  readonly external_invalid: "{{field}} no es válido.";
407
+ readonly min_selections: "{{field}}: elige al menos {{min}} opciones.";
408
+ readonly max_selections: "{{field}}: elige como máximo {{max}} opciones.";
363
409
  };
364
410
  readonly clipboard: {
365
411
  readonly copy_error: "No se pudo copiar:";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-core-abv",
3
- "version": "0.10.7",
3
+ "version": "0.11.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=19.2.0 <21.0.0",
6
6
  "@angular/core": ">=19.2.0 <21.0.0",
package/public-api.d.ts CHANGED
@@ -23,6 +23,7 @@ export * from './lib/components/skeleton-loader/skeleton-loader.component';
23
23
  export * from './lib/components/skeleton-cards/skeleton-cards.component';
24
24
  export * from './lib/components/push-alerts/alert-container/alert-container.component';
25
25
  export * from './lib/components/inputs/ui-slider/ui-slider.component';
26
+ export * from './lib/components/inputs/ui-scale/ui-scale.component';
26
27
  export * from './lib/components/uic-action-button/uic-action-button.component';
27
28
  export * from './lib/components/signature-pad/signature-pad.component';
28
29
  export * from './lib/components/dropdown-container/dropdown-container.component';
@@ -59,3 +60,11 @@ export * from './lib/directives/textarea-autoresize.directive';
59
60
  export * from './lib/directives/textarea-autoresize-min-rows.directive';
60
61
  export * from './lib/directives/textarea-autoresize-max-rows.directive';
61
62
  export * from './lib/helpers';
63
+ export * from './lib/components/survey/survey.component';
64
+ export * from './lib/components/survey/survey.models';
65
+ export * from './lib/components/survey/survey-templates.directive';
66
+ export * from './lib/components/dynamic-form/form-engine.service';
67
+ export * from './lib/components/dynamic-form/form-state.service';
68
+ export * from './lib/components/dynamic-form/form-validators';
69
+ export * from './lib/theme/theme-scope';
70
+ export * from './lib/theme/colors';
@@ -99,3 +99,106 @@ $blue: (
99
99
  950: #131d2b
100
100
  )!default;
101
101
 
102
+
103
+
104
+ // COLORES ADICIONALES
105
+ // Escala completa 25-950 para que cualquier componente pueda usar cualquier tono.
106
+ $dark-green: (
107
+ 25: #f3faf6,
108
+ 50: #e6f4ec,
109
+ 100: #c7e6d3,
110
+ 200: #9dd2b3,
111
+ 300: #6bb98d,
112
+ 400: #3e9a68,
113
+ 500: #1f7a4d,
114
+ 600: #18663f,
115
+ 700: #145234,
116
+ 800: #11432b,
117
+ 900: #0d3322,
118
+ 950: #062015
119
+ ) !default;
120
+
121
+ $light-blue: (
122
+ 25: #f5fbff,
123
+ 50: #f0f9ff,
124
+ 100: #e0f2fe,
125
+ 200: #bae6fd,
126
+ 300: #7dd3fc,
127
+ 400: #38bdf8,
128
+ 500: #0ea5e9,
129
+ 600: #0284c7,
130
+ 700: #0369a1,
131
+ 800: #075985,
132
+ 900: #0c4a6e,
133
+ 950: #082f49
134
+ ) !default;
135
+
136
+ $pink: (
137
+ 25: #fef6fa,
138
+ 50: #fdf2f8,
139
+ 100: #fce7f3,
140
+ 200: #fbcfe8,
141
+ 300: #f9a8d4,
142
+ 400: #f472b6,
143
+ 500: #ec4899,
144
+ 600: #db2777,
145
+ 700: #be185d,
146
+ 800: #9d174d,
147
+ 900: #831843,
148
+ 950: #500724
149
+ ) !default;
150
+
151
+ $dark-red: (
152
+ 25: #fdf6f6,
153
+ 50: #fbeaea,
154
+ 100: #f5cccc,
155
+ 200: #eba3a3,
156
+ 300: #dc7070,
157
+ 400: #c44545,
158
+ 500: #9f1d1d,
159
+ 600: #891818,
160
+ 700: #721414,
161
+ 800: #5c1010,
162
+ 900: #470c0c,
163
+ 950: #2b0606
164
+ ) !default;
165
+
166
+ $orange: (
167
+ 25: #fffaf5,
168
+ 50: #fff7ed,
169
+ 100: #ffedd5,
170
+ 200: #fed7aa,
171
+ 300: #fdba74,
172
+ 400: #fb923c,
173
+ 500: #f97316,
174
+ 600: #ea580c,
175
+ 700: #c2410c,
176
+ 800: #9a3412,
177
+ 900: #7c2d12,
178
+ 950: #431407
179
+ ) !default;
180
+
181
+ $teal: (
182
+ 25: #f4fdfb,
183
+ 50: #f0fdfa,
184
+ 100: #ccfbf1,
185
+ 200: #99f6e4,
186
+ 300: #5eead4,
187
+ 400: #2dd4bf,
188
+ 500: #14b8a6,
189
+ 600: #0d9488,
190
+ 700: #0f766e,
191
+ 800: #115e59,
192
+ 900: #134e4a,
193
+ 950: #042f2e
194
+ ) !default;
195
+
196
+ // Paletas adicionales por nombre (el nombre es el del color en la librería: --dark-green-500, btn-dark-green-filled...)
197
+ $uic-extra-palettes: (
198
+ 'dark-green': $dark-green,
199
+ 'light-blue': $light-blue,
200
+ 'pink': $pink,
201
+ 'dark-red': $dark-red,
202
+ 'orange': $orange,
203
+ 'teal': $teal
204
+ ) !default;
@@ -36,6 +36,12 @@
36
36
  @each $shade, $color in $yellow {
37
37
  --yellow-#{$shade}: #{$color};
38
38
  }
39
+ // Paletas adicionales (dark-green, light-blue, pink, dark-red, orange, teal)
40
+ @each $name, $palette in $uic-extra-palettes {
41
+ @each $shade, $color in $palette {
42
+ --#{$name}-#{$shade}: #{$color};
43
+ }
44
+ }
39
45
  --white: #fff;
40
46
  --secondary-alpha: #8130c464;
41
47
 
@@ -70,4 +76,16 @@
70
76
 
71
77
  --bp-tablet: 768px;
72
78
 
79
+ }
80
+
81
+ // Paneles (desplegables, tooltips) que heredan un alcance de tema: ver theme/theme-scope.ts.
82
+ // Solo aplica a elementos con esta clase, así que no afecta a componentes fuera de un tema.
83
+ .uic-theme-scope {
84
+ font-family: var(--uic-font-family, inherit);
85
+ & :is(input, textarea, button) {
86
+ font-family: inherit;
87
+ }
88
+ & :is(input, textarea) {
89
+ color: var(--uic-input-text-color, inherit);
90
+ }
73
91
  }
@@ -1,4 +1,11 @@
1
- $focus-shadow: 0 0 0 3px var(--secondary-alpha);
1
+ // ========== COLORES ==========
2
+ // Colores agregados a la librería. Deben coincidir con las claves de $uic-extra-palettes
3
+ // (_default_colors.scss) y con UIC_EXTRA_COLORS (theme/colors.ts). Los componentes generan
4
+ // sus clases (btn-*, f-*, pb-*...) recorriendo esta lista; los colores originales siguen
5
+ // definidos a mano para no alterar su estilo.
6
+ $uic-extra-colors: 'dark-green', 'light-blue', 'pink', 'dark-red', 'orange', 'teal';
7
+
8
+ $focus-shadow: var(--uic-focus-shadow, 0 0 0 3px var(--secondary-alpha));
2
9
 
3
10
  // ========== TYPOGRAPHY ==========
4
11
  $font-family-base: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
@@ -48,4 +55,70 @@ $skeleton-gradient: linear-gradient(
48
55
 
49
56
  $input-heigth: calc( 4 * var(--form-ref));
50
57
  $input-fontsize: max(calc( var(--form-ref) + 4px ) , 14px) ;
51
- $input-radius: var(--input-radius);
58
+ $input-radius: var(--input-radius);
59
+
60
+ // ========== TOKENS SEMÁNTICOS ==========
61
+ // Variables CSS que se pueden sobrescribir en tiempo de ejecución (en :host de un componente,
62
+ // en una clase de tema o con style.setProperty). Cada una cae al valor histórico cuando no se
63
+ // define, así que sin override el resultado visual es el mismo de siempre.
64
+ // Ejemplo: .mi-tema { --uic-input-border-color: #94a3b8; --uic-label-font-size: 18px; }
65
+
66
+ // Inputs
67
+ $uic-input-bg: var(--uic-input-bg, var(--white));
68
+ $uic-input-font-size: var(--uic-input-font-size, #{$input-fontsize});
69
+ $uic-input-border-width: var(--uic-input-border-width, 1px);
70
+ $uic-input-border-color: var(--uic-input-border-color, var(--grey-200));
71
+ $uic-input-border-color-hover: var(--uic-input-border-color-hover, var(--grey-400));
72
+ $uic-input-border-color-active: var(--uic-input-border-color-active, var(--primary-600));
73
+ $uic-error-color: var(--uic-error-color, var(--red-500));
74
+
75
+ // Label y tip
76
+ $uic-label-color: var(--uic-label-color, var(--grey-950));
77
+ $uic-label-font-size: var(--uic-label-font-size, #{$input-fontsize});
78
+ $uic-label-font-weight: var(--uic-label-font-weight, 400);
79
+ $uic-label-line-height: var(--uic-label-line-height, #{$font-size-ml});
80
+ $uic-tip-color: var(--uic-tip-color, var(--grey-500));
81
+
82
+ // Paneles desplegables (select, multiselect, buscadores)
83
+ $uic-overlay-bg: var(--uic-overlay-bg, var(--white));
84
+ $uic-overlay-shadow: var(--uic-overlay-shadow, #{$shadow-overlay});
85
+ $uic-option-font-size: var(--uic-option-font-size, #{$font-size-s});
86
+ $uic-option-hover-bg: var(--uic-option-hover-bg, var(--secondary-100));
87
+
88
+ // Controles de selección
89
+ $uic-checkbox-color: var(--uic-checkbox-color, var(--secondary-500));
90
+ $uic-checkbox-color-hover: var(--uic-checkbox-color-hover, var(--secondary-400));
91
+ $uic-checkbox-border-color: var(--uic-checkbox-border-color, var(--grey-500));
92
+ $uic-radio-color: var(--uic-radio-color, var(--primary-500));
93
+ $uic-radio-border-color: var(--uic-radio-border-color, var(--primary-400));
94
+ $uic-radio-option-hover-bg: var(--uic-radio-option-hover-bg, var(--grey-50));
95
+ $uic-option-label-font-size: var(--uic-option-label-font-size, #{$font-size-s});
96
+ $uic-slider-color: var(--uic-slider-color, var(--primary-500));
97
+ $uic-slider-track-color: var(--uic-slider-track-color, #ccc);
98
+
99
+ // Pool de opciones
100
+ $uic-pool-gap: var(--uic-pool-gap, var(--design-size-ref));
101
+ $uic-pool-option-bg: var(--uic-pool-option-bg, var(--secondary-50));
102
+ $uic-pool-option-color: var(--uic-pool-option-color, var(--secondary-400));
103
+ $uic-pool-option-border-width: var(--uic-pool-option-border-width, 1px);
104
+ $uic-pool-option-border-color: var(--uic-pool-option-border-color, var(--grey-300));
105
+ $uic-pool-option-border-color-hover: var(--uic-pool-option-border-color-hover, var(--secondary-400));
106
+ $uic-pool-option-radius: var(--uic-pool-option-radius, #{$spacing-m});
107
+ $uic-pool-option-padding: var(--uic-pool-option-padding, #{$spacing-xs} #{$spacing-m});
108
+ $uic-pool-option-font-size: var(--uic-pool-option-font-size, #{$font-size-s});
109
+ $uic-pool-option-font-weight: var(--uic-pool-option-font-weight, #{$font-weight-regular});
110
+ $uic-pool-option-active-bg: var(--uic-pool-option-active-bg, var(--secondary-100));
111
+ $uic-pool-option-active-color: var(--uic-pool-option-active-color, var(--uic-pool-option-color, var(--secondary-400)));
112
+ $uic-pool-option-active-border-color: var(--uic-pool-option-active-border-color, var(--primary-400));
113
+
114
+ // Carga (shimmer)
115
+ $uic-loading-base: var(--uic-loading-base, #f2f2f2);
116
+ $uic-loading-highlight: var(--uic-loading-highlight, #dee1e2);
117
+
118
+ // Formulario
119
+ $uic-form-gap: var(--uic-form-gap, #{$spacing-m});
120
+ $uic-block-title-color: var(--uic-block-title-color, var(--grey-950));
121
+ $uic-block-title-font-size: var(--uic-block-title-font-size, #{$font-size-xl});
122
+ $uic-block-subtitle-font-size: var(--uic-block-subtitle-font-size, #{$font-size-l});
123
+ $uic-block-message-color: var(--uic-block-message-color, var(--grey-500, #666));
124
+ $uic-block-message-font-size: var(--uic-block-message-font-size, 13px);