td-stylekit 25.7.1 → 25.8.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [25.8.0](https://github.com/treasure-data/td-stylekit/compare/v25.7.1...v25.8.0) (2022-03-01)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Tooltip:** Final revert of onClickOutside issue ([#1241](https://github.com/treasure-data/td-stylekit/issues/1241)) ([8c3c175](https://github.com/treasure-data/td-stylekit/commit/8c3c175))
7
+
1
8
  ## [25.7.1](https://github.com/treasure-data/td-stylekit/compare/v25.7.0...v25.7.1) (2022-03-01)
2
9
 
3
10
 
@@ -12,7 +12,6 @@ export declare type TooltipPopoverProps = {
12
12
  show?: boolean;
13
13
  target: DOMContainer;
14
14
  escClose?: boolean;
15
- overrideOnClickOutside?: () => void;
16
15
  } & Omit<TippyProps, // https://atomiks.github.io/tippyjs/v6/all-props/
17
16
  'allowHTML' | 'arrow' | 'animateFill' | 'content' | 'inlinePositioning' | 'onClickOutside' | 'onHide' | 'placement' | 'plugins' | 'reference' | 'singleton' | 'visible' | 'render'>;
18
17
  /**
@@ -17,7 +17,7 @@ var _Modal = _interopRequireDefault(require("../Modal"));
17
17
 
18
18
  var _useWaitForDOMRef = require("./useWaitForDOMRef");
19
19
 
20
- var _excluded = ["data-instrumentation", "arrowHidden", "children", "hideOnClick", "interactive", "onHide", "overrideOnClickOutside", "show", "showOnCreate", "target", "trigger", "escClose"];
20
+ var _excluded = ["data-instrumentation", "arrowHidden", "children", "hideOnClick", "interactive", "onHide", "show", "showOnCreate", "target", "trigger", "escClose"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
23
 
@@ -74,7 +74,6 @@ var TooltipPopover = function TooltipPopover(props) {
74
74
  _props$interactive = props.interactive,
75
75
  interactive = _props$interactive === void 0 ? true : _props$interactive,
76
76
  onHide = props.onHide,
77
- overrideOnClickOutside = props.overrideOnClickOutside,
78
77
  show = props.show,
79
78
  showOnCreate = props.showOnCreate,
80
79
  target = props.target,
@@ -84,8 +83,7 @@ var TooltipPopover = function TooltipPopover(props) {
84
83
  otherProps = _objectWithoutProperties(props, _excluded);
85
84
 
86
85
  var triggerTarget = (0, _useWaitForDOMRef.useWaitForDOMRef)(target);
87
- var tooltipRef = (0, _react.useRef)(null);
88
- var onClickOutsideBehaviour = overrideOnClickOutside || (!(show === undefined && trigger) ? onHide : undefined); // If escClose === true, then add an event listener on the document do close popover
86
+ var tooltipRef = (0, _react.useRef)(null); // If escClose === true, then add an event listener on the document do close popover
89
87
 
90
88
  (0, _react.useEffect)(function () {
91
89
  var handleEsc = function handleEsc(e) {
@@ -140,8 +138,7 @@ var TooltipPopover = function TooltipPopover(props) {
140
138
  onHidden: function onHidden() {
141
139
  return setMounted(false);
142
140
  },
143
- reference: triggerTarget,
144
- onClickOutside: onClickOutsideBehaviour
141
+ reference: triggerTarget
145
142
  /** Tippy is very strict about the rules of what props are allowed.
146
143
  * An instrumentation plugin adds in `data-gs-c` and `data-gs`.
147
144
  * By defining as tippy plugins we can make these props acceptable. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-stylekit",
3
- "version": "25.7.1",
3
+ "version": "25.8.0",
4
4
  "main": "dist/es/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",