cecomponent 2.0.67 → 2.0.69

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.
@@ -1,55 +1,20 @@
1
1
  import { default as React } from 'react';
2
- /**
3
- * Position variants for the tooltip
4
- */
5
2
  export type TooltipPosition = "top" | "bottom" | "left" | "right";
6
- /**
7
- * Tooltip style variants
8
- */
9
3
  export type TooltipVariant = "dark" | "light" | "info" | "success" | "warning" | "error" | "primary" | "card";
10
- /**
11
- * Trigger types for showing the tooltip
12
- */
13
- export type TooltipTrigger = "hover" | "click" | "focus";
14
- /**
15
- * Props for CETooltip component
16
- *
17
- * The CETooltip component provides a reusable tooltip that displays additional information
18
- * when users interact with the trigger element. Supports multiple positions, variants, and triggers.
19
- *
20
- * id and name are optional attributes primarily intended to aid unit tests
21
- * (e.g. querying by id or data-name).
22
- */
23
4
  export interface CETooltipProps {
24
- /** The content displayed inside the tooltip */
25
5
  content?: React.ReactNode;
26
- /** The element that triggers the tooltip display */
27
- children: React.ReactNode;
28
- /** Position of the tooltip relative to the trigger element */
6
+ isOpen: boolean;
29
7
  position?: TooltipPosition;
30
- /** Visual variant/style of the tooltip */
31
8
  variant?: TooltipVariant;
32
- /** How the tooltip is triggered */
33
- trigger?: TooltipTrigger;
34
- /** Delay in milliseconds before showing the tooltip */
35
- delay?: number;
36
- /** Show an arrow pointing to the trigger element */
9
+ onClose?: () => void;
37
10
  showArrow?: boolean;
38
- /** Additional CSS class names */
39
11
  className?: string;
40
- /** Inline styles for the tooltip container */
41
12
  sx?: React.CSSProperties;
42
- /** Whether the tooltip is disabled */
43
13
  disabled?: boolean;
44
- /** Optional ID for testing purposes */
45
14
  id?: string;
46
- /** Optional name for testing purposes */
47
15
  name?: string;
48
- /** Maximum width of the tooltip content (defaults to auto-adjust based on content, max 90vw on mobile) */
49
16
  maxWidth?: number | string;
50
- /** Enable/disable animation (defaults to false for click trigger, true for others) */
51
- animate?: boolean;
52
- /** Card content structure for card variant (alternative to content) */
17
+ anchorRect?: DOMRect | null;
53
18
  cardContent?: {
54
19
  title?: string;
55
20
  subtitle?: string;
@@ -53,7 +53,7 @@ interface CEDataGridDynamicTableProps {
53
53
  * If omitted, existing clickableColumns / conditionalClickableColumns behavior is used.
54
54
  */
55
55
  clickableCellPredicate?: (rowData: any, columnId: string) => boolean;
56
- handleCellClick?: (data: any, columnId?: any) => void;
56
+ handleCellClick?: (data: any, columnId?: any, event?: any) => void;
57
57
  onReload?: () => void;
58
58
  showDownloadIcon?: boolean;
59
59
  downloadOptions?: Array<{
package/dist/index.d.ts CHANGED
@@ -63,3 +63,4 @@ export { default as CEBarChart } from './components/Common/CECharts/CEBarCharts'
63
63
  export { default as CEPieChart } from './components/Common/CECharts/CEPieCharts';
64
64
  export { default as CEStackedBarChart } from './components/Common/CECharts/CEStackedBarChart';
65
65
  export { default as CEStackedLineChart } from './components/Common/CECharts/CEStackedLineChart';
66
+ export { default as CETooltip } from './components/Common/CETooltip/CETooltip';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cecomponent",
3
3
  "description": "A React component library for building modern UIs for Cleanearth",
4
- "version": "2.0.67",
4
+ "version": "2.0.69",
5
5
  "main": "dist/ce-component-lib.js",
6
6
  "module": "dist/ce-component-lib.mjs",
7
7
  "types": "dist/idex.d.ts",