@canonical/react-ds-global 0.30.0 → 0.32.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.
Files changed (110) hide show
  1. package/dist/esm/lib/component/Accordion/common/Item/styles.css +127 -9
  2. package/dist/esm/lib/component/Badge/styles.css +25 -24
  3. package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +2 -2
  4. package/dist/esm/lib/component/Breadcrumbs/common/Item/Item.js +12 -2
  5. package/dist/esm/lib/component/Breadcrumbs/common/Item/Item.js.map +1 -1
  6. package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +17 -5
  7. package/dist/esm/lib/component/Breadcrumbs/styles.css +3 -0
  8. package/dist/esm/lib/component/Button/Button.js +4 -5
  9. package/dist/esm/lib/component/Button/Button.js.map +1 -1
  10. package/dist/esm/lib/component/Button/styles.css +99 -17
  11. package/dist/esm/lib/component/Card/Card.js +7 -0
  12. package/dist/esm/lib/component/Card/Card.js.map +1 -1
  13. package/dist/esm/lib/component/Card/common/Content/styles.css +7 -3
  14. package/dist/esm/lib/component/Card/common/Footer/Footer.js +1 -1
  15. package/dist/esm/lib/component/Card/common/Footer/styles.css +12 -2
  16. package/dist/esm/lib/component/Card/styles.css +52 -14
  17. package/dist/esm/lib/component/Chip/styles.css +3 -0
  18. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +11 -8
  19. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js.map +1 -1
  20. package/dist/esm/lib/component/ContextualMenu/common/Item/styles.css +31 -3
  21. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js +24 -5
  22. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js.map +1 -1
  23. package/dist/esm/lib/component/Tabs/common/Item/styles.css +12 -0
  24. package/dist/esm/lib/component/Tooltip/Tooltip.js +1 -1
  25. package/dist/esm/lib/component/Tooltip/index.js +0 -1
  26. package/dist/esm/lib/component/Tooltip/index.js.map +1 -1
  27. package/dist/esm/lib/component/Tooltip/styles.css +17 -0
  28. package/dist/esm/lib/component/Tooltip/withTooltip.js +70 -7
  29. package/dist/esm/lib/component/Tooltip/withTooltip.js.map +1 -1
  30. package/dist/esm/lib/group/Cards/Cards.js +49 -0
  31. package/dist/esm/lib/group/Cards/Cards.js.map +1 -0
  32. package/dist/esm/lib/group/Cards/index.js +3 -0
  33. package/dist/esm/lib/group/Cards/index.js.map +1 -0
  34. package/dist/esm/lib/group/Cards/styles.css +55 -0
  35. package/dist/esm/lib/group/Cards/types.js.map +1 -0
  36. package/dist/esm/lib/group/index.js +1 -0
  37. package/dist/esm/lib/group/index.js.map +1 -1
  38. package/dist/esm/lib/hooks/index.js +1 -0
  39. package/dist/esm/lib/hooks/index.js.map +1 -1
  40. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js +6 -0
  41. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js.map +1 -1
  42. package/dist/esm/lib/hooks/useIsMounted/index.js +3 -0
  43. package/dist/esm/lib/hooks/useIsMounted/index.js.map +1 -0
  44. package/dist/esm/lib/hooks/useIsMounted/types.js +2 -0
  45. package/dist/esm/lib/hooks/useIsMounted/types.js.map +1 -0
  46. package/dist/esm/lib/hooks/useIsMounted/useIsMounted.js +21 -0
  47. package/dist/esm/lib/hooks/useIsMounted/useIsMounted.js.map +1 -0
  48. package/dist/esm/lib/hooks/useWindowFitment/readingDirection.js +19 -4
  49. package/dist/esm/lib/hooks/useWindowFitment/readingDirection.js.map +1 -1
  50. package/dist/types/lib/component/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  51. package/dist/types/lib/component/Breadcrumbs/common/Item/Item.d.ts.map +1 -1
  52. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts +5 -0
  53. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts.map +1 -1
  54. package/dist/types/lib/component/Breadcrumbs/types.d.ts +15 -0
  55. package/dist/types/lib/component/Breadcrumbs/types.d.ts.map +1 -1
  56. package/dist/types/lib/component/Button/Button.d.ts.map +1 -1
  57. package/dist/types/lib/component/Button/types.d.ts +7 -5
  58. package/dist/types/lib/component/Button/types.d.ts.map +1 -1
  59. package/dist/types/lib/component/Card/Card.d.ts +7 -0
  60. package/dist/types/lib/component/Card/Card.d.ts.map +1 -1
  61. package/dist/types/lib/component/Card/common/Footer/Footer.d.ts +1 -1
  62. package/dist/types/lib/component/Card/common/Footer/types.d.ts +1 -1
  63. package/dist/types/lib/component/Card/common/Footer/types.d.ts.map +1 -1
  64. package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts.map +1 -1
  65. package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts.map +1 -1
  66. package/dist/types/lib/component/Tooltip/Tooltip.d.ts +1 -1
  67. package/dist/types/lib/component/Tooltip/index.d.ts +0 -1
  68. package/dist/types/lib/component/Tooltip/index.d.ts.map +1 -1
  69. package/dist/types/lib/component/Tooltip/types.d.ts +60 -0
  70. package/dist/types/lib/component/Tooltip/types.d.ts.map +1 -1
  71. package/dist/types/lib/component/Tooltip/withTooltip.d.ts +10 -12
  72. package/dist/types/lib/component/Tooltip/withTooltip.d.ts.map +1 -1
  73. package/dist/types/lib/group/Cards/Cards.d.ts +40 -0
  74. package/dist/types/lib/group/Cards/Cards.d.ts.map +1 -0
  75. package/dist/types/lib/group/Cards/index.d.ts +3 -0
  76. package/dist/types/lib/group/Cards/index.d.ts.map +1 -0
  77. package/dist/types/lib/group/Cards/types.d.ts +14 -0
  78. package/dist/types/lib/group/Cards/types.d.ts.map +1 -0
  79. package/dist/types/lib/group/index.d.ts +1 -0
  80. package/dist/types/lib/group/index.d.ts.map +1 -1
  81. package/dist/types/lib/hooks/index.d.ts +1 -0
  82. package/dist/types/lib/hooks/index.d.ts.map +1 -1
  83. package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts.map +1 -1
  84. package/dist/types/lib/hooks/useIsMounted/index.d.ts +3 -0
  85. package/dist/types/lib/hooks/useIsMounted/index.d.ts.map +1 -0
  86. package/dist/types/lib/hooks/useIsMounted/types.d.ts +6 -0
  87. package/dist/types/lib/hooks/useIsMounted/types.d.ts.map +1 -0
  88. package/dist/types/lib/hooks/useIsMounted/useIsMounted.d.ts +15 -0
  89. package/dist/types/lib/hooks/useIsMounted/useIsMounted.d.ts.map +1 -0
  90. package/dist/types/lib/hooks/useWindowFitment/readingDirection.d.ts +12 -4
  91. package/dist/types/lib/hooks/useWindowFitment/readingDirection.d.ts.map +1 -1
  92. package/dist/types/lib/types/link.d.ts +1 -1
  93. package/package.json +16 -16
  94. package/dist/esm/lib/component/Tooltip/common/TooltipArea/TooltipArea.js +0 -62
  95. package/dist/esm/lib/component/Tooltip/common/TooltipArea/TooltipArea.js.map +0 -1
  96. package/dist/esm/lib/component/Tooltip/common/TooltipArea/index.js +0 -2
  97. package/dist/esm/lib/component/Tooltip/common/TooltipArea/index.js.map +0 -1
  98. package/dist/esm/lib/component/Tooltip/common/TooltipArea/styles.css +0 -13
  99. package/dist/esm/lib/component/Tooltip/common/TooltipArea/types.js.map +0 -1
  100. package/dist/esm/lib/component/Tooltip/common/index.js +0 -2
  101. package/dist/esm/lib/component/Tooltip/common/index.js.map +0 -1
  102. package/dist/types/lib/component/Tooltip/common/TooltipArea/TooltipArea.d.ts +0 -10
  103. package/dist/types/lib/component/Tooltip/common/TooltipArea/TooltipArea.d.ts.map +0 -1
  104. package/dist/types/lib/component/Tooltip/common/TooltipArea/index.d.ts +0 -3
  105. package/dist/types/lib/component/Tooltip/common/TooltipArea/index.d.ts.map +0 -1
  106. package/dist/types/lib/component/Tooltip/common/TooltipArea/types.d.ts +0 -47
  107. package/dist/types/lib/component/Tooltip/common/TooltipArea/types.d.ts.map +0 -1
  108. package/dist/types/lib/component/Tooltip/common/index.d.ts +0 -2
  109. package/dist/types/lib/component/Tooltip/common/index.d.ts.map +0 -1
  110. /package/dist/esm/lib/{component/Tooltip/common/TooltipArea → group/Cards}/types.js +0 -0
