@elliemae/ds-popper 3.0.0-next.1 → 3.0.0-next.13
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/dist/cjs/DSPopper.js +117 -0
- package/dist/cjs/DSPopper.js.map +7 -0
- package/dist/cjs/PopperContent.js +158 -0
- package/dist/cjs/PopperContent.js.map +7 -0
- package/dist/cjs/PopperImpl.js +281 -0
- package/dist/cjs/PopperImpl.js.map +7 -0
- package/dist/cjs/getArrowStylesBySize.js +73 -0
- package/dist/cjs/getArrowStylesBySize.js.map +7 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/interaction.js +40 -0
- package/dist/cjs/interaction.js.map +7 -0
- package/dist/cjs/positions.js +69 -0
- package/dist/cjs/positions.js.map +7 -0
- package/dist/cjs/props.js +89 -0
- package/dist/cjs/props.js.map +7 -0
- package/dist/esm/DSPopper.js +88 -0
- package/dist/esm/DSPopper.js.map +7 -0
- package/dist/esm/PopperContent.js +131 -0
- package/dist/esm/PopperContent.js.map +7 -0
- package/{esm → dist/esm}/PopperImpl.js +75 -143
- package/dist/esm/PopperImpl.js.map +7 -0
- package/dist/esm/getArrowStylesBySize.js +46 -0
- package/dist/esm/getArrowStylesBySize.js.map +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/interaction.js +11 -0
- package/dist/esm/interaction.js.map +7 -0
- package/dist/esm/positions.js +40 -0
- package/dist/esm/positions.js.map +7 -0
- package/dist/esm/props.js +60 -0
- package/dist/esm/props.js.map +7 -0
- package/package.json +42 -33
- package/cjs/DSPopper.js +0 -97
- package/cjs/PopperContent.js +0 -156
- package/cjs/PopperImpl.js +0 -335
- package/cjs/getArrowStylesBySize.js +0 -46
- package/cjs/index.js +0 -19
- package/cjs/interaction.js +0 -12
- package/cjs/positions.js +0 -25
- package/cjs/props.js +0 -88
- package/esm/DSPopper.js +0 -83
- package/esm/PopperContent.js +0 -147
- package/esm/getArrowStylesBySize.js +0 -37
- package/esm/index.js +0 -4
- package/esm/interaction.js +0 -7
- package/esm/positions.js +0 -20
- package/esm/props.js +0 -83
- package/types/DSPopper.d.ts +0 -188
- package/types/PopperContent.d.ts +0 -21
- package/types/PopperImpl.d.ts +0 -52
- package/types/getArrowStylesBySize.d.ts +0 -2
- package/types/index.d.ts +0 -3
- package/types/interaction.d.ts +0 -5
- package/types/positions.d.ts +0 -18
- package/types/props.d.ts +0 -119
package/esm/PopperContent.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import { PureComponent } from 'react';
|
|
9
|
-
import { Popper } from 'react-popper';
|
|
10
|
-
import { Keyframes, animated } from 'react-spring/renderprops';
|
|
11
|
-
import getComponentFromProps from '@elliemae/ds-utilities/getComponentFromProps';
|
|
12
|
-
import DSOverlay from '@elliemae/ds-overlay';
|
|
13
|
-
import { getArrowStylesBySize } from './getArrowStylesBySize.js';
|
|
14
|
-
import { jsx } from 'react/jsx-runtime';
|
|
15
|
-
|
|
16
|
-
var _svg;
|
|
17
|
-
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
const Content = Keyframes.Spring({});
|
|
22
|
-
class PopperContent extends PureComponent {
|
|
23
|
-
// eslint-disable-next-line react/static-property-placement
|
|
24
|
-
constructor(props) {
|
|
25
|
-
super(props);
|
|
26
|
-
this.renderContent = this.renderContent.bind(this);
|
|
27
|
-
this.renderArrow = this.renderArrow.bind(this);
|
|
28
|
-
this.handleRestAnimation = this.handleRestAnimation.bind(this);
|
|
29
|
-
this.handleRestAnimation = this.handleRestAnimation.bind(this);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
handleRestAnimation() {
|
|
33
|
-
const {
|
|
34
|
-
isOpen,
|
|
35
|
-
onContentDestroyed
|
|
36
|
-
} = this.props;
|
|
37
|
-
|
|
38
|
-
if (!isOpen) {
|
|
39
|
-
onContentDestroyed();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
renderArrow(_ref, placement) {
|
|
44
|
-
let {
|
|
45
|
-
ref,
|
|
46
|
-
style
|
|
47
|
-
} = _ref;
|
|
48
|
-
const {
|
|
49
|
-
blockName,
|
|
50
|
-
showArrow
|
|
51
|
-
} = this.props;
|
|
52
|
-
if (!showArrow) return null;
|
|
53
|
-
return /*#__PURE__*/jsx("div", {
|
|
54
|
-
ref: ref,
|
|
55
|
-
className: "".concat(blockName || 'popper', "__arrow"),
|
|
56
|
-
"data-placement": placement,
|
|
57
|
-
style: _objectSpread(_objectSpread({}, style), getArrowStylesBySize(placement, 25)),
|
|
58
|
-
children: _svg || (_svg = /*#__PURE__*/_jsx("svg", {
|
|
59
|
-
viewBox: "0 0 30 30"
|
|
60
|
-
}, void 0, /*#__PURE__*/_jsx("path", {
|
|
61
|
-
className: "stroke",
|
|
62
|
-
d: "M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z"
|
|
63
|
-
}), /*#__PURE__*/_jsx("path", {
|
|
64
|
-
className: "fill",
|
|
65
|
-
d: "M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"
|
|
66
|
-
})))
|
|
67
|
-
}, "popper-arrow");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
renderContent(_ref2) {
|
|
71
|
-
let {
|
|
72
|
-
ref,
|
|
73
|
-
style,
|
|
74
|
-
placement,
|
|
75
|
-
arrowProps,
|
|
76
|
-
scheduleUpdate,
|
|
77
|
-
outOfBoundaries
|
|
78
|
-
} = _ref2;
|
|
79
|
-
const {
|
|
80
|
-
contentComponent,
|
|
81
|
-
contentStyle,
|
|
82
|
-
isOpen,
|
|
83
|
-
closeAnimationConfig,
|
|
84
|
-
openAnimationConfig,
|
|
85
|
-
onMouseEnter,
|
|
86
|
-
onMouseLeave,
|
|
87
|
-
containerProps,
|
|
88
|
-
zIndex,
|
|
89
|
-
hideIfNotVisible
|
|
90
|
-
} = this.props;
|
|
91
|
-
|
|
92
|
-
const computedStyle = _objectSpread(_objectSpread(_objectSpread({}, style), contentStyle), {}, {
|
|
93
|
-
zIndex
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
97
|
-
"data-placement": placement,
|
|
98
|
-
onMouseEnter: onMouseEnter,
|
|
99
|
-
onMouseLeave: onMouseLeave,
|
|
100
|
-
style: computedStyle,
|
|
101
|
-
"data-testid": "popper-container",
|
|
102
|
-
children: /*#__PURE__*/_jsx(Content, {
|
|
103
|
-
native: true,
|
|
104
|
-
onRest: this.handleRestAnimation,
|
|
105
|
-
state: isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close',
|
|
106
|
-
states: {
|
|
107
|
-
open: _objectSpread(_objectSpread({}, openAnimationConfig), {}, {
|
|
108
|
-
from: closeAnimationConfig.to
|
|
109
|
-
}),
|
|
110
|
-
close: closeAnimationConfig
|
|
111
|
-
}
|
|
112
|
-
}, void 0, animationStyle => /*#__PURE__*/jsx(animated.div, {
|
|
113
|
-
ref: ref,
|
|
114
|
-
style: animationStyle,
|
|
115
|
-
children: getComponentFromProps(contentComponent, {
|
|
116
|
-
scheduleUpdate
|
|
117
|
-
}, [this.renderArrow(arrowProps, placement)])
|
|
118
|
-
}))
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
render() {
|
|
123
|
-
const {
|
|
124
|
-
destroyed = false,
|
|
125
|
-
onClickOutside = () => null,
|
|
126
|
-
placement = 'bottom-start',
|
|
127
|
-
modifiers = {},
|
|
128
|
-
referenceNode,
|
|
129
|
-
usePortal = true
|
|
130
|
-
} = this.props;
|
|
131
|
-
return /*#__PURE__*/_jsx(DSOverlay, {
|
|
132
|
-
isOpen: !destroyed,
|
|
133
|
-
onClickOutside: onClickOutside,
|
|
134
|
-
usePortal: usePortal
|
|
135
|
-
}, void 0, /*#__PURE__*/_jsx(Popper, {
|
|
136
|
-
modifiers: modifiers,
|
|
137
|
-
placement: placement,
|
|
138
|
-
referenceElement: referenceNode
|
|
139
|
-
}, void 0, this.renderContent));
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
PopperContent.defaultProps = {
|
|
144
|
-
onContentDestroyed: () => null
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
export { PopperContent as default };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
|
|
8
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
-
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
12
|
-
const getArrowStylesBySize = function (position) {
|
|
13
|
-
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
|
|
14
|
-
const basePosition = position && position.split('-')[0];
|
|
15
|
-
return _objectSpread({
|
|
16
|
-
borderWidth: size
|
|
17
|
-
}, {
|
|
18
|
-
top: {
|
|
19
|
-
top: '100% !important',
|
|
20
|
-
transform: "rotateZ(".concat(180, "deg)")
|
|
21
|
-
},
|
|
22
|
-
right: {
|
|
23
|
-
right: '100%',
|
|
24
|
-
transform: "rotateZ(".concat(-90, "deg)")
|
|
25
|
-
},
|
|
26
|
-
bottom: {
|
|
27
|
-
bottom: '100%',
|
|
28
|
-
transform: "rotateZ(".concat(0, "deg)")
|
|
29
|
-
},
|
|
30
|
-
left: {
|
|
31
|
-
left: '100%',
|
|
32
|
-
transform: "rotateZ(".concat(90, "deg)")
|
|
33
|
-
}
|
|
34
|
-
}[basePosition]);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { getArrowStylesBySize as default, getArrowStylesBySize };
|
package/esm/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { DSPopper, DSPopperWithSchema, DSPopper as default } from './DSPopper.js';
|
|
2
|
-
export { getArrowStylesBySize } from './getArrowStylesBySize.js';
|
|
3
|
-
export { Interaction as PopperInteractions, interactions } from './interaction.js';
|
|
4
|
-
export { Position as PopperPositions, positions } from './positions.js';
|
package/esm/interaction.js
DELETED
package/esm/positions.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const Position = {
|
|
2
|
-
AUTO: 'auto',
|
|
3
|
-
AUTO_START: 'auto-start',
|
|
4
|
-
AUTO_END: 'auto-end',
|
|
5
|
-
BOTTOM: 'bottom',
|
|
6
|
-
BOTTOM_START: 'bottom-start',
|
|
7
|
-
BOTTOM_END: 'bottom-end',
|
|
8
|
-
LEFT: 'left',
|
|
9
|
-
LEFT_END: 'left-end',
|
|
10
|
-
LEFT_START: 'left-start',
|
|
11
|
-
RIGHT: 'right',
|
|
12
|
-
RIGHT_END: 'right-end',
|
|
13
|
-
RIGHT_START: 'right-start',
|
|
14
|
-
TOP: 'top',
|
|
15
|
-
TOP_START: 'top-start',
|
|
16
|
-
TOP_END: 'top-end'
|
|
17
|
-
};
|
|
18
|
-
const positions = [Position.AUTO_START, Position.AUTO_END, Position.AUTO, Position.TOP_START, Position.TOP, Position.TOP_END, Position.RIGHT_START, Position.RIGHT, Position.RIGHT_END, Position.BOTTOM_START, Position.BOTTOM, Position.BOTTOM_END, Position.LEFT_START, Position.LEFT, Position.LEFT_END];
|
|
19
|
-
|
|
20
|
-
export { Position, positions };
|
package/esm/props.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { PropTypes } from 'react-desc';
|
|
2
|
-
import { Position } from './positions.js';
|
|
3
|
-
import { Interaction } from './interaction.js';
|
|
4
|
-
|
|
5
|
-
const popperProps = {
|
|
6
|
-
/** Hide menu component if trigger component is not visible/scrolled away */
|
|
7
|
-
hideIfNotVisible: PropTypes.bool.description('Hide menu component if trigger component is not visible/scrolled away'),
|
|
8
|
-
|
|
9
|
-
/** props to inject to popper wrapper */
|
|
10
|
-
containerProps: PropTypes.object.description('props to inject to popper wrapper'),
|
|
11
|
-
|
|
12
|
-
/** Space between the arrow and the popup */
|
|
13
|
-
arrowGap: PropTypes.number.description('Space between the arrow and the popup'),
|
|
14
|
-
|
|
15
|
-
/** callback for when menu changes from close to open */
|
|
16
|
-
onOpen: PropTypes.func.description('callback for when menu changes from close to open'),
|
|
17
|
-
|
|
18
|
-
/** callback for when menu changes from open to close */
|
|
19
|
-
onClose: PropTypes.func.description('callback for when menu changes from open to close'),
|
|
20
|
-
|
|
21
|
-
/** Time in ms to delay close of menu */
|
|
22
|
-
delayClose: PropTypes.number.description('Time in ms to delay close of menu'),
|
|
23
|
-
|
|
24
|
-
/** Time in ms to delay open of menu */
|
|
25
|
-
delayOpen: PropTypes.number.description('Time in ms to delay open of menu'),
|
|
26
|
-
|
|
27
|
-
/** callback for when menu changes placement */
|
|
28
|
-
onPlacementChange: PropTypes.func.description('callback for when menu changes placement'),
|
|
29
|
-
|
|
30
|
-
/** Arrow size */
|
|
31
|
-
arrowSize: PropTypes.number.description('Arrow size'),
|
|
32
|
-
|
|
33
|
-
/** Bem blockname for the popper */
|
|
34
|
-
blockName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).description('Bem blockname for the popper'),
|
|
35
|
-
triggerComponent: PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired
|
|
36
|
-
};
|
|
37
|
-
const defaultProps = {
|
|
38
|
-
containerProps: {},
|
|
39
|
-
arrowGap: 8,
|
|
40
|
-
arrowSize: 6,
|
|
41
|
-
blockName: '',
|
|
42
|
-
contentOffset: null,
|
|
43
|
-
contentStyle: null,
|
|
44
|
-
contentComponent: () => null,
|
|
45
|
-
delayClose: 300,
|
|
46
|
-
delayOpen: 200,
|
|
47
|
-
interactionType: Interaction.CLICK,
|
|
48
|
-
onOpen: () => null,
|
|
49
|
-
onClose: () => null,
|
|
50
|
-
onPlacementChange: () => null,
|
|
51
|
-
placement: Position.BOTTOM,
|
|
52
|
-
preventOverflow: 'window',
|
|
53
|
-
showArrow: true,
|
|
54
|
-
closeAnimationConfig: {
|
|
55
|
-
to: {
|
|
56
|
-
transform: 'scale(0.8)',
|
|
57
|
-
opacity: '0'
|
|
58
|
-
},
|
|
59
|
-
config: {
|
|
60
|
-
delay: 80,
|
|
61
|
-
duration: 80
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
openAnimationConfig: {
|
|
65
|
-
to: {
|
|
66
|
-
transform: 'scale(1)',
|
|
67
|
-
opacity: '1'
|
|
68
|
-
},
|
|
69
|
-
config: {
|
|
70
|
-
delay: 80,
|
|
71
|
-
duration: 80
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
usePortal: true,
|
|
75
|
-
triggerComponent: () => null,
|
|
76
|
-
getTargetFromChildren: () => null,
|
|
77
|
-
getContentFromChildren: () => null,
|
|
78
|
-
modifiers: {},
|
|
79
|
-
triggerRef: () => null,
|
|
80
|
-
hideIfNotVisible: false
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export { defaultProps, popperProps };
|
package/types/DSPopper.d.ts
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
import { Position } from './positions';
|
|
4
|
-
import { Interaction } from './interaction';
|
|
5
|
-
declare const DSPopper: {
|
|
6
|
-
({ containerProps, arrowGap, arrowSize, blockName, contentOffset, contentStyle, contentComponent, delayClose, delayOpen, interactionType, isOpen, onOpen, onClose, onPlacementChange, placement, preventOverflow, showArrow, closeAnimationConfig, openAnimationConfig, usePortal, triggerComponent, wrapExtraComponent, getTargetFromChildren, getContentFromChildren, modifiers, triggerRef, children: customPopper, renderReference, referenceNode, zIndex, hideIfNotVisible, }: {
|
|
7
|
-
containerProps: any;
|
|
8
|
-
arrowGap: any;
|
|
9
|
-
arrowSize: any;
|
|
10
|
-
blockName: any;
|
|
11
|
-
contentOffset: any;
|
|
12
|
-
contentStyle: any;
|
|
13
|
-
contentComponent: any;
|
|
14
|
-
delayClose: any;
|
|
15
|
-
delayOpen: any;
|
|
16
|
-
interactionType: any;
|
|
17
|
-
isOpen: any;
|
|
18
|
-
onOpen: any;
|
|
19
|
-
onClose: any;
|
|
20
|
-
onPlacementChange: any;
|
|
21
|
-
placement: any;
|
|
22
|
-
preventOverflow: any;
|
|
23
|
-
showArrow: any;
|
|
24
|
-
closeAnimationConfig: any;
|
|
25
|
-
openAnimationConfig: any;
|
|
26
|
-
usePortal: any;
|
|
27
|
-
triggerComponent: any;
|
|
28
|
-
wrapExtraComponent: any;
|
|
29
|
-
getTargetFromChildren: any;
|
|
30
|
-
getContentFromChildren: any;
|
|
31
|
-
modifiers: any;
|
|
32
|
-
triggerRef: any;
|
|
33
|
-
children: any;
|
|
34
|
-
renderReference: any;
|
|
35
|
-
referenceNode: any;
|
|
36
|
-
zIndex: any;
|
|
37
|
-
hideIfNotVisible: any;
|
|
38
|
-
}): JSX.Element;
|
|
39
|
-
propTypes: {
|
|
40
|
-
hideIfNotVisible: {
|
|
41
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
42
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
43
|
-
};
|
|
44
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
45
|
-
};
|
|
46
|
-
containerProps: {
|
|
47
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
48
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
49
|
-
};
|
|
50
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
51
|
-
};
|
|
52
|
-
arrowGap: {
|
|
53
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
54
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
55
|
-
};
|
|
56
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
57
|
-
};
|
|
58
|
-
onOpen: {
|
|
59
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
60
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
61
|
-
};
|
|
62
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
63
|
-
};
|
|
64
|
-
onClose: {
|
|
65
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
66
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
67
|
-
};
|
|
68
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
69
|
-
};
|
|
70
|
-
delayClose: {
|
|
71
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
72
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
73
|
-
};
|
|
74
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
75
|
-
};
|
|
76
|
-
delayOpen: {
|
|
77
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
78
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
79
|
-
};
|
|
80
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
81
|
-
};
|
|
82
|
-
onPlacementChange: {
|
|
83
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
84
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
85
|
-
};
|
|
86
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
87
|
-
};
|
|
88
|
-
arrowSize: {
|
|
89
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
90
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
91
|
-
};
|
|
92
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
93
|
-
};
|
|
94
|
-
blockName: {
|
|
95
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
96
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
97
|
-
};
|
|
98
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
99
|
-
};
|
|
100
|
-
triggerComponent: import("react-desc").PropTypesDescValue;
|
|
101
|
-
};
|
|
102
|
-
defaultProps: {
|
|
103
|
-
containerProps: {};
|
|
104
|
-
arrowGap: number;
|
|
105
|
-
arrowSize: number;
|
|
106
|
-
blockName: string;
|
|
107
|
-
contentOffset: null;
|
|
108
|
-
contentStyle: null;
|
|
109
|
-
contentComponent: () => null;
|
|
110
|
-
delayClose: number;
|
|
111
|
-
delayOpen: number;
|
|
112
|
-
interactionType: string;
|
|
113
|
-
onOpen: () => null;
|
|
114
|
-
onClose: () => null;
|
|
115
|
-
onPlacementChange: () => null;
|
|
116
|
-
placement: string;
|
|
117
|
-
preventOverflow: string;
|
|
118
|
-
showArrow: boolean;
|
|
119
|
-
closeAnimationConfig: {
|
|
120
|
-
to: {
|
|
121
|
-
transform: string;
|
|
122
|
-
opacity: string;
|
|
123
|
-
};
|
|
124
|
-
config: {
|
|
125
|
-
delay: number;
|
|
126
|
-
duration: number;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
openAnimationConfig: {
|
|
130
|
-
to: {
|
|
131
|
-
transform: string;
|
|
132
|
-
opacity: string;
|
|
133
|
-
};
|
|
134
|
-
config: {
|
|
135
|
-
delay: number;
|
|
136
|
-
duration: number;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
usePortal: boolean;
|
|
140
|
-
triggerComponent: () => null;
|
|
141
|
-
getTargetFromChildren: () => null;
|
|
142
|
-
getContentFromChildren: () => null;
|
|
143
|
-
modifiers: {};
|
|
144
|
-
triggerRef: () => null;
|
|
145
|
-
hideIfNotVisible: boolean;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
declare const DSPopperWithSchema: {
|
|
149
|
-
(props?: {
|
|
150
|
-
containerProps: any;
|
|
151
|
-
arrowGap: any;
|
|
152
|
-
arrowSize: any;
|
|
153
|
-
blockName: any;
|
|
154
|
-
contentOffset: any;
|
|
155
|
-
contentStyle: any;
|
|
156
|
-
contentComponent: any;
|
|
157
|
-
delayClose: any;
|
|
158
|
-
delayOpen: any;
|
|
159
|
-
interactionType: any;
|
|
160
|
-
isOpen: any;
|
|
161
|
-
onOpen: any;
|
|
162
|
-
onClose: any;
|
|
163
|
-
onPlacementChange: any;
|
|
164
|
-
placement: any;
|
|
165
|
-
preventOverflow: any;
|
|
166
|
-
showArrow: any;
|
|
167
|
-
closeAnimationConfig: any;
|
|
168
|
-
openAnimationConfig: any;
|
|
169
|
-
usePortal: any;
|
|
170
|
-
triggerComponent: any;
|
|
171
|
-
wrapExtraComponent: any;
|
|
172
|
-
getTargetFromChildren: any;
|
|
173
|
-
getContentFromChildren: any;
|
|
174
|
-
modifiers: any;
|
|
175
|
-
triggerRef: any;
|
|
176
|
-
children: any;
|
|
177
|
-
renderReference: any;
|
|
178
|
-
referenceNode: any;
|
|
179
|
-
zIndex: any;
|
|
180
|
-
hideIfNotVisible: any;
|
|
181
|
-
} | undefined): JSX.Element;
|
|
182
|
-
propTypes: unknown;
|
|
183
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
184
|
-
};
|
|
185
|
-
export { Interaction as PopperInteractions, Position as PopperPositions, DSPopperWithSchema, DSPopper };
|
|
186
|
-
export { interactions } from './interaction';
|
|
187
|
-
export { positions } from './positions';
|
|
188
|
-
export default DSPopper;
|
package/types/PopperContent.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PureComponent } from 'react';
|
|
2
|
-
export default class PopperContent extends PureComponent {
|
|
3
|
-
static defaultProps: {
|
|
4
|
-
onContentDestroyed: () => null;
|
|
5
|
-
};
|
|
6
|
-
constructor(props: any);
|
|
7
|
-
handleRestAnimation(): void;
|
|
8
|
-
renderArrow({ ref, style }: {
|
|
9
|
-
ref: any;
|
|
10
|
-
style: any;
|
|
11
|
-
}, placement: any): JSX.Element | null;
|
|
12
|
-
renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries, }: {
|
|
13
|
-
ref: any;
|
|
14
|
-
style: any;
|
|
15
|
-
placement: any;
|
|
16
|
-
arrowProps: any;
|
|
17
|
-
scheduleUpdate: any;
|
|
18
|
-
outOfBoundaries: any;
|
|
19
|
-
}): JSX.Element;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|
package/types/PopperImpl.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import { Reference } from 'react-popper';
|
|
3
|
-
import PopperContent from './PopperContent';
|
|
4
|
-
export default class PopperImpl extends Component<any, any> {
|
|
5
|
-
safeIsMounted: boolean;
|
|
6
|
-
handlePopperPlacementChange: (this: any, placement: any) => void;
|
|
7
|
-
constructor(props: any);
|
|
8
|
-
componentDidMount(): void;
|
|
9
|
-
componentDidUpdate(): void;
|
|
10
|
-
componentWillUnmount(): void;
|
|
11
|
-
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
12
|
-
isOpen: any;
|
|
13
|
-
prevPropIsOpen: any;
|
|
14
|
-
} | null;
|
|
15
|
-
getInteractionObject(interaction: any, referenceProps?: {}): {
|
|
16
|
-
handlers?: undefined;
|
|
17
|
-
canClose?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
handlers: {
|
|
20
|
-
onClick: (e: any) => void;
|
|
21
|
-
onMouseEnter?: undefined;
|
|
22
|
-
onPointerEnter?: undefined;
|
|
23
|
-
onMouseLeave?: undefined;
|
|
24
|
-
onPointerLeave?: undefined;
|
|
25
|
-
};
|
|
26
|
-
canClose: () => boolean;
|
|
27
|
-
} | {
|
|
28
|
-
handlers: {
|
|
29
|
-
onMouseEnter: any;
|
|
30
|
-
onPointerEnter: any;
|
|
31
|
-
onMouseLeave: any;
|
|
32
|
-
onPointerLeave: any;
|
|
33
|
-
onClick: (e: any) => void;
|
|
34
|
-
};
|
|
35
|
-
canClose: (isOnTrigger: any, isOnPopper: any) => boolean;
|
|
36
|
-
};
|
|
37
|
-
setOpen(opening: any): void;
|
|
38
|
-
open(): void;
|
|
39
|
-
close(): void;
|
|
40
|
-
handleTriggerClick(e: any): void;
|
|
41
|
-
handleContentMouseEnter(): void;
|
|
42
|
-
handleContentMouseLeave(): void;
|
|
43
|
-
handleMouseEnter(): void;
|
|
44
|
-
handleMouseLeave(): void;
|
|
45
|
-
updatePopoverState(popperData: any): any;
|
|
46
|
-
handleDestroyContent(): void;
|
|
47
|
-
renderTarget({ ref }: {
|
|
48
|
-
ref: any;
|
|
49
|
-
}): any;
|
|
50
|
-
render(): JSX.Element;
|
|
51
|
-
}
|
|
52
|
-
export { Reference, PopperContent };
|
package/types/index.d.ts
DELETED
package/types/interaction.d.ts
DELETED
package/types/positions.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const Position: {
|
|
2
|
-
AUTO: string;
|
|
3
|
-
AUTO_START: string;
|
|
4
|
-
AUTO_END: string;
|
|
5
|
-
BOTTOM: string;
|
|
6
|
-
BOTTOM_START: string;
|
|
7
|
-
BOTTOM_END: string;
|
|
8
|
-
LEFT: string;
|
|
9
|
-
LEFT_END: string;
|
|
10
|
-
LEFT_START: string;
|
|
11
|
-
RIGHT: string;
|
|
12
|
-
RIGHT_END: string;
|
|
13
|
-
RIGHT_START: string;
|
|
14
|
-
TOP: string;
|
|
15
|
-
TOP_START: string;
|
|
16
|
-
TOP_END: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const positions: string[];
|