You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

508 lines
12 KiB

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
6 years ago
@import '../../style/themes/index';
@import '../../style/mixins/index';
@menu-prefix-cls: ~'@{ant-prefix}-menu';
9 years ago
9 years ago
// default theme
.@{menu-prefix-cls} {
.reset-component;
9 years ago
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
color: @menu-item-color;
line-height: 0; // Fix display inline-block gap
list-style: none;
background: @menu-bg;
outline: none;
box-shadow: @box-shadow-base;
transition: background 0.3s, width 0.2s;
.clearfix;
9 years ago
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
&-hidden {
display: none;
}
9 years ago
&-item-group-title {
padding: 8px 16px;
color: @menu-item-group-title-color;
font-size: @font-size-base;
line-height: @line-height-base;
transition: all 0.3s;
9 years ago
}
&-submenu,
&-submenu-inline {
transition: border-color 0.3s @ease-in-out, background 0.3s @ease-in-out,
padding 0.15s @ease-in-out;
}
&-submenu-selected {
color: @menu-highlight-color;
}
&-item:active,
&-submenu-title:active {
background: @menu-item-active-bg;
}
&-submenu &-sub {
cursor: initial;
transition: background 0.3s @ease-in-out, padding 0.3s @ease-in-out;
}
&-item > a {
display: block;
color: @menu-item-color;
&:hover {
color: @menu-highlight-color;
}
&::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: transparent;
content: '';
}
}
&-item-divider {
height: 1px;
overflow: hidden;
line-height: 0;
background-color: @border-color-split;
}
&-item:hover,
&-item-active,
&:not(&-inline) &-submenu-open,
&-submenu-active,
&-submenu-title:hover {
color: @menu-highlight-color;
9 years ago
}
&-horizontal &-item,
&-horizontal &-submenu {
margin-top: -1px;
}
&-horizontal > &-item:hover,
&-horizontal > &-item-active,
&-horizontal > &-submenu &-submenu-title:hover {
background-color: transparent;
9 years ago
}
&-item-selected {
color: @menu-highlight-color;
> a,
> a:hover {
color: @menu-highlight-color;
}
}
9 years ago
&:not(&-horizontal) &-item-selected {
background-color: @menu-item-active-bg;
}
&-inline,
&-vertical,
&-vertical-left {
border-right: @border-width-base @border-style-base @border-color-split;
}
&-vertical-right {
border-left: @border-width-base @border-style-base @border-color-split;
}
&-vertical&-sub,
&-vertical-left&-sub,
&-vertical-right&-sub {
min-width: 160px;
padding: 0;
border-right: 0;
transform-origin: 0 0;
.@{menu-prefix-cls}-item {
left: 0;
margin-left: 0;
border-right: 0;
&::after {
border-right: 0;
}
}
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
transform-origin: 0 0;
}
}
&-horizontal&-sub {
min-width: 114px; // in case of submenu width is too big: https://codesandbox.io/s/qvpwm6mk66
9 years ago
}
&-item,
&-submenu-title {
9 years ago
position: relative;
display: block;
margin: 0;
padding: 0 20px;
9 years ago
white-space: nowrap;
cursor: pointer;
transition: color 0.3s @ease-in-out, border-color 0.3s @ease-in-out,
background 0.3s @ease-in-out, padding 0.15s @ease-in-out;
.@{iconfont-css-prefix} {
min-width: 14px;
margin-right: 10px;
font-size: @font-size-base;
transition: font-size 0.15s @ease-out, margin 0.3s @ease-in-out;
+ span {
opacity: 1;
transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
}
}
9 years ago
}
9 years ago
& > &-item-divider {
height: 1px;
margin: 1px 0;
padding: 0;
overflow: hidden;
9 years ago
line-height: 0;
background-color: @border-color-split;
9 years ago
}
&-submenu {
&-popup {
position: absolute;
z-index: @zindex-dropdown;
background: @menu-popup-bg;
border-radius: @border-radius-base;
.submenu-title-wrapper {
padding-right: 20px;
}
&::before {
position: absolute;
top: -7px;
right: 0;
bottom: 0;
left: 0;
opacity: 0.0001;
content: ' ';
}
}
9 years ago
> .@{menu-prefix-cls} {
background-color: @menu-bg;
border-radius: @border-radius-base;
&-submenu-title::after {
transition: transform 0.3s @ease-in-out;
}
9 years ago
}
&-vertical,
&-vertical-left,
&-vertical-right,
&-inline {
> .@{menu-prefix-cls}-submenu-title .@{menu-prefix-cls}-submenu-arrow {
position: absolute;
top: 50%;
right: 16px;
width: 10px;
transition: transform 0.3s @ease-in-out;
&::before,
&::after {
position: absolute;
width: 6px;
height: 1.5px;
// background + background-image to makes before & after cross have same color.
// Since `linear-gradient` not work on IE9, we should hack it.
// ref: https://github.com/ant-design/ant-design/issues/15910
background: @menu-bg;
background: ~'@{menu-item-color} \9';
background-image: linear-gradient(to right, @menu-item-color, @menu-item-color);
background-image: ~'none \9';
border-radius: 2px;
transition: background 0.3s @ease-in-out, transform 0.3s @ease-in-out,
top 0.3s @ease-in-out;
content: '';
}
&::before {
transform: rotate(45deg) translateY(-2px);
}
&::after {
transform: rotate(-45deg) translateY(2px);
}
}
> .@{menu-prefix-cls}-submenu-title:hover .@{menu-prefix-cls}-submenu-arrow {
&::after,
&::before {
background: linear-gradient(to right, @menu-highlight-color, @menu-highlight-color);
}
}
}
&-inline > .@{menu-prefix-cls}-submenu-title .@{menu-prefix-cls}-submenu-arrow {
&::before {
transform: rotate(-45deg) translateX(2px);
}
&::after {
transform: rotate(45deg) translateX(-2px);
}
}
9 years ago
&-open {
&.@{menu-prefix-cls}-submenu-inline
> .@{menu-prefix-cls}-submenu-title
.@{menu-prefix-cls}-submenu-arrow {
transform: translateY(-2px);
&::after {
transform: rotate(-45deg) translateX(-2px);
}
&::before {
transform: rotate(45deg) translateX(2px);
}
}
9 years ago
}
}
8 years ago
&-vertical &-submenu-selected,
&-vertical-left &-submenu-selected,
&-vertical-right &-submenu-selected {
color: @menu-highlight-color;
> a {
color: @menu-highlight-color;
8 years ago
}
9 years ago
}
&-horizontal {
line-height: 46px;
white-space: nowrap;
border: 0;
border-bottom: @border-width-base @border-style-base @border-color-split;
9 years ago
box-shadow: none;
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
position: relative;
top: 1px;
display: inline-block;
6 years ago
vertical-align: bottom;
border-bottom: 2px solid transparent;
&:hover,
&-active,
&-open,
&-selected {
color: @menu-highlight-color;
border-bottom: 2px solid @menu-highlight-color;
}
}
> .@{menu-prefix-cls}-item {
> a {
display: block;
color: @menu-item-color;
&:hover {
color: @menu-highlight-color;
}
&::before {
bottom: -2px;
}
}
&-selected > a {
color: @menu-highlight-color;
}
9 years ago
}
&::after {
9 years ago
display: block;
clear: both;
height: 0;
content: '\20';
9 years ago
}
}
&-vertical,
&-vertical-left,
&-vertical-right,
&-inline {
.@{menu-prefix-cls}-item {
position: relative;
&::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
border-right: @menu-item-active-border-width solid @menu-highlight-color;
transform: scaleY(0.0001);
opacity: 0;
transition: transform 0.15s @ease-out, opacity 0.15s @ease-out;
content: '';
}
}
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
height: @menu-item-height;
margin-top: 4px;
margin-bottom: 4px;
padding: 0 16px;
overflow: hidden;
font-size: @font-size-base;
line-height: @menu-item-height;
text-overflow: ellipsis;
9 years ago
}
// disable margin collapsed
.@{menu-prefix-cls}-submenu {
padding-bottom: 0.01px;
}
.@{menu-prefix-cls}-item:not(:last-child) {
margin-bottom: 8px;
}
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
height: @menu-inline-toplevel-item-height;
line-height: @menu-inline-toplevel-item-height;
}
9 years ago
}
9 years ago
7 years ago
&-inline {
width: 100%;
.@{menu-prefix-cls}-selected,
.@{menu-prefix-cls}-item-selected {
&::after {
7 years ago
transform: scaleY(1);
opacity: 1;
transition: transform 0.15s @ease-in-out, opacity 0.15s @ease-in-out;
7 years ago
}
}
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
width: ~'calc(100% + 1px)';
7 years ago
}
.@{menu-prefix-cls}-submenu-title {
padding-right: 34px;
}
7 years ago
}
&-inline-collapsed {
width: @menu-collapsed-width;
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-item-group
> .@{menu-prefix-cls}-item-group-list
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-item-group
> .@{menu-prefix-cls}-item-group-list
> .@{menu-prefix-cls}-submenu
> .@{menu-prefix-cls}-submenu-title,
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
left: 0;
padding: 0 (@menu-collapsed-width - 16px) / 2 !important;
text-overflow: clip;
.@{menu-prefix-cls}-submenu-arrow {
display: none;
}
.@{iconfont-css-prefix} {
margin: 0;
font-size: 16px;
line-height: @menu-item-height;
+ span {
display: inline-block;
max-width: 0;
opacity: 0;
}
}
}
&-tooltip {
pointer-events: none;
.@{iconfont-css-prefix} {
display: none;
}
a {
color: @text-color-dark;
}
}
.@{menu-prefix-cls}-item-group-title {
padding-right: 4px;
padding-left: 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-item-group-list {
margin: 0;
padding: 0;
.@{menu-prefix-cls}-item,
.@{menu-prefix-cls}-submenu-title {
padding: 0 16px 0 28px;
}
}
&-root&-vertical,
&-root&-vertical-left,
&-root&-vertical-right,
&-root&-inline {
box-shadow: none;
}
9 years ago
&-sub&-inline {
padding: 0;
border: 0;
border-radius: 0;
box-shadow: none;
& > .@{menu-prefix-cls}-item,
& > .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
height: @menu-item-height;
line-height: @menu-item-height;
list-style-position: inside;
list-style-type: disc;
9 years ago
}
& .@{menu-prefix-cls}-item-group-title {
padding-left: 32px;
}
9 years ago
}
// Disabled state sets text to gray and nukes hover/tab effects
&-item-disabled,
&-submenu-disabled {
color: @disabled-color !important;
background: none;
border-color: transparent !important;
cursor: not-allowed;
> a {
color: @disabled-color !important;
pointer-events: none;
}
> .@{menu-prefix-cls}-submenu-title {
color: @disabled-color !important;
cursor: not-allowed;
> .@{menu-prefix-cls}-submenu-arrow {
&::before,
&::after {
background: @disabled-color !important;
}
}
}
}
9 years ago
}
@import './dark';