@elliemae/ds-popper 3.27.0-next.1 → 3.27.0-next.3
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/index.js +3 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +2 -3
- package/package.json +8 -43
- package/dist/cjs/DSPopper.js +0 -124
- package/dist/cjs/DSPopper.js.map +0 -7
- package/dist/cjs/PopperContent.js +0 -154
- package/dist/cjs/PopperContent.js.map +0 -7
- package/dist/cjs/PopperImpl.js +0 -278
- package/dist/cjs/PopperImpl.js.map +0 -7
- package/dist/cjs/getArrowStylesBySize.js +0 -61
- package/dist/cjs/getArrowStylesBySize.js.map +0 -7
- package/dist/cjs/interaction.js +0 -41
- package/dist/cjs/interaction.js.map +0 -7
- package/dist/cjs/positions.js +0 -70
- package/dist/cjs/positions.js.map +0 -7
- package/dist/cjs/props.js +0 -99
- package/dist/cjs/props.js.map +0 -7
- package/dist/esm/DSPopper.js +0 -94
- package/dist/esm/DSPopper.js.map +0 -7
- package/dist/esm/PopperContent.js +0 -124
- package/dist/esm/PopperContent.js.map +0 -7
- package/dist/esm/PopperImpl.js +0 -248
- package/dist/esm/PopperImpl.js.map +0 -7
- package/dist/esm/getArrowStylesBySize.js +0 -31
- package/dist/esm/getArrowStylesBySize.js.map +0 -7
- package/dist/esm/interaction.js +0 -11
- package/dist/esm/interaction.js.map +0 -7
- package/dist/esm/positions.js +0 -40
- package/dist/esm/positions.js.map +0 -7
- package/dist/esm/props.js +0 -69
- package/dist/esm/props.js.map +0 -7
- package/dist/types/DSPopper.d.ts +0 -134
- package/dist/types/PopperContent.d.ts +0 -21
- package/dist/types/PopperImpl.d.ts +0 -52
- package/dist/types/getArrowStylesBySize.d.ts +0 -2
- package/dist/types/interaction.d.ts +0 -5
- package/dist/types/positions.d.ts +0 -18
- package/dist/types/props.d.ts +0 -68
package/dist/cjs/index.js
CHANGED
|
@@ -29,11 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
var src_exports = {};
|
|
31
31
|
__export(src_exports, {
|
|
32
|
-
default: () =>
|
|
32
|
+
default: () => import_ds_legacy_popper.default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(src_exports);
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
|
-
__reExport(src_exports, require("
|
|
37
|
-
|
|
38
|
-
var import_DSPopper = __toESM(require("./DSPopper.js"));
|
|
36
|
+
__reExport(src_exports, require("@elliemae/ds-legacy-popper"), module.exports);
|
|
37
|
+
var import_ds_legacy_popper = __toESM(require("@elliemae/ds-legacy-popper"));
|
|
39
38
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,
|
|
4
|
+
"sourcesContent": ["export * from '@elliemae/ds-legacy-popper';\nexport { default } from '@elliemae/ds-legacy-popper';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,uCAAd;AACA,8BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export * from "
|
|
3
|
-
|
|
4
|
-
import { default as default2 } from "./DSPopper.js";
|
|
2
|
+
export * from "@elliemae/ds-legacy-popper";
|
|
3
|
+
import { default as default2 } from "@elliemae/ds-legacy-popper";
|
|
5
4
|
export {
|
|
6
5
|
default2 as default
|
|
7
6
|
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-legacy-popper';\nexport { default } from '@elliemae/ds-legacy-popper';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export
|
|
3
|
-
export { default } from './DSPopper.js';
|
|
1
|
+
export * from '@elliemae/ds-legacy-popper';
|
|
2
|
+
export { default } from '@elliemae/ds-legacy-popper';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-popper",
|
|
3
|
-
"version": "3.27.0-next.
|
|
3
|
+
"version": "3.27.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Popper",
|
|
6
6
|
"files": [
|
|
@@ -13,34 +13,6 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/esm/index.js",
|
|
15
15
|
"require": "./dist/cjs/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./props": {
|
|
18
|
-
"import": "./dist/esm/props.js",
|
|
19
|
-
"require": "./dist/cjs/props.js"
|
|
20
|
-
},
|
|
21
|
-
"./positions": {
|
|
22
|
-
"import": "./dist/esm/positions.js",
|
|
23
|
-
"require": "./dist/cjs/positions.js"
|
|
24
|
-
},
|
|
25
|
-
"./PopperImpl": {
|
|
26
|
-
"import": "./dist/esm/PopperImpl.js",
|
|
27
|
-
"require": "./dist/cjs/PopperImpl.js"
|
|
28
|
-
},
|
|
29
|
-
"./PopperContent": {
|
|
30
|
-
"import": "./dist/esm/PopperContent.js",
|
|
31
|
-
"require": "./dist/cjs/PopperContent.js"
|
|
32
|
-
},
|
|
33
|
-
"./interaction": {
|
|
34
|
-
"import": "./dist/esm/interaction.js",
|
|
35
|
-
"require": "./dist/cjs/interaction.js"
|
|
36
|
-
},
|
|
37
|
-
"./getArrowStylesBySize": {
|
|
38
|
-
"import": "./dist/esm/getArrowStylesBySize.js",
|
|
39
|
-
"require": "./dist/cjs/getArrowStylesBySize.js"
|
|
40
|
-
},
|
|
41
|
-
"./DSPopper": {
|
|
42
|
-
"import": "./dist/esm/DSPopper.js",
|
|
43
|
-
"require": "./dist/cjs/DSPopper.js"
|
|
44
16
|
}
|
|
45
17
|
},
|
|
46
18
|
"sideEffects": [
|
|
@@ -63,19 +35,12 @@
|
|
|
63
35
|
"indent": 4
|
|
64
36
|
},
|
|
65
37
|
"dependencies": {
|
|
66
|
-
"@elliemae/
|
|
67
|
-
"memoize-one": "~6.0.0",
|
|
68
|
-
"react-spring": "~8.0.27",
|
|
69
|
-
"styled-components": "~5.3.9",
|
|
70
|
-
"@elliemae/ds-props-helpers": "3.27.0-next.1",
|
|
71
|
-
"@elliemae/ds-system": "3.27.0-next.1",
|
|
72
|
-
"@elliemae/ds-utilities": "3.27.0-next.1",
|
|
73
|
-
"@elliemae/ds-overlay": "3.27.0-next.1"
|
|
38
|
+
"@elliemae/ds-legacy-popper": "1.0.1"
|
|
74
39
|
},
|
|
75
40
|
"devDependencies": {
|
|
76
41
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
77
42
|
"styled-components": "~5.3.9",
|
|
78
|
-
"@elliemae/ds-monorepo-devops": "3.27.0-next.
|
|
43
|
+
"@elliemae/ds-monorepo-devops": "3.27.0-next.3"
|
|
79
44
|
},
|
|
80
45
|
"peerDependencies": {
|
|
81
46
|
"react": "^17.0.2",
|
|
@@ -87,13 +52,13 @@
|
|
|
87
52
|
},
|
|
88
53
|
"scripts": {
|
|
89
54
|
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
90
|
-
"test": "
|
|
91
|
-
"lint": "
|
|
92
|
-
"eslint:fix": "
|
|
93
|
-
"dts": "
|
|
55
|
+
"test": "exit 0 | echo",
|
|
56
|
+
"lint": "exit 0 | echo",
|
|
57
|
+
"eslint:fix": "exit 0 | echo",
|
|
58
|
+
"dts": "exit 0 | echo",
|
|
94
59
|
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
95
60
|
"dev:build": "pnpm --filter {.}... build",
|
|
96
61
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
97
|
-
"checkDeps": "
|
|
62
|
+
"checkDeps": "exit 0 | echo"
|
|
98
63
|
}
|
|
99
64
|
}
|
package/dist/cjs/DSPopper.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DSPopper_exports = {};
|
|
30
|
-
__export(DSPopper_exports, {
|
|
31
|
-
DSPopper: () => DSPopper,
|
|
32
|
-
DSPopperWithSchema: () => DSPopperWithSchema,
|
|
33
|
-
PopperInteractions: () => import_interaction.Interaction,
|
|
34
|
-
PopperPositions: () => import_positions.Position,
|
|
35
|
-
default: () => DSPopper_default,
|
|
36
|
-
interactions: () => import_interaction2.interactions,
|
|
37
|
-
positions: () => import_positions2.positions
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(DSPopper_exports);
|
|
40
|
-
var React = __toESM(require("react"));
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
43
|
-
var import_PopperImpl = __toESM(require("./PopperImpl.js"));
|
|
44
|
-
var import_positions = require("./positions.js");
|
|
45
|
-
var import_interaction = require("./interaction.js");
|
|
46
|
-
var import_props = require("./props.js");
|
|
47
|
-
var import_interaction2 = require("./interaction.js");
|
|
48
|
-
var import_positions2 = require("./positions.js");
|
|
49
|
-
const DSPopper = ({
|
|
50
|
-
containerProps,
|
|
51
|
-
arrowGap,
|
|
52
|
-
arrowSize,
|
|
53
|
-
blockName,
|
|
54
|
-
contentOffset,
|
|
55
|
-
contentStyle,
|
|
56
|
-
contentComponent,
|
|
57
|
-
delayClose,
|
|
58
|
-
delayOpen,
|
|
59
|
-
interactionType,
|
|
60
|
-
isOpen,
|
|
61
|
-
// if this is set DSPopper would be a controlled component if not, an uncontrolled one
|
|
62
|
-
onOpen,
|
|
63
|
-
onClose,
|
|
64
|
-
onPlacementChange,
|
|
65
|
-
placement,
|
|
66
|
-
preventOverflow,
|
|
67
|
-
showArrow,
|
|
68
|
-
closeAnimationConfig,
|
|
69
|
-
openAnimationConfig,
|
|
70
|
-
usePortal,
|
|
71
|
-
triggerComponent,
|
|
72
|
-
wrapExtraComponent,
|
|
73
|
-
getTargetFromChildren,
|
|
74
|
-
getContentFromChildren,
|
|
75
|
-
modifiers,
|
|
76
|
-
triggerRef,
|
|
77
|
-
children: customPopper,
|
|
78
|
-
renderReference,
|
|
79
|
-
referenceNode,
|
|
80
|
-
zIndex,
|
|
81
|
-
hideIfNotVisible
|
|
82
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
import_PopperImpl.default,
|
|
84
|
-
{
|
|
85
|
-
arrowGap,
|
|
86
|
-
arrowSize,
|
|
87
|
-
blockName,
|
|
88
|
-
closeAnimationConfig,
|
|
89
|
-
containerProps,
|
|
90
|
-
contentComponent,
|
|
91
|
-
contentOffset,
|
|
92
|
-
contentStyle,
|
|
93
|
-
delayClose,
|
|
94
|
-
delayOpen,
|
|
95
|
-
getContentFromChildren,
|
|
96
|
-
getTargetFromChildren,
|
|
97
|
-
interactionType,
|
|
98
|
-
isOpen,
|
|
99
|
-
modifiers,
|
|
100
|
-
onOpen,
|
|
101
|
-
onClose,
|
|
102
|
-
onPlacementChange,
|
|
103
|
-
openAnimationConfig,
|
|
104
|
-
placement,
|
|
105
|
-
preventOverflow,
|
|
106
|
-
referenceNode,
|
|
107
|
-
renderReference,
|
|
108
|
-
showArrow,
|
|
109
|
-
triggerComponent,
|
|
110
|
-
triggerRef,
|
|
111
|
-
usePortal,
|
|
112
|
-
wrapExtraComponent,
|
|
113
|
-
zIndex,
|
|
114
|
-
hideIfNotVisible,
|
|
115
|
-
children: customPopper
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
DSPopper.propTypes = import_props.popperProps;
|
|
119
|
-
DSPopper.defaultProps = import_props.defaultProps;
|
|
120
|
-
DSPopper.displayName = "DSPopper";
|
|
121
|
-
const DSPopperWithSchema = (0, import_ds_props_helpers.describe)(DSPopper);
|
|
122
|
-
DSPopperWithSchema.propTypes = import_props.popperProps;
|
|
123
|
-
var DSPopper_default = DSPopper;
|
|
124
|
-
//# sourceMappingURL=DSPopper.js.map
|
package/dist/cjs/DSPopper.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSPopper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport PopperImpl from './PopperImpl.js';\nimport { Position } from './positions.js';\nimport { Interaction } from './interaction.js';\nimport { popperProps, defaultProps } from './props.js';\n\nconst DSPopper = ({\n containerProps,\n arrowGap,\n arrowSize,\n blockName,\n contentOffset,\n contentStyle,\n contentComponent,\n delayClose,\n delayOpen,\n interactionType,\n isOpen, // if this is set DSPopper would be a controlled component if not, an uncontrolled one\n onOpen,\n onClose,\n onPlacementChange,\n placement,\n preventOverflow,\n showArrow,\n closeAnimationConfig,\n openAnimationConfig,\n usePortal,\n triggerComponent,\n wrapExtraComponent,\n getTargetFromChildren,\n getContentFromChildren,\n modifiers,\n triggerRef,\n children: customPopper,\n renderReference,\n referenceNode,\n zIndex,\n hideIfNotVisible,\n}): JSX.Element => (\n <PopperImpl\n arrowGap={arrowGap}\n arrowSize={arrowSize}\n blockName={blockName}\n closeAnimationConfig={closeAnimationConfig}\n containerProps={containerProps}\n contentComponent={contentComponent}\n contentOffset={contentOffset}\n contentStyle={contentStyle}\n delayClose={delayClose}\n delayOpen={delayOpen}\n getContentFromChildren={getContentFromChildren}\n getTargetFromChildren={getTargetFromChildren}\n interactionType={interactionType}\n isOpen={isOpen}\n modifiers={modifiers}\n onOpen={onOpen}\n onClose={onClose}\n onPlacementChange={onPlacementChange}\n openAnimationConfig={openAnimationConfig}\n placement={placement}\n preventOverflow={preventOverflow}\n referenceNode={referenceNode}\n renderReference={renderReference}\n showArrow={showArrow}\n triggerComponent={triggerComponent}\n triggerRef={triggerRef}\n usePortal={usePortal}\n wrapExtraComponent={wrapExtraComponent}\n zIndex={zIndex}\n hideIfNotVisible={hideIfNotVisible}\n >\n {customPopper}\n </PopperImpl>\n);\n\n// @deprecated: There's the NEW (not finished) popover that uses its own popper implementation.\nDSPopper.propTypes = popperProps;\nDSPopper.defaultProps = defaultProps;\nDSPopper.displayName = 'DSPopper';\nconst DSPopperWithSchema = describe(DSPopper);\nDSPopperWithSchema.propTypes = popperProps;\n\nexport { Interaction as PopperInteractions, Position as PopperPositions, DSPopperWithSchema, DSPopper };\n\nexport { interactions } from './interaction.js';\nexport { positions } from './positions.js';\n\nexport default DSPopper;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCrB;AAvCF,8BAAyB;AACzB,wBAAuB;AACvB,uBAAyB;AACzB,yBAA4B;AAC5B,mBAA0C;AAgF1C,IAAAA,sBAA6B;AAC7B,IAAAC,oBAA0B;AA/E1B,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC,kBAAAC;AAAA,EAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAIF,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAO/B,IAAO,mBAAQ;",
|
|
6
|
-
"names": ["import_interaction", "import_positions", "PopperImpl"]
|
|
7
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var PopperContent_exports = {};
|
|
30
|
-
__export(PopperContent_exports, {
|
|
31
|
-
default: () => PopperContent
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(PopperContent_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_react = require("react");
|
|
37
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
-
var import_react_popper = require("@elliemae/react-popper");
|
|
39
|
-
var import_renderprops = require("react-spring/renderprops");
|
|
40
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
41
|
-
var import_ds_overlay = __toESM(require("@elliemae/ds-overlay"));
|
|
42
|
-
var import_getArrowStylesBySize = require("./getArrowStylesBySize.js");
|
|
43
|
-
const Content = import_renderprops.Keyframes.Spring({});
|
|
44
|
-
const StyledDiv = import_ds_system.styled.div`
|
|
45
|
-
z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};
|
|
46
|
-
`;
|
|
47
|
-
class PopperContent extends import_react.PureComponent {
|
|
48
|
-
constructor(props) {
|
|
49
|
-
super(props);
|
|
50
|
-
this.renderContent = this.renderContent.bind(this);
|
|
51
|
-
this.renderArrow = this.renderArrow.bind(this);
|
|
52
|
-
this.handleRestAnimation = this.handleRestAnimation.bind(this);
|
|
53
|
-
}
|
|
54
|
-
handleRestAnimation() {
|
|
55
|
-
const { isOpen, onContentDestroyed } = this.props;
|
|
56
|
-
if (!isOpen) {
|
|
57
|
-
onContentDestroyed();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
renderArrow({ ref, style }, placement) {
|
|
61
|
-
const { blockName, showArrow } = this.props;
|
|
62
|
-
if (!showArrow)
|
|
63
|
-
return null;
|
|
64
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
ref,
|
|
68
|
-
className: `${blockName || "popper"}__arrow`,
|
|
69
|
-
"data-placement": placement,
|
|
70
|
-
style: {
|
|
71
|
-
...style,
|
|
72
|
-
...(0, import_getArrowStylesBySize.getArrowStylesBySize)(placement, 25)
|
|
73
|
-
},
|
|
74
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 30 30", style: { verticalAlign: "initial" }, children: [
|
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
-
"path",
|
|
77
|
-
{
|
|
78
|
-
className: "stroke",
|
|
79
|
-
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\n C26.7,29,24.6,28.1,23.7,27.1z"
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
"path",
|
|
84
|
-
{
|
|
85
|
-
className: "fill",
|
|
86
|
-
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"
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
] })
|
|
90
|
-
},
|
|
91
|
-
"popper-arrow"
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {
|
|
95
|
-
const {
|
|
96
|
-
contentComponent,
|
|
97
|
-
contentStyle,
|
|
98
|
-
isOpen,
|
|
99
|
-
closeAnimationConfig,
|
|
100
|
-
openAnimationConfig,
|
|
101
|
-
onMouseEnter,
|
|
102
|
-
onMouseLeave,
|
|
103
|
-
containerProps,
|
|
104
|
-
zIndex,
|
|
105
|
-
hideIfNotVisible
|
|
106
|
-
} = this.props;
|
|
107
|
-
const computedStyle = {
|
|
108
|
-
...style,
|
|
109
|
-
...contentStyle
|
|
110
|
-
};
|
|
111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
|
-
StyledDiv,
|
|
113
|
-
{
|
|
114
|
-
...containerProps,
|
|
115
|
-
"data-placement": placement,
|
|
116
|
-
onMouseEnter,
|
|
117
|
-
onMouseLeave,
|
|
118
|
-
style: computedStyle,
|
|
119
|
-
"data-testid": "popper-container",
|
|
120
|
-
zIndex,
|
|
121
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
-
Content,
|
|
123
|
-
{
|
|
124
|
-
native: true,
|
|
125
|
-
onRest: this.handleRestAnimation,
|
|
126
|
-
state: isOpen && (!outOfBoundaries || !hideIfNotVisible) ? "open" : "close",
|
|
127
|
-
states: {
|
|
128
|
-
open: {
|
|
129
|
-
...openAnimationConfig,
|
|
130
|
-
from: closeAnimationConfig.to
|
|
131
|
-
},
|
|
132
|
-
close: closeAnimationConfig
|
|
133
|
-
},
|
|
134
|
-
children: (animationStyle) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_renderprops.animated.div, { ref, style: animationStyle, children: (0, import_ds_utilities.getComponentFromProps)(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)]) })
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
render() {
|
|
141
|
-
const {
|
|
142
|
-
destroyed = false,
|
|
143
|
-
onClickOutside = () => null,
|
|
144
|
-
placement = "bottom-start",
|
|
145
|
-
modifiers = {},
|
|
146
|
-
referenceNode,
|
|
147
|
-
usePortal = true
|
|
148
|
-
} = this.props;
|
|
149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_overlay.default, { isOpen: !destroyed, onClickOutside, usePortal, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_popper.Popper, { modifiers, placement, referenceElement: referenceNode, children: this.renderContent }) });
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// eslint-disable-next-line react/static-property-placement
|
|
153
|
-
PopperContent.defaultProps = { onContentDestroyed: () => null };
|
|
154
|
-
//# sourceMappingURL=PopperContent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/PopperContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Popper } from '@elliemae/react-popper';\nimport { Keyframes, animated } from 'react-spring/renderprops';\nimport { getComponentFromProps } from '@elliemae/ds-utilities';\nimport DSOverlay from '@elliemae/ds-overlay';\nimport { getArrowStylesBySize } from './getArrowStylesBySize.js';\n\nconst Content = Keyframes.Spring({});\nconst StyledDiv = styled.div`\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport default class PopperContent extends PureComponent {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onContentDestroyed: () => null };\n\n constructor(props) {\n super(props);\n this.renderContent = this.renderContent.bind(this);\n this.renderArrow = this.renderArrow.bind(this);\n this.handleRestAnimation = this.handleRestAnimation.bind(this);\n }\n\n handleRestAnimation() {\n const { isOpen, onContentDestroyed } = this.props;\n if (!isOpen) {\n onContentDestroyed();\n }\n }\n\n renderArrow({ ref, style }, placement) {\n const { blockName, showArrow } = this.props;\n if (!showArrow) return null;\n return (\n <div\n key=\"popper-arrow\"\n ref={ref}\n className={`${blockName || 'popper'}__arrow`}\n data-placement={placement}\n style={{\n ...style,\n ...getArrowStylesBySize(placement, 25),\n }}\n >\n <svg viewBox=\"0 0 30 30\" style={{ verticalAlign: 'initial' }}>\n <path\n className=\"stroke\"\n 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\n C26.7,29,24.6,28.1,23.7,27.1z\"\n />\n <path\n className=\"fill\"\n 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\"\n />\n </svg>\n </div>\n );\n }\n\n renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {\n const {\n contentComponent,\n contentStyle,\n isOpen,\n closeAnimationConfig,\n openAnimationConfig,\n onMouseEnter,\n onMouseLeave,\n containerProps,\n zIndex,\n hideIfNotVisible,\n } = this.props;\n\n const computedStyle = {\n ...style,\n ...contentStyle,\n };\n return (\n <StyledDiv\n {...containerProps}\n data-placement={placement}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n style={computedStyle}\n data-testid=\"popper-container\"\n zIndex={zIndex}\n >\n <Content\n native\n onRest={this.handleRestAnimation}\n state={isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close'}\n states={{\n open: {\n ...openAnimationConfig,\n from: closeAnimationConfig.to,\n },\n close: closeAnimationConfig,\n }}\n >\n {(animationStyle) => (\n <animated.div ref={ref} style={animationStyle}>\n {getComponentFromProps(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)])}\n </animated.div>\n )}\n </Content>\n </StyledDiv>\n );\n }\n\n render() {\n const {\n destroyed = false,\n onClickOutside = () => null,\n placement = 'bottom-start',\n modifiers = {},\n referenceNode,\n usePortal = true,\n } = this.props;\n return (\n <DSOverlay isOpen={!destroyed} onClickOutside={onClickOutside} usePortal={usePortal}>\n <Popper modifiers={modifiers} placement={placement} referenceElement={referenceNode}>\n {this.renderContent}\n </Popper>\n </DSOverlay>\n );\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["DSOverlay"]
|
|
7
|
-
}
|