Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔖 chore(*): DSFR v1.13.0 #1036

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7b7ffb8
fix(core): getter node
keryanS Sep 11, 2024
e49ec50
🐛 fix(core): Bug de récursivité infinie sur le getter node [DS-3841] …
keryanS Oct 22, 2024
c2d6959
🐛 fix(modal): input sans type bug dans le focus trap de la modale [DS…
keryanS Oct 23, 2024
8db9b5b
🐛 fix(analytics): lancement dsfr start dans les pages SPA [DS-3855] (…
keryanS Oct 23, 2024
8aaa86f
🐛 fix(core): opacité du texte du select désactivé [DS-3856] #996
keryanS Oct 23, 2024
351c7ae
✨ fix(dependencies): browsersync dependency >=2.27 [DS-3845] (#997)
keryanS Oct 23, 2024
e3cab1b
🐛 fix(anayltics): correction doc page.path [DS-3823] (#998)
keryanS Oct 23, 2024
30aaaaa
✨ feat(pagination): retrait du lien sur les points de suspension [DS-…
zellerbaptiste Oct 23, 2024
9ff71fa
🐛 fix(readme): correction nom fichier utility [DS-3830] (#1002)
keryanS Oct 23, 2024
4257eed
🐛 fix(notice): correction css markup hx sur le titre du bandeau [DS-3…
keryanS Oct 23, 2024
196970e
✨ feat(notice): icone alerte météo rouge [DS-3838] (#1004)
keryanS Oct 23, 2024
b00afae
🐛 fix(button): ajoute le type button par défaut [DS-3828] (#1005)
zellerbaptiste Oct 23, 2024
ade8e91
🐛 fix(toggle): correction groupe d'interrupteurs dépréciés [DS-3835] …
zellerbaptiste Oct 23, 2024
0ddf261
🐛 fix(link): alignement icône link close déprécié [DS-3837] (#1007)
keryanS Oct 23, 2024
cee83fd
🐛 feat(header, sidemenu): correction focus croppé [DS-3842] (#1008)
zellerbaptiste Oct 23, 2024
8969b04
✨ feat(form): ajout du message d'avertissement 'warning' [DS-3847] (#…
keryanS Oct 23, 2024
ba976ef
🐛 fix(range): amélioration du rendu en mode contrasté [DS-3808] (#1011)
keryanS Oct 23, 2024
e4f72bd
🐛 fix(notice): padding notice sans close btn [DS-3848] (#1019)
keryanS Oct 23, 2024
eb36366
🐛 fix(core): bug firefox menu passe en arrière plan [DS-3852] (#1023)
keryanS Oct 23, 2024
84905dd
🐛 💥 fix(table): correction de l'attribut aria-sort [DS-3858] (#1030)
zellerbaptiste Oct 23, 2024
8f0637b
🐛 fix(header): duplication aria-describedby & labelledby [DS-3827] (#…
keryanS Oct 28, 2024
1f7c292
🐛 fix(modal): correction modal footer z-index [DS-3839] (#1000)
zellerbaptiste Oct 28, 2024
0b33bd9
🐛 fix(core, tooltip): positionnement du tooltip dans header & modale …
keryanS Oct 28, 2024
aedf709
✨ feat(api): ajouts d'évènements dans l'api [DS-2052] (#1012)
keryanS Oct 28, 2024
a72b92a
🐛 fix(header): retrait aria-label sur modales désactivées [DS-3859] (…
keryanS Oct 28, 2024
634277e
🐛 fix(accordion): ouverture initiale des accordéons dégroupés [DS-386…
keryanS Oct 28, 2024
f15db8f
🐛 fix(range): ajout de la possibilité de changer la value en JS [DS-3…
keryanS Oct 28, 2024
0b9813e
🐛 fix(legacy): retrait des références à polyfill-io (faille sécurité)…
lab9fr Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ Une structure minimale serait :
└── favicon/
└── fonts/
└── utility/
└── utilities.min.css
└── utility.min.css
```

Les polices de caractères utilisées sur le DS, à savoir la Marianne et la Spectral, sont des fichiers .woff et .woff2, ils doivent se trouver dans le répertoire `fonts`. Les dossiers `fonts` et `favicon` doivent être placés au même niveau que le dossier contenant le CSS du core du dsfr (ou au même niveau que le css `dsfr.min.css` à la racine de dist, qui contient le core).

Le fichier `utilities.min.css` doit être placé un niveau plus bas que le dossier `icons`, dans dossier utility par exemple, pour respecter les chemins d'accès vers les icônes.
Le fichier `utility.min.css` doit être placé un niveau plus bas que le dossier `icons`, dans dossier utility par exemple, pour respecter les chemins d'accès vers les icônes.

### Le HTML

Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@commitlint/config-conventional": "^15.0.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-virtual": "^2.1.0",
"browser-sync": "^2.27.10",
"browser-sync": ">=2.27.10",
"browserslist": "^4.21.5",
"cssnano": "^5.1.15",
"del": "^6.0.0",
Expand Down Expand Up @@ -83,9 +83,6 @@
"svgo": "^2.8.0",
"yargs": "^17.7.1"
},
"peerDependencies": {
"browser-sync": "^2.27.10"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
Expand Down
2 changes: 1 addition & 1 deletion src/analytics/doc/analytics/collector/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ _String_ (EA: path)

* Défini le chemin de la page

* Utilise `document.location.pathname` si non défini
* Utilise `document.location.pathname/document.location.search` si non défini

* * *

Expand Down
4 changes: 2 additions & 2 deletions src/analytics/example/action/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div>
<h4>action activée</h4>
<div class="<%= prefix %>-mb-6v">
<button class="<%= prefix %>-btn" data-<%= prefix %>-analytics-action="libellé envoyé à l'analytics" id="action-true" >libellé du bouton</button>
<button type="button" class="<%= prefix %>-btn" data-<%= prefix %>-analytics-action="libellé envoyé à l'analytics" id="action-true" >libellé du bouton</button>
</div>
</div>
<div>
<h4>action prévenue</h4>
<div class="<%= prefix %>-mb-6v">
<button class="<%= prefix %>-btn" data-<%= prefix %>-analytics-action="false" id="action-false" >libellé du bouton</button>
<button type="button" class="<%= prefix %>-btn" data-<%= prefix %>-analytics-action="false" id="action-false" >libellé du bouton</button>
</div>
</div>
</div>
8 changes: 4 additions & 4 deletions src/analytics/example/spa/agnostic/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<!-- L’alternative de l’image (attribut alt) doit impérativement être renseignée et reprendre le texte visible dans l’image -->
</div>
<div class="<%= prefix %>-header__navbar">
<button class="<%= prefix %>-btn--search <%= prefix %>-btn" data-<%= prefix %>-opened="false"
<button type="button" class="<%= prefix %>-btn--search <%= prefix %>-btn" data-<%= prefix %>-opened="false"
aria-controls="modal-122" id="button-123" title="Rechercher"
data-<%= prefix %>-js-modal-button="true">
Rechercher
</button>
<button class="<%= prefix %>-btn--menu <%= prefix %>-btn" data-<%= prefix %>-opened="false"
<button type="button" class="<%= prefix %>-btn--menu <%= prefix %>-btn" data-<%= prefix %>-opened="false"
aria-controls="modal-124" id="button-125" title="Menu">
Menu
</button>
Expand All @@ -48,7 +48,7 @@
</div>
<div class="<%= prefix %>-header__search <%= prefix %>-modal" id="modal-122">
<div class="<%= prefix %>-container <%= prefix %>-container-lg--fluid">
<button class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-122" id="button-130"
<button type="button" class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-122" id="button-130"
title="Fermer">
Fermer
</button>
Expand All @@ -60,7 +60,7 @@
placeholder="Rechercher" id="search-121-input" type="search">
<div class="<%= prefix %>-messages-group" id="search-121-input-messages" aria-live="polite">
</div>
<button class="<%= prefix %>-btn" id="search-btn-132" title="Rechercher">
<button type="button" class="<%= prefix %>-btn" id="search-btn-132" title="Rechercher">
Rechercher
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/analytics/example/spa/agnostic/route.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
description: 'This is the about page',
},
'button': {
template: `<button id="btn-3" class="<%= prefix %>-btn">Button page 3</button>`,
template: `<button type="button" id="btn-3" class="<%= prefix %>-btn">Button page 3</button>`,
title: 'Buttons | ' + urlPageTitle,
description: 'This is the contact page',
},
Expand Down
26 changes: 20 additions & 6 deletions src/analytics/example/spa/angular/_index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ app.config(function($routeProvider) {
template : '<div><h2>LINK</h2><a href="#" data-<%= prefix %>-analytics-click="libellé du lien envoyé à l\'analytics" id="link-attr-click">test</a></div>'
})
.when("/button", {
template : '<div><h2>BUTTON</h2><button id="btn-3" class="<%= prefix %>-btn">Button</button></div>'
template : '<div><h2>BUTTON</h2><button type="button" id="btn-3" class="<%= prefix %>-btn">Button</button></div>'
});
});
</script>
Expand All @@ -31,10 +31,10 @@ app.config(function($routeProvider) {
</p>
</div>
<div class="fr-header__navbar">
<button class="fr-btn--search fr-btn" data-fr-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" >
<button type="button" class="fr-btn--search fr-btn" data-fr-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" >
Rechercher
</button>
<button class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
<button type="button" class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
Menu
</button>
</div>
Expand All @@ -58,7 +58,7 @@ app.config(function($routeProvider) {
</div>
<div class="fr-header__search fr-modal" id="modal-122">
<div class="fr-container fr-container-lg--fluid">
<button class="fr-btn--close fr-btn" aria-controls="modal-122" id="button-130" title="Fermer">
<button type="button" class="fr-btn--close fr-btn" aria-controls="modal-122" id="button-130" title="Fermer">
Fermer
</button>
<div class="fr-search-bar" id="search-121" role="search">
Expand All @@ -68,7 +68,7 @@ app.config(function($routeProvider) {
<input class="fr-input" aria-describedby="search-121-input-messages" placeholder="Rechercher" id="search-121-input" type="search"/>
<div class="fr-messages-group" id="search-121-input-messages" aria-live="polite">
</div>
<button class="fr-btn" id="search-btn-132" title="Rechercher">
<button type="button" class="fr-btn" id="search-btn-132" title="Rechercher">
Rechercher
</button>
</div>
Expand All @@ -80,7 +80,7 @@ app.config(function($routeProvider) {
</div>
<div class="fr-header__menu fr-modal" id="modal-124">
<div class="fr-container">
<button class="fr-btn--close fr-btn" aria-controls="modal-2414" id="button-2419" title="Fermer">
<button type="button" class="fr-btn--close fr-btn" aria-controls="modal-2414" id="button-2419" title="Fermer">
Fermer
</button>
<div class="fr-header__menu-links">
Expand All @@ -99,4 +99,18 @@ app.config(function($routeProvider) {
</header>

<div ng-view></div>

<script>
switch (document.readyState) {
case "loading":
document.addEventListener("DOMContentLoaded", () => dsfr.start());
break;
case "interactive":
dsfr.start();
break;
case "complete":
dsfr.start();
break;
}
</script>
</div>
25 changes: 18 additions & 7 deletions src/analytics/example/spa/react/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</p>
</div>
<div class="fr-header__navbar">
<button class="fr-btn--search fr-btn" data-fr-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" >
<button type="button" class="fr-btn--search fr-btn" data-fr-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" >
Rechercher
</button>
<button class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
<button type="button" class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
Menu
</button>
</div>
Expand All @@ -58,7 +58,7 @@
</div>
<div class="fr-header__search fr-modal" id="modal-122">
<div class="fr-container fr-container-lg--fluid">
<button class="fr-btn--close fr-btn" aria-controls="modal-122" id="button-130" title="Fermer">
<button type="button" class="fr-btn--close fr-btn" aria-controls="modal-122" id="button-130" title="Fermer">
Fermer
</button>
<div class="fr-search-bar" id="search-121" role="search">
Expand All @@ -68,7 +68,7 @@
<input class="fr-input" aria-describedby="search-121-input-messages" placeholder="Rechercher" id="search-121-input" type="search"/>
<div class="fr-messages-group" id="search-121-input-messages" aria-live="polite">
</div>
<button class="fr-btn" id="search-btn-132" title="Rechercher">
<button type="button" class="fr-btn" id="search-btn-132" title="Rechercher">
Rechercher
</button>
</div>
Expand All @@ -80,7 +80,7 @@
</div>
<div class="fr-header__menu fr-modal" id="modal-124">
<div class="fr-container">
<button class="fr-btn--close fr-btn" aria-controls="modal-2414" id="button-2419" title="Fermer">
<button type="button" class="fr-btn--close fr-btn" aria-controls="modal-2414" id="button-2419" title="Fermer">
Fermer
</button>
<div class="fr-header__menu-links">
Expand Down Expand Up @@ -108,9 +108,20 @@

const Home = props => <div><h2>HOME</h2><p>lorem ipsum dolor sit amet</p></div>
const Links = props => <div><h2>LINK</h2><a href="#" data-fr-analytics-click="libellé du lien envoyé à l'analytics" id="link-attr-click">test</a></div>
const Button = props => <div><h2>BUTTON</h2><button id="btn-3" class="<%= prefix %>-btn">Button</button></div>
const Button = props => <div><h2>BUTTON</h2><button type="button" id="btn-3" class="<%= prefix %>-btn">Button</button></div>

ReactDOM.render(<ReactRouterDOM.BrowserRouter><App /></ReactRouterDOM.BrowserRouter>, document.querySelector('#react-container'));

switch (document.readyState) {
case "loading":
document.addEventListener("DOMContentLoaded", () => dsfr.start());
break;
case "interactive":
dsfr.start();
break;
case "complete":
dsfr.start();
break;
}

</script>
</script>
28 changes: 20 additions & 8 deletions src/analytics/example/spa/vue/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<!-- L’alternative de l’image (attribut alt) doit impérativement être renseignée et reprendre le texte visible dans l’image -->
</div>
<div class="<%= prefix %>-header__navbar">
<button class="<%= prefix %>-btn--search <%= prefix %>-btn" data-<%= prefix %>-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" data-<%= prefix %>-js-modal-button="true" >
<button type="button" class="<%= prefix %>-btn--search <%= prefix %>-btn" data-<%= prefix %>-opened="false" aria-controls="modal-122" id="button-123" title="Rechercher" data-<%= prefix %>-js-modal-button="true" >
Rechercher
</button>
<button class="<%= prefix %>-btn--menu <%= prefix %>-btn" data-<%= prefix %>-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
<button type="button" class="<%= prefix %>-btn--menu <%= prefix %>-btn" data-<%= prefix %>-opened="false" aria-controls="modal-124" id="button-125" title="Menu">
Menu
</button>
</div>
Expand All @@ -45,7 +45,7 @@
</div>
<div class="<%= prefix %>-header__search <%= prefix %>-modal" id="modal-122">
<div class="<%= prefix %>-container <%= prefix %>-container-lg--fluid">
<button class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-122" id="button-130" title="Fermer">
<button type="button" class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-122" id="button-130" title="Fermer">
Fermer
</button>
<div class="<%= prefix %>-search-bar" id="search-121" role="search">
Expand All @@ -55,7 +55,7 @@
<input class="<%= prefix %>-input" aria-describedby="search-121-input-messages" placeholder="Rechercher" id="search-121-input" type="search">
<div class="<%= prefix %>-messages-group" id="search-121-input-messages" aria-live="polite">
</div>
<button class="<%= prefix %>-btn" id="search-btn-132" title="Rechercher">
<button type="button" class="<%= prefix %>-btn" id="search-btn-132" title="Rechercher">
Rechercher
</button>
</div>
Expand All @@ -67,7 +67,7 @@
</div>
<div class="<%= prefix %>-header__menu <%= prefix %>-modal" id="modal-124">
<div class="<%= prefix %>-container">
<button class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-124" id="button-133" title="Fermer">
<button type="button" class="<%= prefix %>-btn--close <%= prefix %>-btn" aria-controls="modal-124" id="button-133" title="Fermer">
Fermer
</button>
<div class="<%= prefix %>-header__menu-links">
Expand Down Expand Up @@ -104,11 +104,11 @@
</div>
<div v-if="pagination==2">
<h1>Page {{pagination}}</h1>
<button id="btn-1" class="<%= prefix %>-btn">Button 1</button>
<button type="button" id="btn-1" class="<%= prefix %>-btn">Button 1</button>
</div>
<div v-if="pagination==3">
<h1>Page {{pagination}}</h1>
<button id="btn-2" class="<%= prefix %>-btn">Button 2</button>
<button type="button" id="btn-2" class="<%= prefix %>-btn">Button 2</button>
</div>

<nav role="navigation" class="<%= prefix %>-pagination <%= prefix %>-mt-8v" aria-label="Pagination">
Expand Down Expand Up @@ -143,7 +143,7 @@

const Base = { template: `lorem ipsum dolor sit amet` };
const Link = { template: `<a href="#" id="btn-4" data-<%= prefix %>-analytics-click="libellé du lien envoyé à l'analytics" id="link-attr-click">test</a>` };
const Button = { template: `<button id="btn-5" class="<%= prefix %>-btn">Button page 3</button>` };
const Button = { template: `<button type="button" id="btn-5" class="<%= prefix %>-btn">Button page 3</button>` };

const routes = [
{ path: "/", component: Base },
Expand All @@ -165,4 +165,16 @@
})
.use(router)
.mount("#vue-container")

switch (document.readyState) {
case "loading":
document.addEventListener("DOMContentLoaded", () => dsfr.start());
break;
case "interactive":
dsfr.start();
break;
case "complete":
dsfr.start();
break;
}
</script>
2 changes: 1 addition & 1 deletion src/component/accordion/template/ejs/accordion.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<section class="<%= prefix %>-accordion">
<h3 class="<%= prefix %>-accordion__title">
<button class="<%= prefix %>-accordion__btn" aria-expanded="<%= isExpanded %>" aria-controls="<%= accordion.id %>" ><%- accordion.label %></button>
<button type="button" class="<%= prefix %>-accordion__btn" aria-expanded="<%= isExpanded %>" aria-controls="<%= accordion.id %>" ><%- accordion.label %></button>
</h3>
<div class="<%= prefix %>-collapse" id="<%= accordion.id %>">
<% if (accordion.content !== undefined) { %>
Expand Down
2 changes: 1 addition & 1 deletion src/component/alert/example/layout-dynamic.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h4><%= title %></h4>
<% } %>
<div class="<%= prefix %>-mb-6v" >
<button class="fr-btn" id="button-add" onclick="const component = document.createElement('div'); component.className = 'fr-my-8v'; component.innerHTML = decodeURIComponent('<%- encodeURIComponent(component) %>'); this.after(component);">Bouton d'ajout</button>
<button type="button" class="fr-btn" id="button-add" onclick="const component = document.createElement('div'); component.className = 'fr-my-8v'; component.innerHTML = decodeURIComponent('<%- encodeURIComponent(component) %>'); this.after(component);">Bouton d'ajout</button>

</div>
<% if (locals.snippet !== undefined) { %>
Expand Down
2 changes: 1 addition & 1 deletion src/component/breadcrumb/template/ejs/breadcrumb.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (breadcrumb.button === undefined) breadcrumb.button = 'Voir le fil d’Ariane
%>

<nav role="navigation" class="<%= prefix %>-breadcrumb" aria-label="vous êtes ici :">
<button class="<%= prefix %>-breadcrumb__button" aria-expanded="false"
<button type="button" class="<%= prefix %>-breadcrumb__button" aria-expanded="false"
aria-controls="<%= breadcrumb.id %>"><%= breadcrumb.button %></button>
<div class="<%= prefix %>-collapse" id="<%= breadcrumb.id %>">
<ol class="<%= prefix %>-breadcrumb__list">
Expand Down
5 changes: 2 additions & 3 deletions src/component/button/style/_legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@

#{ns(btn--sort)} {
@include icon-legacy(arrow-up-down-line, sm);
@include animate.rotate('&[aria-sorting='desc']');

&[aria-sorting='asc'],
&[aria-sorting='desc'] {
&[aria-sort='ascending'],
&[aria-sort='descending'] {
@include icon-legacy(arrow-up-line, sm);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/component/button/style/module/_sort.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#{ns(btn--sort)} {
@include nest-btn(sm, only, arrow-up-down-line, null, false);
@include animate.rotate('&[aria-sorting='desc']');
@include animate.rotate('&[aria-sort='descending']');

&[aria-sorting='asc'],
&[aria-sorting='desc'] {
&[aria-sort='ascending'],
&[aria-sort='descending'] {
@include nest-btn(sm, only, arrow-up-line, null, false);
}
}
1 change: 1 addition & 0 deletions src/component/button/template/ejs/button.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const button = locals.button || {};
let btnClasses = button.classes || [];
let btnAttrs = button.attributes || {};
btnAttrs.id = button.id || uniqueId('button');
btnAttrs.type = button.type || 'button';
btnClasses.push(prefix + '-btn');
let action;
const markup = button.markup || 'button';
Expand Down
Loading