@commercetools-uikit/tooltip 19.9.0 → 19.10.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.
@@ -319,7 +319,7 @@ Tooltip.defaultProps = tooltipDefaultProps;
319
319
  var Tooltip$1 = Tooltip;
320
320
 
321
321
  // NOTE: This string will be replaced on build time with the package version.
322
- var version = "19.9.0";
322
+ var version = "19.10.0";
323
323
 
324
324
  exports["default"] = Tooltip$1;
325
325
  exports.version = version;
@@ -281,7 +281,7 @@ Tooltip.defaultProps = tooltipDefaultProps;
281
281
  var Tooltip$1 = Tooltip;
282
282
 
283
283
  // NOTE: This string will be replaced on build time with the package version.
284
- var version = "19.9.0";
284
+ var version = "19.10.0";
285
285
 
286
286
  exports["default"] = Tooltip$1;
287
287
  exports.version = version;
@@ -299,6 +299,6 @@ Tooltip.defaultProps = tooltipDefaultProps;
299
299
  var Tooltip$1 = Tooltip;
300
300
 
301
301
  // NOTE: This string will be replaced on build time with the package version.
302
- var version = "19.9.0";
302
+ var version = "19.10.0";
303
303
 
304
304
  export { Tooltip$1 as default, version };
@@ -1,24 +1,69 @@
1
1
  import { Modifiers } from 'popper.js';
2
2
  import { ComponentType, FocusEvent, ChangeEvent, CSSProperties, ReactElement } from 'react';
3
3
  export type TComponents = {
4
+ /**
5
+ * The component rendered as the tooltip body.
6
+ */
4
7
  BodyComponent?: ComponentType;
8
+ /**
9
+ * Where the tooltip should be rendered. This can be useful to render the tooltip into another part of the document, using React portal.
10
+ */
5
11
  TooltipWrapperComponent?: ComponentType;
12
+ /**
13
+ * A custom component wrapper for the tooltip.
14
+ */
6
15
  WrapperComponent?: ComponentType;
7
16
  };
8
17
  export type TTooltipProps = {
9
18
  children: ReactElement;
19
+ /**
20
+ * Delay (in milliseconds) between the start of the user interaction, and showing the tooltip.
21
+ */
10
22
  showAfter?: number;
23
+ /**
24
+ * Delay (in milliseconds) between the end of the user interaction, and the closing of the tooltip.
25
+ */
11
26
  closeAfter?: number;
27
+ /**
28
+ * Custom css-in-js object styles for the tooltip body.
29
+ */
12
30
  styles?: Record<string, CSSProperties>;
31
+ /**
32
+ * Determines if the tooltip should not appear.
33
+ */
13
34
  off: boolean;
35
+ /**
36
+ * An identifier for the tooltip, used for `aria-describedby`.
37
+ */
14
38
  id?: string;
39
+ /**
40
+ * A callback function, called when the tooltip is closing.
41
+ */
15
42
  onClose?: (e?: ChangeEvent | FocusEvent) => void;
43
+ /**
44
+ * A callback function, called when the tooltip is opening.
45
+ */
16
46
  onOpen?: (e?: ChangeEvent | FocusEvent) => void;
17
47
  isOpen?: boolean;
48
+ /**
49
+ * How the tooltip is positioned relative to the child element.
50
+ */
18
51
  placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
52
+ /**
53
+ * The message to show in the tooltip.
54
+ */
19
55
  title: string;
56
+ /**
57
+ * Provides a way to fine-tune an appearance of underlying Popper tooltip element. For more information, please check [Popper.js documentation](https://popper.js.org/popper-documentation.html#modifiers).
58
+ */
20
59
  modifiers?: Modifiers;
60
+ /**
61
+ * Customize the appearance of certain elements of the tooltip.
62
+ */
21
63
  components?: TComponents;
64
+ /**
65
+ * Horizontal size limit of the tooltip.
66
+ */
22
67
  horizontalConstraint?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
23
68
  };
24
69
  export type TTooltipState = 'closed' | 'entering' | 'opened' | 'exiting';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/tooltip",
3
3
  "description": "Tooltips display informative text when users hover over or focus on an element.",
4
- "version": "19.9.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,10 +21,10 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "19.9.0",
25
- "@commercetools-uikit/design-system": "19.9.0",
26
- "@commercetools-uikit/hooks": "19.9.0",
27
- "@commercetools-uikit/utils": "19.9.0",
24
+ "@commercetools-uikit/constraints": "19.10.0",
25
+ "@commercetools-uikit/design-system": "19.10.0",
26
+ "@commercetools-uikit/hooks": "19.10.0",
27
+ "@commercetools-uikit/utils": "19.10.0",
28
28
  "@emotion/react": "^11.10.5",
29
29
  "@emotion/styled": "^11.10.5",
30
30
  "lodash": "4.17.21",