diff --git a/packages/context-menu/src/vaadin-context-menu-mixin.js b/packages/context-menu/src/vaadin-context-menu-mixin.js index 18e8efac7a..8071046c68 100644 --- a/packages/context-menu/src/vaadin-context-menu-mixin.js +++ b/packages/context-menu/src/vaadin-context-menu-mixin.js @@ -4,7 +4,7 @@ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */ import { isElementFocusable } from '@vaadin/a11y-base/src/focus-utils.js'; -import { isAndroid, isIOS, isTouch } from '@vaadin/component-base/src/browser-utils.js'; +import { isAndroid, isIOS } from '@vaadin/component-base/src/browser-utils.js'; import { addListener, deepTargetFind, gestures, removeListener } from '@vaadin/component-base/src/gestures.js'; import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js'; import { ItemsMixin } from './vaadin-contextmenu-items-mixin.js'; @@ -110,21 +110,13 @@ export const ContextMenuMixin = (superClass) => type: Boolean, }, - /** @private */ - _touch: { - type: Boolean, - value: isTouch, - }, - - /** @private */ - _wide: { + _fullscreen: { type: Boolean, }, - /** @private */ - _wideMediaQuery: { + _fullscreenMediaQuery: { type: String, - value: '(min-device-width: 750px)', + value: '(max-width: 450px), (max-height: 450px)', }, }; } @@ -134,7 +126,7 @@ export const ContextMenuMixin = (superClass) => '_openedChanged(opened)', '_targetOrOpenOnChanged(listenOn, openOn)', '_rendererChanged(renderer, items)', - '_touchOrWideChanged(_touch, _wide)', + '_fullscreenChanged(_fullscreen)', '_overlayContextChanged(_overlayElement, _context)', '_overlayModelessChanged(_overlayElement, _modeless)', '_overlayPhoneChanged(_overlayElement, _phone)', @@ -182,8 +174,8 @@ export const ContextMenuMixin = (superClass) => super.ready(); this.addController( - new MediaQueryController(this._wideMediaQuery, (matches) => { - this._wide = matches; + new MediaQueryController(this._fullscreenMediaQuery, (matches) => { + this._fullscreen = matches; }), ); } @@ -282,8 +274,8 @@ export const ContextMenuMixin = (superClass) => } /** @private */ - _touchOrWideChanged(touch, wide) { - this._phone = !wide && touch; + _fullscreenChanged(fullScreen) { + this._phone = fullScreen; } /** @private */ diff --git a/packages/date-picker/src/vaadin-date-picker-mixin.js b/packages/date-picker/src/vaadin-date-picker-mixin.js index b3ce1f34b8..a86333364f 100644 --- a/packages/date-picker/src/vaadin-date-picker-mixin.js +++ b/packages/date-picker/src/vaadin-date-picker-mixin.js @@ -184,7 +184,7 @@ export const DatePickerMixin = (subclass) => * @protected */ _fullscreenMediaQuery: { - value: '(max-width: 420px), (max-height: 420px)', + value: '(max-width: 450px), (max-height: 450px)', }, /** diff --git a/packages/date-picker/theme/lumo/vaadin-date-picker-overlay-styles.js b/packages/date-picker/theme/lumo/vaadin-date-picker-overlay-styles.js index 4b01778093..10dc4ba225 100644 --- a/packages/date-picker/theme/lumo/vaadin-date-picker-overlay-styles.js +++ b/packages/date-picker/theme/lumo/vaadin-date-picker-overlay-styles.js @@ -41,7 +41,7 @@ const datePickerOverlay = css` margin-bottom: var(--lumo-space-xs); } - @media (max-width: 420px), (max-height: 420px) { + @media (max-width: 450px), (max-height: 450px) { [part='overlay'] { width: 100vw; height: 70vh; diff --git a/packages/date-picker/theme/lumo/vaadin-date-picker-styles.js b/packages/date-picker/theme/lumo/vaadin-date-picker-styles.js index 6f60cf0735..07808ad7ee 100644 --- a/packages/date-picker/theme/lumo/vaadin-date-picker-styles.js +++ b/packages/date-picker/theme/lumo/vaadin-date-picker-styles.js @@ -12,7 +12,7 @@ const datePicker = css` content: var(--lumo-icons-cross); } - @media (max-width: 420px), (max-height: 420px) { + @media (max-width: 450px), (max-height: 450px) { [part='overlay-content'] { height: 70vh; } diff --git a/packages/select/src/vaadin-select-base-mixin.js b/packages/select/src/vaadin-select-base-mixin.js index 9dd4f78757..5600fc2bf9 100644 --- a/packages/select/src/vaadin-select-base-mixin.js +++ b/packages/select/src/vaadin-select-base-mixin.js @@ -143,7 +143,7 @@ export const SelectBaseMixin = (superClass) => /** @private */ _phoneMediaQuery: { - value: '(max-width: 420px), (max-height: 420px)', + value: '(max-width: 450px), (max-height: 450px)', }, /** @private */ diff --git a/packages/vaadin-lumo-styles/mixins/menu-overlay.js b/packages/vaadin-lumo-styles/mixins/menu-overlay.js index 1f9eef858a..fb79fb8b83 100644 --- a/packages/vaadin-lumo-styles/mixins/menu-overlay.js +++ b/packages/vaadin-lumo-styles/mixins/menu-overlay.js @@ -45,7 +45,7 @@ registerStyles('', menuOverlayCore, { moduleId: 'lumo-menu-overlay-core' }); const menuOverlayExt = css` /* Small viewport (bottom sheet) styles */ /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */ - @media (max-width: 420px), (max-height: 420px) { + @media (max-width: 450px), (max-height: 450px) { :host { top: 0 !important; right: 0 !important;