Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Use popover for pages menu on screens betweween md and lg (#2051)
Olga Bulat0272a04ceadf
diff --git a/package.json b/package.jsonindex d30eaba76..fd10bd1c8 100644--- a/package.json+++ b/package.json@@ -120,7 +120,7 @@"@nuxtjs/storybook": "^4.3.2","@nuxtjs/style-resources": "^1.0.0","@pinia/testing": "^0.0.12",- "@playwright/test": "1.28.1",+ "@playwright/test": "1.29.1","@testing-library/dom": "^8.13.0","@testing-library/jest-dom": "^5.16.1","@testing-library/user-event": "^13.5.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 529eb1fa3..13e53a3a7 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -24,7 +24,7 @@ specifiers:'@nuxtjs/svg': ^0.4.0'@pinia/nuxt': 0.2.1'@pinia/testing': ^0.0.12- '@playwright/test': 1.28.1+ '@playwright/test': 1.29.1'@popperjs/core': ^2.11.2'@tailwindcss/line-clamp': ^0.3.1'@tailwindcss/typography': ^0.5.2@@ -169,7 +169,7 @@ devDependencies:'@nuxtjs/storybook': 4.3.2_c7rcwnrjdenw7mazule26goei4'@nuxtjs/style-resources': 1.2.1'@pinia/testing': [email protected][email protected]- '@playwright/test': 1.28.1+ '@playwright/test': 1.29.1'@testing-library/dom': 8.13.0'@testing-library/jest-dom': 5.16.1'@testing-library/user-event': 13.5.0_tlwynutqiyp5mns3woioasuxnq@@ -3154,13 +3154,13 @@ packages:- vuedev: true- /@playwright/test/1.28.1:- resolution: {integrity: sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==}+ /@playwright/test/1.29.1:+ resolution: {integrity: sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w==}engines: {node: '>=14'}hasBin: truedependencies:'@types/node': 17.0.32- playwright-core: 1.28.1+ playwright-core: 1.29.1dev: true/@polka/url/1.0.0-next.21:@@ -14005,8 +14005,8 @@ packages:find-up: 5.0.0dev: true- /playwright-core/1.28.1:- resolution: {integrity: sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==}+ /playwright-core/1.29.1:+ resolution: {integrity: sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg==}engines: {node: '>=14'}hasBin: truedev: truediff --git a/src/components/VHeader/VHeaderInternal.vue b/src/components/VHeader/VHeaderInternal.vueindex 53e4f02e8..07f4164d2 100644--- a/src/components/VHeader/VHeaderInternal.vue+++ b/src/components/VHeader/VHeaderInternal.vue@@ -1,61 +1,86 @@<template><header- class="main-header z-30 flex h-20 w-full items-stretch justify-between gap-x-2 bg-white py-4 pe-3 ps-6 md:py-4 md:px-7"+ ref="nodeRef"+ class="main-header z-30 flex h-20 w-full items-stretch justify-between gap-x-2 border-b border-tx bg-white py-4 ps-2 pe-3 md:py-4 lg:ps-6 lg:pe-10">- <VHomeLink variant="dark" />- <nav class="md:justify-stretch hidden ms-auto md:flex">+ <VHomeLink variant="dark" class="px-4 hover:bg-yellow" />+ <nav class="lg:justify-stretch hidden ms-auto lg:flex"><VPageLinksmode="light"- class="md:justify-stretch flex hidden flex-row items-center gap-8 text-sm ms-auto md:flex"- nav-link-classes="ps-3"- @close="closeModal"+ class="md:justify-stretch hidden items-center gap-8 text-sm ms-auto md:flex"+ nav-link-classes="ms-3"+ @close="closePageMenu"/></nav>- <div class="flex md:hidden">- <VModal- :label="$t('header.aria.menu').toString()"- variant="full"- mode="dark"- modal-content-classes="flex md:hidden"- :visible="isModalVisible"- @open="openModal"- >- <template #trigger="{ a11yProps }">- <VIconButton- ref="menuButtonRef"- :icon-props="{ iconPath: menuIcon }"- :aria-label="$t('header.aria.menu')"- v-bind="a11yProps"- class="border-tx hover:bg-dark-charcoal hover:text-white"+ <div class="flex lg:hidden">+ <VIconButton+ id="menu-button"+ ref="menuButtonRef"+ :icon-props="{ iconPath: menuIcon }"+ :aria-label="$t('header.aria.menu')"+ v-bind="triggerA11yProps"+ class="border-tx hover:bg-dark-charcoal hover:text-white"+ :class="{ 'bg-dark-charcoal text-white': isModalVisible }"+ @click="onTriggerClick"+ />+ <template v-if="triggerElement">+ <VPopoverContent+ v-if="isSm"+ z-index="popover"+ :hide="closePageMenu"+ :visible="isModalVisible"+ :trigger-element="triggerElement"+ aria-labelledby="menu-button"+ >+ <VPageLinks+ mode="dark"+ variant="itemgroup"+ class="label-regular w-50 items-start"+ @close="closePageMenu"/>- </template>-- <template #top-bar>- <div- class="flex h-20 w-full justify-between bg-dark-charcoal py-4 text-white pe-3 ps-6"- >- <VHomeLink variant="light" />- <VIconButton- ref="closeButton"- :icon-props="{ iconPath: closeIcon }"- class="border-tx text-white focus-visible:ring-offset-tx"- :aria-label="$t('modal.close')"- @click="closeModal"- />- </div>- </template>- <template #default>- <nav>- <VPageLinks+ </VPopoverContent>+ <VModalContent+ v-else-if="!isSm"+ aria-labelledby="menu-button"+ :hide="closePageMenu"+ variant="full"+ mode="dark"+ modal-content-classes="flex sm:hidden"+ :visible="isModalVisible"+ @open="openPageMenu"+ >+ <template #top-bar>+ <div class="flex h-20 w-full justify-between py-4 pe-3 ps-6">+ <VHomeLink+ variant="light"+ class="focus-visible:ring-yellow focus-visible:ring-offset-0"+ />+ <VIconButton+ ref="closeButton"+ :icon-props="{ iconPath: closeIcon }"+ class="border-tx text-white focus-visible:ring-yellow focus-visible:ring-offset-0"+ :aria-label="$t('modal.close')"+ @click="closePageMenu"+ />+ </div>+ </template>+ <template #default>+ <nav>+ <VPageLinks+ mode="dark"+ class="mt-3 flex flex-col items-end gap-y-6"+ nav-link-classes="text-white text-3xl focus-visible:ring-yellow"+ :is-in-modal="true"+ @close="closePageMenu"+ />+ </nav>+ <VWordPressLink+ class="mt-auto focus-visible:ring-yellow focus-visible:ring-offset-0"mode="dark"- class="mt-3 flex flex-col items-end gap-y-2"- nav-link-classes="heading-5 py-3"- @close="closeModal"/>- </nav>- <VWordPressLink class="mt-auto" mode="dark" />- </template>- </VModal>+ </template>+ </VModalContent>+ </template></div></header></template>@@ -69,6 +94,7 @@ import {watch,} from "@nuxtjs/composition-api"+import { useDialogControl } from "~/composables/use-dialog-control"import usePages from "~/composables/use-pages"import { useUiStore } from "~/stores/ui"@@ -76,8 +102,8 @@ import { useUiStore } from "~/stores/ui"import VHomeLink from "~/components/VHeader/VHomeLink.vue"import VIconButton from "~/components/VIconButton/VIconButton.vue"import VPageLinks from "~/components/VHeader/VPageLinks.vue"-import VModal from "~/components/VModal/VModal.vue"-+import VModalContent from "~/components/VModal/VModalContent.vue"+import VPopoverContent from "~/components/VPopover/VPopoverContent.vue"import VWordPressLink from "~/components/VHeader/VWordPressLink.vue"import closeIcon from "~/assets/icons/close.svg"@@ -86,40 +112,55 @@ import menuIcon from "~/assets/icons/menu.svg"export default defineComponent({name: "VHeaderInternal",components: {- VWordPressLink,+ VModalContent,+ VPopoverContent,VHomeLink,VIconButton,- VModal,VPageLinks,+ VWordPressLink,},- setup() {+ setup(_, { emit }) {const menuButtonRef = ref<InstanceType<typeof VIconButton> | null>(null)+ const nodeRef = ref<HTMLElement | null>(null)++ const uiStore = useUiStore()const route = useRoute()const { all: allPages, current: currentPage } = usePages(true)const isModalVisible = ref(false)- const closeModal = () => (isModalVisible.value = false)- const openModal = () => (isModalVisible.value = true)++ const isSm = computed(() => uiStore.isBreakpoint("sm"))++ const triggerElement = computed(+ () => (menuButtonRef.value?.$el as HTMLElement) || null+ )++ const lockBodyScroll = computed(() => !isSm.value)++ const {+ close: closePageMenu,+ open: openPageMenu,+ onTriggerClick,+ triggerA11yProps,+ } = useDialogControl({+ visibleRef: isModalVisible,+ nodeRef,+ lockBodyScroll,+ emit,+ })// When clicking on an internal link in the modal, close the modalwatch(route, () => {if (isModalVisible.value) {- closeModal()- }- })-- const uiStore = useUiStore()- const isDesktopLayout = computed(() => uiStore.isDesktopLayout)- watch(isDesktopLayout, (isDesktop) => {- if (isDesktop && isModalVisible.value) {- closeModal()+ closePageMenu()}})return {menuButtonRef,+ nodeRef,closeIcon,menuIcon,@@ -128,8 +169,12 @@ export default defineComponent({currentPage,isModalVisible,- closeModal,- openModal,+ closePageMenu,+ openPageMenu,+ isSm,+ onTriggerClick,+ triggerA11yProps,+ triggerElement,}},})diff --git a/src/components/VHeader/VHeaderMobile/VContentSettingsButton.vue b/src/components/VHeader/VHeaderMobile/VContentSettingsButton.vueindex e272b86f4..fddc178c0 100644--- a/src/components/VHeader/VHeaderMobile/VContentSettingsButton.vue+++ b/src/components/VHeader/VHeaderMobile/VContentSettingsButton.vue@@ -1,5 +1,6 @@<template><VSearchBarButton+ id="content-settings-button":icon-path="sourceIcon":aria-label="appliedFilterCount@@ -10,6 +11,7 @@:aria-expanded="isPressed"aria-controls="content-settings-modal"inner-area-classes="bg-white hover:bg-dark-charcoal hover:text-white"+ v-on="$listeners"><template #notification><spandiff --git a/src/components/VHeader/VHeaderMobile/VContentSettingsModal.vue b/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vuesimilarity index 82%rename from src/components/VHeader/VHeaderMobile/VContentSettingsModal.vuerename to src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vueindex 80135790e..0ce4e3a47 100644--- a/src/components/VHeader/VHeaderMobile/VContentSettingsModal.vue+++ b/src/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue@@ -1,18 +1,12 @@<template>- <VModal- ref="contentSettingsModalRef"- :label="$t('header.aria.menu').toString()"+ <VModalContent+ :aria-label="$t('header.aria.menu').toString()":hide-on-click-outside="true"+ :hide="close"+ :visible="visible"variant="two-thirds"class="flex items-center">- <template #trigger="{ visible, a11Props }">- <VContentSettingsButton- :is-pressed="visible"- :applied-filter-count="appliedFilterCount"- v-bind="a11Props"- />- </template><VTabs:selected-id="selectedTab"tablist-style="ps-6 pe-2"@@ -32,7 +26,7 @@class="self-center ms-auto hover:bg-dark-charcoal hover:text-white":icon-props="{ iconPath: closeIcon }":aria-label="$t('modal.aria-close')"- @click="closeModal"+ @click="close"/></template><VTabPanel id="content-settings">@@ -55,9 +49,9 @@@click="clearFilters">{{ clearFiltersLabel }}</VButton>- <VShowResultsButton :is-fetching="isFetching" @click="closeModal" />+ <VShowResultsButton :is-fetching="isFetching" @click="close" /></footer>- </VModal>+ </VModalContent></template><script lang="ts">import { computed, defineComponent, ref } from "@nuxtjs/composition-api"@@ -67,9 +61,8 @@ import { useSearchStore } from "~/stores/search"import { useI18n } from "~/composables/use-i18n"import VButton from "~/components/VButton.vue"-import VContentSettingsButton from "~/components/VHeader/VHeaderMobile/VContentSettingsButton.vue"+import VModalContent from "~/components/VModal/VModalContent.vue"import VIconButton from "~/components/VIconButton/VIconButton.vue"-import VModal from "~/components/VModal/VModal.vue"import VSearchGridFilter from "~/components/VFilters/VSearchGridFilter.vue"import VSearchTypes from "~/components/VContentSwitcher/VSearchTypes.vue"import VShowResultsButton from "~/components/VHeader/VHeaderMobile/VShowResultsButton.vue"@@ -80,12 +73,11 @@ import VTabs from "~/components/VTabs/VTabs.vue"import closeIcon from "~/assets/icons/close-small.svg"export default defineComponent({- name: "VContentSettingsModal",+ name: "VContentSettingsModalContent",components: {+ VModalContent,VButton,- VContentSettingsButton,VIconButton,- VModal,VSearchGridFilter,VSearchTypes,VShowResultsButton,@@ -98,11 +90,16 @@ export default defineComponent({type: Boolean,default: false,},+ close: {+ type: Function,+ required: true,+ },+ visible: {+ type: Boolean,+ default: false,+ },},setup() {- const contentSettingsModalRef = ref<InstanceType<typeof VModal> | null>(- null- )const i18n = useI18n()const searchStore = useSearchStore()const selectedTab = ref<"content-settings" | "filters">("content-settings")@@ -129,14 +126,8 @@ export default defineComponent({searchStore.clearFilters()}- const closeModal = () => {- contentSettingsModalRef.value?.close()- }-return {- contentSettingsModalRef,closeIcon,- closeModal,selectedTab,changeSelectedTab,diff --git a/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue b/src/components/VHeader/VHeaderMobile/VHeaderMobile.vueindex 8b6984617..762413b72 100644--- a/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue+++ b/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue@@ -1,5 +1,6 @@<template><header+ ref="headerRef"class="main-header z-30 flex w-full items-center border-b border-tx bg-white px-6 py-4":class="{ 'border-dark-charcoal-20': isHeaderScrolled }">@@ -7,9 +8,10 @@class="flex w-full"variant="recent-searches":is-active="isRecentSearchesModalOpen"+ aria-label="inputmodal"@close="deactivate">- <div class="flex w-full" :class="isRecentSearchesModalOpen ? 'px-2' : ''">+ <div class="flex w-full" :class="{ 'px-2': isRecentSearchesModalOpen }"><formclass="search-bar group flex h-12 w-full flex-row items-center overflow-hidden rounded-sm":class="@@ -76,9 +78,19 @@>{{ searchStatus }}</span>- <VContentSettingsModal+ <VContentSettingsButtonv-show="!searchBarIsActive"+ :is-pressed="contentSettingsOpen"+ :applied-filter-count="appliedFilterCount"+ v-bind="triggerA11yProps"+ @click="toggleContentSettings"+ />+ <VContentSettingsModalContent+ v-show="!searchBarIsActive"+ :visible="contentSettingsOpen":is-fetching="isFetching"+ :close="closeContentSettings"+ labelledby="content-settings-button"/></slot></form>@@ -115,6 +127,7 @@ import { keycodes } from "~/constants/key-codes"import { IsHeaderScrolledKey } from "~/types/provides"+import { useDialogControl } from "~/composables/use-dialog-control"import { useI18n } from "~/composables/use-i18n"import { useI18nResultsCount } from "~/composables/use-i18n-utilities"@@ -123,7 +136,8 @@ import { isSearchTypeSupported, useSearchStore } from "~/stores/search"import VLogoButton from "~/components/VHeader/VLogoButton.vue"import VInputModal from "~/components/VModal/VInputModal.vue"-import VContentSettingsModal from "~/components/VHeader/VHeaderMobile/VContentSettingsModal.vue"+import VContentSettingsModalContent from "~/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue"+import VContentSettingsButton from "~/components/VHeader/VHeaderMobile/VContentSettingsButton.vue"import VRecentSearches from "~/components/VRecentSearches/VRecentSearches.vue"import VSearchBarButton from "~/components/VHeader/VHeaderMobile/VSearchBarButton.vue"@@ -138,14 +152,16 @@ import chevronLeftIcon from "~/assets/icons/chevron-left.svg"export default defineComponent({name: "VHeaderMobile",components: {- VContentSettingsModal,+ VContentSettingsModalContent,+ VContentSettingsButton,VInputModal,VLogoButton,VRecentSearches,VSearchBarButton,},- setup() {+ setup(_, { emit }) {const searchInputRef = ref<HTMLInputElement | null>(null)+ const headerRef = ref<HTMLElement | null>(null)const mediaStore = useMediaStore()const searchStore = useSearchStore()@@ -153,6 +169,7 @@ export default defineComponent({const router = useRouter()const searchBarIsActive = ref(false)+ const contentSettingsOpen = ref(false)const isHeaderScrolled = inject(IsHeaderScrolledKey)@@ -243,6 +260,7 @@ export default defineComponent({}}})+ const appliedFilterCount = computed(() => searchStore.appliedFilterCount)const updateSearchText = (event: Event) => {searchTerm.value = (event.target as HTMLInputElement).value@@ -324,14 +342,34 @@ export default defineComponent({() => isRecentSearchesModalOpen.value && entries.value.length > 0)+ const {+ close: closeContentSettings,+ open: openContentSettings,+ onTriggerClick: toggleContentSettings,+ triggerA11yProps,+ } = useDialogControl({+ visibleRef: contentSettingsOpen,+ nodeRef: headerRef,+ emit,+ })+return {chevronLeftIcon: chevronLeftIcon as unknown as string,closeIcon: closeIcon as unknown as string,searchInputRef,+ headerRef,isHeaderScrolled,isFetching,+ appliedFilterCount,++ contentSettingsOpen,+ openContentSettings,+ closeContentSettings,+ toggleContentSettings,+ triggerA11yProps,+isRecentSearchesModalOpen,showRecentSearches,searchBarIsActive,diff --git a/src/components/VHeader/VPageLinks.vue b/src/components/VHeader/VPageLinks.vueindex 0077a5fc8..5aeefb501 100644--- a/src/components/VHeader/VPageLinks.vue+++ b/src/components/VHeader/VPageLinks.vue@@ -1,19 +1,52 @@<template>- <ul- :class="- mode === 'light' ? 'text-dark-charcoal' : 'bg-dark-charcoal text-white'- "+ <VItemGroup+ v-if="variant === 'itemgroup'"+ class="min-w-50 my-2 gap-y-2"+ :bordered="false"+ :show-check="false">- <VNavLink- v-for="page in allPages"- :key="page.id"- :link="page.link"- :mode="mode"- :is-active="currentPage === page.id"- :class="navLinkClasses"- @click="onClick(page.link)"- >{{ $t(page.name) }}</VNavLink+ <VItem+ v-for="(page, i) of allPages"+ :key="i"+ as="VLink"+ :is-first="i === 0"+ :selected="currentPage === page.id"+ :href="page.link"+ class="w-full"+ @click="onClick">+ <div class="flex w-full flex-row justify-between">+ <span class="pe-2">{{ $t(page.name) }}</span>+ <VIcon+ v-if="isLinkExternal(page)"+ :icon-path="externalLinkIcon"+ :size="4"+ class="self-center"+ rtl-flip+ />+ </div>+ </VItem>+ </VItemGroup>+ <ul v-else>+ <li v-for="page in allPages" :key="page.id">+ <VLink+ class="flex flex-row rounded-sm hover:underline focus-visible:outline-none focus-visible:ring focus-visible:ring-offset-tx disabled:text-dark-charcoal-40"+ :class="[+ { 'font-semibold': currentPage === page.id },+ { 'text-dark-charcoal focus-visible:ring-pink': mode === 'light' },+ navLinkClasses,+ ]"+ :href="page.link"+ @click="onClick"+ >{{ $t(page.name)+ }}<VIcon+ v-if="isLinkExternal(page)"+ :icon-path="externalLinkIcon"+ :size="externalIconSize"+ class="self-center ms-2"+ rtl-flip+ /></VLink>+ </li></ul></template>@@ -21,17 +54,25 @@import {type PropType,defineComponent,- useRoute,+ computed,} from "@nuxtjs/composition-api"import usePages from "~/composables/use-pages"-import VNavLink from "~/components/VNavLink/VNavLink.vue"+import VItemGroup from "~/components/VItemGroup/VItemGroup.vue"+import VItem from "~/components/VItemGroup/VItem.vue"+import VIcon from "~/components/VIcon/VIcon.vue"+import VLink from "~/components/VLink.vue"++import externalLinkIcon from "~/assets/icons/external-link.svg"export default defineComponent({name: "VPageLinks",components: {- VNavLink,+ VIcon,+ VItem,+ VItemGroup,+ VLink,},props: {/**@@ -53,21 +94,34 @@ export default defineComponent({type: String,default: "",},+ variant: {+ type: String as PropType<"links" | "itemgroup">,+ default: "links",+ },+ isInModal: {+ type: Boolean,+ default: false,+ },},- setup(_, { emit }) {+ setup(props, { emit }) {const { all: allPages, current: currentPage } = usePages(true)- const route = useRoute()- const onClick = (link: string) => {- if (link === route.value.path) {- emit("close")- }- }+ // The modal isn't closed if we click on the current page link,+ // so we need to close it manually.+ const onClick = () => emit("close")++ const isLinkExternal = (item: typeof allPages[number]) =>+ !item.link.startsWith("/")++ const externalIconSize = computed(() => (props.isInModal ? 6 : 4))return {allPages,currentPage,onClick,+ isLinkExternal,+ externalLinkIcon,+ externalIconSize,}},})diff --git a/src/components/VHeader/meta/VContentSettingsModal.stories.mdx b/src/components/VHeader/meta/VContentSettingsModal.stories.mdxindex 20fe95716..4448a691f 100644--- a/src/components/VHeader/meta/VContentSettingsModal.stories.mdx+++ b/src/components/VHeader/meta/VContentSettingsModal.stories.mdx@@ -6,12 +6,11 @@ import {Story,} from "@storybook/addon-docs"-import VContentSettingsModal from "~/components/VHeader/VHeaderMobile/VContentSettingsModal.vue"-import VModalTarget from "~/components/VModal/VModalTarget"+import VContentSettingsModalContent from "~/components/VHeader/VHeaderMobile/VContentSettingsModalContent.vue"<Meta- title="Components/VHeader/VHeaderMobile/VContentSettingsModal"- components={VContentSettingsModal}+ title="Components/VHeader/VHeaderMobile/VContentSettingsModalContent"+ components={VContentSettingsModalContent}argTypes={{close: {action: "close",@@ -26,8 +25,8 @@ import VModalTarget from "~/components/VModal/VModalTarget"/>export const Template = (args) => ({- template: `<div><VContentSettingsModal v-bind="args" v-on="args"/><VModalTarget /></div>`,- components: { VContentSettingsModal, VModalTarget },+ template: `<VContentSettingsModalContent v-bind="args" v-on="args" close="" />`,+ components: { VContentSettingsModalContent },setup() {return { args }},diff --git a/src/components/VItemGroup/VItem.vue b/src/components/VItemGroup/VItem.vueindex 5883f31f7..7184ce906 100644--- a/src/components/VItemGroup/VItem.vue+++ b/src/components/VItemGroup/VItem.vue@@ -6,10 +6,13 @@[`border border-dark-charcoal-20 ${$style[`${contextProps.direction}-bordered`]}`]: contextProps.bordered,- 'bg-dark-charcoal-10': selected && contextProps.bordered,+ 'bg-dark-charcoal-10':+ selected && contextProps.bordered && contextProps.showCheck,'px-2': isInPopover,'hover:bg-dark-charcoal-10': !isInPopover,[$style[`${contextProps.direction}-popover-item`]]: isInPopover,+ 'has-check': contextProps.showCheck,+ 'font-semibold': selected && !contextProps.showCheck,}"><VButton@@ -19,8 +22,11 @@:class="[$style[`${contextProps.direction}-button`],$style[`${contextProps.size}-button`],- selected && 'bg-dark-charcoal-10 ring-offset-dark-charcoal-10',+ selected &&+ contextProps.showCheck &&+ 'bg-dark-charcoal-10 ring-offset-dark-charcoal-10',as === 'VLink' && 'text-dark-charcoal',+ !contextProps.showCheck && 'px-2',]"variant="plain"size="disabled"@@ -43,7 +49,11 @@<slot name="default" /></div><VIcon- v-if="selected && contextProps.direction === 'vertical'"+ v-if="+ selected &&+ contextProps.direction === 'vertical' &&+ contextProps.showCheck+ "class="absolute end-2 lg:end-5":icon-path="checkmark"/>@@ -191,7 +201,11 @@ export default defineComponent({}.vertical-content {- @apply flex flex-row items-center pe-8 lg:pe-8;+ @apply flex flex-row items-center;+}++.has-check .vertical-content {+ @apply pe-8 lg:pe-8;}.vertical-popover-item {diff --git a/src/components/VItemGroup/VItemGroup.vue b/src/components/VItemGroup/VItemGroup.vueindex 395bf93d1..2bb819975 100644--- a/src/components/VItemGroup/VItemGroup.vue+++ b/src/components/VItemGroup/VItemGroup.vue@@ -107,6 +107,15 @@ export default defineComponent({validate: (v: string) =>(itemGroupSizes as unknown as string[]).includes(v),},+ /**+ * Whether to show a checkmark when an item is selected.+ *+ * @default true+ */+ showCheck: {+ type: Boolean,+ default: true,+ },},setup(props) {const nodeRef = ref<HTMLElement | null>(null)diff --git a/src/components/VLink.vue b/src/components/VLink.vueindex e5d21df26..8f1aa4597 100644--- a/src/components/VLink.vue+++ b/src/components/VLink.vue@@ -23,7 +23,7 @@v-if="showExternalIcon && !isInternal":icon-path="externalLinkIcon"class="inline-block"- :size="4"+ :size="externalIconSize"rtl-flip/></a>@@ -63,12 +63,21 @@ export default defineComponent({type: Boolean,default: false,},+ /**+ * The size of external link icon.+ */+ externalIconSize: {+ type: Number,+ default: 4,+ },},setup(props) {const { app } = useContext()- function checkHref(- p: typeof props- ): p is { href: string; showExternalIcon: boolean } {+ function checkHref(p: typeof props): p is {+ href: string+ showExternalIcon: boolean+ externalIconSize: number+ } {return typeof p.href === "string" && !["", "#"].includes(p.href)}diff --git a/src/components/VModal/VInputModal.vue b/src/components/VModal/VInputModal.vueindex 1df365b45..a56ee267d 100644--- a/src/components/VModal/VInputModal.vue+++ b/src/components/VModal/VInputModal.vue@@ -24,17 +24,15 @@import {defineComponent,ref,- watch,toRef,ComponentInstance,+ SetupContext,} from "@nuxtjs/composition-api"import { Portal as VTeleport } from "portal-vue"-import { useBodyScrollLock } from "~/composables/use-body-scroll-lock"import { useDialogContent } from "~/composables/use-dialog-content"--import type { SetupContext } from "vue"+import { useDialogControl } from "~/composables/use-dialog-control"export default defineComponent({name: "VInputModal",@@ -66,66 +64,43 @@ export default defineComponent({*/"close",],- setup(props, { emit }) {+ setup(props, { attrs, emit }) {const focusTrapRef = ref<ComponentInstance | null>(null)const visibleRef = toRef(props, "isActive")- const internalVisibleRef = ref<boolean>(- props.isActive === undefined ? false : visibleRef.value- )const nodeRef = ref<HTMLElement | null>(null)-- /**- * When the `visible` prop is set to a different value than internalVisibleRef,- * we update the internalVisibleRef to match the prop.- */- watch(visibleRef, (visible) => {- if (visible === undefined || visible === internalVisibleRef.value) return-- if (visible) {- open()- } else {- close()- }+ const { close } = useDialogControl({+ visibleRef,+ nodeRef,+ emit: emit as SetupContext["emit"],})- const { lock, unlock } = useBodyScrollLock({ nodeRef })-- const open = () => {- internalVisibleRef.value = true- lock()- if (props.isActive !== internalVisibleRef.value) {- emit("open")- }- }-- const close = () => {- internalVisibleRef.value = false- unlock()- emit("close")- }-const dialogRef = ref<HTMLElement | null>(null)const { onKeyDown, onBlur } = useDialogContent({- dialogRef,+ dialogElements: {+ dialogRef,+ triggerElementRef: ref(null),+ initialFocusElementRef: ref(null),+ },+ dialogOptions: {+ autoFocusOnHideRef: ref(false),+ hideOnClickOutsideRef: ref(false),+ hideOnEscRef: ref(true),+ trapFocusRef: ref(true),+ },visibleRef: toRef(props, "isActive"),- autoFocusOnShowRef: ref(true),- autoFocusOnHideRef: ref(false),- triggerElementRef: ref(null),- hideOnClickOutsideRef: ref(false),- trapFocusRef: ref(true),hideRef: ref(close),- hideOnEscRef: ref(true),emit: emit as SetupContext["emit"],+ attrs,})return {focusTrapRef,dialogRef,nodeRef,- internalVisibleRef,+ visibleRef,close,onKeyDown,diff --git a/src/components/VModal/VModal.vue b/src/components/VModal/VModal.vueindex ceb76b778..0a84c1747 100644--- a/src/components/VModal/VModal.vue+++ b/src/components/VModal/VModal.vue@@ -10,11 +10,12 @@<slotname="trigger":a11y-props="triggerA11yProps"- :visible="internalVisibleRef"+ :visible="visibleRef"/></div><VModalContent- :visible="internalVisibleRef"+ v-if="triggerRef"+ :visible="visibleRef":trigger-element="triggerRef":hide-on-esc="hideOnEsc":hide-on-click-outside="hideOnClickOutside"@@ -40,18 +41,16 @@import {defineComponent,ref,- watch,- reactive,computed,toRef,PropType,- Ref,+ SetupContext,} from "@nuxtjs/composition-api"-import { useBodyScrollLock } from "~/composables/use-body-scroll-lock"-import type { ModalColorMode, ModalVariant } from "~/types/modal"+import { useDialogControl } from "~/composables/use-dialog-control"+import VModalContent from "~/components/VModal/VModalContent.vue"export default defineComponent({@@ -164,72 +163,37 @@ export default defineComponent({"close",],setup(props, { emit }) {- const visibleRef = toRef(props, "visible")- const internalVisibleRef: Ref<boolean> = ref<boolean>(- typeof props.visible === "undefined" ? false : props.visible- )+ const visiblePropRef =+ typeof props.visible === "undefined" ? undefined : toRef(props, "visible")+const nodeRef = ref<null | HTMLElement>(null)const triggerContainerRef = ref<HTMLElement | null>(null)- const triggerA11yProps = reactive({- "aria-expanded": false,- "aria-haspopup": "dialog",- })-const triggerRef = computed(() => triggerContainerRef.value?.firstChild as HTMLElement | undefined)- watch(internalVisibleRef, (visible) => {- triggerA11yProps["aria-expanded"] = visible- })-- /**- * When the `visible` prop is set to a different value than internalVisibleRef,- * we update the internalVisibleRef to match the prop.- */- watch(visibleRef, (visible) => {- if (visible === undefined || visible === internalVisibleRef.value) return-- if (visible) {- open()- } else {- close()- }+ const {+ close,+ open,+ onTriggerClick,+ triggerA11yProps,+ visible: visibleRef,+ } = useDialogControl({+ visibleRef: visiblePropRef,+ nodeRef,+ emit: emit as SetupContext["emit"],})- const { lock, unlock } = useBodyScrollLock({ nodeRef })-- const open = () => {- internalVisibleRef.value = true- lock()- if (props.visible !== internalVisibleRef.value) {- emit("open")- }- }-- const close = () => {- internalVisibleRef.value = false- unlock()- emit("close")- }-- const onTriggerClick = () => {- if (internalVisibleRef.value) {- close()- } else {- open()- }- }-return {nodeRef,- internalVisibleRef,+ visibleRef,triggerContainerRef,triggerRef,close,+ open,onTriggerClick,triggerA11yProps,}diff --git a/src/components/VModal/VModalContent.vue b/src/components/VModal/VModalContent.vueindex 02fadc045..235b59ee5 100644--- a/src/components/VModal/VModalContent.vue+++ b/src/components/VModal/VModalContent.vue@@ -76,7 +76,6 @@ import {import { Portal as VTeleport } from "portal-vue"import { useDialogContent } from "~/composables/use-dialog-content"-import { warn } from "~/utils/console"import type { ModalColorMode, ModalVariant } from "~/types/modal"@@ -147,10 +146,6 @@ export default defineComponent({},},setup(props, { emit, attrs }) {- if (!attrs["aria-label"] && !attrs["aria-labelledby"]) {- warn("You should provide either `aria-label` or `aria-labelledby` props.")- }-const propsRefs = toRefs(props)const closeButton = ref<InstanceType<typeof VButton> | null>(null)const initialFocusElement = computed(@@ -158,17 +153,22 @@ export default defineComponent({)const dialogRef = ref<HTMLElement | null>(null)const { onKeyDown, onBlur } = useDialogContent({- dialogRef,+ dialogElements: {+ dialogRef,+ initialFocusElementRef: initialFocusElement,+ triggerElementRef: propsRefs.triggerElement,+ },visibleRef: propsRefs.visible,- autoFocusOnShowRef: propsRefs.autoFocusOnShow,- autoFocusOnHideRef: propsRefs.autoFocusOnHide,- trapFocusRef: propsRefs.trapFocus,- triggerElementRef: propsRefs.triggerElement,- hideOnClickOutsideRef: propsRefs.hideOnClickOutside,+ dialogOptions: {+ hideOnEscRef: propsRefs.hideOnEsc,+ hideOnClickOutsideRef: propsRefs.hideOnClickOutside,+ autoFocusOnShowRef: propsRefs.autoFocusOnShow,+ autoFocusOnHideRef: propsRefs.autoFocusOnHide,+ trapFocusRef: propsRefs.trapFocus,+ },hideRef: propsRefs.hide,- hideOnEscRef: propsRefs.hideOnEsc,- initialFocusElementRef: initialFocusElement,emit,+ attrs,})return {@@ -200,7 +200,7 @@ export default defineComponent({}.modal-dark {- @apply bg-dark-charcoal text-white;+ @apply bg-black text-white;}.modal-light {@apply bg-white text-dark-charcoal;@@ -218,7 +218,7 @@ export default defineComponent({@apply overflow-y-hidden rounded-t-md;}.modal-content-dark {- @apply bg-dark-charcoal text-white;+ @apply bg-black text-white;}.modal-content-light {@apply bg-white text-dark-charcoal;diff --git a/src/components/VNavLink/VNavLink.vue b/src/components/VNavLink/VNavLink.vuedeleted file mode 100644index 18b627ef8..000000000--- a/src/components/VNavLink/VNavLink.vue+++ /dev/null@@ -1,41 +0,0 @@-<template>- <li>- <VLink- class="rounded-sm hover:underline focus-visible:outline-none focus-visible:ring focus-visible:ring-pink focus-visible:ring-offset-1 focus-visible:ring-offset-tx disabled:text-dark-charcoal-40"- :class="[- { 'font-semibold': isActive },- mode === 'light' ? 'text-dark-charcoal' : 'text-white',- ]"- show-external-icon- :href="link"- ><slot- /></VLink>- </li>-</template>--<script lang="ts">-import { defineComponent, PropType } from "@nuxtjs/composition-api"--import VLink from "~/components/VLink.vue"--export default defineComponent({- name: "VNavLink",- components: {- VLink,- },- props: {- isActive: {- type: Boolean,- default: false,- },- mode: {- type: String as PropType<"light" | "dark">,- default: "dark",- },- link: {- type: String,- required: true,- },- },-})-</script>diff --git a/src/components/VNavLink/meta/VNavLink.stories.mdx b/src/components/VNavLink/meta/VNavLink.stories.mdxdeleted file mode 100644index 4ff141fa1..000000000--- a/src/components/VNavLink/meta/VNavLink.stories.mdx+++ /dev/null@@ -1,39 +0,0 @@-import {- ArgsTable,- Canvas,- Description,- Meta,- Story,-} from "@storybook/addon-docs"--import VNavLink from "~/components/VNavLink/VNavLink.vue"--export const Template = (args) => ({- template: `<VNavLink link="/about" v-bind="args" v-on="args">About</VNavLink>`,- components: { VNavLink },- setup() {- return { args }- },-})--<Meta- title="Components/VNavLink"- component={VNavLink}- argTypes={{- isActive: { control: { type: "boolean" } },- mode: { control: { type: "select", options: ["dark", "light"] } },- variant: { control: { type: "select", options: ["inline", "column"] } },- link: { control: { type: "text" } },- click: { action: "click" },- }}-/>--# VNavLink--<Description of={VNavLink} />--<ArgsTable of={VNavLink} />--<Canvas>- <Story name="default">{Template.bind({})}</Story>-</Canvas>diff --git a/src/components/VPopover/VPopover.vue b/src/components/VPopover/VPopover.vueindex 38596df5d..5bab9b8a9 100644--- a/src/components/VPopover/VPopover.vue+++ b/src/components/VPopover/VPopover.vue@@ -19,6 +19,7 @@/></div><VPopoverContent+ v-if="triggerRef":z-index="zIndex":visible="visibleRef":trigger-element="triggerRef"@@ -46,14 +47,15 @@import {defineComponent,ref,- watch,- reactive,computed,PropType,+ SetupContext,} from "@nuxtjs/composition-api"import { zIndexValidator } from "~/constants/z-indices"+import { useDialogControl } from "~/composables/use-dialog-control"+import VPopoverContent from "~/components/VPopover/VPopoverContent.vue"import type { Placement, PositioningStrategy } from "@popperjs/core"@@ -155,42 +157,21 @@ export default defineComponent({const visibleRef = ref(false)const triggerContainerRef = ref<HTMLElement | null>(null)- const triggerA11yProps = reactive({- "aria-expanded": false,- "aria-haspopup": "dialog",- })-const triggerRef = computed(() =>triggerContainerRef.value?.firstChild? (triggerContainerRef.value.firstChild as HTMLElement): undefined)- watch(visibleRef, (visible) => {- triggerA11yProps["aria-expanded"] = visible+ const { close, open, onTriggerClick, triggerA11yProps } = useDialogControl({+ visibleRef,+ emit: emit as SetupContext["emit"],})- const open = () => {- visibleRef.value = true- emit("open")- }-- const close = () => {- visibleRef.value = false- emit("close")- }-- const onTriggerClick = () => {- if (visibleRef.value === true) {- close()- } else {- open()- }- }-return {- visibleRef,+ open,close,+ visibleRef,triggerContainerRef,triggerRef,onTriggerClick,diff --git a/src/components/VPopover/VPopoverContent.vue b/src/components/VPopover/VPopoverContent.vueindex 7419d2681..6a6fffb2c 100644--- a/src/components/VPopover/VPopoverContent.vue+++ b/src/components/VPopover/VPopoverContent.vue@@ -27,22 +27,15 @@ import {provide,InjectionKey,PropType,- computed,} from "@nuxtjs/composition-api"-import {- Placement,- placements as popoverPlacements,- PositioningStrategy,-} from "@popperjs/core"-import { usePopoverContent } from "~/composables/use-popover-content"-import { warn } from "~/utils/console"import { defineEvent } from "~/types/emits"import { zIndexValidator } from "~/constants/z-indices"-import type { CSSProperties } from "@vue/runtime-dom"+import type { Placement, PositioningStrategy } from "@popperjs/core"+import type { SetupContext } from "vue"export const VPopoverContentContextKey = Symbol(@@ -80,18 +73,15 @@ export default defineComponent({type: (process.server? Object: HTMLElement) as PropType<HTMLElement | null>,- default: null,+ required: true,},placement: {type: String as PropType<Placement>,default: "bottom-end",- validate: (v: string) =>- (popoverPlacements as unknown as string[]).includes(v),},strategy: {type: String as PropType<PositioningStrategy>,default: "absolute",- validate: (v: string) => ["absolute", "fixed"].includes(v),},zIndex: {type: [String, Number],@@ -111,26 +101,15 @@ export default defineComponent({emits: { keydown: defineEvent(), blur: defineEvent() },setup(props, { emit, attrs }) {provide(VPopoverContentContextKey, true)- if (!attrs["aria-label"] && !attrs["aria-labelledby"]) {- warn("You should provide either `aria-label` or `aria-labelledby` props.")- }const propsRefs = toRefs(props)const popoverRef = ref<HTMLElement | null>(null)- const { onKeyDown, onBlur, maxHeightRef } = usePopoverContent({+ const { onKeyDown, onBlur, heightProperties } = usePopoverContent({popoverRef,popoverPropsRefs: propsRefs,emit: emit as SetupContext["emit"],- })-- const heightProperties = computed(() => {- // extracting this to ensure that computed is updated when the value changes- const maxHeight = maxHeightRef.value-- return maxHeight && props.clippable- ? ({ "--popover-height": `${maxHeight}px` } as CSSProperties)- : ({} as CSSProperties)+ attrs,})return { popoverRef, onKeyDown, onBlur, heightProperties }diff --git a/src/composables/use-dialog-content.ts b/src/composables/use-dialog-content.tsindex b66b881b4..1b0a1bcc0 100644--- a/src/composables/use-dialog-content.ts+++ b/src/composables/use-dialog-content.ts@@ -1,43 +1,77 @@+import { ref } from "@nuxtjs/composition-api"+import { useFocusOnShow } from "~/composables/use-focus-on-show"import { useFocusOnHide } from "~/composables/use-focus-on-hide"import { useHideOnClickOutside } from "~/composables/use-hide-on-click-outside"import { useFocusOnBlur } from "~/composables/use-focus-on-blur"-import type { Ref } from "@nuxtjs/composition-api"-import type { SetupContext } from "vue"+import { warn } from "~/utils/console"++import type { Ref, SetupContext } from "@nuxtjs/composition-api"type Props = {- dialogRef: Ref<HTMLElement | null>+ dialogElements: {+ dialogRef: Ref<HTMLElement | null>+ initialFocusElementRef: Ref<HTMLElement | null>+ triggerElementRef: Ref<HTMLElement | null>+ }+ dialogOptions?: {+ autoFocusOnShowRef?: Ref<boolean>+ autoFocusOnHideRef?: Ref<boolean>+ hideOnClickOutsideRef?: Ref<boolean>+ hideOnEscRef?: Ref<boolean>+ trapFocusRef?: Ref<boolean>+ }visibleRef: Ref<boolean>- autoFocusOnShowRef: Ref<boolean>- autoFocusOnHideRef: Ref<boolean>- trapFocusRef: Ref<boolean>- triggerElementRef: Ref<HTMLElement | null>- hideOnClickOutsideRef: Ref<boolean>- hideOnEscRef: Ref<boolean>- initialFocusElementRef?: Ref<HTMLElement | null>hideRef: Ref<() => void>emit: SetupContext["emit"]+ attrs: SetupContext["attrs"]}-export function useDialogContent({ emit, ...props }: Props) {+export function useDialogContent({+ emit,+ attrs,+ visibleRef,+ hideRef,+ dialogOptions,+ dialogElements: { dialogRef, initialFocusElementRef, triggerElementRef },+}: Props) {+ if (!attrs["aria-label"] && !attrs["aria-labelledby"]) {+ warn("You should provide either `aria-label` or `aria-labelledby` props.")+ }++ const autoFocusOnShowRef = dialogOptions?.autoFocusOnShowRef || ref(true)+ const trapFocusRef = dialogOptions?.trapFocusRef || ref(true)+ const autoFocusOnHideRef = dialogOptions?.autoFocusOnHideRef || ref(true)+ const hideOnClickOutsideRef =+ dialogOptions?.hideOnClickOutsideRef || ref(true)+ const hideOnEscRef = dialogOptions?.hideOnEscRef || ref(true)+const focusOnBlur = useFocusOnBlur({- dialogRef: props.dialogRef,- visibleRef: props.visibleRef,+ dialogRef,+ visibleRef,+ })+ useFocusOnShow({+ dialogRef,+ visibleRef,+ initialFocusElementRef,++ autoFocusOnShowRef,+ trapFocusRef,})- useFocusOnShow(props)useFocusOnHide({- dialogRef: props.dialogRef,- triggerElementRef: props.triggerElementRef,- visibleRef: props.visibleRef,- autoFocusOnHideRef: props.autoFocusOnHideRef,+ dialogRef,+ triggerElementRef,+ visibleRef,+ autoFocusOnHideRef,})useHideOnClickOutside({- dialogRef: props.dialogRef,- visibleRef: props.visibleRef,- hideOnClickOutsideRef: props.hideOnClickOutsideRef,- triggerElementRef: props.triggerElementRef,- hideRef: props.hideRef,+ dialogRef,+ triggerElementRef,++ hideOnClickOutsideRef,+ hideRef,+ visibleRef,})const onKeyDown = (event: KeyboardEvent) => {@@ -45,10 +79,10 @@ export function useDialogContent({ emit, ...props }: Props) {if (event.defaultPrevented) returnif (event.key !== "Escape") return- if (!props.hideOnEscRef.value) return+ if (!hideOnEscRef.value) returnevent.stopPropagation()- props.hideRef.value()+ hideRef.value()}const onBlur = (event: FocusEvent) => {diff --git a/src/composables/use-dialog-control.ts b/src/composables/use-dialog-control.tsnew file mode 100644index 000000000..fc115e28d--- /dev/null+++ b/src/composables/use-dialog-control.ts@@ -0,0 +1,72 @@+import {+ computed,+ ComputedRef,+ reactive,+ ref,+ Ref,+ SetupContext,+ unref,+ watch,+} from "@nuxtjs/composition-api"++import { useBodyScrollLock } from "~/composables/use-body-scroll-lock"++export function useDialogControl({+ visibleRef,+ nodeRef,+ lockBodyScroll,+ emit,+}: {+ visibleRef?: Ref<boolean>+ nodeRef?: Ref<HTMLElement | null>+ lockBodyScroll?: ComputedRef<boolean> | boolean+ emit: SetupContext["emit"]+}) {+ const internallyControlled = typeof visibleRef === "undefined"+ const internalVisibleRef = internallyControlled ? ref(false) : visibleRef++ const triggerA11yProps = reactive({+ "aria-expanded": false,+ "aria-haspopup": "dialog",+ })++ watch(internalVisibleRef, (visible) => {+ triggerA11yProps["aria-expanded"] = visible+ if (shouldLockBodyScroll.value) {+ visible ? lock() : unlock()+ }+ if (!internallyControlled) emit(visible ? "open" : "close")+ })++ let lock = () => {+ /** */+ },+ unlock = () => {+ /** */+ }+ if (nodeRef) {+ const bodyScroll = useBodyScrollLock({ nodeRef })+ lock = bodyScroll.lock+ unlock = bodyScroll.unlock+ }+ const shouldLockBodyScroll = computed(() => unref(lockBodyScroll) ?? true)+ watch(shouldLockBodyScroll, (shouldLock) => {+ shouldLock ? lock() : unlock()+ })++ const open = () => (internalVisibleRef.value = true)++ const close = () => (internalVisibleRef.value = false)++ const onTriggerClick = () => {+ internalVisibleRef.value = !internalVisibleRef.value+ }++ return {+ close,+ open,+ onTriggerClick,+ triggerA11yProps,+ visible: internalVisibleRef,+ }+}diff --git a/src/composables/use-focus-on-show.ts b/src/composables/use-focus-on-show.tsindex 667d889b4..3f0a658ce 100644--- a/src/composables/use-focus-on-show.ts+++ b/src/composables/use-focus-on-show.ts@@ -1,4 +1,4 @@-import { nextTick, ref, watch, Ref } from "@nuxtjs/composition-api"+import { nextTick, watch, Ref } from "@nuxtjs/composition-api"import { warn } from "~/utils/console"import {@@ -16,7 +16,7 @@ type Props = {visibleRef: Ref<boolean>autoFocusOnShowRef: Ref<boolean>trapFocusRef: Ref<boolean>- initialFocusElementRef?: Ref<HTMLElement | null>+ initialFocusElementRef: Ref<HTMLElement | null>}/**@@ -27,7 +27,7 @@ export const useFocusOnShow = ({visibleRef,autoFocusOnShowRef,trapFocusRef,- initialFocusElementRef = ref(null),+ initialFocusElementRef,}: Props) => {const { activate: activateFocusTrap, deactivate: deactivateFocusTrap } =trapFocusRef.value@@ -38,7 +38,14 @@ export const useFocusOnShow = ({// if set to true, focus-trap prevents the default for the keyboard event, and we cannot handle it in our composables.escapeDeactivates: false,})- : { activate: undefined, deactivate: undefined }+ : {+ activate: () => {+ /** */+ },+ deactivate: () => {+ /** */+ },+ }watch([@@ -49,7 +56,7 @@ export const useFocusOnShow = ({] as const,([dialog, visible, autoFocusOnShow, initialFocusElement]) => {if (!dialog || !visible) {- if (deactivateFocusTrap) deactivateFocusTrap()+ deactivateFocusTrap()return}if (!dialog || !visible || !autoFocusOnShow) return@@ -74,7 +81,7 @@ export const useFocusOnShow = ({}}}- if (activateFocusTrap) activateFocusTrap()+ activateFocusTrap()})})diff --git a/src/composables/use-popover-content.ts b/src/composables/use-popover-content.tsindex 1f5bcc8fc..5c48592f9 100644--- a/src/composables/use-popover-content.ts+++ b/src/composables/use-popover-content.ts@@ -1,34 +1,43 @@-import { ref } from "@nuxtjs/composition-api"+import { computed, ref } from "@nuxtjs/composition-api"import { PopoverContentProps, usePopper } from "~/composables/use-popper"import { useDialogContent } from "~/composables/use-dialog-content"-import type { SetupContext } from "vue"-import type { Ref, ToRefs } from "@nuxtjs/composition-api"+import type { CSSProperties } from "@vue/runtime-dom"++import type { Ref, ToRefs, SetupContext } from "@nuxtjs/composition-api"type Props = {popoverRef: Ref<HTMLElement | null>popoverPropsRefs: ToRefs<PopoverContentProps>emit: SetupContext["emit"]+ attrs: SetupContext["attrs"]}export function usePopoverContent({popoverRef,popoverPropsRefs,emit,+ attrs,}: Props) {const { onKeyDown, onBlur } = useDialogContent({- dialogRef: popoverRef,visibleRef: popoverPropsRefs.visible,- autoFocusOnShowRef: popoverPropsRefs.autoFocusOnShow,- autoFocusOnHideRef: popoverPropsRefs.autoFocusOnHide,- trapFocusRef: ref(false),- triggerElementRef: popoverPropsRefs.triggerElement,- hideOnClickOutsideRef: popoverPropsRefs.hideOnClickOutside,hideRef: popoverPropsRefs.hide,- hideOnEscRef: popoverPropsRefs.hideOnEsc,+ dialogElements: {+ dialogRef: popoverRef,+ triggerElementRef: popoverPropsRefs.triggerElement,+ initialFocusElementRef: ref(null),+ },+ dialogOptions: {+ autoFocusOnShowRef: popoverPropsRefs.autoFocusOnShow,+ autoFocusOnHideRef: popoverPropsRefs.autoFocusOnHide,+ hideOnClickOutsideRef: popoverPropsRefs.hideOnClickOutside,+ hideOnEscRef: popoverPropsRefs.hideOnEsc,+ trapFocusRef: ref(false),+ },emit,+ attrs,})const { maxHeightRef } = usePopper({@@ -36,5 +45,14 @@ export function usePopoverContent({popoverPropsRefs,})- return { onKeyDown, onBlur, maxHeightRef }+ const heightProperties = computed(() => {+ // extracting this to ensure that computed is updated when the value changes+ const maxHeight = maxHeightRef.value++ return maxHeight && popoverPropsRefs.clippable+ ? ({ "--popover-height": `${maxHeight}px` } as CSSProperties)+ : ({} as CSSProperties)+ })++ return { onKeyDown, onBlur, heightProperties }}diff --git a/src/composables/use-popper.ts b/src/composables/use-popper.tsindex c43efbf69..78b4f89eb 100644--- a/src/composables/use-popper.ts+++ b/src/composables/use-popper.ts@@ -18,6 +18,7 @@ export type PopoverContentProps = {triggerElement: HTMLElement | nullplacement: Placementstrategy: PositioningStrategy+ clippable: booleanzIndex: number | string}diff --git a/src/layouts/default.vue b/src/layouts/default.vueindex fdcfccda2..5b02b95e6 100644--- a/src/layouts/default.vue+++ b/src/layouts/default.vue@@ -11,7 +11,10 @@<VHeaderDesktop v-if="isDesktopLayout" /><VHeaderMobile v-else /></template>- <VHeaderInternal v-else />+ <VHeaderInternal+ v-else+ :class="{ 'border-b-dark-charcoal-20': isHeaderScrolled }"+ /></template><VHeaderOld v-else /></div>diff --git a/src/types/item-group.ts b/src/types/item-group.tsindex b553cba06..d8cf9b796 100644--- a/src/types/item-group.ts+++ b/src/types/item-group.ts@@ -18,6 +18,7 @@ export type VIemGroupContext = {bordered: booleantype: ItemGroupTypesize: ItemGroupSize+ showCheck: boolean}export const VItemGroupContextKey = Symbol(diff --git a/src/types/modal.ts b/src/types/modal.tsindex 0e8507dfa..036938d1a 100644--- a/src/types/modal.ts+++ b/src/types/modal.ts@@ -1,2 +1,18 @@+import type { Ref } from "@nuxtjs/composition-api"+export type ModalVariant = "default" | "full" | "two-thirds"export type ModalColorMode = "dark" | "light"++export type DialogOptions = {+ autoFocusOnShowRef: Ref<boolean>+ autoFocusOnHideRef: Ref<boolean>+ hideOnClickOutsideRef: Ref<boolean>+ hideOnEscRef: Ref<boolean>+ trapFocusRef: Ref<boolean>+}++export type DialogElements = {+ dialogRef: Ref<HTMLElement | null>+ initialFocusElementRef: Ref<HTMLElement | null>+ triggerElementRef: Ref<HTMLElement | null>+}diff --git a/test/playwright/e2e/header-internal.spec.ts b/test/playwright/e2e/header-internal.spec.tsindex 722009ec3..d03c14226 100644--- a/test/playwright/e2e/header-internal.spec.ts+++ b/test/playwright/e2e/header-internal.spec.ts@@ -4,25 +4,32 @@ import {enableNewHeader,isMobileMenuOpen,scrollToBottom,+ setCookies,t,} from "~~/test/playwright/utils/navigation"import breakpoints from "~~/test/playwright/utils/breakpoints"const modalCloseButton = 'div[role="dialog"] >> [aria-label="Close"]'const currentPageLink = 'div[role="dialog"] >> [aria-current="page"]'+const currentPageLinkInPopover = '.popover-content >> [aria-current="page"]'const menuButton = `[aria-label="${t("header.aria.menu")}"]`-const openMenu = async (page: Page) => await page.click(menuButton)+const clickMenuButton = async (page: Page) => await page.click(menuButton)const closeMenu = async (page: Page) => await page.click(modalCloseButton)+const isPagesPopoverOpen = async (page: Page) =>+ page.locator(".popover-content").isVisible({ timeout: 100 })+test.describe("Header internal", () => {- breakpoints.describeSm(() => {- test.beforeEach(async ({ page }) => {+ breakpoints.describeXs(() => {+ test.beforeEach(async ({ context, page }) => {+ await setCookies(context, { uiBreakpoint: "xs" })await enableNewHeader(page)await page.goto("/about")})- test("can open and close the modal on md breakpoint", async ({ page }) => {- await openMenu(page)++ test("can open and close the modal on xs breakpoint", async ({ page }) => {+ await clickMenuButton(page)expect(await isMobileMenuOpen(page)).toBe(true)await expect(page.locator(currentPageLink)).toBeVisible()await expect(page.locator(currentPageLink)).toHaveText("About")@@ -32,21 +39,21 @@ test.describe("Header internal", () => {await expect(page.locator(menuButton)).toBeVisible()})- test("the modal locks the scroll on md breakpoint", async ({ page }) => {+ test("the modal locks the scroll on xs breakpoint", async ({ page }) => {await scrollToBottom(page)- await openMenu(page)+ await clickMenuButton(page)await closeMenu(page)const scrollPosition = await page.evaluate(() => window.scrollY)expect(scrollPosition).toBeGreaterThan(100)})- test("the modal opens an external link in a new window and it doesn't close the modal", async ({+ test("the modal opens an external link in a new window and it closes the modal", async ({page,}) => {await scrollToBottom(page)- await openMenu(page)+ await clickMenuButton(page)// Open the external link in a new tab, close the tabconst [popup] = await Promise.all([@@ -54,8 +61,28 @@ test.describe("Header internal", () => {page.locator('div[role="dialog"] >> text=API').click(),])await popup.close()+ // If we want the modal to stay open, we'll need to change this to `true`,+ // and implement the change+ expect(await isMobileMenuOpen(page)).toBe(false)+ })+ })- expect(await isMobileMenuOpen(page)).toBe(true)+ breakpoints.describeMd(() => {+ test("can open and close the popover on sm breakpoint", async ({+ context,+ page,+ }) => {+ await setCookies(context, { breakpoint: "sm" })+ await enableNewHeader(page)+ await page.goto("/about")+ await clickMenuButton(page)+ expect(await isPagesPopoverOpen(page)).toBe(true)+ await expect(page.locator(currentPageLinkInPopover)).toBeVisible()+ await expect(page.locator(currentPageLinkInPopover)).toHaveText("About")++ await clickMenuButton(page)+ expect(await isPagesPopoverOpen(page)).toBe(false)+ await expect(page.locator(menuButton)).toBeVisible()})})})diff --git a/test/playwright/utils/navigation.ts b/test/playwright/utils/navigation.tsindex fd5231f5d..392a26448 100644--- a/test/playwright/utils/navigation.ts+++ b/test/playwright/utils/navigation.ts@@ -466,9 +466,10 @@ export const setCookies = async (await context.addCookies(Object.entries(cookies).map(([name, value]) => ({name,- value: JSON.stringify(value),+ value: typeof value === "string" ? value : JSON.stringify(value),domain: "localhost",path: "/",+ maxAge: 60 * 5,})))}diff --git a/test/playwright/visual-regression/components/audio-results-old.spec.ts b/test/playwright/visual-regression/components/audio-results-old.spec.tsindex 996bee366..7f4342fb7 100644--- a/test/playwright/visual-regression/components/audio-results-old.spec.ts+++ b/test/playwright/visual-regression/components/audio-results-old.spec.ts@@ -1,7 +1,11 @@import { test } from "@playwright/test"import breakpoints from "~~/test/playwright/utils/breakpoints"-import { closeFilters, OLD_HEADER } from "~~/test/playwright/utils/navigation"+import {+ closeFilters,+ OLD_HEADER,+ setCookies,+} from "~~/test/playwright/utils/navigation"test.describe.configure({ mode: "parallel" })@@ -34,14 +38,7 @@ test.describe("audio results", () => {breakpoints.describeEachDesktopWithMd(({ expectSnapshot }) => {test("desktop audio results", async ({ context, page }) => {- await context.addCookies([- {- name: "ui",- value: JSON.stringify({ isDesktopLayout: true }),- domain: "localhost",- path: "/",- },- ])+ await setCookies(context, { uiIsDesktopLayout: true })await closeFilters(page, OLD_HEADER)await expectSnapshot("audio-results-desktop", page)})diff --git a/test/playwright/visual-regression/components/header-old.spec.ts b/test/playwright/visual-regression/components/header-old.spec.tsindex da053300e..54f65390b 100644--- a/test/playwright/visual-regression/components/header-old.spec.ts+++ b/test/playwright/visual-regression/components/header-old.spec.ts@@ -8,6 +8,7 @@ import {languageDirections,OLD_HEADER,scrollToBottom,+ setCookies,sleep,} from "~~/test/playwright/utils/navigation"@@ -23,14 +24,8 @@ for (const dir of languageDirections) {breakpoints.describeEachDesktopWithMd(({ expectSnapshot }) => {test("filters open", async ({ context, page }) => {- await context.addCookies([- {- name: "ui",- value: JSON.stringify({ isDesktopLayout: true }),- domain: "localhost",- path: "/search",- },- ])+ await setCookies(context, { uiIsDesktopLayout: true })+await page.mouse.move(0, 150)await expectSnapshot(`filters-open-${dir}`,diff --git a/test/playwright/visual-regression/components/header.spec.ts b/test/playwright/visual-regression/components/header.spec.tsindex 1fdcb15f2..dd73b46e0 100644--- a/test/playwright/visual-regression/components/header.spec.ts+++ b/test/playwright/visual-regression/components/header.spec.ts@@ -10,6 +10,7 @@ import {goToSearchTerm,languageDirections,scrollToBottom,+ setCookies,sleep,} from "~~/test/playwright/utils/navigation"@@ -22,14 +23,7 @@ for (const dir of languageDirections) {breakpoints.describeEvery(({ breakpoint, expectSnapshot }) => {test.beforeEach(async ({ context, page }) => {if (!isMobileBreakpoint(breakpoint)) {- await context.addCookies([- {- name: "ui",- value: JSON.stringify({ isDesktopLayout: true }),- domain: "localhost",- path: "/",- },- ])+ await setCookies(context, { uiIsDesktopLayout: true })}await enableNewHeader(page)diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.pngindex fa613d8dc..fcb80fbc0 100644Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.pngindex bcad7b94b..f77fe6529 100644Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.pngindex 77144331a..c2ae25fa0 100644Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-2xl-linux.pngindex b7d1b6ae7..ca390967d 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-lg-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-lg-linux.pngindex f5d0a98b1..588247a32 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-md-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-md-linux.pngindex 93e65b6b1..690fb9a98 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-md-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-sm-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-sm-linux.pngindex c7b9b9b6f..20392656f 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-sm-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-sm-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xl-linux.pngindex b7d1b6ae7..ca390967d 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xs-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xs-linux.pngindex e92f3d1bf..40b3682e3 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xs-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-ltr-xs-linux.png differdiff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-rtl-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-rtl-xl-linux.pngindex 13fe78ce4..ed2ab71b9 100644Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/focused-search-rtl-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts b/test/playwright/visual-regression/pages/pages.spec.tsindex 7b1ef1cc9..6934a4642 100644--- a/test/playwright/visual-regression/pages/pages.spec.ts+++ b/test/playwright/visual-regression/pages/pages.spec.ts@@ -25,7 +25,7 @@ for (const contentPage of contentPages) {test.beforeEach(async ({ context, page }) => {await enableNewHeader(page)await setCookies(context, {- uiBreakpoint: breakpoint,+ uiBreakpoint: breakpoint as string,uiIsFilterDismissed: true,uiDismissedBanners: ["translation-ar"],})diff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-2xl-linux.pngindex b9a80f0a5..4278a1578 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-lg-linux.pngindex 36365ed29..d69c92992 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-md-linux.pngindex 0b3e86019..262b717f0 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-xl-linux.pngindex 9075e9fd3..8a2c7e7bb 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-2xl-linux.pngindex 765271ca0..f8b27a878 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-lg-linux.pngindex 8be115922..58fafbe35 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-md-linux.pngindex 36304fee0..d8307a449 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-xl-linux.pngindex 911919d5b..68efe19b4 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/about-rtl-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-2xl-linux.pngindex c6447ef42..bd31659d2 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-lg-linux.pngindex ddf120ffa..aa254c053 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-md-linux.pngindex f8c798fec..6b3286e20 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-xl-linux.pngindex 90e447743..a8f25f7a8 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-2xl-linux.pngindex 5e7d8893f..257934d1f 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-lg-linux.pngindex 26e0e7074..6c48b1e8e 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-md-linux.pngindex 8ff6b69e4..84b4bf7d9 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-xl-linux.pngindex b27c4b2c0..4ffd866aa 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/privacy-rtl-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-2xl-linux.pngindex 6395f9097..e55bef878 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-lg-linux.pngindex 1911130c3..aee307093 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-md-linux.pngindex e9ee17eaa..74bab90c3 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-xl-linux.pngindex 231a62892..9479e994e 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-2xl-linux.pngindex b675eb556..715705bbe 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-lg-linux.pngindex 97630f6c1..f64e8a0a4 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-md-linux.pngindex 6e245d275..00a6debf2 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-xl-linux.pngindex 527d487f2..99cb40962 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-help-rtl-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-2xl-linux.pngindex d0a68e587..6ba31fa51 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-lg-linux.pngindex 6abfe49ff..96ff6b82d 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-md-linux.pngindex 3d80e20c5..b9e561d95 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-xl-linux.pngindex 915805162..010059a15 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-ltr-xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-2xl-linux.pngindex 91e70bdb6..0acb1e8da 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-2xl-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-lg-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-lg-linux.pngindex e165371d8..84fdffcd4 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-lg-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-md-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-md-linux.pngindex bd9b31c21..598aa4376 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-md-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-md-linux.png differdiff --git a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-xl-linux.png b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-xl-linux.pngindex ded60dd4c..743a60754 100644Binary files a/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/sources-rtl-xl-linux.png differdiff --git a/test/storybook/playwright.config.ts b/test/storybook/playwright.config.tsindex fd9ec3c26..b2d856ce6 100644--- a/test/storybook/playwright.config.ts+++ b/test/storybook/playwright.config.ts@@ -24,7 +24,7 @@ const config: PlaywrightTestConfig = {expect: {toMatchSnapshot: {// To avoid flaky tests, we allow a small amount of pixel difference.- maxDiffPixelRatio: 0.02,+ maxDiffPixelRatio: 0.01,},},}diff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-2xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-2xl-linux.pngindex 7e84c9d17..f84366c7c 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-2xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-lg-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-lg-linux.pngindex da2790af1..cc5278477 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-lg-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-md-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-md-linux.pngindex 06a592582..4b72be9ff 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-md-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-md-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-sm-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-sm-linux.pngindex de691a027..a8186e401 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-sm-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-xl-linux.pngindex a1865189a..c104ffdab 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-ltr-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-2xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-2xl-linux.pngindex ad64a0418..570e2db61 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-2xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-lg-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-lg-linux.pngindex c504eb41f..8376bddc6 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-lg-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-md-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-md-linux.pngindex d0f253f42..4503303e5 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-md-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-md-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-sm-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-sm-linux.pngindex e3fa96cf9..c82270671 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-sm-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-xl-linux.pngindex 32fda11b6..243cbc6b0 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-content-rtl-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-2xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-2xl-linux.pngindex eb43c872d..f57babf46 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-2xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-lg-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-lg-linux.pngindex 17654163d..e8f5bbe04 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-lg-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-md-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-md-linux.pngindex 5f74af111..14fea4695 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-md-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-md-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-sm-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-sm-linux.pngindex f12b90218..ec6e42cc9 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-sm-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-xl-linux.pngindex fc2309d51..bfb039b70 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-ltr-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-2xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-2xl-linux.pngindex 3405b957f..b397da155 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-2xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-lg-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-lg-linux.pngindex faef6887a..22e417096 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-lg-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-md-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-md-linux.pngindex 5ed6574ca..2f0cb560f 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-md-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-md-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-sm-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-sm-linux.pngindex 528cc357a..efca76ece 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-sm-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-xl-linux.png b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-xl-linux.pngindex 3362e7da1..18b35eb0e 100644Binary files a/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-xl-linux.png and b/test/storybook/visual-regression/v-footer.spec.ts-snapshots/footer-internal-rtl-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts b/test/storybook/visual-regression/v-header-internal.spec.tsindex 095f0b13d..05929880b 100644--- a/test/storybook/visual-regression/v-header-internal.spec.ts+++ b/test/storybook/visual-regression/v-header-internal.spec.ts@@ -13,7 +13,7 @@ test.describe.configure({ mode: "parallel" })test.describe("VHeaderInternal", () => {for (const dir of languageDirections) {- breakpoints.describeEachDesktopWithMd(({ expectSnapshot }) => {+ breakpoints.describeEachDesktop(({ expectSnapshot }) => {test(`desktop-header-internal-${dir}`, async ({ page }) => {await page.goto(pageUrl(dir))await page.mouse.move(0, 150)@@ -23,19 +23,19 @@ test.describe("VHeaderInternal", () => {)})})- breakpoints.describeEachMobileWithoutMd(({ expectSnapshot }) => {+ breakpoints.describeEachMobile(({ expectSnapshot }) => {test(`mobile-header-internal-${dir}`, async ({ page }) => {await page.goto(pageUrl(dir))await page.mouse.move(0, 150)await expectSnapshot(- `mobile-header-internal-${dir}`,+ `mobile-header-internal-closed-${dir}`,page.locator(headerSelector))})test(`mobile-header-internal-modal-${dir}`, async ({ page }) => {await page.goto(pageUrl(dir))await page.locator('button[aria-haspopup="dialog"]').click()- await expectSnapshot(`mobile-header-internal-modal-${dir}`, page)+ await expectSnapshot(`mobile-header-internal-open-${dir}`, page)})})}diff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-2xl-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-2xl-linux.pngindex b98af00b5..c48745d25 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-2xl-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-lg-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-lg-linux.pngindex 6144c107e..eb544e00f 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-lg-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-md-linux.pngdeleted file mode 100644index e7dea67b8..000000000Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-md-linux.png and /dev/null differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-xl-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-xl-linux.pngindex 9c320b4d7..35a247616 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-xl-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-ltr-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-2xl-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-2xl-linux.pngindex 09fb6382a..b7ad28020 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-2xl-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-2xl-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-lg-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-lg-linux.pngindex 2747ed4a6..afe1673bb 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-lg-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-lg-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-md-linux.pngdeleted file mode 100644index 385b0f253..000000000Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-md-linux.png and /dev/null differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-xl-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-xl-linux.pngindex c4417d238..61c25f7cc 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-xl-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/desktop-header-internal-rtl-xl-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-md-linux.pngnew file mode 100644index 000000000..2d1bf64aaBinary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-md-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-ltr-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-sm-linux.pngsimilarity index 100%rename from test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-ltr-sm-linux.pngrename to test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-sm-linux.pngdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-ltr-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-xs-linux.pngsimilarity index 100%rename from test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-ltr-xs-linux.pngrename to test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-ltr-xs-linux.pngdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-md-linux.pngnew file mode 100644index 000000000..b0104ef42Binary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-md-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-rtl-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-sm-linux.pngsimilarity index 100%rename from test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-rtl-sm-linux.pngrename to test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-sm-linux.pngdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-rtl-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-xs-linux.pngsimilarity index 100%rename from test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-rtl-xs-linux.pngrename to test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-closed-rtl-xs-linux.pngdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-sm-linux.pngindex 92282536b..4ab02c416 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-sm-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-xs-linux.pngindex 403bf8b7c..efcaed91e 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-xs-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-ltr-xs-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-sm-linux.pngindex baf5a969e..12f37a8d0 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-sm-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-xs-linux.pngindex 10526914b..ca1d347cb 100644Binary files a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-xs-linux.png and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-modal-rtl-xs-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-md-linux.pngnew file mode 100644index 000000000..5bcb9412cBinary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-md-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-sm-linux.pngnew file mode 100644index 000000000..4ab02c416Binary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-xs-linux.pngnew file mode 100644index 000000000..b60177d8bBinary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-ltr-xs-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-md-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-md-linux.pngnew file mode 100644index 000000000..cfb7bcbb7Binary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-md-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-sm-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-sm-linux.pngnew file mode 100644index 000000000..12f37a8d0Binary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-sm-linux.png differdiff --git a/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-xs-linux.png b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-xs-linux.pngnew file mode 100644index 000000000..e322d40ddBinary files /dev/null and b/test/storybook/visual-regression/v-header-internal.spec.ts-snapshots/mobile-header-internal-open-rtl-xs-linux.png differdiff --git a/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png b/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.pngindex aa1912725..802ad703e 100644Binary files a/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png and b/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png differdiff --git a/test/unit/specs/components/VHeader/SearchBar/search-bar.spec.js b/test/unit/specs/components/VHeader/SearchBar/search-bar.spec.jsindex 2de3a168c..ee7ce865f 100644--- a/test/unit/specs/components/VHeader/SearchBar/search-bar.spec.js+++ b/test/unit/specs/components/VHeader/SearchBar/search-bar.spec.js@@ -25,6 +25,7 @@ describe("VSearchBar", () => {beforeEach(() => {options = {props: { placeholder: defaultPlaceholder, size: "standalone" },+ stubs: { ClientOnly: true },mocks: {$nuxt: {context: {diff --git a/test/unit/specs/components/image-grid.spec.js b/test/unit/specs/components/image-grid.spec.jsindex 8ee8afb35..fd4237df6 100644--- a/test/unit/specs/components/image-grid.spec.js+++ b/test/unit/specs/components/image-grid.spec.js@@ -25,6 +25,7 @@ const propsData = {isFetching: false,fetchingError: null,},+ isSinglePage: false,}describe("VImageGrid", () => {diff --git a/test/unit/specs/components/v-popover.spec.js b/test/unit/specs/components/v-popover.spec.jsindex f6a6b863c..d156ed17e 100644--- a/test/unit/specs/components/v-popover.spec.js+++ b/test/unit/specs/components/v-popover.spec.js@@ -61,8 +61,11 @@ const expectOpen = () => {}const expectClosed = () => {- expect(queryPopover().parentElement.parentElement.style.display).toEqual(- "none"+ return (+ expect(queryPopover() === null) ||+ expect(queryPopover().parentElement.parentElement.style.display).toEqual(+ "none"+ ))}