diff --git a/.eslintignore b/.eslintignore index 0290b8510e..2faa058d8c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,9 +4,13 @@ components/**/*.jsx !components/*/demo/* !.*.js # Docs templates +site/theme/template/Color/ColorPicker.jsx site/theme/template/IconDisplay/*.js site/theme/template/IconDisplay/*.jsx +site/theme/template/IconDisplay/fields.js site/theme/template/Home/**/*.jsx +site/theme/template/utils.jsx +site/theme/template/Layout/Footer.jsx typings es/**/* lib/**/* diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml deleted file mode 100644 index 51db244ab1..0000000000 --- a/.github/workflows/deploy-site.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Deploy website -on: - release: - types: [published] - branches: - - master - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@master - - - name: install - run: npm install - - - name: build - run: npm run predeploy - - - name: deploy - uses: peaceiris/actions-gh-pages@v2 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - # PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./_site - with: - emptyCommits: false diff --git a/.gitignore b/.gitignore index d9c5d644af..0c3223915d 100644 --- a/.gitignore +++ b/.gitignore @@ -41,9 +41,10 @@ components/**/*.jsx *.tmp # Docs templates +site/theme/template/Color/ColorPicker.jsx site/theme/template/IconDisplay/*.js site/theme/template/IconDisplay/*.jsx site/theme/template/IconDisplay/fields.js - site/theme/template/Home/**/*.jsx - +site/theme/template/utils.jsx +site/theme/template/Layout/Footer.jsx diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 1a9f017c07..17f542983b 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -68,7 +68,9 @@ Ant Design 4.0-rc released! Here is the release [document](https://github.com/an - 🌟 Tree supports virtual scrolling. [#18172](https://github.com/ant-design/ant-design/pull/18172) - 🌟 Tree Enhanced accessibility support and keyboard interaction. [#18866](https://github.com/ant-design/ant-design/pull/18866) - 🌟 Select uses virtual scrolling and enhanced accessibility support and keyboard interaction. [#18658](https://github.com/ant-design/ant-design/pull/18658) + - 🌟 Uncontrolled mode when `value` is `undefined` now. - 🌟 TreeSelect uses virtual scrolling and optimizes keyboard support. [#19040](https://github.com/ant-design/ant-design/pull/19040) + - 🌟 Uncontrolled mode when `value` is `undefined` now. - 🌟 Button adds `default` and`link` styles for `danger`. [#19837](https://github.com/ant-design/ant-design/pull/19837) - 🌟 Form and ConfigProvider support `size` setting to include component size. [#20570](https://github.com/ant-design/ant-design/pull/20570) - 🌟 Typography adds `suffix` attribute. [#20224](https://github.com/ant-design/ant-design/pull/20224) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 6367ac5633..087cd38d95 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -68,7 +68,9 @@ Ant Design 4.0-rc 发布,发布文档请查看[此处](https://github.com/ant- - 🌟 Tree 支持虚拟滚动。[#18172](https://github.com/ant-design/ant-design/pull/18172) - 🌟 Tree 增强无障碍支持以及键盘交互。[#18866](https://github.com/ant-design/ant-design/pull/18866) - 🌟 Select 使用虚拟滚动并增强无障碍支持以及键盘交互。[#18658](https://github.com/ant-design/ant-design/pull/18658) + - 🌟 `value` 为 `undefined` 时,改为非受控模式。 - 🌟 TreeSelect 使用虚拟滚动并优化键盘支持。[#19040](https://github.com/ant-design/ant-design/pull/19040) + - 🌟 `value` 为 `undefined` 时,改为非受控模式。 - 🌟 Button 添加 `danger` 的 `default` 和 `link` 样式。[#19837](https://github.com/ant-design/ant-design/pull/19837) - 🌟 Form 与 ConfigProvider 支持 `size` 设置包含组件尺寸。[#20570](https://github.com/ant-design/ant-design/pull/20570) - 🌟 Typography 增加 `suffix` 属性。[#20224](https://github.com/ant-design/ant-design/pull/20224) diff --git a/components/_util/responsiveObserve.ts b/components/_util/responsiveObserve.ts index e017c802a7..f0318eb409 100644 --- a/components/_util/responsiveObserve.ts +++ b/components/_util/responsiveObserve.ts @@ -1,5 +1,6 @@ export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs'; export type BreakpointMap = Partial>; +export type ScreenMap = Partial>; export const responsiveArray: Breakpoint[] = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs']; @@ -12,7 +13,7 @@ export const responsiveMap: BreakpointMap = { xxl: '(min-width: 1600px)', }; -type SubscribeFunc = (screens: BreakpointMap) => void; +type SubscribeFunc = (screens: ScreenMap) => void; let subscribers: Array<{ token: string; @@ -23,7 +24,7 @@ let screens = {}; const responsiveObserve = { matchHandlers: {}, - dispatch(pointMap: BreakpointMap) { + dispatch(pointMap: ScreenMap) { screens = pointMap; if (subscribers.length < 1) { return false; diff --git a/components/button/index.en-US.md b/components/button/index.en-US.md index 13bb82acb0..b6bb2feb70 100644 --- a/components/button/index.en-US.md +++ b/components/button/index.en-US.md @@ -52,7 +52,7 @@ It accepts all props which native buttons support. Following the Ant Design specification, we will add one space between if Button contains two Chinese characters only. If you don't need that, you can use [ConfigProvider](/components/config-provider/#API) to set `autoInsertSpaceInButton` as `false`. -Button with two Chinese characters +Button with two Chinese characters