2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
|
|
|
@import '../../input/style/mixin';
|
|
|
|
@import '../../button/style/mixin';
|
|
|
|
@import '../../grid/style/mixin';
|
2019-07-03 20:14:39 +08:00
|
|
|
@import './components';
|
|
|
|
@import './inline';
|
|
|
|
@import './horizontal';
|
|
|
|
@import './vertical';
|
2020-02-19 22:16:55 +08:00
|
|
|
@import './status';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import './mixin';
|
|
|
|
|
|
|
|
@form-prefix-cls: ~'@{ant-prefix}-form';
|
2019-07-03 20:14:39 +08:00
|
|
|
@form-item-prefix-cls: ~'@{form-prefix-cls}-item';
|
|
|
|
@form-font-height: ceil(@font-size-base * @line-height-base);
|
|
|
|
|
|
|
|
.@{form-prefix-cls} {
|
|
|
|
.reset-component;
|
|
|
|
.reset-form;
|
|
|
|
|
|
|
|
.@{form-prefix-cls}-text {
|
|
|
|
display: inline-block;
|
|
|
|
padding-right: 8px;
|
|
|
|
}
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-02-19 22:04:25 +08:00
|
|
|
// ================================================================
|
|
|
|
// = Size =
|
|
|
|
// ================================================================
|
|
|
|
.formSize(@input-height) {
|
|
|
|
.@{form-item-prefix-cls}-label > label {
|
|
|
|
height: @input-height;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{form-item-prefix-cls}-control-input {
|
|
|
|
min-height: @input-height;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-small {
|
|
|
|
.formSize(@input-height-sm);
|
|
|
|
}
|
|
|
|
&-large {
|
|
|
|
.formSize(@input-height-lg);
|
|
|
|
}
|
2019-07-03 20:14:39 +08:00
|
|
|
}
|
|
|
|
|
2020-04-21 17:48:15 +08:00
|
|
|
.explainAndExtraDistance(@num) when (@num >= 0) {
|
2020-02-17 19:35:58 +08:00
|
|
|
padding-top: floor(@num);
|
|
|
|
}
|
2020-04-21 17:48:15 +08:00
|
|
|
|
|
|
|
.explainAndExtraDistance(@num) when (@num < 0) {
|
2020-02-17 19:35:58 +08:00
|
|
|
margin-top: floor(@num);
|
2020-04-21 17:48:15 +08:00
|
|
|
margin-bottom: floor(@num);
|
2020-02-17 19:35:58 +08:00
|
|
|
}
|
|
|
|
|
2019-07-03 20:14:39 +08:00
|
|
|
// ================================================================
|
|
|
|
// = Item =
|
|
|
|
// ================================================================
|
|
|
|
.@{form-item-prefix-cls} {
|
|
|
|
.reset-component;
|
|
|
|
|
|
|
|
margin-bottom: @form-item-margin-bottom;
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
|
|
&-with-help {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ==============================================================
|
|
|
|
// = Label =
|
|
|
|
// ==============================================================
|
|
|
|
&-label {
|
|
|
|
display: inline-block;
|
2020-03-10 22:15:27 +08:00
|
|
|
flex-grow: 0;
|
2019-07-03 20:14:39 +08:00
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-align: right;
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
&-left {
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
> label {
|
|
|
|
position: relative;
|
2019-12-13 10:38:40 +08:00
|
|
|
// display: inline;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2020-03-05 23:04:27 +08:00
|
|
|
height: @form-item-label-height;
|
2019-07-03 20:14:39 +08:00
|
|
|
color: @label-color;
|
2020-02-04 17:01:03 +08:00
|
|
|
font-size: @form-item-label-font-size;
|
2019-07-03 20:14:39 +08:00
|
|
|
|
|
|
|
> .@{iconfont-css-prefix} {
|
2020-02-04 17:01:03 +08:00
|
|
|
font-size: @form-item-label-font-size;
|
2019-07-03 20:14:39 +08:00
|
|
|
vertical-align: top;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.@{form-item-prefix-cls}-required::before {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 4px;
|
|
|
|
color: @label-required-color;
|
2020-02-04 17:01:03 +08:00
|
|
|
font-size: @form-item-label-font-size;
|
2019-07-03 20:14:39 +08:00
|
|
|
font-family: SimSun, sans-serif;
|
|
|
|
line-height: 1;
|
|
|
|
content: '*';
|
|
|
|
|
|
|
|
.@{form-prefix-cls}-hide-required-mark & {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
& when (@form-item-trailing-colon=true) {
|
|
|
|
content: ':';
|
|
|
|
}
|
|
|
|
& when not (@form-item-trailing-colon=true) {
|
|
|
|
content: ' ';
|
|
|
|
}
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
top: -0.5px;
|
2019-10-14 17:21:22 +08:00
|
|
|
margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left;
|
2019-07-03 20:14:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.@{form-item-prefix-cls}-no-colon::after {
|
|
|
|
content: ' ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ==============================================================
|
|
|
|
// = Input =
|
|
|
|
// ==============================================================
|
|
|
|
&-control {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-03-10 22:15:27 +08:00
|
|
|
flex-grow: 1;
|
2019-07-03 20:14:39 +08:00
|
|
|
|
2020-03-19 14:32:22 +08:00
|
|
|
&:first-child:not([class^=~"'@{ant-prefix}-col-'"]):not([class*=~"' @{ant-prefix}-col-'"]) {
|
2019-07-03 20:14:39 +08:00
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-control-input {
|
|
|
|
position: relative;
|
2020-02-19 22:04:25 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
min-height: @input-height-base;
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
flex: auto;
|
2020-02-28 16:45:25 +08:00
|
|
|
max-width: 100%;
|
2020-02-19 22:04:25 +08:00
|
|
|
}
|
2019-07-03 20:14:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-explain,
|
|
|
|
&-extra {
|
|
|
|
clear: both;
|
|
|
|
min-height: @form-item-margin-bottom;
|
2020-02-17 19:35:58 +08:00
|
|
|
.explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2);
|
2019-07-03 20:14:39 +08:00
|
|
|
color: @text-color-secondary;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
line-height: @line-height-base;
|
|
|
|
transition: color 0.3s @ease-out; // sync input color transition
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.show-help-motion(@className, @keyframeName, @duration: @animation-duration-slow) {
|
|
|
|
.make-motion(@className, @keyframeName, @duration);
|
|
|
|
.@{className}-enter,
|
|
|
|
.@{className}-appear {
|
|
|
|
opacity: 0;
|
|
|
|
animation-timing-function: @ease-in-out;
|
|
|
|
}
|
|
|
|
.@{className}-leave {
|
|
|
|
animation-timing-function: @ease-in-out;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.show-help-motion(show-help, antShowHelp, 0.3s);
|
|
|
|
|
|
|
|
@keyframes antShowHelpIn {
|
|
|
|
0% {
|
|
|
|
transform: translateY(-5px);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: translateY(0);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes antShowHelpOut {
|
|
|
|
to {
|
|
|
|
transform: translateY(-5px);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// need there different zoom animation
|
|
|
|
// otherwise won't trigger anim
|
|
|
|
@keyframes diffZoomIn1 {
|
|
|
|
0% {
|
|
|
|
transform: scale(0);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes diffZoomIn2 {
|
|
|
|
0% {
|
|
|
|
transform: scale(0);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes diffZoomIn3 {
|
|
|
|
0% {
|
|
|
|
transform: scale(0);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 14:32:22 +08:00
|
|
|
|
2020-03-23 10:57:37 +08:00
|
|
|
@import './rtl';
|