@@ -1,9 +1,17 @@
1
1
  import type { WindowFitmentPlacement, WindowFitmentSide } from "./types.js";
2
2
  /**
3
- * Contextual-menu placements: open toward the trigger's reading-flow (leading)
4
- * edge, top-aligned, flipping alignment then side as space runs out. Logical, so
5
- * it mirrors automatically — resolves to the historical right-start/… order in
6
- * LTR and left-start/… in RTL.
3
+ * ROOT contextual-menu placements: open BELOW the trigger, leading-aligned
4
+ * (design review), flipping to above then to the side as space runs out.
5
+ * Logical, so alignment mirrors automatically (leading = left in LTR, right in
6
+ * RTL). Used by the top-level menu opened from a trigger.
7
+ */
8
+ export declare const MENU_ROOT_PLACEMENT: WindowFitmentPlacement[];
9
+ /**
10
+ * SUBMENU (nested) placements: expand toward the trigger's reading-flow
11
+ * (leading) edge, top-aligned, flipping alignment then side as space runs out —
12
+ * standard cascade behaviour, a submenu opens beside its parent item, not below
13
+ * it. Logical, so it mirrors automatically (right-start… in LTR, left-start… in
14
+ * RTL).
7
15
  */
8
16
  export declare const MENU_PLACEMENT: WindowFitmentPlacement[];
