Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1.0.x
  • 1.1.x
  • 1.0.0
  • 1.0.0-beta1
  • 1.0.0-beta2
  • 1.0.0-beta3
  • 1.0.0-beta4
  • 1.0.0-beta5
  • 1.0.0-beta6
  • 1.0.0-beta7
  • 1.0.0-rc1
  • 1.0.0-rc2
  • 1.0.0-rc3
  • 1.0.1
  • 1.0.2
  • 1.0.3
  • 1.1.0
  • 1.1.0-alpha1
  • 1.1.0-alpha2
  • 1.1.0-alpha3
  • 1.1.0-beta1
  • 1.1.0-beta2
  • 1.1.0-beta3
  • 1.1.0-beta4
  • 1.1.0-beta5
  • 1.1.0-beta6
  • 1.1.0-rc1
27 results

Target

Select target project
  • project/ui_suite_dsfr
  • issue/ui_suite_dsfr-3355340
  • issue/ui_suite_dsfr-3340066
  • issue/ui_suite_dsfr-3370615
  • issue/ui_suite_dsfr-3340244
  • issue/ui_suite_dsfr-3401086
  • issue/ui_suite_dsfr-3380233
  • issue/ui_suite_dsfr-3346124
  • issue/ui_suite_dsfr-3401087
  • issue/ui_suite_dsfr-3381502
  • issue/ui_suite_dsfr-3381515
  • issue/ui_suite_dsfr-3381728
  • issue/ui_suite_dsfr-3381730
  • issue/ui_suite_dsfr-3381736
  • issue/ui_suite_dsfr-3381843
  • issue/ui_suite_dsfr-3381854
  • issue/ui_suite_dsfr-3381860
  • issue/ui_suite_dsfr-3381866
  • issue/ui_suite_dsfr-3381922
  • issue/ui_suite_dsfr-3381923
  • issue/ui_suite_dsfr-3381963
  • issue/ui_suite_dsfr-3382642
  • issue/ui_suite_dsfr-3382890
  • issue/ui_suite_dsfr-3382940
  • issue/ui_suite_dsfr-3383175
  • issue/ui_suite_dsfr-3383395
  • issue/ui_suite_dsfr-3383450
  • issue/ui_suite_dsfr-3383724
  • issue/ui_suite_dsfr-3385558
  • issue/ui_suite_dsfr-3340340
  • issue/ui_suite_dsfr-3341122
  • issue/ui_suite_dsfr-3390179
  • issue/ui_suite_dsfr-3390145
  • issue/ui_suite_dsfr-3390173
  • issue/ui_suite_dsfr-3391599
  • issue/ui_suite_dsfr-3390160
  • issue/ui_suite_dsfr-3390166
  • issue/ui_suite_dsfr-3390190
  • issue/ui_suite_dsfr-3392579
  • issue/ui_suite_dsfr-3393343
  • issue/ui_suite_dsfr-3392854
  • issue/ui_suite_dsfr-3394607
  • issue/ui_suite_dsfr-3390210
  • issue/ui_suite_dsfr-3396955
  • issue/ui_suite_dsfr-3396957
  • issue/ui_suite_dsfr-3398359
  • issue/ui_suite_dsfr-3398437
  • issue/ui_suite_dsfr-3405034
  • issue/ui_suite_dsfr-3409067
  • issue/ui_suite_dsfr-3409090
  • issue/ui_suite_dsfr-3445146
  • issue/ui_suite_dsfr-3444910
  • issue/ui_suite_dsfr-3436996
  • issue/ui_suite_dsfr-3414096
  • issue/ui_suite_dsfr-3419042
  • issue/ui_suite_dsfr-3419125
  • issue/ui_suite_dsfr-3417519
  • issue/ui_suite_dsfr-3422665
  • issue/ui_suite_dsfr-3437546
  • issue/ui_suite_dsfr-3435831
  • issue/ui_suite_dsfr-3436994
  • issue/ui_suite_dsfr-3436995
  • issue/ui_suite_dsfr-3439118
  • issue/ui_suite_dsfr-3444903
  • issue/ui_suite_dsfr-3445147
  • issue/ui_suite_dsfr-3441305
  • issue/ui_suite_dsfr-3441191
  • issue/ui_suite_dsfr-3444191
  • issue/ui_suite_dsfr-3441790
  • issue/ui_suite_dsfr-3442458
  • issue/ui_suite_dsfr-3439160
  • issue/ui_suite_dsfr-3432719
  • issue/ui_suite_dsfr-3432734
  • issue/ui_suite_dsfr-3432748
  • issue/ui_suite_dsfr-3432796
  • issue/ui_suite_dsfr-3405205
  • issue/ui_suite_dsfr-3390189
  • issue/ui_suite_dsfr-3448313
  • issue/ui_suite_dsfr-3449343
  • issue/ui_suite_dsfr-3449679
  • issue/ui_suite_dsfr-3450554
  • issue/ui_suite_dsfr-3450577
  • issue/ui_suite_dsfr-3453169
  • issue/ui_suite_dsfr-3454417
  • issue/ui_suite_dsfr-3459306
  • issue/ui_suite_dsfr-3459313
  • issue/ui_suite_dsfr-3459318
  • issue/ui_suite_dsfr-3459319
  • issue/ui_suite_dsfr-3459321
  • issue/ui_suite_dsfr-3459505
  • issue/ui_suite_dsfr-3459944
  • issue/ui_suite_dsfr-3459948
  • issue/ui_suite_dsfr-3460147
  • issue/ui_suite_dsfr-3390174
  • issue/ui_suite_dsfr-3460758
  • issue/ui_suite_dsfr-3461734
  • issue/ui_suite_dsfr-3460764
  • issue/ui_suite_dsfr-3461793
  • issue/ui_suite_dsfr-3464968
  • issue/ui_suite_dsfr-3469768
  • issue/ui_suite_dsfr-3471802
  • issue/ui_suite_dsfr-3460549
  • issue/ui_suite_dsfr-3471869
  • issue/ui_suite_dsfr-3474612
  • issue/ui_suite_dsfr-3476943
  • issue/ui_suite_dsfr-3475479
  • issue/ui_suite_dsfr-3481390
  • issue/ui_suite_dsfr-3484151
  • issue/ui_suite_dsfr-3484473
  • issue/ui_suite_dsfr-3474121
  • issue/ui_suite_dsfr-3460156
  • issue/ui_suite_dsfr-3480830
  • issue/ui_suite_dsfr-3485114
  • issue/ui_suite_dsfr-3485201
  • issue/ui_suite_dsfr-3486401
  • issue/ui_suite_dsfr-3486988
  • issue/ui_suite_dsfr-3486992
  • issue/ui_suite_dsfr-3487423
  • issue/ui_suite_dsfr-3487442
  • issue/ui_suite_dsfr-3488134
  • issue/ui_suite_dsfr-3484134
  • issue/ui_suite_dsfr-3484745
  • issue/ui_suite_dsfr-3390150
  • issue/ui_suite_dsfr-3487432
  • issue/ui_suite_dsfr-3489963
  • issue/ui_suite_dsfr-3492402
  • issue/ui_suite_dsfr-3495117
  • issue/ui_suite_dsfr-3485082
  • issue/ui_suite_dsfr-3484323
  • issue/ui_suite_dsfr-3497463
  • issue/ui_suite_dsfr-3490540
  • issue/ui_suite_dsfr-3497594
  • issue/ui_suite_dsfr-3504336
  • issue/ui_suite_dsfr-3486984
  • issue/ui_suite_dsfr-3487435
  • issue/ui_suite_dsfr-3504787
  • issue/ui_suite_dsfr-3504785
  • issue/ui_suite_dsfr-3505058
  • issue/ui_suite_dsfr-3506043
  • issue/ui_suite_dsfr-3506389
  • issue/ui_suite_dsfr-3488668
  • issue/ui_suite_dsfr-3506401
  • issue/ui_suite_dsfr-3508919
  • issue/ui_suite_dsfr-3508926
  • issue/ui_suite_dsfr-3511200
  • issue/ui_suite_dsfr-3486991
  • issue/ui_suite_dsfr-3514286
  • issue/ui_suite_dsfr-3519711
  • issue/ui_suite_dsfr-3526009
  • issue/ui_suite_dsfr-3532552
