@zendeskgarden/react-tooltips 8.47.2 → 8.48.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/dist/index.cjs.js CHANGED
@@ -176,7 +176,7 @@ function getArrowPosition(popperPlacement) {
176
176
  var COMPONENT_ID$2 = 'tooltip.paragraph';
177
177
  var StyledParagraph = styled__default["default"].p.attrs({
178
178
  'data-garden-id': COMPONENT_ID$2,
179
- 'data-garden-version': '8.47.2'
179
+ 'data-garden-version': '8.48.0'
180
180
  }).withConfig({
181
181
  displayName: "StyledParagraph",
182
182
  componentId: "sc-wuqkfc-0"
@@ -190,7 +190,7 @@ StyledParagraph.defaultProps = {
190
190
  var COMPONENT_ID$1 = 'tooltip.title';
191
191
  var StyledTitle = styled__default["default"].strong.attrs({
192
192
  'data-garden-id': COMPONENT_ID$1,
193
- 'data-garden-version': '8.47.2'
193
+ 'data-garden-version': '8.48.0'
194
194
  }).withConfig({
195
195
  displayName: "StyledTitle",
196
196
  componentId: "sc-vnjcvz-0"
@@ -287,7 +287,7 @@ var colorStyles = function colorStyles(_ref2) {
287
287
  };
288
288
  var StyledTooltip = styled__default["default"].div.attrs({
289
289
  'data-garden-id': COMPONENT_ID,
290
- 'data-garden-version': '8.47.2'
290
+ 'data-garden-version': '8.48.0'
291
291
  }).withConfig({
292
292
  displayName: "StyledTooltip",
293
293
  componentId: "sc-gzzjq4-0"
@@ -434,14 +434,14 @@ Tooltip.defaultProps = {
434
434
  refKey: 'ref'
435
435
  };
436
436
 
437
- var Paragraph = React__default["default"].forwardRef(function (props, ref) {
437
+ var Paragraph = React.forwardRef(function (props, ref) {
438
438
  return React__default["default"].createElement(StyledParagraph, _extends({
439
439
  ref: ref
440
440
  }, props));
441
441
  });
442
442
  Paragraph.displayName = 'Paragraph';
443
443
 
444
- var Title = React__default["default"].forwardRef(function (props, ref) {
444
+ var Title = React.forwardRef(function (props, ref) {
445
445
  return React__default["default"].createElement(StyledTitle, _extends({
446
446
  ref: ref
447
447
  }, props));
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
 
8
- import React, { useContext, useRef, useEffect, cloneElement } from 'react';
8
+ import React, { useContext, useRef, useEffect, cloneElement, forwardRef } from 'react';
9
9
  import { createPortal } from 'react-dom';
10
10
  import PropTypes from 'prop-types';
11
11
  import styled, { css, ThemeContext } from 'styled-components';
@@ -165,7 +165,7 @@ function getArrowPosition(popperPlacement) {
165
165
  var COMPONENT_ID$2 = 'tooltip.paragraph';
166
166
  var StyledParagraph = styled.p.attrs({
167
167
  'data-garden-id': COMPONENT_ID$2,
168
- 'data-garden-version': '8.47.2'
168
+ 'data-garden-version': '8.48.0'
169
169
  }).withConfig({
170
170
  displayName: "StyledParagraph",
171
171
  componentId: "sc-wuqkfc-0"
@@ -179,7 +179,7 @@ StyledParagraph.defaultProps = {
179
179
  var COMPONENT_ID$1 = 'tooltip.title';
180
180
  var StyledTitle = styled.strong.attrs({
181
181
  'data-garden-id': COMPONENT_ID$1,
182
- 'data-garden-version': '8.47.2'
182
+ 'data-garden-version': '8.48.0'
183
183
  }).withConfig({
184
184
  displayName: "StyledTitle",
185
185
  componentId: "sc-vnjcvz-0"
@@ -276,7 +276,7 @@ var colorStyles = function colorStyles(_ref2) {
276
276
  };
277
277
  var StyledTooltip = styled.div.attrs({
278
278
  'data-garden-id': COMPONENT_ID,
279
- 'data-garden-version': '8.47.2'
279
+ 'data-garden-version': '8.48.0'
280
280
  }).withConfig({
281
281
  displayName: "StyledTooltip",
282
282
  componentId: "sc-gzzjq4-0"
@@ -423,14 +423,14 @@ Tooltip.defaultProps = {
423
423
  refKey: 'ref'
424
424
  };
425
425
 
426
- var Paragraph = React.forwardRef(function (props, ref) {
426
+ var Paragraph = forwardRef(function (props, ref) {
427
427
  return React.createElement(StyledParagraph, _extends({
428
428
  ref: ref
429
429
  }, props));
430
430
  });
431
431
  Paragraph.displayName = 'Paragraph';
432
432
 
433
- var Title = React.forwardRef(function (props, ref) {
433
+ var Title = forwardRef(function (props, ref) {
434
434
  return React.createElement(StyledTitle, _extends({
435
435
  ref: ref
436
436
  }, props));
@@ -9,4 +9,3 @@ import React from 'react';
9
9
  * @extends HTMLAttributes<HTMLParagraphElement>
10
10
  */
11
11
  export declare const Paragraph: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
12
- export default Paragraph;
@@ -9,4 +9,3 @@ import React from 'react';
9
9
  * @extends HTMLAttributes<HTMLDivElement>
10
10
  */
11
11
  export declare const Title: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
12
- export default Title;
@@ -4,11 +4,12 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React from 'react';
7
+ import React, { HTMLAttributes } from 'react';
8
+ import PropTypes from 'prop-types';
8
9
  import { Modifiers } from 'popper.js';
9
10
  import { GARDEN_PLACEMENT } from '../utils/gardenPlacements';
10
11
  import { TOOLTIP_SIZE, TOOLTIP_TYPE } from '../styled';
11
- export interface ITooltipProps extends React.HTMLAttributes<HTMLDivElement> {
12
+ export interface ITooltipProps extends HTMLAttributes<HTMLDivElement> {
12
13
  /** Appends the tooltip to the element provided */
13
14
  appendToNode?: Element;
14
15
  /** Adds an arrow to the tooltip */
@@ -17,8 +18,6 @@ export interface ITooltipProps extends React.HTMLAttributes<HTMLDivElement> {
17
18
  delayMS?: number;
18
19
  /** Allows the tooltip to reposition during browser resize events */
19
20
  eventsEnabled?: boolean;
20
- /** Sets the ID of the tooltip */
21
- id?: string;
22
21
  /** Defines the content of the tooltip */
23
22
  content: React.ReactNode;
24
23
  /**
@@ -37,6 +36,7 @@ export interface ITooltipProps extends React.HTMLAttributes<HTMLDivElement> {
37
36
  isInitialVisible?: boolean;
38
37
  /** Displays the tooltip */
39
38
  isVisible?: boolean;
39
+ /** @ignore ReactNode override */
40
40
  children: React.ReactElement;
41
41
  /** Defines the ref key used to position the tooltip */
42
42
  refKey?: string;
@@ -44,4 +44,30 @@ export interface ITooltipProps extends React.HTMLAttributes<HTMLDivElement> {
44
44
  /**
45
45
  * @extends HTMLAttributes<HTMLDivElement>
46
46
  */
47
- export declare const Tooltip: React.FC<ITooltipProps>;
47
+ export declare const Tooltip: {
48
+ ({ id, delayMS, isInitialVisible, content, refKey, placement, eventsEnabled, popperModifiers, children, hasArrow, size, type, appendToNode, zIndex, isVisible: externalIsVisible, ...otherProps }: ITooltipProps): JSX.Element;
49
+ displayName: string;
50
+ propTypes: {
51
+ appendToNode: PropTypes.Requireable<any>;
52
+ hasArrow: PropTypes.Requireable<boolean>;
53
+ delayMS: PropTypes.Requireable<number>;
54
+ eventsEnabled: PropTypes.Requireable<boolean>;
55
+ id: PropTypes.Requireable<string>;
56
+ content: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
57
+ placement: PropTypes.Requireable<string>;
58
+ popperModifiers: PropTypes.Requireable<any>;
59
+ size: PropTypes.Requireable<string>;
60
+ type: PropTypes.Requireable<string>;
61
+ zIndex: PropTypes.Requireable<string | number>;
62
+ isInitialVisible: PropTypes.Requireable<boolean>;
63
+ refKey: PropTypes.Requireable<string>;
64
+ };
65
+ defaultProps: {
66
+ hasArrow: boolean;
67
+ eventsEnabled: boolean;
68
+ type: string;
69
+ placement: string;
70
+ delayMS: number;
71
+ refKey: string;
72
+ };
73
+ };
@@ -6,5 +6,5 @@
6
6
  */
7
7
  export { Tooltip } from './elements/Tooltip';
8
8
  export type { ITooltipProps } from './elements/Tooltip';
9
- export { default as Paragraph } from './elements/Paragraph';
10
- export { default as Title } from './elements/Title';
9
+ export { Paragraph } from './elements/Paragraph';
10
+ export { Title } from './elements/Title';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-tooltips",
3
- "version": "8.47.2",
3
+ "version": "8.48.0",
4
4
  "description": "Collection of components and render prop containers relating to Tooltips in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -35,7 +35,7 @@
35
35
  "styled-components": "^4.2.0 || ^5.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@zendeskgarden/react-theming": "^8.47.2"
38
+ "@zendeskgarden/react-theming": "^8.48.0"
39
39
  },
40
40
  "keywords": [
41
41
  "components",
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "zendeskgarden:src": "src/index.ts",
50
- "gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
50
+ "gitHead": "75f36aee62043004650c3eb2e1583b98a87d71f8"
51
51
  }