Adds a shared bulma_variants.py (color/size option lists) and expands BULMA_*_CONTROLS in bulma_controls.py to cover each component's full modifier set: Bouton (colour incl. white/light/dark/black/text, light-shade toggle, size, rounded, outlined, inverted, static, loading, fullwidth), Titre (Bulma size is-1..is-6 independent of heading level, is-spaced), Jauge (size), Tableau (bordered/fullwidth/striped/hoverable/narrow, now toggleable instead of hardcoded), Onglets (alignment, boxed/toggle/toggle-rounded style, size, fullwidth), and every form field — champ_texte/email/mot_de_passe, zone_texte, liste_deroulante (colour, size, rounded, static). render_select.py/render_onglets.py/render_jauge.py now redirect the merged "class" from _visible_attrs to the actual Bulma sub-element (the .select wrapper, the .tabs div, the <progress> tag) instead of the outer positioning wrapper, since that's what needs to carry the modifier classes. Also fixed a real latent bug found while wiring this up: a checkbox control with default=True (e.g. Tableau's "Première ligne = en-tête") was never actually applied on a freshly created element — default_style_and_attributes unconditionally skipped ALL checkbox types at creation, so the panel showed it checked while the element itself had nothing set. Now a checkbox's default=True is frozen at creation like any other meaningful default; default=False (the common case) is unaffected. Verified end to end: every widget's variant controls save and render the right class tokens (spot-checked titre/tableau/onglets/champ_texte/liste_deroulante/jauge), full suite green (89 passed).
15 lines
744 B
Python
15 lines
744 B
Python
# Listes de modificateurs Bulma (https://bulma.io) réutilisées par plusieurs
|
|
# widgets pour construire leurs réglages "class:xxx" (voir
|
|
# control_groups/bulma_controls.py et save_element_controls.py) — un seul
|
|
# endroit à mettre à jour si Bulma change de version/palette.
|
|
BULMA_COLOR_OPTIONS = [
|
|
("", "Aucune (couleur par défaut)"),
|
|
("is-primary", "Primaire"), ("is-link", "Lien"), ("is-info", "Info"),
|
|
("is-success", "Succès"), ("is-warning", "Attention"), ("is-danger", "Danger"),
|
|
("is-white", "Blanc"), ("is-light", "Clair"), ("is-dark", "Sombre"), ("is-black", "Noir"), ("is-text", "Texte"),
|
|
]
|
|
|
|
BULMA_SIZE_OPTIONS = [
|
|
("", "Normale"), ("is-small", "Petite"), ("is-medium", "Moyenne"), ("is-large", "Grande"),
|
|
]
|