@ilo-org/react 0.9.1 → 0.10.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/lib/cjs/components/Button/Button.js +2 -2
  3. package/lib/cjs/components/Button/index.js +12 -3
  4. package/lib/cjs/components/Card/Card.js +1 -1
  5. package/lib/cjs/components/Checkbox/Checkbox.js +1 -1
  6. package/lib/cjs/components/Checkbox/index.js +1 -1
  7. package/lib/cjs/components/DatePicker/DatePicker.js +1 -1
  8. package/lib/cjs/components/DatePicker/index.js +1 -1
  9. package/lib/cjs/components/Dropdown/Dropdown.js +2 -2
  10. package/lib/cjs/components/Dropdown/index.js +1 -1
  11. package/lib/cjs/components/Fieldset/Fieldset.js +1 -1
  12. package/lib/cjs/components/Fieldset/index.js +1 -1
  13. package/lib/cjs/components/FileUpload/FileUpload.js +1 -1
  14. package/lib/cjs/components/FileUpload/index.js +1 -1
  15. package/lib/cjs/components/FormControl/FormControl.js +1 -1
  16. package/lib/cjs/components/FormControl/index.js +1 -1
  17. package/lib/cjs/components/Hero/Hero.js +1 -1
  18. package/lib/cjs/components/Hero/index.js +1 -1
  19. package/lib/cjs/components/Input/Input.js +1 -1
  20. package/lib/cjs/components/Input/index.js +1 -1
  21. package/lib/cjs/components/Navigation/Navigation.js +1 -1
  22. package/lib/cjs/components/Navigation/index.js +1 -1
  23. package/lib/cjs/components/NumberPicker/NumberPicker.js +1 -1
  24. package/lib/cjs/components/NumberPicker/index.js +1 -1
  25. package/lib/cjs/components/Profile/Profile.js +4 -2
  26. package/lib/cjs/components/Radio/Radio.js +1 -1
  27. package/lib/cjs/components/Radio/index.js +1 -1
  28. package/lib/cjs/components/SearchField/SearchField.js +1 -1
  29. package/lib/cjs/components/SearchField/index.js +1 -1
  30. package/lib/cjs/components/TextInput/TextInput.js +1 -1
  31. package/lib/cjs/components/TextInput/index.js +1 -1
  32. package/lib/cjs/components/Textarea/Textarea.js +1 -1
  33. package/lib/cjs/components/Textarea/index.js +1 -1
  34. package/lib/cjs/components/Toggle/Toggle.js +1 -1
  35. package/lib/cjs/components/Toggle/index.js +1 -1
  36. package/lib/cjs/components/Tooltip/Tooltip.js +42 -72
  37. package/lib/cjs/components/Tooltip/index.js +1 -1
  38. package/lib/cjs/components/index.js +1 -0
  39. package/lib/cjs/index.js +1 -0
  40. package/lib/esm/components/Button/Button.js +2 -2
  41. package/lib/esm/components/Button/index.js +12 -3
  42. package/lib/esm/components/Card/Card.js +1 -1
  43. package/lib/esm/components/Checkbox/Checkbox.js +1 -1
  44. package/lib/esm/components/Checkbox/index.js +1 -1
  45. package/lib/esm/components/DatePicker/DatePicker.js +1 -1
  46. package/lib/esm/components/DatePicker/index.js +1 -1
  47. package/lib/esm/components/Dropdown/Dropdown.js +2 -2
  48. package/lib/esm/components/Dropdown/index.js +1 -1
  49. package/lib/esm/components/Fieldset/Fieldset.js +1 -1
  50. package/lib/esm/components/Fieldset/index.js +1 -1
  51. package/lib/esm/components/FileUpload/FileUpload.js +1 -1
  52. package/lib/esm/components/FileUpload/index.js +1 -1
  53. package/lib/esm/components/FormControl/FormControl.js +1 -1
  54. package/lib/esm/components/FormControl/index.js +1 -1
  55. package/lib/esm/components/Hero/Hero.js +1 -1
  56. package/lib/esm/components/Hero/index.js +1 -1
  57. package/lib/esm/components/Input/Input.js +1 -1
  58. package/lib/esm/components/Input/index.js +1 -1
  59. package/lib/esm/components/Navigation/Navigation.js +1 -1
  60. package/lib/esm/components/Navigation/index.js +1 -1
  61. package/lib/esm/components/NumberPicker/NumberPicker.js +1 -1
  62. package/lib/esm/components/NumberPicker/index.js +1 -1
  63. package/lib/esm/components/Profile/Profile.js +4 -2
  64. package/lib/esm/components/Radio/Radio.js +1 -1
  65. package/lib/esm/components/Radio/index.js +1 -1
  66. package/lib/esm/components/SearchField/SearchField.js +1 -1
  67. package/lib/esm/components/SearchField/index.js +1 -1
  68. package/lib/esm/components/TextInput/TextInput.js +1 -1
  69. package/lib/esm/components/TextInput/index.js +1 -1
  70. package/lib/esm/components/Textarea/Textarea.js +1 -1
  71. package/lib/esm/components/Textarea/index.js +1 -1
  72. package/lib/esm/components/Toggle/Toggle.js +1 -1
  73. package/lib/esm/components/Toggle/index.js +1 -1
  74. package/lib/esm/components/Tooltip/Tooltip.js +42 -72
  75. package/lib/esm/components/Tooltip/index.js +1 -1
  76. package/lib/esm/components/index.js +1 -0
  77. package/lib/esm/index.js +1 -0
  78. package/lib/types/react/src/components/Button/Button.props.d.ts +4 -0
  79. package/lib/types/react/src/components/Profile/Profile.props.d.ts +9 -0
  80. package/lib/types/react/src/components/Tooltip/Tooltip.props.d.ts +3 -11
  81. package/lib/types/react/src/types/index.d.ts +1 -0
  82. package/package.json +16 -16
  83. package/src/components/Button/Button.args.ts +12 -3
  84. package/src/components/Button/Button.props.ts +5 -0
  85. package/src/components/Button/Button.tsx +2 -0
  86. package/src/components/Card/Card.tsx +1 -1
  87. package/src/components/Dropdown/Dropdown.tsx +3 -1
  88. package/src/components/Profile/Profile.props.ts +12 -0
  89. package/src/components/Profile/Profile.tsx +19 -11
  90. package/src/components/Tooltip/Tooltip.args.ts +1 -1
  91. package/src/components/Tooltip/Tooltip.props.ts +3 -13
  92. package/src/components/Tooltip/Tooltip.tsx +68 -91
  93. package/src/types/index.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilo-org/react",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
