diff --git a/nuxt4/app/components/cata/SelectorFamilia.vue b/nuxt4/app/components/cata/SelectorFamilia.vue index 6ff95dd..f6fad5f 100644 --- a/nuxt4/app/components/cata/SelectorFamilia.vue +++ b/nuxt4/app/components/cata/SelectorFamilia.vue @@ -25,7 +25,13 @@ :disabled="disabled" @click="toggleCategoria(categoria)" > - {{ categoria }} +
+ + {{ categoria }} +
- - -
-

Selección actual:

-

- Categorías: {{ modelValue.categorias.join(', ') }} -

-

- Subcategorías: {{ modelValue.subcategorias.join(', ') }} -

-

- Nota: {{ modelValue.notaEspecifica }} -

-
@@ -129,6 +121,19 @@ const notaPlaceholder = computed(() => { : 'Ej: Fresa, Chocolate, Canela...' }) +// Mapeo de iconos para cada categoría +const categoriaIconos: Record = { + Floral: 'i-lucide-flower-2', + Afrutado: 'i-lucide-apple', + 'Ácido/Fermentado': 'i-lucide-flask-conical', + 'Verde Vegetal': 'i-lucide-leaf', + Otro: 'i-lucide-circle-help', + Tostado: 'i-lucide-flame', + 'Nueces/Cacao': 'i-lucide-shell', + Especias: 'i-lucide-sparkles', + Dulce: 'i-lucide-candy', +} + // Categorías principales disponibles const categoriasDisponibles = computed(() => { return Object.keys(FAMILIAS_NOTAS_ESTRUCTURA) as CategoriaNotaPrincipal[] @@ -153,11 +158,6 @@ const subcategoriasDisponibles = computed(() => { return Array.from(subcategoriasSet).sort() }) -// Verifica si la selección está completa -const seleccionCompleta = computed(() => { - return props.modelValue.categorias.length > 0 -}) - // Toggle categoría (agregar o quitar) const toggleCategoria = (categoria: CategoriaNotaPrincipal) => { if (props.disabled) return @@ -288,10 +288,28 @@ watch(() => props.modelValue.notaEspecifica, (newVal) => { box-shadow: 0 0 0 2px var(--cata-primary); } +.categoria-content { + display: flex; + align-items: center; + gap: 0.5rem; + flex: 1 1 0%; +} + +.categoria-icon { + width: 1.25rem; + height: 1.25rem; + flex-shrink: 0; + opacity: 0.75; +} + +.categoria-item.cata-checkbox-checked .categoria-icon { + opacity: 1; + color: var(--cata-primary); +} + .categoria-text { font-size: 0.875rem; font-weight: 500; - flex: 1 1 0%; text-align: left; } @@ -369,6 +387,15 @@ watch(() => props.modelValue.notaEspecifica, (newVal) => { padding: 0.625rem; } + .categoria-content { + gap: 0.375rem; + } + + .categoria-icon { + width: 1rem; + height: 1rem; + } + .categoria-text { font-size: 0.75rem; }