mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
* fix(button): add theme-aware preset color hover/active tokens
Add ${colorKey}Hover and ${colorKey}Active tokens that swap values based on dark/light mode for improved contrast and user experience.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: add preset color hover/active tokens for consistent button interaction
- Add xxxHover and xxxActive tokens for preset colors in genColorMapToken
- Override these tokens in dark mode to swap hover/active values
- Update ButtonToken type to include PresetColorHoverActiveMap
- Update button variant styles to use new hover/active tokens
- Fix #56656: button hover/active state inconsistency in dark mode
* test: add @csstools to compileModules
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: support .mjs files in Jest configuration
- Updated .jest.js transform pattern to include .mjs files
- Simplified .jest.node.js transform patterns
- Added jest-mjs-transformer.js for babel-jest mjs handling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: remove unused jest-mjs-transformer.js
- Removed jest-mjs-transformer.js as it's no longer used
- .mjs files are now handled by the updated transform patterns in Jest configs
* test: add .mjs support to .jest.image.js
- Updated .jest.image.js transform pattern to include .mjs files
- fixes image test failures due to ES module parsing errors
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
18 lines
646 B
JavaScript
18 lines
646 B
JavaScript
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
|
|
|
|
module.exports = {
|
|
setupFiles: ['./tests/setup.ts'],
|
|
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
|
|
moduleNameMapper,
|
|
transform: {
|
|
'^.+\\.(ts|tsx|js|mjs)$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
|
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
|
|
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
|
|
},
|
|
testRegex: 'node\\.test\\.(j|t)sx$',
|
|
testEnvironment: 'node',
|
|
transformIgnorePatterns,
|
|
// bail: true,
|
|
};
|