42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _internal = require("../../theme/internal");
|
|
var _genStyleUtils = require("../../theme/util/genStyleUtils");
|
|
const genWaveStyle = token => {
|
|
const {
|
|
componentCls,
|
|
colorPrimary,
|
|
motionDurationSlow,
|
|
motionEaseInOut,
|
|
motionEaseOutCirc,
|
|
antCls
|
|
} = token;
|
|
const [, varRef] = (0, _genStyleUtils.genCssVar)(antCls, 'wave');
|
|
return {
|
|
[componentCls]: {
|
|
position: 'absolute',
|
|
background: 'transparent',
|
|
pointerEvents: 'none',
|
|
boxSizing: 'border-box',
|
|
color: varRef('color', colorPrimary),
|
|
boxShadow: `0 0 0 0 currentcolor`,
|
|
opacity: 0.2,
|
|
// =================== Motion ===================
|
|
'&.wave-motion-appear': {
|
|
transition: [`box-shadow 0.4s`, `opacity 2s`].map(prop => `${prop} ${motionEaseOutCirc}`).join(','),
|
|
'&-active': {
|
|
boxShadow: `0 0 0 6px currentcolor`,
|
|
opacity: 0
|
|
},
|
|
'&.wave-quick': {
|
|
transition: [`box-shadow`, `opacity`].map(prop => `${prop} ${motionDurationSlow} ${motionEaseInOut}`).join(',')
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
var _default = exports.default = (0, _internal.genComponentStyleHook)('Wave', genWaveStyle); |