fleet/frontend/components/forms/fields/Dropdown/_styles.scss
jacobshandling 19a64941ba
UI – Add VPP features for iPadOS and iOS (#20755)
## Addresses #20467 – part 2

### Aggregate software:

#### Software titles
<img width="1616" alt="sw-titles-updated"
src="https://github.com/user-attachments/assets/0b9922c7-e36e-4d2f-b204-95c3cdf9b602">

#### Software versions
<img width="1616" alt="Screenshot 2024-07-29 at 6 14 21 PM"
src="https://github.com/user-attachments/assets/5a097700-cd6c-45b1-a21f-9d76a733f0ae">

#### Host software
<img width="1616" alt="Screenshot 2024-07-29 at 6 23 01 PM"
src="https://github.com/user-attachments/assets/84e18695-f47a-4022-bd53-7f5d37ce452a">


### Add software modal (VPP) _screenshots use mocked data - UI is
flexible enough to display cleanly before and after backend is in
place:_
<img width="1339" alt="happy"
src="https://github.com/user-attachments/assets/8900aa93-316c-4a09-8e5a-1a1e45b0c458">

#### No apps:
<img width="1572" alt="Screenshot 2024-07-29 at 6 35 03 PM"
src="https://github.com/user-attachments/assets/466b9b6c-4d3d-49dd-94a9-94e395d89cb7">

#### Not enabled:
<img width="1572" alt="Screenshot 2024-07-29 at 6 37 45 PM"
src="https://github.com/user-attachments/assets/9bcfd480-8741-4d95-ba3b-550dee4dc673">

#### Error:
<img width="1572" alt="Screenshot 2024-07-29 at 6 39 39 PM"
src="https://github.com/user-attachments/assets/e944dd40-676e-4aba-9cd9-49ff319bf402">

### Vuln support – Not supported for now:
_see above screenshots for `list` endpoints_

#### Software title detail
<img width="1616" alt="Screenshot 2024-07-29 at 6 47 29 PM"
src="https://github.com/user-attachments/assets/2e30fd0a-21e4-4d19-bf9b-71a994bfd0e7">

#### Software version and OS detail:
<img width="1616" alt="Screenshot 2024-07-29 at 6 48 28 PM"
src="https://github.com/user-attachments/assets/e8fec769-ba97-4b6b-b10c-9bb4c973c732">
<img width="1616" alt="Screenshot 2024-07-29 at 6 50 25 PM"
src="https://github.com/user-attachments/assets/0ac15727-e0cb-447c-8758-c58b79656d1a">


- [x] Changes file added for user-visible changes in `changes/`,
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-07-30 10:14:25 -07:00

332 lines
6 KiB
SCSS

.dropdown {
&__custom-value {
display: inline-flex;
svg {
padding: 0 $pad-small;
}
&-label {
width: 105px;
line-height: 38px;
font-size: $small;
}
}
&__custom-arrow {
display: flex;
svg {
transition: transform 0.25s ease;
}
}
&__label {
display: block;
font-size: $small;
font-weight: $regular;
color: $core-fleet-black;
margin-bottom: $pad-xsmall;
&--error {
font-weight: $bold;
}
}
&__select {
&--error {
&.Select {
.Select-control {
color: $core-vibrant-red;
border: 1px solid $core-vibrant-red;
box-sizing: border-box;
border-radius: 4px;
}
.Select-arrow {
border-top-color: $ui-error;
}
}
}
}
&__option {
display: flex;
flex-direction: column;
gap: $pad-small;
width: 100%;
}
&__help-text {
font-size: $xx-small;
white-space: normal;
color: $ui-fleet-black-50;
font-style: italic;
}
}
.Select {
&.dropdown__select {
border: 1px solid $ui-fleet-black-10;
border-radius: $border-radius;
&:hover {
box-shadow: none;
border: 1px solid $core-vibrant-blue;
}
}
.Select-control {
background-color: $ui-light-grey;
border: 0;
border-radius: $border-radius;
cursor: pointer;
.Select-value {
font-size: $small;
background-color: $ui-light-grey;
}
}
.Select-value {
font-size: $small;
border-radius: $border-radius;
background-color: $ui-light-grey;
.Select-value-icon {
border: 0;
float: right;
position: relative;
line-height: 28px;
width: 20px;
padding: 0;
margin: 0 5px;
text-indent: -999em;
&::after {
transition: color 150ms ease-in-out;
content: url(../assets/images/icon-close-fleet-black-16x16@2x.png);
transform: scale(0.5);
position: absolute;
top: -5px;
left: -5px;
visibility: visible;
font-size: $small;
color: $ui-gray;
text-indent: 0;
}
&:hover {
&::after {
content: url("../assets/images/icon-close-vibrant-blue-16x16@2x.png");
transform: scale(0.5);
}
}
}
.Select-value-label {
font-size: $small;
color: $core-fleet-black;
vertical-align: middle;
}
}
&--single {
> .Select-control {
.Select-value {
line-height: 34px;
border: none;
}
}
}
&.is-focused {
&.dropdown__select {
border: 1px solid $core-vibrant-blue;
}
&:not(.is-open) {
.Select-control {
box-shadow: none;
border-color: $core-vibrant-blue;
}
}
}
&.is-open {
.dropdown__custom-arrow .dropdown__icon {
svg {
transform: rotate(180deg);
transition: transform 0.25s ease;
path {
stroke: $core-vibrant-blue-over;
}
}
}
.dropdown__custom-value .dropdown__icon {
svg path {
fill: $core-vibrant-blue-over;
}
}
.Select-control {
border-radius: $border-radius;
}
}
:hover {
.dropdown__custom-arrow .dropdown__icon {
svg {
path {
stroke: $core-vibrant-blue-over;
}
}
}
.dropdown__custom-value .dropdown__icon {
svg path {
fill: $core-vibrant-blue-over;
}
}
&.is-open {
.dropdown__custom-arrow .dropdown__icon {
svg path {
stroke: $core-vibrant-blue-over;
}
}
.dropdown__custom-value .dropdown__icon {
svg path {
fill: $core-vibrant-blue-over;
}
}
}
}
&.has-value {
> .Select-control,
&.is-pseudo-focused > .Select-control {
.Select-value {
.Select-value-label {
color: $core-fleet-black;
font-size: $small;
}
}
}
}
.Select-menu-outer {
box-shadow: 0 4px 10px rgba(52, 59, 96, 0.15);
z-index: 6;
overflow: hidden;
border: 0;
margin: 1px 0 0;
padding: $pad-small;
animation: fade-in 150ms ease-out;
}
.Select-noresults {
font-size: $x-small;
}
.Select-option {
color: $core-fleet-black;
font-size: $x-small;
margin: 0;
padding: 10px;
display: block;
&.is-focused {
background-color: $ui-vibrant-blue-10;
.Select-icon {
color: $ui-vibrant-blue-10;
}
}
&:last-child {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
&.is-disabled {
color: $ui-fleet-black-50;
font-style: italic;
.Select-icon {
visibility: hidden;
opacity: 0;
}
}
}
.Select-icon {
color: $ui-gray;
}
.Select-placeholder {
color: $core-fleet-blue;
font-size: $small;
line-height: 34px;
box-sizing: border-box;
}
.Select-input {
color: $core-fleet-blue;
font-size: $small;
box-sizing: border-box;
height: 34px;
> input {
line-height: 34px;
padding: 0;
}
}
&.Select--multi {
.Select-control {
display: flex;
align-items: center;
height: auto;
}
.Select-multi-value-wrapper {
flex-grow: 1;
.Select-value {
border: 1px solid $ui-fleet-black-75;
vertical-align: middle;
margin-top: 0;
display: inline-flex;
flex-direction: row-reverse;
.Select-value-icon:hover {
background-color: initial;
}
.Select-value-label {
font-size: $x-small;
align-self: center;
}
}
}
.Select-arrow-zone {
display: flex;
}
.Select-option {
&.is-disabled {
color: $core-fleet-black;
cursor: default;
&.is-focused {
background-color: $ui-vibrant-blue-10;
color: $core-white;
}
}
}
.Select-value-label {
padding: 0 0 0 10px;
}
}
.premium-feature-icon {
position: relative;
top: 4px;
margin-left: 3px;
}
}