9
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"readingDirection.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useWindowFitment/readingDirection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,sBAAsB,EAOlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAKhD,CAAC"}
1
+ {"version":3,"file":"readingDirection.d.ts","sourceRoot":"","sources":["../../../../../src/lib/hooks/useWindowFitment/readingDirection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,sBAAsB,EAOvD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,sBAAsB,EAOlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAKhD,CAAC"}
@@ -3,7 +3,7 @@ import type { ComponentType, HTMLAttributes, ReactNode } from "react";
3
3
  * Props passed to a custom `LinkComponent` for router integration.
4
4
  *
5
5
  * The single, shared contract for every component that injects one link
6
- * renderer for its navigable items (Breadcrumbs, SideNavigation, Tabs, …).
6
+ * renderer for its navigable items (Breadcrumbs, SideNavigation, Tabs, ...).
7
7
  * Deliberately narrow — only these four props are forwarded, not the full
8
8
  * anchor attribute set — so the same router `Link` (e.g.
9
9
  * `@canonical/router-react`, Next.js, React Router) works across all of them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-global",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -43,25 +43,25 @@
43
43
  "test:vitest:watch": "vitest"
44
44
  },
45
45
  "dependencies": {
46
- "@canonical/design-tokens": "0.6.2-contrasted.0",
47
- "@canonical/ds-assets": "^0.30.0",
48
- "@canonical/react-hooks": "^0.30.0",
49
- "@canonical/storybook-config": "^0.30.0",
50
- "@canonical/styles": "^0.30.0",
51
- "@canonical/utils": "^0.30.0",
46
+ "@canonical/design-tokens": "0.8.1",
47
+ "@canonical/ds-assets": "^0.32.0",
48
+ "@canonical/react-hooks": "^0.32.0",
49
+ "@canonical/storybook-config": "^0.32.0",
50
+ "@canonical/styles": "^0.32.0",
51
+ "@canonical/utils": "^0.32.0",
52
52
  "react": "^19.2.4",
53
53
  "react-dom": "^19.2.4"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@biomejs/biome": "2.4.9",
57
- "@canonical/biome-config": "^0.30.0",
58
- "@canonical/ds-types": "^0.30.0",
59
- "@canonical/router-core": "^0.30.0",
60
- "@canonical/router-react": "^0.30.0",
61
- "@canonical/storybook-helpers": "^0.30.0",
62
- "@canonical/typescript-config-react": "^0.30.0",
63
- "@canonical/vitest-config-react": "^0.30.0",
64
- "@canonical/webarchitect": "^0.30.0",
57
+ "@canonical/biome-config": "^0.32.0",
58
+ "@canonical/ds-types": "^0.32.0",
59
+ "@canonical/router-core": "^0.32.0",
60
+ "@canonical/router-react": "^0.32.0",
61
+ "@canonical/storybook-helpers": "^0.32.0",
62
+ "@canonical/typescript-config-react": "^0.32.0",
63
+ "@canonical/vitest-config-react": "^0.32.0",
64
+ "@canonical/webarchitect": "^0.32.0",
65
65
  "@chromatic-com/storybook": "^5.0.1",
66
66
  "@storybook/addon-docs": "^10.3.1",
67
67
  "@storybook/react-vite": "^10.3.1",
@@ -79,5 +79,5 @@
79
79
  "vite": "^8.0.1",
80
80
  "vitest": "^4.0.18"
81
81
  },
