Compare commits

...

74 Commits

Author SHA1 Message Date
信鑫-King
b30832cda1 docs: 3.26.15 changelog (#22899)
* docs: 3.26.15 changelog

* fix: newline

* fix: changelog

* docs: changelog

* docs: changelog
2020-04-03 23:43:39 +08:00
Rustin
c23ea0c5e6 Revert "fix: set codesandbox referrer to no-referrer (#22792)" (#22797)
This reverts commit 44d74415
2020-04-01 11:12:11 +08:00
偏右
0c1f181957 fix: 🐛 Affix state update on unmounted component (#22790)
close #22683
2020-03-31 22:01:00 +08:00
Rustin
44d74415bc fix: set codesandbox referrer to no-referrer (#22792) 2020-03-31 21:24:36 +08:00
偏右
1c302163af 🐛 fix Table column.filtered not working (#22597)
close #22590
2020-03-25 17:45:32 +08:00
Kim, Harim
4d0ac007ed fix: multiple select search input doesn't show normally on Safari (#22586)
* Fix input padding in multple select #21950

* move padding style
2020-03-25 16:33:54 +08:00
二货机器人
282c792224 docs: 3.26.14 changelog (#22518)
* docs: 3.26.14 changelog

* bump ts version
2020-03-23 17:38:04 +08:00
Chiciuc Nicușor
ba2ef53089 fix: Make events non-optional for Popconfirm (#22438) 2020-03-20 21:42:09 +08:00
偏右
0792ac8762 test: fix 3.x test case (#22447)
*  fix snapshot

* fix test case broken by react-component/calendar#640

* 🔒 lock @typescript-eslint/parser version
2020-03-20 19:32:59 +08:00
偏右
aabf60586d fix: Descriptions should be able to fit width (#22407)
close #22350
2020-03-19 18:41:25 +08:00
偏右
f52003261f 🐛 Fix TextArea[autoSize] don't scroll bottom in Firefox (#22014)
close #21870
2020-03-09 16:09:06 +08:00
afc163
b0146a20cb cherry pick #21703
close https://github.com/ant-design/ant-design/issues/21870#issuecomment-596072738
2020-03-09 16:04:01 +08:00
zombiej
68b948b088 docs: Update demo link 2020-03-07 23:10:41 +08:00
偏右
bece43062b docs: ❇️ release 3.26.13 (#21967) 2020-03-07 15:40:30 +08:00
偏右
2e8205b01b fix(module:badge): fix toggling animation (#21887)
close #21674

chore: remove log

fix: timer leak

fix: willUnmount

test: cov
2020-03-05 13:29:58 +08:00
zhangj
b81e3e9af0 fix: Date Picker disabled style (#21655)
* fix https://github.com/ant-design/ant-design/issues/21644

* 修复样式前缀,应该采用getPrefixCls来进行获取

* fix: 不应该直接使用input的样式

* 修复代码风格

* 修复空格问题,并且采用less变量

* 添加cursor样式,补充禁用的时候指针样式丢失

* 添加less样式,修复鼠标指针的问题。

* 修复空格问题
2020-03-03 15:01:05 +08:00
偏右
045059f604 test: fix packtracker token (#21805) 2020-03-03 15:00:33 +08:00
偏右
a473770836 🔷 Fix Result status type to string & number (#21691)
close #21592
2020-03-02 14:49:14 +08:00
Felipe Lima
92b7902f4b fix: Grid rows overlapping when using vertical gutter (#21518)
The clearfix was not enough when having columns of different heights because we have negative margin-top and margin-bottom on the grid rows when using vertical gutter. Instead of setting `clear: both` just for the `::after` pseudo-element, we should also set it for the `::before` one when we are dealing with an ant-row that was immediately preceded by another ant-row.
2020-02-28 18:06:47 +08:00
zombiej
9ee1a903a3 docs: lock riddle & codepen antd version 2020-02-27 16:22:43 +08:00
afc163
5e7a31d71f docs: update demo links 2020-02-26 16:47:44 +08:00
偏右
27c9c086b6 🐛 Table filter menu should have max-height (#21602)
close #19542
2020-02-26 14:55:22 +08:00
偏右
046f394c88 docs: fix wrong link 2020-02-26 14:38:40 +08:00
信鑫-King
2ae5efa29f release: 3.26.12 (#21547)
* release: 3.26.12

* docs: changelog

* docs: changelog
2020-02-24 13:01:34 +08:00
Rick Zhou
e85ec40c9a avoid reading innerText (#21217)
this resolves https://github.com/ant-design/ant-design/issues/21160
2020-02-24 12:09:30 +08:00
Amumu
bb335bcc78 uniq (#21522) 2020-02-22 14:16:44 +08:00
偏右
26dd6f70af 💄 tweak Upload showDownloadIcon default value (#21496)
it should be false
2020-02-21 12:55:14 +08:00
zhangj
91a5947ef2 docs: 📝 Added expandIconColumnIndex property description of Table. (#21495)
* 添加Table表格的expandIconColumnIndex属性说明。

* Update components/table/index.en-US.md

Co-Authored-By: 偏右 <afc163@gmail.com>

* Update components/table/index.zh-CN.md

Co-Authored-By: 偏右 <afc163@gmail.com>

Co-authored-by: 偏右 <afc163@gmail.com>
2020-02-20 22:43:31 +08:00
二货机器人
be19e4e65f fix: Input with readOnly should not clearable (#21492) 2020-02-20 19:32:55 +08:00
二货机器人
ef7bb3763e docs: 3.26.11 changelog (#21405)
* update changelog

* update changelog

* update

* update link
2020-02-17 12:13:09 +08:00
二货机器人
ac740d74fb fix: Revert patch of row fix (#21406) 2020-02-17 12:03:04 +08:00
zombiej
e35663065c fix: ant-row with flex 2020-02-17 11:37:23 +08:00
chenshuai2144
4c52401fd1 Bump 3.26.9 2020-02-17 08:37:40 +08:00
陈帅
7c96796872 docs: add 3.26.10 changelog (#21393)
* doc: add 3.26.10 changelog

* docs: add 21306 21310 changelog

* docs: add 21356 changelog

* docs: Revert extra line breaks

* doc: fix typo

* doc: fix typo

* doc: fix typo
2020-02-17 01:22:10 +08:00
偏右
ac63d26f88 Revert "fix: Minor fix on ValidationRule to match AsyncValidator (#21250)" (#21391)
This reverts commit f7e7ce9d4f.
2020-02-15 23:35:18 +08:00
afc163
b22ef2280c fix Badge test in React 15 2020-02-14 12:31:23 +08:00
偏右
831f0fcb5e chore: remove unused iconClassName from definition (#21378)
close #21367
2020-02-14 12:29:37 +08:00
偏右
4db7cbcf43 🐛 Fix Affix throws Cannot read property getBoundingClientRect (#21350)
close #21348
2020-02-12 13:05:11 +08:00
偏右
dd16a24426 🐛 fix Badge color not working when contains children (#21333)
close #21331
2020-02-11 12:57:00 +08:00
偏右
f692e7ee34 🐛 fix Alert button extra padding in Firefox (#21325)
close #21324
2020-02-10 19:52:48 +08:00
偏右
fd553c9ba0 🎬 improve dropdown demos in mobile (#21312)
close #21267
2020-02-10 13:10:45 +08:00
偏右
1b23971fd6 💄 tweak steps 1px align (#21306)
https://github.com/ant-design/ant-design/issues/21257#issuecomment-583865088
2020-02-10 13:08:00 +08:00
二货机器人
04ef6a8bce fix: Clear fix missing width (#21310) 2020-02-10 11:55:30 +08:00
诸岳
703a4b1011 docs(changelog): Add missing version 2020-02-08 22:27:54 +08:00
诸岳
a1c733ad07 Bump 3.26.9 2020-02-08 21:27:25 +08:00
诸岳
9918140695 docs: Add the changelog of 3.26.9 (#21289) 2020-02-08 21:25:53 +08:00
Chiciuc Nicușor
87cbe0168f Explicitly add children prop to Timeline. (#21265) 2020-02-08 19:16:09 +08:00
偏右
eea0b028c9 🐛 Typography editable should focus at the end (#21268)
close #21261
2020-02-07 13:15:53 +08:00
偏右
88bed67368 🐛 Fix Steps style when size="small" and labelPlacement="vertical" (#21258)
close #21257
2020-02-06 17:28:47 +08:00
Han
f7e7ce9d4f fix: Minor fix on ValidationRule to match AsyncValidator (#21250)
* Minor fix on ValidationRule to match AsyncValidator

* update doc
2020-02-06 10:44:49 +08:00
二货机器人
ae7666f8fa fix badge (#21237) 2020-02-05 14:23:21 +08:00
Jirka-Lhotka
3fb7325a21 Fix wrong event type of AntTreeNodeMouseEvent (#21200) 2020-02-03 20:31:27 +08:00
偏右
59c29a400d release 3.26.8 (#21187) 2020-02-03 12:45:28 +08:00
偏右
d3102bb2db 🐛 fix site menu affix bug (#21188)
close #21128
2020-02-03 12:35:04 +08:00
afc163
e036e4c9a3 site: 📣 promote g2plot 2020-02-03 11:38:44 +08:00
Chiciuc Nicușor
da3540bd59 Replace NativeButtonProps with ButtonProps for okButtonProps and cancelButtonProps. (#21165) 2020-01-31 22:09:49 +08:00
Teng YANG
bba87d4125 update display names for layout components (#21124)
(cherry picked from commit 286e0e97f8)
2020-01-28 15:26:55 +08:00
Teng YANG
6de8522894 fix: card actions font-size issue (#21106)
Fix card component action font-size not controlled by theme variable.
2020-01-26 11:40:06 +08:00
信鑫-King
674074ce93 fix: 3.x deploy site (#20682) 2020-01-17 12:31:56 +08:00
Amumu
c68f4463d3 fix error docs (#20926) 2020-01-16 15:58:24 +08:00
偏右
a96a95ccb8 🐛 Fix List item flex layout (#20897)
close #20648
2020-01-15 10:35:45 +08:00
偏右
b112378de3 🐛 Fix Tooltip title 0 is not shown (#20894)
close #20891
2020-01-14 17:55:40 +08:00
Amumu
db4bec92be version 3.23.0 (#20890) 2020-01-14 15:50:16 +08:00
信鑫-King
b6fc0168db chore: check commit (#20880) 2020-01-14 09:41:57 +08:00
信鑫-King
92fe411961 docs: 3.26.7 changelog (#20873)
* upd: version

* 📝 changelog

* 📝 docs
2020-01-14 07:40:32 +08:00
zefeng
ab29ecb377 fix: better approach to solve not show overflow content when in elastic (#20821) 2020-01-13 20:43:03 +08:00
afc163
23d5a856c0 🎬 improve Tag demo 2020-01-08 15:09:24 +08:00
偏右
6e4fa95d0f 🐛 fix Tree switcherIcon shown in leaf node (#20753)
close #20511
2020-01-08 13:17:49 +08:00
afc163
2753ce91c9 🐛 tweak @zindex-badge for table fixed column
close #20750
close #13930
2020-01-08 11:43:10 +08:00
偏右
057f5b8526 🐛 Fix Cascader search bug when fieldNames existed (#20720)
and label/value have same field name

close #20619
2020-01-08 10:38:36 +08:00
Amumu
d3eea22097 fix: correct the collapse-borderless class variable (#20718) (#20721)
Co-authored-by: Kuitos <kuitos.lau@gmail.com>
2020-01-07 15:39:42 +08:00
骗你是小猫咪
da2f54a18a refactor: improve digital input in tooltip demo (#20702) (#20717)
* refactor: improve digital input in tooltip demo

* fix lint
2020-01-07 12:02:21 +08:00
afc163
e5dd231aaa site: 📣 promote yuque activity 2020-01-06 18:03:04 +08:00
偏右
c6eafe8380 🐛 fix Input.Group 1px bug in vertical layout form (#20685)
close #20616
2020-01-06 14:26:11 +08:00
89 changed files with 1604 additions and 1742 deletions

View File

@@ -3,7 +3,7 @@ on:
release:
types: [published]
branches:
- master
- 3.x-stable
jobs:
build-and-deploy:

View File

@@ -15,6 +15,93 @@ timeline: true
---
## 3.26.15
`2020-04-03`
- 🐞 Fix Affix throws `React warning of state update on unmounted component`. [#22790](https://github.com/ant-design/ant-design/pull/22790)
- 🐞 Fix Table `column.filtered` not working. [#22597](https://github.com/ant-design/ant-design/pull/22597)
- 🐞 Fix Select Input style with `multiple` mode in Safari. [#22586](https://github.com/ant-design/ant-design/pull/22586) [@iicdii](https://github.com/iicdii)
## 3.26.14
`2020-03-23`
- 🐞 修复 Descriptions 在小尺寸下无法自适应的问题。[#22407](https://github.com/ant-design/ant-design/pull/22407)
- 🐞 修复 TextArea `autoSize` 时在 Firefox 下不会自动滚动到底的问题。[#22014](https://github.com/ant-design/ant-design/pull/22014)
- 🐞 修复 TextArea 样式在 `react@16.13` 下会报警告的问题。[#21703](https://github.com/ant-design/ant-design/pull/21703)
- Typescript
- 调整 Popconfirm `onConfirm` `onCancel` 事件类型定义。[#22438](https://github.com/ant-design/ant-design/pull/22438) [@nicu-chiciuc](https://github.com/nicu-chiciuc)
## 3.26.13
`2020-03-07`
- 🐞 Fix Result `status` cannot assigned to `string` or `number` type. [#21691](https://github.com/ant-design/ant-design/pull/21691)
- 🐞 Fix Badge animation when switch between 10 and 11. [#21887](https://github.com/ant-design/ant-design/pull/21887) [@wendellhu95](https://github.com/wendellhu95)
- 🐞 Fix DatePicker disabled icon cursor style. [#21655](https://github.com/ant-design/ant-design/pull/21655) [@jhoneybee](https://github.com/jhoneybee)
- 🐞 Fix Grid multiple Rows `margin` overlapping. [#21518](https://github.com/ant-design/ant-design/pull/21518) [@felipeptcho](https://github.com/felipeptcho)
- 🐞 Fix Table filter menu max height with many items. [#21602](https://github.com/ant-design/ant-design/pull/21602)
## 3.26.12
`2020-02-24`
- 🐞 Fix Input with `readOnly` still clearable by `allowClear`. [#21492](https://github.com/ant-design/ant-design/pull/21492)
- 🐞 Fix Upload won't showing download icon defaultly. [#21496](https://github.com/ant-design/ant-design/pull/21496)
- ⚡️ Improve Button render performance. [#21217](https://github.com/ant-design/ant-design/pull/21217)
## 3.26.11
`2020-02-17`
- 🐞 Rollback misc `clearfix` style to breaks flex layout (mainly affect Row, Form, Layout style). [#21406](https://github.com/ant-design/ant-design/pull/21406)
## 3.26.10
`2020-02-16`
- 🐞 Fix Input.Group inside `<Form layout="vertical" >` 1px bug. [#20685](https://github.com/ant-design/ant-design/pull/20685)
- 🐞 Fix Badge `color` not working when contains children. [#21333](https://github.com/ant-design/ant-design/pull/21333)
- 🐞 Fix Alert close button extra `padding`. [#21325](https://github.com/ant-design/ant-design/pull/21325)
- 🐞 Fix Affix throws `Cannot read property getBoundingClientRect in mobile device`. [#21350](https://github.com/ant-design/ant-design/pull/21350)
- 💄 Tweak Steps 1px align issue. [#21306](https://github.com/ant-design/ant-design/pull/21306)
- 💄 Fix Row component affect next element style issue. [#21310](https://github.com/ant-design/ant-design/pull/21310)
- Typescript
- 🔷 Revert [#21250](https://github.com/ant-design/ant-design/pull/21250) Type Definition Update.[#21356](https://github.com/ant-design/ant-design/pull/21356)
## 3.26.9
`2020-02-08`
- 🐞 Fix Badge that count is not align when wrapped by Typography. [#21237](https://github.com/ant-design/ant-design/pull/21237)
- 🐞 Fix Steps that icon is not align when `size="small"` and `labelPlacement="vertical"`. [#21258](https://github.com/ant-design/ant-design/pull/21258)
- 🐞 Fix Typography not focus at the end of textarea when `editable` is true. [#21268](https://github.com/ant-design/ant-design/pull/21268)
- TypeScript
- 💄 Improve type definition of validation rule's type for Form. [#21250](https://github.com/ant-design/ant-design/pull/21250) [@hansololai](https://github.com/hansololai)
- 🐞 Fix type definition of `event` for Tree. [#21200](https://github.com/ant-design/ant-design/pull/21200) [@Jirka-Lhotka](https://github.com/Jirka-Lhotka)
## 3.26.8
`2020-02-03`
- 🐞 Fix Tooltip hidden when `title` is `0`. [#20894](https://github.com/ant-design/ant-design/pull/20894)
- 🐞 Fix List `actions` inconsistent position. [#20897](https://github.com/ant-design/ant-design/pull/20897)
- 🐞 Fix Card `font-size` of `actions` not in less theme variables. [#21106](https://github.com/ant-design/ant-design/pull/21106)
- 🐞 Fix Layout components `displayName`. [#21124](https://github.com/ant-design/ant-design/pull/21124)
- 🐞 Fix Modal.confirm `okButtonProps` and `cancelButtonProps` interface. [#21165](https://github.com/ant-design/ant-design/pull/21165)
## 3.26.7
`2020-01-13`
- 💄 Optimize Table fixed columns blank problem in some case. [#20821](https://github.com/ant-design/ant-design/pull/20821) [@AshoneA](https://github.com/AshoneA)
- 🐞 Fix Tree `switcherIcon` shown in leaf node problem. [#20753](https://github.com/ant-design/ant-design/pull/20753)
- 🐞 Fix Badge `z-index` higher than Table fixed columns. [#20751](https://github.com/ant-design/ant-design/pull/20751)
- 🐞 Fix Cascader search bug when `fieldNames` is existed and label/value share same name. [#20720](https://github.com/ant-design/ant-design/pull/20720)
- 🐞 Fix Collapse background color with wrong less variable. [#20718](https://github.com/ant-design/ant-design/pull/20718) [@kuitos](https://github.com/kuitos)
- 🐞 Fix Input.Group inside `<Form layout="vertical" >` 1px bug. [#20685](https://github.com/ant-design/ant-design/pull/20685)
## 3.26.6
`2020-01-03`

View File

@@ -15,6 +15,93 @@ timeline: true
---
## 3.26.15
`2020-04-03`
- 🐞 修复 Affix 抛出 `React state update on unmounted component` 警告的问题。[#22790](https://github.com/ant-design/ant-design/pull/22790)
- 🐞 修复 Table `column.filtered` 失效的问题。[#22597](https://github.com/ant-design/ant-design/pull/22597)
- 🐞 修复 Select `multiple` 模式下Input 在 Safari 浏览器的样式问题。[#22586](https://github.com/ant-design/ant-design/pull/22586) [@iicdii](https://github.com/iicdii)
## 3.26.14
`2020-03-23`
- 🐞 Fix Descriptions cannot fit to small container width. [#22407](https://github.com/ant-design/ant-design/pull/22407)
- 🐞 Fix TextArea `autoSize` don't scroll bottom in Firefox. [#22014](https://github.com/ant-design/ant-design/pull/22014)
- 🐞 Fix TextArea style get warning in `react@16.13`. [#21703](https://github.com/ant-design/ant-design/pull/21703)
- Typescript
- Adjust Popconfirm `onConfirm` `onCancel` event definition. [#22438](https://github.com/ant-design/ant-design/pull/22438) [@nicu-chiciuc](https://github.com/nicu-chiciuc)
## 3.26.13
`2020-03-07`
- 🐞 修复 Result `status` 属性不能赋值 `string` 或者 `number` 类型的问题。[#21691](https://github.com/ant-design/ant-design/pull/21691)
- 🐞 修复 Badge 数字在 10 和 11 切换时的动画错误。[#21887](https://github.com/ant-design/ant-design/pull/21887) [@wendellhu95](https://github.com/wendellhu95)
- 🐞 修复 DatePicker 日历图标在禁用时的手型。[#21655](https://github.com/ant-design/ant-design/pull/21655) [@jhoneybee](https://github.com/jhoneybee)
- 🐞 修复 Grid 多个 Row 之间的边距叠加问题。[#21518](https://github.com/ant-design/ant-design/pull/21518) [@felipeptcho](https://github.com/felipeptcho)
- 🐞 修复 Table 筛选菜单高度溢出屏幕的问题。[#21602](https://github.com/ant-design/ant-design/pull/21602)
## 3.26.12
`2020-02-24`
- 🐞 修复 Input 在设置 `readOnly``allowClear` 仍然可以清除的问题。[#21492](https://github.com/ant-design/ant-design/pull/21492)
- 🐞 修复 Upload 列表默认情况下不展现下载按钮。[#21496](https://github.com/ant-design/ant-design/pull/21496)
- ⚡️ 提升 Button 渲染性能。[#21217](https://github.com/ant-design/ant-design/pull/21217)
## 3.26.11
`2020-02-17`
- 🐞 回滚原子样式 `clearfix` 以修复破坏 flex 布局的问题(主要影响 Row、Form、Layout 等布局问题)。[#21406](https://github.com/ant-design/ant-design/pull/21406)
## 3.26.10
`2020-02-16`
- 🐞 修复 `<Form layout="vertical" >` 内 Input.Group 偏上一像素的问题。[#20685](https://github.com/ant-design/ant-design/pull/20685)
- 🐞 修复 Badge 包裹模式下 `color` 属性失效的问题。[#21333](https://github.com/ant-design/ant-design/pull/21333)
- 🐞 修复 Alert 关闭按钮额外的 `padding`。[#21325](https://github.com/ant-design/ant-design/pull/21325)
- 🐞 修复 Affix 在移动设备下抛错 `Cannot read property getBoundingClientRect` 的问题。[#21350](https://github.com/ant-design/ant-design/pull/21350)
- 💄 微调 Steps 文本 1px 使其居中对齐。[#21306](https://github.com/ant-design/ant-design/pull/21306)
- 💄 修复 Row 组件影响下一个元素样式问题。[#21310](https://github.com/ant-design/ant-design/pull/21310)
- Typescript
- 🔷 回滚 [#21250](https://github.com/ant-design/ant-design/pull/21250) 的类型定义更新。[#21356](https://github.com/ant-design/ant-design/pull/21356)
## 3.26.9
`2020-02-08`
- 🐞 修复 Badge 在 Typography 下数字错位的问题。[#21237](https://github.com/ant-design/ant-design/pull/21237)
- 🐞 修复 Steps 在 `size="small"``labelPlacement="vertical"` 时图标没有对齐的问题。[#21258](https://github.com/ant-design/ant-design/pull/21258)
- 🐞 修复 Typography 在可编辑状态时光标没有在输入框末位的问题。[#21268](https://github.com/ant-design/ant-design/pull/21268)
- TypeScript
- 💄 完善 Form 中校验规则类型的类型定义。[#21250](https://github.com/ant-design/ant-design/pull/21250) [@hansololai](https://github.com/hansololai)
- 🐞 修复 Tree 中事件类型定义不正确的问题。[#21200](https://github.com/ant-design/ant-design/pull/21200) [@Jirka-Lhotka](https://github.com/Jirka-Lhotka)
## 3.26.8
`2020-02-03`
- 🐞 修复 Tooltip `title``0` 时没有显示的问题。[#20894](https://github.com/ant-design/ant-design/pull/20894)
- 🐞 修复 List `actions` 位置不在右边的问题。[#20897](https://github.com/ant-design/ant-design/pull/20897)
- 🐞 修复 Card `actions` 字体大小不受 less 变量影响的问题。[#21106](https://github.com/ant-design/ant-design/pull/21106)
- 🐞 修正 Layout 各组件的 `displayName`。[#21124](https://github.com/ant-design/ant-design/pull/21124)
- 🐞 优化 Modal.confirm 的 `okButtonProps``cancelButtonProps` 的 TypeScript 类型。[#21165](https://github.com/ant-design/ant-design/pull/21165)
## 3.26.7
`2020-01-13`
- 💄 优化 Table 固定列在某些情况下出现空白间隔的问题。[#20821](https://github.com/ant-design/ant-design/pull/20821) [@AshoneA](https://github.com/AshoneA)
- 🐞 修复 Tree `switcherIcon` 在叶子节点上展示的问题。[#20753](https://github.com/ant-design/ant-design/pull/20753)
- 🐞 修复 Badge 在 Table 固定列中穿透的问题。[#20751](https://github.com/ant-design/ant-design/pull/20751)
- 🐞 修复 Cascader `fieldNames` 中 label 和 value 共用一个值时搜索功能失效的问题。[#20720](https://github.com/ant-design/ant-design/pull/20720)
- 🐞 修复 Collapse 背景使用错误的 less 变量。[#20718](https://github.com/ant-design/ant-design/pull/20718) [@kuitos](https://github.com/kuitos)
- 🐞 修复 `<Form layout="vertical" >` 内 Input.Group 偏上一像素的问题。[#20685](https://github.com/ant-design/ant-design/pull/20685)
## 3.26.6
`2020-01-03`

View File

@@ -116,6 +116,8 @@ class Affix extends React.Component<AffixProps, AffixState> {
clearTimeout(this.timeout);
removeObserveTarget(this);
(this.updatePosition as any).cancel();
// https://github.com/ant-design/ant-design/issues/22683
(this.lazyUpdatePosition as any).cancel();
}
getOffsetTop = () => {
@@ -239,7 +241,7 @@ class Affix extends React.Component<AffixProps, AffixState> {
const offsetBottom = this.getOffsetBottom();
const targetNode = target();
if (targetNode) {
if (targetNode && this.placeholderNode) {
const targetRect = getTargetRect(targetNode);
const placeholderReact = getTargetRect(this.placeholderNode);
const fixedTop = getFixedTop(placeholderReact, targetRect, offsetTop);

View File

@@ -72,6 +72,7 @@
position: absolute;
top: 8px;
right: 16px;
padding: 0;
overflow: hidden;
font-size: @font-size-sm;
line-height: 22px;

View File

@@ -41,152 +41,152 @@ exports[`renders ./components/avatar/demo/badge.md correctly 1`] = `
style="transition:none;-ms-transform:translateY(-1100%);-webkit-transform:translateY(-1100%);transform:translateY(-1100%)"
>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class="current"
class="ant-scroll-number-only-unit current"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>

View File

@@ -17,12 +17,16 @@ function getNumberArray(num: string | number | undefined | null) {
: [];
}
function renderNumberList(position: number) {
function renderNumberList(position: number, className: string) {
const childrenToReturn: React.ReactElement<any>[] = [];
for (let i = 0; i < 30; i++) {
const currentClassName = position === i ? 'current' : '';
childrenToReturn.push(
<p key={i.toString()} className={currentClassName}>
<p
key={i.toString()}
className={classNames(className, {
current: position === i,
})}
>
{i % 10}
</p>,
);
@@ -67,6 +71,8 @@ class ScrollNumber extends React.Component<ScrollNumberProps, ScrollNumberState>
lastCount?: string | number | null;
private timeout?: number;
constructor(props: ScrollNumberProps) {
super(props);
this.state = {
@@ -79,17 +85,26 @@ class ScrollNumber extends React.Component<ScrollNumberProps, ScrollNumberState>
this.lastCount = prevState.count;
const { animateStarted } = this.state;
if (animateStarted) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState(
(__, props) => ({
animateStarted: false,
count: props.count,
}),
this.onAnimated,
);
this.clearTimeout();
// Let browser has time to reset the scroller before actually
// performing the transition.
this.timeout = setTimeout(() => {
// eslint-disable-next-line react/no-did-update-set-state
this.setState(
(__, props) => ({
animateStarted: false,
count: props.count,
}),
this.onAnimated,
);
});
}
}
componentWillUnmount() {
this.clearTimeout();
}
getPositionByNum(num: number, i: number) {
const { count } = this.state;
const currentCount = Math.abs(Number(count));
@@ -138,7 +153,7 @@ class ScrollNumber extends React.Component<ScrollNumberProps, ScrollNumberState>
},
key: i,
},
renderNumberList(position),
renderNumberList(position, `${prefixCls}-only-unit`),
);
}
@@ -206,6 +221,13 @@ class ScrollNumber extends React.Component<ScrollNumberProps, ScrollNumberState>
render() {
return <ConfigConsumer>{this.renderScrollNumber}</ConfigConsumer>;
}
private clearTimeout(): void {
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = undefined;
}
}
}
polyfill(ScrollNumber);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,7 @@ describe('Badge', () => {
expect(wrapper).toMatchSnapshot();
wrapper = mount(<Badge count="3.5" />);
expect(wrapper).toMatchSnapshot();
expect(() => wrapper.unmount()).not.toThrow();
});
it('badge dot not showing count == 0', () => {
@@ -111,4 +112,22 @@ describe('Badge', () => {
);
expect(wrapper).toMatchSnapshot();
});
// https://github.com/ant-design/ant-design/issues/21331
it('render Badge status/color when contains children', () => {
const wrapper = render(
<div>
<Badge count={5} status="success">
<a />
</Badge>
<Badge count={5} color="blue">
<a />
</Badge>
<Badge count={5} color="#08c">
<a />
</Badge>
</div>,
);
expect(wrapper).toMatchSnapshot();
})
});

View File

@@ -136,7 +136,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
}
renderBadgeNumber(prefixCls: string, scrollNumberPrefixCls: string) {
const { status, count } = this.props;
const { status, count, color } = this.props;
const displayCount = this.getDispayCount();
const isDot = this.isDot();
@@ -147,9 +147,16 @@ export default class Badge extends React.Component<BadgeProps, any> {
[`${prefixCls}-count`]: !isDot,
[`${prefixCls}-multiple-words`]:
!isDot && count && count.toString && count.toString().length > 1,
[`${prefixCls}-status-${status}`]: this.hasStatus(),
[`${prefixCls}-status-${status}`]: !!status,
[`${prefixCls}-status-${color}`]: isPresetColor(color),
});
let statusStyle: React.CSSProperties | undefined = this.getStyleWithOffset();
if (color && !isPresetColor(color)) {
statusStyle = statusStyle || {};
statusStyle.background = color;
}
return hidden ? null : (
<ScrollNumber
prefixCls={scrollNumberPrefixCls}
@@ -158,7 +165,7 @@ export default class Badge extends React.Component<BadgeProps, any> {
count={displayCount}
displayComponent={this.renderDispayComponent()} // <Badge status="success" count={<Icon type="xxx" />}></Badge>
title={this.getScrollNumberTitle()}
style={this.getStyleWithOffset()}
style={statusStyle}
key="scrollNumber"
/>
);

View File

@@ -159,7 +159,7 @@
display: inline-block;
height: @badge-height;
transition: all 0.3s @ease-in-out;
> p {
> p.@{number-prefix-cls}-only-unit {
height: @badge-height;
margin: 0;
}

View File

@@ -194,7 +194,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
if (!this.buttonNode) {
return;
}
const buttonText = this.buttonNode.textContent || this.buttonNode.innerText;
const buttonText = this.buttonNode.textContent;
if (this.isNeedInserted() && isTwoCNChar(buttonText)) {
if (!this.state.hasTwoCNChar) {
this.setState({

View File

@@ -32,7 +32,7 @@ A card can be used to display content related to a single subject. The content c
| hoverable | Lift up when hovering card | boolean | false | |
| loading | Shows a loading indicator while the contents of the card are being fetched | boolean | false | |
| tabList | List of TabPane's head. | Array&lt;{key: string, tab: ReactNode}> | - | |
| tabBarExtraContent | Extra content in tab bar | React.ReactNode | - | |
| tabBarExtraContent | Extra content in tab bar | React.ReactNode | - | 3.23.0 |
| size | Size of card | `default` \| `small` | `default` | 3.12.0 |
| title | Card title | string\|ReactNode | - | |
| type | Card style type, can be set to `inner` or not set | string | - | |

View File

@@ -33,7 +33,7 @@ cols: 1
| hoverable | 鼠标移过时可浮起 | boolean | false | |
| loading | 当卡片内容还在加载中时,可以用 loading 展示一个占位 | boolean | false | |
| tabList | 页签标题列表 | Array&lt;{key: string, tab: ReactNode}> | - | |
| tabBarExtraContent | tab bar 上额外的元素 | React.ReactNode | 无 | |
| tabBarExtraContent | tab bar 上额外的元素 | React.ReactNode | 无 | 3.23.0 |
| size | card 的尺寸 | `default` \| `small` | `default` | 3.12.0 |
| title | 卡片标题 | string\|ReactNode | - | |
| type | 卡片类型,可设置为 `inner` 或 不设置 | string | - | |

View File

@@ -144,7 +144,7 @@
position: relative;
display: block;
min-width: 32px;
font-size: 14px;
font-size: @font-size-base;
line-height: 22px;
cursor: pointer;

View File

@@ -839,6 +839,7 @@ exports[`Cascader should highlight keyword and filter when search in Cascader 1`
Object {
"__IS_FILTERED_OPTION": true,
"disabled": false,
"isEmptyNode": true,
"label": Array [
"Jiangsu",
Array [
@@ -891,6 +892,7 @@ exports[`Cascader should highlight keyword and filter when search in Cascader 1`
Object {
"__IS_FILTERED_OPTION": true,
"disabled": false,
"isEmptyNode": true,
"label": Array [
"Zhejiang",
Array [
@@ -1025,6 +1027,49 @@ exports[`Cascader should highlight keyword and filter when search in Cascader 1`
</Popup>
`;
exports[`Cascader should highlight keyword and filter when search in Cascader with same field name of label and value 1`] = `
<div>
<div
class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft slide-up-appear"
style="left: -999px; top: -995px;"
>
<div>
<ul
class="ant-cascader-menu"
style="width: 0px;"
>
<li
class="ant-cascader-menu-item"
role="menuitem"
title=""
>
Zhejiang / Hang
<span
class="ant-cascader-menu-item-keyword"
>
z
</span>
hou / West Lake
</li>
<li
class="ant-cascader-menu-item ant-cascader-menu-item-disabled"
role="menuitem"
title=""
>
Zhejiang / Hang
<span
class="ant-cascader-menu-item-keyword"
>
z
</span>
hou / Xia Sha
</li>
</ul>
</div>
</div>
</div>
`;
exports[`Cascader should render not found content 1`] = `
<Popup
action={
@@ -1242,6 +1287,7 @@ exports[`Cascader should render not found content 1`] = `
Array [
Object {
"disabled": true,
"isEmptyNode": true,
"label": <Context.Consumer>
[Function]
</Context.Consumer>,
@@ -1569,6 +1615,7 @@ exports[`Cascader should show not found content when options.length is 0 1`] = `
Array [
Object {
"disabled": true,
"isEmptyNode": true,
"label": <Context.Consumer>
[Function]
</Context.Consumer>,

View File

@@ -205,6 +205,52 @@ describe('Cascader', () => {
expect(popupWrapper).toMatchSnapshot();
});
it('should highlight keyword and filter when search in Cascader with same field name of label and value', () => {
const customOptions = [
{
name: 'Zhejiang',
value: 'Zhejiang',
children: [
{
name: 'Hangzhou',
value: 'Hangzhou',
children: [
{
name: 'West Lake',
value: 'West Lake',
},
{
name: 'Xia Sha',
value: 'Xia Sha',
disabled: true,
},
],
},
],
},
];
function customFilter(inputValue, path) {
return path.some(option => option.name.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
}
const wrapper = mount(
<Cascader
options={customOptions}
fieldNames={{ label: 'name', value: 'name' }}
showSearch={{ filter: customFilter }}
/>,
);
wrapper.find('input').simulate('click');
wrapper.find('input').simulate('change', { target: { value: 'z' } });
expect(wrapper.state('inputValue')).toBe('z');
const popupWrapper = mount(
wrapper
.find('Trigger')
.instance()
.getComponent(),
);
expect(popupWrapper.render()).toMatchSnapshot();
});
it('should render not found content', () => {
const wrapper = mount(<Cascader options={options} showSearch={{ filter }} />);
wrapper.find('input').simulate('click');

View File

@@ -397,17 +397,19 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
return {
__IS_FILTERED_OPTION: true,
path,
[names.label]: render(inputValue, path, prefixCls, names),
[names.value]: path.map((o: CascaderOptionType) => o[names.value]),
[names.label]: render(inputValue, path, prefixCls, names),
disabled: path.some((o: CascaderOptionType) => !!o.disabled),
isEmptyNode: true,
} as CascaderOptionType;
});
}
return [
{
[names.label]: notFoundContent || renderEmpty('Cascader'),
[names.value]: 'ANT_CASCADER_NOT_FOUND',
[names.label]: notFoundContent || renderEmpty('Cascader'),
disabled: true,
isEmptyNode: true,
},
];
}
@@ -503,9 +505,10 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
} else {
options = [
{
[names.label]: notFoundContent || renderEmpty('Cascader'),
[names.value]: 'ANT_CASCADER_NOT_FOUND',
[names.label]: notFoundContent || renderEmpty('Cascader'),
disabled: true,
isEmptyNode: true,
},
];
}
@@ -517,8 +520,7 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
}
const dropdownMenuColumnStyle: { width?: number; height?: string } = {};
const isNotFound =
(options || []).length === 1 && options[0][names.value] === 'ANT_CASCADER_NOT_FOUND';
const isNotFound = (options || []).length === 1 && options[0].isEmptyNode;
if (isNotFound) {
dropdownMenuColumnStyle.height = 'auto'; // Height of one row.
}

View File

@@ -102,7 +102,7 @@
}
&-borderless {
background-color: @component-background;
background-color: @collapse-header-bg;
border: 0;
}

View File

@@ -445,152 +445,152 @@ exports[`ConfigProvider components Badge configProvider 1`] = `
style="transition:none;-ms-transform:translateY(-1500%);-webkit-transform:translateY(-1500%);transform:translateY(-1500%)"
>
<p
class=""
class="config-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
4
</p>
<p
class="current"
class="config-scroll-number-only-unit current"
>
5
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="config-scroll-number-only-unit"
>
9
</p>
@@ -625,152 +625,152 @@ exports[`ConfigProvider components Badge normal 1`] = `
style="transition:none;-ms-transform:translateY(-1500%);-webkit-transform:translateY(-1500%);transform:translateY(-1500%)"
>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class="current"
class="ant-scroll-number-only-unit current"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="ant-scroll-number-only-unit"
>
9
</p>
@@ -805,152 +805,152 @@ exports[`ConfigProvider components Badge prefixCls 1`] = `
style="transition:none;-ms-transform:translateY(-1500%);-webkit-transform:translateY(-1500%);transform:translateY(-1500%)"
>
<p
class=""
class="prefix-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
4
</p>
<p
class="current"
class="prefix-scroll-number-only-unit current"
>
5
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
9
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
0
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
1
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
2
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
3
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
4
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
5
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
6
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
7
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
8
</p>
<p
class=""
class="prefix-scroll-number-only-unit"
>
9
</p>
@@ -8171,7 +8171,7 @@ exports[`ConfigProvider components Modal configProvider 1`] = `
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
<div
@@ -8236,7 +8236,7 @@ exports[`ConfigProvider components Modal configProvider 1`] = `
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
</div>
@@ -8265,7 +8265,7 @@ exports[`ConfigProvider components Modal normal 1`] = `
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
<div
@@ -8330,7 +8330,7 @@ exports[`ConfigProvider components Modal normal 1`] = `
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
</div>
@@ -8359,7 +8359,7 @@ exports[`ConfigProvider components Modal prefixCls 1`] = `
>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
<div
@@ -8424,7 +8424,7 @@ exports[`ConfigProvider components Modal prefixCls 1`] = `
</div>
<div
aria-hidden="true"
style="width:0;height:0;overflow:hidden"
style="width:0;height:0;overflow:hidden;outline:none"
tabindex="0"
/>
</div>
@@ -17396,7 +17396,7 @@ exports[`ConfigProvider components Upload configProvider 1`] = `
</svg>
</i>
<span
class="config-upload-list-item-name config-upload-list-item-name-icon-count-2"
class="config-upload-list-item-name config-upload-list-item-name-icon-count-1"
title="xxx.png"
>
xxx.png
@@ -17404,31 +17404,6 @@ exports[`ConfigProvider components Upload configProvider 1`] = `
<span
class="config-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -17505,7 +17480,7 @@ exports[`ConfigProvider components Upload normal 1`] = `
</svg>
</i>
<span
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
title="xxx.png"
>
xxx.png
@@ -17513,31 +17488,6 @@ exports[`ConfigProvider components Upload normal 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -17614,7 +17564,7 @@ exports[`ConfigProvider components Upload prefixCls 1`] = `
</svg>
</i>
<span
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
title="xxx.png"
>
xxx.png
@@ -17622,31 +17572,6 @@ exports[`ConfigProvider components Upload prefixCls 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>

View File

@@ -75,7 +75,9 @@ describe('DatePicker with showTime', () => {
});
it('should have correct className when use12Hours is true', () => {
const wrapper = mount(<DatePicker showTime={{ use12Hours: true }} open />);
const wrapper = mount(
<DatePicker defaultValue={moment()} showTime={{ use12Hours: true }} open />,
);
const calendarWrapper = mount(
wrapper
.find('Trigger')

View File

@@ -127,7 +127,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) | |
| showTime.defaultValue | to set default time of selected date, [demo](#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/)\[] | \[moment(), moment()] | |
| value | to set date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)] | - | |
| onCalendarChange | a callback function, can be executed when the start time or the end time of the range is changing | function(dates: \[moment, moment], dateStrings: \[string, string]) | - | 3.10.9 |
| onCalendarChange | a callback function, can be executed when the start time or the end time of the range is changing | function(dates: \[moment, moment]) | - | 3.0.0 |
| onChange | a callback function, can be executed when the selected time is changing | function(dates: \[moment, moment], dateStrings: \[string, string]) | - | |
| onOk | callback when click ok button | function(dates: [moment](http://momentjs.com/)\[]) | - | |

View File

@@ -129,7 +129,7 @@ moment.locale('zh-cn');
| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) | |
| showTime.defaultValue | 设置用户选择日期时默认的时分秒,[例子](#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/)\[] | \[moment(), moment()] | |
| value | 日期 | [moment](http://momentjs.com/)\[] | 无 | |
| onCalendarChange | 待选日期发生变化的回调 | function(dates: \[moment, moment\], dateStrings: \[string, string\]) | 无 | |
| onCalendarChange | 待选日期发生变化的回调 | function(dates: \[moment, moment\]) | 无 | 3.0.0 |
| onChange | 日期范围发生变化的回调 | function(dates: \[moment, moment\], dateStrings: \[string, string\]) | 无 | |
| onOk | 点击确定按钮的回调 | function(dates: [moment](http://momentjs.com/)\[]) | - | |

View File

@@ -102,6 +102,10 @@
line-height: 1;
}
.@{ant-prefix}-input-disabled + &-icon {
cursor: not-allowed;
}
&-small &-clear,
&-small &-icon {
right: @control-padding-horizontal-sm;

View File

@@ -41,7 +41,6 @@
font-weight: normal;
font-size: @font-size-base;
line-height: @line-height-base;
white-space: nowrap;
&::after {
position: relative;

View File

@@ -3,7 +3,6 @@
exports[`renders ./components/dropdown/demo/basic.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Hover me
<i
@@ -184,7 +183,6 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/event.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Hover me, Click menu item
<i
@@ -212,7 +210,6 @@ exports[`renders ./components/dropdown/demo/event.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/item.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Hover me
<i
@@ -240,7 +237,6 @@ exports[`renders ./components/dropdown/demo/item.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/menu-full.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Hover to check menu style
<i
@@ -268,7 +264,6 @@ exports[`renders ./components/dropdown/demo/menu-full.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/overlay-visible.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Hover me
<i
@@ -350,7 +345,6 @@ exports[`renders ./components/dropdown/demo/placement.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/sub-menu.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Cascading menu
<i
@@ -378,7 +372,6 @@ exports[`renders ./components/dropdown/demo/sub-menu.md correctly 1`] = `
exports[`renders ./components/dropdown/demo/trigger.md correctly 1`] = `
<a
class="ant-dropdown-link ant-dropdown-trigger"
href="#"
>
Click me
<i

View File

@@ -38,7 +38,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Hover me <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -30,7 +30,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Hover me, Click menu item <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -37,7 +37,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Hover me <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -82,7 +82,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Hover to check menu style <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -45,7 +45,7 @@ class OverlayVisible extends React.Component {
onVisibleChange={this.handleVisibleChange}
visible={this.state.visible}
>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Hover me <Icon type="down" />
</a>
</Dropdown>

View File

@@ -35,7 +35,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Cascading menu <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -31,7 +31,7 @@ const menu = (
ReactDOM.render(
<Dropdown overlay={menu} trigger={['click']}>
<a className="ant-dropdown-link" href="#">
<a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
Click me <Icon type="down" />
</a>
</Dropdown>,

View File

@@ -262,11 +262,18 @@ form {
// fix input with addon position. https://github.com/ant-design/ant-design/issues/8243
:not(.@{ant-prefix}-input-group-wrapper) > .@{ant-prefix}-input-group,
.@{ant-prefix}-input-group-wrapper {
position: relative;
top: -1px;
display: inline-block;
vertical-align: middle;
}
// https://github.com/ant-design/ant-design/issues/20616
&:not(.@{form-prefix-cls}-vertical) {
:not(.@{ant-prefix}-input-group-wrapper) > .@{ant-prefix}-input-group,
.@{ant-prefix}-input-group-wrapper {
position: relative;
top: -1px;
}
}
}
// Form layout

View File

@@ -10,6 +10,10 @@
box-sizing: border-box;
}
.@{ant-prefix}-row + .@{ant-prefix}-row::before {
clear: both;
}
.@{ant-prefix}-row-flex {
display: flex;
flex-flow: row wrap;

View File

@@ -16,7 +16,7 @@ export function hasPrefixSuffix(props: InputProps | ClearableInputProps) {
*/
interface BasicProps {
prefixCls: string;
inputType: (typeof ClearableInputType)[number];
inputType: typeof ClearableInputType[number];
value?: any;
defaultValue?: any;
allowClear?: boolean;
@@ -25,13 +25,14 @@ interface BasicProps {
className?: string;
style?: object;
disabled?: boolean;
readOnly?: boolean;
}
/**
* This props only for input.
*/
interface ClearableInputProps extends BasicProps {
size?: (typeof InputSizes)[number];
size?: typeof InputSizes[number];
suffix?: React.ReactNode;
prefix?: React.ReactNode;
addonBefore?: React.ReactNode;
@@ -40,8 +41,15 @@ interface ClearableInputProps extends BasicProps {
class ClearableLabeledInput extends React.Component<ClearableInputProps> {
renderClearIcon(prefixCls: string) {
const { allowClear, value, disabled, inputType, handleReset } = this.props;
if (!allowClear || disabled || value === undefined || value === null || value === '') {
const { allowClear, value, disabled, readOnly, inputType, handleReset } = this.props;
if (
!allowClear ||
disabled ||
readOnly ||
value === undefined ||
value === null ||
value === ''
) {
return null;
}
const className =

View File

@@ -65,6 +65,7 @@ class ResizableTextArea extends React.Component<TextAreaProps, TextAreaState> {
raf.cancel(this.resizeFrameId);
this.resizeFrameId = raf(() => {
this.setState({ resizing: false });
this.fixFirefoxAutoScroll();
});
});
};
@@ -74,6 +75,21 @@ class ResizableTextArea extends React.Component<TextAreaProps, TextAreaState> {
raf.cancel(this.resizeFrameId);
}
// https://github.com/ant-design/ant-design/issues/21870
fixFirefoxAutoScroll() {
try {
if (document.activeElement === this.textArea) {
const currentStart = this.textArea.selectionStart;
const currentEnd = this.textArea.selectionEnd;
this.textArea.setSelectionRange(currentStart, currentEnd);
}
} catch (e) {
// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
renderTextArea = () => {
const { prefixCls, autoSize, autosize, className, disabled } = this.props;
const { textareaStyles, resizing } = this.state;
@@ -101,7 +117,7 @@ class ResizableTextArea extends React.Component<TextAreaProps, TextAreaState> {
const style = {
...this.props.style,
...textareaStyles,
...(resizing ? { overflow: 'hidden' } : null),
...(resizing ? { overflowX: 'hidden', overflowY: 'hidden' } : null),
};
return (
<ResizeObserver onResize={this.resizeOnNextFrame} disabled={!(autoSize || autosize)}>

View File

@@ -312,9 +312,11 @@ describe('Input allowClear', () => {
);
});
it('should not support allowClear when it is disabled', () => {
const wrapper = mount(<Input allowClear defaultValue="111" disabled />);
expect(wrapper.find('.ant-input-clear-icon').length).toBe(0);
['disabled', 'readOnly'].forEach(prop => {
it(`should not support allowClear when it is ${prop}`, () => {
const wrapper = mount(<Input allowClear defaultValue="111" {...{ [prop]: true }} />);
expect(wrapper.find('.ant-input-clear-icon').length).toBe(0);
});
});
});

View File

@@ -35,7 +35,7 @@ function formatNumber(value) {
class NumericInput extends React.Component {
onChange = e => {
const { value } = e.target;
const reg = /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/;
const reg = /^-?[0-9]*(\.[0-9]*)?$/;
if ((!isNaN(value) && reg.test(value)) || value === '' || value === '-') {
this.props.onChange(value);
}
@@ -44,9 +44,11 @@ class NumericInput extends React.Component {
// '.' at the end or only '-' in the input box.
onBlur = () => {
const { value, onBlur, onChange } = this.props;
let valueTemp = value;
if (value.charAt(value.length - 1) === '.' || value === '-') {
onChange(value.slice(0, -1));
valueTemp = value.slice(0, -1);
}
onChange(valueTemp.replace(/0*(\d+)/, '$1'));
if (onBlur) {
onBlur();
}

View File

@@ -7,6 +7,7 @@ import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
export interface GeneratorProps {
suffixCls: string;
tagName: 'header' | 'footer' | 'main' | 'section';
displayName: string;
}
export interface BasicProps extends React.HTMLAttributes<HTMLDivElement> {
prefixCls?: string;
@@ -30,9 +31,11 @@ interface BasicPropsWithTagName extends BasicProps {
tagName: 'header' | 'footer' | 'main' | 'section';
}
function generator({ suffixCls, tagName }: GeneratorProps) {
function generator({ suffixCls, tagName, displayName }: GeneratorProps) {
return (BasicComponent: any) => {
return class Adapter extends React.Component<BasicProps, any> {
static displayName: string = displayName;
static Header: any;
static Footer: any;
@@ -108,21 +111,25 @@ const Layout: React.ComponentClass<BasicProps> & {
} = generator({
suffixCls: 'layout',
tagName: 'section',
displayName: 'Layout',
})(BasicLayout);
const Header = generator({
suffixCls: 'layout-header',
tagName: 'header',
displayName: 'Header',
})(Basic);
const Footer = generator({
suffixCls: 'layout-footer',
tagName: 'footer',
displayName: 'Footer',
})(Basic);
const Content = generator({
suffixCls: 'layout-content',
tagName: 'main',
displayName: 'Content',
})(Basic);
Layout.Header = Header;

View File

@@ -72,7 +72,7 @@ export default class Item extends React.Component<ListItemProps, any> {
context: any;
isItemContainsTextNode() {
isItemContainsTextNodeAndNotSingular() {
const { children } = this.props;
let result;
React.Children.forEach(children, (element: React.ReactElement<any>) => {
@@ -80,7 +80,7 @@ export default class Item extends React.Component<ListItemProps, any> {
result = true;
}
});
return result;
return result && React.Children.count(children) > 1;
}
isFlexMode() {
@@ -89,7 +89,7 @@ export default class Item extends React.Component<ListItemProps, any> {
if (itemLayout === 'vertical') {
return !!extra;
}
return !this.isItemContainsTextNode();
return !this.isItemContainsTextNodeAndNotSingular();
}
renderItem = ({ getPrefixCls }: ConfigConsumerProps) => {

View File

@@ -763,27 +763,27 @@ exports[`renders ./components/list/demo/simple.md correctly 1`] = `
class="ant-list-items"
>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Racing car sprays burning fuel into crowd.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Japanese princess to wed commoner.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Australian walks 100km after outback crash.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Man charged over missing wedding girl.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Los Angeles battles huge wildfires.
</li>
@@ -823,27 +823,27 @@ exports[`renders ./components/list/demo/simple.md correctly 1`] = `
class="ant-list-items"
>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Racing car sprays burning fuel into crowd.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Japanese princess to wed commoner.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Australian walks 100km after outback crash.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Man charged over missing wedding girl.
</li>
<li
class="ant-list-item ant-list-item-no-flex"
class="ant-list-item"
>
Los Angeles battles huge wildfires.
</li>

View File

@@ -52,6 +52,7 @@
&-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: @list-item-padding;
&-content {

View File

@@ -7743,7 +7743,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -7820,7 +7820,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -13076,7 +13076,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -13153,7 +13153,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -18409,7 +18409,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -18486,7 +18486,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -23742,7 +23742,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -23819,7 +23819,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -29075,7 +29075,7 @@ exports[`Locale Provider should display the text as da 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -29152,7 +29152,7 @@ exports[`Locale Provider should display the text as da 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -34408,7 +34408,7 @@ exports[`Locale Provider should display the text as de 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -34485,7 +34485,7 @@ exports[`Locale Provider should display the text as de 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -39741,7 +39741,7 @@ exports[`Locale Provider should display the text as el 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -39818,7 +39818,7 @@ exports[`Locale Provider should display the text as el 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -45074,7 +45074,7 @@ exports[`Locale Provider should display the text as en 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -45151,7 +45151,7 @@ exports[`Locale Provider should display the text as en 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -50407,7 +50407,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -50484,7 +50484,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -55740,7 +55740,7 @@ exports[`Locale Provider should display the text as es 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -55817,7 +55817,7 @@ exports[`Locale Provider should display the text as es 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -61073,7 +61073,7 @@ exports[`Locale Provider should display the text as et 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -61150,7 +61150,7 @@ exports[`Locale Provider should display the text as et 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -66406,7 +66406,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -66483,7 +66483,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -71739,7 +71739,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -71816,7 +71816,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -77072,7 +77072,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -77149,7 +77149,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -82405,7 +82405,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -82482,7 +82482,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -87738,7 +87738,7 @@ exports[`Locale Provider should display the text as he 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -87815,7 +87815,7 @@ exports[`Locale Provider should display the text as he 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -93071,7 +93071,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -93148,7 +93148,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -98404,7 +98404,7 @@ exports[`Locale Provider should display the text as hr 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -98481,7 +98481,7 @@ exports[`Locale Provider should display the text as hr 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -103737,7 +103737,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -103814,7 +103814,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -109070,7 +109070,7 @@ exports[`Locale Provider should display the text as hy 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -109147,7 +109147,7 @@ exports[`Locale Provider should display the text as hy 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -114403,7 +114403,7 @@ exports[`Locale Provider should display the text as id 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -114480,7 +114480,7 @@ exports[`Locale Provider should display the text as id 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -119736,7 +119736,7 @@ exports[`Locale Provider should display the text as is 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -119813,7 +119813,7 @@ exports[`Locale Provider should display the text as is 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -125069,7 +125069,7 @@ exports[`Locale Provider should display the text as it 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -125146,7 +125146,7 @@ exports[`Locale Provider should display the text as it 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -130402,7 +130402,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -130479,7 +130479,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -135735,7 +135735,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -135812,7 +135812,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -141068,7 +141068,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -141145,7 +141145,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -146401,7 +146401,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -146478,7 +146478,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -151734,7 +151734,7 @@ exports[`Locale Provider should display the text as lv 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -151811,7 +151811,7 @@ exports[`Locale Provider should display the text as lv 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -157067,7 +157067,7 @@ exports[`Locale Provider should display the text as mk 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -157144,7 +157144,7 @@ exports[`Locale Provider should display the text as mk 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -162400,7 +162400,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -162477,7 +162477,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -167733,7 +167733,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -167810,7 +167810,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -173066,7 +173066,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -173143,7 +173143,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -178399,7 +178399,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -178476,7 +178476,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -183732,7 +183732,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -183809,7 +183809,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -189065,7 +189065,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -189142,7 +189142,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -194398,7 +194398,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -194475,7 +194475,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -199731,7 +199731,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -199808,7 +199808,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -205064,7 +205064,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -205141,7 +205141,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -210397,7 +210397,7 @@ exports[`Locale Provider should display the text as ro 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -210474,7 +210474,7 @@ exports[`Locale Provider should display the text as ro 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -215730,7 +215730,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -215807,7 +215807,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -221063,7 +221063,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -221140,7 +221140,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -226396,7 +226396,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -226473,7 +226473,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -231729,7 +231729,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -231806,7 +231806,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -237062,7 +237062,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -237139,7 +237139,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -242395,7 +242395,7 @@ exports[`Locale Provider should display the text as ta 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -242472,7 +242472,7 @@ exports[`Locale Provider should display the text as ta 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -247728,7 +247728,7 @@ exports[`Locale Provider should display the text as th 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -247805,7 +247805,7 @@ exports[`Locale Provider should display the text as th 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -253061,7 +253061,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -253138,7 +253138,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -258394,7 +258394,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -258471,7 +258471,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -263727,7 +263727,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -263804,7 +263804,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -269060,7 +269060,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -269137,7 +269137,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -274393,7 +274393,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -274470,7 +274470,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>

View File

@@ -1,14 +1,14 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Button from '../button';
import { ButtonType, NativeButtonProps } from '../button/button';
import { ButtonType, ButtonProps } from '../button/button';
export interface ActionButtonProps {
type?: ButtonType;
actionFn?: (...args: any[]) => any | PromiseLike<any>;
closeModal: Function;
autoFocus?: boolean;
buttonProps?: NativeButtonProps;
buttonProps?: ButtonProps;
}
export interface ActionButtonState {

View File

@@ -6,7 +6,7 @@ import addEventListener from 'rc-util/lib/Dom/addEventListener';
import { getConfirmLocale } from './locale';
import Icon from '../icon';
import Button from '../button';
import { ButtonType, NativeButtonProps } from '../button/button';
import { ButtonType, ButtonProps } from '../button/button';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
@@ -60,8 +60,8 @@ export interface ModalProps {
maskClosable?: boolean;
/** 强制渲染 Modal */
forceRender?: boolean;
okButtonProps?: NativeButtonProps;
cancelButtonProps?: NativeButtonProps;
okButtonProps?: ButtonProps;
cancelButtonProps?: ButtonProps;
destroyOnClose?: boolean;
style?: React.CSSProperties;
wrapClassName?: string;
@@ -90,11 +90,10 @@ export interface ModalFuncProps {
// TODO: find out exact types
onOk?: (...args: any[]) => any;
onCancel?: (...args: any[]) => any;
okButtonProps?: NativeButtonProps;
cancelButtonProps?: NativeButtonProps;
okButtonProps?: ButtonProps;
cancelButtonProps?: ButtonProps;
centered?: boolean;
width?: string | number;
iconClassName?: string;
okText?: React.ReactNode;
okType?: ButtonType;
cancelText?: React.ReactNode;

View File

@@ -22,7 +22,7 @@ exports[`Modal render correctly 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -87,7 +87,7 @@ exports[`Modal render correctly 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -120,7 +120,7 @@ exports[`Modal render without footer 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -163,7 +163,7 @@ exports[`Modal render without footer 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>
@@ -193,7 +193,7 @@ exports[`Modal support closeIcon 1`] = `
>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
<div
@@ -240,7 +240,7 @@ exports[`Modal support closeIcon 1`] = `
</div>
<div
aria-hidden="true"
style="width: 0px; height: 0px; overflow: hidden;"
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
tabindex="0"
/>
</div>

View File

@@ -11,8 +11,8 @@ import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
export interface PopconfirmProps extends AbstractTooltipProps {
title: React.ReactNode;
disabled?: boolean;
onConfirm?: (e?: React.MouseEvent<HTMLElement>) => void;
onCancel?: (e?: React.MouseEvent<HTMLElement>) => void;
onConfirm?: (event: React.MouseEvent<HTMLElement>) => void;
onCancel?: (event: React.MouseEvent<HTMLElement>) => void;
okText?: React.ReactNode;
okType?: ButtonType;
cancelText?: React.ReactNode;

View File

@@ -0,0 +1,23 @@
import * as React from 'react';
import Result from '..';
describe('Result.typescript', () => {
it('status', () => {
const result = (
<>
<Result
status="404"
title="404"
subTitle="Sorry, the page you visited does not exist."
/>
<Result
status={404}
title="404"
subTitle="Sorry, the page you visited does not exist."
/>
</>
);
expect(result).toBeTruthy();
});
});

View File

@@ -19,7 +19,7 @@ export const ExceptionMap = {
'403': unauthorized,
};
export type ExceptionStatusType = keyof typeof ExceptionMap;
export type ExceptionStatusType = 403 | 404 | 500 | '403' | '404' | '500';
export type ResultStatusType = ExceptionStatusType | keyof typeof IconMap;
export interface ResultProps {
@@ -46,7 +46,7 @@ const ExceptionStatus = Object.keys(ExceptionMap);
const renderIcon = (prefixCls: string, { status, icon }: ResultProps) => {
const className = classnames(`${prefixCls}-icon`);
if (ExceptionStatus.includes(status as ResultStatusType)) {
if (ExceptionStatus.includes(`${status}`)) {
const SVGComponent = ExceptionMap[status as ExceptionStatusType];
return (
<div className={`${className} ${prefixCls}-image`}>

View File

@@ -98,4 +98,4 @@ Select component to select value from options.
### The dropdown is closed when click `dropdownRender` area?
See the [dropdownRender example](/components/select/#components-select-demo-custom-dropdown-menu).
See the instruction in [dropdownRender example](#components-select-demo-custom-dropdown-menu).

View File

@@ -101,4 +101,4 @@ title: Select
### 点击 `dropdownRender` 里的内容浮层关闭怎么办?
看下 [dropdownRender 例子](/components/select-cn/#components-select-demo-custom-dropdown-menu) 里的说明。
看下 [dropdownRender 例子](#components-select-demo-custom-dropdown-menu) 里的说明。

View File

@@ -310,6 +310,7 @@
.@{select-prefix-cls}-search__field {
width: 0.75em;
max-width: 100%;
padding: 1px;
}
}
@@ -469,7 +470,7 @@
&-menu {
max-height: 250px;
margin-bottom: 0;
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
padding: @select-dropdown-edge-child-vertical-padding 0; //Change
padding-left: 0; // Override default ul/ol
overflow: auto;
list-style: none;

View File

@@ -31,7 +31,7 @@
&.@{steps-prefix-cls}-small:not(.@{steps-prefix-cls}-dot) {
.@{steps-prefix-cls}-item {
&-icon {
margin-left: 40px;
margin-left: 46px;
}
}
}

View File

@@ -265,10 +265,10 @@
@layout-trigger-color-light: @text-color;
// z-index list, order by `z-index`
@zindex-badge: auto;
@zindex-table-fixed: auto;
@zindex-affix: 10;
@zindex-back-top: 10;
@zindex-badge: 10;
@zindex-picker-panel: 10;
@zindex-popup-close: 10;
@zindex-modal: 1000;

View File

@@ -206,7 +206,7 @@ class FilterMenu<T> extends React.Component<FilterMenuProps<T>, FilterMenuState<
}
const dropdownIconClass = classNames({
[`${prefixCls}-selected`]: filtered,
[`${prefixCls}-selected`]: 'filtered' in column ? column.filtered : filtered,
[`${prefixCls}-open`]: this.getDropdownVisible(),
});

View File

@@ -71,6 +71,7 @@ const columns = [
| expandedRowRender | Expanded container render for each row | Function(record, index, indent, expanded):ReactNode | - | |
| expandIcon | Customize row expand Icon. Ref [example](http://react-component.github.io/table/examples/expandIcon.html) | Function(props):ReactNode | - | 3.11.3 |
| expandRowByClick | Whether to expand row by clicking anywhere in the whole row | boolean | `false` | 3.0.1 |
| expandIconColumnIndex | The index of `expandIcon` which column will be inserted when `expandIconAsCell` is false | 0 | |
| footer | Table footer renderer | Function(currentPageData) | | |
| indentSize | Indent size in pixels of tree data | number | 15 | |
| loading | Loading status of table | boolean\|[object](https://ant.design/components/spin-cn/#API) ([more](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | `false` | |

View File

@@ -76,6 +76,7 @@ const columns = [
| expandedRowRender | 额外的展开行 | Function(record, index, indent, expanded):ReactNode | - | |
| expandIcon | 自定义展开图标,参考[示例](http://react-component.github.io/table/examples/expandIcon.html) | Function(props):ReactNode | - | 3.11.3 |
| expandRowByClick | 通过点击行来展开子行 | boolean | `false` | 3.0.1 |
| expandIconColumnIndex | 展开的图标显示在哪一列,如果没有 `rowSelection`,默认显示在第一列,否则显示在选择框后面 | `number` | |
| footer | 表格尾部 | Function(currentPageData) | | |
| indentSize | 展示树形数据时,每层缩进的宽度,以 px 为单位 | number | 15 | |
| loading | 页面是否加载中 | boolean\|[object](https://ant.design/components/spin-cn/#API) ([更多](https://github.com/ant-design/ant-design/issues/4544#issuecomment-271533135)) | false | |

View File

@@ -56,6 +56,7 @@ export interface ColumnProps<T> {
fixed?: boolean | typeof ColumnFixedPlacements[number];
filterIcon?: React.ReactNode | ((filtered: boolean) => React.ReactNode);
filteredValue?: any[] | null;
filtered?: boolean;
defaultFilteredValue?: any[];
sortOrder?: SortOrder | boolean;
children?: ColumnProps<T>[];

View File

@@ -75,7 +75,7 @@
}
}
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix} {
color: @primary-color;
}
@@ -445,16 +445,14 @@
box-shadow: @box-shadow-base;
.@{ant-prefix}-dropdown-menu {
// https://github.com/ant-design/ant-design/issues/4916
// https://github.com/ant-design/ant-design/issues/19542
max-height: calc(100vh - 130px);
overflow-x: hidden;
border: 0;
border-radius: @border-radius-base @border-radius-base 0 0;
box-shadow: none;
// https://github.com/ant-design/ant-design/issues/4916
&-without-submenu {
max-height: 400px;
overflow-x: hidden;
}
&-item > label + span {
padding-right: 0;
}
@@ -623,7 +621,10 @@
// https://github.com/ant-design/ant-design/issues/14545
// https://github.com/ant-design/ant-design/issues/19491
.@{table-prefix-cls}-fixed-columns-in-body:not([colspan]) {
visibility: hidden;
color: transparent;
& > * {
visibility: hidden;
}
}
}
}

View File

@@ -442,11 +442,11 @@ exports[`renders ./components/tag/demo/controlled.md correctly 1`] = `
exports[`renders ./components/tag/demo/hot-tags.md correctly 1`] = `
<div>
<h6
style="margin-right:8px;display:inline"
<span
style="margin-right:8px"
>
Categories:
</h6>
</span>
<span
class="ant-tag ant-tag-checkable"
>

View File

@@ -36,7 +36,7 @@ class HotTags extends React.Component {
const { selectedTags } = this.state;
return (
<div>
<h6 style={{ marginRight: 8, display: 'inline' }}>Categories:</h6>
<span style={{ marginRight: 8 }}>Categories:</span>
{tagsFromServer.map(tag => (
<CheckableTag
key={tag}

View File

@@ -13,6 +13,7 @@ export interface TimelineProps {
style?: React.CSSProperties;
reverse?: boolean;
mode?: 'left' | 'alternate' | 'right';
children?: React.ReactNode;
}
export default class Timeline extends React.Component<TimelineProps, any> {

View File

@@ -11,6 +11,7 @@ export interface TimeLineItemProps {
pending?: boolean;
position?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
}
const TimelineItem: React.SFC<TimeLineItemProps> = props => (

View File

@@ -241,4 +241,14 @@ describe('Tooltip', () => {
expect(onVisibleChange).toHaveBeenCalledWith(false);
expect(wrapper.instance().tooltip.props.visible).toBe(false);
});
// https://github.com/ant-design/ant-design/issues/20891
it('should display zero', async () => {
const wrapper = mount(
<Tooltip title={0} visible>
<div />
</Tooltip>,
);
expect(wrapper.find('.ant-tooltip-inner').getDOMNode().innerHTML).toBe('0');
});
});

View File

@@ -226,7 +226,15 @@ class Tooltip extends React.Component<TooltipProps, any> {
isNoTitle() {
const { title, overlay } = this.props;
return !title && !overlay; // overlay for old version compatibility
return !title && !overlay && title !== 0; // overlay for old version compatibility
}
getOverlay() {
const { title, overlay } = this.props;
if (title === 0) {
return title;
}
return overlay || title || '';
}
renderTooltip = ({
@@ -236,8 +244,6 @@ class Tooltip extends React.Component<TooltipProps, any> {
const { props, state } = this;
const {
prefixCls: customizePrefixCls,
title,
overlay,
openClassName,
getPopupContainer,
getTooltipContainer,
@@ -266,7 +272,7 @@ class Tooltip extends React.Component<TooltipProps, any> {
getTooltipContainer={getPopupContainer || getTooltipContainer || getContextPopupContainer}
ref={this.saveTooltip}
builtinPlacements={this.getPlacements()}
overlay={overlay || title || ''}
overlay={this.getOverlay()}
visible={visible}
onVisibleChange={this.onVisibleChange}
onPopupAlign={this.onPopupAlign}

View File

@@ -70,7 +70,7 @@ export interface AntTreeNodeExpandedEvent extends AntTreeNodeBaseEvent {
export interface AntTreeNodeMouseEvent {
node: AntTreeNode;
event: React.MouseEvent<HTMLElement>;
event: React.DragEvent<HTMLElement>;
}
export interface AntTreeNodeDragEnterEvent extends AntTreeNodeMouseEvent {
@@ -194,15 +194,15 @@ export default class Tree extends React.Component<TreeProps, any> {
if (loading) {
return <Icon type="loading" className={`${prefixCls}-switcher-loading-icon`} />;
}
if (isLeaf) {
return showLine ? <Icon type="file" className={`${prefixCls}-switcher-line-icon`} /> : null;
}
const switcherCls = `${prefixCls}-switcher-icon`;
if (switcherIcon) {
return React.cloneElement(switcherIcon, {
className: classNames(switcherIcon.props.className || '', switcherCls),
});
}
if (isLeaf) {
return showLine ? <Icon type="file" className={`${prefixCls}-switcher-line-icon`} /> : null;
}
return showLine ? (
<Icon
type={expanded ? 'minus-square' : 'plus-square'}

View File

@@ -725,27 +725,7 @@ exports[`renders ./components/tree/demo/customized-icon.md correctly 1`] = `
>
<span
class="ant-tree-switcher ant-tree-switcher-noop"
>
<i
aria-label="icon: down"
class="anticon anticon-down ant-tree-switcher-icon"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</i>
</span>
/>
<span
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal ant-tree-node-selected"
title="leaf"
@@ -786,27 +766,7 @@ exports[`renders ./components/tree/demo/customized-icon.md correctly 1`] = `
>
<span
class="ant-tree-switcher ant-tree-switcher-noop"
>
<i
aria-label="icon: down"
class="anticon anticon-down ant-tree-switcher-icon"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</i>
</span>
/>
<span
class="ant-tree-node-content-wrapper ant-tree-node-content-wrapper-normal"
title="leaf"
@@ -2249,13 +2209,13 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
class="ant-tree-switcher ant-tree-switcher-noop"
>
<i
aria-label="icon: down"
class="anticon anticon-down ant-tree-switcher-icon"
aria-label="icon: file"
class="anticon anticon-file ant-tree-switcher-line-icon"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
data-icon="file"
fill="currentColor"
focusable="false"
height="1em"
@@ -2263,7 +2223,7 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
d="M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"
/>
</svg>
</i>
@@ -2287,13 +2247,13 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
class="ant-tree-switcher ant-tree-switcher-noop"
>
<i
aria-label="icon: down"
class="anticon anticon-down ant-tree-switcher-icon"
aria-label="icon: file"
class="anticon anticon-file ant-tree-switcher-line-icon"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
data-icon="file"
fill="currentColor"
focusable="false"
height="1em"
@@ -2301,7 +2261,7 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
d="M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"
/>
</svg>
</i>
@@ -2325,13 +2285,13 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
class="ant-tree-switcher ant-tree-switcher-noop"
>
<i
aria-label="icon: down"
class="anticon anticon-down ant-tree-switcher-icon"
aria-label="icon: file"
class="anticon anticon-file ant-tree-switcher-line-icon"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
data-icon="file"
fill="currentColor"
focusable="false"
height="1em"
@@ -2339,7 +2299,7 @@ exports[`renders ./components/tree/demo/switcher-icon.md correctly 1`] = `
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
d="M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"
/>
</svg>
</i>

View File

@@ -30,4 +30,16 @@ describe('Tree', () => {
);
expect(wrapper.render()).toMatchSnapshot();
});
it('switcherIcon in Tree should not render at leaf nodes', () => {
const wrapper = mount(
<Tree switcherIcon={<i className="switcherIcon" />} defaultExpandAll>
<TreeNode icon="icon">
<TreeNode id="node1" title="node1" icon="icon" key="0-0-2" />
<TreeNode id="node2" title="node2" key="0-0-3" />
</TreeNode>
</Tree>,
);
expect(wrapper.find('.switcherIcon').length).toBe(1);
});
});

View File

@@ -92,4 +92,4 @@ Before `3.4.0`: The number of treeNodes can be very large, but when `checkable=t
### How to hide file icon when use showLine?
File icon realize by using switcherIcon. You can overwrite the style to hide it: https://codesandbox.io/s/883vo47xp8
File icon realize by using switcherIcon. You can overwrite the style to hide it: https://codesandbox.io/s/long-moon-go9e2

View File

@@ -93,4 +93,4 @@ subtitle: 树形控件
### 在 showLine 时,如何隐藏子节点图标?
文件图标通过 switcherIcon 来实现如果不需要你可以覆盖对应的样式https://codesandbox.io/s/883vo47xp8
文件图标通过 switcherIcon 来实现如果不需要你可以覆盖对应的样式https://codesandbox.io/s/long-moon-go9e2

View File

@@ -46,8 +46,11 @@ class Editable extends React.Component<EditableProps, EditableState> {
};
componentDidMount() {
if (this.textarea) {
this.textarea.focus();
if (this.textarea && this.textarea.resizableTextArea) {
const { textArea } = this.textarea.resizableTextArea;
textArea.focus();
const { length } = textArea.value;
textArea.setSelectionRange(length, length);
}
}

View File

@@ -241,6 +241,17 @@ describe('Typography', () => {
wrapper.find('TextArea').simulate('blur');
});
});
it('should focus at the end of textarea', () => {
const wrapper = mount(<Paragraph editable>content</Paragraph>);
wrapper
.find('.ant-typography-edit')
.first()
.simulate('click');
const textareaNode = wrapper.find('textarea').getDOMNode();
expect(textareaNode.selectionStart).toBe(7);
expect(textareaNode.selectionEnd).toBe(7);
});
});
it('warning if use setContentRef', () => {

View File

@@ -16,7 +16,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
showInfo: false,
},
showRemoveIcon: true,
showDownloadIcon: true,
showDownloadIcon: false,
showPreviewIcon: true,
previewFile: previewImage,
};

View File

@@ -64,7 +64,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/xxx.png"
rel="noopener noreferrer"
target="_blank"
@@ -75,31 +75,6 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -162,7 +137,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/yyy.png"
rel="noopener noreferrer"
target="_blank"
@@ -173,31 +148,6 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -369,7 +319,7 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/xxx.png"
rel="noopener noreferrer"
target="_blank"
@@ -380,31 +330,6 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -474,7 +399,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -513,27 +438,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
@@ -583,7 +487,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -622,27 +526,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
@@ -692,7 +575,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -731,27 +614,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
@@ -801,7 +663,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -840,27 +702,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
@@ -1036,7 +877,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -1047,31 +888,6 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1225,7 +1041,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
@@ -1236,31 +1052,6 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>

View File

@@ -280,7 +280,7 @@ exports[`Upload List should be uploading when upload a file 2`] = `
</svg>
</i>
<span
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
title="foo.png"
>
foo.png
@@ -288,31 +288,6 @@ exports[`Upload List should be uploading when upload a file 2`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -440,7 +415,7 @@ exports[`Upload List should non-image format file preview 1`] = `
</i>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/aaa.zip"
rel="noopener noreferrer"
target="_blank"
@@ -451,31 +426,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -531,7 +481,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/aaa"
rel="noopener noreferrer"
target="_blank"
@@ -542,31 +492,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -641,7 +566,7 @@ exports[`Upload List should non-image format file preview 1`] = `
</i>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/aaa.xx"
rel="noopener noreferrer"
target="_blank"
@@ -652,31 +577,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -751,7 +651,7 @@ exports[`Upload List should non-image format file preview 1`] = `
</i>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/aaa.png/xx.xx"
rel="noopener noreferrer"
target="_blank"
@@ -762,31 +662,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -842,7 +717,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/xx.xx/aaa.png"
rel="noopener noreferrer"
target="_blank"
@@ -853,31 +728,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -933,7 +783,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/xx.xx/aaa.png"
rel="noopener noreferrer"
target="_blank"
@@ -944,31 +794,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1024,7 +849,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/xx.xx/aaa.png?query=123"
rel="noopener noreferrer"
target="_blank"
@@ -1035,31 +860,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1115,7 +915,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/xx.xx/aaa.png#anchor"
rel="noopener noreferrer"
target="_blank"
@@ -1126,31 +926,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1206,7 +981,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://cdn.xxx.com/xx.xx/aaa.png?query=some.query.with.dot"
rel="noopener noreferrer"
target="_blank"
@@ -1217,31 +992,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1297,7 +1047,7 @@ exports[`Upload List should non-image format file preview 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://publish-pic-cpu.baidu.com/1296beb3-50d9-4276-885f-52645cbb378e.jpeg@w_228%2ch_152"
rel="noopener noreferrer"
target="_blank"
@@ -1308,31 +1058,6 @@ exports[`Upload List should non-image format file preview 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
@@ -1462,7 +1187,7 @@ exports[`Upload List should support showRemoveIcon and showPreviewIcon 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-0"
href="https://cdn.xxx.com/aaa"
rel="noopener noreferrer"
target="_blank"
@@ -1472,33 +1197,7 @@ exports[`Upload List should support showRemoveIcon and showPreviewIcon 1`] = `
</a>
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
</span>
/>
</span>
</div>
</div>

View File

@@ -523,6 +523,9 @@ describe('Upload', () => {
const mockRemove = jest.fn(() => false);
const props = {
onRemove: mockRemove,
showUploadList: {
showDownloadIcon: true,
},
fileList: [
{
uid: '-1',

View File

@@ -205,7 +205,7 @@ describe('Upload List', () => {
it('In the case of listType=picture, the error status does not show the download.', () => {
const file = { status: 'error', uid: 'file' };
const wrapper = mount(
<Upload listType="picture" fileList={[file]}>
<Upload listType="picture" fileList={[file]} showUploadList={{ showDownloadIcon: true }}>
<button type="button">upload</button>
</Upload>,
);
@@ -215,7 +215,7 @@ describe('Upload List', () => {
it('In the case of listType=picture-card, the error status does not show the download.', () => {
const file = { status: 'error', uid: 'file' };
const wrapper = mount(
<Upload listType="picture-card" fileList={[file]}>
<Upload listType="picture-card" fileList={[file]} showUploadList={{ showDownloadIcon: true }}>
<button type="button">upload</button>
</Upload>,
);
@@ -225,7 +225,7 @@ describe('Upload List', () => {
it('In the case of listType=text, the error status does not show the download.', () => {
const file = { status: 'error', uid: 'file' };
const wrapper = mount(
<Upload listType="text" fileList={[file]}>
<Upload listType="text" fileList={[file]} showUploadList={{ showDownloadIcon: true }}>
<button type="button">upload</button>
</Upload>,
);
@@ -292,6 +292,9 @@ describe('Upload List', () => {
},
]}
onDownload={handleDownload}
showUploadList={{
showDownloadIcon: true,
}}
>
<button type="button">upload</button>
</Upload>,
@@ -302,7 +305,7 @@ describe('Upload List', () => {
.simulate('click');
});
it('should support no onDownload', async () => {
it('should support no onDownload', async () => {
const wrapper = mount(
<Upload
listType="picture-card"
@@ -314,6 +317,9 @@ describe('Upload List', () => {
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
},
]}
showUploadList={{
showDownloadIcon: true,
}}
>
<button type="button">upload</button>
</Upload>,
@@ -541,7 +547,13 @@ describe('Upload List', () => {
it('return when prop onDownload not exists', () => {
const file = new File([''], 'test.txt', { type: 'text/plain' });
const items = [{ uid: 'upload-list-item', url: '' }];
const wrapper = mount(<UploadList items={items} locale={{ downloadFile: '' }} />).instance();
const wrapper = mount(
<UploadList
items={items}
locale={{ downloadFile: '' }}
showUploadList={{ showDownloadIcon: true }}
/>,
).instance();
expect(wrapper.handleDownload(file)).toBe(undefined);
});
@@ -563,6 +575,7 @@ describe('Upload List', () => {
items={items}
onDownload={() => {}}
locale={{ downloadFile: '' }}
showUploadList={{ showDownloadIcon: true }}
/>,
).instance();
return wrapper.props.onDownload(file);
@@ -576,16 +589,18 @@ describe('Upload List', () => {
expect(wrapper.find('.ant-upload-list-item-thumbnail').length).toBe(2);
});
it('extname should work correctly when url exists', () => {
it('extname should work correctly when url exists', (done) => {
const items = [{ status: 'done', uid: 'upload-list-item', url: '/example' }];
const wrapper = mount(
<UploadList
listType="picture"
onDownload={file => {
expect(file.url).toBe('/example');
done();
}}
items={items}
locale={{ downloadFile: '' }}
showDownloadIcon
/>,
);
wrapper.find('div.ant-upload-list-item i.anticon-download').simulate('click');

View File

@@ -178,7 +178,7 @@
opacity: 1;
}
.anticon {
padding-right: 5px;
padding-right: 6px;
color: rgba(0, 0, 0, 0.45);
}
}
@@ -239,7 +239,6 @@
&-error &-card-actions {
.anticon {
padding-right: 5px;
color: @error-color;
}
opacity: 1;

View File

@@ -1,6 +1,6 @@
{
"name": "antd",
"version": "3.26.6",
"version": "3.26.15",
"description": "An enterprise-class UI design language and React components implementation",
"keywords": [
"ant",
@@ -163,7 +163,7 @@
"@types/shallowequal": "^1.1.1",
"@types/warning": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.10.0",
"@typescript-eslint/parser": "~2.23.0",
"antd-theme-generator": "^1.1.6",
"babel-eslint": "^10.0.1",
"babel-plugin-add-react-displayname": "^0.0.5",
@@ -187,7 +187,7 @@
"eslint-config-airbnb": "^18.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "~2.19.1",
"eslint-plugin-import": "~2.20.1",
"eslint-plugin-jest": "^23.0.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-markdown": "^1.0.0",
@@ -244,7 +244,7 @@
"stylelint-config-standard": "^19.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
"stylelint-order": "^4.0.0",
"typescript": "~3.7.2",
"typescript": "~3.8.3",
"xhr-mock": "^2.4.1",
"xhr2": "^0.2.0",
"yaml-front-matter": "^4.0.0"

View File

@@ -24,7 +24,7 @@ async function checkVersion() {
}
async function checkBranch({ current }) {
if (current !== 'master') {
if (current !== '3.x-stable') {
console.log(chalk.yellow('🤔 You are not in the master branch!'));
exitProcess();
}

View File

@@ -28,14 +28,13 @@
}
}
@media only screen and (max-width: 991.99px) {
.main-menu {
> div > .ant-affix {
position: static !important;
}
.main-menu-inner {
max-height: none;
overflow: hidden;
@media only screen and (max-width: @screen-lg) {
.main-container {
padding-right: 48px;
padding-left: 48px;
.toc-affix {
display: none;
}
}
.code-boxes-col-2-1,

View File

@@ -1,9 +1,10 @@
import React from 'react';
import uniq from 'lodash/uniq';
import { generate } from '@ant-design/colors';
import ColorBlock from './ColorBlock';
export default function ColorPatterns({ color }) {
return generate(color).map((colorString, i) => (
return uniq(generate(color)).map((colorString, i) => (
<ColorBlock color={colorString} index={i + 1} key={colorString} />
));
}

View File

@@ -159,12 +159,12 @@ class Demo extends React.Component {
.replace(/([a-zA-Z]*)\s+as\s+([a-zA-Z]*)/, '$1:$2'),
css: prefillStyle,
editors: '001',
css_external: 'https://unpkg.com/antd/dist/antd.css',
css_external: 'https://unpkg.com/antd@3.x/dist/antd.css',
js_external: [
'react@16.x/umd/react.development.js',
'react-dom@16.x/umd/react-dom.development.js',
'moment/min/moment-with-locales.js',
'antd/dist/antd-with-locales.js',
'antd@3.x/dist/antd-with-locales.js',
'react-router-dom/umd/react-router-dom.min.js',
'react-router@3.x/umd/ReactRouter.min.js',
]
@@ -174,8 +174,8 @@ class Demo extends React.Component {
};
const riddlePrefillConfig = {
title: `${localizedTitle} - Ant Design Demo`,
js: sourceCode,
css: prefillStyle,
js: sourceCode.replace("'antd';", "'antd@3.x';"),
css: prefillStyle.replace(" 'antd/", " 'antd@3.x/"),
};
const dependencies = sourceCode.split('\n').reduce(
(acc, line) => {
@@ -188,7 +188,7 @@ class Demo extends React.Component {
}
return acc;
},
{ react: 'latest', 'react-dom': 'latest', antd: 'latest' },
{ react: 'latest', 'react-dom': 'latest', antd: '3.x' },
);
const indexJsContent = `
import React from 'react';

View File

@@ -320,13 +320,13 @@ class MainContent extends Component {
{menuChild}
</MobileMenu>
) : (
<Col xxl={4} xl={5} lg={6} md={24} sm={24} xs={24} className="main-menu">
<Col xxl={4} xl={5} lg={6} md={6} sm={24} xs={24} className="main-menu">
<Affix>
<section className="main-menu-inner">{menuChild}</section>
</Affix>
</Col>
)}
<Col xxl={20} xl={19} lg={18} md={24} sm={24} xs={24}>
<Col xxl={20} xl={19} lg={18} md={18} sm={24} xs={24}>
<section className={mainContainerClass}>
{demos ? (
<ComponentDoc {...this.props} doc={localizedPageData} demos={demos} />

View File

@@ -90,6 +90,7 @@ const Banner = ({ isMobile }) => {
key="promote"
className="banner-promote"
style={{
display: 'none',
width: isZhCN ? 412 : 522,
}}
>
@@ -97,23 +98,20 @@ const Banner = ({ isMobile }) => {
<FormattedMessage id="app.home.recommend" />
</Divider>
<a
href="https://next.ant.design/"
href="https://github.com/antvis/g2plot?from=antd"
target="_blank"
rel="noopener noreferrer"
onClick={() => {
if (window.gtag) {
window.gtag('event', '点击', {
event_category: '首页推广',
event_label: `https://next.ant.design/?from=antd`,
event_label: `https://github.com/antvis/g2plot?from=antd`,
});
}
}}
>
<img
src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
alt="antd logo"
/>
<FormattedMessage id="app.home.recommend.antd.next" />
<img src="https://antv.vision/icons/icon-512x512.png" alt="antv logo" />
<FormattedMessage id="app.home.recommend.antv.g2plot" />
<Icon type="right" style={{ marginLeft: 6, fontSize: 12, opacity: 0.6 }} />
</a>
</div>

View File

@@ -49,7 +49,7 @@ module.exports = {
'app.home.tool-kitchen-content': '一个为设计师提效的 Sketch 工具集',
'app.home.getting-started': '开始使用',
'app.home.recommend': '推荐',
'app.home.recommend.yuque': '语雀,我们都喜欢的文档工具',
'app.home.recommend.yuque': '语雀2020 领福蛋有大奖',
'app.home.recommend.antv.g2plot': 'G2Plot全新企业级图表',
'app.home.recommend.antd.next': 'Ant Design 4.0:创造快乐工作',
'app.home.more': '查看更多',

View File

@@ -41,9 +41,9 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
// https://docs.packtracker.io/uploading-your-webpack-stats/webpack-plugin
config.plugins.push(
new PacktrackerPlugin({
project_token: '8adbb892-ee4a-4d6f-93bb-a03219fb6778',
project_token: '30c6a021-96c0-4d67-8bd2-0d2fcbd8962b',
upload: process.env.CI === 'true',
fail_build: true,
fail_build: false,
exclude_assets: name => !['antd.min.js', 'antd.min.css'].includes(name),
}),
);