2020-03-07 11:45:13 +00:00
|
|
|
@import '../../style/themes/index';
|
2019-01-02 13:01:56 +00:00
|
|
|
@import '../../style/mixins/index';
|
|
|
|
@import '../../input/style/mixin';
|
2018-03-07 14:21:55 +00:00
|
|
|
|
2019-01-02 13:01:56 +00:00
|
|
|
@timepicker-prefix-cls: ~'@{ant-prefix}-time-picker';
|
2018-03-07 14:21:55 +00:00
|
|
|
@timepicker-item-height: 32px;
|
|
|
|
|
|
|
|
.@{timepicker-prefix-cls}-panel {
|
2020-12-27 06:50:32 +00:00
|
|
|
.reset-component();
|
2020-03-07 11:45:13 +00:00
|
|
|
|
2018-03-07 14:21:55 +00:00
|
|
|
position: absolute;
|
2019-03-30 08:06:06 +00:00
|
|
|
z-index: @zindex-picker;
|
|
|
|
font-family: @font-family;
|
2018-03-07 14:21:55 +00:00
|
|
|
|
|
|
|
&-inner {
|
|
|
|
position: relative;
|
2019-03-30 08:06:06 +00:00
|
|
|
left: -2px;
|
2018-03-07 14:21:55 +00:00
|
|
|
font-size: @font-size-base;
|
|
|
|
text-align: left;
|
2019-03-30 08:06:06 +00:00
|
|
|
list-style: none;
|
2018-03-07 14:21:55 +00:00
|
|
|
background-color: @component-background;
|
2019-03-30 08:06:06 +00:00
|
|
|
background-clip: padding-box;
|
2018-03-07 14:21:55 +00:00
|
|
|
border-radius: @border-radius-base;
|
2019-03-30 08:06:06 +00:00
|
|
|
outline: none;
|
2018-03-07 14:21:55 +00:00
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-input {
|
2021-01-14 09:33:17 +00:00
|
|
|
background: @input-bg;
|
2018-12-09 11:30:35 +00:00
|
|
|
width: 100%;
|
2019-03-30 08:06:06 +00:00
|
|
|
max-width: @time-picker-panel-column-width * 3 - @control-padding-horizontal - 2px;
|
2018-03-07 14:21:55 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2019-03-30 08:06:06 +00:00
|
|
|
line-height: normal;
|
2018-03-07 14:21:55 +00:00
|
|
|
border: 0;
|
|
|
|
outline: 0;
|
2019-03-30 08:06:06 +00:00
|
|
|
cursor: auto;
|
2018-03-07 14:21:55 +00:00
|
|
|
|
2020-12-27 06:50:32 +00:00
|
|
|
.placeholder();
|
2018-03-07 14:21:55 +00:00
|
|
|
|
|
|
|
&-wrap {
|
|
|
|
position: relative;
|
|
|
|
padding: 7px 2px 7px @control-padding-horizontal;
|
|
|
|
border-bottom: @border-width-base @border-style-base @border-color-split;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-invalid {
|
2019-01-02 13:01:56 +00:00
|
|
|
border-color: @error-color;
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-narrow &-input-wrap {
|
|
|
|
max-width: @time-picker-panel-column-width * 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-select {
|
2019-03-30 08:06:06 +00:00
|
|
|
position: relative; // Fix chrome weird render bug
|
2018-03-07 14:21:55 +00:00
|
|
|
float: left;
|
|
|
|
width: @time-picker-panel-column-width;
|
|
|
|
max-height: @timepicker-item-height * 6;
|
2019-03-30 08:06:06 +00:00
|
|
|
overflow: hidden;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
border-left: @border-width-base @border-style-base @border-color-split;
|
2018-03-07 14:21:55 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
2019-03-30 08:06:06 +00:00
|
|
|
border-left: 0;
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
border-right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:only-child {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
2020-03-07 11:45:13 +00:00
|
|
|
// use fixed width instead of 100%
|
|
|
|
// to fix strange render bug in safari: https://github.com/ant-design/ant-design/issues/17842
|
|
|
|
width: @time-picker-panel-column-width;
|
2018-03-07 14:21:55 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0 0 @timepicker-item-height * 5;
|
2019-03-30 08:06:06 +00:00
|
|
|
list-style: none;
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
li {
|
|
|
|
width: 100%;
|
|
|
|
height: @timepicker-item-height;
|
2019-03-30 08:06:06 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0 0 0 @control-padding-horizontal;
|
2018-03-07 14:21:55 +00:00
|
|
|
line-height: @timepicker-item-height;
|
|
|
|
text-align: left;
|
2019-03-30 08:06:06 +00:00
|
|
|
list-style: none;
|
2018-03-07 14:21:55 +00:00
|
|
|
cursor: pointer;
|
2020-03-07 11:45:13 +00:00
|
|
|
transition: all 0.3s;
|
2019-03-30 08:06:06 +00:00
|
|
|
user-select: none;
|
2020-03-07 11:45:13 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
color: @primary-color;
|
|
|
|
font-weight: 600;
|
|
|
|
outline: none;
|
|
|
|
}
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
li:hover {
|
|
|
|
background: @item-hover-bg;
|
|
|
|
}
|
|
|
|
|
|
|
|
li&-option-selected {
|
2020-03-07 11:45:13 +00:00
|
|
|
font-weight: 600;
|
2019-03-30 08:06:06 +00:00
|
|
|
background: @time-picker-selected-bg;
|
2018-03-07 14:21:55 +00:00
|
|
|
&:hover {
|
|
|
|
background: @time-picker-selected-bg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
li&-option-disabled {
|
|
|
|
color: @btn-disable-color;
|
|
|
|
&:hover {
|
|
|
|
background: transparent;
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2020-03-07 11:45:13 +00:00
|
|
|
&:focus {
|
|
|
|
color: @btn-disable-color;
|
|
|
|
font-weight: inherit;
|
|
|
|
}
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-combobox {
|
2020-12-27 06:50:32 +00:00
|
|
|
.clearfix();
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-addon {
|
|
|
|
padding: 8px;
|
|
|
|
border-top: @border-width-base @border-style-base @border-color-split;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topLeft,
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-topRight,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-topRight {
|
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
|
|
|
|
&.slide-up-enter.slide-up-enter-active&-placement-bottomRight,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-bottomLeft,
|
|
|
|
&.slide-up-appear.slide-up-appear-active&-placement-bottomRight {
|
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topLeft,
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-topRight {
|
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-bottomLeft,
|
|
|
|
&.slide-up-leave.slide-up-leave-active&-placement-bottomRight {
|
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{timepicker-prefix-cls} {
|
2020-12-27 06:50:32 +00:00
|
|
|
.reset-component();
|
2020-03-07 11:45:13 +00:00
|
|
|
|
2018-03-07 14:21:55 +00:00
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
2019-03-30 08:06:06 +00:00
|
|
|
width: 128px;
|
2018-03-07 14:21:55 +00:00
|
|
|
outline: none;
|
2020-03-07 11:45:13 +00:00
|
|
|
cursor: text;
|
2019-01-02 13:01:56 +00:00
|
|
|
transition: opacity 0.3s;
|
2018-03-07 14:21:55 +00:00
|
|
|
|
|
|
|
&-input {
|
2020-12-27 06:50:32 +00:00
|
|
|
.input();
|
2018-03-07 14:21:55 +00:00
|
|
|
&[disabled] {
|
2020-12-27 06:50:32 +00:00
|
|
|
.disabled();
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-open {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2019-03-30 08:06:06 +00:00
|
|
|
&-icon,
|
|
|
|
&-clear {
|
2018-03-07 14:21:55 +00:00
|
|
|
position: absolute;
|
2019-03-30 08:06:06 +00:00
|
|
|
top: 50%;
|
|
|
|
right: @control-padding-horizontal - 1px;
|
|
|
|
z-index: 1;
|
2018-03-07 14:21:55 +00:00
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
margin-top: -7px;
|
2019-03-30 08:06:06 +00:00
|
|
|
color: @disabled-color;
|
|
|
|
line-height: 14px;
|
|
|
|
transition: all 0.3s @ease-in-out;
|
|
|
|
user-select: none;
|
2018-11-14 13:33:56 +00:00
|
|
|
.@{timepicker-prefix-cls}-clock-icon {
|
2018-03-07 14:21:55 +00:00
|
|
|
display: block;
|
2019-03-30 08:06:06 +00:00
|
|
|
color: @disabled-color;
|
2018-03-07 14:21:55 +00:00
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-30 08:06:06 +00:00
|
|
|
&-clear {
|
|
|
|
z-index: 2;
|
|
|
|
background: @input-bg;
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
&:hover {
|
|
|
|
color: @text-color-secondary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:hover &-clear {
|
|
|
|
opacity: 1;
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
2018-03-07 14:21:55 +00:00
|
|
|
&-large &-input {
|
2020-12-27 06:50:32 +00:00
|
|
|
.input-lg();
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-small &-input {
|
2020-12-27 06:50:32 +00:00
|
|
|
.input-sm();
|
2018-03-07 14:21:55 +00:00
|
|
|
}
|
|
|
|
|
2019-03-30 08:06:06 +00:00
|
|
|
&-small &-icon,
|
|
|
|
&-small &-clear {
|
2018-03-07 14:21:55 +00:00
|
|
|
right: @control-padding-horizontal-sm - 1px;
|
|
|
|
}
|
|
|
|
}
|
2020-03-07 11:45:13 +00:00
|
|
|
|
|
|
|
// Fix cursor height in safari
|
|
|
|
// https://stackoverflow.com/q/3843408/3040605
|
|
|
|
// https://browserstrangeness.github.io/css_hacks.html#safari
|
|
|
|
@media not all and (min-resolution: 0.001dpcm) {
|
|
|
|
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
|
|
|
|
.@{ant-prefix}-input {
|
|
|
|
line-height: @line-height-base;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|