2019-08-24 01:30:52 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-09-17 19:21:07 +08:00
|
|
|
@import './themes/vars.scss';
|
2019-08-24 01:30:52 +08:00
|
|
|
|
2019-09-27 16:02:20 +08:00
|
|
|
@mixin base-picker-size-mixin ($size) {
|
|
|
|
$base-picker-tag-margin: 3px;
|
|
|
|
$base-picker-height: map-get($map: $--n-height, $key: $size);
|
|
|
|
@include m($size + '-size') {
|
|
|
|
font-size: map-get($map: $--n-font-size, $key: $size);
|
|
|
|
@include e(placeholder) {
|
|
|
|
height: $base-picker-height;
|
|
|
|
line-height: $base-picker-height;
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
min-height: $base-picker-height;
|
|
|
|
@include b(base-picker-tag) {
|
|
|
|
padding: 0px 20px 0 7px;
|
|
|
|
height: $base-picker-height - 2 * $base-picker-tag-margin;
|
|
|
|
line-height: $base-picker-height - 2 * $base-picker-tag-margin;
|
|
|
|
}
|
|
|
|
@include b(base-picker-input-tag) {
|
|
|
|
height: $base-picker-height - 2 * $base-picker-tag-margin;
|
|
|
|
line-height: $base-picker-height - 2 * $base-picker-tag-margin;
|
2019-08-26 15:41:44 +08:00
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-label) {
|
|
|
|
height: $base-picker-height;
|
|
|
|
line-height: $base-picker-height;
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@include themes-mixin {
|
|
|
|
@include b(base-picker) {
|
|
|
|
@include once {
|
|
|
|
@include base-picker-size-mixin('small');
|
|
|
|
@include base-picker-size-mixin('medium');
|
|
|
|
@include base-picker-size-mixin('large');
|
2019-08-24 01:30:52 +08:00
|
|
|
position: relative;
|
2019-09-27 16:02:20 +08:00
|
|
|
box-shadow: none;
|
|
|
|
border-radius: $--base-picker-border-radius;
|
|
|
|
width: 100%;
|
2019-08-24 01:30:52 +08:00
|
|
|
max-width: 100%;
|
2019-09-27 16:02:20 +08:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: bottom;
|
|
|
|
@include e(mark) {
|
|
|
|
cursor: pointer;
|
2019-08-24 01:30:52 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
2019-09-27 16:02:20 +08:00
|
|
|
right: 14px;
|
|
|
|
}
|
|
|
|
@include m(selected) {
|
|
|
|
@include e(placeholder) {
|
|
|
|
opacity: 0;
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include e(placeholder) {
|
|
|
|
@include once {
|
|
|
|
pointer-events: none;
|
|
|
|
position: absolute;
|
|
|
|
left: 14px;
|
|
|
|
top: 0;
|
|
|
|
opacity: 1;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
color: map-get($--base-picker-placeholder-color, 'default');
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-tags) {
|
|
|
|
@include once {
|
|
|
|
cursor: pointer;
|
|
|
|
outline: none;
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier, box-shadow .3s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier;
|
2019-09-27 16:02:20 +08:00
|
|
|
border-radius: $--base-picker-border-radius;
|
|
|
|
}
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "default");
|
|
|
|
background-color: map-get($--base-picker-background-color, "default");
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-label) {
|
|
|
|
@include once {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
vertical-align: bottom;
|
|
|
|
cursor: pointer;
|
|
|
|
outline: none;
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier, box-shadow .3s $--n-ease-in-out-cubic-bezier, background-color .3s $--n-ease-in-out-cubic-bezier;
|
2019-09-27 16:02:20 +08:00
|
|
|
border-radius: $--base-picker-border-radius;
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "default");
|
|
|
|
background-color: map-get($--base-picker-background-color, "default");
|
|
|
|
@include e(input) {
|
|
|
|
@include once {
|
|
|
|
outline: none;
|
|
|
|
cursor: pointer;
|
|
|
|
box-sizing: border-box;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
border:none;
|
|
|
|
width: 100%;
|
|
|
|
white-space: nowrap;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-09-27 16:02:20 +08:00
|
|
|
padding: 0 32px 0 14px;
|
|
|
|
background-color: transparent;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
color: $--base-picker-color;
|
|
|
|
&::placeholder {
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-09-27 16:02:20 +08:00
|
|
|
color: map-get($--base-picker-placeholder-color, 'default');
|
|
|
|
}
|
|
|
|
@include m(placeholder) {
|
|
|
|
color: map-get($--base-picker-placeholder-color, 'default');
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-tags) {
|
|
|
|
@include once {
|
|
|
|
display: flex;
|
|
|
|
padding: 3px 32px 0 14px;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
vertical-align: bottom;
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(tag) {
|
|
|
|
@include once {
|
|
|
|
margin-right: 7px;
|
|
|
|
margin-bottom: 3px;
|
|
|
|
font-size: 14px;
|
|
|
|
max-width: 100%;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include not-m(disabled) {
|
|
|
|
@include m(active) {
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "active");
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "active");
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "active");
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "active");
|
|
|
|
}
|
|
|
|
@include once {
|
|
|
|
@include b(base-picker-input-tag) {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
&:hover {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "hover");
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "focus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
&:hover {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "hover");
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "focus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(focus) {
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "focus");
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "focus");
|
|
|
|
}
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include m(disabled) {
|
2019-09-03 19:18:16 +08:00
|
|
|
cursor: not-allowed;
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-label) {
|
|
|
|
cursor: not-allowed;
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "disabled");
|
|
|
|
@include e(input) {
|
|
|
|
cursor: not-allowed;
|
|
|
|
color: map-get($--base-picker-placeholder-color, 'disabled');
|
|
|
|
@include m(placeholder) {
|
|
|
|
color: map-get($--base-picker-placeholder-color, 'disabled');
|
|
|
|
}
|
|
|
|
&::placeholder {
|
|
|
|
color: map-get($--base-picker-placeholder-color, 'disabled');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
cursor: not-allowed;
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "disabled");
|
2019-08-26 16:25:51 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include b(base-picker-tag) {
|
|
|
|
cursor: not-allowed;
|
|
|
|
border-color: rgba(255, 255, 255, 0.20);
|
2019-08-24 01:30:52 +08:00
|
|
|
color: rgba(255, 255, 255, 0.20);
|
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
@include e(placeholder) {
|
|
|
|
cursor: not-allowed;
|
|
|
|
color: map-get($--base-picker-placeholder-color, 'disabled');
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
2019-09-27 16:02:20 +08:00
|
|
|
|
|
|
|
@include b(base-picker-input-tag) {
|
|
|
|
@include once {
|
|
|
|
outline: none;
|
|
|
|
display: none;
|
|
|
|
position: relative;
|
|
|
|
margin-bottom: 3px;
|
|
|
|
max-width: 100%;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
@include e(input) {
|
|
|
|
@include once {
|
|
|
|
padding: 0;
|
|
|
|
background-color: transparent;
|
|
|
|
outline: none;
|
|
|
|
border: none;
|
|
|
|
max-width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
width: 1em;
|
|
|
|
line-height: inherit;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-11-06 15:57:03 +08:00
|
|
|
caret-color: map-get($--base-picker-caret-color, 'default');
|
2019-09-27 16:02:20 +08:00
|
|
|
color: $--base-picker-color;
|
|
|
|
}
|
|
|
|
@include once {
|
|
|
|
@include e(mirror) {
|
|
|
|
position: absolute;
|
|
|
|
padding-right: 1em;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
white-space: pre;
|
|
|
|
visibility: hidden;
|
|
|
|
user-select: none;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-08-24 01:30:52 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-06 15:57:03 +08:00
|
|
|
@include as-form-item {
|
|
|
|
@include with-status (error) {
|
|
|
|
@include b(base-picker) {
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-default");
|
|
|
|
}
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-default");
|
|
|
|
}
|
|
|
|
@include not-m(disabled) {
|
|
|
|
@include m(active) {
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-active");
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "error-active");
|
|
|
|
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-active");
|
|
|
|
background-color: map-get($map: $--base-picker-background-color, $key: "error-active");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
&:hover {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-hover");
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-focus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
&:hover {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-hover");
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-focus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(focus) {
|
|
|
|
@include b(base-picker-label) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-focus");
|
|
|
|
}
|
|
|
|
@include b(base-picker-tags) {
|
|
|
|
box-shadow: map-get($map: $--base-picker-box-shadow, $key: "error-focus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-25 16:58:04 +08:00
|
|
|
}
|
|
|
|
|
2019-09-27 16:02:20 +08:00
|
|
|
|