diff --git a/site/cypress/integration/mon-entreprise/demande-mobilité.ts b/site/cypress/integration/mon-entreprise/demande-mobilité.ts index a137ae13d..b5da10262 100644 --- a/site/cypress/integration/mon-entreprise/demande-mobilité.ts +++ b/site/cypress/integration/mon-entreprise/demande-mobilité.ts @@ -1,3 +1,4 @@ +/* eslint-disable cypress/unsafe-to-chain-command */ import { checkA11Y, fr } from '../../support/utils' const writeFixtures = Cypress.env('record_http') !== undefined diff --git a/site/cypress/integration/mon-entreprise/localisation-field.ts b/site/cypress/integration/mon-entreprise/localisation-field.ts index 5839f0caa..be3f176fc 100644 --- a/site/cypress/integration/mon-entreprise/localisation-field.ts +++ b/site/cypress/integration/mon-entreprise/localisation-field.ts @@ -1,6 +1,5 @@ -const fr = Cypress.env('language') === 'fr' - describe('Champs localisation (simulateur salarié)', function () { + const fr = Cypress.env('language') === 'fr' if (!fr) { return } @@ -16,6 +15,7 @@ describe('Champs localisation (simulateur salarié)', function () { cy.contains('SMIC').click() cy.contains('button', 'Commune').click() cy.contains('Commune ou code postal').click({ force: true }) + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.focused().type('Steenvoorde') cy.wait('@communes') cy.contains('Steenvoorde (59114)').click({ force: true }) diff --git a/site/cypress/integration/mon-entreprise/recherche.ts b/site/cypress/integration/mon-entreprise/recherche.ts index fbc8eb2aa..cba090767 100644 --- a/site/cypress/integration/mon-entreprise/recherche.ts +++ b/site/cypress/integration/mon-entreprise/recherche.ts @@ -14,6 +14,7 @@ describe('Recherche globales', { testIsolation: false }, function () { cy.contains('Fermer').focus() + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.focused().tab().should('have.attr', 'type', 'search') cy.contains('Simulateurs') @@ -22,6 +23,7 @@ describe('Recherche globales', { testIsolation: false }, function () { .should('have.length', 6) cy.contains('Règles de calculs').next().find('li').should('have.length', 20) + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.focused().type('avocat') cy.contains('Simulateurs') diff --git a/site/cypress/integration/mon-entreprise/simulateur-salarie.ts b/site/cypress/integration/mon-entreprise/simulateur-salarie.ts index 693e2c550..6dfc93158 100644 --- a/site/cypress/integration/mon-entreprise/simulateur-salarie.ts +++ b/site/cypress/integration/mon-entreprise/simulateur-salarie.ts @@ -40,6 +40,7 @@ describe('Simulateur salarié : part time contract', function () { .next() .find('button') .click() + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.focused().type('25') cy.contains('Fermer').click() diff --git a/site/source/components/ATInternetTracking/smarttag.js b/site/source/components/ATInternetTracking/smarttag.js index 53639c3ff..bb59a6a0e 100644 --- a/site/source/components/ATInternetTracking/smarttag.js +++ b/site/source/components/ATInternetTracking/smarttag.js @@ -1,3 +1,5 @@ +// @ts-nocheck + // We wrap the whole file into a condition, but it might be preferable to use a // conditionnal import to exclude this whole file from the SSR bundle // https://github.com/vitejs/vite/discussions/6377 diff --git a/site/source/components/Logo.tsx b/site/source/components/Logo.tsx index 5a1ae94f4..95e3c2cbb 100644 --- a/site/source/components/Logo.tsx +++ b/site/source/components/Logo.tsx @@ -19,6 +19,7 @@ export function Logo() { return ( {children} } return ( ({ - ...theme, + theme={{ + ...defaultTheme, colors: { - ...theme.colors, - bases: { ...theme.colors.bases, primary: PALETTE }, + ...defaultTheme.colors, + bases: { ...defaultTheme.colors.bases, primary: PALETTE }, }, - })} + }} > {/* This div is only used to set the CSS variables */}
['as'] + bodyAs?: keyof ReactHTML | IStyledComponent<'web'> children: React.ReactNode className?: string compact?: boolean diff --git a/site/source/design-system/field/NumberField.tsx b/site/source/design-system/field/NumberField.tsx index 59e9351e6..9116a8631 100644 --- a/site/source/design-system/field/NumberField.tsx +++ b/site/source/design-system/field/NumberField.tsx @@ -377,6 +377,7 @@ function useSimpleNumberFieldState( inputValue, decrement, increment, + setNumberValue, minValue: props.minValue ?? -Infinity, maxValue: props.maxValue ?? Infinity, canIncrement: true, diff --git a/site/source/design-system/layout/Grid.tsx b/site/source/design-system/layout/Grid.tsx index 5ec399bf8..a4d4800b7 100644 --- a/site/source/design-system/layout/Grid.tsx +++ b/site/source/design-system/layout/Grid.tsx @@ -62,8 +62,8 @@ type GridProps = */ export default function FluidGrid(props: GridProps) { if (props.container === true) { - const { container, item, ...containerProps } = props // Omit props.container and props.item // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { container, item, ...containerProps } = props // Omit props.container and props.item return } else if (props.item === true) { diff --git a/site/source/design-system/layout/index.ts b/site/source/design-system/layout/index.ts deleted file mode 100644 index f004adc9b..000000000 --- a/site/source/design-system/layout/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { styled } from 'styled-components' - -export { default as Container } from './Container' -export { default as Grid } from './Grid' - -export const Spacing = styled.div< - | { xxl: true } - | { xl: true } - | { lg: true } - | { md: true } - | { sm: true } - | { xs: true } - | { xxs: true } ->` - min-height: ${({ theme, ...props }) => - 'xxl' in props - ? theme.spacings.xxl - : 'xl' in props - ? theme.spacings.xl - : 'lg' in props - ? theme.spacings.lg - : 'md' in props - ? theme.spacings.md - : 'sm' in props - ? theme.spacings.sm - : 'xs' in props - ? theme.spacings.xs - : theme.spacings.xxs}; -` diff --git a/site/source/design-system/layout/index.tsx b/site/source/design-system/layout/index.tsx index dda93c517..eaad09517 100644 --- a/site/source/design-system/layout/index.tsx +++ b/site/source/design-system/layout/index.tsx @@ -4,7 +4,8 @@ import { Theme } from '@/types/styled' export { default as Container } from './Container' export { default as Grid } from './Grid' -type SpacingProps = + +type SpacingProps = ( | { xxl: true } | { xl: true } | { lg: true } @@ -12,6 +13,9 @@ type SpacingProps = | { sm: true } | { xs: true } | { xxs: true } +) & { + className?: string +} export function Spacing(props: SpacingProps) { return ( @@ -21,6 +25,7 @@ export function Spacing(props: SpacingProps) { (key) => key in props ) ?? 'md' } + className={props.className} /> ) } diff --git a/site/source/design-system/popover/Popover.tsx b/site/source/design-system/popover/Popover.tsx index ad115c856..e3c99135d 100644 --- a/site/source/design-system/popover/Popover.tsx +++ b/site/source/design-system/popover/Popover.tsx @@ -72,7 +72,7 @@ export default function Popover( aria-label={t('Fond de la boite de dialogue')} > - + 'transparent'}> { const idxs = fuzzy.filter(list, value, cache) + if (!idxs) { + return { + idxs: [], + info: { + idx: [], + }, + order: [], + } + } const info = fuzzy.info(idxs, list, value) const order = fuzzy.sort(info, list, value) diff --git a/site/source/pages/nouveautés/index.tsx b/site/source/pages/nouveautés/index.tsx index fb6e46937..d114c2fde 100644 --- a/site/source/pages/nouveautés/index.tsx +++ b/site/source/pages/nouveautés/index.tsx @@ -90,7 +90,7 @@ export default function Nouveautés() { - +