chore: sync master into feature

This commit is contained in:
thinkasany
2026-01-04 13:15:00 +08:00
26 changed files with 23 additions and 1235 deletions

View File

@@ -165,7 +165,8 @@ const ComponentsList: React.FC = () => {
type: 'update',
node: (
<DatePickerDoNotUseOrYouWillBeFired
value={dayjs('2022-11-18 14:00:00')}
value={dayjs('2025-11-22 00:00:00')}
// defaultValue={dayjs('2025-11-22 00:00:00')}
showToday={false}
presets={
isMobile
@@ -180,7 +181,6 @@ const ComponentsList: React.FC = () => {
/>
),
},
// {
// title: 'Progress',
// type: 'update',

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-utoo@v1
- uses: utooland/setup-utoo@v1
- name: size-limit
uses: ant-design/size-limit-action@master
with:

View File

@@ -1,231 +0,0 @@
# Origin Source
# https://github.com/ant-design/ant-design/blob/79f566b7f8abb1012ef55b0d2793bfdf5595b85d/.github/workflows/test.yml
name: ✅ test v6
on:
push:
branches: [next]
pull_request:
branches: [next]
# Cancel prev CI if new commit come
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut install
- run: ut lint
################################ Test ################################
test-react-legacy:
name: test-react-legacy
strategy:
matrix:
react: ['18']
shard: [1/2, 2/2]
env:
REACT: ${{ matrix.react }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut
- name: install react 18
if: ${{ matrix.react == '18' }}
run: ut ut-install-react-18
# dom test
- name: dom test
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}}
test-node:
name: test-node
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut install
- run: ut run test:node
test-react-latest:
name: test-react-latest
strategy:
matrix:
module: [dom]
shard: [1/2, 2/2]
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut install --ignore-scripts
# dom test
- name: dom test
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage
- name: persist coverages
run: |
mkdir persist-coverage
mv coverage/coverage-final.json persist-coverage/react-test-${{matrix.module}}-${{strategy.job-index}}.json
- uses: actions/upload-artifact@v4
name: upload coverages
with:
name: coverage-artifacts-${{ matrix.module }}-${{ strategy.job-index }}
path: persist-coverage/
test-react-latest-dist:
name: test-react-latest-dist
strategy:
matrix:
module: [dist, dist-min]
shard: [1/2, 2/2]
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: build
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut
- name: restore cache from dist
uses: actions/cache@v5
with:
path: dist
key: dist-${{ github.sha }}
- name: dist-min test
if: ${{ matrix.module == 'dist-min' }}
run: ut test
env:
LIB_DIR: dist-min
- name: dist test
if: ${{ matrix.module == 'dist' }}
run: ut test
env:
LIB_DIR: dist
############################ Test Coverage ###########################
upload-test-coverage:
name: test-coverage
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: test-react-latest
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- uses: actions/download-artifact@v7
with:
pattern: coverage-artifacts-*
merge-multiple: true
path: persist-coverage
- name: Merge Code Coverage
run: |
utx nyc merge persist-coverage/ coverage/coverage-final.json
utx nyc report --reporter text -t coverage --report-dir coverage
rm -rf persist-coverage
- name: Upload coverage to codecov
uses: codecov/codecov-action@v5
with:
# use own token to upload coverage reports
token: ${{ secrets.CODECOV_TOKEN }}
########################### Compile & Test ###########################
build:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut
- name: cache lib
uses: actions/cache@v5
with:
path: lib
key: lib-${{ github.sha }}
- name: cache es
uses: actions/cache@v5
with:
path: es
key: es-${{ github.sha }}
- name: compile
run: ut compile
- name: cache dist
uses: actions/cache@v5
with:
path: dist
key: dist-${{ github.sha }}
- name: dist
run: ut dist
env:
NODE_OPTIONS: --max_old_space_size=4096
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CI: 1
- name: check build files
run: ut test:dekko
# Artifact build files
- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
with:
name: build artifacts
path: |
dist
locale
es
lib
- name: zip builds
if: github.repository == 'ant-design/ant-design' && github.event_name == 'push' && github.ref == 'refs/heads/next'
env:
ALI_OSS_AK_ID: ${{ secrets.ALI_OSS_AK_ID }}
ALI_OSS_AK_SECRET: ${{ secrets.ALI_OSS_AK_SECRET }}
HEAD_SHA: ${{ github.sha }}
run: |
zip -r oss-artifacts.zip dist locale es lib
echo "🤖 Uploading"
node scripts/visual-regression/upload.js ./oss-artifacts.zip --ref=$HEAD_SHA
test-lib-es:
name: test lib/es module
runs-on: blacksmith-4vcpu-ubuntu-2404
strategy:
matrix:
module: [lib, es]
shard: [1/2, 2/2]
steps:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut
- name: restore cache from ${{ matrix.module }}
# lib only run in master branch not in pull request
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
uses: actions/cache@v5
with:
path: ${{ matrix.module }}
key: ${{ matrix.module }}-${{ github.sha }}
- name: compile
# lib only run in master branch not in pull request
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
run: ut compile
- name: test
# lib only run in master branch not in pull request
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}}
env:
LIB_DIR: ${{ matrix.module }}

