Description-list

Mostrar parámetros

Parámetros del componente

              params:
- name: items
  type: array
  required: true
  description: Array of term/definition pairs.
  params:
  - name: term
    type: object
    required: true
    description: term in dt.
    - name: text
      type: string
      required: true
      description: If `html` is set, this is not required. Text to use within each dt item. If `html` is provided, the `text` argument will be ignored.
    - name: html
      type: string
      required: true
      description: If `text` is set, this is not required. HTML to use within each dt item. If `html` is provided, the `text` argument will be ignored.
    - name: classes
      type: string
      required: false
      description: Classes to add to the dt.
    - name: attributes
      type: object
      required: false
      description: HTML attributes (for example data attributes) to add to the dt.
  - name: definition
    type: object
    required: true
    description: definition in dd.
    - name: text
      type: string
      required: true
      description: If `html` is set, this is not required. Text to use within each dd item. If `html` is provided, the `text` argument will be ignored.
    - name: html
      type: string
      required: true
      description: If `text` is set, this is not required. HTML to use within each dd item. If `html` is provided, the `text` argument will be ignored.
    - name: classes
      type: string
      required: false
      description: Classes to add to the dd.
    - name: attributes
      type: object
      required: false
      description: HTML attributes (for example data attributes) to add to the dd.
  - name: classes
    type: string
    required: false
    description: Classes to add to a div container that contain the dt/dd pair.
  - name: attributes
    type: object
    required: false
    description: HTML attributes (for example data attributes) to add to a div container that contain the dt/dd pair.
- name: classes
  type: string
  required: false
  description: Classes to add to the checkboxes container.
- name: attributes
  type: object
  required: false
  description: HTML attributes (for example data attributes) to add to the nav tag.
              
            

Por defecto

término
definición
Mostrar códigodel ejemplo: Por defecto

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      }
    }
  ]
}) }}

Grande

término
definición
Mostrar códigodel ejemplo: Grande

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición",
        "classes": "text-lg"
      }
    }
  ]
}) }}

Extra grande

término
definición
Mostrar códigodel ejemplo: Extra grande

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición",
        "classes": "font-bold text-xl"
      }
    }
  ]
}) }}

Vertical

término
definición
término
definición
término
definición
Mostrar códigodel ejemplo: Vertical

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "mb-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "mb-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "mb-base"
    }
  ]
}) }}

Horizontal

término
definición
término
definición
término
definición
Mostrar códigodel ejemplo: Horizontal

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "classes": "flex w-full",
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "flex-1 pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "flex-1 pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "flex-1 pr-base"
    }
  ]
}) }}

Horizontal con 2 filas

término
definición
término
definición
término
definición
término
definición
término
definición
término
definición
Mostrar códigodel ejemplo: Horizontal con 2 filas

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "classes": "flex flex-wrap w-full",
  "items": [
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    },
    {
      "term": {
        "text": "término"
      },
      "definition": {
        "text": "definición"
      },
      "classes": "w-1/3 mb-base pr-base"
    }
  ]
}) }}

Agrupado

Código de procedimiento
G00345-BX
Nombre del procedimiento
Resolución definitiva
CSV
CSVK45WT8V5T110CPPC
Fecha de captura
13 de Diciembre de 2021. A las 11:48:08
Categoría
Documento simple
Mostrar códigodel ejemplo: Agrupado

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "classes": "w-full py-sm border-t border-b border-neutral-base",
  "items": [
    {
      "term": {
        "text": "Código de procedimiento",
        "classes": "lg:w-1/3"
      },
      "definition": {
        "text": "G00345-BX",
        "classes": "lg:flex-1 font-semibold"
      },
      "classes": "lg:flex py-sm"
    },
    {
      "term": {
        "text": "Nombre del procedimiento",
        "classes": "lg:w-1/3"
      },
      "definition": {
        "text": "Resolución definitiva",
        "classes": "lg:flex-1 font-semibold"
      },
      "classes": "lg:flex py-sm"
    },
    {
      "term": {
        "text": "CSV",
        "classes": "lg:w-1/3"
      },
      "definition": {
        "text": "CSVK45WT8V5T110CPPC",
        "classes": "lg:flex-1 font-semibold"
      },
      "classes": "lg:flex py-sm"
    },
    {
      "term": {
        "text": "Fecha de captura",
        "classes": "lg:w-1/3"
      },
      "definition": {
        "text": "13 de Diciembre de 2021. A las 11:48:08",
        "classes": "lg:flex-1 font-semibold"
      },
      "classes": "lg:flex py-sm"
    },
    {
      "term": {
        "text": "Categoría",
        "classes": "lg:w-1/3"
      },
      "definition": {
        "text": "Documento simple",
        "classes": "lg:flex-1 font-semibold"
      },
      "classes": "lg:flex py-sm"
    }
  ]
}) }}

