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.

394 lines
9.1 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';
6 years ago
@import '../../style/mixins/index';
@input-affix-width: 19px;
// size mixins for input
10 years ago
.input-lg() {
height: @input-height-lg;
padding: @input-padding-vertical-lg @input-padding-horizontal-lg;
font-size: @font-size-lg;
10 years ago
}
.input-sm() {
height: @input-height-sm;
padding: @input-padding-vertical-sm @input-padding-horizontal-sm;
10 years ago
}
// input status
// == when focus or actived
.active(@color: @outline-color) {
border-color: ~`colorPalette('@{color}', 5) `;
border-right-width: @border-width-base !important;
outline: 0;
box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@color, 20%);
}
// == when hoverd
.hover(@color: @input-hover-border-color) {
border-color: ~`colorPalette('@{color}', 5) `;
border-right-width: @border-width-base !important;
}
.disabled() {
color: @disabled-color;
background-color: @input-disabled-bg;
cursor: not-allowed;
opacity: 1;
&:hover {
.hover(@input-border-color);
}
}
// Basic style for input
.input() {
position: relative;
display: inline-block;
width: 100%;
height: @input-height-base;
padding: @input-padding-vertical-base @input-padding-horizontal-base;
color: @input-color;
font-size: @font-size-base;
line-height: @line-height-base;
background-color: @input-bg;
background-image: none;
border: @border-width-base @border-style-base @input-border-color;
border-radius: @border-radius-base;
6 years ago
transition: all 0.3s;
.placeholder(); // Reset placeholder
10 years ago
&:hover {
.hover();
}
&:focus {
.active();
}
&-disabled {
.disabled();
}
&[disabled] {
.disabled();
}
// Reset height for `textarea`s
textarea& {
max-width: 100%; // prevent textearea resize from coming out of its container
height: auto;
min-height: @input-height-base;
vertical-align: bottom;
6 years ago
transition: all 0.3s, height 0s;
}
// Size
&-lg {
10 years ago
.input-lg();
}
&-sm {
10 years ago
.input-sm();
}
}
// label input
.input-group(@inputClass) {
10 years ago
position: relative;
display: table;
width: 100%;
10 years ago
border-collapse: separate;
border-spacing: 0;
10 years ago
// Undo padding and float of grid classes
6 years ago
&[class*='col-'] {
10 years ago
float: none;
padding-right: 0;
padding-left: 0;
10 years ago
}
6 years ago
> [class*='col-'] {
padding-right: 8px;
&:last-child {
padding-right: 0;
}
}
&-addon,
&-wrap,
> .@{inputClass} {
10 years ago
display: table-cell;
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
}
10 years ago
&-addon,
&-wrap {
width: 1px; // To make addon/wrap as small as possible
10 years ago
white-space: nowrap;
vertical-align: middle;
}
&-wrap > * {
display: block !important;
}
10 years ago
.@{inputClass} {
float: left;
width: 100%;
margin-bottom: 0;
text-align: inherit;
&:focus {
z-index: 1; // Fix https://gw.alipayobjects.com/zos/rmsportal/DHNpoqfMXSfrSnlZvhsJ.png
border-right-width: 1px;
}
&:hover {
z-index: 1;
border-right-width: 1px;
}
10 years ago
}
&-addon {
position: relative;
padding: 0 @input-padding-horizontal-base;
color: @input-color;
10 years ago
font-weight: normal;
font-size: @font-size-base;
10 years ago
line-height: 1;
text-align: center;
background-color: @input-addon-bg;
border: @border-width-base @border-style-base @input-border-color;
border-radius: @border-radius-base;
6 years ago
transition: all 0.3s;
// Reset Select's style in addon
.@{ant-prefix}-select {
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);
.@{ant-prefix}-select-selection {
margin: -1px;
background-color: inherit;
border: @border-width-base @border-style-base transparent;
box-shadow: none;
}
&-open,
&-focused {
.@{ant-prefix}-select-selection {
color: @primary-color;
}
}
}
// Expand addon icon click area
// https://github.com/ant-design/ant-design/issues/3714
> i:only-child::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
10 years ago
}
// Reset rounded corners
> .@{inputClass}:first-child,
&-addon:first-child {
10 years ago
border-top-right-radius: 0;
border-bottom-right-radius: 0;
// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
10 years ago
}
> .@{inputClass}-affix-wrapper {
&:not(:first-child) .@{inputClass} {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
&:not(:last-child) .@{inputClass} {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
10 years ago
&-addon:first-child {
border-right: 0;
}
&-addon:last-child {
border-left: 0;
}
> .@{inputClass}:last-child,
&-addon:last-child {
10 years ago
border-top-left-radius: 0;
border-bottom-left-radius: 0;
// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
10 years ago
}
10 years ago
// Sizing options
&-lg .@{inputClass},
&-lg > &-addon {
10 years ago
.input-lg();
}
&-sm .@{inputClass},
&-sm > &-addon {
10 years ago
.input-sm();
}
// Fix https://github.com/ant-design/ant-design/issues/5754
&-lg .@{ant-prefix}-select-selection--single {
height: @input-height-lg;
}
&-sm .@{ant-prefix}-select-selection--single {
height: @input-height-sm;
}
.@{inputClass}-affix-wrapper {
display: table-cell;
float: left;
width: 100%;
}
&&-compact {
display: block;
.clearfix;
&-addon,
&-wrap,
> .@{inputClass} {
&:not(:first-child):not(:last-child) {
border-right-width: @border-width-base;
&:hover {
z-index: 1;
}
&:focus {
z-index: 1;
}
}
}
& > * {
display: inline-block;
float: none;
vertical-align: top; // https://github.com/ant-design/ant-design-pro/issues/139
border-radius: 0;
}
& > *:not(:last-child) {
margin-right: -@border-width-base;
border-right-width: @border-width-base;
}
// Undo float for .ant-input-group .ant-input
.@{inputClass} {
float: none;
}
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-calendar-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker .@{ant-prefix}-time-picker-input {
border-right-width: @border-width-base;
border-radius: 0;
&:hover {
z-index: 1;
}
&:focus {
z-index: 1;
}
}
& > *:first-child,
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-calendar-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:first-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:first-child .@{ant-prefix}-time-picker-input {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
& > *:last-child,
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker-focused:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-mention-wrapper:last-child .@{ant-prefix}-mention-editor,
& > .@{ant-prefix}-time-picker:last-child .@{ant-prefix}-time-picker-input {
border-right-width: @border-width-base;
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
// https://github.com/ant-design/ant-design/issues/12493
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input {
vertical-align: top;
}
}
}
.input-affix-wrapper(@inputClass) {
position: relative;
display: inline-block;
width: 100%;
text-align: start;
&:hover .@{inputClass}:not(.@{inputClass}-disabled) {
.hover();
}
.@{inputClass} {
position: relative;
text-align: inherit;
}
.@{inputClass}-prefix,
.@{inputClass}-suffix {
position: absolute;
top: 50%;
z-index: 2;
color: @input-color;
line-height: 0;
transform: translateY(-50%);
:not(.anticon) {
line-height: @line-height-base;
}
}
.@{inputClass}-prefix {
left: @input-padding-horizontal-base + 1px;
}
.@{inputClass}-suffix {
right: @input-padding-horizontal-base + 1px;
}
.@{inputClass}:not(:first-child) {
padding-left: @input-padding-horizontal-base + @input-affix-width;
}
.@{inputClass}:not(:last-child) {
padding-right: @input-padding-horizontal-base + @input-affix-width;
}
}