@rc-component/trigger 3.6.5 → 3.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/UniqueProvider/FloatBg.d.ts +2 -0
- package/es/UniqueProvider/FloatBg.js +6 -3
- package/es/UniqueProvider/index.js +3 -1
- package/es/context.d.ts +2 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/lib/UniqueProvider/FloatBg.d.ts +2 -0
- package/lib/UniqueProvider/FloatBg.js +6 -3
- package/lib/UniqueProvider/index.js +3 -1
- package/lib/context.d.ts +2 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/package.json +1 -1
|
@@ -15,7 +15,9 @@ const FloatBg = props => {
|
|
|
15
15
|
offsetX,
|
|
16
16
|
offsetY,
|
|
17
17
|
popupSize,
|
|
18
|
-
motion
|
|
18
|
+
motion,
|
|
19
|
+
uniqueBgClassName,
|
|
20
|
+
uniqueBgStyle
|
|
19
21
|
} = props;
|
|
20
22
|
const floatBgCls = `${prefixCls}-float-bg`;
|
|
21
23
|
const [motionVisible, setMotionVisible] = React.useState(false);
|
|
@@ -46,7 +48,7 @@ const FloatBg = props => {
|
|
|
46
48
|
className: motionClassName,
|
|
47
49
|
style: motionStyle
|
|
48
50
|
}) => {
|
|
49
|
-
const cls = classNames(floatBgCls, motionClassName, {
|
|
51
|
+
const cls = classNames(floatBgCls, motionClassName, uniqueBgClassName, {
|
|
50
52
|
[`${floatBgCls}-visible`]: motionVisible
|
|
51
53
|
});
|
|
52
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -54,7 +56,8 @@ const FloatBg = props => {
|
|
|
54
56
|
style: {
|
|
55
57
|
...offsetStyle,
|
|
56
58
|
...sizeStyle,
|
|
57
|
-
...motionStyle
|
|
59
|
+
...motionStyle,
|
|
60
|
+
...uniqueBgStyle
|
|
58
61
|
}
|
|
59
62
|
});
|
|
60
63
|
});
|
|
@@ -148,7 +148,9 @@ const UniqueProvider = ({
|
|
|
148
148
|
offsetX: offsetX,
|
|
149
149
|
offsetY: offsetY,
|
|
150
150
|
popupSize: popupSize,
|
|
151
|
-
motion: options.popupMotion
|
|
151
|
+
motion: options.popupMotion,
|
|
152
|
+
uniqueBgClassName: options.uniqueBgClassName,
|
|
153
|
+
uniqueBgStyle: options.uniqueBgStyle
|
|
152
154
|
}))));
|
|
153
155
|
};
|
|
154
156
|
export default UniqueProvider;
|
package/es/context.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface UniqueShowOptions {
|
|
|
14
14
|
delay: number;
|
|
15
15
|
prefixCls?: string;
|
|
16
16
|
popupClassName?: string;
|
|
17
|
+
uniqueBgClassName?: string;
|
|
18
|
+
uniqueBgStyle?: React.CSSProperties;
|
|
17
19
|
popupStyle?: React.CSSProperties;
|
|
18
20
|
popupPlacement?: string;
|
|
19
21
|
builtinPlacements?: BuildInPlacements;
|
package/es/index.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ export interface TriggerProps {
|
|
|
44
44
|
builtinPlacements?: BuildInPlacements;
|
|
45
45
|
popupAlign?: AlignType;
|
|
46
46
|
popupClassName?: string;
|
|
47
|
+
/** Pass to `UniqueProvider` FloatBg */
|
|
48
|
+
uniqueBgClassName?: string;
|
|
49
|
+
/** Pass to `UniqueProvider` FloatBg */
|
|
50
|
+
uniqueBgStyle?: React.CSSProperties;
|
|
47
51
|
popupStyle?: React.CSSProperties;
|
|
48
52
|
getPopupClassNameFromAlign?: (align: AlignType) => string;
|
|
49
53
|
onPopupClick?: React.MouseEventHandler<HTMLDivElement>;
|
package/es/index.js
CHANGED
|
@@ -54,6 +54,8 @@ export function generateTrigger(PortalComponent = Portal) {
|
|
|
54
54
|
// Popup
|
|
55
55
|
popup,
|
|
56
56
|
popupClassName,
|
|
57
|
+
uniqueBgClassName,
|
|
58
|
+
uniqueBgStyle,
|
|
57
59
|
popupStyle,
|
|
58
60
|
popupPlacement,
|
|
59
61
|
builtinPlacements = {},
|
|
@@ -164,6 +166,8 @@ export function generateTrigger(PortalComponent = Portal) {
|
|
|
164
166
|
delay,
|
|
165
167
|
prefixCls,
|
|
166
168
|
popupClassName,
|
|
169
|
+
uniqueBgClassName,
|
|
170
|
+
uniqueBgStyle,
|
|
167
171
|
popupStyle,
|
|
168
172
|
popupPlacement,
|
|
169
173
|
builtinPlacements,
|
|
@@ -22,7 +22,9 @@ const FloatBg = props => {
|
|
|
22
22
|
offsetX,
|
|
23
23
|
offsetY,
|
|
24
24
|
popupSize,
|
|
25
|
-
motion
|
|
25
|
+
motion,
|
|
26
|
+
uniqueBgClassName,
|
|
27
|
+
uniqueBgStyle
|
|
26
28
|
} = props;
|
|
27
29
|
const floatBgCls = `${prefixCls}-float-bg`;
|
|
28
30
|
const [motionVisible, setMotionVisible] = _react.default.useState(false);
|
|
@@ -53,7 +55,7 @@ const FloatBg = props => {
|
|
|
53
55
|
className: motionClassName,
|
|
54
56
|
style: motionStyle
|
|
55
57
|
}) => {
|
|
56
|
-
const cls = (0, _classnames.default)(floatBgCls, motionClassName, {
|
|
58
|
+
const cls = (0, _classnames.default)(floatBgCls, motionClassName, uniqueBgClassName, {
|
|
57
59
|
[`${floatBgCls}-visible`]: motionVisible
|
|
58
60
|
});
|
|
59
61
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -61,7 +63,8 @@ const FloatBg = props => {
|
|
|
61
63
|
style: {
|
|
62
64
|
...offsetStyle,
|
|
63
65
|
...sizeStyle,
|
|
64
|
-
...motionStyle
|
|
66
|
+
...motionStyle,
|
|
67
|
+
...uniqueBgStyle
|
|
65
68
|
}
|
|
66
69
|
});
|
|
67
70
|
});
|
|
@@ -157,7 +157,9 @@ const UniqueProvider = ({
|
|
|
157
157
|
offsetX: offsetX,
|
|
158
158
|
offsetY: offsetY,
|
|
159
159
|
popupSize: popupSize,
|
|
160
|
-
motion: options.popupMotion
|
|
160
|
+
motion: options.popupMotion,
|
|
161
|
+
uniqueBgClassName: options.uniqueBgClassName,
|
|
162
|
+
uniqueBgStyle: options.uniqueBgStyle
|
|
161
163
|
}))));
|
|
162
164
|
};
|
|
163
165
|
var _default = exports.default = UniqueProvider;
|
package/lib/context.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface UniqueShowOptions {
|
|
|
14
14
|
delay: number;
|
|
15
15
|
prefixCls?: string;
|
|
16
16
|
popupClassName?: string;
|
|
17
|
+
uniqueBgClassName?: string;
|
|
18
|
+
uniqueBgStyle?: React.CSSProperties;
|
|
17
19
|
popupStyle?: React.CSSProperties;
|
|
18
20
|
popupPlacement?: string;
|
|
19
21
|
builtinPlacements?: BuildInPlacements;
|
package/lib/index.d.ts
CHANGED
|
@@ -44,6 +44,10 @@ export interface TriggerProps {
|
|
|
44
44
|
builtinPlacements?: BuildInPlacements;
|
|
45
45
|
popupAlign?: AlignType;
|
|
46
46
|
popupClassName?: string;
|
|
47
|
+
/** Pass to `UniqueProvider` FloatBg */
|
|
48
|
+
uniqueBgClassName?: string;
|
|
49
|
+
/** Pass to `UniqueProvider` FloatBg */
|
|
50
|
+
uniqueBgStyle?: React.CSSProperties;
|
|
47
51
|
popupStyle?: React.CSSProperties;
|
|
48
52
|
getPopupClassNameFromAlign?: (align: AlignType) => string;
|
|
49
53
|
onPopupClick?: React.MouseEventHandler<HTMLDivElement>;
|
package/lib/index.js
CHANGED
|
@@ -69,6 +69,8 @@ function generateTrigger(PortalComponent = _portal.default) {
|
|
|
69
69
|
// Popup
|
|
70
70
|
popup,
|
|
71
71
|
popupClassName,
|
|
72
|
+
uniqueBgClassName,
|
|
73
|
+
uniqueBgStyle,
|
|
72
74
|
popupStyle,
|
|
73
75
|
popupPlacement,
|
|
74
76
|
builtinPlacements = {},
|
|
@@ -179,6 +181,8 @@ function generateTrigger(PortalComponent = _portal.default) {
|
|
|
179
181
|
delay,
|
|
180
182
|
prefixCls,
|
|
181
183
|
popupClassName,
|
|
184
|
+
uniqueBgClassName,
|
|
185
|
+
uniqueBgStyle,
|
|
182
186
|
popupStyle,
|
|
183
187
|
popupPlacement,
|
|
184
188
|
builtinPlacements,
|