Skip to content

Commit

Permalink
Merge pull request alibaba-fusion#48 from tao1991123/master
Browse files Browse the repository at this point in the history
Fix many issue posted in alibaba LAN
  • Loading branch information
youluna authored Nov 20, 2018
2 parents 966027d + 9307419 commit 576140b
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 30 deletions.
39 changes: 33 additions & 6 deletions docs/tag/theme/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,32 @@ function render(i18n) {
<Demo title="Normal">
<DemoHead cols={['L', 'M', 'S']} />
<DemoGroup label="Normal">
<Tag.Selectable type="normal" size="large">{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium">{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small">{i18n.small}</Tag.Selectable>
</DemoGroup>

<DemoGroup label="Hover">
<Tag.Selectable type="normal" size="large" className="hover">{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium" className="hover">{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small" className="hover">{i18n.small}</Tag.Selectable>
</DemoGroup>
<DemoGroup label="Selected">
<Tag.Selectable type="normal" size="large" checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium" checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small" checked>{i18n.small}</Tag.Selectable>
</DemoGroup>

<DemoGroup label="Hover">
<DemoGroup label="Selected & Hover">
<Tag.Selectable type="normal" size="large" className="hover" checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium" className="hover" checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small" className="hover" checked>{i18n.small}</Tag.Selectable>
</DemoGroup>

<DemoGroup label="Disabled">
<Tag.Selectable type="normal" size="large" disabled>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium" disabled>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small" disabled>{i18n.small}</Tag.Selectable>
</DemoGroup>
<DemoGroup label="Selected & Disabled">
<Tag.Selectable type="normal" size="large" disabled checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="normal" size="medium" disabled checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="normal" size="small" disabled checked>{i18n.small}</Tag.Selectable>
Expand All @@ -94,18 +108,31 @@ function render(i18n) {
<Demo title="Primary">
<DemoHead cols={['L', 'M', 'S']} />
<DemoGroup label="Normal">
<Tag.Selectable type="primary" size="large">{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium">{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small">{i18n.small}</Tag.Selectable>
</DemoGroup>
<DemoGroup label="Hover">
<Tag.Selectable type="primary" size="large" className="hover">{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium" className="hover">{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small" className="hover">{i18n.small}</Tag.Selectable>
</DemoGroup>
<DemoGroup label="Selected">
<Tag.Selectable type="primary" size="large" checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium" checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small" checked>{i18n.small}</Tag.Selectable>
</DemoGroup>

<DemoGroup label="Hover">
<DemoGroup label="Selected & Hover">
<Tag.Selectable type="primary" size="large" className="hover" checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium" className="hover" checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small" className="hover" checked>{i18n.small}</Tag.Selectable>
</DemoGroup>

<DemoGroup label="Disabled">
<Tag.Selectable type="primary" size="large" disabled>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium" disabled>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small" disabled>{i18n.small}</Tag.Selectable>
</DemoGroup>
<DemoGroup label="Disabled & Selected">
<Tag.Selectable type="primary" size="large" disabled checked>{i18n.large}</Tag.Selectable>
<Tag.Selectable type="primary" size="medium" disabled checked>{i18n.medium}</Tag.Selectable>
<Tag.Selectable type="primary" size="small" disabled checked>{i18n.small}</Tag.Selectable>
Expand Down
3 changes: 2 additions & 1 deletion src/search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class Search extends React.Component {
placeholder, type, className,
style, size, prefix, searchText,
dataSource, filterProps, buttonProps,
popupContent, hasClear, ...others } = this.props;
popupContent, hasClear, visible, ...others } = this.props;

const cls = classNames({
[`${prefix}search`]: true,
Expand Down Expand Up @@ -237,6 +237,7 @@ class Search extends React.Component {
value={this.state.value}
onChange={this.onChange}
popupContent={popupContent}
visible={visible}
/>
</Group>);

Expand Down
72 changes: 51 additions & 21 deletions src/search/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,36 @@
}
&-normal {
width: 600px;
&.#{$css-prefix}large {
#{$search-prefix}-left {
border-right: none;
border-top-left-radius: $search-normal-l-corner;
border-bottom-left-radius: $search-normal-l-corner;
}

#{$search-prefix}-left {
border-right: none;
border-top-left-radius: $search-normal-corner;
border-bottom-left-radius: $search-normal-corner;
}
.#{$css-prefix}input {
border-radius: $search-normal-l-corner 0 0 $search-normal-l-corner;
}

.#{$css-prefix}input {
border-radius: $search-normal-corner 0 0 $search-normal-corner;
.#{$css-prefix}btn {
border-radius: 0 $search-normal-l-corner $search-normal-l-corner 0;
}
}

.#{$css-prefix}btn {
border-radius: 0 $search-normal-corner $search-normal-corner 0;
&.#{$css-prefix}medium {
#{$search-prefix}-left {
border-right: none;
border-top-left-radius: $search-normal-m-corner;
border-bottom-left-radius: $search-normal-m-corner;
}

.#{$css-prefix}input {
border-radius: $search-normal-m-corner 0 0 $search-normal-m-corner;
}

