From 4bf264d6560af391631c6e4193779150b1e80a6e Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Sat, 6 Apr 2024 12:00:48 +0000 Subject: [PATCH] feat(nc-gui): update toolbar groupBy and sort menu dropdown with new design --- packages/nc-gui/assets/style.scss | 62 +++++++++++-------- .../smartsheet/toolbar/CreateGroupBy.vue | 28 ++++++--- .../smartsheet/toolbar/CreateSort.vue | 30 ++++++--- 3 files changed, 78 insertions(+), 42 deletions(-) diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index a9ed94e610..d4c893a484 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -37,7 +37,7 @@ body { } .rc-virtual-list-holder-inner { - @apply !px-1.5 + @apply !px-1.5; } .ant-layout-header { height: var(--topbar-height) !important; @@ -51,13 +51,17 @@ main { @apply m-0 h-full w-full bg-white; } - .nc-input-md { @apply !rounded-lg !py-2 !px-3 mb-1; } .mobile { - .nc-scrollbar-md, .nc-scrollbar-lg, .nc-scrollbar-x-md, .nc-scrollbar-dark-md, .nc-scrollbar-x-md-dark, .nc-scrollbar-x-lg { + .nc-scrollbar-md, + .nc-scrollbar-lg, + .nc-scrollbar-x-md, + .nc-scrollbar-dark-md, + .nc-scrollbar-x-md-dark, + .nc-scrollbar-x-lg { &::-webkit-scrollbar { width: 0px; } @@ -116,7 +120,6 @@ main { overflow-x: auto !important; scrollbar-width: thin !important; - &::-webkit-scrollbar { width: 4px; height: 4px; @@ -131,7 +134,6 @@ main { -webkit-border-radius: 10px; border-radius: 10px; - width: 4px; @apply bg-gray-200; } @@ -145,7 +147,6 @@ main { overflow-x: hidden; scrollbar-width: thin !important; - &::-webkit-scrollbar { width: 4px; height: 4px; @@ -177,7 +178,6 @@ main { overflow-x: auto !important; scrollbar-width: thin !important; - &::-webkit-scrollbar { width: 4px; height: 4px; @@ -192,14 +192,11 @@ main { -webkit-border-radius: 10px; border-radius: 10px; - width: 4px; - background-color: rgba(0, 0, 0, 0.3) - + background-color: rgba(0, 0, 0, 0.3); } &::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, 0.4) - + background-color: rgba(0, 0, 0, 0.4); } } @@ -220,7 +217,6 @@ main { -webkit-border-radius: 10px; border-radius: 10px; - width: 8px; @apply bg-gray-200; } @@ -255,11 +251,11 @@ a { .rc-virtual-list-scrollbar { @apply !w-1; } - - .rc-virtual-list-scrollbar-thumb{ + + .rc-virtual-list-scrollbar-thumb { @apply !bg-gray-200; - &:hover{ + &:hover { @apply !bg-gray-300; } } @@ -465,9 +461,9 @@ a { .ant-dropdown-menu-submenu { @apply !py-0; - - &.ant-dropdown-menu-submenu-popup{ - @apply border-1 border-gray-200 + + &.ant-dropdown-menu-submenu-popup { + @apply border-1 border-gray-200; } .ant-dropdown-menu, .ant-menu { @@ -545,11 +541,11 @@ a { @apply bg-gray-300 bg-opacity-20; } -.ant-select-item-option:hover{ +.ant-select-item-option:hover { @apply !bg-gray-100; } -.ant-select-item-option-selected{ +.ant-select-item-option-selected { @apply !bg-white; } /* Hide the element with id nc-selected-item-icon */ @@ -712,7 +708,8 @@ input[type='number'] { .nc-emoji { @apply xs:(text-lg); } - .material-symbols, .nc-icon { + .material-symbols, + .nc-icon { @apply !xs:(text-xl -mt-0.25); } @@ -729,7 +726,6 @@ input[type='number'] { @apply opacity-0 group-hover:(opacity-100) text-gray-600 hover:(bg-gray-400 bg-opacity-20 text-gray-900) duration-100; } - .nc-button.ant-btn.nc-sidebar-node-btn.nc-sidebar-expand { @apply xs:(opacity-100 hover:bg-gray-50); @@ -740,18 +736,18 @@ input[type='number'] { .ant-message-notice-content { @apply !rounded-md; - .ant-message-custom-content{ + .ant-message-custom-content { @apply flex items-center; } } -svg.nc-cell-icon, svg.nc-virtual-cell-icon { +svg.nc-cell-icon, +svg.nc-virtual-cell-icon { @apply w-1em h-1em flex-none; font-size: 1rem; } - -// For select type field list layout +// For select type field list layout .nc-field-layout-list { @apply !flex !flex-col !items-start w-full !space-y-0.5 !max-w-full; @@ -786,3 +782,15 @@ svg.nc-cell-icon, svg.nc-virtual-cell-icon { } } +.nc-toolbar-dropdown-search-field-input { + @apply !rounded-lg; + + .nc-search-icon { + @apply text-gray-400; + } + + &:hover .nc-search-icon, + &.ant-input-affix-wrapper-focused .nc-search-icon { + @apply text-gray-800; + } +} diff --git a/packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue b/packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue index f58b0aed5f..e07e746928 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue @@ -71,6 +71,7 @@ watch( () => { if (!isParentOpen.value) return + search.value = '' setTimeout(() => { inputRef.value?.focus() }, 100) @@ -96,28 +97,41 @@ const onArrowUp = () => {