# Ejemplo de código de Tabla. DESY. Sistema de diseño del Gobierno de Aragón. ## Componentes Índice de páginas Componentes # Tabla Datos Componente para ordenar valores relacionados en filas y columnas. # Treegrid Mostrar parámetros ## Parámetros Nunjucks del componente: "Treegrid" ```yaml params: - name: rows type: object required: true description: table rows in treegrid. params: - name: level type: integer required: false description: Specify the hierarchical level of the row. Level 1 is the top level. This will add the appropriate aria-level attribute to the row. - name: posinset type: integer required: false description: Specify the position of the row within its current level, starting at 1. This will add the appropriate aria-posinset attribute to the row. - name: setsize type: integer required: false description: Specify the number of rows within the current level. This will add the appropriate aria-setsize attribute to the row. - name: expanded type: boolean required: false description: If true, row sub will be expanded. - name: cells type: array required: false description: Provide cells for the row. params: - name: text type: string required: true description: If `html` is set, this is not required. Text for cells in table rows. 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 for cells in table rows. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table row. - name: head type: array required: false description: Array of table head cells. params: - name: text type: string required: false description: If `html` is set, this is not required. Text for table head cells. If `html` is provided, the `text` argument will be ignored. - name: html type: string required: false description: If `text` is set, this is not required. HTML for table head cells. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table head cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: foot type: array required: false description: Array of table tfoot cells. params: - name: text type: string required: false description: If `html` is set, this is not required. Text for table tfoot cells. If `html` is provided, the `text` argument will be ignored. - name: html type: string required: false description: If `text` is set, this is not required. HTML for table tfoot cells. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table tfoot cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: caption type: string required: false description: Caption text - name: captionClasses type: string required: false description: Classes for caption text size. Classes should correspond to the available typography heading classes. - name: firstCellIsHeader type: boolean required: false description: If set to true, first cell in table row will be a TH instead of a TD. - name: wrapper type: object required: false description: Options for a wrapper div outside the table params: - name: classes type: string required: false description: Classes to add to the wrapper (e.g. to show an horizontal scrollbar it there are many columns or in mobile) - name: attributes type: object required: false description: HTML attributes to add to the wrapper div. For accessibility it needs tabindex=0, role=section and aria-label or aria-labelledby. - name: classes type: string required: false description: Classes to add to the table container. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table container. accessibilityCriteria: | ## Las tablas deben: 1. Debe tener al menos una celda de encabezado (TH) en las filas o columnas exteriores. 2. Si la tabla tiene más de un nivel de encabezado (si hay elementos th en dos filas o en dos columnas) las celdas de datos y de encabezado deben estar asociadas con los atributos id (en los th) /headers (en los td). 3. El título de la tabla debe estar marcado como
| Documento | Importe | Fecha | Acciones |
|---|---|---|---|
| A0001 | 3.000,00€ | 05/01/2024 | Ver |
| A0001-1 | 1.000,00€ | 05/01/2024 | Ver |
| A0001-2 | 2.000,00€ | 05/01/2024 | Ver |
| A0001-2-1 | 1.000,00€ | 05/01/2024 | Ver |
| A0001-3 | 2.000,00€ | 05/01/2024 | Ver |
| A0001-3-1 | 5.000,00€ | 15/01/2024 | Ver |
| A0001-3-1-1 | 95€ | 15/01/2024 | Ver |
| A0001-3-1-2 | 5.000,00€ | 15/01/2024 | Ver |
| Documento | Importe | Fecha | Acciones |
|---|---|---|---|
| B0001 | 3.000,00€ | 05/01/2024 | Ver |
| B0001-1 | 1.000,00€ | 05/01/2024 | Ver |
| B0001-2 | 2.000,00€ | 05/01/2024 | Ver |
| B0001-2-1 | 1.000,00€ | 05/01/2024 | Ver |
| B0001-3 | 2.000,00€ | 05/01/2024 | Ver |
| B0001-3-1 | 5.000,00€ | 15/01/2024 | Ver |
| B0001-3-1-1 | 95€ | 15/01/2024 | Ver |
| B0001-3-1-2 | 5.000,00€ | 15/01/2024 | Ver |
| Suma | 10.045€ |
| Documento | Importe | Fecha | Acciones |
|---|---|---|---|
| C0001 | 3.000,00€ | 05/01/2024 | Ver |
| C0001-1 | 1.000,00€ | 05/01/2024 | Ver |
| C0001-2 | 2.000,00€ | 05/01/2024 | Ver |
| C0001-2-1 | 1.000,00€ | 05/01/2024 | Ver |
| C0001-3 | 2.000,00€ | 05/01/2024 | Ver |
| C0001-3-1 | 5.000,00€ | 15/01/2024 | Ver |
| C0001-3-1-1 | 95€ | 15/01/2024 | Ver |
| C0001-3-1-2 | 5.000,00€ | 15/01/2024 | Ver |
| Documento | Importe | Fecha | Acciones |
|---|---|---|---|
| E0001 | 3.000,00€ | 05/01/2024 | Ver |
| E0001-1 | 1.000,00€ | 05/01/2024 | Ver |
| E0001-2 | 2.000,00€ | 05/01/2024 | Ver |
| E0001-2-1 | 1.000,00€ | 05/01/2024 | Ver |
| E0001-3 | 2.000,00€ | 05/01/2024 | Ver |
| E0001-3-1 | 5.000,00€ | 15/01/2024 | Ver |
| E0001-3-1-1 | 95€ | 15/01/2024 | Ver |
| E0001-3-1-2 | 5.000,00€ | 15/01/2024 | Ver |
| Documento | Importe | Fecha | Acciones |
|---|---|---|---|
| F0001 | 100 € | 01/01/2024 | Ver |
| F0001-1 | 200 € | 02/01/2024 | Ver |
| F0001-1-1 | 300 € | 03/01/2024 | Ver |
| F0001-1-1-1 | 400 € | 04/01/2024 | Ver |
| F0001-1-1-1-1 | 500 € | 05/01/2024 | Ver |
| F0001-1-1-1-1-1 | 600 € | 06/01/2024 | Ver |
| F0001-1-1-1-1-1-1 | 700 € | 07/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1 | 800 € | 08/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1 | 900 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1 | 1000 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1-1 | 1100 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1-1-1 | 1200 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1-1-1-1 | 1300 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1-1-1-1-1 | 1400 € | 09/01/2024 | Ver |
| F0001-1-1-1-1-1-1-1-1-1-1-1-1-1-1 | 1500 € | 09/01/2024 | Ver |
| F0002 | 3.000,00€ | 05/01/2024 | Ver |
| F0002-1 | 1.000,00€ | 05/01/2024 | Ver |
| F0002-2 | 2.000,00€ | 05/01/2024 | Ver |
| F0002-2-1 | 1.000,00€ | 05/01/2024 | Ver |
| F0002-3 | 2.000,00€ | 05/01/2024 | Ver |
| F0002-3-1 | 5.000,00€ | 15/01/2024 | Ver |
| F0002-3-1-1 | 95€ | 15/01/2024 | Ver |
| F0002-3-1-2 | 5.000,00€ | 15/01/2024 | Ver |