Merge pull request #10341 from colinux/dsfr-1.11

Tech: upgrade DSFR 1.10 => 1.11
This commit is contained in:
Colin Darie 2024-04-17 15:50:32 +00:00 committed by GitHub
commit 46545ee846
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 169 deletions

View file

@ -1,4 +1,7 @@
.sidebar-filter {
border: none;
padding-left: 0;
ul {
list-style: none;
padding-inline-start: 0;

View file

@ -85,17 +85,6 @@ input[type="radio"] {
}
}
// remove pointer cursor on textarea
textarea {
cursor: auto;
}
fieldset {
border: none;
padding-left: 0;
padding-bottom: 0;
}
.fr-btn.fr-btn--icon-left[target="_blank"] {
&::after {
display: none;

View file

@ -401,6 +401,11 @@
}
&.editable-champ-repetition {
fieldset {
border: none;
padding-left: 0;
}
.row {
border-radius: 4px;
border: 1px solid $border-grey;

View file

@ -21,7 +21,7 @@
.fr-header__navbar
- if is_search_enabled
%button.fr-btn--search.fr-btn{ "aria-controls" => "search-modal", "data-fr-opened" => "false", :title => t('views.users.dossiers.search.search_file') }= t('views.users.dossiers.search.search_file')
%button#navbar-burger-button.fr-btn--menu.fr-btn{ "aria-controls" => "modal-header__menu", "aria-haspopup" => "menu", "data-fr-opened" => "false", title: "Menu" } Menu
%button#navbar-burger-button.fr-btn--menu.fr-btn{ "aria-controls" => "modal-header__menu", "data-fr-opened" => "false", title: "Menu" } Menu
.fr-header__service
- root_profile_link, root_profile_libelle = root_path_info_for_profile(nav_bar_profile)

View file

@ -6,6 +6,7 @@
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" }
%meta{ name: "application-name", content: Current.application_name }
%meta{ name: "apple-mobile-web-app-title", content: Current.application_name }
%meta{ name: "format-detection", content: "telephone=no,date=no,address=no,email=no,url=no" }
= csrf_meta_tags
%title

BIN
bun.lockb

Binary file not shown.

View file

@ -4,7 +4,7 @@
"@coldwired/turbo-stream": "^0.11.1",
"@coldwired/utils": "^0.11.4",
"@frsource/autoresize-textarea": "^2.0.53",
"@gouvfr/dsfr": "^1.10.1",
"@gouvfr/dsfr": "^1.11.2",
"@graphiql/plugin-explorer": "^1.0.3",
"@graphiql/toolkit": "^0.9.1",
"@headlessui/react": "^1.6.6",

View file

@ -1,156 +0,0 @@
diff --git a/node_modules/@gouvfr/dsfr/dist/dsfr.module.js b/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
index 1ddc56c..2b489ff 100644
--- a/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
+++ b/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
@@ -3711,7 +3711,7 @@ const COLLAPSE$2 = api.internals.ns.selector('collapse');
const AccordionSelector = {
GROUP: api.internals.ns.selector('accordions-group'),
ACCORDION: ACCORDION,
- COLLAPSE: `${ACCORDION} > ${COLLAPSE$2}, ${ACCORDION} > *:not(${ACCORDION}, ${COLLAPSE$2}) > ${COLLAPSE$2}, ${ACCORDION} > *:not(${ACCORDION}, ${COLLAPSE$2}) > *:not(${ACCORDION}, ${COLLAPSE$2}) > ${COLLAPSE$2}`,
+ COLLAPSE: `${ACCORDION} > ${COLLAPSE$2}, ${ACCORDION} > *:not(${ACCORDION}):not(${COLLAPSE$2}) > ${COLLAPSE$2}, ${ACCORDION} > *:not(${ACCORDION}):not(${COLLAPSE$2}) > *:not(${ACCORDION}):not(${COLLAPSE$2}) > ${COLLAPSE$2}`,
COLLAPSE_LEGACY: `${ACCORDION} ${COLLAPSE$2}`,
BUTTON: `${ACCORDION}__btn`
};
@@ -4114,7 +4114,7 @@ const COLLAPSE$1 = api.internals.ns.selector('collapse');
const SidemenuSelector = {
LIST: api.internals.ns.selector('sidemenu__list'),
- COLLAPSE: `${ITEM$1} > ${COLLAPSE$1}, ${ITEM$1} > *:not(${ITEM$1}, ${COLLAPSE$1}) > ${COLLAPSE$1}, ${ITEM$1} > *:not(${ITEM$1}, ${COLLAPSE$1}) > *:not(${ITEM$1}, ${COLLAPSE$1}) > ${COLLAPSE$1}`,
+ COLLAPSE: `${ITEM$1} > ${COLLAPSE$1}, ${ITEM$1} > *:not(${ITEM$1}):not(${COLLAPSE$1}) > ${COLLAPSE$1}, ${ITEM$1} > *:not(${ITEM$1}):not(${COLLAPSE$1}) > *:not(${ITEM$1}):not(${COLLAPSE$1}) > ${COLLAPSE$1}`,
COLLAPSE_LEGACY: `${ITEM$1} ${COLLAPSE$1}`,
ITEM: api.internals.ns.selector('sidemenu__item'),
BUTTON: api.internals.ns.selector('sidemenu__btn')
@@ -4731,7 +4731,7 @@ const COLLAPSE = api.internals.ns.selector('collapse');
const NavigationSelector = {
NAVIGATION: api.internals.ns.selector('nav'),
- COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${ITEM} ${COLLAPSE}`,
ITEM: ITEM,
ITEM_RIGHT: `${ITEM}--align-right`,
diff --git a/node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.js b/node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.js
index ab11d6e..1acad53 100644
--- a/node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.js
+++ b/node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.js
@@ -4219,7 +4219,7 @@
var AccordionSelector = {
GROUP: api.internals.ns.selector('accordions-group'),
ACCORDION: ACCORDION,
- COLLAPSE: (ACCORDION + " > " + COLLAPSE$2 + ", " + ACCORDION + " > *:not(" + ACCORDION + ", " + COLLAPSE$2 + ") > " + COLLAPSE$2 + ", " + ACCORDION + " > *:not(" + ACCORDION + ", " + COLLAPSE$2 + ") > *:not(" + ACCORDION + ", " + COLLAPSE$2 + ") > " + COLLAPSE$2),
+ COLLAPSE: (ACCORDION + " > " + COLLAPSE$2 + ", " + ACCORDION + " > *:not(" + ACCORDION + "):not(" + COLLAPSE$2 + ") > " + COLLAPSE$2 + ", " + ACCORDION + " > *:not(" + ACCORDION + "):not(" + COLLAPSE$2 + ") > *:not(" + ACCORDION + "):not(" + COLLAPSE$2 + ") > " + COLLAPSE$2),
COLLAPSE_LEGACY: (ACCORDION + " " + COLLAPSE$2),
BUTTON: (ACCORDION + "__btn")
};
@@ -4736,7 +4736,7 @@
var SidemenuSelector = {
LIST: api.internals.ns.selector('sidemenu__list'),
- COLLAPSE: (ITEM$1 + " > " + COLLAPSE$1 + ", " + ITEM$1 + " > *:not(" + ITEM$1 + ", " + COLLAPSE$1 + ") > " + COLLAPSE$1 + ", " + ITEM$1 + " > *:not(" + ITEM$1 + ", " + COLLAPSE$1 + ") > *:not(" + ITEM$1 + ", " + COLLAPSE$1 + ") > " + COLLAPSE$1),
+ COLLAPSE: (ITEM$1 + " > " + COLLAPSE$1 + ", " + ITEM$1 + " > *:not(" + ITEM$1 + "):not(" + COLLAPSE$1 + ") > " + COLLAPSE$1 + ", " + ITEM$1 + " > *:not(" + ITEM$1 + "):not(" + COLLAPSE$1 + ") > *:not(" + ITEM$1 + "):not(" + COLLAPSE$1 + ") > " + COLLAPSE$1),
COLLAPSE_LEGACY: (ITEM$1 + " " + COLLAPSE$1),
ITEM: api.internals.ns.selector('sidemenu__item'),
BUTTON: api.internals.ns.selector('sidemenu__btn')
@@ -5493,7 +5493,7 @@
var NavigationSelector = {
NAVIGATION: api.internals.ns.selector('nav'),
- COLLAPSE: (ITEM + " > " + COLLAPSE + ", " + ITEM + " > *:not(" + ITEM + ", " + COLLAPSE + ") > " + COLLAPSE + ", " + ITEM + " > *:not(" + ITEM + ", " + COLLAPSE + ") > *:not(" + ITEM + ", " + COLLAPSE + ") > " + COLLAPSE),
+ COLLAPSE: (ITEM + " > " + COLLAPSE + ", " + ITEM + " > *:not(" + ITEM + "):not(" + COLLAPSE + ") > " + COLLAPSE + ", " + ITEM + " > *:not(" + ITEM + "):not(" + COLLAPSE + ") > *:not(" + ITEM + "):not(" + COLLAPSE + ") > " + COLLAPSE),
COLLAPSE_LEGACY: (ITEM + " " + COLLAPSE),
ITEM: ITEM,
ITEM_RIGHT: (ITEM + "--align-right"),
diff --git a/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/transcription/transcription-selector.js b/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/transcription/transcription-selector.js
index 3df9aff..b8462b9 100644
--- a/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/transcription/transcription-selector.js
+++ b/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/transcription/transcription-selector.js
@@ -5,7 +5,7 @@ const COLLAPSE = api.internals.ns.selector('collapse');
export const TranscriptionSelector = {
TRANSCRIPTION: TRANSCRIPTION,
- COLLAPSE: `${TRANSCRIPTION} > ${COLLAPSE}, ${TRANSCRIPTION} > *:not(${TRANSCRIPTION}, ${COLLAPSE}) > ${COLLAPSE}, ${TRANSCRIPTION} > *:not(${TRANSCRIPTION}, ${COLLAPSE}) > *:not(${TRANSCRIPTION}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${TRANSCRIPTION} > ${COLLAPSE}, ${TRANSCRIPTION} > *:not(${TRANSCRIPTION}):not(${COLLAPSE}) > ${COLLAPSE}, ${TRANSCRIPTION} > *:not(${TRANSCRIPTION}):not(${COLLAPSE}) > *:not(${TRANSCRIPTION}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${TRANSCRIPTION} ${COLLAPSE}`,
TITLE: `${TRANSCRIPTION}__title`
};
diff --git a/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/translate/translate-selector.js b/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/translate/translate-selector.js
index a39f6b4..8c0c07d 100644
--- a/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/translate/translate-selector.js
+++ b/node_modules/@gouvfr/dsfr/src/analytics/script/integration/component/translate/translate-selector.js
@@ -5,6 +5,6 @@ const COLLAPSE = api.internals.ns.selector('collapse');
export const TranslateSelector = {
BUTTON: `${TRANSLATE}__btn`,
- COLLAPSE: `${TRANSLATE} > ${COLLAPSE}, ${TRANSLATE} > *:not(${TRANSLATE}, ${COLLAPSE}) > ${COLLAPSE}, ${TRANSLATE} > *:not(${TRANSLATE}, ${COLLAPSE}) > *:not(${TRANSLATE}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${TRANSLATE} > ${COLLAPSE}, ${TRANSLATE} > *:not(${TRANSLATE}):not(${COLLAPSE}) > ${COLLAPSE}, ${TRANSLATE} > *:not(${TRANSLATE}):not(${COLLAPSE}) > *:not(${TRANSLATE}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${TRANSLATE} ${COLLAPSE}`
};
diff --git a/node_modules/@gouvfr/dsfr/src/component/accordion/script/accordion/accordion-selector.js b/node_modules/@gouvfr/dsfr/src/component/accordion/script/accordion/accordion-selector.js
index f0d42e0..8adffc7 100644
--- a/node_modules/@gouvfr/dsfr/src/component/accordion/script/accordion/accordion-selector.js
+++ b/node_modules/@gouvfr/dsfr/src/component/accordion/script/accordion/accordion-selector.js
@@ -6,7 +6,7 @@ const COLLAPSE = api.internals.ns.selector('collapse');
export const AccordionSelector = {
GROUP: api.internals.ns.selector('accordions-group'),
ACCORDION: ACCORDION,
- COLLAPSE: `${ACCORDION} > ${COLLAPSE}, ${ACCORDION} > *:not(${ACCORDION}, ${COLLAPSE}) > ${COLLAPSE}, ${ACCORDION} > *:not(${ACCORDION}, ${COLLAPSE}) > *:not(${ACCORDION}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${ACCORDION} > ${COLLAPSE}, ${ACCORDION} > *:not(${ACCORDION}):not(${COLLAPSE}) > ${COLLAPSE}, ${ACCORDION} > *:not(${ACCORDION}):not(${COLLAPSE}) > *:not(${ACCORDION}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${ACCORDION} ${COLLAPSE}`,
BUTTON: `${ACCORDION}__btn`
};
diff --git a/node_modules/@gouvfr/dsfr/src/component/navigation/script/navigation/navigation-selector.js b/node_modules/@gouvfr/dsfr/src/component/navigation/script/navigation/navigation-selector.js
index 6e33241..388dbd3 100644
--- a/node_modules/@gouvfr/dsfr/src/component/navigation/script/navigation/navigation-selector.js
+++ b/node_modules/@gouvfr/dsfr/src/component/navigation/script/navigation/navigation-selector.js
@@ -5,7 +5,7 @@ const COLLAPSE = api.internals.ns.selector('collapse');
export const NavigationSelector = {
NAVIGATION: api.internals.ns.selector('nav'),
- COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${ITEM} ${COLLAPSE}`,
ITEM: ITEM,
ITEM_RIGHT: `${ITEM}--align-right`,
diff --git a/node_modules/@gouvfr/dsfr/src/component/sidemenu/script/sidemenu/sidemenu-selector.js b/node_modules/@gouvfr/dsfr/src/component/sidemenu/script/sidemenu/sidemenu-selector.js
index 19921b7..29f207d 100644
--- a/node_modules/@gouvfr/dsfr/src/component/sidemenu/script/sidemenu/sidemenu-selector.js
+++ b/node_modules/@gouvfr/dsfr/src/component/sidemenu/script/sidemenu/sidemenu-selector.js
@@ -5,7 +5,7 @@ const COLLAPSE = api.internals.ns.selector('collapse');
export const SidemenuSelector = {
LIST: api.internals.ns.selector('sidemenu__list'),
- COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}, ${COLLAPSE}) > *:not(${ITEM}, ${COLLAPSE}) > ${COLLAPSE}`,
+ COLLAPSE: `${ITEM} > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}, ${ITEM} > *:not(${ITEM}):not(${COLLAPSE}) > *:not(${ITEM}):not(${COLLAPSE}) > ${COLLAPSE}`,
COLLAPSE_LEGACY: `${ITEM} ${COLLAPSE}`,
ITEM: api.internals.ns.selector('sidemenu__item'),
BUTTON: api.internals.ns.selector('sidemenu__btn')
diff --git a/node_modules/@gouvfr/dsfr/dist/dsfr.module.js b/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
index 1ddc56c..bee3c5a 100644
--- a/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
+++ b/node_modules/@gouvfr/dsfr/dist/dsfr.module.js
@@ -5506,12 +5506,6 @@ class HeaderLinks extends api.core.Instance {
const copySuffix = '-mobile';
const toolsHtml = this.toolsLinks.innerHTML.replace(/ +/g, ' ');
- const menuHtml = this.menuLinks.innerHTML.replace(/ +/g, ' ');
- // Pour éviter de dupliquer des id, on ajoute un suffixe aux id et aria-controls duppliqués.
- let toolsHtmlDuplicateId = toolsHtml.replace(/id="(.*?)"/gm, 'id="$1' + copySuffix + '"');
- toolsHtmlDuplicateId = toolsHtmlDuplicateId.replace(/(<nav[.\s\S]*-translate [.\s\S]*) aria-controls="(.*?)"([.\s\S]*<\/nav>)/gm, '$1 aria-controls="$2' + copySuffix + '"$3');
-
- if (toolsHtmlDuplicateId === menuHtml) return;
switch (api.mode) {
case api.Modes.ANGULAR:
@@ -5523,7 +5517,11 @@ ${api.header.doc}`);
break;
default:
- this.menuLinks.innerHTML = toolsHtmlDuplicateId;
+ this.menuLinks.innerHTML = toolsHtml;
+ for (const element of this.menuLinks.querySelectorAll('[id]')) element.id = `${element.id}${copySuffix}`;
+ for (const element of this.menuLinks.querySelectorAll('[aria-controls]')) {
+ element.setAttribute('aria-controls', `${element.getAttribute('aria-controls')}${copySuffix}`);
+ }
}
}
}