View File

@@ -39,12 +39,6 @@ jobs:
- uses: actions/checkout@v6
- uses: utooland/setup-utoo@v1
- run: ut
- name: install react 16
if: ${{ matrix.react == '16' }}
run: ut bun-install-react-16
- name: install react 17
if: ${{ matrix.react == '17' }}
run: ut bun-install-react-17
# dom test
- name: dom test
run: ut test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage

View File

@@ -88093,7 +88093,6 @@ exports[`renders components/date-picker/demo/switchable.tsx extend context corre
class="ant-space-item"
>
<div
aria-label="Picker Type"
class="ant-select ant-select-outlined css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div

View File

@@ -7669,7 +7669,6 @@ exports[`renders components/date-picker/demo/switchable.tsx correctly 1`] = `
class="ant-space-item"
>
<div
aria-label="Picker Type"
class="ant-select ant-select-outlined css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div

View File

@@ -1108,7 +1108,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -1273,7 +1272,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -1443,7 +1441,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div

View File

@@ -86,7 +86,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -340,7 +339,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -1648,7 +1646,6 @@ exports[`renders components/form/demo/control-hooks.tsx extend context correctly
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -11466,7 +11463,6 @@ exports[`renders components/form/demo/register.tsx extend context correctly 1`]
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-cascader ant-select-outlined ant-select-in-form-item ant-select-css-var ant-cascader-css-var css-var-test-id ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
<div
@@ -12069,7 +12065,6 @@ exports[`renders components/form/demo/register.tsx extend context correctly 1`]
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item ant-select-auto-complete ant-select-customize css-var-test-id ant-select-css-var ant-select-single ant-select-customize-input ant-select-show-search"
>
<div
@@ -12191,7 +12186,6 @@ exports[`renders components/form/demo/register.tsx extend context correctly 1`]
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -22972,7 +22966,6 @@ exports[`renders components/form/demo/validate-other.tsx extend context correctl
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item ant-select-has-feedback css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -23132,7 +23125,6 @@ exports[`renders components/form/demo/validate-other.tsx extend context correctl
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-multiple ant-select-show-arrow ant-select-show-search"
>
<div
@@ -32585,7 +32577,6 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-filled ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -32726,7 +32717,6 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-cascader ant-select-filled ant-select-in-form-item ant-select-css-var ant-cascader-css-var css-var-test-id ant-select-single ant-select-show-arrow"
>
<div
@@ -32881,7 +32871,6 @@ exports[`renders components/form/demo/variant.tsx extend context correctly 1`] =
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-tree-select ant-select-filled ant-select-in-form-item css-var-test-id ant-select-css-var ant-tree-select-css-var ant-select-single ant-select-show-arrow"
>
<div

View File

@@ -86,7 +86,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -262,7 +261,6 @@ Array [
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -1280,7 +1278,6 @@ exports[`renders components/form/demo/control-hooks.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -7713,7 +7710,6 @@ exports[`renders components/form/demo/register.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-cascader ant-select-outlined ant-select-in-form-item ant-select-css-var ant-cascader-css-var css-var-test-id ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
<div
@@ -8072,7 +8068,6 @@ exports[`renders components/form/demo/register.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item ant-select-auto-complete ant-select-customize css-var-test-id ant-select-css-var ant-select-single ant-select-customize-input ant-select-show-search"
>
<div
@@ -8182,7 +8177,6 @@ exports[`renders components/form/demo/register.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -10506,7 +10500,6 @@ exports[`renders components/form/demo/validate-other.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item ant-select-has-feedback css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -10588,7 +10581,6 @@ exports[`renders components/form/demo/validate-other.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-outlined ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-multiple ant-select-show-arrow ant-select-show-search"
>
<div
@@ -14835,7 +14827,6 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-select-filled ant-select-in-form-item css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
@@ -14915,7 +14906,6 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-cascader ant-select-filled ant-select-in-form-item ant-select-css-var ant-cascader-css-var css-var-test-id ant-select-single ant-select-show-arrow"
>
<div
@@ -14995,7 +14985,6 @@ exports[`renders components/form/demo/variant.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
aria-required="true"
class="ant-select ant-tree-select ant-select-filled ant-select-in-form-item css-var-test-id ant-select-css-var ant-tree-select-css-var ant-select-single ant-select-show-arrow"
>
<div

View File

@@ -310,7 +310,6 @@ exports[`List.pagination should default work 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div

View File

@@ -2057,7 +2057,6 @@ exports[`Locale Provider should display the text as ar 1`] = `
class="ant-pagination-options"
>
<div
aria-label="مقاس الصفحه"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -7318,7 +7317,6 @@ exports[`Locale Provider should display the text as az 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -12579,7 +12577,6 @@ exports[`Locale Provider should display the text as bg 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -17840,7 +17837,6 @@ exports[`Locale Provider should display the text as bn-bd 1`] = `
class="ant-pagination-options"
>
<div
aria-label="পাতার আকার"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -23101,7 +23097,6 @@ exports[`Locale Provider should display the text as by 1`] = `
class="ant-pagination-options"
>
<div
aria-label="памер старонкі"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -28362,7 +28357,6 @@ exports[`Locale Provider should display the text as ca 1`] = `
class="ant-pagination-options"
>
<div
aria-label="mida de la pàgina"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -33623,7 +33617,6 @@ exports[`Locale Provider should display the text as cs 1`] = `
class="ant-pagination-options"
>
<div
aria-label="velikost stránky"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -38884,7 +38877,6 @@ exports[`Locale Provider should display the text as da 1`] = `
class="ant-pagination-options"
>
<div
aria-label="sidestørrelse"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -44145,7 +44137,6 @@ exports[`Locale Provider should display the text as de 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -49406,7 +49397,6 @@ exports[`Locale Provider should display the text as el 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Μέγεθος σελίδας"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -54667,7 +54657,6 @@ exports[`Locale Provider should display the text as en 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -59928,7 +59917,6 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -65189,7 +65177,6 @@ exports[`Locale Provider should display the text as es 1`] = `
class="ant-pagination-options"
>
<div
aria-label="tamaño de página"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -70450,7 +70437,6 @@ exports[`Locale Provider should display the text as et 1`] = `
class="ant-pagination-options"
>
<div
aria-label="lehe suurus"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -75711,7 +75697,6 @@ exports[`Locale Provider should display the text as eu 1`] = `
class="ant-pagination-options"
>
<div
aria-label="orrien tamaina"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -80972,7 +80957,6 @@ exports[`Locale Provider should display the text as fa 1`] = `
class="ant-pagination-options"
>
<div
aria-label="اندازه صفحه"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -86233,7 +86217,6 @@ exports[`Locale Provider should display the text as fi 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -91494,7 +91477,6 @@ exports[`Locale Provider should display the text as fr 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -96755,7 +96737,6 @@ exports[`Locale Provider should display the text as fr 2`] = `
class="ant-pagination-options"
>
<div
aria-label="taille de la page"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -102016,7 +101997,6 @@ exports[`Locale Provider should display the text as fr 3`] = `
class="ant-pagination-options"
>
<div
aria-label="taille de la page"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -107277,7 +107257,6 @@ exports[`Locale Provider should display the text as ga 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -112538,7 +112517,6 @@ exports[`Locale Provider should display the text as gl 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -117799,7 +117777,6 @@ exports[`Locale Provider should display the text as he 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -123060,7 +123037,6 @@ exports[`Locale Provider should display the text as hi 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -128321,7 +128297,6 @@ exports[`Locale Provider should display the text as hr 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -133582,7 +133557,6 @@ exports[`Locale Provider should display the text as hu 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -138843,7 +138817,6 @@ exports[`Locale Provider should display the text as hy-am 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -144104,7 +144077,6 @@ exports[`Locale Provider should display the text as id 1`] = `
class="ant-pagination-options"
>
<div
aria-label="ukuran halaman"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -149365,7 +149337,6 @@ exports[`Locale Provider should display the text as is 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -154626,7 +154597,6 @@ exports[`Locale Provider should display the text as it 1`] = `
class="ant-pagination-options"
>
<div
aria-label="dimensioni della pagina"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -159887,7 +159857,6 @@ exports[`Locale Provider should display the text as ja 1`] = `
class="ant-pagination-options"
>
<div
aria-label="ページサイズ"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -165148,7 +165117,6 @@ exports[`Locale Provider should display the text as ka 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -170409,7 +170377,6 @@ exports[`Locale Provider should display the text as kk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -175670,7 +175637,6 @@ exports[`Locale Provider should display the text as km 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -180929,7 +180895,6 @@ exports[`Locale Provider should display the text as kn 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -186190,7 +186155,6 @@ exports[`Locale Provider should display the text as ko 1`] = `
class="ant-pagination-options"
>
<div
aria-label="페이지 크기"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -191451,7 +191415,6 @@ exports[`Locale Provider should display the text as ku 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -196712,7 +196675,6 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -201973,7 +201935,6 @@ exports[`Locale Provider should display the text as lt 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Puslapio dydis"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -207234,7 +207195,6 @@ exports[`Locale Provider should display the text as lv 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -212495,7 +212455,6 @@ exports[`Locale Provider should display the text as mk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -217756,7 +217715,6 @@ exports[`Locale Provider should display the text as ml 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -223017,7 +222975,6 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -228278,7 +228235,6 @@ exports[`Locale Provider should display the text as mr 1`] = `
class="ant-pagination-options"
>
<div
aria-label="पृष्ठ आकार"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -233539,7 +233495,6 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -238800,7 +238755,6 @@ exports[`Locale Provider should display the text as my 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -244061,7 +244015,6 @@ exports[`Locale Provider should display the text as nb 1`] = `
class="ant-pagination-options"
>
<div
aria-label="sidestørrelse"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -249322,7 +249275,6 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -254583,7 +254535,6 @@ exports[`Locale Provider should display the text as nl 1`] = `
class="ant-pagination-options"
>
<div
aria-label="pagina grootte"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -259844,7 +259795,6 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -265105,7 +265055,6 @@ exports[`Locale Provider should display the text as pl 1`] = `
class="ant-pagination-options"
>
<div
aria-label="rozmiar strony"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -270366,7 +270315,6 @@ exports[`Locale Provider should display the text as pt 1`] = `
class="ant-pagination-options"
>
<div
aria-label="mărimea paginii"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -275627,7 +275575,6 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
class="ant-pagination-options"
>
<div
aria-label="tamanho da página"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -280888,7 +280835,6 @@ exports[`Locale Provider should display the text as ro 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -286149,7 +286095,6 @@ exports[`Locale Provider should display the text as ru 1`] = `
class="ant-pagination-options"
>
<div
aria-label="размер страницы"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -291410,7 +291355,6 @@ exports[`Locale Provider should display the text as si 1`] = `
class="ant-pagination-options"
>
<div
aria-label="පිටුවේ ප්‍රමාණය"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -296671,7 +296615,6 @@ exports[`Locale Provider should display the text as sk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -301932,7 +301875,6 @@ exports[`Locale Provider should display the text as sl 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -307193,7 +307135,6 @@ exports[`Locale Provider should display the text as sr 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -312454,7 +312395,6 @@ exports[`Locale Provider should display the text as sv 1`] = `
class="ant-pagination-options"
>
<div
aria-label="sidstorlek"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -317715,7 +317655,6 @@ exports[`Locale Provider should display the text as ta 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -322976,7 +322915,6 @@ exports[`Locale Provider should display the text as th 1`] = `
class="ant-pagination-options"
>
<div
aria-label="ขนาดหน้า"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -328237,7 +328175,6 @@ exports[`Locale Provider should display the text as tk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Sahypa sany"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -333498,7 +333435,6 @@ exports[`Locale Provider should display the text as tr 1`] = `
class="ant-pagination-options"
>
<div
aria-label="sayfa boyutu"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -338759,7 +338695,6 @@ exports[`Locale Provider should display the text as uk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -344020,7 +343955,6 @@ exports[`Locale Provider should display the text as ur 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -349281,7 +349215,6 @@ exports[`Locale Provider should display the text as uz-latn 1`] = `
class="ant-pagination-options"
>
<div
aria-label="sahifa hajmi"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -354542,7 +354475,6 @@ exports[`Locale Provider should display the text as vi 1`] = `
class="ant-pagination-options"
>
<div
aria-label="kích thước trang"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -359803,7 +359735,6 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
class="ant-pagination-options"
>
<div
aria-label="页码"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -365064,7 +364995,6 @@ exports[`Locale Provider should display the text as zh-hk 1`] = `
class="ant-pagination-options"
>
<div
aria-label="頁碼"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -370325,7 +370255,6 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
class="ant-pagination-options"
>
<div
aria-label="頁碼"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-root ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div

View File

@@ -22,7 +22,15 @@ export type ModalFunc = (props: ModalFuncProps) => {
update: (configUpdate: ConfigUpdate) => void;
};
export type ModalStaticFunctions = Record<NonNullable<ModalFuncProps['type']>, ModalFunc>;
export type ModalStaticFunctions = {
info: ModalFunc;
success: ModalFunc;
error: ModalFunc;
warning: ModalFunc;
confirm: ModalFunc;
/** @deprecated Please use `warning` instead */
warn: ModalFunc;
};
const ConfirmDialogWrapper: React.FC<ConfirmDialogProps> = (props) => {
const { prefixCls: customizePrefixCls, getContainer, direction } = props;

View File

@@ -559,7 +559,6 @@ exports[`renders components/pagination/demo/all.tsx extend context correctly 1`]
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -1033,7 +1032,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -1363,7 +1361,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -1661,7 +1658,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -2002,7 +1998,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -2423,7 +2418,6 @@ exports[`renders components/pagination/demo/itemRender.tsx extend context correc
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -2758,7 +2752,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -3099,7 +3092,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -3540,7 +3532,6 @@ exports[`renders components/pagination/demo/mini.tsx extend context correctly 1`
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -3964,7 +3955,6 @@ exports[`renders components/pagination/demo/mini.tsx extend context correctly 1`
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -5217,7 +5207,6 @@ exports[`renders components/pagination/demo/more.tsx extend context correctly 1`
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -5822,7 +5811,6 @@ exports[`renders components/pagination/demo/style-class.tsx extend context corre
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -6159,7 +6147,6 @@ exports[`renders components/pagination/demo/style-class.tsx extend context corre
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -6451,7 +6438,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -6737,7 +6723,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -7073,7 +7058,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -7403,7 +7387,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -7734,7 +7717,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -8064,7 +8046,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div

View File

@@ -557,7 +557,6 @@ exports[`renders components/pagination/demo/all.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -925,7 +924,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -1153,7 +1151,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -1347,7 +1344,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -1586,7 +1582,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -1901,7 +1896,6 @@ exports[`renders components/pagination/demo/itemRender.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -2132,7 +2126,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -2371,7 +2364,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -2708,7 +2700,6 @@ exports[`renders components/pagination/demo/mini.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -3030,7 +3021,6 @@ exports[`renders components/pagination/demo/mini.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -3975,7 +3965,6 @@ exports[`renders components/pagination/demo/more.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -4474,7 +4463,6 @@ exports[`renders components/pagination/demo/style-class.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -4709,7 +4697,6 @@ exports[`renders components/pagination/demo/style-class.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -4897,7 +4884,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -5081,7 +5067,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -5313,7 +5298,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -5541,7 +5525,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div
@@ -5770,7 +5753,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -5998,7 +5980,6 @@ Array [
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled ant-select-show-search"
>
<div

View File

@@ -1773,7 +1773,6 @@ exports[`renders components/segmented/demo/size-consistent.tsx extend context co
</div>
</div>
<div
aria-label="select"
class="ant-select ant-select-sm ant-select-outlined css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
style="width: 150px;"
>

View File

@@ -1688,7 +1688,6 @@ exports[`renders components/segmented/demo/size-consistent.tsx correctly 1`] = `
</div>
</div>
<div
aria-label="select"
class="ant-select ant-select-sm ant-select-outlined css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
style="width:150px"
>

View File

@@ -8997,7 +8997,6 @@ exports[`renders components/table/demo/edit-row.tsx extend context correctly 1`]
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -13290,7 +13289,6 @@ exports[`renders components/table/demo/fixed-header.tsx extend context correctly
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -14716,7 +14714,6 @@ exports[`renders components/table/demo/grouping-columns.tsx extend context corre
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -18524,7 +18521,6 @@ exports[`renders components/table/demo/narrow.tsx extend context correctly 1`] =
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -23649,359 +23645,6 @@ Array [
exports[`renders components/table/demo/reset-filter.tsx extend context correctly 2`] = `[]`;
exports[`renders components/table/demo/resizable-column.tsx extend context correctly 1`] = `
<div
class="css-var-test-id ant-table-css-var ant-table-wrapper"
>
<div
class="ant-spin-nested-loading css-var-test-id"
>
<div
class="ant-spin-container"
>
<div
class="ant-table ant-table-bordered css-var-test-id ant-table-css-var"
>
<div
class="ant-table-container"
>
<div
class="ant-table-content"
>
<table
style="table-layout: auto;"
>
<colgroup>
<col
style="width: 200px;"
/>
<col
style="width: 100px;"
/>
<col
style="width: 100px;"
/>
<col
style="width: 100px;"
/>
</colgroup>
<thead
class="ant-table-thead"
>
<tr>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Date
<span
class="react-resizable-handle"
/>
</th>
<th
aria-description="sortable"
aria-label="Amount"
class="ant-table-cell ant-table-column-has-sorters react-resizable"
scope="col"
tabindex="0"
>
<div
aria-describedby="test-id"
class="ant-table-column-sorters"
>
<span
class="ant-table-column-title"
>
Amount
</span>
<span
class="ant-table-column-sorter ant-table-column-sorter-full"
>
<span
aria-hidden="true"
class="ant-table-column-sorter-inner"
>
<span
aria-label="caret-up"
class="anticon anticon-caret-up ant-table-column-sorter-up"
role="img"
>
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"
/>
</svg>
</span>
<span
aria-label="caret-down"
class="anticon anticon-caret-down ant-table-column-sorter-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="caret-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"
/>
</svg>
</span>
</span>
</span>
</div>
<div
class="ant-tooltip ant-zoom-big-fast-appear ant-zoom-big-fast-appear-prepare ant-zoom-big-fast ant-tooltip-css-var css-var-test-id ant-tooltip-placement-top"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; right: auto; bottom: auto; box-sizing: border-box;"
>
<div
class="ant-tooltip-arrow"
style="position: absolute; bottom: 0px; left: 0px;"
>
<span
class="ant-tooltip-arrow-content"
/>
</div>
<div
class="ant-tooltip-container"
id="test-id"
role="tooltip"
>
Click to sort ascending
</div>
</div>
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Type
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Note
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell"
scope="col"
>
Action
</th>
</tr>
</thead>
<tbody
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
>
2018-02-11
</td>
<td
class="ant-table-cell"
>
120
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
>
2018-03-11
</td>
<td
class="ant-table-cell"
>
243
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
>
2018-04-11
</td>
<td
class="ant-table-cell"
>
98
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<ul
class="ant-pagination ant-table-pagination ant-table-pagination-end css-var-test-id"
>
<li
aria-disabled="true"
class="ant-pagination-prev ant-pagination-disabled"
title="Previous Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
>
<span
aria-label="left"
class="anticon anticon-left"
role="img"
>
<svg
aria-hidden="true"
data-icon="left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
tabindex="0"
title="1"
>
<a
rel="nofollow"
>
1
</a>
</li>
<li
aria-disabled="true"
class="ant-pagination-next ant-pagination-disabled"
title="Next Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
>
<span
aria-label="right"
class="anticon anticon-right"
role="img"
>
<svg
aria-hidden="true"
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</button>
</li>
</ul>
</div>
</div>
</div>
`;
exports[`renders components/table/demo/resizable-column.tsx extend context correctly 2`] = `[]`;
exports[`renders components/table/demo/responsive.tsx extend context correctly 1`] = `
<div
class="css-var-test-id ant-table-css-var ant-table-wrapper"

View File

@@ -7951,7 +7951,6 @@ exports[`renders components/table/demo/edit-row.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -12646,7 +12645,6 @@ exports[`renders components/table/demo/fixed-columns-header.tsx correctly 1`] =
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -14653,7 +14651,6 @@ exports[`renders components/table/demo/fixed-header.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -15796,7 +15793,6 @@ exports[`renders components/table/demo/grouping-columns.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -17957,7 +17953,6 @@ exports[`renders components/table/demo/narrow.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-sm ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div
@@ -21935,336 +21930,6 @@ Array [
]
`;
exports[`renders components/table/demo/resizable-column.tsx correctly 1`] = `
<div
class="css-var-test-id ant-table-css-var ant-table-wrapper"
>
<div
class="ant-spin-nested-loading css-var-test-id"
>
<div
class="ant-spin-container"
>
<div
class="ant-table ant-table-bordered css-var-test-id ant-table-css-var"
>
<div
class="ant-table-container"
>
<div
class="ant-table-content"
>
<table
style="table-layout:auto"
>
<colgroup>
<col
style="width:200px"
/>
<col
style="width:100px"
/>
<col
style="width:100px"
/>
<col
style="width:100px"
/>
</colgroup>
<thead
class="ant-table-thead"
>
<tr>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Date
<span
class="react-resizable-handle"
/>
</th>
<th
aria-description="sortable"
aria-label="Amount"
class="ant-table-cell ant-table-column-has-sorters react-resizable"
scope="col"
tabindex="0"
>
<div
class="ant-table-column-sorters"
>
<span
class="ant-table-column-title"
>
Amount
</span>
<span
class="ant-table-column-sorter ant-table-column-sorter-full"
>
<span
aria-hidden="true"
class="ant-table-column-sorter-inner"
>
<span
aria-label="caret-up"
class="anticon anticon-caret-up ant-table-column-sorter-up"
role="img"
>
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"
/>
</svg>
</span>
<span
aria-label="caret-down"
class="anticon anticon-caret-down ant-table-column-sorter-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="caret-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"
/>
</svg>
</span>
</span>
</span>
</div>
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Type
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell react-resizable"
scope="col"
>
Note
<span
class="react-resizable-handle"
/>
</th>
<th
class="ant-table-cell"
scope="col"
>
Action
</th>
</tr>
</thead>
<tbody
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
>
2018-02-11
</td>
<td
class="ant-table-cell"
>
120
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
>
2018-03-11
</td>
<td
class="ant-table-cell"
>
243
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
>
2018-04-11
</td>
<td
class="ant-table-cell"
>
98
</td>
<td
class="ant-table-cell"
>
income
</td>
<td
class="ant-table-cell"
>
transfer
</td>
<td
class="ant-table-cell"
>
<a>
Delete
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<ul
class="ant-pagination ant-table-pagination ant-table-pagination-end css-var-test-id"
>
<li
aria-disabled="true"
class="ant-pagination-prev ant-pagination-disabled"
title="Previous Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
>
<span
aria-label="left"
class="anticon anticon-left"
role="img"
>
<svg
aria-hidden="true"
data-icon="left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
tabindex="0"
title="1"
>
<a
rel="nofollow"
>
1
</a>
</li>
<li
aria-disabled="true"
class="ant-pagination-next ant-pagination-disabled"
title="Next Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
>
<span
aria-label="right"
class="anticon anticon-right"
role="img"
>
<svg
aria-hidden="true"
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</button>
</li>
</ul>
</div>
</div>
</div>
`;
exports[`renders components/table/demo/responsive.tsx correctly 1`] = `
<div
class="css-var-test-id ant-table-css-var ant-table-wrapper"
@@ -28661,7 +28326,6 @@ exports[`renders components/table/demo/sticky.tsx correctly 1`] = `
class="ant-pagination-options"
>
<div
aria-label="Page Size"
class="ant-select ant-select-outlined ant-pagination-options-size-changer css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-show-search"
>
<div

View File

@@ -1,24 +0,0 @@
## zh-CN
集成 [react-resizable](https://github.com/STRML/react-resizable) 来实现可伸缩列。如果有排序需要,可以通过[额外标记](https://codesandbox.io/s/zrj8xvyzxx)阻止触发排序。
## en-US
Implement resizable column by integrate with [react-resizable](https://github.com/STRML/react-resizable). When sort needed, you can use [additional mark](https://codesandbox.io/s/zrj8xvyzxx) to prevent resize trigger sort.
```css
#table-demo-resizable-column .react-resizable {
position: relative;
background-clip: padding-box;
}
#table-demo-resizable-column .react-resizable-handle {
position: absolute;
inset-inline-end: -5px;
bottom: 0;
z-index: 1;
width: 10px;
height: 100%;
cursor: col-resize;
}
```

View File

@@ -1,123 +0,0 @@
import React, { useState } from 'react';
import { Table } from 'antd';
import type { TableColumnsType } from 'antd';
import type { ResizeCallbackData } from 'react-resizable';
import { Resizable } from 'react-resizable';
interface DataType {
key: React.Key;
date: string;
amount: number;
type: string;
note: string;
}
interface TitlePropsType {
width: number;
onResize: (e: React.SyntheticEvent<Element>, data: ResizeCallbackData) => void;
}
const ResizableTitle: React.FC<Readonly<React.HTMLAttributes<any> & TitlePropsType>> = (props) => {
const { onResize, width, ...restProps } = props;
if (!width) {
return <th {...restProps} />;
}
return (
<Resizable
width={width}
height={0}
handle={<span className="react-resizable-handle" onClick={(e) => e.stopPropagation()} />}
onResize={onResize}
draggableOpts={{ enableUserSelectHack: false }}
>
<th {...restProps} />
</Resizable>
);
};
const data: DataType[] = [
{
key: 0,
date: '2018-02-11',
amount: 120,
type: 'income',
note: 'transfer',
},
{
key: 1,
date: '2018-03-11',
amount: 243,
type: 'income',
note: 'transfer',
},
{
key: 2,
date: '2018-04-11',
amount: 98,
type: 'income',
note: 'transfer',
},
];
const App: React.FC = () => {
const [columns, setColumns] = useState<TableColumnsType<DataType>>([
{
title: 'Date',
dataIndex: 'date',
width: 200,
},
{
title: 'Amount',
dataIndex: 'amount',
width: 100,
sorter: (a, b) => a.amount - b.amount,
},
{
title: 'Type',
dataIndex: 'type',
width: 100,
},
{
title: 'Note',
dataIndex: 'note',
width: 100,
},
{
title: 'Action',
key: 'action',
render: () => <a>Delete</a>,
},
]);
const handleResize =
(index: number) =>
(_: React.SyntheticEvent<Element>, { size }: ResizeCallbackData) => {
const newColumns = [...columns];
newColumns[index] = {
...newColumns[index],
width: size.width,
};
setColumns(newColumns);
};
const mergedColumns = columns.map<TableColumnsType<DataType>[number]>((col, index) => ({
...col,
onHeaderCell: (column: TableColumnsType<DataType>[number]) => ({
width: column.width,
onResize: handleResize(index) as React.ReactEventHandler<any>,
}),
}));
return (
<Table<DataType>
bordered
components={{ header: { cell: ResizableTitle } }}
columns={mergedColumns}
dataSource={data}
/>
);
};
export default App;

View File

@@ -96,7 +96,6 @@ const columns = [
<code src="./demo/drag-sorting.tsx">Drag sorting</code>
<code src="./demo/drag-column-sorting.tsx">Drag Column sorting</code>
<code src="./demo/drag-sorting-handler.tsx">Drag sorting with handler</code>
<code src="./demo/resizable-column.tsx" debug>Resizable column</code>
<code src="./demo/ellipsis.tsx">ellipsis column</code>
<code src="./demo/ellipsis-custom-tooltip.tsx">ellipsis column custom tooltip</code>
<code src="./demo/custom-empty.tsx">Custom empty</code>

View File

@@ -98,7 +98,6 @@ const columns = [
<code src="./demo/drag-sorting.tsx">拖拽排序</code>
<code src="./demo/drag-column-sorting.tsx">列拖拽排序</code>
<code src="./demo/drag-sorting-handler.tsx">拖拽手柄列</code>
<code src="./demo/resizable-column.tsx" debug>可伸缩列</code>
<code src="./demo/ellipsis.tsx">单元格自动省略</code>
<code src="./demo/ellipsis-custom-tooltip.tsx">自定义单元格省略提示</code>
<code src="./demo/custom-empty.tsx">自定义空状态</code>

View File

@@ -1567,7 +1567,6 @@ exports[`renders components/tooltip/demo/disabled-children.tsx extend context co
class="ant-space-item"
>
<div
aria-describedby="test-id"
class="ant-select ant-select-outlined css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow ant-select-disabled"
>
<div

View File

@@ -26,6 +26,7 @@ export default antfu(
typescript: true,
react: true,
rules: {
'react/jsx-key-before-spread': 'off',
'node/prefer-global/process': 'off', // TODO: remove this
'node/prefer-global/buffer': 'off', // TODO: remove this
'jsdoc/empty-tags': 'off',

View File

@@ -115,7 +115,7 @@
"@ant-design/icons": "^6.1.0",
"@ant-design/react-slick": "~2.0.0",
"@babel/runtime": "^7.28.4",
"@rc-component/cascader": "~1.10.0",
"@rc-component/cascader": "~1.11.0",
"@rc-component/checkbox": "~1.0.1",
"@rc-component/collapse": "~1.1.2",
"@rc-component/color-picker": "~3.0.3",
@@ -138,7 +138,7 @@
"@rc-component/rate": "~1.0.1",
"@rc-component/resize-observer": "^1.0.1",
"@rc-component/segmented": "~1.3.0",
"@rc-component/select": "~1.4.0",
"@rc-component/select": "~1.5.0",
"@rc-component/slider": "~1.0.1",
"@rc-component/steps": "~1.2.2",
"@rc-component/switch": "~1.0.3",
@@ -148,7 +148,7 @@
"@rc-component/tooltip": "~1.4.0",
"@rc-component/tour": "~2.2.1",
"@rc-component/tree": "~1.1.0",
"@rc-component/tree-select": "~1.5.0",
"@rc-component/tree-select": "~1.6.0",
"@rc-component/trigger": "^3.7.2",
"@rc-component/upload": "~1.1.0",
"@rc-component/util": "^1.7.0",
@@ -174,7 +174,7 @@
"@emotion/css": "^11.13.5",
"@emotion/react": "^11.14.0",
"@emotion/server": "^11.11.0",
"@eslint-react/eslint-plugin": "^2.3.13",
"@eslint-react/eslint-plugin": "^2.5.0",
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@inquirer/prompts": "^8.0.2",
"@madccc/duplicate-package-checker-webpack-plugin": "^1.0.0",
@@ -214,7 +214,6 @@
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/react-highlight-words": "^0.20.0",
"@types/react-resizable": "^3.0.8",
"@types/semver": "^7.7.1",
"@types/spinnies": "^0.5.3",
"@types/tar": "^6.1.13",
@@ -240,12 +239,12 @@
"dumi": "~2.4.21",
"dumi-plugin-color-chunk": "^2.1.0",
"env-paths": "^3.0.0",
"eslint": "^9.39.1",
"eslint": "^9.39.2",
"eslint-plugin-compat": "^6.0.2",
"eslint-plugin-jest": "^29.2.1",
"eslint-plugin-jest": "^29.12.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"eslint-plugin-react-refresh": "^0.4.26",
"fast-glob": "^3.3.3",
"father": "4.6.13",
"fs-extra": "^11.3.2",
@@ -300,7 +299,6 @@
"react-highlight-words": "^0.21.0",
"react-icons": "^5.5.0",
"react-infinite-scroll-component": "^6.1.1",
"react-resizable": "3.0.5",
"react-router-dom": "^7.10.1",
"react-sticky-box": "^2.0.5",
"rehype-stringify": "^10.0.1",
@@ -340,7 +338,7 @@
},
{
"path": "./dist/antd-with-locales.min.js",
"limit": "616 KiB",
"limit": "617 KiB",
"gzip": true
}
],

View File

@@ -53,7 +53,7 @@ function getPresetColorsTokenList(presetColors: string[]) {
}
const main = async () => {
const app = await (Application as any).bootstrap(
const app = await Application.bootstrap(
{
// typedoc options here
entryPoints: ['components/theme/interface/index.ts', 'components/*/style/index.{ts,tsx}'],
@@ -87,7 +87,7 @@ const main = async () => {
} else if (type.name === 'AliasToken') {
tokenMeta.alias = getTokenList(type.children, 'alias');
} else if (type.name === 'PresetColors') {
presetColors = (type?.type as any)?.target?.elements?.map((item: any) => item.value);
presetColors = type?.type?.target?.elements?.map((item: any) => item.value);
}
});