4
4
  "description": "React components for the ILO's Design System",
5
5
  "keywords": [
6
6
  "ui_patterns",
@@ -68,6 +68,7 @@
68
68
  ]
69
69
  },
70
70
  "dependencies": {
71
+ "@popperjs/core": "^2.11.8",
71
72
  "classnames": "^2.3.1",
72
73
  "dom-helpers": "^5.2.1",
73
74
  "nanoid": "^3.3.6",
@@ -76,7 +77,7 @@
76
77
  "@ilo-org/brand-assets": "0.2.0",
77
78
  "@ilo-org/fonts": "0.1.2",
78
79
  "@ilo-org/icons-react": "0.0.21",
79
- "@ilo-org/styles": "0.13.0",
80
+ "@ilo-org/styles": "0.13.2",
80
81
  "@ilo-org/themes": "0.7.0",
81
82
  "@ilo-org/utils": "0.0.11"
82
83
  },
@@ -84,21 +85,20 @@
84
85
  "@rollup/plugin-commonjs": "^23.0.2",
85
86
  "@rollup/plugin-json": "^5.0.1",
86
87
  "@rollup/plugin-node-resolve": "^15.0.1",
87
- "@storybook/addon-a11y": "7.5.0-alpha.1",
88
- "@storybook/addon-actions": "7.5.0-alpha.1",
89
- "@storybook/addon-docs": "7.5.0-alpha.1",
90
- "@storybook/addon-essentials": "7.5.0-alpha.1",
91
- "@storybook/addon-links": "7.5.0-alpha.1",
88
+ "@storybook/addon-a11y": "7.6.6",
89
+ "@storybook/addon-actions": "7.6.6",
90
+ "@storybook/addon-docs": "7.6.6",
91
+ "@storybook/addon-essentials": "7.6.6",
92
+ "@storybook/addon-links": "7.6.6",
92
93
  "@storybook/addon-styling": "^1.3.7",
93
- "@storybook/blocks": "7.5.0-alpha.1",
94
- "@storybook/builder-vite": "7.5.0-alpha.1",
95
- "@storybook/client-api": "7.5.0-alpha.1",
96
- "@storybook/manager-api": "7.5.0-alpha.1",
97
- "@storybook/node-logger": "7.5.0-alpha.1",
94
+ "@storybook/blocks": "7.6.6",
95
+ "@storybook/client-api": "7.6.6",
96
+ "@storybook/manager-api": "7.6.6",
97
+ "@storybook/node-logger": "7.6.6",
98
98
  "@storybook/preset-scss": "^1.0.3",
99
- "@storybook/react": "7.5.0-alpha.1",
100
- "@storybook/react-vite": "7.5.0-alpha.1",
101
- "@storybook/theming": "7.5.0-alpha.1",
99
+ "@storybook/react": "7.6.6",
100
+ "@storybook/react-vite": "7.6.6",
101
+ "@storybook/theming": "7.6.6",
102
102
  "@testing-library/jest-dom": "5.16.5",
103
103
  "@testing-library/react": "^12.1.2",
104
104
  "@testing-library/user-event": "^13.5.0",
@@ -124,7 +124,7 @@
124
124
  "rollup-plugin-peer-deps-external": "^2.2.4",
125
125
  "rollup-plugin-typescript2": "^0.34.1",
126
126
  "screenfull": "^5.2.0",
127
- "storybook": "7.5.0-alpha.1",
127
+ "storybook": "7.6.6",
128
128
  "storybook-addon-performance": "^0.17.1",
129
129
  "storybook-addon-rtl-direction": "^0.0.19",
130
130
  "ts-dedent": "^2.2.0",
@@ -4,10 +4,19 @@ const primary: ButtonProps = {
4
4
  type: "primary",
5
5
  label: "Primary",
6
6
  size: "medium",
7
+ name: "primary",
7
8
  };
8
- const secondary: ButtonProps = { type: "secondary", label: "Secondary" };
9
- const tertiary: ButtonProps = { type: "tertiary", label: "Tertiary" };
10
- const alert: ButtonProps = { type: "alert", label: "Alert" };
9
+ const secondary: ButtonProps = {
10
+ type: "secondary",
11
+ label: "Secondary",
12
+ name: "secondary",
13
+ };
14
+ const tertiary: ButtonProps = {
15
+ type: "tertiary",
16
+ label: "Tertiary",
17
+ name: "tertiary",
18
+ };
19
+ const alert: ButtonProps = { type: "alert", label: "Alert", name: "alert" };
11
20
  const icon: ButtonProps = { type: "primary", label: "Icon", icon: "close" };
