{% extends 'base.html.twig' %} {% block title %}Data Row - Design System - Bubul{% endblock %} {% block body %}
Molécules /

Data Row

Affichage standardisé de paires label:valeur

{# ===== USAGE ===== #}

Usage

{% verbatim %}{% include '_molecules/data-row/data-row.html.twig' with {
    label: 'Email',
    value: 'john@example.com',
    icon: 'mail'
} %}{% endverbatim %}
{# ===== APERÇU ===== #}

Aperçu

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Email', value: 'john@example.com', icon: 'mail' } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Téléphone', value: '+33 6 12 34 56 78', icon: 'phone' } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Statut', value: 'Actif' } %}
{# ===== LAYOUTS ===== #}

Layouts

Paramètre : layout

inline (défaut)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Entreprise', value: 'Bubul SAS', layout: 'inline' } %}

stacked (vertical)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Description', value: 'Une description plus longue qui peut s\'étendre sur plusieurs lignes si nécessaire.', layout: 'stacked' } %}
{# ===== TAILLES ===== #}

Tailles

Paramètre : size

sm

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Nom', value: 'Jean Dupont', size: 'sm' } %}

md (défaut)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Nom', value: 'Jean Dupont', size: 'md' } %}

lg

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Nom', value: 'Jean Dupont', size: 'lg' } %}
{# ===== COULEUR DE VALEUR ===== #}

Couleur de valeur

Paramètre : valueColor

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Statut', value: 'Actif', valueColor: 'success' } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Erreurs', value: '3 erreurs détectées', valueColor: 'error' } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Avertissement', value: 'Expiration proche', valueColor: 'warning' } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Plan', value: 'Premium', valueColor: 'primary' } %}
{# ===== AVEC TAG ===== #}

Avec Tag

Paramètre : tag (remplace value)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Rôle', tag: { label: 'Admin', color: 'primary' } } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Statut', tag: { label: 'Actif', color: 'success' } } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Produit', tag: { label: 'Moodia', color: 'moodia', icon: 'book' } } %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Abonnement', tag: { label: 'Expiré', color: 'error' } } %}
{# ===== VALEUR VIDE ===== #}

Valeur vide

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Site web', value: null } %}
{# ===== ÉTAT COMPLÉTÉ ===== #}

État complété

Paramètre : completed — Affiche une icône de statut

{% verbatim %}{% include '_molecules/data-row/data-row.html.twig' with {
    label: 'Configuration API',
    completed: true
} %}{% endverbatim %}

completed: true (check vert)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Configuration email', completed: true } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Connexion Moodle', completed: true } %}

completed: false (horloge grise)

{% include '_molecules/data-row/data-row.html.twig' with { label: 'Vérification identité', completed: false } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Configuration paiement', completed: false } %}
{# ===== AVEC ACTION ===== #}

Avec action

Paramètre : action — Affiche un lien au lieu de la valeur

{% verbatim %}{% include '_molecules/data-row/data-row.html.twig' with {
    label: 'Connexion Moodle',
    action: { label: 'Configurer', href: '/settings/moodle' }
} %}{% endverbatim %}
{% include '_molecules/data-row/data-row.html.twig' with { label: 'Connexion API', action: { label: 'Configurer', href: '#' } } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Documentation', action: { label: 'Voir la documentation', href: '#' } } %} {% include '_molecules/data-row/data-row.html.twig' with { label: 'Abonnement', action: { label: 'Mettre à niveau', href: '#' } } %}

Note : L'action n'est pas affichée si completed: true

{# ===== PARAMÈTRES ===== #}

Paramètres

Paramètre Type Défaut Description
labelstring(requis)Libellé du champ
valuestringnullValeur à afficher
valueColorstringnullprimary, success, error, warning, info, muted
tagobjectnullTag {label, color, icon} au lieu de value
iconstringnullIcône avant le label
completedboolnullÉtat complété (icône check/horloge)
actionobjectnullLien d'action {label, href}
sizestringmdsm, md, lg
layoutstringinlineinline, stacked
labelWidthstringnullLargeur fixe du label (ex: '120px')
truncateboolfalseTronquer la valeur si trop longue
copyableboolfalseAfficher bouton copier
classstring''Classes CSS additionnelles
{% endblock %}