2019-05-06 12:04:39 +08:00
|
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
|
@import '../../style/mixins/index';
|
|
|
|
|
@import '../../input/style/mixin';
|
2022-02-16 21:14:51 +08:00
|
|
|
|
@import './status';
|
2019-12-11 23:32:19 +08:00
|
|
|
|
|
|
|
|
|
@picker-prefix-cls: ~'@{ant-prefix}-picker';
|
|
|
|
|
|
2019-12-25 20:35:29 +08:00
|
|
|
|
.picker-padding(@input-height, @font-size, @padding-horizontal) {
|
|
|
|
|
// font height probably 22.0001, So use floor better
|
|
|
|
|
@font-height: floor(@font-size * @line-height-base) + 2;
|
2020-12-25 14:31:44 +08:00
|
|
|
|
@padding-top: max(((@input-height - @font-height) / 2), 0);
|
2020-03-29 10:39:46 +08:00
|
|
|
|
@padding-bottom: max(@input-height - @font-height - @padding-top, 0);
|
2019-12-25 20:35:29 +08:00
|
|
|
|
padding: @padding-top @padding-horizontal @padding-bottom;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 23:32:19 +08:00
|
|
|
|
.@{picker-prefix-cls} {
|
2022-02-08 09:52:33 +08:00
|
|
|
|
@arrow-size: @popover-arrow-width;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
|
2020-12-22 11:08:12 +08:00
|
|
|
|
.reset-component();
|
2019-12-25 20:35:29 +08:00
|
|
|
|
.picker-padding(@input-height-base, @font-size-base, @input-padding-horizontal-base);
|
2020-01-03 16:21:34 +08:00
|
|
|
|
position: relative;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
display: inline-flex;
|
2019-12-25 20:35:29 +08:00
|
|
|
|
align-items: center;
|
2019-12-25 18:06:50 +08:00
|
|
|
|
background: @picker-bg;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
border: @border-width-base @border-style-base @select-border-color;
|
2022-03-27 00:20:38 +08:00
|
|
|
|
border-radius: @control-border-radius;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
transition: border @animation-duration-slow, box-shadow @animation-duration-slow;
|
|
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
|
&-focused {
|
|
|
|
|
.hover();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-focused {
|
|
|
|
|
.active();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&&-disabled {
|
|
|
|
|
background: @input-disabled-bg;
|
|
|
|
|
border-color: @select-border-color;
|
2020-02-12 15:18:08 +08:00
|
|
|
|
cursor: not-allowed;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-22 15:16:51 +08:00
|
|
|
|
&&-disabled &-suffix {
|
|
|
|
|
color: @disabled-color;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-06 10:02:02 +08:00
|
|
|
|
&&-borderless {
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
border-color: transparent !important;
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 23:32:19 +08:00
|
|
|
|
// ======================== Input =========================
|
|
|
|
|
&-input {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: inline-flex;
|
2020-07-06 23:01:43 +08:00
|
|
|
|
align-items: center;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
> input {
|
|
|
|
|
.input();
|
|
|
|
|
flex: auto;
|
|
|
|
|
|
|
|
|
|
// Fix Firefox flex not correct:
|
|
|
|
|
// https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
|
|
|
|
|
min-width: 1px;
|
|
|
|
|
height: auto;
|
|
|
|
|
padding: 0;
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&[disabled] {
|
|
|
|
|
background: transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
.@{picker-prefix-cls}-clear {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-27 15:56:34 +08:00
|
|
|
|
|
|
|
|
|
&-placeholder {
|
|
|
|
|
> input {
|
|
|
|
|
color: @input-placeholder-color;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Size
|
|
|
|
|
&-large {
|
2019-12-25 20:35:29 +08:00
|
|
|
|
.picker-padding(@input-height-lg, @font-size-lg, @input-padding-horizontal-lg);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
|
|
|
|
|
.@{picker-prefix-cls}-input > input {
|
|
|
|
|
font-size: @font-size-lg;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-small {
|
2019-12-25 20:35:29 +08:00
|
|
|
|
.picker-padding(@input-height-sm, @font-size-base, @input-padding-horizontal-sm);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-suffix {
|
2022-02-16 21:14:51 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
flex: none;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
align-self: center;
|
2020-12-25 14:31:44 +08:00
|
|
|
|
margin-left: (@padding-xs / 2);
|
2020-04-23 10:48:51 +08:00
|
|
|
|
color: @disabled-color;
|
2020-07-06 23:01:43 +08:00
|
|
|
|
line-height: 1;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
pointer-events: none;
|
2020-07-06 23:01:43 +08:00
|
|
|
|
|
|
|
|
|
> * {
|
|
|
|
|
vertical-align: top;
|
2022-02-16 21:14:51 +08:00
|
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
2020-07-06 23:01:43 +08:00
|
|
|
|
}
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-clear {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
right: 0;
|
2020-05-01 22:16:05 +08:00
|
|
|
|
color: @disabled-color;
|
2020-07-06 23:01:43 +08:00
|
|
|
|
line-height: 1;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
background: @component-background;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transition: opacity @animation-duration-slow, color @animation-duration-slow;
|
|
|
|
|
|
2020-07-06 23:01:43 +08:00
|
|
|
|
> * {
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 23:32:19 +08:00
|
|
|
|
&:hover {
|
2020-05-01 22:16:05 +08:00
|
|
|
|
color: @text-color-secondary;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-separator {
|
2020-04-02 15:05:31 +08:00
|
|
|
|
position: relative;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
display: inline-block;
|
2020-04-02 15:05:31 +08:00
|
|
|
|
width: 1em;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
height: @font-size-lg;
|
2020-04-09 13:18:13 +08:00
|
|
|
|
color: @disabled-color;
|
|
|
|
|
font-size: @font-size-lg;
|
2020-04-02 15:05:31 +08:00
|
|
|
|
vertical-align: top;
|
2020-03-06 15:53:44 +08:00
|
|
|
|
cursor: default;
|
2020-04-02 15:05:31 +08:00
|
|
|
|
|
2020-04-09 13:18:13 +08:00
|
|
|
|
.@{picker-prefix-cls}-focused & {
|
|
|
|
|
color: @text-color-secondary;
|
2020-04-02 15:05:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-24 17:27:40 +08:00
|
|
|
|
.@{picker-prefix-cls}-range-separator & {
|
|
|
|
|
.@{picker-prefix-cls}-disabled & {
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ======================== Range =========================
|
|
|
|
|
&-range {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
|
|
|
|
// Clear
|
|
|
|
|
.@{picker-prefix-cls}-clear {
|
|
|
|
|
right: @input-padding-horizontal-base;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
.@{picker-prefix-cls}-clear {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Active bar
|
|
|
|
|
.@{picker-prefix-cls}-active-bar {
|
|
|
|
|
bottom: -@border-width-base;
|
|
|
|
|
height: 2px;
|
|
|
|
|
margin-left: @input-padding-horizontal-base;
|
|
|
|
|
background: @primary-color;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transition: all @animation-duration-slow ease-out;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.@{picker-prefix-cls}-focused {
|
|
|
|
|
.@{picker-prefix-cls}-active-bar {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-04-02 15:05:31 +08:00
|
|
|
|
|
|
|
|
|
&-separator {
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 0 @padding-xs;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
2020-07-06 23:01:43 +08:00
|
|
|
|
|
|
|
|
|
&.@{picker-prefix-cls}-small {
|
|
|
|
|
.@{picker-prefix-cls}-clear {
|
|
|
|
|
right: @input-padding-horizontal-sm;
|
|
|
|
|
}
|
2020-11-21 00:33:21 +08:00
|
|
|
|
|
2020-11-10 14:58:23 +08:00
|
|
|
|
.@{picker-prefix-cls}-active-bar {
|
|
|
|
|
margin-left: @input-padding-horizontal-sm;
|
|
|
|
|
}
|
2020-07-06 23:01:43 +08:00
|
|
|
|
}
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ======================= Dropdown =======================
|
|
|
|
|
&-dropdown {
|
2020-12-22 11:08:12 +08:00
|
|
|
|
.reset-component();
|
2019-12-11 23:32:19 +08:00
|
|
|
|
position: absolute;
|
2022-05-19 11:15:07 +08:00
|
|
|
|
// Fix incorrect position of picker popup
|
|
|
|
|
// https://github.com/ant-design/ant-design/issues/35590
|
|
|
|
|
top: -9999px;
|
|
|
|
|
left: -9999px;
|
2019-12-19 16:35:04 +08:00
|
|
|
|
z-index: @zindex-picker;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
|
|
|
|
|
&-hidden {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-placement-bottomLeft {
|
|
|
|
|
.@{picker-prefix-cls}-range-arrow {
|
2022-02-08 09:52:33 +08:00
|
|
|
|
top: (@arrow-size / 2) - (@arrow-size / 3) + 0.7px;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
display: block;
|
2022-02-08 09:52:33 +08:00
|
|
|
|
transform: rotate(-135deg) translateY(1px);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-placement-topLeft {
|
|
|
|
|
.@{picker-prefix-cls}-range-arrow {
|
2022-02-08 09:52:33 +08:00
|
|
|
|
bottom: (@arrow-size / 2) - (@arrow-size / 3) + 0.7px;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
display: block;
|
2022-02-08 09:52:33 +08:00
|
|
|
|
transform: rotate(45deg);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-12 15:50:02 +08:00
|
|
|
|
|
2021-06-07 16:30:40 +08:00
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-topRight,
|
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-topRight {
|
2020-10-12 15:50:02 +08:00
|
|
|
|
animation-name: antSlideDownIn;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 16:30:40 +08:00
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-enter.@{ant-prefix}-slide-up-enter-active&-placement-bottomRight,
|
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-bottomLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-appear.@{ant-prefix}-slide-up-appear-active&-placement-bottomRight {
|
2020-10-12 15:50:02 +08:00
|
|
|
|
animation-name: antSlideUpIn;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 16:30:40 +08:00
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-topRight {
|
2020-10-12 15:50:02 +08:00
|
|
|
|
animation-name: antSlideDownOut;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 16:30:40 +08:00
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomLeft,
|
|
|
|
|
&.@{ant-prefix}-slide-up-leave.@{ant-prefix}-slide-up-leave-active&-placement-bottomRight {
|
2020-10-12 15:50:02 +08:00
|
|
|
|
animation-name: antSlideUpOut;
|
|
|
|
|
}
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-dropdown-range {
|
|
|
|
|
padding: (@arrow-size * 2 / 3) 0;
|
|
|
|
|
|
|
|
|
|
&-hidden {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Time picker with additional style
|
|
|
|
|
&-dropdown &-panel > &-time-panel {
|
2020-12-25 14:31:44 +08:00
|
|
|
|
padding-top: (@padding-xs / 2);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ======================== Ranges ========================
|
|
|
|
|
&-ranges {
|
2019-12-31 11:27:22 +08:00
|
|
|
|
margin-bottom: 0;
|
2020-12-25 14:31:44 +08:00
|
|
|
|
padding: (@padding-xs / 2) @padding-sm;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
overflow: hidden;
|
2020-12-25 14:31:44 +08:00
|
|
|
|
line-height: @picker-text-height - 2 * @border-width-base - (@padding-xs / 2);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
text-align: left;
|
|
|
|
|
list-style: none;
|
|
|
|
|
|
|
|
|
|
> li {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-28 14:59:17 +08:00
|
|
|
|
// https://github.com/ant-design/ant-design/issues/23687
|
|
|
|
|
.@{picker-prefix-cls}-preset > .@{ant-prefix}-tag-blue {
|
|
|
|
|
color: @primary-color;
|
|
|
|
|
background: @primary-1;
|
|
|
|
|
border-color: @primary-3;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.@{picker-prefix-cls}-ok {
|
|
|
|
|
float: right;
|
|
|
|
|
margin-left: @padding-xs;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-range-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-range-arrow {
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
display: none;
|
|
|
|
|
width: @arrow-size;
|
|
|
|
|
height: @arrow-size;
|
|
|
|
|
margin-left: @input-padding-horizontal-base * 1.5;
|
2022-02-08 09:52:33 +08:00
|
|
|
|
box-shadow: 2px 2px 6px -2px fade(@black, 10%); // use spread radius to hide shadow over popover
|
2019-12-11 23:32:19 +08:00
|
|
|
|
transition: left @animation-duration-slow ease-out;
|
2022-02-08 09:52:33 +08:00
|
|
|
|
.roundedArrow(@arrow-size, 5px, @calendar-bg);
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-panel-container {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
background: @calendar-bg;
|
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
|
box-shadow: @box-shadow-base;
|
|
|
|
|
transition: margin @animation-duration-slow;
|
|
|
|
|
|
|
|
|
|
.@{picker-prefix-cls}-panels {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
flex-wrap: nowrap;
|
2020-05-11 12:02:24 +08:00
|
|
|
|
direction: ltr;
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.@{picker-prefix-cls}-panel {
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border-width: 0 0 @border-width-base 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
2021-07-08 17:54:34 +08:00
|
|
|
|
.@{picker-prefix-cls}-content,
|
|
|
|
|
table {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 23:32:19 +08:00
|
|
|
|
&-focused {
|
|
|
|
|
border-color: @border-color-split;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-18 16:23:10 +08:00
|
|
|
|
|
|
|
|
|
// ===================== Compact Item Styles =====================
|
2022-10-28 15:06:19 +08:00
|
|
|
|
.compact-item(@picker-prefix-cls, null, ~'@{picker-prefix-cls}-focused');
|
2019-12-11 23:32:19 +08:00
|
|
|
|
}
|
2020-03-20 11:58:57 +08:00
|
|
|
|
|
2020-11-21 00:33:21 +08:00
|
|
|
|
@import './panel';
|
2020-03-20 11:58:57 +08:00
|
|
|
|
@import './rtl';
|