diff --git a/src/components/VButton.vue b/src/components/VButton.vue
index fc85a732a8..279d07da85 100644
--- a/src/components/VButton.vue
+++ b/src/components/VButton.vue
@@ -323,25 +323,43 @@ a.button {
.action-menu {
@apply border border-tx bg-tx text-dark-charcoal hover:border-dark-charcoal-20;
}
-
-.action-menu-secondary {
- @apply border border-tx bg-white text-dark-charcoal hover:border-dark-charcoal-20;
+.action-menu-pressed {
+ @apply border-tx bg-dark-charcoal text-white hover:border-tx hover:bg-dark-charcoal-90;
}
-.action-menu-secondary-pressed {
- @apply border-tx bg-dark-charcoal text-white;
+/**
+Similar to `action-menu`, but always has a border, not only on hover.
+https://www.figma.com/file/GIIQ4sDbaToCfFQyKMvzr8/Openverse-Design-Library?node-id=1684%3A3678
+ */
+.action-menu-bordered {
+ @apply border border-dark-charcoal-20 bg-white text-dark-charcoal focus-visible:border-tx;
}
-
-.action-menu-pressed {
- @apply border-tx bg-dark-charcoal text-white hover:border-tx;
+.action-menu-bordered-pressed {
+ @apply border-dark-charcoal bg-dark-charcoal text-white hover:bg-dark-charcoal-80;
}
.action-menu-muted {
@apply border border-tx bg-dark-charcoal-10 text-dark-charcoal hover:border-dark-charcoal-20;
}
-
.action-menu-muted-pressed {
- @apply border border-tx bg-dark-charcoal text-white;
+ @apply border border-tx bg-dark-charcoal text-white hover:border-tx hover:bg-dark-charcoal-90;
+}
+
+.action-menu[disabled='disabled'],
+.action-menu[aria-disabled='true'],
+.action-menu-muted[disabled='disabled'],
+.action-menu-muted[aria-disabled='true'],
+.action-menu-bordered[disabled='disabled'],
+.action-menu-bordered[aria-disabled='true'] {
+ @apply border-dark-charcoal-10 bg-dark-charcoal-10 text-dark-charcoal-40;
+}
+
+.action-menu-secondary {
+ @apply border border-tx bg-white text-dark-charcoal hover:border-dark-charcoal-20;
+}
+
+.action-menu-secondary-pressed {
+ @apply border-tx bg-dark-charcoal text-white;
}
.full {
diff --git a/src/components/VContentSwitcher/VMobileMenuModal.vue b/src/components/VContentSwitcher/VMobileMenuModal.vue
deleted file mode 100644
index 0f57e76ed1..0000000000
--- a/src/components/VContentSwitcher/VMobileMenuModal.vue
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
diff --git a/src/components/VContentSwitcher/VSearchTypeButton.vue b/src/components/VContentSwitcher/VSearchTypeButton.vue
index 27eaecd15e..d810fd2729 100644
--- a/src/components/VContentSwitcher/VSearchTypeButton.vue
+++ b/src/components/VContentSwitcher/VSearchTypeButton.vue
@@ -1,11 +1,7 @@
{{ buttonLabel }}
-
+
diff --git a/src/components/VHeader/VHeaderFilter.vue b/src/components/VHeader/VHeaderFilter.vue
deleted file mode 100644
index 187441622c..0000000000
--- a/src/components/VHeader/VHeaderFilter.vue
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/VHeader/VHeaderMenu.vue b/src/components/VHeader/VHeaderMenu.vue
deleted file mode 100644
index 1c06608756..0000000000
--- a/src/components/VHeader/VHeaderMenu.vue
+++ /dev/null
@@ -1,101 +0,0 @@
-
diff --git a/src/components/VHeader/VHeader.vue b/src/components/VHeader/VHeaderMobile.vue
similarity index 83%
rename from src/components/VHeader/VHeader.vue
rename to src/components/VHeader/VHeaderMobile.vue
index e5834cae55..ec6171e5fb 100644
--- a/src/components/VHeader/VHeader.vue
+++ b/src/components/VHeader/VHeaderMobile.vue
@@ -1,45 +1,43 @@
{{ searchStatus }}
-
-
-
+
+
+
+
+
+
+
+
@@ -62,10 +60,9 @@ import { useI18nResultsCount } from '~/composables/use-i18n-utilities'
import { useMediaStore } from '~/stores/media'
import { isSearchTypeSupported, useSearchStore } from '~/stores/search'
+import VContentSettingsButton from '~/components/VHeader/VContentSettingsButton.vue'
import VLogoButton from '~/components/VHeader/VLogoButton.vue'
-import VHeaderFilter from '~/components/VHeader/VHeaderFilter.vue'
import VSearchBar from '~/components/VHeader/VSearchBar/VSearchBar.vue'
-import VHeaderMenu from '~/components/VHeader/VHeaderMenu.vue'
import closeIcon from '~/assets/icons/close.svg'
@@ -75,12 +72,14 @@ const menus = {
}
type HeaderMenu = 'filters' | 'content-switcher'
+/**
+ * The mobile search header component.
+ */
export default defineComponent({
- name: 'VHeader',
+ name: 'VHeaderMobile',
components: {
+ VContentSettingsButton,
VLogoButton,
- VHeaderFilter,
- VHeaderMenu,
VSearchBar,
},
setup() {
diff --git a/src/components/VHeader/meta/VFilterButton.stories.mdx b/src/components/VHeader/meta/VFilterButton.stories.mdx
index da896ca3d7..c972fe4247 100644
--- a/src/components/VHeader/meta/VFilterButton.stories.mdx
+++ b/src/components/VHeader/meta/VFilterButton.stories.mdx
@@ -5,7 +5,6 @@ import {
Meta,
Story,
} from '@storybook/addon-docs'
-import { provide, ref } from '@nuxtjs/composition-api'
import VFilterButton from '~/components/VHeader/VFilterButton.vue'
import { useSearchStore } from '~/stores/search'
import { filterData, mediaFilterKeys } from '~/constants/filters'
@@ -21,23 +20,24 @@ import { IMAGE } from '~/constants/media'
appliedFilters: {
type: 'number',
},
- scrolled: {
- type: 'boolean',
+ toggle: {
+ action: 'toggle',
},
- isMinMd: {
- type: 'boolean',
+ tab: {
+ action: 'tab',
},
}}
/>
export const Template = (args, { argTypes }) => ({
- template: ``,
+ template: ``,
components: { VFilterButton },
props: Object.keys(argTypes),
setup() {
const searchStore = useSearchStore()
searchStore.setSearchType(IMAGE)
function applyNFilters(filterCount) {
+ searchStore.clearFilters()
const filterTypes = [...mediaFilterKeys[IMAGE]]
let filterIdx = 0
// Skip license type filters as they can disable license filters
@@ -56,12 +56,6 @@ export const Template = (args, { argTypes }) => ({
}
}
applyNFilters(args.appliedFilters)
- if (args.scrolled) {
- provide('isHeaderScrolled', ref(true))
- }
- if (args.isMinMd) {
- provide('isMinScreenMd', ref(true))
- }
return { args }
},
})
@@ -78,15 +72,24 @@ the field receives an input. It also emits the `search` event when the search
button is clicked.