Con apariencia de tabla

Nombre y apellidos
Ana Pérez Escribano
Nº identificación
NIF: 00000000T
Importe
45,5€
Impuesto
Impuesto sobre Sucesiones y donaciones
Concepto
Modelo 606 - Liquidaciones Transmisiones Patrimoniales Onerosas.
Número de justificante
6064589854125
Mostrar códigodel ejemplo: Con apariencia de tabla

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "classes": "w-full",
  "items": [
    {
      "term": {
        "text": "Nombre y apellidos",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "Ana Pérez Escribano",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Nº identificación",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "NIF: 00000000T",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Importe",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "html": "<strong>45,5€</strong>",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Impuesto",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "Impuesto sobre Sucesiones y donaciones",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Concepto",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "Modelo 606 - Liquidaciones Transmisiones Patrimoniales Onerosas.",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Número de justificante",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "6064589854125",
        "classes": "lg:w-2/3 px-base py-sm"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    }
  ]
}) }}

Con apariencia de tabla y números

Activo no corriente
3045,45€
Activo corriente
14,32€
Total activo
279,67€
Capital
100.704,23€
Patrimonio neto
2.345,74€
Consolidación de cuentas
Si
Mostrar códigodel ejemplo: Con apariencia de tabla y números

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "classes": "w-full",
  "items": [
    {
      "term": {
        "text": "Activo no corriente",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "3045,45€",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Activo corriente",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "14,32€",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Total activo",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "279,67€",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Capital",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "100.704,23€",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Patrimonio neto",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "text": "2.345,74€",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    },
    {
      "term": {
        "text": "Consolidación de cuentas",
        "classes": "lg:w-1/3 px-base pt-sm lg:pb-sm text-sm lg:text-base text-neutral-dark"
      },
      "definition": {
        "html": "<strong>Si</strong>",
        "classes": "lg:w-2/3 px-base py-sm lg:text-right"
      },
      "classes": "lg:flex -mb-px border-t border-b border-neutral-base"
    }
  ]
}) }}

Con html y clases

Expedientes abiertos ↓
45 Ver todos
Mostrar códigodel ejemplo: Con html y clases

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "html": "Expedientes abiertos &darr;",
        "classes": "mb-sm"
      },
      "definition": {
        "html": "<span class=\"font-bold text-4xl\">45</span> <svg class=\"inline-block align-baseline ml-sm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1.6rem\" height=\"1.6rem\"><path d=\"M140 20a20 20 0 00-20-20H20A20 20 0 000 20v100a20 20 0 0020 20h70a10 10 0 007.07-2.93l40-40A10 10 0 00140 90zM20 22.5a2.5 2.5 0 012.5-2.5h95a2.5 2.5 0 012.5 2.5v55a2.5 2.5 0 01-2.5 2.5H95a15 15 0 00-15 15v22.5a2.5 2.5 0 01-2.5 2.5h-55a2.5 2.5 0 01-2.5-2.5z\"/></svg><a href=\"/\" class=\"c-link block mt-sm font-normal text-sm\">Ver todos</a>"
      }
    }
  ],
  "classes": "inline-block p-base border border-neutral-base rounded"
}) }}

Con atributos

Muestra el código para ver cómo se aplican los atributos

término
definición
Mostrar códigodel ejemplo: Con atributos

Contenido

Nunjucks macro

{% from "components/description-list/_macro.description-list.njk" import componentDescriptionList %}

{{ componentDescriptionList({
  "items": [
    {
      "term": {
        "text": "término",
        "attributes": {
          "id": "term"
        }
      },
      "definition": {
        "text": "definición",
        "attributes": {
          "id": "definition"
        }
      },
      "attributes": {
        "id": "item"
      }
    }
  ],
  "attributes": {
    "id": "description"
  }
}) }}