From 2bdc92f8bbb8baacde68869469485411f009eb02 Mon Sep 17 00:00:00 2001
From: Maxime Golfier <25312957+maxgfr@users.noreply.github.com>
Date: Thu, 20 Jun 2024 21:01:57 +0200
Subject: [PATCH] feat(combobox): use `downshift` instead of
`react-autosuggest` (#5972)
* fix: autoscroll
* fix: autoscroll
* fix: snapshot
* fix: test
* fix: test
* fix: test
* fix: snapshot
* fix: snapshot
* fix: snapshot
* fix: snapshot
* fix: default value
* fix: default value
* fix: test
---
.../__snapshots__/a-propos.test.tsx.snap | 41 +-
.../droit-du-travail.test.js.snap | 41 +-
.../fiche-ministere-travail.test.tsx.snap | 41 +-
.../glossaire-[slug].test.tsx.snap | 41 +-
.../__snapshots__/glossaire.test.tsx.snap | 41 +-
.../mentions-legales.test.tsx.snap | 41 +-
.../modeles-de-courriers-[slug].test.tsx.snap | 41 +-
.../modeles-de-courriers.test.tsx.snap | 41 +-
.../__snapshots__/recherche.test.js.snap | 41 +-
.../__snapshots__/stats.test.tsx.snap | 41 +-
.../__snapshots__/themes.test.tsx.snap | 41 +-
.../code-du-travail-frontend/package.json | 3 +-
.../AgreementInput/SearchAgreementInput.tsx | 182 ++--
.../AgreementSearch/AgreementNoResult.tsx | 26 +-
.../__snapshots__/Wizard.test.tsx.snap | 154 ++--
.../src/search/SearchBar/DocumentSuggester.js | 131 ---
.../SearchBar/DocumentSuggesterTheme.ts | 41 -
.../__tests__/DocumentSuggester.test.js | 87 --
.../DocumentSuggester.test.js.snap | 142 ----
.../search/SearchBar/{index.js => index.tsx} | 207 +++--
.../src/search/__tests__/SearchBar.test.js | 73 --
.../src/search/__tests__/SearchHero.test.js | 26 -
.../__snapshots__/SearchBar.test.js.snap | 201 -----
.../__snapshots__/SearchHero.test.js.snap | 786 ------------------
packages/react-ui/package.json | 4 +-
.../react-ui/src/ScreenReaderOnly/index.js | 21 +-
packages/react-ui/types.d.ts | 1 +
yarn.lock | 116 +--
28 files changed, 538 insertions(+), 2114 deletions(-)
delete mode 100644 packages/code-du-travail-frontend/src/search/SearchBar/DocumentSuggester.js
delete mode 100644 packages/code-du-travail-frontend/src/search/SearchBar/DocumentSuggesterTheme.ts
delete mode 100644 packages/code-du-travail-frontend/src/search/SearchBar/__tests__/DocumentSuggester.test.js
delete mode 100644 packages/code-du-travail-frontend/src/search/SearchBar/__tests__/__snapshots__/DocumentSuggester.test.js.snap
rename packages/code-du-travail-frontend/src/search/SearchBar/{index.js => index.tsx} (55%)
delete mode 100644 packages/code-du-travail-frontend/src/search/__tests__/SearchBar.test.js
delete mode 100644 packages/code-du-travail-frontend/src/search/__tests__/SearchHero.test.js
delete mode 100644 packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchBar.test.js.snap
delete mode 100644 packages/code-du-travail-frontend/src/search/__tests__/__snapshots__/SearchHero.test.js.snap
create mode 100644 packages/react-ui/types.d.ts
diff --git a/packages/code-du-travail-frontend/__tests__/__snapshots__/a-propos.test.tsx.snap b/packages/code-du-travail-frontend/__tests__/__snapshots__/a-propos.test.tsx.snap
index f7db31a5d6..4ef62e527d 100644
--- a/packages/code-du-travail-frontend/__tests__/__snapshots__/a-propos.test.tsx.snap
+++ b/packages/code-du-travail-frontend/__tests__/__snapshots__/a-propos.test.tsx.snap
@@ -62,7 +62,7 @@ exports[`