.#{$css-prefix}btn {
border-radius: 0 $search-normal-m-corner $search-normal-m-corner 0;
}
}

&.#{$css-prefix}primary {
Expand All @@ -80,6 +97,10 @@
$search-normal-primary-border-width,
$search-normal-primary-btn-text-padding-left,
$search-normal-primary-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-l-corner - $search-normal-primary-border-width;
border-bottom-left-radius: $search-normal-l-corner - $search-normal-primary-border-width;
}
}

&.#{$css-prefix}medium {
Expand All @@ -90,12 +111,12 @@
$search-normal-primary-border-width,
$search-normal-primary-btn-text-padding-left,
$search-normal-primary-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-m-corner - $search-normal-primary-border-width;
border-bottom-left-radius: $search-normal-m-corner - $search-normal-primary-border-width;
}
}

.#{$css-prefix}input {
border-top-left-radius: $search-normal-corner - $search-normal-primary-border-width;
border-bottom-left-radius: $search-normal-corner - $search-normal-primary-border-width;
}
}

&.#{$css-prefix}secondary {
Expand All @@ -117,6 +138,10 @@
$search-normal-secondary-border-width,
$search-normal-secondary-btn-text-padding-left,
$search-normal-secondary-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-l-corner - $search-normal-secondary-border-width;
border-bottom-left-radius: $search-normal-l-corner - $search-normal-secondary-border-width;
}
}

&.#{$css-prefix}medium {
Expand All @@ -127,12 +152,12 @@
$search-normal-secondary-border-width,
$search-normal-secondary-btn-text-padding-left,
$search-normal-secondary-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-m-corner - $search-normal-secondary-border-width;
border-bottom-left-radius: $search-normal-m-corner - $search-normal-secondary-border-width;
}
}

.#{$css-prefix}input {
border-top-left-radius: $search-normal-corner - $search-normal-secondary-border-width;
border-bottom-left-radius: $search-normal-corner - $search-normal-secondary-border-width;
}
}

&.#{$css-prefix}normal {
Expand All @@ -154,6 +179,10 @@
$search-normal-normal-border-width,
$search-normal-normal-btn-text-padding-left,
$search-normal-normal-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-l-corner - $search-normal-normal-border-width;
border-bottom-left-radius: $search-normal-l-corner - $search-normal-normal-border-width;
}
}

&.#{$css-prefix}medium {
Expand All @@ -164,12 +193,13 @@
$search-normal-normal-border-width,
$search-normal-normal-btn-text-padding-left,
$search-normal-normal-shadow);
.#{$css-prefix}input {
border-top-left-radius: $search-normal-m-corner - $search-normal-normal-border-width;
border-bottom-left-radius: $search-normal-m-corner - $search-normal-normal-border-width;
}
}

.#{$css-prefix}input {
border-top-left-radius: $search-normal-corner - $search-normal-normal-border-width;
border-bottom-left-radius: $search-normal-corner - $search-normal-normal-border-width;
}

}

&.#{$css-prefix}dark {
Expand Down
1 change: 1 addition & 0 deletions src/search/scss/mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#{$search-prefix}-input {
@include input-height($height - $border-width*2, 0);
overflow-y: hidden;
}

.#{$css-prefix}select {
Expand Down
11 changes: 9 additions & 2 deletions src/search/scss/variable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@

$search-prefix: '.#{$css-prefix}search';

// Normal
// Normal large
// ----------------------------------------
/// corner
/// @namespace size/bounding
$search-normal-corner: $corner-1 !default;
$search-normal-l-corner: $corner-1 !default;

// Normal Medium
/// corner
/// @namespace size/bounding
$search-normal-m-corner: $corner-1 !default;


// Primary
// ----------------------------------------
Expand Down

0 comments on commit 576140b

Please sign in to comment.