Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dropdown-list): add size, shape and color customization to dropd…
…own list BREAKING CHANGE: Use high-level picker for dropdown list base Dropdown list reuses the picker base component size, rounded and fill component options.
- Loading branch information
Showing
14 changed files
with
36 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
@import "~@progress/kendo-theme-default/scss/dropdownlist/_layout.scss"; | ||
|
||
@include exports( "dropdownlist/layout/bootstrap" ) { | ||
|
||
// Dropdown list | ||
.k-dropdown { | ||
transition: $transition; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,36 @@ | ||
@include exports("dropdownlist/layout") { | ||
|
||
// Dropdown list | ||
.k-dropdown { | ||
@include border-radius( $kendo-input-border-radius ); | ||
width: $kendo-input-default-width; | ||
border-width: $kendo-input-border-width; | ||
border-style: solid; | ||
box-sizing: border-box; | ||
outline: 0; | ||
font-family: $kendo-input-font-family; | ||
font-size: $kendo-input-font-size; | ||
line-height: $kendo-input-line-height; | ||
text-align: start; | ||
white-space: nowrap; | ||
display: inline-flex; | ||
flex-flow: row nowrap; | ||
vertical-align: middle; | ||
position: relative; | ||
overflow: hidden; | ||
transition: all .1s ease; // sass-lint:disable-line no-transition-all | ||
-webkit-touch-callout: none; | ||
-webkit-tap-highlight-color: $rgba-transparent; | ||
.k-dropdown-list {} | ||
|
||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
|
||
|
||
// Input | ||
.k-input {} | ||
|
||
// Native select | ||
select.k-dropdown-list {} | ||
|
||
// Loading icon | ||
.k-i-loading { | ||
// width: $kendo-input-icon-width; | ||
// height: $kendo-input-icon-height; | ||
} | ||
|
||
// Dropdown operator | ||
.k-dropdown-operator { | ||
width: min-content; | ||
flex: none; | ||
aspect-ratio: 1; | ||
|
||
// Select | ||
.k-select { | ||
// padding: $picker-select-padding-y $picker-select-padding-x; | ||
width: if( $use-picker-select-width, $kendo-input-spinner-width, null ); | ||
.k-input-button { | ||
border-width: 0; | ||
border-inline-start-width: $kendo-input-button-width; | ||
border-style: solid; | ||
border-color: transparent; | ||
outline: 0; | ||
display: flex; | ||
flex-flow: row nowrap; | ||
align-items: center; | ||
justify-content: center; | ||
flex: 0 0 auto; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
|
||
|
||
// Dropdown operator | ||
.k-dropdown-operator { | ||
width: auto; | ||
.k-input-button .k-button-icon { | ||
width: auto; | ||
aspect-ratio: 1; | ||
} | ||
|
||
.k-input { | ||
.k-input-inner { | ||
display: none; | ||
} | ||
.k-select { | ||
width: $kendo-button-inner-calc-size; | ||
height: $kendo-button-inner-calc-size; | ||
} | ||
} | ||
|
||
|
||
// Native select | ||
select.k-dropdown { | ||
@include border-radius( $kendo-input-border-radius ); | ||
padding: $kendo-input-padding-y $kendo-input-padding-x; | ||
border-width: 1px; | ||
border-style: solid; | ||
box-sizing: border-box; | ||
outline: 0; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
transition: all .1s ease; // sass-lint:disable-block no-transition-all | ||
cursor: pointer; | ||
// Alias | ||
.k-dropdown, | ||
.k-dropdownlist { | ||
@extend .k-dropdown-list !optional; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,9 @@ | ||
@include exports( "dropdownlist/theme" ) { | ||
|
||
// Dropdown list | ||
.k-dropdown { | ||
@include fill( | ||
$dropdownlist-text, | ||
$dropdownlist-bg, | ||
$dropdownlist-border, | ||
$dropdownlist-gradient | ||
); | ||
.k-dropdown-list {} | ||
|
||
// Hover state | ||
&:hover, | ||
&.k-state-hover { | ||
@include fill( | ||
$dropdownlist-hovered-text, | ||
$dropdownlist-hovered-bg, | ||
$dropdownlist-hovered-border, | ||
$dropdownlist-hovered-gradient | ||
); | ||
} | ||
|
||
// Focus state | ||
&:focus, | ||
&.k-state-focus { | ||
@include fill( | ||
$dropdownlist-focused-text, | ||
$dropdownlist-focused-bg, | ||
$dropdownlist-focused-border, | ||
$dropdownlist-focused-gradient | ||
); | ||
@include box-shadow($dropdownlist-focused-shadow); | ||
} | ||
&:focus-within { | ||
@include fill( | ||
$dropdownlist-focused-text, | ||
$dropdownlist-focused-bg, | ||
$dropdownlist-focused-border, | ||
$dropdownlist-focused-gradient | ||
); | ||
@include box-shadow($dropdownlist-focused-shadow); | ||
} | ||
|
||
|
||
// Invalid state | ||
&.k-invalid, | ||
&.ng-invalid, | ||
&.k-state-invalid { | ||
border-color: $invalid-border; | ||
|
||
.k-input-validation-icon { | ||
color: $invalid-text; | ||
} | ||
|
||
&:focus-within, | ||
&.k-state-focus { | ||
@include box-shadow($invalid-shadow); | ||
} | ||
} | ||
|
||
} | ||
// Native select | ||
select.k-dropdown-list {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,6 @@ | |
} | ||
|
||
|
||
.k-dropdown, | ||
.k-multiselect, | ||
.k-dateinput, | ||
.k-datepicker, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1 @@ | ||
@import "~@progress/kendo-theme-default/scss/dropdownlist/_layout.scss"; | ||
|
||
@include exports( "dropdownlist/layout/material" ) { | ||
|
||
// Dropdown list | ||
.k-dropdown { | ||
@include border-bottom-radius( 0 !important ); // sass-lint:disable-line no-important | ||
border-width: $kendo-input-border-width 0; | ||
border-top-color: transparent !important; // sass-lint:disable-line no-important | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,6 @@ | |
float: none; | ||
display: flex; | ||
flex-direction: row; | ||
|
||
.k-dropdown { | ||
width: auto; | ||
flex: 1 1 auto; | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters