@elliemae/ds-popperjs 3.0.0-alpha.0 → 3.0.0-alpha.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/dist/cjs/PopoverContent.js +17 -4
- package/dist/cjs/PopoverContent.js.map +1 -1
- package/dist/cjs/config/useConfiguredDefaultProps.js +18 -1
- package/dist/cjs/config/useConfiguredDefaultProps.js.map +1 -1
- package/dist/cjs/index.js +15 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/PopoverContent.js +19 -4
- package/dist/esm/PopoverContent.js.map +1 -1
- package/dist/esm/config/useConfiguredDefaultProps.js +20 -1
- package/dist/esm/config/useConfiguredDefaultProps.js.map +1 -1
- package/dist/esm/index.js +17 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/types/PopoverArrow.d.ts +0 -8
- package/dist/types/PopoverContent.d.ts +0 -3
- package/dist/types/config/useConfigDSPopperjs.d.ts +0 -2
- package/dist/types/config/useConfiguredDefaultModifiers.d.ts +0 -6
- package/dist/types/config/useConfiguredDefaultProps.d.ts +0 -19
- package/dist/types/config/useConfiguredMergedProps.d.ts +0 -19
- package/dist/types/index.d.ts +0 -58
- package/dist/types/propTypes.d.ts +0 -95
- package/dist/types/styled.d.ts +0 -11
- package/dist/types/utils/hooks/useOnClickOutside.d.ts +0 -4
|
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
7
21
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
22
|
var __export = (target, all) => {
|
|
9
23
|
for (var name in all)
|
|
@@ -60,12 +74,11 @@ const PopoverContent = ({
|
|
|
60
74
|
ref: setArrowElement,
|
|
61
75
|
style: arrowStyle
|
|
62
76
|
})) : null), [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement]);
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styled.StyledPopoverContentWrapper, {
|
|
77
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styled.StyledPopoverContentWrapper, __spreadValues({
|
|
64
78
|
zIndex,
|
|
65
79
|
ref: setPopperElement,
|
|
66
|
-
style: popperStyles
|
|
67
|
-
|
|
68
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_styled.StyledAnimatedPopper, {
|
|
80
|
+
style: popperStyles
|
|
81
|
+
}, popperAttributes), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledAnimatedPopper, {
|
|
69
82
|
showPopover,
|
|
70
83
|
animationDuration,
|
|
71
84
|
withoutAnimation,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/PopoverContent.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport { PopoverArrow } from './PopoverArrow';\nimport type { PopoverContentPropsT } from './index.d';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled';\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <StyledPopoverContentWrapper zIndex={zIndex} ref={setPopperElement} style={popperStyles} {...popperAttributes}>\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4C;AAC5C,0BAA6B;AAE7B,oBAAkE;AAE3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACuC;AACvC,QAAM,uBAAuB,8BAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe;AAAA;AAAA,KAEhB,CAAC,aAAa,kBAAkB;AAEnC,QAAM,gBAAgB,0BACpB,MACE,wFACG,UACA,iBAAiB,QAChB,wFACE,mDAAC,kCAAD;AAAA,IACE,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,WAAW,mBAAmB,iBAAiB,2BAA2B;AAAA,MAE5E,mDAAC,OAAD;AAAA,IAAK,KAAK;AAAA,IAAiB,OAAO;AAAA,QAElC,OAGR,CAAC,UAAU,cAAc,YAAY,kBAAkB;AAEzD,SACE,mDAAC,2CAAD;AAAA,IAA6B;AAAA,IAAgB,KAAK;AAAA,IAAkB,OAAO;AAAA,KAAkB,mBAC3F,mDAAC,oCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,KAEf;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7
24
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
25
|
var __export = (target, all) => {
|
|
9
26
|
for (var name in all)
|
|
@@ -55,7 +72,7 @@ const useConfiguredDefaultProps = ({ props, arrowElement }) => {
|
|
|
55
72
|
props,
|
|
56
73
|
arrowElement
|
|
57
74
|
});
|
|
58
|
-
const defaultProps = (0, import_react.useMemo)(() => ({
|
|
75
|
+
const defaultProps = (0, import_react.useMemo)(() => __spreadProps(__spreadValues({}, staticDefaultProps), { modifiers: configuredModifiers }), [configuredModifiers, staticDefaultProps]);
|
|
59
76
|
return defaultProps;
|
|
60
77
|
};
|
|
61
78
|
module.exports = __toCommonJS(useConfiguredDefaultProps_exports);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useConfiguredDefaultProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useMemo } from 'react';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n zIndex: 1,\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AACxB,2CAA8C;AAG9C,MAAM,OAAO,MAAM;AAAA;AAEnB,MAAM,WAAW;AAEV,MAAM,4BAA4B,CAAC,EAAE,OAAO,mBAAmB;AAEpE,QAAM,qBAAqB,0BACzB,MAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,0BAA0B,CAAC,OAAO,UAAU,QAAQ;AAAA,IACpD,QAAQ;AAAA,IACR,mBAAmB;AAAA,MAErB;AAEF,QAAM,EAAE,WAAW,wBAAwB,wEAA8B;AAAA,IACvE;AAAA,IACA;AAAA;AAGF,QAAM,eAAe,0BACnB,MAAO,iCAAK,qBAAL,EAAyB,WAAW,wBAC3C,CAAC,qBAAqB;AAGxB,SAAO;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
7
21
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
22
|
var __export = (target, all) => {
|
|
9
23
|
for (var name in all)
|
|
@@ -60,7 +74,7 @@ const DSPopperJS = (props) => {
|
|
|
60
74
|
const { styles, attributes } = popoverHelper;
|
|
61
75
|
const contentJSX = (0, import_react.useMemo)(() => /* @__PURE__ */ import_react.default.createElement(import_PopoverContent.PopoverContent, {
|
|
62
76
|
setPopperElement,
|
|
63
|
-
popperStyles: {
|
|
77
|
+
popperStyles: __spreadValues(__spreadValues({}, styles.popper), extraPopperStyles),
|
|
64
78
|
popperAttributes: attributes.popper,
|
|
65
79
|
setArrowElement,
|
|
66
80
|
arrowStyle: styles.arrow,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from 'react-desc';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\n\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+B;AAC/B,uBAA6B;AAC7B,wBAAyB;AACzB,uBAAoC;AACpC,4BAA+B;AAC/B,iCAAoC;AAGpC,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oDAAoB;AACxB,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,0BACjB,MACE,mDAAC,sCAAD;AAAA,IACE;AAAA,IACA,cAAc,kCAAK,OAAO,SAAW;AAAA,IACrC,kBAAkB,WAAW;AAAA,IAC7B;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,WAGL;AAAA,IACE,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGJ,MAAI,eAAe,aAAa;AAC9B,QAAI,kBAAkB;AAAM,aAAO;AACnC,QAAI,kBAAkB;AAAO,aAAO,wFAAG,mCAAa,wFAAG,aAAgB;AAAA;AAEzE,SAAO;AAAA;AAGT,WAAW,YAAY;AAEvB,MAAM,uBAAuB,gCAAS,YAAY,YAAY;AAC9D,qBAAqB,YAAY;AAGjC,IAAO,cAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import * as React from "react";
|
|
2
18
|
import React2, { useCallback, useMemo } from "react";
|
|
3
19
|
import { PopoverArrow } from "./PopoverArrow";
|
|
@@ -29,12 +45,11 @@ const PopoverContent = ({
|
|
|
29
45
|
ref: setArrowElement,
|
|
30
46
|
style: arrowStyle
|
|
31
47
|
})) : null), [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement]);
|
|
32
|
-
return /* @__PURE__ */ React2.createElement(StyledPopoverContentWrapper, {
|
|
48
|
+
return /* @__PURE__ */ React2.createElement(StyledPopoverContentWrapper, __spreadValues({
|
|
33
49
|
zIndex,
|
|
34
50
|
ref: setPopperElement,
|
|
35
|
-
style: popperStyles
|
|
36
|
-
|
|
37
|
-
}, /* @__PURE__ */ React2.createElement(StyledAnimatedPopper, {
|
|
51
|
+
style: popperStyles
|
|
52
|
+
}, popperAttributes), /* @__PURE__ */ React2.createElement(StyledAnimatedPopper, {
|
|
38
53
|
showPopover,
|
|
39
54
|
animationDuration,
|
|
40
55
|
withoutAnimation,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/PopoverContent.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo } from 'react';\nimport { PopoverArrow } from './PopoverArrow';\nimport type { PopoverContentPropsT } from './index.d';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled';\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <StyledPopoverContentWrapper zIndex={zIndex} ref={setPopperElement} style={popperStyles} {...popperAttributes}>\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEA;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACuC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe;AAAA;AAAA,KAEhB,CAAC,aAAa,kBAAkB;AAEnC,QAAM,gBAAgB,QACpB,MACE,4DACG,UACA,iBAAiB,QAChB,4DACE,qCAAC,cAAD;AAAA,IACE,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,WAAW,mBAAmB,iBAAiB,2BAA2B;AAAA,MAE5E,qCAAC,OAAD;AAAA,IAAK,KAAK;AAAA,IAAiB,OAAO;AAAA,QAElC,OAGR,CAAC,UAAU,cAAc,YAAY,kBAAkB;AAEzD,SACE,qCAAC,6BAAD;AAAA,IAA6B;AAAA,IAAgB,KAAK;AAAA,IAAkB,OAAO;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAEA;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACuC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe;AAAA;AAAA,KAEhB,CAAC,aAAa,kBAAkB;AAEnC,QAAM,gBAAgB,QACpB,MACE,4DACG,UACA,iBAAiB,QAChB,4DACE,qCAAC,cAAD;AAAA,IACE,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,WAAW,mBAAmB,iBAAiB,2BAA2B;AAAA,MAE5E,qCAAC,OAAD;AAAA,IAAK,KAAK;AAAA,IAAiB,OAAO;AAAA,QAElC,OAGR,CAAC,UAAU,cAAc,YAAY,kBAAkB;AAEzD,SACE,qCAAC,6BAAD;AAAA,IAA6B;AAAA,IAAgB,KAAK;AAAA,IAAkB,OAAO;AAAA,KAAkB,mBAC3F,qCAAC,sBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,KAEf;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import * as React from "react";
|
|
2
21
|
import { useMemo } from "react";
|
|
3
22
|
import { useConfiguredDefaultModifiers } from "./useConfiguredDefaultModifiers";
|
|
@@ -24,7 +43,7 @@ const useConfiguredDefaultProps = ({ props, arrowElement }) => {
|
|
|
24
43
|
props,
|
|
25
44
|
arrowElement
|
|
26
45
|
});
|
|
27
|
-
const defaultProps = useMemo(() => ({
|
|
46
|
+
const defaultProps = useMemo(() => __spreadProps(__spreadValues({}, staticDefaultProps), { modifiers: configuredModifiers }), [configuredModifiers, staticDefaultProps]);
|
|
28
47
|
return defaultProps;
|
|
29
48
|
};
|
|
30
49
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useConfiguredDefaultProps.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n zIndex: 1,\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,OAAO,MAAM;AAAA;AAEnB,MAAM,WAAW;AAEV,MAAM,4BAA4B,CAAC,EAAE,OAAO,mBAAmB;AAEpE,QAAM,qBAAqB,QACzB,MAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,0BAA0B,CAAC,OAAO,UAAU,QAAQ;AAAA,IACpD,QAAQ;AAAA,IACR,mBAAmB;AAAA,MAErB;AAEF,QAAM,EAAE,WAAW,wBAAwB,8BAA8B;AAAA,IACvE;AAAA,IACA;AAAA;AAGF,QAAM,eAAe,QACnB,MAAO,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAGA,MAAM,OAAO,MAAM;AAAA;AAEnB,MAAM,WAAW;AAEV,MAAM,4BAA4B,CAAC,EAAE,OAAO,mBAAmB;AAEpE,QAAM,qBAAqB,QACzB,MAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,0BAA0B,CAAC,OAAO,UAAU,QAAQ;AAAA,IACpD,QAAQ;AAAA,IACR,mBAAmB;AAAA,MAErB;AAEF,QAAM,EAAE,WAAW,wBAAwB,8BAA8B;AAAA,IACvE;AAAA,IACA;AAAA;AAGF,QAAM,eAAe,QACnB,MAAO,iCAAK,qBAAL,EAAyB,WAAW,wBAC3C,CAAC,qBAAqB;AAGxB,SAAO;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import * as React from "react";
|
|
2
18
|
import React2, { useMemo } from "react";
|
|
3
19
|
import { createPortal } from "react-dom";
|
|
@@ -27,7 +43,7 @@ const DSPopperJS = (props) => {
|
|
|
27
43
|
const { styles, attributes } = popoverHelper;
|
|
28
44
|
const contentJSX = useMemo(() => /* @__PURE__ */ React2.createElement(PopoverContent, {
|
|
29
45
|
setPopperElement,
|
|
30
|
-
popperStyles: {
|
|
46
|
+
popperStyles: __spreadValues(__spreadValues({}, styles.popper), extraPopperStyles),
|
|
31
47
|
popperAttributes: attributes.popper,
|
|
32
48
|
setArrowElement,
|
|
33
49
|
arrowStyle: styles.arrow,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from 'react-desc';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\n\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oBAAoB;AACxB,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,QACjB,MACE,qCAAC,gBAAD;AAAA,IACE;AAAA,IACA,cAAc,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oBAAoB;AACxB,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,QACjB,MACE,qCAAC,gBAAD;AAAA,IACE;AAAA,IACA,cAAc,kCAAK,OAAO,SAAW;AAAA,IACrC,kBAAkB,WAAW;AAAA,IAC7B;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,WAGL;AAAA,IACE,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGJ,MAAI,eAAe,aAAa;AAC9B,QAAI,kBAAkB;AAAM,aAAO;AACnC,QAAI,kBAAkB;AAAO,aAAO,4DAAG,aAAa,4DAAG,aAAgB;AAAA;AAEzE,SAAO;AAAA;AAGT,WAAW,YAAY;AAEvB,MAAM,uBAAuB,SAAS,YAAY,YAAY;AAC9D,qBAAqB,YAAY;AAGjC,IAAO,cAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-popperjs",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Popper JS Wrapper",
|
|
6
6
|
"files": [
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"indent": 4
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@elliemae/ds-props-helpers": "3.0.0-alpha.
|
|
75
|
-
"@elliemae/ds-system": "3.0.0-alpha.
|
|
74
|
+
"@elliemae/ds-props-helpers": "3.0.0-alpha.1",
|
|
75
|
+
"@elliemae/ds-system": "3.0.0-alpha.1",
|
|
76
76
|
"react-desc": "~4.1.3",
|
|
77
77
|
"react-popper": "~2.2.5"
|
|
78
78
|
},
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
93
93
|
"test": "node ../../scripts/testing/test.mjs",
|
|
94
94
|
"lint": "node ../../scripts/lint.mjs",
|
|
95
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
95
96
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface PopoverArrowT {
|
|
3
|
-
placement: string;
|
|
4
|
-
style: React.CSSProperties;
|
|
5
|
-
arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement>>;
|
|
6
|
-
}
|
|
7
|
-
export declare const PopoverArrow: ({ placement, style, arrowElementRef }: PopoverArrowT) => React.ReactElement;
|
|
8
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PopoverContentPropsT } from './index.d';
|
|
3
|
-
export declare const PopoverContent: ({ setPopperElement, popperStyles, popperAttributes, children, showPopover, setArrowElement, setIsAnimating, arrowStyle, withoutArrow, withoutAnimation, animationDuration, zIndex, }: PopoverContentPropsT) => JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const useConfiguredDefaultProps: ({ props, arrowElement }: {
|
|
2
|
-
props: any;
|
|
3
|
-
arrowElement: any;
|
|
4
|
-
}) => {
|
|
5
|
-
modifiers: any;
|
|
6
|
-
referenceElement: null;
|
|
7
|
-
showPopover: boolean;
|
|
8
|
-
closeContextMenu: () => void;
|
|
9
|
-
onClickOutside: () => void;
|
|
10
|
-
withoutPortal: boolean;
|
|
11
|
-
withoutArrow: boolean;
|
|
12
|
-
withoutAnimation: boolean;
|
|
13
|
-
animationDuration: number;
|
|
14
|
-
portalDOMContainer: HTMLElement;
|
|
15
|
-
startPlacementPreference: string;
|
|
16
|
-
placementOrderPreference: string[];
|
|
17
|
-
zIndex: number;
|
|
18
|
-
extraPopperStyles: {};
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const useConfiguredMergedProps: ({ props, arrowElement }: {
|
|
2
|
-
props: any;
|
|
3
|
-
arrowElement: any;
|
|
4
|
-
}) => {
|
|
5
|
-
modifiers: any;
|
|
6
|
-
referenceElement: null;
|
|
7
|
-
showPopover: boolean;
|
|
8
|
-
closeContextMenu: () => void;
|
|
9
|
-
onClickOutside: () => void;
|
|
10
|
-
withoutPortal: boolean;
|
|
11
|
-
withoutArrow: boolean;
|
|
12
|
-
withoutAnimation: boolean;
|
|
13
|
-
animationDuration: number;
|
|
14
|
-
portalDOMContainer: HTMLElement;
|
|
15
|
-
startPlacementPreference: string;
|
|
16
|
-
placementOrderPreference: string[];
|
|
17
|
-
zIndex: number;
|
|
18
|
-
extraPopperStyles: {};
|
|
19
|
-
};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
import type { DSDSPopperjsPropsT } from './index.d';
|
|
4
|
-
declare const DSPopperJS: {
|
|
5
|
-
(props: DSDSPopperjsPropsT): JSX.Element;
|
|
6
|
-
propTypes: {
|
|
7
|
-
referenceElement: import("react-desc").PropTypesDescValue;
|
|
8
|
-
showPopover: import("react-desc").PropTypesDescValue;
|
|
9
|
-
closeContextMenu: {
|
|
10
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
-
};
|
|
12
|
-
withoutPortal: {
|
|
13
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
-
};
|
|
15
|
-
withoutArrow: {
|
|
16
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
-
};
|
|
18
|
-
withoutAnimation: {
|
|
19
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
|
-
};
|
|
21
|
-
animationDuration: {
|
|
22
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
-
};
|
|
24
|
-
boundaryElement: {
|
|
25
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
-
};
|
|
27
|
-
portalDOMContainer: {
|
|
28
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
-
};
|
|
30
|
-
startPlacementPreference: {
|
|
31
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
32
|
-
};
|
|
33
|
-
placementOrderPreference: {
|
|
34
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
-
};
|
|
36
|
-
zIndex: {
|
|
37
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
-
};
|
|
39
|
-
customOffset: {
|
|
40
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
-
};
|
|
42
|
-
modifiers: {
|
|
43
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
-
};
|
|
45
|
-
extraPopperStyles: {
|
|
46
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
-
};
|
|
48
|
-
onClickOutside: {
|
|
49
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
50
|
-
};
|
|
51
|
-
children: {
|
|
52
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
declare const DSPopperJSWithSchema: any;
|
|
57
|
-
export { DSPopperJS, DSPopperJSWithSchema };
|
|
58
|
-
export default DSPopperJS;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
export declare const dspopperjsPropTypes: {
|
|
3
|
-
/**
|
|
4
|
-
* React ref to popperjs referenceElement
|
|
5
|
-
*/
|
|
6
|
-
referenceElement: import("react-desc").PropTypesDescValue;
|
|
7
|
-
/**
|
|
8
|
-
* Wheter or not to show the popper content
|
|
9
|
-
*/
|
|
10
|
-
showPopover: import("react-desc").PropTypesDescValue;
|
|
11
|
-
/**
|
|
12
|
-
* Callback to close the context menu, used for "on click outside",
|
|
13
|
-
* if not provided click outside will not trigger anything
|
|
14
|
-
*/
|
|
15
|
-
closeContextMenu: {
|
|
16
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Wheter or not the popper content should appear in a DOM portal or not
|
|
20
|
-
*/
|
|
21
|
-
withoutPortal: {
|
|
22
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Wheter or not the popper context menu should print the arrow
|
|
26
|
-
*/
|
|
27
|
-
withoutArrow: {
|
|
28
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Whether or not the popper context menu should be animated
|
|
32
|
-
*/
|
|
33
|
-
withoutAnimation: {
|
|
34
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Popper context menus Animation duration in ms
|
|
38
|
-
*/
|
|
39
|
-
animationDuration: {
|
|
40
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Bounding element to calculate upon, defaults to it is "clippingParents",
|
|
44
|
-
* which are the scrolling containers that may cause the element to be partially or fully cut off.
|
|
45
|
-
*/
|
|
46
|
-
boundaryElement: {
|
|
47
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* When using portal, the container in which to append the DOM content, defaults to document body
|
|
51
|
-
*/
|
|
52
|
-
portalDOMContainer: {
|
|
53
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* start placement preferences, as per popperjs placement option
|
|
57
|
-
*/
|
|
58
|
-
startPlacementPreference: {
|
|
59
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Array of placement preferences, as per popperjs "flip" placement option
|
|
63
|
-
*/
|
|
64
|
-
placementOrderPreference: {
|
|
65
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* popperjs content z-index
|
|
69
|
-
*/
|
|
70
|
-
zIndex: {
|
|
71
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* placement offset array
|
|
75
|
-
*/
|
|
76
|
-
customOffset: {
|
|
77
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* modifiers array for full-custom popper-js override
|
|
81
|
-
* https://popper.js.org/docs/v2/modifiers/
|
|
82
|
-
*/
|
|
83
|
-
modifiers: {
|
|
84
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
85
|
-
};
|
|
86
|
-
extraPopperStyles: {
|
|
87
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
88
|
-
};
|
|
89
|
-
onClickOutside: {
|
|
90
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
91
|
-
};
|
|
92
|
-
children: {
|
|
93
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
94
|
-
};
|
|
95
|
-
};
|
package/dist/types/styled.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface StyledContentWrapperPropsT {
|
|
2
|
-
zIndex: number;
|
|
3
|
-
}
|
|
4
|
-
interface StyledAnimatedPopperPropsT {
|
|
5
|
-
showPopover: boolean;
|
|
6
|
-
animationDuration: number;
|
|
7
|
-
withoutAnimation: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const StyledPopoverContentWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledContentWrapperPropsT, never>;
|
|
10
|
-
export declare const StyledAnimatedPopper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledAnimatedPopperPropsT, never>;
|
|
11
|
-
export {};
|