Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3a083d4
chore: standardize repository config
afc163 Jun 26, 2026
58b06b5
fix: keep default CodeQL setup
afc163 Jun 26, 2026
b70ce21
chore: address AI review feedback
afc163 Jun 26, 2026
8274bc5
docs: standardize README release details
afc163 Jun 26, 2026
42387a0
ci: make surge preview non-blocking
afc163 Jun 26, 2026
547844f
ci: keep surge preview as fallback
afc163 Jun 26, 2026
6945552
docs: refine README usage and ecosystem note
afc163 Jun 27, 2026
e5291b5
ci: isolate surge preview token
afc163 Jun 27, 2026
e7e300e
chore: address review comments
afc163 Jun 27, 2026
2aa54df
docs: add Chinese README
afc163 Jun 27, 2026
356d8ff
docs: add Ant Design logo to README
afc163 Jun 27, 2026
93b7216
docs: refine bilingual README branding
afc163 Jun 27, 2026
622b1c9
chore: standardize rc tooling and docs
afc163 Jun 27, 2026
a7f3292
chore: address standardization review comments
afc163 Jun 27, 2026
5e6923d
chore: include father config in type checks
afc163 Jun 27, 2026
44e511e
docs: add license file
afc163 Jun 28, 2026
b645765
ci: use actions checkout v7
afc163 Jun 28, 2026
74baec6
chore: standardize package metadata
afc163 Jun 28, 2026
bbec15f
ci: standardize dependabot updates
afc163 Jun 28, 2026
e6c8f2d
chore: ignore generated docs artifacts
afc163 Jun 28, 2026
ead3aa2
chore: refine preview workflow ignores
afc163 Jun 28, 2026
5def596
docs: polish Chinese README wording
afc163 Jun 28, 2026
53210b6
chore: align tooling ignores and typescript
afc163 Jun 28, 2026
8fe76a0
docs: polish Chinese README wording
afc163 Jun 28, 2026
b26ebba
docs: document dumi dev server port
afc163 Jun 28, 2026
6b5435c
chore: standardize husky configuration
afc163 Jun 28, 2026
3e1004a
chore: standardize package type entry
afc163 Jun 28, 2026
6e2d36f
docs: normalize readme badges
afc163 Jun 28, 2026
3b1b5c3
ci: limit reusable workflow secrets
afc163 Jun 28, 2026
0ee74ca
ci: restore reusable workflow compatibility
afc163 Jun 28, 2026
b9ae748
docs: polish zh-CN readme wording
afc163 Jun 28, 2026
c068cb7
ci: narrow surge preview permissions
afc163 Jun 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
// more config: https://d.umijs.org/config
import { defineConfig } from 'dumi';
import path from 'path';

const basePath = process.env.GH_PAGES ? '/switch/' : '/';
const publicPath = basePath;

export default defineConfig({
alias: {
'@rc-component/switch$': path.resolve('src'),
'@rc-component/switch/es': path.resolve('src'),
'@rc-component/switch/assets': path.resolve('assets'),
},
mfsu: false,
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'rc-switch',
name: 'Switch',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
outputPath: '.doc',
exportStatic: {},
base: '/switch',
publicPath: '/switch/',
hash: true,
outputPath: 'docs-dist',
base: basePath,
publicPath,
});
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.eslintrc.js
es/
lib/
.doc/
.doc/
docs-dist/
.vercel/
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: ant-design
open_collective: ant-design
27 changes: 17 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: less
versions:
- 4.1.0
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
day: monday
time: '21:00'
timezone: Asia/Shanghai
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
day: monday
time: '21:00'
timezone: Asia/Shanghai
open-pull-requests-limit: 10
6 changes: 0 additions & 6 deletions .github/workflows/main.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/react-component-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ✅ test
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets: inherit
27 changes: 27 additions & 0 deletions .github/workflows/react-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: React Doctor

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [master]

permissions:
contents: read
pull-requests: write
issues: write
statuses: write

concurrency:
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
54 changes: 54 additions & 0 deletions .github/workflows/surge-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Surge Preview

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write
checks: write

jobs:
preview:
runs-on: ubuntu-latest
concurrency:
group: surge-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
PREVIEW: true
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check Surge token
id: surge-token
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
run: |
if [ -n "$SURGE_TOKEN" ]; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
fi
- name: Build preview
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
run: |
npm install
npm run build
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
with:
surge_token: ${{ env.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: docs-dist
failOnError: false
setCommitStatus: false
- name: Skip Surge preview
if: ${{ steps.surge-token.outputs.enabled != 'true' }}
run: echo "SURGE_TOKEN is not configured; skip Surge preview."
24 changes: 17 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.iml
*.log
*.log.*
.idea/
.ipr
.iws
Expand All @@ -20,20 +21,29 @@ Thumbs.db
.build
node_modules
.cache
dist
assets/**/*.css
build
lib
es
/coverage
yarn.lock
package-lock.json
pnpm-lock.yaml
coverage/
.doc
docs-dist
.vercel
.storybook

# dumi
.dumi/tmp
.dumi/tmp-test
.dumi/tmp-production
# umi
.umi
.umi-production
.umi-test
.env.local
.doc/
.dumi/

bun.lockb
bun.lockb
bun.lock
coverage
.dumi/tmp
.dumi/tmp-production
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules
coverage
docs-dist
dist
es
lib
.dumi/tmp
.dumi/tmp-production
.vercel
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lockb
*.log
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-present react-component

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading