@elliemae/ds-tooltip 2.0.0-alpha.9 → 2.0.0-next.4

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.
@@ -69,7 +69,7 @@ const DSTooltip = _ref => {
69
69
  return /*#__PURE__*/_jsx__default["default"](DSPopper__default["default"], {
70
70
  blockName: tooltipBlockName,
71
71
  contentComponent: /*#__PURE__*/jsxRuntime.jsx(TooltipContainer, _objectSpread(_objectSpread(_objectSpread({}, containerProps), otherTooltipProps), {}, {
72
- className: `tooltip-container--${tooltipType} ${className}`,
72
+ className: "tooltip-container--".concat(tooltipType, " ").concat(className),
73
73
  innerRef: innerRef,
74
74
  children: Content
75
75
  })),
@@ -93,9 +93,7 @@ const tooltipProps = {
93
93
  delayClose: reactDesc.PropTypes.string.description('Delay to close the tooltip').defaultValue(constants.DEFAULT_DELAY_CLOSE),
94
94
  delayOpen: reactDesc.PropTypes.string.description('Delay to open the tooltip ').defaultValue(constants.DEFAULT_DELAY_OPEN),
95
95
  interactionType: reactDesc.PropTypes.oneOf(interaction.interactions).description('A type indicating how to open/close the tooltip').defaultValue(DSPopper.PopperInteractions.HOVER),
96
- triggerComponent: reactDesc.PropTypes.element.description(`The component that will open/close the tooltip.
97
- Cannot be used with disabled elements.
98
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`).isRequired,
96
+ triggerComponent: reactDesc.PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired,
99
97
  isOpen: reactDesc.PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),
100
98
  onOpen: reactDesc.PropTypes.func.description('Handler when the tooltip opens'),
101
99
  springAnimationComponent: reactDesc.PropTypes.element.description('Spring animation component'),
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
6
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
+ require('core-js/modules/web.dom-collections.iterator.js');
7
8
  var react = require('react');
8
9
  var reactDesc = require('react-desc');
9
10
  var DSPortal = require('@elliemae/ds-portal');
@@ -13,9 +13,7 @@ const tooltipV2Props = {
13
13
  title: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.string, reactDesc.PropTypes.element]).description('Tooltip content').isRequired,
14
14
  delayClose: reactDesc.PropTypes.number.description('Delay to close the tooltip').defaultValue(constants.DEFAULT_DELAY_CLOSE),
15
15
  delayOpen: reactDesc.PropTypes.number.description('Delay to open the tooltip ').defaultValue(constants.DEFAULT_DELAY_OPEN),
16
- triggerComponent: reactDesc.PropTypes.element.description(`The component that will open/close the tooltip.
17
- Cannot be used with disabled elements.
18
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`).isRequired,
16
+ triggerComponent: reactDesc.PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired,
19
17
  getIsOpen: reactDesc.PropTypes.func.description('Whether the tooltip is visible or not'),
20
18
  onOpen: reactDesc.PropTypes.func.description('Callback when the tooltip opens'),
21
19
  showArrow: reactDesc.PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),
package/cjs/v2/styles.js CHANGED
@@ -2,36 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
5
6
  var styled = require('styled-components');
6
7
  var dsSystem = require('@elliemae/ds-system');
7
8
 
8
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
10
 
11
+ var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
10
12
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
11
13
 
12
- const showAnimation = dsSystem.kfrm`
13
- from {
14
- opacity: 0;
15
- transform: scale(0.8);
16
- }
17
-
18
- to {
19
- opacity: 1;
20
- transform: scale(1);
21
- visibility: visible;
22
- }
23
- `;
24
- const hideAnimation = dsSystem.kfrm`
25
- 0% {
26
- opacity: 1;
27
- transform: scale(1);
28
- }
29
-
30
- 100% {
31
- opacity: 0;
32
- transform: scale(0.8);
33
- }
34
- `;
14
+ var _templateObject, _templateObject2, _templateObject3;
15
+ const showAnimation = dsSystem.kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n"])));
16
+ const hideAnimation = dsSystem.kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n\n 100% {\n opacity: 0;\n transform: scale(0.8);\n }\n"])));
35
17
  const StyledTooltipContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
36
18
  componentId: "sc-1dtjf9j-0"
37
19
  })(["&[data-popper-reference-hidden='true']{display:none;pointer-events:none;}"]);
@@ -41,15 +23,13 @@ const StyledAnimatedTooltip = /*#__PURE__*/styled__default["default"].div.withCo
41
23
  theme
42
24
  }) => theme.space.l, ({
43
25
  theme
44
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
26
+ }) => "".concat(theme.space.xxxs, " ").concat(theme.space.xs), ({
45
27
  theme
46
28
  }) => theme.colors.neutral[600], ({
47
29
  showTooltip
48
30
  }) => showTooltip ? 'visible' : 'hidden', ({
49
31
  showTooltip
50
- }) => dsSystem.css`
51
- animation: ${showTooltip ? showAnimation : hideAnimation} 0.1s ease-in;
52
- `);
32
+ }) => dsSystem.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default["default"](["\n animation: ", " 0.1s ease-in;\n "])), showTooltip ? showAnimation : hideAnimation));
53
33
  const StyledTriggerComponentContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
54
34
  componentId: "sc-1dtjf9j-2"
55
35
  })(["display:inline-block;"]);
package/cjs/v3/index.js CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
6
  var _jsx = require('@babel/runtime/helpers/jsx');
7
7
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8
+ require('core-js/modules/web.dom-collections.iterator.js');
8
9
  var react = require('react');
9
10
  var dsPopperjs = require('@elliemae/ds-popperjs');
10
11
  var reactDesc = require('react-desc');
@@ -58,7 +59,7 @@ const DSTooltipV3 = props => {
58
59
  showPopover: showPopover
59
60
  }, extraPopperJsProps), {}, {
60
61
  children: /*#__PURE__*/_jsx__default["default"]("div", {
61
- "data-testid": `${TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`
62
+ "data-testid": "".concat(TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
62
63
  }, void 0, /*#__PURE__*/_jsx__default["default"](styleds.StyledTooltipContainer, {}, void 0, /*#__PURE__*/_jsx__default["default"](styleds.StyledTooltipText, {}, void 0, text)))
63
64
  })), /*#__PURE__*/jsxRuntime.jsx("div", {
64
65
  onMouseOver: showTooltip,
@@ -67,7 +68,7 @@ const DSTooltipV3 = props => {
67
68
  onBlur: hideTooltip,
68
69
  onKeyDown: handleEscKey,
69
70
  ref: setReferenceElement,
70
- "data-testid": `${TooltipV3DatatestId.TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`,
71
+ "data-testid": "".concat(TooltipV3DatatestId.TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : ''),
71
72
  children: children
72
73
  })]
73
74
  });
package/cjs/v3/styleds.js CHANGED
@@ -14,7 +14,7 @@ const StyledTooltipContainer = /*#__PURE__*/styled__default["default"].div.withC
14
14
  theme
15
15
  }) => theme.space.l, ({
16
16
  theme
17
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
17
+ }) => "".concat(theme.space.xxxs, " ").concat(theme.space.xs), ({
18
18
  theme
19
19
  }) => theme.colors.neutral[600]);
20
20
  const StyledTooltipText = /*#__PURE__*/styled__default["default"].div.withConfig({
@@ -57,7 +57,7 @@ const DSTooltip = _ref => {
57
57
  return /*#__PURE__*/_jsx(DSPopper, {
58
58
  blockName: tooltipBlockName,
59
59
  contentComponent: /*#__PURE__*/jsx(TooltipContainer, _objectSpread(_objectSpread(_objectSpread({}, containerProps), otherTooltipProps), {}, {
60
- className: `tooltip-container--${tooltipType} ${className}`,
60
+ className: "tooltip-container--".concat(tooltipType, " ").concat(className),
61
61
  innerRef: innerRef,
62
62
  children: Content
63
63
  })),
@@ -81,9 +81,7 @@ const tooltipProps = {
81
81
  delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),
82
82
  delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),
83
83
  interactionType: PropTypes.oneOf(interactions).description('A type indicating how to open/close the tooltip').defaultValue(PopperInteractions.HOVER),
84
- triggerComponent: PropTypes.element.description(`The component that will open/close the tooltip.
85
- Cannot be used with disabled elements.
86
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`).isRequired,
84
+ triggerComponent: PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired,
87
85
  isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),
88
86
  onOpen: PropTypes.func.description('Handler when the tooltip opens'),
89
87
  springAnimationComponent: PropTypes.element.description('Spring animation component'),
@@ -1,5 +1,6 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
4
  import { useState, useRef, useCallback, useEffect } from 'react';
4
5
  import { describe } from 'react-desc';
5
6
  import DSPortal from '@elliemae/ds-portal';
@@ -9,9 +9,7 @@ const tooltipV2Props = {
9
9
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,
10
10
  delayClose: PropTypes.number.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),
11
11
  delayOpen: PropTypes.number.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),
12
- triggerComponent: PropTypes.element.description(`The component that will open/close the tooltip.
13
- Cannot be used with disabled elements.
14
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`).isRequired,
12
+ triggerComponent: PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired,
15
13
  getIsOpen: PropTypes.func.description('Whether the tooltip is visible or not'),
16
14
  onOpen: PropTypes.func.description('Callback when the tooltip opens'),
17
15
  showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),
package/esm/v2/styles.js CHANGED
@@ -1,29 +1,10 @@
1
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
1
2
  import styled from 'styled-components';
2
3
  import { kfrm, css } from '@elliemae/ds-system';
3
4
 
4
- const showAnimation = kfrm`
5
- from {
6
- opacity: 0;
7
- transform: scale(0.8);
8
- }
9
-
10
- to {
11
- opacity: 1;
12
- transform: scale(1);
13
- visibility: visible;
14
- }
15
- `;
16
- const hideAnimation = kfrm`
17
- 0% {
18
- opacity: 1;
19
- transform: scale(1);
20
- }
21
-
22
- 100% {
23
- opacity: 0;
24
- transform: scale(0.8);
25
- }
26
- `;
5
+ var _templateObject, _templateObject2, _templateObject3;
6
+ const showAnimation = kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n"])));
7
+ const hideAnimation = kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n\n 100% {\n opacity: 0;\n transform: scale(0.8);\n }\n"])));
27
8
  const StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
28
9
  componentId: "sc-1dtjf9j-0"
29
10
  })(["&[data-popper-reference-hidden='true']{display:none;pointer-events:none;}"]);
