@coreui/react 4.9.0-beta.0 → 4.9.0-beta.2
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/README.md +1 -1
- package/dist/components/dropdown/CDropdown.d.ts +8 -1
- package/dist/components/dropdown/CDropdownMenu.d.ts +3 -4
- package/dist/components/dropdown copy/CDropdown.d.ts +89 -0
- package/dist/components/dropdown copy/CDropdownDivider.d.ts +8 -0
- package/dist/components/dropdown copy/CDropdownHeader.d.ts +12 -0
- package/dist/components/dropdown copy/CDropdownItem.d.ts +13 -0
- package/dist/components/dropdown copy/CDropdownItemPlain.d.ts +12 -0
- package/dist/components/dropdown copy/CDropdownMenu.d.ts +13 -0
- package/dist/components/dropdown copy/CDropdownToggle.d.ts +24 -0
- package/dist/components/dropdown copy/index.d.ts +8 -0
- package/dist/components/popover/CPopover.d.ts +22 -1
- package/dist/components/progress/CProgress.d.ts +6 -0
- package/dist/components/progress/CProgressStacked.d.ts +12 -0
- package/dist/components/progress/index.d.ts +2 -1
- package/dist/components/tooltip/CTooltip.d.ts +22 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/useColorModes.d.ts +4 -2
- package/dist/hooks/usePopper.d.ts +8 -0
- package/dist/index.es.js +1527 -1915
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1312 -1716
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +1 -0
- package/dist/utils/getRTLPlacement.d.ts +3 -0
- package/dist/utils/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/components/dropdown/CDropdown.tsx +130 -45
- package/src/components/dropdown/CDropdownMenu.tsx +41 -138
- package/src/components/dropdown/CDropdownToggle.tsx +6 -15
- package/src/components/dropdown/__tests__/__snapshots__/CDropdownMenu.spec.tsx.snap +0 -1
- package/src/components/popover/CPopover.tsx +76 -51
- package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +0 -21
- package/src/components/progress/CProgress.tsx +43 -8
- package/src/components/progress/CProgressBar.tsx +5 -6
- package/src/components/progress/CProgressStacked.tsx +39 -0
- package/src/components/progress/index.ts +2 -1
- package/src/components/tooltip/CTooltip.tsx +77 -52
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useColorModes.ts +23 -11
- package/src/hooks/usePopper.ts +31 -0
- package/src/props.ts +5 -0
- package/src/utils/getRTLPlacement.ts +18 -0
- package/src/utils/index.ts +2 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
Several quick start options are available:
|
|
48
48
|
|
|
49
|
-
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.9.0-beta.
|
|
49
|
+
- [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.9.0-beta.2.zip)
|
|
50
50
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
51
51
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
52
52
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
|
@@ -46,8 +46,14 @@ export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
|
|
|
46
46
|
* Sets a specified direction and location of the dropdown menu.
|
|
47
47
|
*/
|
|
48
48
|
direction?: 'center' | 'dropup' | 'dropup-center' | 'dropend' | 'dropstart';
|
|
49
|
+
/**
|
|
50
|
+
* Offset of the dropdown menu relative to its target.
|
|
51
|
+
*/
|
|
52
|
+
offset?: [number, number];
|
|
49
53
|
/**
|
|
50
54
|
* Callback fired when the component requests to be hidden.
|
|
55
|
+
*
|
|
56
|
+
* @since 4.9.0-beta.2
|
|
51
57
|
*/
|
|
52
58
|
onHide?: () => void;
|
|
53
59
|
/**
|
|
@@ -80,7 +86,8 @@ export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIEl
|
|
|
80
86
|
visible?: boolean;
|
|
81
87
|
}
|
|
82
88
|
interface ContextProps extends CDropdownProps {
|
|
83
|
-
dropdownToggleRef: RefObject<any
|
|
89
|
+
dropdownToggleRef: RefObject<any | undefined>;
|
|
90
|
+
dropdownMenuRef: RefObject<HTMLDivElement | HTMLUListElement | undefined>;
|
|
84
91
|
setVisible: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
85
92
|
portal: boolean;
|
|
86
93
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ElementType,
|
|
2
|
-
|
|
3
|
-
export interface CDropdownMenuProps extends HTMLAttributes<HTMLDivElement | HTMLUListElement>, Omit<PopperChildrenProps, 'arrowProps' | 'forceUpdate' | 'hasPopperEscaped' | 'isReferenceHidden' | 'placement' | 'ref' | 'style' | 'update'> {
|
|
1
|
+
import React, { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
export interface CDropdownMenuProps extends HTMLAttributes<HTMLDivElement | HTMLUListElement> {
|
|
4
3
|
/**
|
|
5
4
|
* A string of all className you want applied to the base component.
|
|
6
5
|
*/
|
|
@@ -10,4 +9,4 @@ export interface CDropdownMenuProps extends HTMLAttributes<HTMLDivElement | HTML
|
|
|
10
9
|
*/
|
|
11
10
|
component?: string | ElementType;
|
|
12
11
|
}
|
|
13
|
-
export declare const CDropdownMenu:
|
|
12
|
+
export declare const CDropdownMenu: React.ForwardRefExoticComponent<CDropdownMenuProps & React.RefAttributes<HTMLDivElement | HTMLUListElement>>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { ElementType, HTMLAttributes, RefObject } from 'react';
|
|
2
|
+
import type { Placements } from '../../types';
|
|
3
|
+
export type Directions = 'start' | 'end';
|
|
4
|
+
export type Breakpoints = {
|
|
5
|
+
xs: Directions;
|
|
6
|
+
} | {
|
|
7
|
+
sm: Directions;
|
|
8
|
+
} | {
|
|
9
|
+
md: Directions;
|
|
10
|
+
} | {
|
|
11
|
+
lg: Directions;
|
|
12
|
+
} | {
|
|
13
|
+
xl: Directions;
|
|
14
|
+
} | {
|
|
15
|
+
xxl: Directions;
|
|
16
|
+
};
|
|
17
|
+
export type Alignments = Directions | Breakpoints;
|
|
18
|
+
export interface CDropdownProps extends HTMLAttributes<HTMLDivElement | HTMLLIElement> {
|
|
19
|
+
/**
|
|
20
|
+
* Set aligment of dropdown menu.
|
|
21
|
+
*
|
|
22
|
+
* @type 'start' | 'end' | { xs: 'start' | 'end' } | { sm: 'start' | 'end' } | { md: 'start' | 'end' } | { lg: 'start' | 'end' } | { xl: 'start' | 'end'} | { xxl: 'start' | 'end'}
|
|
23
|
+
*/
|
|
24
|
+
alignment?: Alignments;
|
|
25
|
+
/**
|
|
26
|
+
* Configure the auto close behavior of the dropdown:
|
|
27
|
+
* - `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.
|
|
28
|
+
* - `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
|
|
29
|
+
* - `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.
|
|
30
|
+
* - `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.
|
|
31
|
+
*/
|
|
32
|
+
autoClose?: 'inside' | 'outside' | boolean;
|
|
33
|
+
/**
|
|
34
|
+
* A string of all className you want applied to the base component.
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
39
|
+
*/
|
|
40
|
+
component?: string | ElementType;
|
|
41
|
+
/**
|
|
42
|
+
* Sets a darker color scheme to match a dark navbar.
|
|
43
|
+
*/
|
|
44
|
+
dark?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Sets a specified direction and location of the dropdown menu.
|
|
47
|
+
*/
|
|
48
|
+
direction?: 'center' | 'dropup' | 'dropup-center' | 'dropend' | 'dropstart';
|
|
49
|
+
/**
|
|
50
|
+
* Callback fired when the component requests to be hidden.
|
|
51
|
+
*/
|
|
52
|
+
onHide?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Callback fired when the component requests to be shown.
|
|
55
|
+
*/
|
|
56
|
+
onShow?: () => void;
|
|
57
|
+
/**
|
|
58
|
+
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
|
|
59
|
+
*
|
|
60
|
+
* @type 'auto' | 'top-end' | 'top' | 'top-start' | 'bottom-end' | 'bottom' | 'bottom-start' | 'right-start' | 'right' | 'right-end' | 'left-start' | 'left' | 'left-end'
|
|
61
|
+
*/
|
|
62
|
+
placement?: Placements;
|
|
63
|
+
/**
|
|
64
|
+
* If you want to disable dynamic positioning set this property to `true`.
|
|
65
|
+
*/
|
|
66
|
+
popper?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Generates dropdown menu using createPortal.
|
|
69
|
+
*
|
|
70
|
+
* @since 4.8.0
|
|
71
|
+
*/
|
|
72
|
+
portal?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item.
|
|
75
|
+
*/
|
|
76
|
+
variant?: 'btn-group' | 'dropdown' | 'input-group' | 'nav-item';
|
|
77
|
+
/**
|
|
78
|
+
* Toggle the visibility of dropdown menu component.
|
|
79
|
+
*/
|
|
80
|
+
visible?: boolean;
|
|
81
|
+
}
|
|
82
|
+
interface ContextProps extends CDropdownProps {
|
|
83
|
+
dropdownToggleRef: RefObject<any> | undefined;
|
|
84
|
+
setVisible: React.Dispatch<React.SetStateAction<boolean | undefined>>;
|
|
85
|
+
portal: boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare const CDropdownContext: React.Context<ContextProps>;
|
|
88
|
+
export declare const CDropdown: React.ForwardRefExoticComponent<CDropdownProps & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
export interface CDropdownDividerProps extends HTMLAttributes<HTMLHRElement> {
|
|
3
|
+
/**
|
|
4
|
+
* A string of all className you want applied to the component.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CDropdownDivider: React.ForwardRefExoticComponent<CDropdownDividerProps & React.RefAttributes<HTMLHRElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
export interface CDropdownHeaderProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
+
/**
|
|
4
|
+
* A string of all className you want applied to the component.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
9
|
+
*/
|
|
10
|
+
component?: string | ElementType;
|
|
11
|
+
}
|
|
12
|
+
export declare const CDropdownHeader: React.ForwardRefExoticComponent<CDropdownHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { CLinkProps } from '../link/CLink';
|
|
3
|
+
export interface CDropdownItemProps extends CLinkProps {
|
|
4
|
+
/**
|
|
5
|
+
* A string of all className you want applied to the component.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
10
|
+
*/
|
|
11
|
+
component?: string | ElementType;
|
|
12
|
+
}
|
|
13
|
+
export declare const CDropdownItem: React.ForwardRefExoticComponent<CDropdownItemProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
export interface CDropdownItemPlainProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
/**
|
|
4
|
+
* A string of all className you want applied to the component.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
9
|
+
*/
|
|
10
|
+
component?: string | ElementType;
|
|
11
|
+
}
|
|
12
|
+
export declare const CDropdownItemPlain: React.ForwardRefExoticComponent<CDropdownItemPlainProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementType, FC, HTMLAttributes } from 'react';
|
|
2
|
+
import { PopperChildrenProps } from 'react-popper';
|
|
3
|
+
export interface CDropdownMenuProps extends HTMLAttributes<HTMLDivElement | HTMLUListElement>, Omit<PopperChildrenProps, 'arrowProps' | 'forceUpdate' | 'hasPopperEscaped' | 'isReferenceHidden' | 'placement' | 'ref' | 'style' | 'update'> {
|
|
4
|
+
/**
|
|
5
|
+
* A string of all className you want applied to the base component.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Component used for the root node. Either a string to use a HTML element or a component.
|
|
10
|
+
*/
|
|
11
|
+
component?: string | ElementType;
|
|
12
|
+
}
|
|
13
|
+
export declare const CDropdownMenu: FC<CDropdownMenuProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CButtonProps } from '../button/CButton';
|
|
3
|
+
import type { Triggers } from '../../types';
|
|
4
|
+
export interface CDropdownToggleProps extends Omit<CButtonProps, 'type'> {
|
|
5
|
+
/**
|
|
6
|
+
* Enables pseudo element caret on toggler.
|
|
7
|
+
*/
|
|
8
|
+
caret?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Create a custom toggler which accepts any content.
|
|
11
|
+
*/
|
|
12
|
+
custom?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of `.dropdown-toggle-split` className for proper spacing around the dropdown caret.
|
|
15
|
+
*/
|
|
16
|
+
split?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
|
|
19
|
+
*
|
|
20
|
+
* @type 'hover' | 'focus' | 'click'
|
|
21
|
+
*/
|
|
22
|
+
trigger?: Triggers | Triggers[];
|
|
23
|
+
}
|
|
24
|
+
export declare const CDropdownToggle: FC<CDropdownToggleProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CDropdown } from './CDropdown';
|
|
2
|
+
import { CDropdownDivider } from './CDropdownDivider';
|
|
3
|
+
import { CDropdownHeader } from './CDropdownHeader';
|
|
4
|
+
import { CDropdownItem } from './CDropdownItem';
|
|
5
|
+
import { CDropdownItemPlain } from './CDropdownItemPlain';
|
|
6
|
+
import { CDropdownMenu } from './CDropdownMenu';
|
|
7
|
+
import { CDropdownToggle } from './CDropdownToggle';
|
|
8
|
+
export { CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownItemPlain, CDropdownMenu, CDropdownToggle, };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type { Triggers } from '../../types';
|
|
2
|
+
import type { Placements, Triggers } from '../../types';
|
|
3
3
|
export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'content'> {
|
|
4
|
+
/**
|
|
5
|
+
* Apply a CSS fade transition to the popover.
|
|
6
|
+
*
|
|
7
|
+
* @since 4.9.0-beta.2
|
|
8
|
+
*/
|
|
9
|
+
animation?: boolean;
|
|
4
10
|
/**
|
|
5
11
|
* A string of all className you want applied to the component.
|
|
6
12
|
*/
|
|
@@ -13,6 +19,21 @@ export interface CPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
13
19
|
* Offset of the popover relative to its target.
|
|
14
20
|
*/
|
|
15
21
|
offset?: [number, number];
|
|
22
|
+
/**
|
|
23
|
+
* The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
|
|
24
|
+
*
|
|
25
|
+
* @since 4.9.0-beta.2
|
|
26
|
+
*/
|
|
27
|
+
delay?: number | {
|
|
28
|
+
show: number;
|
|
29
|
+
hide: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
|
|
33
|
+
*
|
|
34
|
+
* @since 4.9.0-beta.2
|
|
35
|
+
*/
|
|
36
|
+
fallbackPlacements?: Placements | Placements[];
|
|
16
37
|
/**
|
|
17
38
|
* Callback fired when the component requests to be hidden.
|
|
18
39
|
*/
|
|
@@ -9,6 +9,12 @@ export interface CProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'co
|
|
|
9
9
|
* Sets the height of the component. If you set that value the inner `<CProgressBar>` will automatically resize accordingly.
|
|
10
10
|
*/
|
|
11
11
|
height?: number;
|
|
12
|
+
/**
|
|
13
|
+
* A string of all className you want applied to the <CProgressBar/> component.
|
|
14
|
+
*
|
|
15
|
+
* @since 4.9.0
|
|
16
|
+
*/
|
|
17
|
+
progressBarClassName?: string;
|
|
12
18
|
/**
|
|
13
19
|
* Makes progress bar thinner.
|
|
14
20
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
export interface CProgressStackedProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* A string of all className you want applied to the component.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CProgressStackedContextProps {
|
|
9
|
+
stacked?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const CProgressStackedContext: React.Context<CProgressStackedContextProps>;
|
|
12
|
+
export declare const CProgressStacked: React.ForwardRefExoticComponent<CProgressStackedProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import type { Triggers } from '../../types';
|
|
2
|
+
import type { Placements, Triggers } from '../../types';
|
|
3
3
|
export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
4
|
+
/**
|
|
5
|
+
* Apply a CSS fade transition to the tooltip.
|
|
6
|
+
*
|
|
7
|
+
* @since 4.9.0-beta.2
|
|
8
|
+
*/
|
|
9
|
+
animation?: boolean;
|
|
4
10
|
/**
|
|
5
11
|
* A string of all className you want applied to the component.
|
|
6
12
|
*/
|
|
@@ -9,6 +15,21 @@ export interface CTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'con
|
|
|
9
15
|
* Content node for your component.
|
|
10
16
|
*/
|
|
11
17
|
content: ReactNode | string;
|
|
18
|
+
/**
|
|
19
|
+
* The delay for displaying and hiding the tooltip (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
|
|
20
|
+
*
|
|
21
|
+
* @since 4.9.0-beta.2
|
|
22
|
+
*/
|
|
23
|
+
delay?: number | {
|
|
24
|
+
show: number;
|
|
25
|
+
hide: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
|
|
29
|
+
*
|
|
30
|
+
* @since 4.9.0-beta.2
|
|
31
|
+
*/
|
|
32
|
+
fallbackPlacements?: Placements | Placements[];
|
|
12
33
|
/**
|
|
13
34
|
* Offset of the tooltip relative to its target.
|
|
14
35
|
*/
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
1
2
|
interface UseColorModesOutput {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
colorMode: string | undefined;
|
|
4
|
+
isColorModeSet: () => boolean;
|
|
5
|
+
setColorMode: Dispatch<SetStateAction<string>>;
|
|
4
6
|
}
|
|
5
7
|
export declare const useColorModes: (localStorageItemName?: string) => UseColorModesOutput;
|
|
6
8
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Instance, Options } from '@popperjs/core';
|
|
2
|
+
interface UsePopperOutput {
|
|
3
|
+
popper: Instance | undefined;
|
|
4
|
+
initPopper: (reference: HTMLElement, popper: HTMLElement, options: Partial<Options>) => void;
|
|
5
|
+
destroyPopper: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const usePopper: () => UsePopperOutput;
|
|
8
|
+
export {};
|