@elliemae/ds-legacy-tooltip 1.0.0-rc.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/index.js +43 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/v1/DSTooltip.js +130 -0
- package/dist/cjs/v1/DSTooltip.js.map +7 -0
- package/dist/cjs/v1/TooltipType.js +39 -0
- package/dist/cjs/v1/TooltipType.js.map +7 -0
- package/dist/cjs/v2/DSTooltip.js +174 -0
- package/dist/cjs/v2/DSTooltip.js.map +7 -0
- package/dist/cjs/v2/DSTooltipArrow.js +63 -0
- package/dist/cjs/v2/DSTooltipArrow.js.map +7 -0
- package/dist/cjs/v2/TooltipType.js +39 -0
- package/dist/cjs/v2/TooltipType.js.map +7 -0
- package/dist/cjs/v2/index.d.js +28 -0
- package/dist/cjs/v2/index.d.js.map +7 -0
- package/dist/cjs/v2/propTypes.js +59 -0
- package/dist/cjs/v2/propTypes.js.map +7 -0
- package/dist/cjs/v2/styles.js +131 -0
- package/dist/cjs/v2/styles.js.map +7 -0
- package/dist/cjs/v2/utils/setMultipleRefs.js +51 -0
- package/dist/cjs/v2/utils/setMultipleRefs.js.map +7 -0
- package/dist/cjs/v2/utils/tooltipPositions.js +49 -0
- package/dist/cjs/v2/utils/tooltipPositions.js.map +7 -0
- package/dist/cjs/v3/DSTooltipV3.js +86 -0
- package/dist/cjs/v3/DSTooltipV3.js.map +7 -0
- package/dist/cjs/v3/TooltipV3DatatestId.js +39 -0
- package/dist/cjs/v3/TooltipV3DatatestId.js.map +7 -0
- package/dist/cjs/v3/constants.js +51 -0
- package/dist/cjs/v3/constants.js.map +7 -0
- package/dist/cjs/v3/defaultProps.js +44 -0
- package/dist/cjs/v3/defaultProps.js.map +7 -0
- package/dist/cjs/v3/index.js +32 -0
- package/dist/cjs/v3/index.js.map +7 -0
- package/dist/cjs/v3/propTypes.js +59 -0
- package/dist/cjs/v3/propTypes.js.map +7 -0
- package/dist/cjs/v3/styles.js +73 -0
- package/dist/cjs/v3/styles.js.map +7 -0
- package/dist/cjs/v3/utils.js +42 -0
- package/dist/cjs/v3/utils.js.map +7 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/v1/DSTooltip.js +100 -0
- package/dist/esm/v1/DSTooltip.js.map +7 -0
- package/dist/esm/v1/TooltipType.js +9 -0
- package/dist/esm/v1/TooltipType.js.map +7 -0
- package/dist/esm/v2/DSTooltip.js +149 -0
- package/dist/esm/v2/DSTooltip.js.map +7 -0
- package/dist/esm/v2/DSTooltipArrow.js +33 -0
- package/dist/esm/v2/DSTooltipArrow.js.map +7 -0
- package/dist/esm/v2/TooltipType.js +9 -0
- package/dist/esm/v2/TooltipType.js.map +7 -0
- package/dist/esm/v2/index.d.js +2 -0
- package/dist/esm/v2/index.d.js.map +7 -0
- package/dist/esm/v2/propTypes.js +29 -0
- package/dist/esm/v2/propTypes.js.map +7 -0
- package/dist/esm/v2/styles.js +101 -0
- package/dist/esm/v2/styles.js.map +7 -0
- package/dist/esm/v2/utils/setMultipleRefs.js +21 -0
- package/dist/esm/v2/utils/setMultipleRefs.js.map +7 -0
- package/dist/esm/v2/utils/tooltipPositions.js +19 -0
- package/dist/esm/v2/utils/tooltipPositions.js.map +7 -0
- package/dist/esm/v3/DSTooltipV3.js +61 -0
- package/dist/esm/v3/DSTooltipV3.js.map +7 -0
- package/dist/esm/v3/TooltipV3DatatestId.js +9 -0
- package/dist/esm/v3/TooltipV3DatatestId.js.map +7 -0
- package/dist/esm/v3/constants.js +21 -0
- package/dist/esm/v3/constants.js.map +7 -0
- package/dist/esm/v3/defaultProps.js +14 -0
- package/dist/esm/v3/defaultProps.js.map +7 -0
- package/dist/esm/v3/index.js +5 -0
- package/dist/esm/v3/index.js.map +7 -0
- package/dist/esm/v3/propTypes.js +29 -0
- package/dist/esm/v3/propTypes.js.map +7 -0
- package/dist/esm/v3/styles.js +43 -0
- package/dist/esm/v3/styles.js.map +7 -0
- package/dist/esm/v3/utils.js +12 -0
- package/dist/esm/v3/utils.js.map +7 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/v1/DSTooltip.d.ts +61 -0
- package/dist/types/v1/TooltipType.d.ts +4 -0
- package/dist/types/v2/DSTooltip.d.ts +24 -0
- package/dist/types/v2/DSTooltipArrow.d.ts +4 -0
- package/dist/types/v2/TooltipType.d.ts +5 -0
- package/dist/types/v2/propTypes.d.ts +17 -0
- package/dist/types/v2/styles.d.ts +7 -0
- package/dist/types/v2/tests/DSTooltipV2.test.d.ts +1 -0
- package/dist/types/v2/utils/setMultipleRefs.d.ts +1 -0
- package/dist/types/v2/utils/tooltipPositions.d.ts +15 -0
- package/dist/types/v3/DSTooltipV3.d.ts +6 -0
- package/dist/types/v3/TooltipV3DatatestId.d.ts +4 -0
- package/dist/types/v3/constants.d.ts +2 -0
- package/dist/types/v3/defaultProps.d.ts +2 -0
- package/dist/types/v3/index.d.ts +3 -0
- package/dist/types/v3/propTypes.d.ts +36 -0
- package/dist/types/v3/styles.d.ts +10 -0
- package/dist/types/v3/tests/DSTooltipV3.test.d.ts +1 -0
- package/dist/types/v3/utils.d.ts +3 -0
- package/package.json +138 -0
|
@@ -0,0 +1,43 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var src_exports = {};
|
|
31
|
+
__export(src_exports, {
|
|
32
|
+
default: () => import_DSTooltip.default,
|
|
33
|
+
tooltipPositions: () => import_tooltipPositions.tooltipPositions
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
__reExport(src_exports, require("./v1/DSTooltip.js"), module.exports);
|
|
38
|
+
__reExport(src_exports, require("./v2/DSTooltip.js"), module.exports);
|
|
39
|
+
var import_tooltipPositions = require("./v2/utils/tooltipPositions.js");
|
|
40
|
+
__reExport(src_exports, require("./v2/TooltipType.js"), module.exports);
|
|
41
|
+
__reExport(src_exports, require("./v3/index.js"), module.exports);
|
|
42
|
+
var import_DSTooltip = __toESM(require("./v1/DSTooltip.js"));
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './v1/DSTooltip.js';\nexport * from './v2/DSTooltip.js';\nexport { tooltipPositions } from './v2/utils/tooltipPositions.js';\nexport * from './v2/TooltipType.js';\nexport * from './v3/index.js';\nexport { default } from './v1/DSTooltip.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AACA,wBAAc,8BADd;AAEA,8BAAiC;AACjC,wBAAc,gCAHd;AAIA,wBAAc,0BAJd;AAKA,uBAAwB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
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 DSTooltip_exports = {};
|
|
30
|
+
__export(DSTooltip_exports, {
|
|
31
|
+
DSTooltip: () => DSTooltip,
|
|
32
|
+
TooltipContainer: () => TooltipContainer,
|
|
33
|
+
TooltipText: () => TooltipText,
|
|
34
|
+
TooltipWithSchema: () => TooltipWithSchema,
|
|
35
|
+
default: () => DSTooltip_default
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(DSTooltip_exports);
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var import_ds_legacy_classnames = require("@elliemae/ds-legacy-classnames");
|
|
41
|
+
var import_ds_legacy_utilities = require("@elliemae/ds-legacy-utilities");
|
|
42
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
43
|
+
var import_ds_legacy_shared = require("@elliemae/ds-legacy-shared");
|
|
44
|
+
var import_ds_legacy_popper = require("@elliemae/ds-legacy-popper");
|
|
45
|
+
var import_TooltipType = require("./TooltipType.js");
|
|
46
|
+
const blockName = "tooltip";
|
|
47
|
+
const TooltipContainer = (0, import_ds_legacy_classnames.aggregatedClasses)("div")(blockName, false, false, {
|
|
48
|
+
propsToRemoveFromFinalElement: ["isHovered", "isDragged"]
|
|
49
|
+
});
|
|
50
|
+
const TooltipText = (0, import_ds_legacy_classnames.aggregatedClasses)("span")(blockName, "text", false, {
|
|
51
|
+
propsToRemoveFromFinalElement: ["isHovered", "isDragged"]
|
|
52
|
+
});
|
|
53
|
+
const DSTooltip = ({
|
|
54
|
+
containerProps = {},
|
|
55
|
+
innerRef,
|
|
56
|
+
placement = import_ds_legacy_popper.PopperPositions.TOP,
|
|
57
|
+
title = "",
|
|
58
|
+
delayClose = import_ds_legacy_shared.DEFAULT_DELAY_CLOSE,
|
|
59
|
+
delayOpen = import_ds_legacy_shared.DEFAULT_DELAY_OPEN,
|
|
60
|
+
interactionType = import_ds_legacy_popper.PopperInteractions.HOVER,
|
|
61
|
+
triggerComponent = null,
|
|
62
|
+
className = "",
|
|
63
|
+
isOpen = void 0,
|
|
64
|
+
onOpen = () => null,
|
|
65
|
+
springAnimationComponent = void 0,
|
|
66
|
+
tooltipType = import_TooltipType.TooltipType.TOOLTIP,
|
|
67
|
+
showArrow = true,
|
|
68
|
+
zIndex,
|
|
69
|
+
...otherTooltipProps
|
|
70
|
+
}) => {
|
|
71
|
+
(0, import_ds_legacy_utilities.useDeprecateComponent)({ componentName: "ds-tooltip", version: "TBD Date: 2023 Q3" });
|
|
72
|
+
const { cssClassName: tooltipBlockName } = (0, import_ds_legacy_classnames.convertPropToCssClassName)(blockName);
|
|
73
|
+
let Content = title;
|
|
74
|
+
if (typeof title === "string") {
|
|
75
|
+
Content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipText, { children: title });
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
import_ds_legacy_popper.DSPopper,
|
|
79
|
+
{
|
|
80
|
+
blockName: tooltipBlockName,
|
|
81
|
+
contentComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
TooltipContainer,
|
|
83
|
+
{
|
|
84
|
+
...containerProps,
|
|
85
|
+
...otherTooltipProps,
|
|
86
|
+
className: `tooltip-container--${tooltipType} ${className}`,
|
|
87
|
+
innerRef,
|
|
88
|
+
children: Content
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
delayClose,
|
|
92
|
+
delayOpen,
|
|
93
|
+
interactionType,
|
|
94
|
+
isOpen,
|
|
95
|
+
onOpen,
|
|
96
|
+
placement,
|
|
97
|
+
showArrow: tooltipType === import_TooltipType.TooltipType.TOOLTIP ? showArrow : false,
|
|
98
|
+
springAnimationComponent,
|
|
99
|
+
triggerComponent: (0, import_ds_legacy_utilities.getComponentFromProps)(triggerComponent),
|
|
100
|
+
zIndex
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
const tooltipProps = {
|
|
105
|
+
containerProps: import_ds_legacy_props_helpers.PropTypes.object.description("Set of Properties attached to the main container"),
|
|
106
|
+
placement: import_ds_legacy_props_helpers.PropTypes.oneOf(import_ds_legacy_popper.positions).description("Tooltip position").defaultValue(import_ds_legacy_popper.PopperPositions.TOP),
|
|
107
|
+
title: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.string, import_ds_legacy_props_helpers.PropTypes.element]).description("Tooltip content").isRequired,
|
|
108
|
+
delayClose: import_ds_legacy_props_helpers.PropTypes.string.description("Delay to close the tooltip").defaultValue(import_ds_legacy_shared.DEFAULT_DELAY_CLOSE),
|
|
109
|
+
delayOpen: import_ds_legacy_props_helpers.PropTypes.string.description("Delay to open the tooltip ").defaultValue(import_ds_legacy_shared.DEFAULT_DELAY_OPEN),
|
|
110
|
+
interactionType: import_ds_legacy_props_helpers.PropTypes.oneOf(import_ds_legacy_popper.interactions).description("A type indicating how to open/close the tooltip").defaultValue(import_ds_legacy_popper.PopperInteractions.HOVER),
|
|
111
|
+
triggerComponent: import_ds_legacy_props_helpers.PropTypes.element.description(
|
|
112
|
+
`The component that will open/close the tooltip.
|
|
113
|
+
Cannot be used with disabled elements.
|
|
114
|
+
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`
|
|
115
|
+
).isRequired,
|
|
116
|
+
isOpen: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether the tooltip is visible or not").defaultValue(void 0),
|
|
117
|
+
onOpen: import_ds_legacy_props_helpers.PropTypes.func.description("Handler when the tooltip opens"),
|
|
118
|
+
springAnimationComponent: import_ds_legacy_props_helpers.PropTypes.element.description("Spring animation component"),
|
|
119
|
+
showArrow: import_ds_legacy_props_helpers.PropTypes.bool.description("Whether to show an arrow or not").defaultValue(true),
|
|
120
|
+
className: import_ds_legacy_props_helpers.PropTypes.string.description("css class"),
|
|
121
|
+
tooltipType: import_ds_legacy_props_helpers.PropTypes.oneOf(["tooltip", "toolbar"]).description("Type of tooltip").defaultValue(import_TooltipType.TooltipType.TOOLTIP),
|
|
122
|
+
zIndex: import_ds_legacy_props_helpers.PropTypes.number.description("z-index value assigned to the tooltip").defaultValue(void 0),
|
|
123
|
+
innerRef: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.func, import_ds_legacy_props_helpers.PropTypes.object]).description("Ref to the tooltip container element")
|
|
124
|
+
};
|
|
125
|
+
DSTooltip.propTypes = tooltipProps;
|
|
126
|
+
DSTooltip.displayName = "DSTooltip";
|
|
127
|
+
const TooltipWithSchema = (0, import_ds_legacy_props_helpers.describe)(DSTooltip);
|
|
128
|
+
TooltipWithSchema.propTypes = tooltipProps;
|
|
129
|
+
var DSTooltip_default = DSTooltip;
|
|
130
|
+
//# sourceMappingURL=DSTooltip.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v1/DSTooltip.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-legacy-classnames';\nimport { getComponentFromProps, useDeprecateComponent } from '@elliemae/ds-legacy-utilities';\nimport { describe, PropTypes } from '@elliemae/ds-legacy-props-helpers';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-legacy-shared';\nimport { DSPopper, PopperPositions, PopperInteractions, interactions, positions } from '@elliemae/ds-legacy-popper';\nimport { TooltipType } from './TooltipType.js';\n\nconst blockName = 'tooltip';\n\nconst TooltipContainer = aggregatedClasses('div')(blockName, false, false, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\nconst TooltipText = aggregatedClasses('span')(blockName, 'text', false, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\nconst DSTooltip = ({\n containerProps = {},\n innerRef,\n placement = PopperPositions.TOP,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n interactionType = PopperInteractions.HOVER,\n triggerComponent = null,\n className = '',\n isOpen = undefined,\n onOpen = () => null,\n springAnimationComponent = undefined,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n zIndex,\n ...otherTooltipProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-tooltip', version: 'TBD Date: 2023 Q3' });\n\n const { cssClassName: tooltipBlockName } = convertPropToCssClassName(blockName);\n\n let Content = title;\n if (typeof title === 'string') {\n Content = <TooltipText>{title}</TooltipText>;\n }\n return (\n <DSPopper\n blockName={tooltipBlockName}\n contentComponent={\n <TooltipContainer\n {...containerProps}\n {...otherTooltipProps}\n className={`tooltip-container--${tooltipType} ${className}`}\n innerRef={innerRef}\n >\n {Content}\n </TooltipContainer>\n }\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={interactionType}\n isOpen={isOpen}\n onOpen={onOpen}\n placement={placement}\n showArrow={tooltipType === TooltipType.TOOLTIP ? showArrow : false}\n springAnimationComponent={springAnimationComponent}\n triggerComponent={getComponentFromProps(triggerComponent)}\n zIndex={zIndex}\n />\n );\n};\n\nconst tooltipProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n placement: PropTypes.oneOf(positions).description('Tooltip position').defaultValue(PopperPositions.TOP),\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,\n delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),\n delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),\n interactionType: PropTypes.oneOf(interactions)\n .description('A type indicating how to open/close the tooltip')\n .defaultValue(PopperInteractions.HOVER),\n triggerComponent: PropTypes.element.description(\n `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`,\n ).isRequired,\n isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),\n onOpen: PropTypes.func.description('Handler when the tooltip opens'),\n springAnimationComponent: PropTypes.element.description('Spring animation component'),\n showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),\n className: PropTypes.string.description('css class'),\n tooltipType: PropTypes.oneOf(['tooltip', 'toolbar']).description('Type of tooltip').defaultValue(TooltipType.TOOLTIP),\n zIndex: PropTypes.number.description('z-index value assigned to the tooltip').defaultValue(undefined),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the tooltip container element'),\n};\n\nDSTooltip.propTypes = tooltipProps;\nDSTooltip.displayName = 'DSTooltip';\nconst TooltipWithSchema = describe(DSTooltip);\nTooltipWithSchema.propTypes = tooltipProps;\n\nexport { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };\nexport default DSTooltip;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6CT;AAxCd,kCAA6D;AAC7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
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 TooltipType_exports = {};
|
|
30
|
+
__export(TooltipType_exports, {
|
|
31
|
+
TooltipType: () => TooltipType
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(TooltipType_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
const TooltipType = {
|
|
36
|
+
TOOLTIP: "tooltip",
|
|
37
|
+
TOOLBAR: "toolbar"
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=TooltipType.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v1/TooltipType.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const TooltipType = {\n TOOLTIP: 'tooltip',\n TOOLBAR: 'toolbar',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIhB,MAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
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 DSTooltip_exports = {};
|
|
30
|
+
__export(DSTooltip_exports, {
|
|
31
|
+
DSTooltipV2: () => DSTooltipV2,
|
|
32
|
+
TooltipV2WithSchema: () => TooltipV2WithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSTooltip_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_ds_legacy_utilities = require("@elliemae/ds-legacy-utilities");
|
|
39
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
40
|
+
var import_ds_legacy_portal = require("@elliemae/ds-legacy-portal");
|
|
41
|
+
var import_ds_legacy_shared = require("@elliemae/ds-legacy-shared");
|
|
42
|
+
var import_react_popper = require("react-popper");
|
|
43
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
44
|
+
var import_tooltipPositions = require("./utils/tooltipPositions.js");
|
|
45
|
+
var import_TooltipType = require("./TooltipType.js");
|
|
46
|
+
var import_styles = require("./styles.js");
|
|
47
|
+
var import_DSTooltipArrow = require("./DSTooltipArrow.js");
|
|
48
|
+
var import_propTypes = require("./propTypes.js");
|
|
49
|
+
var import_setMultipleRefs = require("./utils/setMultipleRefs.js");
|
|
50
|
+
const DSTooltipV2 = ({
|
|
51
|
+
containerProps = {},
|
|
52
|
+
innerRef,
|
|
53
|
+
placement = import_tooltipPositions.tooltipPositions.BOTTOM,
|
|
54
|
+
title = "",
|
|
55
|
+
delayClose = import_ds_legacy_shared.DEFAULT_DELAY_CLOSE,
|
|
56
|
+
delayOpen = import_ds_legacy_shared.DEFAULT_DELAY_OPEN,
|
|
57
|
+
triggerComponent = null,
|
|
58
|
+
className = "",
|
|
59
|
+
getIsOpen = () => null,
|
|
60
|
+
onOpen = () => null,
|
|
61
|
+
tooltipType = import_TooltipType.TooltipType.TOOLTIP,
|
|
62
|
+
showArrow = true,
|
|
63
|
+
offset = [0, 14],
|
|
64
|
+
zIndex,
|
|
65
|
+
extraModifiers = {}
|
|
66
|
+
}) => {
|
|
67
|
+
(0, import_ds_legacy_utilities.useDeprecateComponent)({ componentName: "ds-tooltip-v2", version: "TBD Date: 2023 Q3" });
|
|
68
|
+
const [showTooltip, setShowTooltip] = (0, import_react.useState)(false);
|
|
69
|
+
const [isAnimating, setIsAnimating] = (0, import_react.useState)(false);
|
|
70
|
+
const [referenceElement, setReferenceElement] = (0, import_react.useState)(triggerComponent);
|
|
71
|
+
const [popperElement, setPopperElement] = (0, import_react.useState)(null);
|
|
72
|
+
const [arrowElement, setArrowElement] = (0, import_react.useState)(null);
|
|
73
|
+
const timerOpen = (0, import_react.useRef)(null);
|
|
74
|
+
const timerClosed = (0, import_react.useRef)(null);
|
|
75
|
+
const { styles, attributes } = (0, import_react_popper.usePopper)(referenceElement, popperElement, {
|
|
76
|
+
placement,
|
|
77
|
+
modifiers: [
|
|
78
|
+
{ name: "hide", enabled: true },
|
|
79
|
+
{
|
|
80
|
+
name: "offset",
|
|
81
|
+
enabled: true,
|
|
82
|
+
options: {
|
|
83
|
+
offset: tooltipType === import_TooltipType.TooltipType.TOOLBAR ? [0, 0] : offset
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{ name: "arrow", options: { element: arrowElement } },
|
|
87
|
+
{ ...extraModifiers }
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
const handleShowTooltipOn = (0, import_react.useCallback)(() => {
|
|
91
|
+
timerOpen.current = setTimeout(() => {
|
|
92
|
+
setShowTooltip(true);
|
|
93
|
+
setIsAnimating(true);
|
|
94
|
+
getIsOpen(true);
|
|
95
|
+
onOpen();
|
|
96
|
+
}, delayOpen);
|
|
97
|
+
}, [delayOpen, getIsOpen, onOpen]);
|
|
98
|
+
const handleShowTooltipOff = (0, import_react.useCallback)(() => {
|
|
99
|
+
timerClosed.current = setTimeout(() => {
|
|
100
|
+
setShowTooltip(false);
|
|
101
|
+
setIsAnimating(true);
|
|
102
|
+
getIsOpen(false);
|
|
103
|
+
}, delayClose);
|
|
104
|
+
}, [delayClose, getIsOpen]);
|
|
105
|
+
const handleKeyDown = (0, import_react.useCallback)((e) => {
|
|
106
|
+
if (e.key === "Escape") {
|
|
107
|
+
e.target.blur();
|
|
108
|
+
}
|
|
109
|
+
}, []);
|
|
110
|
+
const checkAnimationStatus = (0, import_react.useCallback)(() => {
|
|
111
|
+
if (!showTooltip) {
|
|
112
|
+
setIsAnimating(false);
|
|
113
|
+
}
|
|
114
|
+
}, [showTooltip]);
|
|
115
|
+
(0, import_react.useEffect)(
|
|
116
|
+
() => () => {
|
|
117
|
+
clearTimeout(timerClosed.current);
|
|
118
|
+
clearTimeout(timerOpen.current);
|
|
119
|
+
},
|
|
120
|
+
[]
|
|
121
|
+
);
|
|
122
|
+
const theme = (0, import_react.useContext)(import_ds_legacy_system.ThemeContext);
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
+
import_styles.StyledTriggerComponentContainer,
|
|
126
|
+
{
|
|
127
|
+
ref: setReferenceElement,
|
|
128
|
+
onMouseEnter: handleShowTooltipOn,
|
|
129
|
+
onMouseLeave: handleShowTooltipOff,
|
|
130
|
+
onFocus: handleShowTooltipOn,
|
|
131
|
+
onBlur: handleShowTooltipOff,
|
|
132
|
+
onKeyDown: handleKeyDown,
|
|
133
|
+
children: triggerComponent
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
isAnimating || showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_portal.DSPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
import_styles.StyledTooltipContainer,
|
|
138
|
+
{
|
|
139
|
+
className,
|
|
140
|
+
showTooltip,
|
|
141
|
+
tooltipType,
|
|
142
|
+
"data-testid": "ds-tooltip-container",
|
|
143
|
+
ref: (ref) => (0, import_setMultipleRefs.setMultipleRefs)(setPopperElement, innerRef)(ref),
|
|
144
|
+
style: { ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip },
|
|
145
|
+
...containerProps,
|
|
146
|
+
...attributes.popper,
|
|
147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
148
|
+
import_styles.StyledAnimatedTooltip,
|
|
149
|
+
{
|
|
150
|
+
showTooltip,
|
|
151
|
+
"data-testid": "ds-tooltip",
|
|
152
|
+
onAnimationEnd: checkAnimationStatus,
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTooltipText, { children: title }),
|
|
155
|
+
tooltipType === import_TooltipType.TooltipType.TOOLTIP && showArrow ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
156
|
+
import_DSTooltipArrow.DSTooltipArrow,
|
|
157
|
+
{
|
|
158
|
+
arrowElementRef: setArrowElement,
|
|
159
|
+
style: styles.arrow,
|
|
160
|
+
placement: attributes.popper ? attributes.popper["data-popper-placement"] : "bottom"
|
|
161
|
+
}
|
|
162
|
+
) : null
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
) }) : null
|
|
168
|
+
] });
|
|
169
|
+
};
|
|
170
|
+
DSTooltipV2.propTypes = import_propTypes.tooltipV2Props;
|
|
171
|
+
DSTooltipV2.displayName = "DSTooltipV2";
|
|
172
|
+
const TooltipV2WithSchema = (0, import_ds_legacy_props_helpers.describe)(DSTooltipV2);
|
|
173
|
+
TooltipV2WithSchema.propTypes = import_propTypes.tooltipV2Props;
|
|
174
|
+
//# sourceMappingURL=DSTooltip.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/DSTooltip.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useState, useCallback, useEffect, useRef, useContext } from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-legacy-utilities';\nimport { describe } from '@elliemae/ds-legacy-props-helpers';\nimport { DSPortal } from '@elliemae/ds-legacy-portal';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-legacy-shared';\nimport { usePopper } from 'react-popper';\nimport { ThemeContext } from '@elliemae/ds-legacy-system';\nimport { tooltipPositions } from './utils/tooltipPositions.js';\nimport { TooltipType } from './TooltipType.js';\nimport {\n StyledTooltipContainer,\n StyledTriggerComponentContainer,\n StyledTooltipText,\n StyledAnimatedTooltip,\n} from './styles.js';\nimport { DSTooltipArrow } from './DSTooltipArrow.js';\nimport type { DSTooltipT } from './index.js';\nimport { tooltipV2Props } from './propTypes.js';\nimport { setMultipleRefs } from './utils/setMultipleRefs.js';\n\nconst DSTooltipV2 = ({\n containerProps = {},\n innerRef,\n placement = tooltipPositions.BOTTOM,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n triggerComponent = null,\n className = '',\n getIsOpen = () => null,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n offset = [0, 14],\n zIndex,\n extraModifiers = {},\n}: DSTooltipT): React.ReactElement => {\n useDeprecateComponent({ componentName: 'ds-tooltip-v2', version: 'TBD Date: 2023 Q3' });\n\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>(triggerComponent);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const timerOpen = useRef(null);\n const timerClosed = useRef(null);\n\n const { styles, attributes } = usePopper(referenceElement, popperElement, {\n placement,\n modifiers: [\n { name: 'hide', enabled: true },\n {\n name: 'offset',\n enabled: true,\n options: {\n offset: tooltipType === TooltipType.TOOLBAR ? [0, 0] : offset,\n },\n },\n { name: 'arrow', options: { element: arrowElement } },\n { ...extraModifiers },\n ],\n });\n\n const handleShowTooltipOn = useCallback(() => {\n timerOpen.current = setTimeout(() => {\n setShowTooltip(true);\n setIsAnimating(true);\n getIsOpen(true);\n onOpen();\n }, delayOpen);\n }, [delayOpen, getIsOpen, onOpen]);\n\n const handleShowTooltipOff = useCallback(() => {\n timerClosed.current = setTimeout(() => {\n setShowTooltip(false);\n setIsAnimating(true);\n getIsOpen(false);\n }, delayClose);\n }, [delayClose, getIsOpen]);\n\n const handleKeyDown = useCallback((e) => {\n if (e.key === 'Escape') {\n e.target.blur();\n }\n }, []);\n\n const checkAnimationStatus = useCallback(() => {\n if (!showTooltip) {\n setIsAnimating(false);\n }\n }, [showTooltip]);\n\n useEffect(\n () => () => {\n clearTimeout(timerClosed.current);\n clearTimeout(timerOpen.current);\n },\n [],\n );\n\n const theme = useContext(ThemeContext);\n\n return (\n <>\n <StyledTriggerComponentContainer\n ref={setReferenceElement}\n onMouseEnter={handleShowTooltipOn}\n onMouseLeave={handleShowTooltipOff}\n onFocus={handleShowTooltipOn}\n onBlur={handleShowTooltipOff}\n onKeyDown={handleKeyDown}\n >\n {triggerComponent}\n </StyledTriggerComponentContainer>\n {isAnimating || showTooltip ? (\n <DSPortal>\n <StyledTooltipContainer\n className={className}\n showTooltip={showTooltip}\n tooltipType={tooltipType}\n data-testid=\"ds-tooltip-container\"\n ref={(ref) => setMultipleRefs(setPopperElement, innerRef)(ref)}\n style={{ ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip }}\n {...containerProps}\n {...attributes.popper}\n >\n <StyledAnimatedTooltip\n showTooltip={showTooltip}\n data-testid=\"ds-tooltip\"\n onAnimationEnd={checkAnimationStatus}\n >\n <StyledTooltipText>{title}</StyledTooltipText>\n {tooltipType === TooltipType.TOOLTIP && showArrow ? (\n <DSTooltipArrow\n arrowElementRef={setArrowElement}\n style={styles.arrow}\n placement={attributes.popper ? attributes.popper['data-popper-placement'] : 'bottom'}\n />\n ) : null}\n </StyledAnimatedTooltip>\n </StyledTooltipContainer>\n </DSPortal>\n ) : null}\n </>\n );\n};\n\nDSTooltipV2.propTypes = tooltipV2Props;\nDSTooltipV2.displayName = 'DSTooltipV2';\nconst TooltipV2WithSchema = describe(DSTooltipV2);\nTooltipV2WithSchema.propTypes = tooltipV2Props;\n\nexport { DSTooltipV2, TooltipV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2GnB;AAvGJ,mBAA4E;AAC5E,iCAAsC;AACtC,qCAAyB;AACzB,8BAAyB;AACzB,8BAAwD;AACxD,0BAA0B;AAC1B,8BAA6B;AAC7B,8BAAiC;AACjC,yBAA4B;AAC5B,oBAKO;AACP,4BAA+B;AAE/B,uBAA+B;AAC/B,6BAAgC;A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A,eAAY;AAAA,YACZ,gBAAgB;AAAA,YAEhB;AAAA,0DAAC,mCAAmB,iBAAM;AAAA,cACzB,gBAAgB,+BAAY,WAAW,YACtC;AAAA,gBAAC;AAAA;AAAA,kBACC,iBAAiB;AAAA,kBACjB,OAAO,OAAO;AAAA,kBACd,WAAW,WAAW,SAAS,WAAW,OAAO,uBAAuB,IAAI;AAAA;AAAA,cAC9E,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,0BAAsB,yCAAS,WAAW;AAChD,oBAAoB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 DSTooltipArrow_exports = {};
|
|
30
|
+
__export(DSTooltipArrow_exports, {
|
|
31
|
+
DSTooltipArrow: () => DSTooltipArrow
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DSTooltipArrow_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_styles = require("./styles.js");
|
|
37
|
+
const DSTooltipArrow = ({ placement, style, arrowElementRef }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
+
import_styles.StyledTooltipArrow,
|
|
39
|
+
{
|
|
40
|
+
"data-placement": placement,
|
|
41
|
+
style,
|
|
42
|
+
ref: arrowElementRef,
|
|
43
|
+
"data-testid": "ds-tooltip-arrow",
|
|
44
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 30 30", children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
className: "stroke",
|
|
49
|
+
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"
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
className: "fill",
|
|
56
|
+
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"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] })
|
|
60
|
+
},
|
|
61
|
+
"popper-arrow"
|
|
62
|
+
);
|
|
63
|
+
//# sourceMappingURL=DSTooltipArrow.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/DSTooltipArrow.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport type { DSTooltipArrowT } from './index.d';\nimport { StyledTooltipArrow } from './styles.js';\n\nconst DSTooltipArrow = ({ placement, style, arrowElementRef }: DSTooltipArrowT): React.ReactElement => (\n <StyledTooltipArrow\n key=\"popper-arrow\"\n data-placement={placement}\n style={style}\n ref={arrowElementRef}\n data-testid=\"ds-tooltip-arrow\"\n >\n <svg viewBox=\"0 0 30 30\">\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 </StyledTooltipArrow>\n);\n\nexport { DSTooltipArrow };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBnB;AAVJ,oBAAmC;AAEnC,MAAM,iBAAiB,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAC1D;AAAA,EAAC;AAAA;AAAA,IAEC,kBAAgB;AAAA,IAChB;AAAA,IACA,KAAK;AAAA,IACL,eAAY;AAAA,IAEZ,uDAAC,SAAI,SAAQ,aACX;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MACJ;AAAA,OACF;AAAA;AAAA,EAhBI;AAiBN;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 TooltipType_exports = {};
|
|
30
|
+
__export(TooltipType_exports, {
|
|
31
|
+
TooltipType: () => TooltipType
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(TooltipType_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
const TooltipType = {
|
|
36
|
+
TOOLTIP: "tooltip",
|
|
37
|
+
TOOLBAR: "toolbar"
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=TooltipType.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/TooltipType.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst TooltipType = {\n TOOLTIP: 'tooltip' as const,\n TOOLBAR: 'toolbar' as const,\n};\n\nexport { TooltipType };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,MAAM,cAAc;AAAA,EAClB,SAAS;AAAA,EACT,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var index_d_exports = {};
|
|
26
|
+
module.exports = __toCommonJS(index_d_exports);
|
|
27
|
+
var React = __toESM(require("react"));
|
|
28
|
+
//# sourceMappingURL=index.d.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/index.d.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport type React from 'react';\n\ntype TooltipIntercationsT = 'hover' | 'click';\n\ntype TooltipTypesT = 'tooltip' | 'toolbar';\n\ntype TooltipPlacementsT =\n | 'top'\n | 'bottom'\n | 'right'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\n\ninterface DSTooltipArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement>>;\n}\n\ninterface DSTooltipT {\n containerProps: Object;\n innerRef: (ref: HTMLElement) => void;\n placement: TooltipPlacementsT;\n title: string | React.ReactElement;\n delayClose: number;\n delayOpen: number;\n interactionType: TooltipIntercationsT;\n triggerComponent: HTMLElement;\n className: string;\n getIsOpen: (status: boolean) => void;\n onOpen: () => void | null;\n tooltipType: 'tooltip' | 'toolbar';\n showArrow: boolean;\n zIndex: number;\n offset?: [number | null | undefined, number | null | undefined];\n extraModifiers: Record<string, unknown>;\n}\n\ninterface TooltipContainerT {\n className: string;\n showTooltip: boolean;\n style: React.CSSProperties;\n tooltipType: TooltipTypesT;\n}\n\ninterface TooltipAnimationT {\n showTooltip: boolean;\n}\n\nexport type { DSTooltipT, DSTooltipArrowT, TooltipContainerT, TooltipAnimationT };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|