Browse Source

Merge branch 'master' into feature-3.1

pull/8719/head
nikogu 7 years ago
parent
commit
a74ce6873e
  1. 1
      components/button/style/mixin.less
  2. 4
      components/form/Form.tsx
  3. 37
      components/form/style/index.less
  4. 1
      components/rate/style/index.less
  5. 3
      components/slider/style/index.less

1
components/button/style/mixin.less

@ -147,7 +147,6 @@
background-image: none;
border: @border-width-base @border-style-base transparent;
white-space: nowrap;
line-height: 1.15; // https://github.com/ant-design/ant-design/issues/7070
.button-size(@btn-height-base; @btn-padding-base; @font-size-base; @btn-border-radius-base);
user-select: none;
transition: all .3s @ease-in-out;

4
components/form/Form.tsx

@ -70,7 +70,7 @@ export type GetFieldDecoratorOptions = {
exclusive?: boolean;
/** Normalize value to form component */
normalize?: (value: any, prevValue: any, allValues: any) => any;
/** Whether stop validate on first rule of error for this field. */
/** Whether stop validate on first rule of error for this field. */
validateFirst?: boolean;
};
@ -117,7 +117,7 @@ export type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>;
export interface ComponentDecorator<TOwnProps> {
<P extends FormComponentProps>(
component: React.ComponentClass<P>,
component: React.ComponentClass<P> | React.SFC<P>,
): React.ComponentClass<Omit<P, keyof FormComponentProps> & TOwnProps>;
}

37
components/form/style/index.less

@ -121,7 +121,7 @@ input[type="checkbox"] {
}
.@{ant-prefix}-switch {
margin: 4px 0;
margin: 2px 0 4px;
}
&-no-colon &-label label:after {
@ -243,22 +243,6 @@ form {
.@{ant-prefix}-select,
.@{ant-prefix}-cascader-picker {
width: 100%;
// Fix https://github.com/ant-design/ant-design/issues/6097
&:only-child {
display: block;
position: relative;
top: (@form-component-max-height - @input-height-base) / 2;
&.@{ant-prefix}-select-sm,
&.@{ant-prefix}-cascader-picker-small {
top: (@form-component-max-height - @input-height-sm) / 2;
}
&.@{ant-prefix}-select-lg,
&.@{ant-prefix}-cascader-picker-large {
top: (@form-component-max-height - @input-height-lg) / 2;
}
}
}
// Don't impact select inside input group
@ -267,25 +251,6 @@ form {
width: auto;
}
// Don't impact select inside input group addon
.@{ant-prefix}-input-group-addon .@{ant-prefix}-select,
.@{ant-prefix}-input-group-addon .@{ant-prefix}-cascader-picker {
&:only-child {
display: inline-block;
top: 0;
&.@{ant-prefix}-select-sm,
&.@{ant-prefix}-cascader-picker-small {
top: 0;
}
&.@{ant-prefix}-select-lg,
&.@{ant-prefix}-cascader-picker-large {
top: 0;
}
}
}
// fix input with addon position. https://github.com/ant-design/ant-design/issues/8243
.@{ant-prefix}-input-group-wrapper {
position: relative;

1
components/rate/style/index.less

@ -5,6 +5,7 @@
.@{rate-prefix-cls} {
.reset-component;
line-height: unset;
margin: 0;
padding: 0;
list-style: none;

3
components/slider/style/index.less

@ -10,11 +10,12 @@
@slider-tooltip-arrow-width: 4px;
@slider-tooltip-distance: @slider-tooltip-arrow-width + 4px;
@slider-tooltip-arrow-color: @slider-tooltip-bg;
@slider-margin: 14px 6px 10px;
.@{slider-prefix-cls} {
.reset-component;
position: relative;
margin: 10px 6px;
margin: @slider-margin;
padding: 4px 0;
height: 12px;
cursor: pointer;

Loading…
Cancel
Save