@@ -33,15 +14,13 @@ const StyledAnimatedTooltip = /*#__PURE__*/styled.div.withConfig({
33
14
  theme
34
15
  }) => theme.space.l, ({
35
16
  theme
36
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
17
+ }) => "".concat(theme.space.xxxs, " ").concat(theme.space.xs), ({
37
18
  theme
38
19
  }) => theme.colors.neutral[600], ({
39
20
  showTooltip
40
21
  }) => showTooltip ? 'visible' : 'hidden', ({
41
22
  showTooltip
42
- }) => css`
43
- animation: ${showTooltip ? showAnimation : hideAnimation} 0.1s ease-in;
44
- `);
23
+ }) => css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n animation: ", " 0.1s ease-in;\n "])), showTooltip ? showAnimation : hideAnimation));
45
24
  const StyledTriggerComponentContainer = /*#__PURE__*/styled.div.withConfig({
46
25
  componentId: "sc-1dtjf9j-2"
47
26
  })(["display:inline-block;"]);
package/esm/v3/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
5
  import { useState, useCallback } from 'react';
5
6
  import { DSPopperJS } from '@elliemae/ds-popperjs';
6
7
  import { describe } from 'react-desc';
@@ -48,7 +49,7 @@ const DSTooltipV3 = props => {
48
49
  showPopover: showPopover
49
50
  }, extraPopperJsProps), {}, {
50
51
  children: /*#__PURE__*/_jsx("div", {
51
- "data-testid": `${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`
52
+ "data-testid": "".concat(TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
52
53
  }, void 0, /*#__PURE__*/_jsx(StyledTooltipContainer, {}, void 0, /*#__PURE__*/_jsx(StyledTooltipText, {}, void 0, text)))
53
54
  })), /*#__PURE__*/jsx("div", {
54
55
  onMouseOver: showTooltip,
@@ -57,7 +58,7 @@ const DSTooltipV3 = props => {
57
58
  onBlur: hideTooltip,
58
59
  onKeyDown: handleEscKey,
59
60
  ref: setReferenceElement,
60
- "data-testid": `${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`,
61
+ "data-testid": "".concat(TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : ''),
61
62
  children: children
62
63
  })]
63
64
  });
package/esm/v3/styleds.js CHANGED
@@ -6,7 +6,7 @@ const StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
6
6
  theme
7
7
  }) => theme.space.l, ({
8
8
  theme
9
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
9
+ }) => "".concat(theme.space.xxxs, " ").concat(theme.space.xs), ({
10
10
  theme
11
11
  }) => theme.colors.neutral[600]);
12
12
  const StyledTooltipText = /*#__PURE__*/styled.div.withConfig({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tooltip",
3
- "version": "2.0.0-alpha.9",
3
+ "version": "2.0.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tooltip",
6
6
  "module": "./esm/index.js",
@@ -92,11 +92,11 @@
92
92
  "build": "node ../../scripts/build/build.js"
93
93
  },
94
94
  "dependencies": {
95
- "@elliemae/ds-classnames": "2.0.0-alpha.9",
96
- "@elliemae/ds-popper": "2.0.0-alpha.9",
97
- "@elliemae/ds-shared": "2.0.0-alpha.9",
98
- "@elliemae/ds-system": "2.0.0-alpha.9",
99
- "@elliemae/ds-utilities": "2.0.0-alpha.9",
95
+ "@elliemae/ds-classnames": "2.0.0-next.4",
96
+ "@elliemae/ds-popper": "2.0.0-next.4",
97
+ "@elliemae/ds-shared": "2.0.0-next.4",
98
+ "@elliemae/ds-system": "2.0.0-next.4",
99
+ "@elliemae/ds-utilities": "2.0.0-next.4",
100
100
  "@popperjs/core": "2.9.3",
101
101
  "react-desc": "^4.1.3",
102
102
  "react-popper": "2.2.5"
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }