diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index bda46a395ce3..2c81ebbc729e 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -9,7 +9,7 @@ timeline: true | infrad version | antd version | update content | time | | --- | --- | --- | --- | -| 4.21.3 | 4.21.4 | Synchronize the update of antd 4.21.4 version | 2022-07-04 | +| 4.21.4 | 4.21.4 | 1.Synchronize the update of antd 4.21.4 version
2.Modified some styles of the table component
3.The tooltip component has been rolled back to keep it consistent with antd
4.Fix the style problem in the small state of the progress component | 2022-07-04 | | 4.21.1 | 4.21.2 | 1.Synchronize the update of antd 4.20.2 version
2.Temporarily removed QuickPicker | 2022-06-16 | | 4.21.0 | 4.21.0 | Synchronize the update of antd 4.21.0 version | 2022-06-09 | | 4.20.4 | 4.20.4 | Synchronize the update of antd 4.20.4 version | 2022-05-13 | diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 4f76c76519c7..a6ad63aceb8c 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -9,7 +9,7 @@ timeline: true | infrad 版本号 | 对应 antd 版本号 | 更新内容 | 时间 | | --- | --- | --- | --- | -| 4.21.3 | 4.21.4 | 同步 antd 4.21.4 版本的更新 | 2022-07-04 | +| 4.21.4 | 4.21.4 | 1.同步 antd 4.21.4 版本的更新
2.修改了 table 组件的部分样式
3.回退 tooltip 组件保持与 Antd 一致
4.修复 progress 组件在 small 状态下的样式问题 | 2022-07-04 | | 4.21.1 | 4.21.2 | 1.同步 antd 4.21.2 版本的更新
2.暂时移除了 QuickPicker 组件 | 2022-06-16 | | 4.21.0 | 4.21.0 | 同步 antd 4.21.0 版本的更新 | 2022-06-09 | | 4.20.6 | 4.20.6 | 同步 antd 4.20.6 版本的更新 | 2022-05-30 | diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 97085915b88e..d247beeb6ee2 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -26793,7 +26793,7 @@ exports[`ConfigProvider components Table configProvider 1`] = ` width="1em" > @@ -27094,7 +27094,7 @@ exports[`ConfigProvider components Table configProvider componentDisabled 1`] = width="1em" > @@ -27396,7 +27396,7 @@ exports[`ConfigProvider components Table configProvider componentSize large 1`] width="1em" > @@ -27697,7 +27697,7 @@ exports[`ConfigProvider components Table configProvider componentSize middle 1`] width="1em" > @@ -27998,7 +27998,7 @@ exports[`ConfigProvider components Table configProvider virtual and dropdownMatc width="1em" > @@ -28299,7 +28299,7 @@ exports[`ConfigProvider components Table normal 1`] = ` width="1em" > @@ -28600,7 +28600,7 @@ exports[`ConfigProvider components Table prefixCls 1`] = ` width="1em" > diff --git a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap index 4a6cb186bbeb..62f620ea4559 100644 --- a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap @@ -6806,7 +6806,7 @@ exports[`Locale Provider should display the text as ar 1`] = ` width="1em" > @@ -11929,7 +11929,7 @@ exports[`Locale Provider should display the text as az 1`] = ` width="1em" > @@ -17052,7 +17052,7 @@ exports[`Locale Provider should display the text as bg 1`] = ` width="1em" > @@ -22175,7 +22175,7 @@ exports[`Locale Provider should display the text as bn-bd 1`] = ` width="1em" > @@ -27298,7 +27298,7 @@ exports[`Locale Provider should display the text as by 1`] = ` width="1em" > @@ -32421,7 +32421,7 @@ exports[`Locale Provider should display the text as ca 1`] = ` width="1em" > @@ -37544,7 +37544,7 @@ exports[`Locale Provider should display the text as cs 1`] = ` width="1em" > @@ -42667,7 +42667,7 @@ exports[`Locale Provider should display the text as da 1`] = ` width="1em" > @@ -47790,7 +47790,7 @@ exports[`Locale Provider should display the text as de 1`] = ` width="1em" > @@ -52913,7 +52913,7 @@ exports[`Locale Provider should display the text as el 1`] = ` width="1em" > @@ -58036,7 +58036,7 @@ exports[`Locale Provider should display the text as en 1`] = ` width="1em" > @@ -63159,7 +63159,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = ` width="1em" > @@ -68282,7 +68282,7 @@ exports[`Locale Provider should display the text as es 1`] = ` width="1em" > @@ -73405,7 +73405,7 @@ exports[`Locale Provider should display the text as et 1`] = ` width="1em" > @@ -78528,7 +78528,7 @@ exports[`Locale Provider should display the text as fa 1`] = ` width="1em" > @@ -83651,7 +83651,7 @@ exports[`Locale Provider should display the text as fi 1`] = ` width="1em" > @@ -88774,7 +88774,7 @@ exports[`Locale Provider should display the text as fr 1`] = ` width="1em" > @@ -93897,7 +93897,7 @@ exports[`Locale Provider should display the text as fr 2`] = ` width="1em" > @@ -99020,7 +99020,7 @@ exports[`Locale Provider should display the text as fr 3`] = ` width="1em" > @@ -104143,7 +104143,7 @@ exports[`Locale Provider should display the text as ga 1`] = ` width="1em" > @@ -109266,7 +109266,7 @@ exports[`Locale Provider should display the text as gl 1`] = ` width="1em" > @@ -114389,7 +114389,7 @@ exports[`Locale Provider should display the text as he 1`] = ` width="1em" > @@ -119512,7 +119512,7 @@ exports[`Locale Provider should display the text as hi 1`] = ` width="1em" > @@ -124635,7 +124635,7 @@ exports[`Locale Provider should display the text as hr 1`] = ` width="1em" > @@ -129758,7 +129758,7 @@ exports[`Locale Provider should display the text as hu 1`] = ` width="1em" > @@ -134881,7 +134881,7 @@ exports[`Locale Provider should display the text as hy-am 1`] = ` width="1em" > @@ -140004,7 +140004,7 @@ exports[`Locale Provider should display the text as id 1`] = ` width="1em" > @@ -145127,7 +145127,7 @@ exports[`Locale Provider should display the text as is 1`] = ` width="1em" > @@ -150250,7 +150250,7 @@ exports[`Locale Provider should display the text as it 1`] = ` width="1em" > @@ -155373,7 +155373,7 @@ exports[`Locale Provider should display the text as ja 1`] = ` width="1em" > @@ -160496,7 +160496,7 @@ exports[`Locale Provider should display the text as ka 1`] = ` width="1em" > @@ -165619,7 +165619,7 @@ exports[`Locale Provider should display the text as kk 1`] = ` width="1em" > @@ -170742,7 +170742,7 @@ exports[`Locale Provider should display the text as km 1`] = ` width="1em" > @@ -175865,7 +175865,7 @@ exports[`Locale Provider should display the text as kn 1`] = ` width="1em" > @@ -180988,7 +180988,7 @@ exports[`Locale Provider should display the text as ko 1`] = ` width="1em" > @@ -186111,7 +186111,7 @@ exports[`Locale Provider should display the text as ku 1`] = ` width="1em" > @@ -191234,7 +191234,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = ` width="1em" > @@ -196357,7 +196357,7 @@ exports[`Locale Provider should display the text as lt 1`] = ` width="1em" > @@ -201480,7 +201480,7 @@ exports[`Locale Provider should display the text as lv 1`] = ` width="1em" > @@ -206603,7 +206603,7 @@ exports[`Locale Provider should display the text as mk 1`] = ` width="1em" > @@ -211726,7 +211726,7 @@ exports[`Locale Provider should display the text as ml 1`] = ` width="1em" > @@ -216849,7 +216849,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = ` width="1em" > @@ -221972,7 +221972,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = ` width="1em" > @@ -227095,7 +227095,7 @@ exports[`Locale Provider should display the text as nb 1`] = ` width="1em" > @@ -232218,7 +232218,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = ` width="1em" > @@ -237341,7 +237341,7 @@ exports[`Locale Provider should display the text as nl 1`] = ` width="1em" > @@ -242464,7 +242464,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` width="1em" > @@ -247587,7 +247587,7 @@ exports[`Locale Provider should display the text as pl 1`] = ` width="1em" > @@ -252710,7 +252710,7 @@ exports[`Locale Provider should display the text as pt 1`] = ` width="1em" > @@ -257833,7 +257833,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = ` width="1em" > @@ -262956,7 +262956,7 @@ exports[`Locale Provider should display the text as ro 1`] = ` width="1em" > @@ -268079,7 +268079,7 @@ exports[`Locale Provider should display the text as ru 1`] = ` width="1em" > @@ -273202,7 +273202,7 @@ exports[`Locale Provider should display the text as sk 1`] = ` width="1em" > @@ -278325,7 +278325,7 @@ exports[`Locale Provider should display the text as sl 1`] = ` width="1em" > @@ -283448,7 +283448,7 @@ exports[`Locale Provider should display the text as sr 1`] = ` width="1em" > @@ -288571,7 +288571,7 @@ exports[`Locale Provider should display the text as sv 1`] = ` width="1em" > @@ -293694,7 +293694,7 @@ exports[`Locale Provider should display the text as ta 1`] = ` width="1em" > @@ -298817,7 +298817,7 @@ exports[`Locale Provider should display the text as th 1`] = ` width="1em" > @@ -303940,7 +303940,7 @@ exports[`Locale Provider should display the text as tk 1`] = ` width="1em" > @@ -309063,7 +309063,7 @@ exports[`Locale Provider should display the text as tr 1`] = ` width="1em" > @@ -314186,7 +314186,7 @@ exports[`Locale Provider should display the text as uk 1`] = ` width="1em" > @@ -319309,7 +319309,7 @@ exports[`Locale Provider should display the text as ur 1`] = ` width="1em" > @@ -324432,7 +324432,7 @@ exports[`Locale Provider should display the text as vi 1`] = ` width="1em" > @@ -329555,7 +329555,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` width="1em" > @@ -334678,7 +334678,7 @@ exports[`Locale Provider should display the text as zh-hk 1`] = ` width="1em" > @@ -339801,7 +339801,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = ` width="1em" > diff --git a/components/progress/style/index.less b/components/progress/style/index.less index 9f325ab1fac0..f7ed52ff7311 100644 --- a/components/progress/style/index.less +++ b/components/progress/style/index.less @@ -36,7 +36,10 @@ } } - &-small&-line, + &-small&-line { + font-size: @font-size-base; + } + &-small&-line &-text .@{iconfont-css-prefix} { font-size: @font-size-sm; } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index d45eb5e880fb..652c6ac3f633 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -654,6 +654,8 @@ @table-header-bg: @background-color-light; @table-header-color: fade(@black, 45%); @table-header-sort-bg: @background-color-base; +@table-header-font-weight: 400; +@table-header-font-size: @font-size-base - 2px; @table-body-sort-bg: #fafafa; @table-row-hover-bg: @background-color-light; @table-selected-row-color: inherit; @@ -667,6 +669,8 @@ @table-padding-horizontal-md: (@table-padding-horizontal / 2); @table-padding-vertical-sm: (@table-padding-vertical / 2); @table-padding-horizontal-sm: (@table-padding-horizontal / 2); +@table-padding-md: (@table-padding-vertical * 3 / 4); +@table-padding-sm: (@table-padding-vertical / 2); @table-border-color: @border-color-split; @table-border-radius-base: @border-radius-base; @table-footer-bg: @background-color-light; diff --git a/components/style/themes/variable.less b/components/style/themes/variable.less index 142a8c31b5de..5a2999defafb 100644 --- a/components/style/themes/variable.less +++ b/components/style/themes/variable.less @@ -710,6 +710,8 @@ @table-header-bg: @background-color-light; @table-header-color: fade(@black, 45%); @table-header-sort-bg: @background-color-base; +@table-header-font-weight: 400; +@table-header-font-size: @font-size-base - 2px; @table-body-sort-bg: #fafafa; @table-row-hover-bg: @background-color-light; @table-selected-row-color: inherit; @@ -723,6 +725,8 @@ @table-padding-horizontal-md: (@table-padding-horizontal / 2); @table-padding-vertical-sm: (@table-padding-vertical / 2); @table-padding-horizontal-sm: (@table-padding-horizontal / 2); +@table-padding-md: (@table-padding-vertical * 3 / 4); +@table-padding-sm: (@table-padding-vertical / 2); @table-border-color: @border-color-split; @table-border-radius-base: @border-radius-base; @table-footer-bg: @background-color-light; diff --git a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap index 52417d5f30cc..da0d0b15cb20 100644 --- a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap @@ -490,7 +490,7 @@ exports[`Table.filter renders filter correctly 1`] = ` width="1em" > diff --git a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap index 5e6e9f635817..aff55e4a9013 100644 --- a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -149,7 +149,7 @@ exports[`renders ./components/table/demo/ajax.md extend context correctly 1`] = width="1em" > @@ -3320,7 +3320,7 @@ Array [ width="1em" > @@ -7049,7 +7049,7 @@ exports[`renders ./components/table/demo/filter-in-tree.md extend context correc width="1em" > @@ -7571,7 +7571,7 @@ exports[`renders ./components/table/demo/filter-in-tree.md extend context correc width="1em" > @@ -8045,7 +8045,7 @@ exports[`renders ./components/table/demo/filter-search.md extend context correct width="1em" > @@ -8391,7 +8391,7 @@ exports[`renders ./components/table/demo/filter-search.md extend context correct width="1em" > @@ -11932,7 +11932,7 @@ exports[`renders ./components/table/demo/grouping-columns.md extend context corr width="1em" > @@ -13346,7 +13346,7 @@ exports[`renders ./components/table/demo/head.md extend context correctly 1`] = width="1em" > @@ -13854,7 +13854,7 @@ exports[`renders ./components/table/demo/head.md extend context correctly 1`] = width="1em" > @@ -20371,7 +20371,7 @@ Array [ width="1em" > @@ -20760,7 +20760,7 @@ Array [ width="1em" > diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index ed72fe4c2740..fe9b6a07eaa6 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -125,7 +125,7 @@ exports[`renders ./components/table/demo/ajax.md correctly 1`] = ` width="1em" > @@ -2805,7 +2805,7 @@ Array [ width="1em" > @@ -5768,7 +5768,7 @@ exports[`renders ./components/table/demo/filter-in-tree.md correctly 1`] = ` width="1em" > @@ -5866,7 +5866,7 @@ exports[`renders ./components/table/demo/filter-in-tree.md correctly 1`] = ` width="1em" > @@ -6114,7 +6114,7 @@ exports[`renders ./components/table/demo/filter-search.md correctly 1`] = ` width="1em" > @@ -6212,7 +6212,7 @@ exports[`renders ./components/table/demo/filter-search.md correctly 1`] = ` width="1em" > @@ -9291,7 +9291,7 @@ exports[`renders ./components/table/demo/grouping-columns.md correctly 1`] = ` width="1em" > @@ -10353,7 +10353,7 @@ exports[`renders ./components/table/demo/head.md correctly 1`] = ` width="1em" > @@ -10452,7 +10452,7 @@ exports[`renders ./components/table/demo/head.md correctly 1`] = ` width="1em" > @@ -15408,7 +15408,7 @@ Array [ width="1em" > @@ -15561,7 +15561,7 @@ Array [ width="1em" > diff --git a/components/table/hooks/useFilter/FilterDropdown.tsx b/components/table/hooks/useFilter/FilterDropdown.tsx index 8caa037f429c..486805ab35cb 100644 --- a/components/table/hooks/useFilter/FilterDropdown.tsx +++ b/components/table/hooks/useFilter/FilterDropdown.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import { FilterFilled } from 'infra-design-icons'; +import { FilterOutlined } from 'infra-design-icons'; import isEqual from 'lodash/isEqual'; import type { FieldDataNode } from 'rc-tree'; import * as React from 'react'; @@ -447,7 +447,7 @@ function FilterDropdown(props: FilterDropdownProps) { } else if (column.filterIcon) { filterIcon = column.filterIcon; } else { - filterIcon = ; + filterIcon = ; } const { direction } = React.useContext(ConfigContext); diff --git a/components/table/style/index.less b/components/table/style/index.less index cc274d2268c9..cbe7bd52a493 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -31,7 +31,7 @@ table { width: 100%; text-align: left; - border-radius: @table-border-radius-base @table-border-radius-base 0 0; + border-radius: @table-border-radius-base; border-collapse: separate; border-spacing: 0; } @@ -42,7 +42,7 @@ tfoot > tr > th, tfoot > tr > td { position: relative; - padding: @table-padding-vertical @table-padding-horizontal; + padding: @table-padding-vertical-sm @table-padding-horizontal; overflow-wrap: break-word; } @@ -89,7 +89,8 @@ > th { position: relative; color: @table-header-color; - font-weight: 500; + font-weight: @table-header-font-weight; + font-size: @table-header-font-size; text-align: left; background: @table-header-bg; border-bottom: @border-width-base @border-style-base @table-border-color; @@ -124,6 +125,7 @@ &-tbody { > tr { > td { + padding: @table-padding-horizontal; border-bottom: @border-width-base @border-style-base @table-border-color; transition: background 0.3s; @@ -255,14 +257,12 @@ &-column-title { position: relative; z-index: 1; - flex: 1; } &-column-sorters { display: flex; flex: auto; align-items: center; - justify-content: space-between; &::after { position: absolute; @@ -277,20 +277,30 @@ } &-column-sorter { + display: flex; + align-items: center; + width: 14px; + height: 14px; margin-left: 4px; color: @table-header-icon-color; - font-size: 0; + font-size: @table-font-size; transition: color 0.3s; &-inner { display: inline-flex; flex-direction: column; align-items: center; + width: 14px; + height: 14px; + } + + &-up { + margin-top: -2px; } &-up, &-down { - font-size: 11px; + font-size: 10px; &.active { color: @primary-color; @@ -298,7 +308,7 @@ } &-up + &-down { - margin-top: -0.3em; + margin-top: -2px; } } @@ -309,17 +319,19 @@ // ============================ Filter ============================ &-filter-column { display: flex; - justify-content: space-between; + align-items: center; } &-filter-trigger { position: relative; display: flex; align-items: center; + width: 14px; + height: 14px; margin: -4px (-@table-padding-horizontal / 2) -4px 4px; - padding: 0 4px; + // padding: 0 4px; color: @table-header-icon-color; - font-size: @font-size-sm; + font-size: @font-size-base; border-radius: @border-radius-base; cursor: pointer; transition: all 0.3s; diff --git a/components/table/style/size.less b/components/table/style/size.less index 4fa18dcb339e..b3266839a0da 100644 --- a/components/table/style/size.less +++ b/components/table/style/size.less @@ -2,17 +2,20 @@ @table-prefix-cls: ~'@{ant-prefix}-table'; -.table-size(@size, @padding-vertical, @padding-horizontal, @font-size) { +.table-size(@size, @padding-vertical, @padding-horizontal, @font-size, @body-padding) { .@{table-prefix-cls}.@{table-prefix-cls}-@{size} { font-size: @font-size; .@{table-prefix-cls}-title, .@{table-prefix-cls}-footer, .@{table-prefix-cls}-thead > tr > th, - .@{table-prefix-cls}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td { - padding: @padding-vertical @padding-horizontal; + padding: @padding-horizontal @padding-vertical; + } + + .@{table-prefix-cls}-tbody > tr > td { + padding: @body-padding; } .@{table-prefix-cls}-filter-trigger { @@ -43,9 +46,9 @@ // ================================================================ // = Middle = // ================================================================ -.table-size(~'middle', @table-padding-vertical-md, @table-padding-horizontal-md, @table-font-size-md); +.table-size(~'middle', @table-padding-vertical-md, @table-padding-horizontal-md, @table-font-size-md, @table-padding-md); // ================================================================ // = Small = // ================================================================ -.table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm, @table-font-size-sm); +.table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm, @table-font-size-sm, @table-padding-sm); diff --git a/components/tooltip/style/index.less b/components/tooltip/style/index.less index 5eb67cdc5968..d2ad5e126378 100644 --- a/components/tooltip/style/index.less +++ b/components/tooltip/style/index.less @@ -59,12 +59,12 @@ &-inner { min-width: 30px; min-height: 32px; - padding: 4px 2px; + padding: 6px 8px; color: @tooltip-color; text-align: left; text-decoration: none; word-wrap: break-word; - background-color: rgba(0, 0, 0, 0.8); + background-color: @tooltip-bg; border-radius: @border-radius-base; box-shadow: @box-shadow-base; } diff --git a/package.json b/package.json index 45e3b073a6f2..cd7fec3bdfb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "infrad", - "version": "4.21.3", + "version": "4.21.4", "description": "based on AntD", "title": "Infra Design", "keywords": [