150 results
Select Git revision
  • 1.0.x
  • 3383175-add-error-pattern
  • 1.0.0-beta1
  • 1.0.0-beta2
  • 1.0.0-beta3
  • previous/3383175-add-error-pattern/2024-08-22
  • previous/3383175-add-error-pattern/2024-08-22-1
7 results
Show changes
Commits on Source (52)
Showing
with 493 additions and 86 deletions
Accompagner
accompagner
ajouter
alendar
alignement
analitycs
Archipel
archipel
Attirer
attractivité
auprès
Avaliable
bienvenues
btns
catégorie
clases
communs
comptes
concevoir
connaître
correctif
crect
csvg
ctext
Dailymotion
dailymotion
dans
desactivated
desciption
diplayed
dont
dépôt
dépôts
Développer
développer
Ecume
ecume
Emeraude
emeraude
employeur
envoyez
eoperator
Equisized
equisized
erros
filtre
Française
Galet
galet
gouv
gouvernement
gouvernementfr
gouvfr
Grey
grey
Inscrivez
jointe
l'Etat
legifrance
leur
leurs
libres
libération
logiciel
logiciels
l’attractivité
l’État
Macaron
macaron
Mieux
Moutarde
moutarde
npmjs
numériques
oomphinc
Opéra
organisation
ouverture
overriden
pantone
personnels
pièce
profil
Publier
recours
Remixicon
remixicon
renforcer
référencer
référençons
République
s'appuyant
searchform
secteur
Sidemenu
sidemenu
sitebranding
Skiplinks
skiplinks
sont
souhaitez
soutenir
S’appuyer
texte
Tiktok
tiktok
Tilleul
tilleul
Tilte
Tournesol
tournesol
treetable
Tuile
tuile
unclicable
utilisation
Utiliser
utiliser
utilisé
Verveine
verveine
votre
Vous
vous
vuejs
Écrivez
Écume
Émeraude
écrivez
êtes
stages:
- composer_package_master
- composer_package_1_2
- composer_package_1_5
- composer_package_1_7
# https://git.drupalcode.org/project/gitlab_templates/
composer_package_master:
stage: composer_package_master
script:
- 'curl --header "Job-Token: $CI_JOB_TOKEN" --data branch=master "https://__token__:5FJ1wBrKM4Qs-NVNYsS6@git.smile.fr/api/v4/projects/14517/packages/composer"'
only:
- master
tags:
- tandem-shell
composer_package_1_2:
stage: composer_package_1_2
script:
- 'curl --header "Job-Token: $CI_JOB_TOKEN" --data branch=v1.2 "https://__token__:5FJ1wBrKM4Qs-NVNYsS6@git.smile.fr/api/v4/projects/14517/packages/composer"'
only:
- v1.2
tags:
- tandem-shell
include:
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
composer_package_1_5:
stage: composer_package_1_5
.twig-lint-base:
stage: validate
before_script:
- composer require --dev vincentlanglet/twig-cs-fixer
script:
- 'curl --header "Job-Token: $CI_JOB_TOKEN" --data branch=v1.5 "https://__token__:5FJ1wBrKM4Qs-NVNYsS6@git.smile.fr/api/v4/projects/14517/packages/composer"'
only:
- v1.5
tags:
- tandem-shell
- vendor/bin/twig-cs-fixer lint --config=$_WEB_ROOT/themes/custom/$CI_PROJECT_NAME/.twig-cs-fixer.php $_WEB_ROOT/themes/custom/$CI_PROJECT_NAME/templates $_WEB_ROOT/themes/custom/$CI_PROJECT_NAME/components
rules:
- changes:
- "**/*.twig"
- if: '$CI_PIPELINE_SOURCE == "push"'
artifacts:
expose_as: twig-lint
when: always
expire_in: 6 mos
reports:
codequality: twig-lint-quality-report.xml
name: artifacts-$CI_PIPELINE_ID-$CI_JOB_NAME_SLUG
paths:
- twig-lint-quality-report.xml
composer_package_1_7:
stage: composer_package_1_7
script:
- 'curl --header "Job-Token: $CI_JOB_TOKEN" --data branch=v1.7 "https://__token__:5FJ1wBrKM4Qs-NVNYsS6@git.smile.fr/api/v4/projects/14517/packages/composer"'
only:
- v1.7
tags:
- tandem-shell
twig-lint:
extends: .twig-lint-base
allow_failure: false
stylelint:
allow_failure: false
composer-lint:
allow_failure: false
cspell:
allow_failure: true
eslint:
allow_failure: false
phpcs:
allow_failure: false
phpstan:
allow_failure: false
phpunit:
allow_failure: false
<?php
$ruleset = new TwigCsFixer\Ruleset\Ruleset();
// Add a default standard.
$ruleset->addStandard(new TwigCsFixer\Standard\TwigCsFixer());
// Add some specific rules.
$ruleset->addRule(new TwigCsFixer\Rules\File\FileExtensionRule());
$config = new TwigCsFixer\Config\Config();
$config->setRuleset($ruleset);
return $config;
......@@ -2,7 +2,7 @@ Theme that represents all DSFR components as ui patterns plugins or alters.
# Installation
No matter the solution you choose, you need to install the DSFR library such that at the end,
No matter the solution you choose, you need to install the DSFR library such that at the end,
the following file '/libraries/dsfr/dist/dsfr.module.js' should exist in your project,
relative to the drupal root directory.
......@@ -12,12 +12,52 @@ You need to place the DSFR library in the `libraries/dsfr` folder.
## With Composer
### Asset Packagist
You can use composer to automatically download and place the DSFR library in the correct
location. You have multiple options to do so. We show here two possibilities, you are free to
choose any methods that suits you.
If you are using the website [Asset Packagist](https://asset-packagist.org), the package 'npm-asset/gouvfr--dsfr' can be
### With a composer package repository
Example:
```json
{
"require": {
"gouvernementfr/dsfr": "1.14.0",
"composer/installers": "^2"
},
"repositories": {
"dsfr": {
"type": "package",
"package": {
"name": "gouvernementfr/dsfr",
"type": "drupal-library",
"version": "1.14.0",
"dist": {
"type": "zip",
"url": "https://github.com/GouvernementFR/dsfr/releases/download/v1.14.0/dsfr-v1.14.0.zip"
}
}
}
},
"extra": {
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
]
}
}
}
```
### Using the composer repository 'Asset Packagist'
If you are using the website [Asset Packagist](https://asset-packagist.org), the package 'npm-asset/gouvfr--dsfr' can be
downloaded from this repository. The composer.json of your Drupal project can be like below.
In the example, "web" is the drupal root directory (see the rule on package "type:drupal-core").
the project 'oomphinc/composer-installers-extender' is used to relocate the package 'npm-asset/gouvfr--dsfr'.
the project 'oomphinc/composer-installers-extender' is used to relocate the package 'npm-asset/gouvfr--dsfr'.
The relocation requires that :
- composer plugin 'oomphinc/composer-installers-extender' is allowed in section 'extra.config.allow-plugins',
- the package type 'npm-asset' is declared in the "extra.installer-types" section,
......@@ -26,9 +66,9 @@ The relocation requires that :
```json
{
"require": {
"npm-asset/gouvfr--dsfr": "1.10.2",
"npm-asset/gouvfr--dsfr": "1.14.0",
"composer/installers": "^2",
"oomphinc/composer-installers-extender": "2.*"
"oomphinc/composer-installers-extender": "^2"
},
"repositories": {
"asset-packagist": {
......@@ -58,40 +98,3 @@ The relocation requires that :
}
```
### With a composer package repository
Example:
```json
{
"require": {
"gouvernementfr/dsfr": "1.10.2",
"composer/installers": "2.*"
},
"repositories": {
"dsfr": {
"type": "package",
"package": {
"name": "gouvernementfr/dsfr",
"type": "drupal-library",
"version": "1.10.2",
"dist": {
"type": "zip",
"url": "https://github.com/GouvernementFR/dsfr/releases/download/v1.10.2/dsfr-v1.10.2.zip"
}
}
}
},
"extra": {
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
]
}
}
}
```
name: Accordion
description: "Used to condense space by hiding content and revealing it as needed."
group: Accordion
links:
- "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon"
slots:
title:
title: Title
content:
title: Content
description: "The accordion renderable content."
props:
type: object
properties:
id:
title: ID
description: "Must start with a letter. Randomly generated if empty."
$ref: "ui-patterns://identifier"
title_tag:
title: "HTML tag for title"
type: string
enum:
- h2
- h3
- h4
- h5
- h6
expanded:
title: "Expanded?"
description: "Accordion will be expanded on page load"
type: boolean
default: false
name: Preview
slots:
title: "Accordion title"
content:
type: html_tag
tag: p
value: "Accordion content"
props:
title_tag: h4
expanded: false
......@@ -2,7 +2,7 @@
{% if title %}
<section{{ attributes.addClass('fr-accordion') }}>
{% set accordion_id = accordion_id|default('accordion-' ~ random()) %}
{% set accordion_id = id|default('accordion-' ~ random()) %}
{% set title_tag = title_tag|default('h3') %}
<{{ title_tag }} class="fr-accordion__title">
<button class="fr-accordion__btn"
......
components/accordion/thumbnail.png

9.82 KiB

name: "Accordion group"
description: "A grouping of accordions."
group: Accordion
links:
- "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon"
slots:
accordions:
title: Accordions
description: "A list of 'accordion' components."
props:
type: object
properties:
grouped:
title: "Group accordions?"
type: boolean
default: true
name: Preview
slots:
accordions:
- type: component
component: "ui_suite_dsfr:accordion"
slots:
title: "Accordion 1"
content:
type: html_tag
tag: p
value: "Accordion 1 content"
- type: component
component: "ui_suite_dsfr:accordion"
slots:
title: "Accordion 2"
content:
type: html_tag
tag: p
value: "Accordion 2 content"
- type: component
component: "ui_suite_dsfr:accordion"
slots:
title: "Accordion 3"
content:
type: html_tag
tag: p
value: "Accordion 3 content"
props:
grouped: true
{% if accordions %}
{% if not grouped %}
{% set attributes = attributes.setAttribute('data-fr-group', 'false') %}
{% endif %}
<div{{ attributes.addClass('fr-accordions-group') }}>
{% set accordions = accordions and accordions is not sequence ? [accordions] : accordions %}
{% for accordion in accordions %}
{{ accordion }}
{% endfor %}
......
components/accordion_group/thumbnail.png

9.82 KiB

name: Alert
description: "Draws the user's attention to information without interrupting his current task."
links:
- "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/alerte"
variants:
error:
title: Error
success:
title: Success
info:
title: Information
warning:
title: Warning
error__sm:
title: "Error small"
success__sm:
title: "Success small"
info__sm:
title: "Information small"
warning__sm:
title: "Warning small"
slots:
title:
title: Title
message:
title: Message
props:
type: object
properties:
dismissible:
title: "Dismissible?"
description: "It’s possible to dismiss any alert inline."
type: string
enum:
- ""
- core
- custom
"meta:enum":
"": "No"
core: "Using dsfr"
custom: Custom
close_title:
title: "Close button text"
description: "Optional. Will be used only if alert is dismissible."
type: string
title_tag:
title: "HTML tag for title"
type: string
enum:
- p
- h2
- h3
- h4
- h5
- h6
"meta:enum":
p: p
h2: h2
h3: "h3 (default)"
h4: h4
h5: h5
h6: h6
name: Preview
slots:
title: "Alert: Title of an alert"
message:
type: html_tag
tag: p
value: "Detailed description of the message."
props:
dismissible: core
close_title: "Hide message"
{% if variant and variant|lower != 'default' %}
{% set variants = variant|split('__')|map(v => v|lower|replace({(v): 'fr-alert--' ~ v})|replace({_: '-'})) %}
{% if variant and variant != 'default' %}
{% set variants = variant|split('__')|map(v => v|replace({(v): 'fr-alert--' ~ v})) %}
{% set attributes = attributes.addClass(variants) %}
{% endif %}
......@@ -12,6 +12,6 @@
{{ message }}
{% if dismissible %}
{% set close_title = close_title|default('Close'|t) %}
<button{% if dismissible == 'core' %} onclick="const alert = this.parentNode; alert.parentNode.removeChild(alert);"{% endif %} class="fr-btn fr-btn--close" title="{{ close_title }}">{{ close_title }}</button>
<button{% if dismissible == 'core' %} onclick="const alert = this.parentNode; alert.parentNode.removeChild(alert);"{% endif %} class="fr-btn fr-btn--close" title="{{ close_title }}" type="button">{{ close_title }}</button>
{% endif %}
</div>
components/alert/thumbnail.png

11 KiB

badge:
label: Badge
description: "Highlight information of the “status” or “state” type on an element of the site."
links:
- "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/badge"
category: Badge
variants:
default:
label: Default
sm:
label: Small
settings:
name: Badge
description: "Highlight information of the “status” or “state” type on an element of the site."
group: Badge
links:
- "https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/badge"
variants:
default:
title: Default
sm:
title: Small
slots:
label:
title: Label
props:
type: object
properties:
color_schema:
type: select
label: Color schema
title: "Color schema"
description: "It is possible to use illustrative colors for not system badges only. Optional."
options:
green-tilleul-verveine: Tilleul Verveine
type: string
enum:
- green-tilleul-verveine
- green-bourgeon
- green-emeraude
- green-menthe
- green-archipel
- blue-ecume
- blue-cumulus
- purple-glycine
- pink-macaron
- pink-tuile
- yellow-tournesol
- yellow-moutarde
- orange-terre-battue
- brown-cafe-creme
- brown-caramel
- brown-opera
- beige-gris-galet
"meta:enum":
green-tilleul-verveine: "Tilleul Verveine"
green-bourgeon: Bourgeon
green-emeraude: Émeraude
green-menthe: Menthe
......@@ -27,30 +49,28 @@ badge:
pink-tuile: Tuile
yellow-tournesol: Tournesol
yellow-moutarde: Moutarde
orange-terre-battue: Terre Battue
brown-cafe-creme: Café crème
orange-terre-battue: "Terre Battue"
brown-cafe-creme: "Café crème"
brown-caramel: Caramel
brown-opera: Opéra
beige-gris-galet: Gris Galet
preview: brown-caramel
beige-gris-galet: "Gris Galet"
system_type:
type: select
label: System type
description: If selected 'Color schema' will be ignored. Optional.
options:
title: "System type"
description: "If selected 'Color schema' will be ignored. Optional."
type: string
enum:
- success
- error
- info
- warning
- new
"meta:enum":
success: Success
error: Error
info: Info
warning: Warning
new: New
preview: new
without_icon:
title: "Without an icon?"
description: "Will be used for system badges only. Optional."
type: boolean
label: Without an icon?
description: Will be used for system badges only. Optional.
preview: false
fields:
label:
type: text
label: Label
preview: Badge label
name: Preview
slots:
label: "Badge label"
props:
color_schema: brown-caramel
system_type: new
without_icon: false
{% if variant and variant|lower != 'default' %}
{% set attributes = attributes.addClass('fr-badge--' ~ variant|lower|replace({_: '-'})) %}
{% if variant and variant != 'default' %}
{% set attributes = attributes.addClass('fr-badge--' ~ variant) %}
{% endif %}
{% if system_type %}
......
components/badge/thumbnail.png

8.55 KiB