mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 03:38:41 +08:00

* renames `select-box-kit` into `select-kit` * introduces `single-select` and `multi-select` as base components * introduces {{search-advanced-category-chooser}} as a better component for selecting category in advanced search * improves events handling in select-kit * recreates color selection inputs using {{multi-select}} and a custom {{selected-color}} component * replaces category-selector by a component using select-kit and based on multi-select * improves positioning of wrapper * removes the need for offscreen, and instead use `select-kit-header` as a base focus point for all select-kit based components * introduces a formal plugin api for select-kit based components * introduces a formal pattern for loading and updating select-kit based components: ``` computeValue() computeContent() mutateValue() ```
86 lines
2.0 KiB
SCSS
86 lines
2.0 KiB
SCSS
.select-box-kit, .select-kit {
|
|
&.combo-box {
|
|
border-radius: 3px;
|
|
|
|
.select-box-kit-body, .select-kit-body {
|
|
width: 100%;
|
|
}
|
|
|
|
.select-box-kit-row, .select-kit-row {
|
|
margin: 5px;
|
|
min-height: 1px;
|
|
padding: 5px;
|
|
}
|
|
|
|
.select-box-kit-filter, .select-kit-filter {
|
|
line-height: 18px;
|
|
padding: 5px 10px;
|
|
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
|
|
border-bottom: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
|
|
|
|
.filter-input {
|
|
margin-right: 5px;
|
|
}
|
|
}
|
|
|
|
.select-box-kit-header, .select-kit-header {
|
|
background: $secondary;
|
|
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
|
|
border-radius: 3px;
|
|
padding: 5px 10px;
|
|
font-weight: 500;
|
|
font-size: 1em;
|
|
line-height: 18px;
|
|
|
|
&.is-focused {
|
|
border: 1px solid $tertiary;
|
|
border-radius: 3px;
|
|
-webkit-box-shadow: $tertiary 0px 0px 6px 0px;
|
|
box-shadow: $tertiary 0px 0px 6px 0px;
|
|
}
|
|
}
|
|
|
|
&.is-disabled {
|
|
.select-kit-header {
|
|
background: #e9e9e9;
|
|
border-color: #ddd;
|
|
}
|
|
}
|
|
|
|
&.is-highlighted {
|
|
.select-kit-header {
|
|
border: 1px solid $tertiary;
|
|
-webkit-box-shadow: $tertiary 0px 0px 6px 0px;
|
|
box-shadow: $tertiary 0px 0px 6px 0px;
|
|
}
|
|
}
|
|
|
|
&.is-expanded {
|
|
.select-kit-wrapper {
|
|
display: block;
|
|
border: 1px solid $tertiary;
|
|
border-radius: 3px;
|
|
-webkit-box-shadow: $tertiary 0px 0px 6px 0px;
|
|
box-shadow: $tertiary 0px 0px 6px 0px;
|
|
}
|
|
|
|
.select-kit-header {
|
|
border-radius: 3px 3px 0 0;
|
|
border-color: transparent;
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.select-kit-body {
|
|
border-radius: 3px 3px 0 0;
|
|
}
|
|
}
|
|
|
|
&.is-expanded.is-above {
|
|
.select-kit-header {
|
|
border-radius: 0 0 3px 3px;
|
|
}
|
|
}
|
|
}
|
|
}
|