82
- "gitHead": "40fe86ac955473536ac14f074812a9821f5b65c0"
82
+ "gitHead": "5b279d8150e3988c68c6c2a741046bcd425624ca"
83
83
  }
@@ -1,62 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useState, } from "react";
3
- import { createPortal } from "react-dom";
4
- import { useDisclosure } from "../../../../hooks/index.js";
5
- import { Tooltip } from "../../index.js";
6
- import "./styles.css";
7
- const componentCssClassName = "ds tooltip-area";
8
- /**
9
- * Wraps a target element with a tooltip.
10
- * This component allows you to attach a tooltip to any JSX fragment.
11
- */
12
- const TooltipArea = ({ children, style, className, Message, icon, open, distance = "6px", targetElementId, targetElementClassName, targetElementStyle, messageElementClassName, messageElementStyle, parentElement, autoFit, ...props }) => {
13
- const { targetRef, popupRef, popupPositionStyle, popupId, isOpen, bestPosition, arrowOffset, getToggleProps, getContentProps,
14
- // `open` is the public alias for the hook's controlled `isOpen`; when set it
15
- // overrides hover/focus so the tooltip stays in the given state.
16
- } = useDisclosure({
17
- distance,
18
- autoFit,
19
- ...props,
20
- isOpen: open ?? props.isOpen,
21
- mode: "hover",
22
- });
23
- const triggerProps = getToggleProps();
24
- const contentProps = getContentProps();
25
- // The message is portalled to the client only. Rendering it on the server (or
26
- // on the first client render) would differ from the post-mount portal output
27
- // and force a hydration mismatch + full re-mount — which resets the fitment
28
- // refs to null and re-triggers the unpositioned first frame. Deferring to a
29
- // `mounted` gate makes the server and first client render identical (nothing
30
- // at the call site); the tooltip mounts once, cleanly, after hydration.
31
- const [mounted, setMounted] = useState(false);
32
- useEffect(() => setMounted(true), []);
33
- // The always-on arrow offset keeps the arrow pointing at the target centre
34
- // for every placement, not only when auto-fit clamps.
35
- const arrowStyle = arrowOffset
36
- ? {
37
- [arrowOffset.axis === "x"
38
- ? "--tooltip-arrow-offset-left"
39
- : "--tooltip-arrow-offset-top"]: `${arrowOffset.offset}px`,
40
- }
41
- : {};
42
- const TooltipMessageElement = (_jsx(Tooltip, { id: popupId, className: [bestPosition?.positionName, messageElementClassName]
43
- .filter(Boolean)
44
- .join(" "), icon: icon, onPointerEnter: contentProps.onPointerEnter, ref: popupRef, style: {
45
- ...messageElementStyle,
46
- ...popupPositionStyle,
47
- ...arrowStyle,
48
- },
49
- // Reveal only once a position has been resolved. Until `bestPosition`
50
- // exists the popup would render at the fallback top:0/left:0 with no
51
- // placement class (and so no arrow); gating the reveal on it means that
52
- // unpositioned frame stays `visibility:hidden` and never paints — no
53
- // visible 0,0 flash, and the open fade always runs from an anchored spot.
54
- isOpen: isOpen && Boolean(bestPosition), children: Message }));
55
- return (
56
- // biome-ignore lint/a11y/noStaticElementInteractions: the wrapper forwards pointer/focus to the tooltip trigger
57
- _jsxs("span", { className: [componentCssClassName, className].filter(Boolean).join(" "), style: style, onFocus: triggerProps.onFocus, onBlur: triggerProps.onBlur, onPointerEnter: triggerProps.onPointerEnter, onPointerLeave: triggerProps.onPointerLeave, children: [_jsx("span", { id: targetElementId, style: targetElementStyle, className: ["target", targetElementClassName].filter(Boolean).join(" "), ref: targetRef, "aria-describedby": popupId, children: children }), mounted
58
- ? createPortal(TooltipMessageElement, parentElement || document.body)
59
- : null] }));
60
- };
61
- export default TooltipArea;
62
- //# sourceMappingURL=TooltipArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooltipArea.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/TooltipArea.tsx"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export { default as TooltipArea } from "./TooltipArea.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,13 +0,0 @@
1
- .ds.tooltip-area {
2
- position: relative;
3
- & .target {
4
- cursor: pointer;
5
- position: relative;
6
- display: inline-block;
7
-
8
- & > * {
9
- /* biome-ignore lint/complexity/noImportantStyles: The tooltip targets must have no margin in order for tooltip placements to work correctly */
10
- margin: 0 !important;
11
- }
12
- }
13
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from "./TooltipArea/index.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/component/Tooltip/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ReactElement } from "react";
2
- import type { TooltipAreaProps } from "./types.js";
3
- import "./styles.css";
4
- /**
5
- * Wraps a target element with a tooltip.
6
- * This component allows you to attach a tooltip to any JSX fragment.
7
- */
8
- declare const TooltipArea: ({ children, style, className, Message, icon, open, distance, targetElementId, targetElementClassName, targetElementStyle, messageElementClassName, messageElementStyle, parentElement, autoFit, ...props }: TooltipAreaProps) => ReactElement;
9
- export default TooltipArea;
10
- //# sourceMappingURL=TooltipArea.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooltipArea.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/TooltipArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,WAAW,GAAI,4MAgBlB,gBAAgB,KAAG,YAiGrB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as TooltipArea } from "./TooltipArea.js";
2
- export type * from "./types.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,mBAAmB,YAAY,CAAC"}
@@ -1,47 +0,0 @@
1
- import type { CSSProperties, ReactNode } from "react";
2
- import type { UseDisclosureProps } from "../../../../hooks/index.js";
3
- export interface TooltipAreaProps extends Omit<UseDisclosureProps, "mode"> {
4
- /**
5
- * The target element to which the tooltip should be attached.
6
- * This can be any valid React element.
7
- */
8
- children: ReactNode;
9
- /**
10
- * The content of the tooltip. This can be a string or any valid React node.
11
- */
12
- Message: ReactNode;
13
- /**
14
- * An optional leading icon for the tooltip, rendered before the message
15
- * (Figma: 16px glyph, dimension-100 gap). Purely decorative.
16
- */
17
- icon?: ReactNode;
18
- /**
19
- * Force the tooltip open (or closed), overriding hover/focus. When a boolean
20
- * is passed the tooltip is fully controlled and ignores pointer/keyboard —
21
- * useful for stories, visual tests, or driving the tooltip from outside.
22
- * Leave undefined for the default hover behaviour.
23
- */
24
- open?: boolean;
25
- /** Styles applied to the tooltip area */
26
- style?: CSSProperties;
27
- /** Class name applied to the tooltip area */
28
- className?: string;
29
- /** ID applied to the target element */
30
- targetElementId?: string;
31
- /** Class name applied to the target element */
32
- targetElementClassName?: string;
33
- /** Style object applied to the target element */
34
- targetElementStyle?: CSSProperties;
35
- /** Class name applied to the tooltip/message element */
36
- messageElementClassName?: string;
37
- /** Styles applied to the tooltip/message element */
38
- messageElementStyle?: CSSProperties;
39
- /**
40
- * The element to which the tooltip should be attached.
41
- * This can be any valid React element.
42
- * When not provided, the tooltip will be attached to the `document.body`.
43
- * No default is provided at the TooltipArea signature level in order to prevent the component from failing builds in server environments, where `document` is not available.
44
- */
45
- parentElement?: HTMLElement;
46
- }
47
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/component/Tooltip/common/TooltipArea/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACxE;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yCAAyC;IACzC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,wDAAwD;IACxD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B"}
@@ -1,2 +0,0 @@
1
- export * from "./TooltipArea/index.js";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/component/Tooltip/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}