@veeqo/ui 4.0.0 → 4.0.2-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/Popover/Popover.d.ts +3 -15
- package/dist/components/Popover/hooks/useUpdateAriaAnchor.d.ts +11 -0
- package/dist/components/Popover/hooks/useUpdateAriaAnchor.test.d.ts +1 -0
- package/dist/components/Popover/styled.d.ts +6 -0
- package/dist/components/Popover/types.d.ts +23 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.esm.js +14 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -5
- package/dist/components/Popover/PopoverDemo.d.ts +0 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ In the longer term Icons and Integrations **WILL** be moved to their own library
|
|
|
10
10
|
|
|
11
11
|
### Links ⚓️
|
|
12
12
|
|
|
13
|
-
**This Library**: [Storybook 📋](https
|
|
13
|
+
**This Library**: [Storybook 📋](https:/ui.veeqo.amazon.dev/?path=/docs/get-started-how-to-install--docs) | [Playroom 🛝](https://ui.veeqo.amazon.dev/playroom/)
|
|
14
14
|
|
|
15
15
|
**Old Library**: [Storybook 📋](https://master.d1cz47hw90nvy2.amplifyapp.com/) | [Playroom 🛝](https://master.d1cz47hw90nvy2.amplifyapp.com/playroom)
|
|
16
16
|
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
4
|
-
zIndex: number;
|
|
5
|
-
}, never>;
|
|
6
|
-
export type PopoverProps = {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
anchorElement: HTMLElement | null;
|
|
10
|
-
rootElementRef?: HTMLElement;
|
|
11
|
-
placement?: Placement;
|
|
12
|
-
onShouldClose?: () => void;
|
|
13
|
-
zIndex?: number;
|
|
14
|
-
};
|
|
15
|
-
export declare const Popover: ({ children, className, anchorElement, rootElementRef, placement, onShouldClose, zIndex, }: PopoverProps) => React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverProps } from './types';
|
|
3
|
+
export declare const Popover: ({ id: passedId, children, zIndex, placement, anchorElement, rootElementRef, shards, onShouldClose, style, enableFocusTrap, ...dialogProps }: PopoverProps) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type UseUpdateAriaAnchor = {
|
|
2
|
+
anchorElement: HTMLElement | null;
|
|
3
|
+
popoverId: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Update the anchor element to sent the required attributes if they haven't already set them.
|
|
7
|
+
*
|
|
8
|
+
* This allows current, inaccesible usages to be improved.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useUpdateAriaAnchor: ({ anchorElement, popoverId }: UseUpdateAriaAnchor) => void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DialogHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@popperjs/core';
|
|
3
|
+
import { ReactFocusOnProps } from 'react-focus-on/dist/es5/types';
|
|
4
|
+
export type PopoverProps = DialogHTMLAttributes<HTMLDialogElement> & {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
placement?: Placement;
|
|
8
|
+
anchorElement: HTMLElement | null;
|
|
9
|
+
rootElementRef?: HTMLElement;
|
|
10
|
+
/**
|
|
11
|
+
* Boolean to enable focus trapping behavour. Should usually use this, however, if
|
|
12
|
+
* you are taking manual control of focus behaviour you may disable it.
|
|
13
|
+
*/
|
|
14
|
+
enableFocusTrap?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* An array of Elements which should be WITHIN the focus trap i.e. sub-menu.
|
|
17
|
+
*/
|
|
18
|
+
shards?: ReactFocusOnProps['shards'];
|
|
19
|
+
/**
|
|
20
|
+
* When background is clicked, or ESC key is pressed we call this to close the popover.
|
|
21
|
+
*/
|
|
22
|
+
onShouldClose: () => void;
|
|
23
|
+
};
|
|
@@ -22,6 +22,7 @@ export { FilterTag } from './FilterTag';
|
|
|
22
22
|
export { Grid } from './Grid';
|
|
23
23
|
export { Image } from './Image';
|
|
24
24
|
export { InputGroup } from './InputGroup';
|
|
25
|
+
export { LegacyDataTable } from './LegacyDataTable';
|
|
25
26
|
export { Loader } from './Loader';
|
|
26
27
|
export { LoginWithAmazonButton } from './LoginWithAmazonButton';
|
|
27
28
|
export { Modal } from './Modal';
|