@import "../../themes/ionic.globals.wp";
// Windows Searchbar
// --------------------------------------------------
// deprecated
$searchbar-wp-padding: null !default;
/// @prop - Padding top of the searchbar
$searchbar-wp-padding-top: 8px !default;
/// @prop - Padding end of the searchbar
$searchbar-wp-padding-end: $searchbar-wp-padding-top !default;
/// @prop - Padding bottom of the searchbar
$searchbar-wp-padding-bottom: $searchbar-wp-padding-top !default;
/// @prop - Padding start of the searchbar
$searchbar-wp-padding-start: $searchbar-wp-padding-end !default;
/// @prop - Background of the searchbar
$searchbar-wp-background-color: transparent !default;
/// @prop - Border width of the searchbar
$searchbar-wp-border-width: 2px !default;
/// @prop - Border color of the searchbar
$searchbar-wp-border-color: $input-wp-border-color !default;
/// @prop - Border color of the searchbar on focus
$searchbar-wp-border-color-focused: color($colors-wp, primary) !default;
/// @prop - Color of the searchbar input search icon
$searchbar-wp-input-search-icon-color: #858585 !default;
/// @prop - Svg for the searchbar input search icon
$searchbar-wp-input-search-icon-svg: "" !default;
/// @prop - Size of the searchbar input search icon
$searchbar-wp-input-search-icon-size: 20px !default;
/// @prop - Padding top/bottom of the searchbar input
$searchbar-wp-input-padding-vertical: 0 !default;
/// @prop - Padding start/end of the searchbar input
$searchbar-wp-input-padding-horizontal: 8px !default;
/// @prop - Height of the searchbar input
$searchbar-wp-input-height: auto !default;
/// @prop - Line height of the searchbar input
$searchbar-wp-input-line-height: 3rem !default;
/// @prop - Color of the searchbar input placeholder
$searchbar-wp-input-placeholder-color: #858585 !default;
/// @prop - Color of the searchbar input text
$searchbar-wp-input-text-color: #141414 !default;
/// @prop - Background of the searchbar input
$searchbar-wp-input-background-color: #fff !default;
/// @prop - Border radius of the searchbar input
$searchbar-wp-input-border-radius: 0 !default;
/// @prop - Font size of the searchbar input
$searchbar-wp-input-font-size: 1.4rem !default;
/// @prop - Font weight of the searchbar input
$searchbar-wp-input-font-weight: 400 !default;
/// @prop - Color of the searchbar input clear icon
$searchbar-wp-input-clear-icon-color: #858585 !default;
/// @prop - Svg for the searchbar input clear icon
$searchbar-wp-input-clear-icon-svg: "" !default;
/// @prop - Size of the searchbar input clear icon
$searchbar-wp-input-clear-icon-size: 22px !default;
// Searchbar
// -----------------------------------------
.searchbar-wp {
background: $searchbar-wp-background-color;
@include deprecated-variable(padding, $searchbar-wp-padding) {
@include padding($searchbar-wp-padding-top, $searchbar-wp-padding-end, $searchbar-wp-padding-bottom, $searchbar-wp-padding-start);
}
}
.searchbar-wp .searchbar-input-container {
border: $searchbar-wp-border-width solid $searchbar-wp-border-color;
}
// Searchbar Search Icon
// -----------------------------------------
.searchbar-wp .searchbar-search-icon {
@include position(5px, $searchbar-wp-input-padding-horizontal, null, null);
@include svg-background-image($searchbar-wp-input-search-icon-svg, true);
position: absolute;
width: $searchbar-wp-input-search-icon-size + 1;
height: $searchbar-wp-input-search-icon-size + 1;
background-repeat: no-repeat;
background-size: $searchbar-wp-input-search-icon-size;
}
.searchbar-wp .searchbar-search-icon.activated {
background-color: transparent;
}
// Searchbar Input Field
// -----------------------------------------
.searchbar-wp .searchbar-input {
@include placeholder($searchbar-wp-input-placeholder-color);
@include padding($searchbar-wp-input-padding-vertical, $searchbar-wp-input-padding-horizontal);
@include border-radius($searchbar-wp-input-border-radius);
@include background-position(start, $searchbar-wp-input-padding-horizontal, center);
height: $searchbar-wp-input-height;
font-size: $searchbar-wp-input-font-size;
font-weight: $searchbar-wp-input-font-weight;
line-height: $searchbar-wp-input-line-height;
color: $searchbar-wp-input-text-color;
background-color: $searchbar-wp-input-background-color;
}
// Searchbar Clear Input Icon
// -----------------------------------------
.searchbar-wp .searchbar-clear-icon {
@include position(0, $searchbar-wp-input-padding-horizontal, null, null);
@include svg-background-image($searchbar-wp-input-clear-icon-svg);
@include padding(0);
@include background-position(center);
position: absolute;
width: $searchbar-wp-input-clear-icon-size;
height: 100%;
background-repeat: no-repeat;
background-size: $searchbar-wp-input-clear-icon-size;
}
.searchbar-wp .searchbar-clear-icon.activated {
background-color: transparent;
}
// Searchbar Focused
// -----------------------------------------
.searchbar-wp.searchbar-has-focus .searchbar-input-container {
border-color: $searchbar-wp-border-color-focused;
}
// Searchbar Left Aligned
// -----------------------------------------
.searchbar-wp.searchbar-has-value .searchbar-search-icon {
display: none;
}
// Searchbar Cancel Icon (iOS only)
// -----------------------------------------
.searchbar-wp .searchbar-ios-cancel {
display: none;
}
// Searchbar Cancel Icon (MD only)
// -----------------------------------------
.searchbar-wp .searchbar-md-cancel {
display: none;
}
// Searchbar in Toolbar
// -----------------------------------------
.toolbar .searchbar-wp {
@include padding(2px);
}
// Generate Default Windows Search Bar Colors
// --------------------------------------------------
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
.searchbar-wp-#{$color-name}.searchbar-has-focus .searchbar-input-container {
border-color: $color-base;
}
}