@rc-component/trigger 1.15.6 → 1.16.1
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/Popup/index.js +3 -3
- package/es/interface.d.ts +5 -6
- package/lib/Popup/index.js +3 -3
- package/lib/interface.d.ts +5 -6
- package/package.json +1 -1
package/es/Popup/index.js
CHANGED
|
@@ -79,9 +79,9 @@ var Popup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
79
79
|
|
|
80
80
|
// Set align style
|
|
81
81
|
if (ready || !open) {
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
var dynamicInset = _experimental === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset;
|
|
82
|
+
var _experimental;
|
|
83
|
+
var points = align.points;
|
|
84
|
+
var dynamicInset = align.dynamicInset || ((_experimental = align._experimental) === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset);
|
|
85
85
|
var alignRight = dynamicInset && points[0][1] === 'r';
|
|
86
86
|
var alignBottom = dynamicInset && points[0][0] === 'b';
|
|
87
87
|
if (alignRight) {
|
package/es/interface.d.ts
CHANGED
|
@@ -15,12 +15,7 @@ export interface AlignType {
|
|
|
15
15
|
/**
|
|
16
16
|
* @private Do not use in your production code
|
|
17
17
|
*/
|
|
18
|
-
_experimental?:
|
|
19
|
-
/**
|
|
20
|
-
* @private Do not use in your production code. Auto adjust align logic
|
|
21
|
-
*/
|
|
22
|
-
dynamicInset?: boolean;
|
|
23
|
-
};
|
|
18
|
+
_experimental?: Record<string, any>;
|
|
24
19
|
/**
|
|
25
20
|
* offset source node by offset[0] in x and offset[1] in y.
|
|
26
21
|
* If offset contains percentage string value, it is relative to sourceNode region.
|
|
@@ -56,6 +51,10 @@ export interface AlignType {
|
|
|
56
51
|
* Similar to `visible`, but if `visible` region not satisfy, fallback to `scroll`.
|
|
57
52
|
*/
|
|
58
53
|
htmlRegion?: 'visible' | 'scroll' | 'visibleFirst';
|
|
54
|
+
/**
|
|
55
|
+
* Auto chose position with `top` or `bottom` by the align result
|
|
56
|
+
*/
|
|
57
|
+
dynamicInset?: boolean;
|
|
59
58
|
/**
|
|
60
59
|
* Whether use css right instead of left to position
|
|
61
60
|
*/
|
package/lib/Popup/index.js
CHANGED
|
@@ -87,9 +87,9 @@ var Popup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
87
87
|
|
|
88
88
|
// Set align style
|
|
89
89
|
if (ready || !open) {
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
var dynamicInset = _experimental === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset;
|
|
90
|
+
var _experimental;
|
|
91
|
+
var points = align.points;
|
|
92
|
+
var dynamicInset = align.dynamicInset || ((_experimental = align._experimental) === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset);
|
|
93
93
|
var alignRight = dynamicInset && points[0][1] === 'r';
|
|
94
94
|
var alignBottom = dynamicInset && points[0][0] === 'b';
|
|
95
95
|
if (alignRight) {
|
package/lib/interface.d.ts
CHANGED
|
@@ -15,12 +15,7 @@ export interface AlignType {
|
|
|
15
15
|
/**
|
|
16
16
|
* @private Do not use in your production code
|
|
17
17
|
*/
|
|
18
|
-
_experimental?:
|
|
19
|
-
/**
|
|
20
|
-
* @private Do not use in your production code. Auto adjust align logic
|
|
21
|
-
*/
|
|
22
|
-
dynamicInset?: boolean;
|
|
23
|
-
};
|
|
18
|
+
_experimental?: Record<string, any>;
|
|
24
19
|
/**
|
|
25
20
|
* offset source node by offset[0] in x and offset[1] in y.
|
|
26
21
|
* If offset contains percentage string value, it is relative to sourceNode region.
|
|
@@ -56,6 +51,10 @@ export interface AlignType {
|
|
|
56
51
|
* Similar to `visible`, but if `visible` region not satisfy, fallback to `scroll`.
|
|
57
52
|
*/
|
|
58
53
|
htmlRegion?: 'visible' | 'scroll' | 'visibleFirst';
|
|
54
|
+
/**
|
|
55
|
+
* Auto chose position with `top` or `bottom` by the align result
|
|
56
|
+
*/
|
|
57
|
+
dynamicInset?: boolean;
|
|
59
58
|
/**
|
|
60
59
|
* Whether use css right instead of left to position
|
|
61
60
|
*/
|