From 74cee9ff0de50127be14814fc589a28deba5f432 Mon Sep 17 00:00:00 2001 From: Tim Bochkarev Date: Fri, 15 Jan 2021 14:36:59 +0300 Subject: [PATCH 1/6] add navigation for QCascader --- .../QBreadcrumbs/src/q-breadcrumbs.scss | 4 ++++ src/qComponents/QButton/src/q-button.scss | 17 +++++++++++++++++ src/qComponents/QCascader/src/QCascader.vue | 15 ++++++++++----- src/qComponents/QCascader/src/QCascaderMenu.vue | 2 ++ .../QCascader/src/q-cascader-menu.scss | 1 + src/vars.scss | 2 ++ 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/qComponents/QBreadcrumbs/src/q-breadcrumbs.scss b/src/qComponents/QBreadcrumbs/src/q-breadcrumbs.scss index d0964fbb..c4d7fcda 100644 --- a/src/qComponents/QBreadcrumbs/src/q-breadcrumbs.scss +++ b/src/qComponents/QBreadcrumbs/src/q-breadcrumbs.scss @@ -30,6 +30,10 @@ white-space: nowrap; text-overflow: ellipsis; + &:focus { + text-decoration: underline; + } + &_last:first-child { color: var(--color-primary-black); } diff --git a/src/qComponents/QButton/src/q-button.scss b/src/qComponents/QButton/src/q-button.scss index b63062b1..3540b8af 100644 --- a/src/qComponents/QButton/src/q-button.scss +++ b/src/qComponents/QButton/src/q-button.scss @@ -30,6 +30,7 @@ } &:hover { + background-color: var(--color-primary); background-image: none; box-shadow: -1px -1px 4px rgba(var(--color-rgb-white), 0.25), 1px 1px 4px rgba(var(--color-rgb-blue), 0.4), @@ -76,6 +77,13 @@ } &_theme { + &_primary { + &:focus { + background-color: var(--color-primary-darker); + background-image: none; + } + } + &_secondary { color: var(--color-primary-blue); background-color: var(--color-tertiary-gray); @@ -92,6 +100,11 @@ outline: none; box-shadow: var(--box-shadow-pressed); } + + &:focus { + color: var(--color-tertiary-white); + background-color: var(--color-primary-darker); + } } &_link { @@ -103,6 +116,10 @@ background-image: none; box-shadow: none; + &:focus { + text-decoration: underline; + } + &:hover { color: var(--color-primary-black); background-color: transparent; diff --git a/src/qComponents/QCascader/src/QCascader.vue b/src/qComponents/QCascader/src/QCascader.vue index 795f2853..506f381f 100644 --- a/src/qComponents/QCascader/src/QCascader.vue +++ b/src/qComponents/QCascader/src/QCascader.vue @@ -15,11 +15,11 @@ 'q-input_focus': Boolean(popper), 'q-input_hover': areTagsHovered }" - @focus="handleFocus" - @blur="handleBlur" @mouseenter.native="handleMouseEnter" @mouseleave.native="showClose = false" - @click="togglePopper" + @focus="handleFocus" + @blur="handleBlur" + @keyup.esc="togglePopper" >