feat: add tour animated (#38469)

* feat: add animated

* feat: update doc

* feat: update doc

* feat: update doc

* feat: update dome

* feat: update lint

* feat: update style

* feat: update reviewer

* feat: update

* feat: update
pull/38475/head
黑雨 2 years ago committed by GitHub
parent bcaf197b31
commit f035c9d57f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,6 +44,7 @@ const Tour: React.ForwardRefRenderFunction<HTMLDivElement, TourProps> & {
prefixCls={prefixCls} prefixCls={prefixCls}
steps={steps} steps={steps}
current={current} current={current}
animated
renderPanel={mergedRenderPanel} renderPanel={mergedRenderPanel}
/>, />,
); );

@ -39,6 +39,7 @@ const genBaseStyle: GenerateStyle<TourToken> = token => {
colorWhite, colorWhite,
colorBgTextHover, colorBgTextHover,
tourCloseSize, tourCloseSize,
motionDurationSlow,
} = token; } = token;
return [ return [
@ -199,7 +200,14 @@ const genBaseStyle: GenerateStyle<TourToken> = token => {
}, },
}, },
// Limit left and right placement radius // ============================= mask ===========================
[`${componentCls}-mask`]: {
[`${componentCls}-placeholder-animated`]: {
transition: `all ${motionDurationSlow}`,
},
},
// =========== Limit left and right placement radius ==============
[[ [[
`&-placement-left`, `&-placement-left`,
`&-placement-leftTop`, `&-placement-leftTop`,
@ -216,7 +224,8 @@ const genBaseStyle: GenerateStyle<TourToken> = token => {
}, },
}, },
}, },
// Arrow Style
// ============================= Arrow ===========================
getArrowStyle<TourToken>(token, { getArrowStyle<TourToken>(token, {
colorBg: 'var(--antd-arrow-background-color)', colorBg: 'var(--antd-arrow-background-color)',
showArrowCls: '', showArrowCls: '',

@ -114,7 +114,7 @@
"@ant-design/react-slick": "~0.29.1", "@ant-design/react-slick": "~0.29.1",
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@ctrl/tinycolor": "^3.4.0", "@ctrl/tinycolor": "^3.4.0",
"@rc-component/tour": "~1.0.0", "@rc-component/tour": "~1.0.1-2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"copy-to-clipboard": "^3.2.0", "copy-to-clipboard": "^3.2.0",
"dayjs": "^1.11.1", "dayjs": "^1.11.1",
@ -318,7 +318,7 @@
"bundlesize": [ "bundlesize": [
{ {
"path": "./dist/antd.min.js", "path": "./dist/antd.min.js",
"maxSize": "377 kB" "maxSize": "377.5 kB"
} }
] ]
} }

Loading…
Cancel
Save