diff --git a/src/assets/less/components/package-file-browser.less b/src/assets/less/components/package-file-browser.less index c6bb46b4f..e657164a5 100644 --- a/src/assets/less/components/package-file-browser.less +++ b/src/assets/less/components/package-file-browser.less @@ -6,15 +6,6 @@ font-weight: 400; -webkit-font-smoothing: antialiased; - .version-dropdown { - font-size: 16px; - float: right; - - .version-dropdown-selected-version { - font-weight: 600; - } - } - .box-files { width: 100%; diff --git a/src/assets/less/components/package-install-block.less b/src/assets/less/components/package-install-block.less index 3ea5324fe..41bf10d44 100644 --- a/src/assets/less/components/package-install-block.less +++ b/src/assets/less/components/package-install-block.less @@ -24,37 +24,6 @@ border-radius: 8px; } - .dropdown-wrapper { - display: flex; - align-items: center; - height: 32px; - - label { - margin-bottom: 0; - } - - .btn.dropdown-toggle { - font-size: 14px; - line-height: 20px; - color: #fff; - height: 100%; - background: #394356; - border-radius: 6px; - border: none; - padding: 6px 15px 6px 12px; - - &:active, &:hover, &:focus { - color: #fff; - } - - > span { - max-width: 100px; - text-overflow: ellipsis; - overflow: hidden; - } - } - } - .switch-wrapper { align-items: center; @@ -144,6 +113,18 @@ } } + .versions-wrapper { + display: flex; + align-items: center; + column-gap: 8px; + + >span { + color: #fff; + font-size: 14px; + line-height: 20px; + } + } + .install-settings { display: flex; justify-content: flex-end; @@ -167,7 +148,7 @@ } } - & > .dropdown-wrapper { + & > .versions-wrapper { display: none; @media (min-width: @screen-sm-min) { @@ -282,40 +263,18 @@ } } - .dropdown-wrapper { - margin-top: 24px; + .versions-wrapper { + display: flex; flex-direction: column; - align-items: start; - height: auto; + row-gap: 8px; + margin-top: 24px; + width: 100%; + align-items: flex-start; - label { + >span { + color: #5c667a; font-weight: 400; } - - .btn-group { - width: 100%; - margin-top: 8px; - - &.open .dropdown-menu { - max-width: unset; - width: 100%; - } - } - - .dropdown-toggle { - width: 100%; - padding: 10px 8px 10px 16px; - border: 1px solid #cfd6dd; - color: #17233b; - background-color: #fff; - display: flex; - align-items: center; - justify-content: space-between; - - > span { - max-width: 100%; - } - } } .btn-primary { diff --git a/src/assets/less/components/package.less b/src/assets/less/components/package.less index 5ed957bc4..53c8acf0b 100644 --- a/src/assets/less/components/package.less +++ b/src/assets/less/components/package.less @@ -582,14 +582,6 @@ .c-stats-table { min-height: 346px; } - - .version-dropdown { - vertical-align: top; - - .dropdown-menu { - max-height: 228px; - } - } } } diff --git a/src/assets/less/components/periods-dropdown.less b/src/assets/less/components/periods-dropdown.less index b5b315b15..6899c0bf9 100644 --- a/src/assets/less/components/periods-dropdown.less +++ b/src/assets/less/components/periods-dropdown.less @@ -1,207 +1,300 @@ .c-periods-dropdown { - width: 100%; + font-family: Lexend, sans-serif; + font-style: normal; + font-weight: 400; + -webkit-font-smoothing: antialiased; + position: relative; + z-index: 11; + display: flex; + flex-grow: 1; - @media (min-width: @screen-sm-min) { - width: auto; - } - - .btn-group { - width: 100%; - - @media (min-width: @screen-sm-min) { - width: auto; - } - - .btn.dropdown-toggle { + .dropdown { + &_head { display: flex; - align-items: center; - justify-content: space-between; - column-gap: 4px; - width: 100%; - background: transparent; - padding: 0; - box-shadow: none; - border: none; - border-radius: 6px; + flex-grow: 1; - > span { - font-weight: 400; + >span { font-size: 14px; line-height: 20px; + letter-spacing: 0; + background: #5c667a; + margin-right: 16px; } - > i { + &_selected { + all: unset; + box-sizing: border-box; display: flex; align-items: center; - justify-content: center; - width: 20px; - height: 20px; + justify-content: space-between; + flex-grow: 1; + height: 40px; + cursor: pointer; + padding: 10px 8px 10px 16px; + gap: 4px; + border-radius: 6px; + border: 1px solid #cfd6dd; + background: #fff; + + &_text { + color: #17233b; + font-size: 14px; + line-height: 20px; + text-decoration: none; + white-space: nowrap; + } + + &.opened { + .dropdown_head_selected_text { + color: #f65128; + } + } } } - &.open { - .btn.dropdown-toggle > span, .btn.dropdown-toggle > i { - color: #f65128; + &_body { + position: absolute; + top: 49px; + right: 0; + z-index: 1; + display: none; + flex-direction: column; + row-gap: 16px; + background: #fff; + padding: 8px 0 0 8px; + border-radius: 6px; + border: 1px solid #dfe3e7; + box-shadow: 0 10px 22px -2px rgba(23, 35, 59, .08), 0 0 1px 1px rgba(23, 35, 59, .11), 0 4px 4px 0 rgba(23, 35, 59, .06); + min-width: 160px; + + &.opened { + display: flex; } - > ul.dropdown-menu { - left: auto; - right: 0; - margin-top: 9px; - padding: 8px; - background: #fff; - border: 1px solid #dfe3e7; - box-shadow: 0 4px 4px rgba(23, 35, 59, .06), 0 0 1px 1px rgba(23, 35, 59, .11), 0 10px 22px -2px rgba(23, 35, 59, .08); - border-radius: 6px; - max-width: 320px; - height: 300px; + &_filter { + position: relative; + padding-right: 8px; + + > img { + position: absolute; + top: 10px; + left: 16px; + pointer-events: none; + } + + > input { + height: 40px; + padding: 10px 8px 10px 42px; + border-radius: 6px; + border: 1px solid #cfd6dd; + background: #fff; + width: 100%; + + &:focus { + border: 1px solid #f65128; + } + + &:focus-visible { + outline: none; + } + } + } + + &_list { + list-style-type: none; overflow-y: auto; - width: 100%; + padding: 0 8px 0 0; + margin: 0; + max-height: 234px; - @media (min-width: @screen-sm-min) { - width: auto; + &_separator { + height: 1px; + background: #dfe3e7; + margin: 10px 0; } - li { - &.divider { - height: 1px; - background: #dfe3e7; - margin: 10px 0; + &_item { + height: 40px; + font-size: 14px; + + >a { + display: inline-block; + text-align: end; + height: 100%; + padding: 10px; + color: #111a2c; + white-space: nowrap; + cursor: pointer; + width: 100%; + text-overflow: ellipsis; + overflow: hidden; + text-decoration: none; + } + + &:hover { + border-radius: 4px; + background: #f3f5f7; } - > a { + &.selected { + border-radius: 4px; + background: #eee; + } + } + } + + &_nothing-found-msg { + display: flex; + align-items: center; + justify-content: flex-start; + padding: 8px; + } + } + } +} + +.c-gsap-package-sidemenu { + .c-periods-dropdown { + font-family: Inter, Lexend, sans-serif; + + .dropdown { + &_head { + justify-content: flex-end; + + &_selected { + margin-left: 12px; + border: none; + flex-grow: 0; + column-gap: 16px; + padding: 0; + height: auto; + + &_text { + color: #222; + font-weight: 500; + letter-spacing: -.2px; + } + + &_img-wrapper { display: flex; align-items: center; - justify-content: flex-end; - height: 40px; - width: 100%; - padding: 10px; - font-weight: 400; - font-size: 14px; - line-height: 20px; + justify-content: center; color: #111a2c; + padding: 0; + background: #f2f2f2; + border-radius: 6px; + height: 24px; + width: 24px; - &:hover { - background: #f3f5f7; - border-radius: 4px; + >img { + opacity: .7; } + } - &.disabled { - color: #b2bdc7; + &.opened { + .dropdown_head_selected { + &_text { + color: #222; + } - &:hover { - cursor: default; - background: transparent; - color: #b2bdc7; + &_img-wrapper { + background: #dfedd3; + transform: rotate(180deg) scaleX(-1); } } } } } - } - } -} -.p-proxy-project, .c-package, .p-statistics { - .c-periods-dropdown { - .btn.dropdown-toggle { - color: #111a2c; - background: #fff; - border: 1px solid #cfd6dd; - box-sizing: border-box; - border-radius: 6px; - height: 40px; - padding: 0 14px 0 16px; - } - } -} + &_body { + max-width: 160px; + top: 33px; -.p-proxy-project { - .c-periods-dropdown { - .btn-group { - margin-top: 12px; + &_list { + &_item { + &:hover { + font-weight: 600; + } - @media (min-width: @screen-sm-min) { - margin-top: 0; + &.selected > a { + font-weight: 600; + } + + &.current { + background: #f2f2f2; + border-radius: 0; + font-weight: 600; + color: #222; + } + } + } } } } } -.c-package .c-package-sidemenu { +.c-package-sidemenu { .c-periods-dropdown { - .btn.dropdown-toggle { - border: none; - height: auto; - padding: 0 0 0 16px; - - > i { - justify-content: right; - width: 10px; + .dropdown { + &_head { + justify-content: flex-end; + + &_selected { + border: none; + flex-grow: 0; + height: auto; + padding: 0; + align-items: flex-end; + column-gap: 0; + margin-right: -4px; + + &_text { + color: #111a2c; + } + } } - } - } -} -.p-statistics { - .c-periods-dropdown { - .btn.dropdown-toggle { - padding: 0 8px 0 16px; + &_body { + top: 29px; + + @media (min-width: @screen-sm-min) { + max-width: 160px; + } + } } } } -.c-gsap-package-sidemenu { +.p-proxy-project { .c-periods-dropdown { - .btn-group { - &.open { - .btn.dropdown-toggle > span, .btn.dropdown-toggle > i { - color: #222; - } + margin-top: 12px; - .btn.dropdown-toggle > i { - background: #dfedd3; - transform: rotate(180deg) scaleX(-1); - } - } + @media (min-width: @screen-sm-min) { + margin-top: 0; + } - .btn.dropdown-toggle { - > span { - font-weight: 500; - font-size: 14px; - line-height: 20px; - letter-spacing: -.2px; - color: #222; - } + .dropdown { + &_body { + width: 100%; + max-width: 320px; - > i { - display: flex; - align-items: center; - justify-content: center; - margin-left: 12px; - color: #111a2c; - padding: 0; - background: #f2f2f2; - border-radius: 6px; - height: 24px; - width: 24px; + @media (min-width: @screen-sm-min) { + width: auto; } } + } + } +} - .dropdown-menu { - > li > a { - &.current { - background: #f2f2f2; - font-weight: 600; - color: #222; - } +.p-statistics { + .c-periods-dropdown { + .dropdown { + &_body { + width: 100%; + max-width: 320px; - &:hover { - background: #dfedd3; - border-radius: 4px; - font-weight: 600; - color: #222; - } + @media (min-width: @screen-xs-max) { + width: auto; } } } diff --git a/src/assets/less/components/top-stats-table.less b/src/assets/less/components/top-stats-table.less index e4ec808b8..e2ed6bc83 100644 --- a/src/assets/less/components/top-stats-table.less +++ b/src/assets/less/components/top-stats-table.less @@ -48,15 +48,6 @@ font-size: 20px; line-height: 40px; } - - .version-dropdown { - margin-left: 12px; - font-weight: 400; - - @media (max-width: @screen-xs) { - position: initial; - } - } } .table-body { diff --git a/src/assets/less/components/version-dropdown.less b/src/assets/less/components/version-dropdown.less index 3d7b50735..d27b1efb7 100644 --- a/src/assets/less/components/version-dropdown.less +++ b/src/assets/less/components/version-dropdown.less @@ -1,39 +1,194 @@ @import "../mixins.less"; .version-dropdown { - .dropdown-menu { - font-size: 15px; - max-height: 282px; - overflow-y: auto; - - > li > a { - max-width: 320px; - text-overflow: ellipsis; - overflow: hidden; - } - } + position: relative; - .version-dropdown-selected-version { + &_selected { + all: unset; + box-sizing: border-box; display: flex; align-items: center; justify-content: center; height: 40px; cursor: pointer; border: 1px solid #cfd6dd; - box-sizing: border-box; border-radius: 6px; padding: 0 8px 0 16px; - font-size: 14px; - line-height: 20px; - & > a { + > a { + font-size: 14px; + line-height: 20px; + font-weight: 600; + color: #111a2c; + white-space: nowrap; max-width: 100px; text-overflow: ellipsis; overflow: hidden; - white-space: nowrap; - color: #111a2c; margin-right: 4px; text-decoration: none; } } + + &_wrapper { + position: absolute; + top: 49px; + right: 0; + z-index: 11; + display: none; + flex-direction: column; + row-gap: 16px; + font-size: 15px; + max-height: 282px; + padding: 8px 0 0 8px; + background: #fff; + border: 1px solid #dfe3e7; + box-shadow: 0 4px 4px rgba(23, 35, 59, .06), 0 0 1px 1px rgba(23, 35, 59, .11), 0 10px 22px -2px rgba(23, 35, 59, .08); + border-radius: 6px; + width: auto; + max-width: 316px; + min-width: 160px; + + @media (min-width: 576px) { + max-width: 320px; + } + + &.opened { + display: flex; + } + + &_filter { + position: relative; + padding-right: 8px; + + > img { + position: absolute; + top: 10px; + left: 14px; + pointer-events: none; + } + + > input { + height: 40px; + padding: 10px 8px 10px 42px; + border-radius: 6px; + border: 1px solid #cfd6dd; + background: #fff; + width: 100%; + + &:focus { + border: 1px solid #f65128; + } + + &:focus-visible { + outline: none; + } + } + } + + &_list { + list-style-type: none; + overflow-y: auto; + padding: 0 8px 0 0; + margin: 0; + + &_item { + height: 40px; + font-size: 14px; + + >a { + display: inline-block; + text-align: start; + height: 100%; + padding: 10px; + color: #111a2c; + white-space: nowrap; + cursor: pointer; + width: 100%; + text-overflow: ellipsis; + overflow: hidden; + text-decoration: none; + } + + &:hover { + border-radius: 4px; + background: #f3f5f7; + } + + &.selected { + border-radius: 4px; + background: #eee; + } + } + + &_separator { + height: 1px; + background: #dfe3e7; + margin: 10px 0; + } + } + + &_no-versions-found { + display: flex; + align-items: center; + justify-content: flex-start; + width: 320px; + } + } +} + +.c-top-stats-table { + .version-dropdown { + margin-left: 12px; + } +} + +.c-package-install-block { + .version-dropdown { + color: #111a2c; + + &_selected { + background: #394356; + border: none; + height: 32px; + + >a { + color: #fff; + font-weight: 400; + } + } + + &_wrapper { + top: 41px; + } + } + + .settings-mobile { + .version-dropdown { + width: 100%; + + &_selected { + width: 100%; + background: #fff; + justify-content: space-between; + border: 1px solid #cfd6dd; + height: 42px; + + >a { + color: #17233c; + font-weight: 400; + } + } + + &_wrapper { + top: auto; + bottom: calc(100% + 2px); + width: 100%; + max-width: none; + + &_list { + overflow-x: hidden; + } + } + } + } } diff --git a/src/views/components/gsap-package-sidemenu.html b/src/views/components/gsap-package-sidemenu.html index 11986ff16..a86398a1a 100644 --- a/src/views/components/gsap-package-sidemenu.html +++ b/src/views/components/gsap-package-sidemenu.html @@ -8,7 +8,8 @@ + currentSelectedClass="current" + useCustomIconStyles="true"> diff --git a/src/views/components/package-install-block.html b/src/views/components/package-install-block.html index d8f033b81..c42f2e648 100644 --- a/src/views/components/package-install-block.html +++ b/src/views/components/package-install-block.html @@ -1,3 +1,5 @@ + +
{{#if type === 'npm'}}
@@ -19,27 +21,13 @@
{{/if}} - -