@geneui/components 3.0.0-next-9bedd8e-12022025 → 3.0.0-next-ca44d76-15022025
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/Button.js +5 -5
- package/Checkbox.js +2 -0
- package/Close-e8302008.js +23 -0
- package/GeneUIProvider.js +1 -1
- package/Info.js +3 -26
- package/InfoOutline-dd2e89d9.js +29 -0
- package/Label.js +2 -0
- package/Pill.js +1 -0
- package/Popover.js +12 -0
- package/ProgressBar.js +2 -0
- package/Tag.js +3 -20
- package/Tooltip.js +3 -3318
- package/components/atoms/Button/Button.d.ts +1 -1
- package/components/atoms/Popover/Helper.d.ts +8 -0
- package/components/atoms/Popover/Popover.d.ts +64 -0
- package/components/atoms/Popover/PopoverBody.d.ts +3 -0
- package/components/atoms/Popover/PopoverFooter.d.ts +3 -0
- package/components/atoms/Popover/PopoverFooterActions.d.ts +3 -0
- package/components/atoms/Popover/index.d.ts +4 -0
- package/floating-ui.react-0485e4db.js +3898 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useScrollLock/index.d.ts +1 -0
- package/hooks/useScrollLock/useScrollLock.d.ts +7 -0
- package/index-18e397a9.js +342 -0
- package/index.d.ts +2 -0
- package/index.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Placement } from "@floating-ui/utils";
|
|
2
|
+
export declare const getPositionRect: (currentPopoverRect: DOMRect, position: Placement) => DOMRect | {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
right: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const calculateOverlap: (rect1: DOMRect, rect2: DOMRect) => number;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Dispatch, FC, ReactNode, SetStateAction } from "react";
|
|
2
|
+
import "./Popover.scss";
|
|
3
|
+
type Positions = "bottom" | "bottom-start" | "bottom-end" | "left-end" | "left" | "left-start" | "right-end" | "right" | "right-start" | "top" | "top-start" | "top-end" | "auto";
|
|
4
|
+
export declare const correctPosition: Record<string, Positions>;
|
|
5
|
+
export type StaticSides = "bottom" | "left" | "right" | "top";
|
|
6
|
+
export declare const staticSides: Record<string, StaticSides>;
|
|
7
|
+
export interface IPopoverProps {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the popover is open initially. Defaults value is `false`.
|
|
10
|
+
*/
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Define width and height of the popover.<br>
|
|
14
|
+
* Possible values: <code> xLarge | large | medium | small </code>
|
|
15
|
+
*/
|
|
16
|
+
size?: "xLarge" | "large" | "medium" | "small" | "mobile";
|
|
17
|
+
/**
|
|
18
|
+
* Title displayed in the popover header.
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Position of the popover, relative to the target.<br><br>
|
|
23
|
+
* Possible values: <code> bottom-center | bottom-left | bottom-right | left-bottom | left-center | left-top | <br><br> right-bottom | right-center | right-top | top-center | top-left | top-right | auto </code>
|
|
24
|
+
*/
|
|
25
|
+
position?: keyof typeof correctPosition;
|
|
26
|
+
/**
|
|
27
|
+
* Padding between the popover and its target element.
|
|
28
|
+
*/
|
|
29
|
+
padding?: number;
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, the popover is always visible.
|
|
32
|
+
*/
|
|
33
|
+
alwaysShow?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Function to update popover props dynamically.
|
|
36
|
+
*/
|
|
37
|
+
setProps: Dispatch<SetStateAction<Record<string, unknown>>>;
|
|
38
|
+
/**
|
|
39
|
+
* Additional content displayed in the popover footer.
|
|
40
|
+
*/
|
|
41
|
+
footerContent?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* The content displayed inside the popover.
|
|
44
|
+
*/
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Show or hide arrows
|
|
48
|
+
*/
|
|
49
|
+
withArrow?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* If this property is enabled, rather than the popover content repositioning on a boundary collision,
|
|
52
|
+
* the popover content container will move beyond the window's bounds.
|
|
53
|
+
* You are, however, supplied with nudgedLeft and nudgedTop values, so you may choose to handle content overflow as you wish.
|
|
54
|
+
*/
|
|
55
|
+
disableReposition?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
Popover displays additional content or information in an overlay box.
|
|
59
|
+
It appears on top of the main content when triggered by a user action,
|
|
60
|
+
such as a click or hover. Unlike tooltips, popovers can contain more
|
|
61
|
+
complex and interactive content, including text, images, and form elements.
|
|
62
|
+
*/
|
|
63
|
+
declare const Popover: FC<IPopoverProps>;
|
|
64
|
+
export default Popover;
|