ui-core-abv 0.11.1 → 0.11.3
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/fesm2022/ui-core-abv.mjs +1232 -218
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/modal/side-modal/side-modal.component.d.ts +2 -3
- package/lib/components/survey/survey.component.d.ts +5 -5
- package/lib/components/user-formbuilder/block-editor/block-editor.component.d.ts +54 -3
- package/lib/components/user-formbuilder/block-editor/field-editor/field-editor.component.d.ts +29 -2
- package/lib/components/user-formbuilder/block-editor/field-editor/field-options-editor/field-options-editor.component.d.ts +13 -1
- package/lib/components/user-formbuilder/block-editor/field-type-selector/field-type-selector.component.d.ts +29 -3
- package/lib/components/user-formbuilder/form-preview/form-preview.component.d.ts +1 -0
- package/lib/components/user-formbuilder/formbuilder.config.d.ts +111 -0
- package/lib/components/user-formbuilder/formbuilder.utils.d.ts +10 -0
- package/lib/components/user-formbuilder/user-formbuilder.component.d.ts +104 -10
- package/lib/directives/tool-tip.directive.d.ts +5 -0
- package/lib/theme/colors.d.ts +10 -0
- package/lib/theme/theme-scope.d.ts +8 -0
- package/lib/translate/dictionary.en.d.ts +81 -0
- package/lib/translate/dictionary.es.d.ts +81 -0
- package/package.json +6 -5
- package/public-api.d.ts +1 -0
- package/src/lib/styles/_dark.scss +113 -0
- package/src/lib/styles/_default_colors.scss +228 -204
- package/src/lib/styles/_variables.scss +140 -123
|
@@ -17,3 +17,11 @@ export declare function findThemeScope(element: Element | null | undefined): HTM
|
|
|
17
17
|
* Sin alcance no hace nada, así que es seguro llamarlo siempre.
|
|
18
18
|
*/
|
|
19
19
|
export declare function applyThemeScope(origin: Element | null | undefined, target: HTMLElement): void;
|
|
20
|
+
/** Atributo con el que la app elige el tema claro u oscuro (ver styles/_dark.scss). */
|
|
21
|
+
export declare const UIC_COLOR_SCHEME_ATTR = "data-theme";
|
|
22
|
+
/**
|
|
23
|
+
* Si `origin` está dentro de una zona con un data-theme distinto del de <html> (p. ej. una zona
|
|
24
|
+
* clara dentro de una app en oscuro), se lo pone también a `target`. Los paneles se dibujan en
|
|
25
|
+
* <body>: sin esto heredarían el tema de la página y no el de la zona.
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyColorScheme(origin: Element | null | undefined, target: HTMLElement): void;
|
|
@@ -190,6 +190,77 @@ export declare const DICTIONARY_EN: {
|
|
|
190
190
|
readonly preview_survey_restart: "Restart";
|
|
191
191
|
readonly select_field_to_edit: "Select a field to edit its properties";
|
|
192
192
|
readonly no_fields: "Add fields to your form";
|
|
193
|
+
readonly no_fields_drop: "Add a field or drag one from another block";
|
|
194
|
+
readonly copy_label: "{{label}} (copy)";
|
|
195
|
+
readonly block: {
|
|
196
|
+
readonly drag: "Drag to reorder the block";
|
|
197
|
+
readonly collapse: "Collapse block";
|
|
198
|
+
readonly expand: "Expand block";
|
|
199
|
+
readonly field_count: "{{count}} field(s)";
|
|
200
|
+
readonly empty_read_only: "This block has no fields";
|
|
201
|
+
};
|
|
202
|
+
readonly properties: {
|
|
203
|
+
readonly title: "Properties";
|
|
204
|
+
readonly resize: "Drag to resize (double-click to reset)";
|
|
205
|
+
readonly back_to_repeater: "Back to repeater";
|
|
206
|
+
readonly close: "Close properties (Esc)";
|
|
207
|
+
};
|
|
208
|
+
readonly untitled_block: "Block {{index}}";
|
|
209
|
+
readonly unsaved_changes: "Unsaved changes";
|
|
210
|
+
readonly read_only: "Read only";
|
|
211
|
+
readonly edit: "Edit";
|
|
212
|
+
readonly no_blocks: "This form has no blocks yet";
|
|
213
|
+
readonly select_field_to_view: "Select a field to view its properties";
|
|
214
|
+
readonly menu: {
|
|
215
|
+
readonly more: "More options";
|
|
216
|
+
readonly copy_json: "Copy JSON";
|
|
217
|
+
readonly copied: "JSON copied";
|
|
218
|
+
readonly load_json: "Load JSON";
|
|
219
|
+
readonly layout_title: "Form layout";
|
|
220
|
+
readonly columns: "Columns";
|
|
221
|
+
readonly size: "Size";
|
|
222
|
+
readonly margin: "Margin";
|
|
223
|
+
readonly title: "Title";
|
|
224
|
+
readonly subtitle: "Subtitle";
|
|
225
|
+
readonly layout_hint: "Sizes and margins in pixels. Leave empty to use the default.";
|
|
226
|
+
};
|
|
227
|
+
readonly no_changes: "There are no changes to save";
|
|
228
|
+
readonly discard_changes: "Discard changes";
|
|
229
|
+
readonly discard_confirm: "All unsaved changes will be lost. Do you want to continue?";
|
|
230
|
+
readonly discard_confirm_title: "Discard changes";
|
|
231
|
+
readonly discard_confirm_ok: "Discard";
|
|
232
|
+
readonly delete_block_confirm: "The block \"{{label}}\" contains {{count}} field(s), which will also be deleted.";
|
|
233
|
+
readonly delete_block_confirm_title: "Delete block";
|
|
234
|
+
readonly delete_block_confirm_ok: "Delete block";
|
|
235
|
+
readonly visibility_summary: "Visible if {{field}} {{operator}} {{value}}";
|
|
236
|
+
readonly yes: "Yes";
|
|
237
|
+
readonly no: "No";
|
|
238
|
+
readonly limits: {
|
|
239
|
+
readonly fields_reached: "The form already has the maximum of {{max}} fields";
|
|
240
|
+
readonly blocks_reached: "The maximum of {{max}} blocks has been reached";
|
|
241
|
+
readonly repeater_fields_reached: "The maximum of {{max}} sub-fields per repeater has been reached";
|
|
242
|
+
readonly import_exceeds: "The file exceeds the limits of this form: {{detail}}.";
|
|
243
|
+
readonly detail_blocks: "{{count}} blocks (maximum {{max}})";
|
|
244
|
+
readonly detail_fields: "{{count}} fields (maximum {{max}})";
|
|
245
|
+
readonly detail_repeater_fields: "a repeater with {{count}} sub-fields (maximum {{max}})";
|
|
246
|
+
};
|
|
247
|
+
readonly undo: {
|
|
248
|
+
readonly field_removed: "Field \"{{label}}\" deleted";
|
|
249
|
+
readonly subfield_removed: "Sub-field \"{{label}}\" deleted";
|
|
250
|
+
readonly block_removed: "Block \"{{label}}\" deleted";
|
|
251
|
+
readonly action: "Undo";
|
|
252
|
+
};
|
|
253
|
+
readonly field_picker: {
|
|
254
|
+
readonly search: "Search field type...";
|
|
255
|
+
readonly empty: "No field type matches your search";
|
|
256
|
+
readonly groups: {
|
|
257
|
+
readonly text: "Text";
|
|
258
|
+
readonly choice: "Choice";
|
|
259
|
+
readonly datetime: "Date & time";
|
|
260
|
+
readonly advanced: "Advanced";
|
|
261
|
+
readonly other: "Other";
|
|
262
|
+
};
|
|
263
|
+
};
|
|
193
264
|
readonly base: {
|
|
194
265
|
readonly name: "Key";
|
|
195
266
|
readonly required: "Required";
|
|
@@ -322,6 +393,9 @@ export declare const DICTIONARY_EN: {
|
|
|
322
393
|
readonly externalValidationKey_tip: "Key of the external validator to run on field blur";
|
|
323
394
|
};
|
|
324
395
|
readonly options_editor: {
|
|
396
|
+
readonly remove_option: "Remove option";
|
|
397
|
+
readonly no_options_read_only: "No options.";
|
|
398
|
+
readonly keyboard_hint: "Enter moves to the next option. You can paste a list (one option per line).";
|
|
325
399
|
readonly title: "Options";
|
|
326
400
|
readonly code_label: "Code";
|
|
327
401
|
readonly name_label: "Label";
|
|
@@ -344,6 +418,11 @@ export declare const DICTIONARY_EN: {
|
|
|
344
418
|
};
|
|
345
419
|
readonly field_editor: {
|
|
346
420
|
readonly dependency_title: "Dependency";
|
|
421
|
+
readonly dependency_empty: "Always visible. Add a relation to show it only when another field meets a condition.";
|
|
422
|
+
readonly and: "and";
|
|
423
|
+
readonly dependency_empty_read_only: "Always visible.";
|
|
424
|
+
readonly edit_rule: "Edit relation";
|
|
425
|
+
readonly configured_count: "{{count}} configured propert(ies)";
|
|
347
426
|
readonly dependency_description: "This field is shown only if all rules are met:";
|
|
348
427
|
readonly add_relation: "Add relation";
|
|
349
428
|
readonly remove_relation: "Remove relation";
|
|
@@ -387,6 +466,8 @@ export declare const DICTIONARY_EN: {
|
|
|
387
466
|
readonly repeater: {
|
|
388
467
|
readonly no_subfields: "No sub-fields yet. Add one below.";
|
|
389
468
|
readonly add_subfield: "Add sub-field";
|
|
469
|
+
readonly show_subfields: "Show sub-fields";
|
|
470
|
+
readonly hide_subfields: "Hide sub-fields";
|
|
390
471
|
};
|
|
391
472
|
readonly schema: {
|
|
392
473
|
readonly title_font_size: "Title size";
|
|
@@ -190,6 +190,77 @@ export declare const DICTIONARY_ES: {
|
|
|
190
190
|
readonly submit_form: "Guardar";
|
|
191
191
|
readonly select_field_to_edit: "Selecciona un campo para editar sus propiedades";
|
|
192
192
|
readonly no_fields: "Añade campos a tu formulario";
|
|
193
|
+
readonly no_fields_drop: "Agrega un campo o arrastra uno desde otro bloque";
|
|
194
|
+
readonly copy_label: "{{label}} (copia)";
|
|
195
|
+
readonly block: {
|
|
196
|
+
readonly drag: "Arrastra para reordenar el bloque";
|
|
197
|
+
readonly collapse: "Contraer bloque";
|
|
198
|
+
readonly expand: "Expandir bloque";
|
|
199
|
+
readonly field_count: "{{count}} campo(s)";
|
|
200
|
+
readonly empty_read_only: "Este bloque no tiene campos";
|
|
201
|
+
};
|
|
202
|
+
readonly properties: {
|
|
203
|
+
readonly title: "Propiedades";
|
|
204
|
+
readonly resize: "Arrastra para cambiar el ancho (doble clic para restablecer)";
|
|
205
|
+
readonly back_to_repeater: "Volver al repetidor";
|
|
206
|
+
readonly close: "Cerrar propiedades (Esc)";
|
|
207
|
+
};
|
|
208
|
+
readonly untitled_block: "Bloque {{index}}";
|
|
209
|
+
readonly unsaved_changes: "Cambios sin guardar";
|
|
210
|
+
readonly read_only: "Solo lectura";
|
|
211
|
+
readonly edit: "Editar";
|
|
212
|
+
readonly no_blocks: "Este formulario aún no tiene bloques";
|
|
213
|
+
readonly select_field_to_view: "Selecciona un campo para ver sus propiedades";
|
|
214
|
+
readonly menu: {
|
|
215
|
+
readonly more: "Más opciones";
|
|
216
|
+
readonly copy_json: "Copiar JSON";
|
|
217
|
+
readonly copied: "JSON copiado";
|
|
218
|
+
readonly load_json: "Cargar JSON";
|
|
219
|
+
readonly layout_title: "Diseño del formulario";
|
|
220
|
+
readonly columns: "Columnas";
|
|
221
|
+
readonly size: "Tamaño";
|
|
222
|
+
readonly margin: "Margen";
|
|
223
|
+
readonly title: "Título";
|
|
224
|
+
readonly subtitle: "Subtítulo";
|
|
225
|
+
readonly layout_hint: "Tamaños y márgenes en píxeles. Vacío usa el valor por defecto.";
|
|
226
|
+
};
|
|
227
|
+
readonly no_changes: "No hay cambios para guardar";
|
|
228
|
+
readonly discard_changes: "Descartar cambios";
|
|
229
|
+
readonly discard_confirm: "Se perderán todos los cambios que no has guardado. ¿Deseas continuar?";
|
|
230
|
+
readonly discard_confirm_title: "Descartar cambios";
|
|
231
|
+
readonly discard_confirm_ok: "Descartar";
|
|
232
|
+
readonly delete_block_confirm: "El bloque \"{{label}}\" contiene {{count}} campo(s), que también se eliminarán.";
|
|
233
|
+
readonly delete_block_confirm_title: "Eliminar bloque";
|
|
234
|
+
readonly delete_block_confirm_ok: "Eliminar bloque";
|
|
235
|
+
readonly visibility_summary: "Visible si {{field}} {{operator}} {{value}}";
|
|
236
|
+
readonly yes: "Sí";
|
|
237
|
+
readonly no: "No";
|
|
238
|
+
readonly limits: {
|
|
239
|
+
readonly fields_reached: "Se alcanzó el máximo de {{max}} campos del formulario";
|
|
240
|
+
readonly blocks_reached: "Se alcanzó el máximo de {{max}} bloques";
|
|
241
|
+
readonly repeater_fields_reached: "Se alcanzó el máximo de {{max}} sub-campos por repetidor";
|
|
242
|
+
readonly import_exceeds: "El archivo supera los límites de este formulario: {{detail}}.";
|
|
243
|
+
readonly detail_blocks: "{{count}} bloques (máximo {{max}})";
|
|
244
|
+
readonly detail_fields: "{{count}} campos (máximo {{max}})";
|
|
245
|
+
readonly detail_repeater_fields: "un repetidor con {{count}} sub-campos (máximo {{max}})";
|
|
246
|
+
};
|
|
247
|
+
readonly undo: {
|
|
248
|
+
readonly field_removed: "Campo \"{{label}}\" eliminado";
|
|
249
|
+
readonly subfield_removed: "Sub-campo \"{{label}}\" eliminado";
|
|
250
|
+
readonly block_removed: "Bloque \"{{label}}\" eliminado";
|
|
251
|
+
readonly action: "Deshacer";
|
|
252
|
+
};
|
|
253
|
+
readonly field_picker: {
|
|
254
|
+
readonly search: "Buscar tipo de campo...";
|
|
255
|
+
readonly empty: "Ningún tipo coincide con la búsqueda";
|
|
256
|
+
readonly groups: {
|
|
257
|
+
readonly text: "Texto";
|
|
258
|
+
readonly choice: "Selección";
|
|
259
|
+
readonly datetime: "Fecha y hora";
|
|
260
|
+
readonly advanced: "Avanzados";
|
|
261
|
+
readonly other: "Otros";
|
|
262
|
+
};
|
|
263
|
+
};
|
|
193
264
|
readonly base: {
|
|
194
265
|
readonly name: "Identificador";
|
|
195
266
|
readonly required: "Obligatorio";
|
|
@@ -322,6 +393,9 @@ export declare const DICTIONARY_ES: {
|
|
|
322
393
|
readonly externalValidationKey_tip: "Clave del validador externo a ejecutar al salir del campo";
|
|
323
394
|
};
|
|
324
395
|
readonly options_editor: {
|
|
396
|
+
readonly remove_option: "Eliminar opción";
|
|
397
|
+
readonly no_options_read_only: "Sin opciones.";
|
|
398
|
+
readonly keyboard_hint: "Enter pasa a la siguiente opción. Puedes pegar una lista (una opción por línea).";
|
|
325
399
|
readonly title: "Opciones";
|
|
326
400
|
readonly code_label: "Código";
|
|
327
401
|
readonly name_label: "Etiqueta";
|
|
@@ -344,6 +418,11 @@ export declare const DICTIONARY_ES: {
|
|
|
344
418
|
};
|
|
345
419
|
readonly field_editor: {
|
|
346
420
|
readonly dependency_title: "Dependencia";
|
|
421
|
+
readonly dependency_empty: "Siempre visible. Agrega una relación para mostrarlo solo cuando otro campo cumpla una condición.";
|
|
422
|
+
readonly and: "y";
|
|
423
|
+
readonly dependency_empty_read_only: "Siempre visible.";
|
|
424
|
+
readonly edit_rule: "Editar relación";
|
|
425
|
+
readonly configured_count: "{{count}} propiedad(es) configurada(s)";
|
|
347
426
|
readonly dependency_description: "Este campo solo se muestra si se cumplen todas las reglas:";
|
|
348
427
|
readonly add_relation: "Agregar relación";
|
|
349
428
|
readonly remove_relation: "Eliminar relación";
|
|
@@ -387,6 +466,8 @@ export declare const DICTIONARY_ES: {
|
|
|
387
466
|
readonly repeater: {
|
|
388
467
|
readonly no_subfields: "Sin sub-campos. Añade uno abajo.";
|
|
389
468
|
readonly add_subfield: "Agregar sub-campo";
|
|
469
|
+
readonly show_subfields: "Mostrar sub-campos";
|
|
470
|
+
readonly hide_subfields: "Ocultar sub-campos";
|
|
390
471
|
};
|
|
391
472
|
readonly schema: {
|
|
392
473
|
readonly title_font_size: "Tamaño título";
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui-core-abv",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": ">=19.2.0 <
|
|
6
|
-
"@angular/core": ">=19.2.0
|
|
7
|
-
"@angular/
|
|
8
|
-
"@angular/
|
|
5
|
+
"@angular/common": ">=19.2.0 <22.0.0",
|
|
6
|
+
"@angular/core": ">=19.2.0 <22.0.0",
|
|
7
|
+
"@angular/forms": ">=19.2.0 <22.0.0",
|
|
8
|
+
"@angular/cdk": ">=19.2.19 <22.0.0",
|
|
9
|
+
"@angular/animations": ">=19.2.14 <22.0.0",
|
|
9
10
|
"remixicon": "^4.6.0",
|
|
10
11
|
"xlsx": "^0.18.5"
|
|
11
12
|
},
|
package/public-api.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from './lib/animations/animatios.index';
|
|
|
44
44
|
export * from './lib/components/dynamic-form/form.models';
|
|
45
45
|
export * from './lib/components/dynamic-form/repeater/repeater.component';
|
|
46
46
|
export * from './lib/components/user-formbuilder/user-formbuilder.component';
|
|
47
|
+
export * from './lib/components/user-formbuilder/formbuilder.config';
|
|
47
48
|
export * from './lib/components/rule-builder/rule-builder.component';
|
|
48
49
|
export * from './lib/services/modal.service';
|
|
49
50
|
export * from './lib/services/modaRef';
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// ========== MODO OSCURO (opt-in) ==========
|
|
4
|
+
// La app lo importa después de los tokens; sin este archivo la librería se ve igual que siempre:
|
|
5
|
+
//
|
|
6
|
+
// @use 'ui-core-abv/src/lib/styles/tokens';
|
|
7
|
+
// @use 'ui-core-abv/src/lib/styles/dark';
|
|
8
|
+
//
|
|
9
|
+
// Se activa con data-theme="dark" en <html> o en cualquier ancestro. Una zona con
|
|
10
|
+
// data-theme="light" dentro de una oscura vuelve a verse clara. No mira prefers-color-scheme:
|
|
11
|
+
// decidir el tema es cosa de la app.
|
|
12
|
+
//
|
|
13
|
+
// Los valores se pueden cambiar sin copiar el archivo:
|
|
14
|
+
//
|
|
15
|
+
// @use 'ui-core-abv/src/lib/styles/dark' with (
|
|
16
|
+
// $uic-dark-overrides: (surface: #10131a, text: #ffffff),
|
|
17
|
+
// );
|
|
18
|
+
//
|
|
19
|
+
// Cómo funciona: los componentes usan los tokens siempre con su valor de siempre como fallback,
|
|
20
|
+
// p. ej. var(--uic-surface, var(--white)) o var(--uic-neutral-300, var(--grey-300)). En claro
|
|
21
|
+
// los tokens no están definidos y gana el fallback; aquí se definen solo para el modo oscuro.
|
|
22
|
+
// Los --uic-* que la app ya sobrescribe (--uic-input-bg, --uic-label-color...) siguen ganando,
|
|
23
|
+
// porque caen a estos tokens solo cuando no están definidos.
|
|
24
|
+
|
|
25
|
+
// Escala neutral: reemplaza a --grey-N dentro de los componentes. Va invertida (el 50, que en
|
|
26
|
+
// claro es un fondo casi blanco, aquí es un fondo oscuro; el 950, texto principal, es casi blanco).
|
|
27
|
+
$uic-dark-neutral: (
|
|
28
|
+
25: #12151c,
|
|
29
|
+
50: #1d222d,
|
|
30
|
+
100: #232937,
|
|
31
|
+
200: #2a3140,
|
|
32
|
+
300: #353d4d,
|
|
33
|
+
400: #7d8696,
|
|
34
|
+
500: #9aa3b2,
|
|
35
|
+
600: #b4bcc8,
|
|
36
|
+
700: #c9cfd8,
|
|
37
|
+
800: #dde1e7,
|
|
38
|
+
900: #eaedf2,
|
|
39
|
+
950: #f2f4f8
|
|
40
|
+
) !default;
|
|
41
|
+
|
|
42
|
+
$uic-dark-tokens: (
|
|
43
|
+
surface: #161a23,
|
|
44
|
+
surface-raised: #1d222d,
|
|
45
|
+
surface-hover: #1d222d,
|
|
46
|
+
text: #f2f4f8,
|
|
47
|
+
text-muted: #9aa3b2,
|
|
48
|
+
border: #262c39,
|
|
49
|
+
border-strong: #353d4d,
|
|
50
|
+
on-primary: #ffffff,
|
|
51
|
+
inverse-bg: #f2f4f8,
|
|
52
|
+
inverse-text: #111214,
|
|
53
|
+
backdrop: rgba(0, 0, 0, 0.6),
|
|
54
|
+
shadow-sm: (0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4)),
|
|
55
|
+
shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55),
|
|
56
|
+
shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65),
|
|
57
|
+
preview-label-color: var(--yellow-800),
|
|
58
|
+
) !default;
|
|
59
|
+
|
|
60
|
+
$uic-dark-overrides: () !default;
|
|
61
|
+
|
|
62
|
+
$_tokens: map.merge($uic-dark-tokens, $uic-dark-overrides);
|
|
63
|
+
|
|
64
|
+
// Tokens globales de _tokens.scss que se resuelven con --grey-* en :root.
|
|
65
|
+
$_light-context-tokens: (
|
|
66
|
+
table-header-background: var(--grey-200),
|
|
67
|
+
table-header-color: var(--grey-900),
|
|
68
|
+
table-border-color: var(--grey-300),
|
|
69
|
+
table-hover: var(--grey-50),
|
|
70
|
+
disabled-color: var(--grey-700),
|
|
71
|
+
disabled-color-placeholder: var(--grey-300),
|
|
72
|
+
disabled-background: var(--grey-200),
|
|
73
|
+
);
|
|
74
|
+
$_dark-context-tokens: (
|
|
75
|
+
table-header-background: map.get($uic-dark-neutral, 200),
|
|
76
|
+
table-header-color: map.get($uic-dark-neutral, 900),
|
|
77
|
+
table-border-color: map.get($uic-dark-neutral, 300),
|
|
78
|
+
table-hover: map.get($uic-dark-neutral, 50),
|
|
79
|
+
disabled-color: map.get($uic-dark-neutral, 500),
|
|
80
|
+
disabled-color-placeholder: map.get($uic-dark-neutral, 400),
|
|
81
|
+
disabled-background: map.get($uic-dark-neutral, 100),
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
[data-theme='dark'] {
|
|
85
|
+
color-scheme: dark;
|
|
86
|
+
|
|
87
|
+
@each $shade, $color in $uic-dark-neutral {
|
|
88
|
+
--uic-neutral-#{$shade}: #{$color};
|
|
89
|
+
}
|
|
90
|
+
@each $name, $value in $_tokens {
|
|
91
|
+
--uic-#{$name}: #{$value};
|
|
92
|
+
}
|
|
93
|
+
@each $name, $value in $_dark-context-tokens {
|
|
94
|
+
--#{$name}: #{$value};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Zona clara dentro de una oscura: los tokens vuelven a "no definidos" (initial) para que gane el
|
|
99
|
+
// fallback de cada componente, y los de _tokens.scss recuperan su valor claro. Con :where() la
|
|
100
|
+
// especificidad es 0: si la app sobrescribe esos tokens en :root, su valor sigue ganando.
|
|
101
|
+
:where([data-theme='light']) {
|
|
102
|
+
color-scheme: light;
|
|
103
|
+
|
|
104
|
+
@each $shade, $color in $uic-dark-neutral {
|
|
105
|
+
--uic-neutral-#{$shade}: initial;
|
|
106
|
+
}
|
|
107
|
+
@each $name, $value in $_tokens {
|
|
108
|
+
--uic-#{$name}: initial;
|
|
109
|
+
}
|
|
110
|
+
@each $name, $value in $_light-context-tokens {
|
|
111
|
+
--#{$name}: #{$value};
|
|
112
|
+
}
|
|
113
|
+
}
|