From a87cfc2d927d4253b2f1b064f27f4cb07c289594 Mon Sep 17 00:00:00 2001 From: zombiej Date: Fri, 8 Mar 2019 14:38:26 +0800 Subject: [PATCH 001/122] use babel ast tree --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 18f832e834..8084e56cfc 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "test-node": "jest --config .jest.node.js --no-cache", "test-all": "./scripts/test-all.sh", "lint": "npm run lint:ts && npm run lint:es && npm run lint:demo && npm run lint:style", + "lint:deps": "antd-tools run deps-lint --ignore **/~*/**,**/_*/**,**/icon/**,**/__tests__/**,**/style/**,**/locale/**,**/*-provider/**,**/*.json", "lint:ts": "npm run tsc && antd-tools run ts-lint", "lint:es": "eslint tests site scripts components ./.*.js ./webpack.config.js --ext '.js,.jsx'", "lint:md": "remark components/", From f2b95d0a7f81fc122e532672595d7a4a49618173 Mon Sep 17 00:00:00 2001 From: Yu Date: Fri, 8 Mar 2019 18:51:05 +0800 Subject: [PATCH 002/122] chore: add changelog for 3.15.0 (#15281) * chore: add changelog for 3.15.0 --- CHANGELOG.en-US.md | 27 ++++++++++++++++++++++++++- CHANGELOG.zh-CN.md | 28 +++++++++++++++++++++++++++- package.json | 4 ++-- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index df617e762c..3a5963b0db 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,31 @@ timeline: true --- +## 3.15.0 + +`2019-03-08` + +- 🌟 Tree supports new prop `blockNode`. [#14858](https://github.com/ant-design/ant-design/pull/14858) [@kimochg](https://github.com/kimochg) +- Form + - 🌟 Supports `colon` prop in Form. [#15276](https://github.com/ant-design/ant-design/pull/15276) [@DiamondYuan](https://github.com/DiamondYuan) + - 🌟 Add new prop `labelAlign`. [#15252](https://github.com/ant-design/ant-design/pull/15252) [@yoyo837](https://github.com/yoyo837) + - 🐞 Fix two colons will appear in FormItem label. [15285](https://github.com/ant-design/ant-design/pull/15285) [@jinxin0112](https://github.com/jinxin0112) +- 🐞 Fix Typography dom structure. [#15210](https://github.com/ant-design/ant-design/pull/15210) +- 🐞 Fix Affix position update logic. [#15150](https://github.com/ant-design/ant-design/pull/15150) +- Input + - 🐞 Fix Password lost focus when change `visibilityToggle`. [#15184](https://github.com/ant-design/ant-design/pull/15184) + - 🐞 Fix `allowClear` do not focus after clear content. [#15184](https://github.com/ant-design/ant-design/pull/15184) + - 🐞 Fix Search style with `allowClear` or `suffix`/`prefix`. [#15242](https://github.com/ant-design/ant-design/pull/15242) + - 🐞 Fix Input warning logic for focus lose. [#15251](https://github.com/ant-design/ant-design/pull/15251) +- 🐞 Fix DatePicker and TimePicker cursor style. [#15218](https://github.com/ant-design/ant-design/pull/15218) [@yoyo837](https://github.com/yoyo837) +- 🐞 Fix Steps label text not align center. [#15256](https://github.com/ant-design/ant-design/pull/15256) +- TypeScript + - ⚡️ Refactor and simplify List Item dom structure, and fix spaces lost inside List Item. [#15197](https://github.com/ant-design/ant-design/pull/15197) + - 🐞 Fix Layout `tagName` definition. [#15181](https://github.com/ant-design/ant-design/pull/15181) [@ngolin](https://github.com/ngolin) + - 🐞 Fix Text `ellipsis` definition. [#15209](https://github.com/ant-design/ant-design/pull/15209) [@xiaohuoni](https://github.com/xiaohuoni) + - 🐞 Fix Badge `text` types. [#15264](https://github.com/ant-design/ant-design/pull/15264) +- 🇹🇷 Turkish translations of new components. [#15238](https://github.com/ant-design/ant-design/pull/15238) [@codesignist](https://github.com/codesignist) + ## 3.14.1 `2019-03-04` @@ -52,7 +77,7 @@ timeline: true - 🐞 Fix the TypeScript type problem for Table `Column Filter`. [#15056](https://github.com/ant-design/ant-design/pull/15056) - 🌟 Support goto button in Pagination. [#14819](https://github.com/ant-design/ant-design/pull/14819) - 🐞 Fix the problem that Carousel response prop TypeScript declaration is missing. [#15071](https://github.com/ant-design/ant-design/pull/15071) - + ## 3.13.6 `2019-02-23` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index c4425fca4f..e0ecc589b6 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -14,6 +14,32 @@ timeline: true * 主版本号:含有破坏性更新和新特性,不在发布周期内。 --- + +## 3.15.0 + +`2019-03-08` + +- 🌟 Tree 组件支持 `blockNode` 属性。[#14858](https://github.com/ant-design/ant-design/pull/14858) [@kimochg](https://github.com/kimochg) +- Form + - 🌟 支持直接在 Form 上面配置 `colon` 属性。[#15276](https://github.com/ant-design/ant-design/pull/15276) [@DiamondYuan](https://github.com/DiamondYuan) + - 🌟 支持 `labelAlign` 属性。[#15252](https://github.com/ant-design/ant-design/pull/15252) [@yoyo837](https://github.com/yoyo837) + - 🐞 修复可能出现两个冒号的问题。[15285](https://github.com/ant-design/ant-design/pull/15285) [@jinxin0112](https://github.com/jinxin0112) +- ⚡️ 重构并简化了 List Item 的 dom 结构,并且修复了 Item 中内容空格丢失的问题。[#15210](https://github.com/ant-design/ant-design/pull/15210) +- 🐞 修复 Affix 组件定位更新的逻辑问题。[#15150](https://github.com/ant-design/ant-design/pull/15150) +- Input + - 🐞 修复 Password 当 `visibilityToggle` 变化时丢失焦点的问题。[#15184](https://github.com/ant-design/ant-design/pull/15184) + - 🐞 修复通过 `allowClear` 清除内容后没有获得焦点的问题。[#15184](https://github.com/ant-design/ant-design/pull/15184) + - 🐞 修复 Search 当使用了 `allowClear` 或者 `suffix`/`prefix` 时的样式问题。[#15242](https://github.com/ant-design/ant-design/pull/15242) + - 🐞 修复 Input 丢失焦点时的警告问题。[#15251](https://github.com/ant-design/ant-design/pull/15251) +- 🐞 修复 DatePicker 和 TimePicker 的 cursor 样式问题。[#15218](https://github.com/ant-design/ant-design/pull/15218) [@yoyo837](https://github.com/yoyo837) +- 🐞 修复 Steps 的 label 不居中的问题。[#15256](https://github.com/ant-design/ant-design/pull/15256) +- TypeScript + - 🐞 修复 Typography 的 `setContentRef` 定义。[#15197](https://github.com/ant-design/ant-design/pull/15197) + - 🐞 修复 Layout 的 `tagName` 定义。[#15181](https://github.com/ant-design/ant-design/pull/15181) [@ngolin](https://github.com/ngolin) + - 🐞 修复 Text 的 `ellipsis` 定义。[#15209](https://github.com/ant-design/ant-design/pull/15209) [@xiaohuoni](https://github.com/xiaohuoni) + - 🐞 修复 Badge 的 `text` 定义。[#15264](https://github.com/ant-design/ant-design/pull/15264) +- 🇹🇷 添加一些新组件的土耳其语翻译。[#15238](https://github.com/ant-design/ant-design/pull/15238) [@codesignist](https://github.com/codesignist) + ## 3.14.1 `2019-03-04` @@ -49,7 +75,7 @@ timeline: true - 🐞 调整了多处 TypeScript 的类型 - 🐞 修复 `onPanelChange` TypeScript 声明缺失的问题。[#15043](https://github.com/ant-design/ant-design/pull/15043) - 🐞 订正了 Table `column filter` 的 TypeScript 类型问题。[#14777](https://github.com/ant-design/ant-design/issues/14777) - - 🌟 Pagination 支持添加分页跳转按钮。[#14819](https://github.com/ant-design/ant-design/pull/14819) + - 🌟 Pagination 支持添加分页跳转按钮。[#14819](https://github.com/ant-design/ant-design/pull/14819) - 🐞 修复 Carousel 的 responsive prop TypeScript 声明缺失的问题。[#15071](https://github.com/ant-design/ant-design/pull/15071) ## 3.13.6 diff --git a/package.json b/package.json index 18f832e834..12388708a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "3.14.1", + "version": "3.15.0", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/", @@ -81,7 +81,7 @@ "rc-time-picker": "~3.6.1", "rc-tooltip": "~3.7.3", "rc-tree": "~1.14.6", - "rc-tree-select": "~2.5.0", + "rc-tree-select": "~2.6.0", "rc-trigger": "^2.6.2", "rc-upload": "~2.6.0", "rc-util": "^4.5.1", From 9b12f6715a1c5e376fe493dfaa63e7c032f7e666 Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Fri, 8 Mar 2019 19:42:23 +0800 Subject: [PATCH 003/122] fix PR Author --- CHANGELOG.en-US.md | 4 ++-- CHANGELOG.zh-CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 3a5963b0db..b0c2e8b748 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -31,8 +31,8 @@ timeline: true - 🐞 Fix `allowClear` do not focus after clear content. [#15184](https://github.com/ant-design/ant-design/pull/15184) - 🐞 Fix Search style with `allowClear` or `suffix`/`prefix`. [#15242](https://github.com/ant-design/ant-design/pull/15242) - 🐞 Fix Input warning logic for focus lose. [#15251](https://github.com/ant-design/ant-design/pull/15251) -- 🐞 Fix DatePicker and TimePicker cursor style. [#15218](https://github.com/ant-design/ant-design/pull/15218) [@yoyo837](https://github.com/yoyo837) -- 🐞 Fix Steps label text not align center. [#15256](https://github.com/ant-design/ant-design/pull/15256) +- 🐞 Fix DatePicker and TimePicker cursor style. [#15218](https://github.com/ant-design/ant-design/pull/15218) +- 🐞 Fix Steps label text not align center. [#15256](https://github.com/ant-design/ant-design/pull/15256) [@yoyo837](https://github.com/yoyo837) - TypeScript - ⚡️ Refactor and simplify List Item dom structure, and fix spaces lost inside List Item. [#15197](https://github.com/ant-design/ant-design/pull/15197) - 🐞 Fix Layout `tagName` definition. [#15181](https://github.com/ant-design/ant-design/pull/15181) [@ngolin](https://github.com/ngolin) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index e0ecc589b6..408032a708 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -31,8 +31,8 @@ timeline: true - 🐞 修复通过 `allowClear` 清除内容后没有获得焦点的问题。[#15184](https://github.com/ant-design/ant-design/pull/15184) - 🐞 修复 Search 当使用了 `allowClear` 或者 `suffix`/`prefix` 时的样式问题。[#15242](https://github.com/ant-design/ant-design/pull/15242) - 🐞 修复 Input 丢失焦点时的警告问题。[#15251](https://github.com/ant-design/ant-design/pull/15251) -- 🐞 修复 DatePicker 和 TimePicker 的 cursor 样式问题。[#15218](https://github.com/ant-design/ant-design/pull/15218) [@yoyo837](https://github.com/yoyo837) -- 🐞 修复 Steps 的 label 不居中的问题。[#15256](https://github.com/ant-design/ant-design/pull/15256) +- 🐞 修复 DatePicker 和 TimePicker 的 cursor 样式问题。[#15218](https://github.com/ant-design/ant-design/pull/15218) +- 🐞 修复 Steps 的 label 不居中的问题。[#15256](https://github.com/ant-design/ant-design/pull/15256) [@yoyo837](https://github.com/yoyo837) - TypeScript - 🐞 修复 Typography 的 `setContentRef` 定义。[#15197](https://github.com/ant-design/ant-design/pull/15197) - 🐞 修复 Layout 的 `tagName` 定义。[#15181](https://github.com/ant-design/ant-design/pull/15181) [@ngolin](https://github.com/ngolin) From c443909bca5dcbbaba8ef5dd20b6b248528928a4 Mon Sep 17 00:00:00 2001 From: Inian Date: Fri, 8 Mar 2019 21:29:58 +0800 Subject: [PATCH 004/122] Typo --- components/skeleton/index.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/skeleton/index.en-US.md b/components/skeleton/index.en-US.md index 0d4d147fa7..ce0b37fd83 100644 --- a/components/skeleton/index.en-US.md +++ b/components/skeleton/index.en-US.md @@ -11,7 +11,7 @@ Provide a placeholder at the place which need waiting for loading. - When resource needs long time to load, like low network speed. - The component contains much information. Such as List or Card. - Only works when loading data at first time. -- Could be replaced by Spin in all situation, but provide better user experience then spin if it works. +- Could be replaced by Spin in all situation, but provide better user experience than spin if it works. ## API From a0bfe4cc656937d3fdae8e0e723cb37fc153c1b7 Mon Sep 17 00:00:00 2001 From: Rick Zhou Date: Fri, 8 Mar 2019 21:58:22 -0800 Subject: [PATCH 005/122] fix tabs style in card mode --- components/tabs/style/card-style.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/tabs/style/card-style.less b/components/tabs/style/card-style.less index 58e447df19..691dbd6ead 100644 --- a/components/tabs/style/card-style.less +++ b/components/tabs/style/card-style.less @@ -12,6 +12,7 @@ visibility: hidden; } &&-card &-card-bar &-tab { + height: @tabs-card-height - 1px; margin: 0; margin-right: 2px; padding: 0 16px; @@ -23,6 +24,7 @@ transition: all 0.3s @ease-in-out; } &&-card &-card-bar &-tab-active { + height: @tabs-card-height; padding-bottom: 1px; color: @tabs-card-active-color; background: @component-background; From ee14f8e5d5825c0c9ecd25ebbc53e6cdc36159d4 Mon Sep 17 00:00:00 2001 From: zombiej Date: Sat, 9 Mar 2019 18:25:22 +0800 Subject: [PATCH 006/122] add skip test --- components/table/style/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index 3d02361cdf..c1ff86a1ad 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -2,6 +2,7 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: menu import '../../empty/style'; import '../../radio/style'; import '../../checkbox/style'; From 427543009451758875f2060ceeaf84dfdfc51251 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 9 Mar 2019 19:27:13 +0800 Subject: [PATCH 007/122] :bug: Keep same content color of List like previous version close #15296 --- components/list/style/index.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/list/style/index.less b/components/list/style/index.less index 9f3e97aeb3..0a59715724 100644 --- a/components/list/style/index.less +++ b/components/list/style/index.less @@ -6,13 +6,16 @@ .@{list-prefix-cls} { .reset-component; position: relative; + * { outline: none; } + &-pagination { margin-top: 24px; text-align: right; } + &-more { margin-top: 12px; text-align: center; @@ -21,16 +24,19 @@ padding-left: 32px; } } + &-spin { min-height: 40px; text-align: center; } + &-empty-text { padding: @list-empty-text-padding; color: @text-color-secondary; font-size: @font-size-base; text-align: center; } + &-item { display: flex; padding: @list-item-padding; @@ -39,6 +45,10 @@ display: block; } + &-content { + color: @text-color; + } + &-meta { display: flex; flex: 1; From 56570aa539cd5e6739524c114e837c6f1181d2ba Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 9 Mar 2019 19:43:19 +0800 Subject: [PATCH 008/122] :lipstick: Add `@pagination-item-bg-active` close #14739 --- components/pagination/style/index.less | 1 + components/style/themes/default.less | 1 + 2 files changed, 2 insertions(+) diff --git a/components/pagination/style/index.less b/components/pagination/style/index.less index b6ea0e43cb..4cf4555ff2 100644 --- a/components/pagination/style/index.less +++ b/components/pagination/style/index.less @@ -66,6 +66,7 @@ &-active { font-weight: @pagination-font-weight-active; + background: @pagination-item-bg-active; border-color: @primary-color; a { diff --git a/components/style/themes/default.less b/components/style/themes/default.less index b8a0186dfd..2694c9984a 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -494,6 +494,7 @@ @pagination-item-size-sm: 24px; @pagination-font-family: Arial; @pagination-font-weight-active: 500; +@pagination-item-bg-active: transparent; // Breadcrumb // --- From 9197db244541ba6081be63191bc2a5b67f83739a Mon Sep 17 00:00:00 2001 From: Dan Minshew Date: Sat, 9 Mar 2019 21:50:39 -0600 Subject: [PATCH 009/122] add 'code' to list of Typography props --- components/typography/index.en-US.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/typography/index.en-US.md b/components/typography/index.en-US.md index c3f7b76297..a0397cc776 100644 --- a/components/typography/index.en-US.md +++ b/components/typography/index.en-US.md @@ -21,6 +21,7 @@ When need to display title or text content. Like: | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | +| code | code style | boolean | false | | copyable | Config copy. Can set copy text and callback when is an object | boolean \| { text: string, onCopy: Function } | false | | delete | delete line style | boolean | false | | disabled | Disable content | boolean | false | @@ -36,6 +37,7 @@ When need to display title or text content. Like: | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | +| code | code style | boolean | false | | copyable | Config copy. Can set copy text and callback when is an object | boolean \| { text: string, onCopy: Function } | false | | delete | delete line style | boolean | false | | disabled | Disable content | boolean | false | @@ -51,6 +53,7 @@ When need to display title or text content. Like: | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | +| code | code style | boolean | false | | copyable | Config copy. Can set copy text and callback when is an object | boolean \| { text: string, onCopy: Function } | false | | delete | delete line style | boolean | false | | disabled | Disable content | boolean | false | From 05564e00ff647981eb14cf9130f5a8f83073eb08 Mon Sep 17 00:00:00 2001 From: zombiej Date: Sun, 10 Mar 2019 21:04:38 +0800 Subject: [PATCH 010/122] add style dep lint ignore --- components/anchor/style/index.tsx | 3 +++ components/auto-complete/style/index.tsx | 2 ++ components/card/style/index.tsx | 1 + components/page-header/index.tsx | 3 ++- components/popconfirm/style/index.tsx | 1 + components/popover/style/index.tsx | 3 +++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/anchor/style/index.tsx b/components/anchor/style/index.tsx index 3a3ab0de59..346c336725 100644 --- a/components/anchor/style/index.tsx +++ b/components/anchor/style/index.tsx @@ -1,2 +1,5 @@ import '../../style/index.less'; import './index.less'; + +// style dependencies +// deps-lint-skip: affix diff --git a/components/auto-complete/style/index.tsx b/components/auto-complete/style/index.tsx index c90ced563e..3d751d9f87 100644 --- a/components/auto-complete/style/index.tsx +++ b/components/auto-complete/style/index.tsx @@ -1,4 +1,6 @@ import '../../style/index.less'; import './index.less'; +// style dependencies +// deps-lint-skip: input import '../../select/style'; diff --git a/components/card/style/index.tsx b/components/card/style/index.tsx index b3e369978a..cbc49319ce 100644 --- a/components/card/style/index.tsx +++ b/components/card/style/index.tsx @@ -2,4 +2,5 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: row, col import '../../tabs/style'; diff --git a/components/page-header/index.tsx b/components/page-header/index.tsx index f09d7c1020..9fb79f0971 100644 --- a/components/page-header/index.tsx +++ b/components/page-header/index.tsx @@ -3,7 +3,8 @@ import { ConfigConsumer, ConfigConsumerProps } from '../config-provider'; import Icon from '../icon'; import classnames from 'classnames'; import { BreadcrumbProps } from '../breadcrumb'; -import { Divider, Breadcrumb } from '../index'; +import Divider from '../divider'; +import Breadcrumb from '../breadcrumb'; import Tag from '../tag'; import Wave from '../_util/wave'; diff --git a/components/popconfirm/style/index.tsx b/components/popconfirm/style/index.tsx index c4708ebddb..3d46d0435a 100644 --- a/components/popconfirm/style/index.tsx +++ b/components/popconfirm/style/index.tsx @@ -1,5 +1,6 @@ import '../../style/index.less'; // style dependencies +// deps-lint-skip: tooltip import '../../popover/style'; import '../../button/style'; diff --git a/components/popover/style/index.tsx b/components/popover/style/index.tsx index 3a3ab0de59..9f2a34a79c 100644 --- a/components/popover/style/index.tsx +++ b/components/popover/style/index.tsx @@ -1,2 +1,5 @@ import '../../style/index.less'; import './index.less'; + +// style dependencies +// deps-lint-skip: tooltip From d17a67175de50bfe22f804b9a8298f7d7f9814b3 Mon Sep 17 00:00:00 2001 From: zombiej Date: Mon, 11 Mar 2019 11:00:25 +0800 Subject: [PATCH 011/122] add pattern match --- .depslintrc.js | 18 ++++++++++++++++++ components/rate/style/index.tsx | 3 +++ package.json | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .depslintrc.js diff --git a/.depslintrc.js b/.depslintrc.js new file mode 100644 index 0000000000..e6f0f4488a --- /dev/null +++ b/.depslintrc.js @@ -0,0 +1,18 @@ +module.exports = { + ignore: [ + '**/~*/**', + '**/_*/**', + '**/icon/**', + '**/__tests__/**', + '**/style/**', + '**/locale/**', + '**/*-provider/**', + '**/*.json', + ], + modulePattern: [ + { + pattern: /ConfigConsumer.*renderEmpty/sm, + module: '../empty', + }, + ], +}; \ No newline at end of file diff --git a/components/rate/style/index.tsx b/components/rate/style/index.tsx index 3a3ab0de59..7bd39f61bf 100644 --- a/components/rate/style/index.tsx +++ b/components/rate/style/index.tsx @@ -1,2 +1,5 @@ import '../../style/index.less'; import './index.less'; + +// style dependencies +import '../../tooltip/style'; diff --git a/package.json b/package.json index 8084e56cfc..0540fcf1ac 100644 --- a/package.json +++ b/package.json @@ -195,7 +195,7 @@ "test-node": "jest --config .jest.node.js --no-cache", "test-all": "./scripts/test-all.sh", "lint": "npm run lint:ts && npm run lint:es && npm run lint:demo && npm run lint:style", - "lint:deps": "antd-tools run deps-lint --ignore **/~*/**,**/_*/**,**/icon/**,**/__tests__/**,**/style/**,**/locale/**,**/*-provider/**,**/*.json", + "lint:deps": "antd-tools run deps-lint", "lint:ts": "npm run tsc && antd-tools run ts-lint", "lint:es": "eslint tests site scripts components ./.*.js ./webpack.config.js --ext '.js,.jsx'", "lint:md": "remark components/", From 0cea934cacab14d9d7541617002af42a6ae95d31 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Mon, 11 Mar 2019 11:19:43 +0800 Subject: [PATCH 012/122] add ecosystem menu --- site/theme/en-US.js | 1 + site/theme/static/header.less | 11 +++++- site/theme/static/responsive.less | 1 - site/theme/template/Home/index.jsx | 3 ++ site/theme/template/Layout/Header.jsx | 56 ++++++++++++++++++++------- site/theme/zh-CN.js | 1 + 6 files changed, 55 insertions(+), 18 deletions(-) diff --git a/site/theme/en-US.js b/site/theme/en-US.js index 30d1c91c41..6b3745368c 100644 --- a/site/theme/en-US.js +++ b/site/theme/en-US.js @@ -13,6 +13,7 @@ module.exports = { 'app.header.menu.resource': 'Resources', 'app.header.menu.mobile': 'Mobile', 'app.header.menu.pro': 'PRO', + 'app.header.menu.ecosystem': 'Ecosystem', 'app.header.lang': '中文', 'app.content.edit-page': 'Edit this page on GitHub!', 'app.content.edit-demo': 'Edit this demo on GitHub!', diff --git a/site/theme/static/header.less b/site/theme/static/header.less index 9423279ddd..6dd9dbaea8 100644 --- a/site/theme/static/header.less +++ b/site/theme/static/header.less @@ -96,7 +96,8 @@ &.ant-menu-horizontal { border-bottom: none; - & > .ant-menu-item { + & > .ant-menu-item, + & > .ant-menu-submenu { min-width: 72px; height: @header-height; line-height: @header-height - @menu-item-border - 2px; @@ -108,6 +109,11 @@ } } + & > .ant-menu-submenu-open { + border-top: @menu-item-border solid @primary-color; + border-bottom: @menu-item-border solid transparent; + } + & > .ant-menu-item-selected { border-top: @menu-item-border solid @primary-color; border-bottom: @menu-item-border solid transparent; @@ -117,7 +123,8 @@ } } - & > .ant-menu-item { + & > .ant-menu-item, + & > .ant-menu-submenu { text-align: center; } } diff --git a/site/theme/static/responsive.less b/site/theme/static/responsive.less index 98350b8530..9303610214 100644 --- a/site/theme/static/responsive.less +++ b/site/theme/static/responsive.less @@ -109,7 +109,6 @@ } ul#nav li { - height: 40px; padding: 0 !important; line-height: 40px; border: 0; diff --git a/site/theme/template/Home/index.jsx b/site/theme/template/Home/index.jsx index 7b2037df8c..2e9f5635d9 100644 --- a/site/theme/template/Home/index.jsx +++ b/site/theme/template/Home/index.jsx @@ -32,6 +32,9 @@ function getStyle() { #header #nav .ant-menu-item { border-color: transparent; } + #header #nav .ant-menu-submenu { + border-color: transparent; + } #header #nav .ant-menu-item.hide-in-home-page { display: none; } diff --git a/site/theme/template/Layout/Header.jsx b/site/theme/template/Layout/Header.jsx index 2e7da59c9f..a56aa2dde6 100644 --- a/site/theme/template/Layout/Header.jsx +++ b/site/theme/template/Layout/Header.jsx @@ -176,28 +176,54 @@ export default class Header extends React.Component { - - - - - - {isZhCN ? ( - + } + > + - 教程 + - ) : null} + + + Ant Design of Angular + + + + + Ant Design of Vue + + + {isZhCN ? ( + + + 教程 + + + ) : null} + , ]; diff --git a/site/theme/zh-CN.js b/site/theme/zh-CN.js index 884952fe62..87a3ea49d6 100644 --- a/site/theme/zh-CN.js +++ b/site/theme/zh-CN.js @@ -13,6 +13,7 @@ module.exports = { 'app.header.menu.resource': '资源', 'app.header.menu.mobile': '移动版', 'app.header.menu.pro': 'PRO', + 'app.header.menu.ecosystem': '生态系统', 'app.header.lang': 'English', 'app.content.edit-page': '在 GitHub 上编辑此页!', 'app.content.edit-demo': '在 GitHub 上编辑此示例!', From 96a95e65d36e8ab4c2a4c94f5ca0104240514877 Mon Sep 17 00:00:00 2001 From: zombiej Date: Mon, 11 Mar 2019 11:48:17 +0800 Subject: [PATCH 013/122] update deps lint --- components/col/style/index.tsx | 3 +++ components/date-picker/style/index.tsx | 1 + components/page-header/style/index.tsx | 2 +- components/pagination/style/index.tsx | 1 + components/popconfirm/style/index.tsx | 2 +- components/row/style/index.tsx | 3 +++ components/select/style/index.tsx | 1 + components/tree-select/style/index.tsx | 1 + components/typography/style/index.tsx | 1 - 9 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/col/style/index.tsx b/components/col/style/index.tsx index cc2ae69eee..2ea9a24152 100644 --- a/components/col/style/index.tsx +++ b/components/col/style/index.tsx @@ -1,2 +1,5 @@ import '../../style/index.less'; + +// style dependencies +// deps-lint-skip: grid import '../../grid/style/index.less'; diff --git a/components/date-picker/style/index.tsx b/components/date-picker/style/index.tsx index 2fd3d93e55..f27ae9b25f 100644 --- a/components/date-picker/style/index.tsx +++ b/components/date-picker/style/index.tsx @@ -2,6 +2,7 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: input import '../../input/style'; import '../../time-picker/style'; import '../../tag/style'; diff --git a/components/page-header/style/index.tsx b/components/page-header/style/index.tsx index c24c4f5990..abbb262478 100644 --- a/components/page-header/style/index.tsx +++ b/components/page-header/style/index.tsx @@ -1,5 +1,5 @@ import './index.less'; +// style dependencies import '../../divider/style'; import '../../breadcrumb/style'; -import '../../typography/style'; diff --git a/components/pagination/style/index.tsx b/components/pagination/style/index.tsx index d841ee8fa1..874c4fbcda 100644 --- a/components/pagination/style/index.tsx +++ b/components/pagination/style/index.tsx @@ -2,5 +2,6 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: input import '../../select/style'; import '../../input/style'; diff --git a/components/popconfirm/style/index.tsx b/components/popconfirm/style/index.tsx index 3d46d0435a..3a57ddc783 100644 --- a/components/popconfirm/style/index.tsx +++ b/components/popconfirm/style/index.tsx @@ -1,6 +1,6 @@ import '../../style/index.less'; // style dependencies -// deps-lint-skip: tooltip +// deps-lint-skip: tooltip, popover import '../../popover/style'; import '../../button/style'; diff --git a/components/row/style/index.tsx b/components/row/style/index.tsx index cc2ae69eee..2ea9a24152 100644 --- a/components/row/style/index.tsx +++ b/components/row/style/index.tsx @@ -1,2 +1,5 @@ import '../../style/index.less'; + +// style dependencies +// deps-lint-skip: grid import '../../grid/style/index.less'; diff --git a/components/select/style/index.tsx b/components/select/style/index.tsx index b64c64e2f9..0577473138 100644 --- a/components/select/style/index.tsx +++ b/components/select/style/index.tsx @@ -2,5 +2,6 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: input import '../../empty/style'; import '../../input/style'; diff --git a/components/tree-select/style/index.tsx b/components/tree-select/style/index.tsx index c3f91d2d60..7a0029cbda 100644 --- a/components/tree-select/style/index.tsx +++ b/components/tree-select/style/index.tsx @@ -2,5 +2,6 @@ import '../../style/index.less'; import './index.less'; // style dependencies +// deps-lint-skip: select, empty, checkbox import '../../select/style'; import '../../checkbox/style'; diff --git a/components/typography/style/index.tsx b/components/typography/style/index.tsx index 99e8dc4afa..c7f4eeb992 100644 --- a/components/typography/style/index.tsx +++ b/components/typography/style/index.tsx @@ -2,6 +2,5 @@ import '../../style/index.less'; import './index.less'; // style dependencies -import '../../icon/style'; import '../../tooltip/style'; import '../../input/style'; From f607872e51798c6b8ebb12834526c9fb7f761d97 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Mon, 11 Mar 2019 12:29:07 +0800 Subject: [PATCH 014/122] :lipstick: scroll smooth --- site/theme/static/common.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/theme/static/common.less b/site/theme/static/common.less index 5f1248264b..b87b49857a 100644 --- a/site/theme/static/common.less +++ b/site/theme/static/common.less @@ -1,3 +1,6 @@ +html { + scroll-behavior: smooth; +} html, body { height: 100%; From 0590c056c1ec549b9325d802096ac7d8ce060da5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 11 Mar 2019 15:45:07 +0800 Subject: [PATCH 015/122] :bug: Reserve ant-typography className --- components/typography/Editable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/typography/Editable.tsx b/components/typography/Editable.tsx index 9ac7225939..3299b3b34e 100644 --- a/components/typography/Editable.tsx +++ b/components/typography/Editable.tsx @@ -109,7 +109,7 @@ class Editable extends React.Component { const { prefixCls, ['aria-label']: ariaLabel } = this.props; return ( -
+