Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Steps keyboard switch #43644

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions components/steps/style/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CSSObject } from '@ant-design/cssinjs';
import type { CSSProperties } from 'react';
import { resetComponent } from '../../style';
import { genFocusOutline, resetComponent } from '../../style';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import genStepsCustomIconStyle from './custom-icon';
Expand Down Expand Up @@ -171,6 +171,7 @@ const genStepsItemStatusStyle = (status: StepItemStatusEnum, token: StepsToken):
const genStepsItemStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
const { componentCls, motionDurationSlow } = token;
const stepsItemCls = `${componentCls}-item`; // .ant-steps-item
const stepItemIconCls = `${stepsItemCls}-icon`;

return {
[stepsItemCls]: {
Expand All @@ -189,12 +190,18 @@ const genStepsItemStyle: GenerateStyle<StepsToken, CSSObject> = (token) => {
},
[`${stepsItemCls}-container`]: {
outline: 'none',

[`&:focus-visible`]: {
[stepItemIconCls]: {
...genFocusOutline(token),
},
},
},
[`${stepsItemCls}-icon, ${stepsItemCls}-content`]: {
[`${stepItemIconCls}, ${stepsItemCls}-content`]: {
display: 'inline-block',
verticalAlign: 'top',
},
[`${stepsItemCls}-icon`]: {
[stepItemIconCls]: {
width: token.iconSize,
height: token.iconSize,
marginTop: 0,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"rc-segmented": "~2.2.0",
"rc-select": "~14.5.0",
"rc-slider": "~10.1.0",
"rc-steps": "~6.0.0",
"rc-steps": "~6.0.1",
"rc-switch": "~4.1.0",
"rc-table": "~7.32.1",
"rc-tabs": "~12.9.0",
Expand Down