cecomponent 2.0.61 → 2.0.63
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/ce-component-lib.css +1 -1
- package/dist/ce-component-lib.js +41 -41
- package/dist/ce-component-lib.mjs +1316 -1278
- package/dist/components/Common/CETooltip/CETooltip.d.ts +74 -0
- package/dist/components/Common/CETooltip/CETooltip.stories.d.ts +25 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/components/Common/Menu/{CEMenubar.d.ts → CEMenuBar.d.ts} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Position variants for the tooltip
|
|
4
|
+
*/
|
|
5
|
+
export type TooltipPosition = "top" | "bottom" | "left" | "right";
|
|
6
|
+
/**
|
|
7
|
+
* Tooltip style variants
|
|
8
|
+
*/
|
|
9
|
+
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
|
+
export interface CETooltipProps {
|
|
24
|
+
/** The content displayed inside the tooltip */
|
|
25
|
+
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 */
|
|
29
|
+
position?: TooltipPosition;
|
|
30
|
+
/** Visual variant/style of the tooltip */
|
|
31
|
+
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 */
|
|
37
|
+
showArrow?: boolean;
|
|
38
|
+
/** Additional CSS class names */
|
|
39
|
+
className?: string;
|
|
40
|
+
/** Inline styles for the tooltip container */
|
|
41
|
+
sx?: React.CSSProperties;
|
|
42
|
+
/** Whether the tooltip is disabled */
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/** Optional ID for testing purposes */
|
|
45
|
+
id?: string;
|
|
46
|
+
/** Optional name for testing purposes */
|
|
47
|
+
name?: string;
|
|
48
|
+
/** Maximum width of the tooltip content (defaults to auto-adjust based on content, max 90vw on mobile) */
|
|
49
|
+
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) */
|
|
53
|
+
cardContent?: {
|
|
54
|
+
title?: string;
|
|
55
|
+
subtitle?: string;
|
|
56
|
+
sections?: Array<{
|
|
57
|
+
label: string;
|
|
58
|
+
items: Array<{
|
|
59
|
+
label: string;
|
|
60
|
+
value: string;
|
|
61
|
+
isHighlighted?: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
}>;
|
|
64
|
+
backgroundColor?: string;
|
|
65
|
+
textColor?: string;
|
|
66
|
+
titleColor?: string;
|
|
67
|
+
subtitleColor?: string;
|
|
68
|
+
fontFamily?: string;
|
|
69
|
+
fontSize?: string;
|
|
70
|
+
fontWeight?: string | number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
declare const CETooltip: React.FC<CETooltipProps>;
|
|
74
|
+
export default CETooltip;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as CETooltip } from './CETooltip';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta<typeof CETooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const PositionBottom: Story;
|
|
8
|
+
export declare const PositionLeft: Story;
|
|
9
|
+
export declare const PositionRight: Story;
|
|
10
|
+
export declare const LightVariant: Story;
|
|
11
|
+
export declare const ClickTrigger: Story;
|
|
12
|
+
export declare const FocusTrigger: Story;
|
|
13
|
+
export declare const WithoutArrow: Story;
|
|
14
|
+
export declare const Disabled: Story;
|
|
15
|
+
export declare const LongContent: Story;
|
|
16
|
+
export declare const NoDelay: Story;
|
|
17
|
+
export declare const CustomDelay: Story;
|
|
18
|
+
export declare const AllPositions: Story;
|
|
19
|
+
export declare const Variants: Story;
|
|
20
|
+
export declare const TriggerTypes: Story;
|
|
21
|
+
export declare const CustomStyling: Story;
|
|
22
|
+
export declare const ComponentContent: Story;
|
|
23
|
+
export declare const MultipleTooltips: Story;
|
|
24
|
+
export declare const OnFormInput: Story;
|
|
25
|
+
export declare const CardStyled: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export { default as CEUserInfo } from './components/Common/Header/UserInfo';
|
|
|
35
35
|
export { default as CEInputBox } from './components/Common/InputBox/CEInputTextBox';
|
|
36
36
|
export { default as CEInputDropDown } from './components/Common/InputDropDown/InputDropDown';
|
|
37
37
|
export { default as CELinearProgressBar } from './components/Common/LinearProgressBar/LinearBar';
|
|
38
|
-
export { default as CEMenuBar } from './components/Common/Menu/
|
|
38
|
+
export { default as CEMenuBar } from './components/Common/Menu/CEMenuBar';
|
|
39
39
|
export { default as CEPagination } from './components/Common/Pagination/CEPagination';
|
|
40
40
|
export { default as CERadioGroup } from './components/Common/RadioButton/CERadioButtonGroup';
|
|
41
41
|
export { default as CERadioButton } from './components/Common/RadioButton/CERadioButton';
|
package/package.json
CHANGED
|
File without changes
|