open-vault/ui/app/styles/components/radio-card.scss
Matthew Irish eae5e114ba
UI - replication path filtering (#7620)
* rename mount-filter-config models, components, serializer, adapters to path-filter-config

* move search-select component to core addon

* add js class for search-select-placeholder and sort out power-select deps for moving to the core component

* expose oninput from powerselect through search-select

* don't fetch mounts in the replication routes

* remove toggle from add template

* start cross-namespace fetching

* group options and set up for namespace fetch via power-select search prop

* add and style up radio-card CSS component

* add xlm size for icons between l and xl

* copy defaults so they're not getting mutated

* finalize cross-namespace fetching and getting that to work with power-select

* when passing options but no models, format the options in search select so that they render properly in the list

* tint the background of a selected radio card

* default to null mode and uniq options in search-select

* finish styling radio-card

* format inputValues when first rendering the component if options are being passed from outside

* treat mode:null as deleting existing config which simplifies save logic

* correctly prune the auto complete list since path-filter-config-list handles all of that and finish styling

* remove old component

* add search debounce and fix linting

* update search-select docs

* updating tests

* support grouped options for when to show the create prompt

* update and add tests for path-filter-config-list

* fix tests for search-select and path-filter-config-list

* the new api uses allow/deny instead of whitelist/blacklist
2019-10-25 13:16:45 -05:00

91 lines
1.7 KiB
SCSS

.radio-card-selector {
display: flex;
margin-bottom: $spacing-xs;
}
.radio-card {
width: 19rem;
box-shadow: $box-shadow-low;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: $spacing-xs $spacing-m;
border: $base-border;
border-radius: $radius;
transition: all ease-in-out $speed;
input[type='radio'] {
position: absolute;
z-index: 1;
opacity: 0;
}
input[type='radio'] + label {
border: 1px solid $grey-light;
border-radius: 50%;
cursor: pointer;
display: block;
height: 1rem;
width: 1rem;
flex-shrink: 0;
flex-grow: 0;
}
input[type='radio']:checked + label {
background: $blue;
border: 1px solid $blue;
box-shadow: inset 0 0 0 0.15rem $white;
}
input[type='radio']:focus + label {
box-shadow: 0 0 10px 1px rgba($blue, 0.4), inset 0 0 0 0.15rem $white;
}
}
.radio-card:first-child {
margin-left: 0;
}
.radio-card:last-child {
margin-right: 0;
}
.radio-card-row {
display: flex;
padding: $spacing-m;
}
.radio-card-icon {
color: $ui-gray-300;
}
.radio-card-message {
margin: $spacing-xxs;
}
.radio-card-message-title {
font-weight: $font-weight-semibold;
font-size: $size-7;
margin-bottom: $spacing-xxs;
}
.radio-card-message-body {
line-height: 1.2;
color: $ui-gray-500;
font-size: $size-8;
}
.radio-card-radio-row {
display: flex;
justify-content: center;
background: $ui-gray-050;
padding: $spacing-xs;
}
.is-selected {
&.radio-card {
border-color: $blue-500;
background: $ui-gray-010;
box-shadow: $box-shadow-middle;
}
.radio-card-icon {
color: $black;
}
.radio-card-radio-row {
background: $blue-050;
}
}