Browse Source

chore: Adjust collapse arrow position align with first line (#27363)

* fix: border style of Input.Search when allowClear (#27325)

* fix: border style of Input.Search when allowClear

* fix css

* update

* change name

* docs: 4.7.3 changelog (#27350)

* docs: 4.7.3 changelog

* docs: Patch 27325

* chore: improve useCombinedRefs (#27352)

* docs: 📝 update introduce

* chore: fix API table border

* chore: Adjust collapse arrow position align with first line

Co-authored-by: xrk <xrkffgg@gmail.com>
Co-authored-by: Tom Xu <ycxzhkx@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
pull/27365/head
二货机器人 4 years ago
committed by GitHub
parent
commit
c373710ce2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      CHANGELOG.en-US.md
  2. 19
      CHANGELOG.zh-CN.md
  3. 2
      components/_util/hooks/useCombinedRefs.tsx
  4. 2
      components/auto-complete/__tests__/__snapshots__/demo.test.js.snap
  5. 3
      components/collapse/style/index.less
  6. 3
      components/input/Search.tsx
  7. 14
      components/input/__tests__/__snapshots__/Search.test.js.snap
  8. 357
      components/input/__tests__/__snapshots__/demo.test.js.snap
  9. 9
      components/input/demo/group.md
  10. 14
      components/input/demo/search-input.md
  11. 13
      components/input/style/affix.less
  12. 26
      components/input/style/mixin.less
  13. 22
      components/input/style/rtl.less
  14. 17
      components/input/style/search-input.less
  15. 9
      docs/react/introduce.en-US.md
  16. 9
      docs/react/introduce.zh-CN.md
  17. 2
      package.json
  18. 12
      site/theme/static/markdown.less

19
CHANGELOG.en-US.md

@ -15,6 +15,25 @@ timeline: true
---
## 4.7.3
`2020-10-24`
- Form
- 🐞 Fix Form warning for non-boolean attribute `virtual` when use ConfigProvider. [#27343](https://github.com/ant-design/ant-design/pull/27343)
- 🛠 Adjust Form.Item `initialValue` sync status align with Form level `initialValues`. [#27319](https://github.com/ant-design/ant-design/pull/27319)
- Typography
- 🛠 Improve Typography `ellipsis` title display. [#27328](https://github.com/ant-design/ant-design/pull/27328)
- 💄 Fix Editable Typography in Card title style problems. [#27221](https://github.com/ant-design/ant-design/pull/27221)
- Input
- 🐞 Fix Input.Search duplicated `className` when `allowClear` is `true`. [#27261](https://github.com/ant-design/ant-design/pull/27261)
- 🐞 Fix Input.Search border style when enable `allowClear`. [#27261](https://github.com/ant-design/ant-design/pull/27325)
- 🐞 Fix Upload.List preview image fit size issue. [#27312](https://github.com/ant-design/ant-design/pull/27312) [@JuniorTour](https://github.com/JuniorTour)
- 🐞 Fix Notification no wrap with long text. [#27285](https://github.com/ant-design/ant-design/pull/27285) [@littleee](https://github.com/littleee)
- 🐞 Fix Menu inside flexable container will not shrink properly. [#27253](https://github.com/ant-design/ant-design/pull/27253)
- 🌐 Fix en_US, en_GB and ga_IE gramma. [#27259](https://github.com/ant-design/ant-design/pull/27259) [@yasikovsky](https://github.com/yasikovsky)
- 🐞 Fix Tag with customize `closeIcon` breaks line issue. [#27226](https://github.com/ant-design/ant-design/pull/27226) [@handycode](https://github.com/handycode)
## 4.7.2
`2020-10-19`

19
CHANGELOG.zh-CN.md

@ -15,6 +15,25 @@ timeline: true
---
## 4.7.3
`2020-10-24`
- Form
- 🐞 修复 Form 在 ConfigProvider 下会警告 `non-boolean attribute 'virtual'` 的问题。[#27343](https://github.com/ant-design/ant-design/pull/27343)
- 🛠 调整 Form.Item `initialValue` 的同步时机改由与 `initialValues` 相同。[#27319](https://github.com/ant-design/ant-design/pull/27319)
- Typography
- 🛠 优化 Typography 省略时的 `title` 提示,现在会在 `...` 上展现剩余文本。[#27328](https://github.com/ant-design/ant-design/pull/27328)
- 💄 修复 Typography 在 Card title 中编辑样式问题。[#27221](https://github.com/ant-design/ant-design/pull/27221)
- Input
- 🐞 修复 Input.Search 指定 `allowClear``className` 重复出现的问题。[#27261](https://github.com/ant-design/ant-design/pull/27261)
- 🐞 修复 修复 Input.Search 激活 `allowClear` 时边框样式异常的问题。[#27325](https://github.com/ant-design/ant-design/pull/27325)
- 🐞 修复 Upload.List 图片预览显示不全的问题。[#27312](https://github.com/ant-design/ant-design/pull/27312) [@JuniorTour](https://github.com/JuniorTour)
- 🐞 修复 Notification 长文本不换行的问题。[#27285](https://github.com/ant-design/ant-design/pull/27285) [@littleee](https://github.com/littleee)
- 🐞 修复 Menu 在 flex 容器内不会正常收缩省略的问题。[#27253](https://github.com/ant-design/ant-design/pull/27253)
- 🌐 修复 en_US、en_GB、ga_IE 国际化语法问题。[#27259](https://github.com/ant-design/ant-design/pull/27259) [@yasikovsky](https://github.com/yasikovsky)
- 🐞 修复 Tag 标签自定义关闭图标会导致换行的问题。[#27226](https://github.com/ant-design/ant-design/pull/27226) [@handycode](https://github.com/handycode)
## 4.7.2
`2020-10-19`

2
components/_util/hooks/useCombinedRefs.tsx

@ -4,7 +4,7 @@ import { fillRef } from '../ref';
function useCombinedRefs<T>(
...refs: Array<React.MutableRefObject<T> | ((instance: T) => void) | null>
) {
const targetRef = React.useRef();
const targetRef = React.useRef<T>();
React.useEffect(() => {
refs.forEach(ref => {

2
components/auto-complete/__tests__/__snapshots__/demo.test.js.snap

@ -1061,7 +1061,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
class="ant-select-selection-search"
>
<span
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-select-selection-search-input"
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button ant-select-selection-search-input"
>
<span
class="ant-input-wrapper ant-input-group"

3
components/collapse/style/index.less

@ -35,11 +35,10 @@
.iconfont-mixin();
position: absolute;
top: 50%;
top: ceil(@padding-sm + (@font-size-base * @line-height-base - @font-size-base) / 2);
left: @collapse-header-arrow-left;
display: inline-block;
font-size: @font-size-sm;
transform: translateY(-50%);
& svg {
transition: transform 0.24s;

3
components/input/Search.tsx

@ -109,12 +109,12 @@ const Search = React.forwardRef<Input, SearchProps>((props, ref) => {
className,
size: customizeSize,
suffix,
enterButton,
...restProps
} = props;
delete (restProps as any).onSearch;
delete (restProps as any).loading;
delete (restProps as any).enterButton;
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
@ -125,6 +125,7 @@ const Search = React.forwardRef<Input, SearchProps>((props, ref) => {
{
[`${prefixCls}-rtl`]: direction === 'rtl',
[`${prefixCls}-${size}`]: !!size,
[`${prefixCls}-with-button`]: !!enterButton,
},
className,
);

14
components/input/__tests__/__snapshots__/Search.test.js.snap

@ -95,7 +95,7 @@ exports[`Input.Search should support addonAfter 1`] = `
exports[`Input.Search should support addonAfter 2`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -202,13 +202,13 @@ exports[`Input.Search should support addonAfter and suffix for loading 1`] = `
exports[`Input.Search should support addonAfter and suffix for loading 2`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper ant-input-search"
class="ant-input-affix-wrapper ant-input-search ant-input-search-with-button"
>
<input
class="ant-input"
@ -261,7 +261,7 @@ exports[`Input.Search should support addonAfter and suffix for loading 2`] = `
exports[`Input.Search should support custom Button 1`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -289,7 +289,7 @@ exports[`Input.Search should support custom Button 1`] = `
exports[`Input.Search should support custom button 1`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -314,7 +314,7 @@ exports[`Input.Search should support custom button 1`] = `
exports[`Input.Search should support invalid addonAfter 1`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -460,7 +460,7 @@ exports[`Input.Search should support loading 1`] = `
exports[`Input.Search should support loading 2`] = `
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"

357
components/input/__tests__/__snapshots__/demo.test.js.snap

@ -1328,15 +1328,9 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
<span
class="ant-input-group ant-input-group-compact"
>
<input
class="ant-input"
style="width:20%"
type="text"
value="0571"
/>
<span
class="ant-input-group-wrapper ant-input-search"
style="width:30%"
style="width:40%"
>
<span
class="ant-input-wrapper ant-input-group"
@ -1344,7 +1338,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
<input
class="ant-input"
type="text"
value="26888888"
value="0571"
/>
<span
class="ant-input-group-addon"
@ -1377,6 +1371,227 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
</span>
</span>
</span>
<span
class="ant-input-group-wrapper ant-input-search"
style="width:40%"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
type="text"
value="26888888"
/>
<span
class="ant-input-suffix"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle ant-input-clear-icon"
role="button"
tabindex="-1"
>
<svg
aria-hidden="true"
class=""
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<span
class="ant-input-group-wrapper ant-input-search"
style="width:40%"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
type="text"
value="0571"
/>
<span
class="ant-input-suffix"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle ant-input-clear-icon"
role="button"
tabindex="-1"
>
<svg
aria-hidden="true"
class=""
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>
<span
class="ant-input-group-wrapper ant-input-search"
style="width:40%"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
type="text"
value="26888888"
/>
<span
class="ant-input-suffix"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle ant-input-clear-icon"
role="button"
tabindex="-1"
>
<svg
aria-hidden="true"
class=""
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>
</span>
<br />
<span
@ -2338,10 +2553,83 @@ Array [
</span>
</span>
</span>,
<span
class="ant-input-group-wrapper ant-input-search"
style="width:200px;margin:0 10px"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
placeholder="input search text"
type="text"
value=""
/>
<span
class="ant-input-suffix"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle ant-input-clear-icon-hidden ant-input-clear-icon"
role="button"
tabindex="-1"
>
<svg
aria-hidden="true"
class=""
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>,
<br />,
<br />,
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -2386,17 +2674,46 @@ Array [
<br />,
<br />,
<span
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large"
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
>
<input
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
/>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
value=""
/>
<span
class="ant-input-suffix"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle ant-input-clear-icon-hidden ant-input-clear-icon"
role="button"
tabindex="-1"
>
<svg
aria-hidden="true"
class=""
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
@ -2414,13 +2731,13 @@ Array [
<br />,
<br />,
<span
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large"
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-search ant-input-search-large"
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"
>
<input
class="ant-input ant-input-lg"
@ -2523,7 +2840,7 @@ Array [
<br />,
<br />,
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"
@ -2572,7 +2889,7 @@ Array [
<br />,
<br />,
<span
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large"
class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"
>
<span
class="ant-input-wrapper ant-input-group"

9
components/input/demo/group.md

@ -84,8 +84,13 @@ const App = () => (
</Input.Group>
<br />
<Input.Group compact>
<Input style={{ width: '20%' }} defaultValue="0571" />
<Input.Search style={{ width: '30%' }} defaultValue="26888888" />
<Input.Search style={{ width: '40%' }} defaultValue="0571" />
<Input.Search allowClear style={{ width: '40%' }} defaultValue="26888888" />
</Input.Group>
<br />
<Input.Group compact>
<Input.Search allowClear style={{ width: '40%' }} defaultValue="0571" />
<Input.Search allowClear style={{ width: '40%' }} defaultValue="26888888" />
</Input.Group>
<br />
<Input.Group compact>

14
components/input/demo/search-input.md

@ -33,12 +33,24 @@ const onSearch = value => console.log(value);
ReactDOM.render(
<>
<Search placeholder="input search text" onSearch={onSearch} style={{ width: 200 }} />
<Search
placeholder="input search text"
allowClear
onSearch={onSearch}
style={{ width: 200, margin: '0 10px' }}
/>
<br />
<br />
<Search placeholder="input search text" onSearch={onSearch} enterButton />
<br />
<br />
<Search placeholder="input search text" enterButton="Search" size="large" onSearch={onSearch} />
<Search
placeholder="input search text"
allowClear
enterButton="Search"
size="large"
onSearch={onSearch}
/>
<br />
<br />
<Search

13
components/input/style/affix.less

@ -8,6 +8,19 @@
.input();
display: inline-flex;
&:hover {
.hover();
z-index: 1;
.@{ant-prefix}-input-search-with-button & {
z-index: 0;
}
}
&-focused,
&:focus {
z-index: 1;
}
&-disabled {
.@{ant-prefix}-input[disabled] {
background: transparent;

26
components/input/style/mixin.less

@ -169,6 +169,9 @@
&:hover {
z-index: 1;
border-right-width: 1px;
.@{ant-prefix}-input-search-with-button & {
z-index: 0;
}
}
}
@ -278,6 +281,10 @@
&:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
.@{ant-prefix}-input-search & {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
}
}
@ -373,5 +380,24 @@
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input {
vertical-align: top;
}
.@{ant-prefix}-input-group-wrapper + .@{ant-prefix}-input-group-wrapper {
margin-left: -1px;
.@{ant-prefix}-input-affix-wrapper {
border-radius: 0;
}
}
.@{ant-prefix}-input-group-wrapper:not(:last-child) {
&.@{ant-prefix}-input-search > .@{ant-prefix}-input-group {
& > .@{ant-prefix}-input-group-addon > .@{ant-prefix}-input-search-button {
border-radius: 0;
}
& > .@{ant-prefix}-input {
border-radius: @border-radius-base 0 0 @border-radius-base;
}
}
}
}
}

22
components/input/style/rtl.less

@ -153,6 +153,19 @@
border-radius: @border-radius-base 0 0 @border-radius-base;
}
}
.@{ant-prefix}-input-group-wrapper-rtl + .@{ant-prefix}-input-group-wrapper-rtl {
margin-right: -1px;
margin-left: 0;
}
.@{ant-prefix}-input-group-wrapper-rtl:not(:last-child) {
&.@{ant-prefix}-input-search > .@{ant-prefix}-input-group {
& > .@{ant-prefix}-input {
border-radius: 0 @border-radius-base @border-radius-base 0;
}
}
}
}
}
@ -164,9 +177,6 @@
direction: rtl;
.@{ant-prefix}-input {
border-right: @border-width-base solid @border-color-base;
border-left: 0;
&:hover,
&:focus {
+ .@{ant-prefix}-input-group-addon .@{search-prefix}-button:not(.@{ant-prefix}-btn-primary) {
@ -178,15 +188,15 @@
> .@{ant-prefix}-input-group {
> .@{ant-prefix}-input-affix-wrapper {
border-right: @border-width-base solid @border-color-base;
border-left: 0;
&:hover,
&-focused {
border-right-color: @input-hover-border-color;
}
}
> .@{ant-prefix}-input-group-addon {
right: -1px;
left: auto;
.@{search-prefix}-button {
border-radius: @border-radius-base 0 0 @border-radius-base;
}

17
components/input/style/search-input.less

@ -7,8 +7,6 @@
.@{search-prefix} {
.@{ant-prefix}-input {
border-right: 0;
&:hover,
&:focus {
border-color: @input-hover-border-color;
@ -19,6 +17,10 @@
}
}
.@{ant-prefix}-input-affix-wrapper {
border-radius: 0;
}
// fix slight height diff in Firefox:
// https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
.@{ant-prefix}-input-lg {
@ -26,10 +28,8 @@
}
> .@{ant-prefix}-input-group {
> .@{ant-prefix}-input-affix-wrapper {
border-right: 0;
}
> .@{ant-prefix}-input-group-addon {
left: -1px;
padding: 0;
border: 0;
@ -49,4 +49,11 @@
}
}
}
&-button {
&:hover,
&:focus {
z-index: 1;
}
}
}

9
docs/react/introduce.en-US.md

@ -17,9 +17,9 @@ Following the Ant Design specification, we developed a React UI library `antd` t
vertical-align: middle;
}
.pic-plus span {
font-size: 30px;
color: #aaa;
margin: 0 20px;
color: #aaa;
font-size: 30px;
}
</style>
@ -46,9 +46,8 @@ Following the Ant Design specification, we developed a React UI library `antd` t
Polyfills are needed for IE browsers. We recommend [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) for it. You can set `targets` config if you are using [umi](http://umijs.org/).
`antd@3.x` supports both React 15 and 16 but we strongly suggest React 16 for better performance and fewer bugs.
> We drop support of IE8 after `antd@2.0`, IE9/10 after `antd@4.0`,
> We drop support of IE8 after `antd@2.0`,
> We drop support of React 15 and IE9/10 after `antd@4.0`,
## Version

9
docs/react/introduce.zh-CN.md

@ -17,9 +17,9 @@ title: Ant Design of React
vertical-align: middle;
}
.pic-plus span {
font-size: 30px;
color: #aaa;
margin: 0 20px;
color: #aaa;
font-size: 30px;
}
</style>
@ -46,9 +46,8 @@ title: Ant Design of React
对于 IE 系列浏览器,需要提供相应的 Polyfill 支持,建议使用 [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) 来解决浏览器兼容问题。如果你在使用 [umi](http://umijs.org/),可以直接使用 [targets](https://umijs.org/zh/config/#targets) 配置。
`antd@3.x` 对 React 15/16 两个版本提供支持,但是我们强烈建议你升级到 React 16,以便获得更好的性能和遇到更少的问题。
> `antd@2.0` 之后不再支持 IE8,`antd@4.0` 之后不再支持 IE9/10。
> `antd@2.0` 之后不再支持 IE8。
> `antd@4.0` 之后不再支持 React 15 和 IE9/10。
## 版本

2
package.json

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "4.7.2",
"version": "4.7.3",
"description": "An enterprise-class UI design language and React components implementation",
"title": "Ant Design",
"keywords": [

12
site/theme/static/markdown.less

@ -262,7 +262,7 @@
font-size: max(@font-size-base - 1px, 12px);
font-family: @code-family;
line-height: @line-height-base;
border: 1px solid @border-color-split;
border: 0;
-webkit-overflow-scrolling: touch;
th,
@ -270,11 +270,19 @@
padding: 12px;
border-color: @border-color-split;
border-width: 1px 0;
&:first-child {
border-left: 1px solid @border-color-split;
}
&:last-child {
border-right: 1px solid @border-color-split;
}
}
th {
padding-top: 14px;
border-width: 0 0 2px 0;
border-width: 1px 0 2px 0;
}
tbody tr {

Loading…
Cancel
Save