12
21
  const disabled: ButtonProps = {
13
22
  type: "primary",
@@ -22,6 +22,11 @@ export interface ButtonProps {
22
22
  */
23
23
  className?: string;
24
24
 
25
+ /**
26
+ * Specify the name for the Button.
27
+ */
28
+ name?: string;
29
+
25
30
  /**
26
31
  * Specify whether or not the button is disabled.
27
32
  */
@@ -20,6 +20,7 @@ const Button: FC<ButtonProps> = ({
20
20
  type = "primary",
21
21
  url,
22
22
  style,
23
+ name,
23
24
  }) => {
24
25
  const { prefix } = useGlobalSettings();
25
26
  const baseClass = `${prefix}--button`;
@@ -63,6 +64,7 @@ const Button: FC<ButtonProps> = ({
63
64
  type={kind}
64
65
  aria-haspopup={opensmodal ? `dialog` : false}
65
66
  style={style}
67
+ name={name}
66
68
  >
67
69
  {label && <span className="button__label">{label}</span>}
68
70
  {icon && <Icon name={icon} hidden={true} />}
@@ -67,7 +67,7 @@ const Card: FC<CardProps> = ({
67
67
  )}
68
68
  <div className={`${baseClass}--content`}>
69
69
  {eyebrow && <p className={`${baseClass}--eyebrow`}>{eyebrow}</p>}
70
- {title && <h5 className={`${baseClass}--title`}>{title}</h5>}
70
+ {title && <h3 className={`${baseClass}--title`}>{title}</h3>}
71
71
  {(variant == "multilink" || (variant == "data" && image)) && (
72
72
  <div className={`${baseClass}--image--wrapper`}>
73
73
  <picture>
@@ -65,7 +65,9 @@ const Dropdown = forwardRef<HTMLSelectElement, DropdownProps>((props, ref) => {
65
65
  label={option.label}
66
66
  value={option.value}
67
67
  key={`${baseClass}--option--${i}`}
68
- />
68
+ >
69
+ {option.label}
70
+ </option>
69
71
  ))}
70
72
  </select>
71
73
  </div>
@@ -1,3 +1,5 @@
1
+ import { ThemeTypes, SizeTypes } from "../../types";
2
+
1
3
  interface LinkProps {
2
4
  /**
3
5
  * Specify the label for the the Profile's link
@@ -11,6 +13,16 @@ interface LinkProps {
11
13
  }
12
14
 
13
15
  export interface ProfileProps {
16
+ /**
17
+ * Specify the theme for your profile component.
18
+ */
19
+ theme?: ThemeTypes;
20
+
21
+ /**
22
+ * Specify the size for your profile component.
23
+ */
24
+ size?: SizeTypes;
25
+
14
26
  /**
15
27
  * Specify an optional avatar to be added to your Profile component. Image *must* be a perfect square. CMS backend should provide a fallback if the avatar is not populated.
16
28
  */
@@ -10,11 +10,15 @@ const Profile: FC<ProfileProps> = ({
10
10
  link,
11
11
  name,
12
12
  role,
13
+ theme = "light",
14
+ size = "large",
13
15
  }) => {
14
16
  const { prefix } = useGlobalSettings();
15
17
  const baseClass = `${prefix}--profile`;
16
18
  const profileClasses = classNames(className, {
17
19
  [baseClass]: true,
20
+ [`${baseClass}__theme__${theme}`]: theme,
21
+ [`${baseClass}__size__${size}`]: size,
18
22
  });
19
23
 
20
24
  return (
@@ -24,18 +28,22 @@ const Profile: FC<ProfileProps> = ({
24
28
  src={avatar}
25
29
  alt={`Avatar for ${name}`}
26
30
  />
27
- <figcaption className={`${baseClass}--contents`}>
28
- <span className={`${baseClass}--name id`}>{name}</span>
29
- {role && <span className={`${baseClass}--role id`}>{role}</span>}
30
- {description && (
31
- <p className={`${baseClass}--description info`}>{description}</p>
32
- )}
33
- {link && (
34
- <a className={`${baseClass}--link info`} href={link.url}>
35
- <span>{link.label}</span>
36
- </a>
37
- )}
31
+ <figcaption>
32
+ <div className={`${baseClass}--figcaption--content`}>
33
+ <div className={`${baseClass}--name`}>{name}</div>
34
+ {role && <div className={`${baseClass}--role`}>{role}</div>}
35
+ </div>
38
36
  </figcaption>
37
+ {description && (
38
+ <p className={`${baseClass}--description`}>{description}</p>
39
+ )}
40
+ {link && (
41
+ <div className={`${baseClass}--link`}>
42
+ <a href={link.url} target="__blank" rel="noopener noreferrer">
43
+ <span className={`${baseClass}--link--label`}>{link.label}</span>
44
+ </a>
45
+ </div>
46
+ )}
39
47
  </figure>
40
48
  );
41
49
  };
@@ -22,7 +22,7 @@ const dark: TooltipProps = {
22
22
  const darkicon: TooltipProps = {
23
23
  icon: true,
24
24
  label: "This is a tooltip for an icon",
25
- theme: "dark", // "light" | "dark" ;
25
+ iconTheme: "dark", // "light" | "dark" ;
26
26
  isVisible: false,
27
27
  };
28
28
 
@@ -1,4 +1,4 @@
1
- import { TooltipThemes } from "../../types";
1
+ import { TooltipThemes, TooltipIconThemes } from "../../types";
2
2
 
3
3
  export interface TooltipProps {
4
4
  /**
@@ -26,23 +26,13 @@ export interface TooltipProps {
26
26
  */
27
27
  isVisible?: boolean;
28
28
 
29
- /**
30
- * Callback fired onMouseOver
31
- */
32
- onMouseOver?: (e: React.MouseEventHandler<HTMLDivElement>) => any;
33
-
34
- /**
35
- * Callback fired onMouseOut
36
- */
37
- onMouseOut?: (e: React.MouseEventHandler<HTMLDivElement>) => any;
38
-
39
29
  /**
40
30
  * Describe the theme of the tooltip
41
31
  */
42
32
  theme?: Required<TooltipThemes>;
43
33
 
44
34
  /**
45
- * Set a width for the tooltip
35
+ * Describe the background theme of the tooltip
46
36
  */
47
- width?: string;
37
+ iconTheme?: Required<TooltipIconThemes>;
48
38
  }
@@ -1,138 +1,115 @@
1
- import { FC, useState, useRef } from "react";
1
+ import React, { FC, useState, useRef } from "react";
2
2
  import classNames from "classnames";
3
3
  import useGlobalSettings from "../../hooks/useGlobalSettings";
4
4
  import { TooltipProps } from "./Tooltip.props";
5
- import ReactDOM from "react-dom";
5
+ import { createPopper, Instance as PopperInstance } from "@popperjs/core";
6
6
 
7
7
  const Tooltip: FC<TooltipProps> = ({
8
8
  className,
9
9
  children,
10
10
  icon,
11
11
  label,
12
+ iconTheme,
12
13
  theme,
13
14
  id,
14
15
  }) => {
15
16
  const { prefix } = useGlobalSettings();
16
17
  const baseClass = `${prefix}--tooltip`;
17
18
  const [isVisible, setIsVisible] = useState<boolean>(false);
18
- const [position, setPosition] = useState<{ x: number; y: number }>({
19
- x: 0,
20
- y: 0,
21
- });
22
- const [arrowPlacement, setArrowPlacement] = useState<string>("center");
23
- const [arrowAlignment, setArrowAlignment] = useState<string>("left");
24
-
25
- const tooltipRef = useRef(null);
19
+ const tooltipRef = useRef<HTMLDivElement>(null);
20
+ const popperInstanceRef = useRef<PopperInstance | null>(null);
21
+
22
+ const isLongTooltip = () => {
23
+ const tooltipText = (
24
+ tooltipRef.current?.textContent ||
25
+ tooltipRef.current?.innerText ||
26
+ ""
27
+ ).trim();
28
+ return tooltipText.length > 50;
29
+ };
26
30
 
27
31
  const tooltipClasses = classNames(className, {
28
32
  [baseClass]: true,
29
33
  [`${baseClass}--${theme}`]: theme,
30
- [`${baseClass}--alignment-${arrowAlignment}`]: arrowAlignment,
31
34
  [`${baseClass}--visible`]: isVisible,
35
+ [`${baseClass}--long`]: isLongTooltip(),
32
36
  });
33
37
 
34
- const tooltipArrowClasses = classNames(className, {
35
- [`${baseClass}--arrow`]: true,
36
- [`${baseClass}--arrow--placement-${arrowPlacement}`]: arrowPlacement,
38
+ const tooltipArrowClasses = classNames(
39
+ `${baseClass}--arrow`,
40
+ `${baseClass}--arrow--placement-negative`
41
+ );
42
+
43
+ const iconClasses = classNames(className, `${baseClass}--wrapper`, {
44
+ [`${baseClass}--wrapper__icon ${baseClass}--wrapper__icon__theme__${theme}`]:
45
+ icon,
46
+ [`${baseClass}--wrapper__icon__theme__${theme}`]: iconTheme,
37
47
  });
38
48
 
39
- const handleOnMouseOver: React.MouseEventHandler<HTMLDivElement> &
40
- React.FocusEventHandler<HTMLDivElement> = (e) => {
41
- // get hovered element reference
49
+ const handleOnMouseOver: React.MouseEventHandler<HTMLDivElement> = (e) => {
42
50
  const target = e.currentTarget;
51
+ if (target && tooltipRef.current) {
52
+ const popperInstance = createPopper(target, tooltipRef.current, {
53
+ placement: "top",
54
+ modifiers: [
55
+ {
56
+ name: "offset",
57
+ options: {
58
+ offset: [0, 12], // Adjust offset as needed
59
+ },
60
+ },
61
+ {
62
+ name: "flip",
63
+ enabled: true,
64
+ },
65
+ {
66
+ name: "preventOverflow",
67
+ enabled: true,
68
+ },
69
+ ],
70
+ });
71
+
72
+ popperInstanceRef.current = popperInstance;
43
73
 
44
- if (target) {
45
- const rect = target.getBoundingClientRect();
46
74
  setIsVisible(true);
47
- postMouseOver(rect);
48
- }
49
- };
50
-
51
- const postMouseOver = (hoverRect: any) => {
52
- // position the tooltip after showing it
53
- let placement = "center";
54
- let alignment = "left";
55
-
56
- const ttNode = ReactDOM.findDOMNode(tooltipRef.current) as Element;
57
- if (ttNode != null) {
58
- let x = 0,
59
- y = 0;
60
-
61
- const docWidth = document.documentElement.clientWidth,
62
- docHeight = document.documentElement.clientHeight;
63
-
64
- const rx = hoverRect.x + hoverRect.width, // most right x
65
- lx = hoverRect.x, // most left x
66
- ty = hoverRect.y, // most top y
67
- by = hoverRect.y + hoverRect.height; // most bottom y
68
-
69
- // tool tip rectange
70
- const ttRect = ttNode.getBoundingClientRect();
71
-
72
- const bRight =
73
- rx + ttRect.width <= window.scrollX + docWidth &&
74
- ty + ttRect.height <= window.scrollY + docHeight;
75
- const bLeft =
76
- lx - ttRect.width >= 0 &&
77
- ty + ttRect.height <= window.scrollY + docHeight;
78
- const bAbove = ty - ttRect.height >= 0;
79
- const bBellow = by + ttRect.height <= window.scrollY + docHeight;
80
-
81
- // the tooltip doesn't fit to the left
82
- if (bRight) {
83
- x = hoverRect.width + 16;
84
- y = icon ? -8 : 0;
85
- placement = "negative";
86
- alignment = "right";
87
- } else if (bBellow) {
88
- x = icon ? -8 : 0;
89
- y = hoverRect.height + 16;
90
-
91
- placement = "center";
92
- alignment = "bottom";
93
- } else if (bLeft) {
94
- x = -ttRect.width - 16;
95
- y = icon ? -8 : 0;
96
-
97
- placement = "negative";
98
- alignment = "left";
99
- } else if (bAbove) {
100
- x = icon ? -8 : 0;
101
- y = -ttRect.height - 16;
102
-
103
- placement = "center";
104
- alignment = "top";
105
- }
106
-
107
- setPosition({ x: x, y: y });
108
- setArrowPlacement(placement);
109
- setArrowAlignment(alignment);
110
75
  }
111
76
  };
112
77
 
113
78
  const handleOnMouseOut = () => {
79
+ if (popperInstanceRef.current) {
80
+ popperInstanceRef.current.destroy();
81
+ }
114
82
  setIsVisible(false);
115
83
  };
116
84
 
117
- const style = {
118
- // left: ((position.x + window.scrollX) + 'px'),
119
- // top: ((position.y + window.scrollY) + 'px')
120
- left: position.x + "px",
121
- top: position.y + "px",
85
+ const handleOnFocus: React.FocusEventHandler<HTMLDivElement> = (e) => {
86
+ handleOnMouseOver(e as unknown as React.MouseEvent<HTMLDivElement>);
122
87
  };
123
88
 
124
89
  return (
125
90
  <div
126
- className={`${baseClass}--wrapper ${icon && "has-icon"}`}
91
+ className={iconClasses}
127
92
  onMouseOver={handleOnMouseOver}
128
- onFocus={handleOnMouseOver}
93
+ onFocus={handleOnFocus}
129
94
  onMouseOut={handleOnMouseOut}
130
95
  onBlur={handleOnMouseOut}
131
96
  id={id}
132
97
  >
133
98
  {!icon && <>{children}</>}
134
- <span className={tooltipClasses} style={style} ref={tooltipRef}>
135
- <span className={tooltipArrowClasses} role="presentation"></span>
99
+ <span
100
+ className={tooltipClasses}
101
+ ref={tooltipRef}
102
+ data-id={id}
103
+ id="tooltip"
104
+ role="tooltip"
105
+ aria-hidden={!isVisible}
106
+ >
107
+ <span
108
+ data-popper-arrow
109
+ className={tooltipArrowClasses}
110
+ data-placement="negative"
111
+ role="presentation"
112
+ />
136
113
  {label}
137
114
  </span>
138
115
  </div>
@@ -32,6 +32,7 @@ export type LabelTypes = "default" | "actionable" | "light";
32
32
  export type LinkTypes = "light" | "dark" | "footer" | "button";
33
33
  export type LinkListThemes = "light" | "dark";
34
34
  export type TooltipThemes = "light" | "dark";
35
+ export type TooltipIconThemes = "light" | "dark";
35
36
  export type TooltipAlignment = "top" | "right" | "bottom" | "left";
36
37
  export type TooltipPlacement = "negative" | "center" | "positive";
37
38
  export type ListAlignment = "default" | "horizontal";