chore: sync ant-design v4.8.3 (#789)

This commit is contained in:
James Yeung 2020-11-16 10:20:32 +08:00 committed by GitHub
parent 93c85d54dc
commit 9d6c31ccf4
17 changed files with 54 additions and 44 deletions

View File

@ -1,8 +1,3 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@alert-prefix-cls: ~'@{ant-prefix}-alert';
.@{alert-prefix-cls} {
&&-rtl {
padding: 8px 37px 8px 15px;

View File

@ -19,6 +19,10 @@
background: transparent;
}
.@{ant-prefix}-image-img {
display: block;
}
.avatar-size(@avatar-size-base, @avatar-font-size-base);
&-lg {

View File

@ -1,8 +1,3 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@btn-prefix-cls: ~'@{ant-prefix}-btn';
.@{btn-prefix-cls} {
&-rtl {
direction: rtl;

View File

@ -1,9 +1,3 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@calendar-prefix-cls: ~'@{ant-prefix}-picker-calendar';
@calendar-picker-prefix-cls: ~'@{ant-prefix}-picker';
.@{calendar-prefix-cls} {
&-rtl {
direction: rtl;

View File

@ -1,5 +1,3 @@
@import './index';
.@{card-prefix-cls}-small {
> .@{card-prefix-cls}-head {
min-height: @card-head-height-sm;

View File

@ -209,6 +209,10 @@
.@{picker-prefix-cls}-clear {
right: @input-padding-horizontal-sm;
}
.@{picker-prefix-cls}-active-bar {
margin-left: @input-padding-horizontal-sm;
}
}
}

View File

@ -302,12 +302,12 @@
.@{picker-prefix-cls}-date-panel
&-in-view&-in-range&-range-hover-start
.@{cellClassName}::after {
right: -6px - @border-width-base;
right: -5px - @border-width-base;
left: 0;
}
.@{picker-prefix-cls}-date-panel &-in-view&-in-range&-range-hover-end .@{cellClassName}::after {
right: 0;
left: -6px - @border-width-base;
left: -5px - @border-width-base;
}
// Hover with range start & end

View File

@ -60,6 +60,14 @@
margin-left: 0;
}
}
&.@{picker-prefix-cls}-small {
.@{picker-prefix-cls}-active-bar {
.@{picker-prefix-cls}-rtl& {
margin-right: @input-padding-horizontal-sm;
}
}
}
}
// ======================== Ranges ========================
@ -141,13 +149,13 @@
.@{cellClassName}::after {
.@{picker-prefix-cls}-panel-rtl & {
right: 0;
left: -6px - @border-width-base;
left: -5px - @border-width-base;
}
}
.@{picker-prefix-cls}-date-panel &-in-view&-in-range&-range-hover-end .@{cellClassName}::after {
.@{picker-prefix-cls}-panel-rtl & {
right: -6px - @border-width-base;
right: -5px - @border-width-base;
left: 0;
}
}

View File

@ -140,10 +140,7 @@
z-index: @zindex-dropdown;
background: transparent;
box-shadow: none;
> .@{dropdown-prefix-cls}-menu {
transform-origin: 0 0;
}
transform-origin: 0 0;
ul,
li {

View File

@ -29,6 +29,10 @@
}
&-submenu-popup {
&.@{dropdown-prefix-cls}-menu-submenu-rtl {
transform-origin: 100% 0;
}
ul,
li {
.@{dropdown-prefix-cls}-rtl & {

View File

@ -144,7 +144,6 @@
padding: 0;
overflow: hidden;
border-right: 0;
transform-origin: 0 0;
// https://github.com/ant-design/ant-design/issues/22244
// https://github.com/ant-design/ant-design/issues/26812
@ -220,6 +219,7 @@
background: transparent;
border-radius: @border-radius-base;
box-shadow: none;
transform-origin: 0 0;
// https://github.com/ant-design/ant-design/issues/13955
&::before {

View File

@ -33,10 +33,6 @@
&-vertical&-sub,
&-vertical-left&-sub,
&-vertical-right&-sub {
.@{menu-prefix-cls}-rtl& {
transform-origin: top right;
}
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
.@{menu-prefix-cls}-rtl& {
@ -64,6 +60,10 @@
}
&-submenu {
&-rtl.@{menu-prefix-cls}-submenu-popup {
transform-origin: 100% 0;
}
&-vertical,
&-vertical-left,
&-vertical-right,

View File

@ -78,11 +78,9 @@
&-inner {
&::after {
@radio-dot-size: @radio-size - 8px;
position: absolute;
top: (@radio-size - @radio-dot-size) / 2 - 1px;
left: (@radio-size - @radio-dot-size) / 2 - 1px;
top: (@radio-size - @radio-dot-size) / 2 - @radio-border-width;
left: (@radio-size - @radio-dot-size) / 2 - @radio-border-width;
display: table;
width: @radio-dot-size;
height: @radio-dot-size;
@ -105,8 +103,8 @@
background-color: @radio-button-bg;
border-color: @border-color-base;
border-style: solid;
border-width: 1px;
border-radius: 100px;
border-width: @radio-border-width;
border-radius: 50%;
transition: all @radio-duration;
}

View File

@ -78,7 +78,7 @@
display: inline-block;
margin-right: @padding-xs / 2;
overflow: hidden;
white-space: nowrap;
white-space: pre; // fix whitespace wrapping. custom tags display all whitespace within.
text-overflow: ellipsis;
}
@ -123,13 +123,13 @@
top: 0;
left: 0;
z-index: 999;
white-space: nowrap;
white-space: pre; // fix whitespace wrapping caused width calculation bug
visibility: hidden;
}
// https://github.com/ant-design/ant-design/issues/22906
&:first-child .@{select-prefix-cls}-selection-search-input {
margin-left: 6.5px;
&:first-child > .@{select-prefix-cls}-selection-search-input {
margin-left: 6.5px !important;
}
}

View File

@ -94,6 +94,13 @@
left: auto;
}
}
&:first-child > .@{select-prefix-cls}-selection-search-input {
.@{select-prefix-cls}-rtl& {
margin-right: 5px !important;
margin-left: 0 !important;
}
}
}
// ======================= Placeholder =======================

View File

@ -258,6 +258,8 @@
// Radio
@radio-size: 16px;
@radio-top: 0px;
@radio-border-width: 1px;
@radio-dot-size: @radio-size - 8px;
@radio-dot-color: @primary-color;
@radio-dot-disabled-color: fade(@black, 20%);
@radio-solid-checked-color: @component-background;

View File

@ -105,15 +105,19 @@
text-decoration: @link-hover-decoration;
}
&[disabled] {
&[disabled],
&.@{typography-prefix-cls}-disabled {
color: @disabled-color;
cursor: not-allowed;
pointer-events: none;
&:active,
&:hover {
color: @disabled-color;
}
&:active {
pointer-events: none;
}
}
}