Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync ant-design v4.0.0-rc.4 #4762

Merged
merged 1 commit into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
display: inline-block;
height: @badge-height;
transition: all 0.3s @ease-in-out;
> p {
> p.@{number-prefix-cls}-only-unit {
height: @badge-height;
margin: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
position: relative;
display: block;
min-width: 32px;
font-size: 14px;
font-size: @font-size-base;
line-height: 22px;
cursor: pointer;

Expand Down
5 changes: 5 additions & 0 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
.active;
}

&-borderless .@{cascader-prefix-cls}-input {
border-color: transparent !important;
box-shadow: none !important;
}

&-show-search&-focused {
color: @disabled-color;
}
Expand Down
1 change: 1 addition & 0 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
line-height: 22px;
cursor: pointer;
transition: all 0.3s;
.clearfix;

.@{collapse-prefix-cls}-rtl & {
padding: @collapse-header-padding;
Expand Down
6 changes: 6 additions & 0 deletions components/date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
border-color: @select-border-color;
}

&&-borderless {
background-color: transparent !important;
border-color: transparent !important;
box-shadow: none !important;
}

// ======================== Input =========================
&-input {
position: relative;
Expand Down
5 changes: 3 additions & 2 deletions components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,18 @@
height: 100%;
max-height: @input-height-base;
color: @label-color;
font-size: @form-item-label-font-size;

> .@{iconfont-css-prefix} {
font-size: @font-size-base;
font-size: @form-item-label-font-size;
vertical-align: top;
}

&.@{form-item-prefix-cls}-required::before {
display: inline-block;
margin-right: 4px;
color: @label-required-color;
font-size: @font-size-base;
font-size: @form-item-label-font-size;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
Expand Down
29 changes: 9 additions & 20 deletions components/form/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
color: @text-color;
}
// 输入框的不同校验状态
.@{ant-prefix}-input {
.@{ant-prefix}-input,
.@{ant-prefix}-input-affix-wrapper {
&,
&:hover {
background-color: @background-color;
border-color: @border-color;
}

&:focus {
&:focus,
&-focused {
.active(@border-color);
}

Expand All @@ -22,27 +24,14 @@
}
}

.@{ant-prefix}-calendar-picker-open .@{ant-prefix}-calendar-picker-input {
.active(@border-color);
}

// Input prefix
.@{ant-prefix}-input-affix-wrapper {
.@{ant-prefix}-input {
&,
&:hover {
background-color: @background-color;
border-color: @border-color;
}

&:focus {
.active(@border-color);
}
input:focus {
box-shadow: none !important;
}
}

&:hover .@{ant-prefix}-input:not(.@{ant-prefix}-input-disabled) {
border-color: @border-color;
}
.@{ant-prefix}-calendar-picker-open .@{ant-prefix}-calendar-picker-input {
.active(@border-color);
}

.@{ant-prefix}-input-prefix {
Expand Down
4 changes: 1 addition & 3 deletions components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,7 @@
}

.@{inputClass}-affix-wrapper {
display: table-cell;
float: left;
width: 100%;
border-radius: 0;
}

&&-compact {
Expand Down
13 changes: 11 additions & 2 deletions components/notification/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,24 @@
cursor: pointer;
}

&-hook-holder,
&-notice {
position: relative;
margin-bottom: @notification-margin-bottom;
padding: @notification-padding;
overflow: hidden;
line-height: 1.5;
background: @notification-bg;
border-radius: @border-radius-base;
box-shadow: @shadow-2;
}

&-hook-holder > &-notice {
margin-bottom: 0;
box-shadow: none;
}

&-notice {
padding: @notification-padding;
line-height: @line-height-base;

&-message {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
}

.@{ant-prefix}-tabs-tab {
padding: 8px;
padding: @tabs-horizontal-padding-sm;
font-size: 16px;
}
}
Expand Down
9 changes: 9 additions & 0 deletions components/radio/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
&-rtl {
direction: rtl;
}

.@{ant-prefix}-badge-count {
z-index: 1;
}

> .@{ant-prefix}-badge:not(:first-child) > .@{radio-prefix-cls}-button-wrapper {
border-left: none;
}
}

// 一般状态
Expand Down Expand Up @@ -209,6 +217,7 @@ span.@{radio-prefix-cls} + * {
content: '';
}
}

&:first-child {
border-left: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base 0 0 @border-radius-base;
Expand Down
7 changes: 7 additions & 0 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,11 @@
&-lg {
font-size: @font-size-lg;
}

// no border style
&-borderless &-selector {
background-color: transparent !important;
border-color: transparent !important;
box-shadow: none !important;
}
}
33 changes: 23 additions & 10 deletions components/select/style/multiple.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import './index';

@select-selection-height: @input-height-base - @input-padding-vertical-base * 2;
@select-multiple-padding: @input-padding-vertical-base;
@select-multiple-item-margin-vertical: round(
(@select-selection-height - @font-size-base * @line-height-base) / 2 * 10
) / 10;
@select-multiple-item-border-width: 1px;
@select-multiple-item-height: @input-height-base - @input-padding-vertical-base * 2; // Normal 24px

@select-multiple-item-spacing-half: ceil(@input-padding-vertical-base / 2);
@select-multiple-padding: @input-padding-vertical-base - @select-multiple-item-border-width -
@select-multiple-item-spacing-half;

/**
* Do not merge `height` & `line-height` under style with `selection` & `search`,
Expand All @@ -21,11 +22,19 @@
flex-wrap: wrap;
align-items: center;
// Multiple is little different that horizontal is follow the vertical
padding: @select-multiple-padding @select-multiple-padding;
padding: @select-multiple-padding @input-padding-vertical-base;

.@{select-prefix-cls}-show-search& {
cursor: text;
}

&::after {
display: inline-block;
width: 0;
margin: @select-multiple-item-spacing-half 0;
line-height: @select-multiple-item-height;
content: '\a0';
}
}

&.@{select-prefix-cls}-allow-clear .@{select-prefix-cls}-selector {
Expand All @@ -40,12 +49,12 @@
box-sizing: border-box;
max-width: 100%;

height: @select-selection-height;
margin-top: -@select-multiple-item-margin-vertical;
height: @select-multiple-item-height;
margin-top: @select-multiple-item-spacing-half;
margin-right: @input-padding-vertical-base;
margin-bottom: -@select-multiple-item-margin-vertical;
margin-bottom: @select-multiple-item-spacing-half;
padding: 0 (@padding-xs / 2) 0 @padding-xs;
line-height: @select-selection-height - @border-width-base * 2;
line-height: @select-multiple-item-height - @select-multiple-item-border-width * 2;
background: @select-selection-item-bg;
border: 1px solid @select-selection-item-border-color;
border-radius: @border-radius-base;
Expand Down Expand Up @@ -150,6 +159,10 @@
@select-selection-height: @input-height - @input-padding-vertical-base * 2;
@select-height-without-border: @input-height - @border-width-base * 2;

.@{select-prefix-cls}-selector::after {
line-height: @select-selection-height;
}

.@{select-prefix-cls}-selection-item {
height: @select-selection-height;
line-height: @select-selection-height - @border-width-base * 2;
Expand Down
7 changes: 5 additions & 2 deletions components/slider/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@
transition: border-color 0.3s, box-shadow 0.6s,
transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);

&:focus {
&-dragging&-dragging&-dragging {
border-color: @slider-handle-color-focus;
outline: none;
box-shadow: 0 0 0 5px @slider-handle-color-focus-shadow;
}

&:focus {
outline: none;
}

&.@{ant-prefix}-tooltip-open {
border-color: @slider-handle-color-tooltip-open;
}
Expand Down
2 changes: 1 addition & 1 deletion components/steps/style/label-placement.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
&.@{steps-prefix-cls}-small:not(.@{steps-prefix-cls}-dot) {
.@{steps-prefix-cls}-item {
&-icon {
margin-left: 40px;
margin-left: 47px;
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions components/style/mixins/clearfix.less
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// mixins for clearfix
// ------------------------
.clearfix() {
zoom: 1;
&::before,
&::after {
display: table;
content: '';
}
&::after {
display: block;
clear: both;
content: '';
}
}
7 changes: 4 additions & 3 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
@form-item-trailing-colon: true;
@form-vertical-label-padding: 0 0 8px;
@form-vertical-label-margin: 0;
@form-item-label-font-size: @font-size-base;
@form-item-label-colon-margin-right: 8px;
@form-item-label-colon-margin-left: 2px;
@form-error-input-bg: @input-bg;
Expand Down Expand Up @@ -603,9 +604,9 @@
@tabs-bar-margin: 0 0 16px 0;
@tabs-horizontal-margin: 0 32px 0 0;
@tabs-horizontal-margin-rtl: 0 0 0 32px;
@tabs-horizontal-padding: 12px 16px;
@tabs-horizontal-padding-lg: 16px;
@tabs-horizontal-padding-sm: 8px 16px;
@tabs-horizontal-padding: 12px 0;
@tabs-horizontal-padding-lg: 16px 0;
@tabs-horizontal-padding-sm: 8px 0;
@tabs-vertical-padding: 8px 24px;
@tabs-vertical-margin: 0 0 16px 0;
@tabs-scrolling-size: 32px;
Expand Down
4 changes: 2 additions & 2 deletions components/timeline/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@
text-align: right;

.@{timeline-prefix-cls}-rtl& {
width: 100%;
margin-right: 12px;
text-align: left;
}
}
}
Expand All @@ -195,6 +194,7 @@
.@{timeline-prefix-cls}-rtl& {
width: 100%;
margin-right: 18px;
text-align: right;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion components/transfer/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
}

&-search {
padding: 0 24px 0 @control-padding-horizontal-sm;
padding-right: 24px;
padding-left: @control-padding-horizontal-sm;
&-action {
position: absolute;
top: 12px;
Expand Down