@lumx/react 3.1.3 → 3.1.4-alpha-popover.0
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/index.d.ts +7 -3
- package/index.js +1736 -2134
- package/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/dropdown/Dropdown.tsx +2 -1
- package/src/components/popover/Popover.stories.tsx +46 -119
- package/src/components/popover/Popover.tsx +118 -278
- package/src/components/popover/__snapshots__/Popover.test.tsx.snap +143 -306
- package/src/components/popover/constants.ts +57 -0
- package/src/components/popover/index.ts +2 -0
- package/src/components/popover/usePopoverStyle.tsx +156 -0
- package/src/components/popover-dialog/PopoverDialog.stories.tsx +1 -1
- package/src/components/select/WithSelectContext.tsx +1 -1
- package/src/components/tooltip/Tooltip.stories.tsx +13 -11
- package/src/components/tooltip/Tooltip.tsx +54 -56
- package/src/utils/skipRenderHOC.tsx +16 -0
package/index.d.ts
CHANGED
|
@@ -720,12 +720,16 @@ interface Offset {
|
|
|
720
720
|
* Popover elevation index.
|
|
721
721
|
*/
|
|
722
722
|
declare type Elevation = 1 | 2 | 3 | 4 | 5;
|
|
723
|
-
|
|
723
|
+
/**
|
|
724
|
+
* Popover fit anchor width options.
|
|
725
|
+
*/
|
|
726
|
+
declare const FitAnchorWidth: {
|
|
724
727
|
readonly MAX_WIDTH: "maxWidth";
|
|
725
728
|
readonly MIN_WIDTH: "minWidth";
|
|
726
729
|
readonly WIDTH: "width";
|
|
727
730
|
};
|
|
728
|
-
declare type
|
|
731
|
+
declare type FitAnchorWidth = ValueOf<typeof FitAnchorWidth>;
|
|
732
|
+
|
|
729
733
|
/**
|
|
730
734
|
* Defines the props of the component.
|
|
731
735
|
*/
|
|
@@ -748,7 +752,7 @@ interface PopoverProps extends GenericProps {
|
|
|
748
752
|
* - `minWidth` or `true`: popover not smaller than anchor
|
|
749
753
|
* - `width`: popover equal to the anchor.
|
|
750
754
|
*/
|
|
751
|
-
fitToAnchorWidth?:
|
|
755
|
+
fitToAnchorWidth?: FitAnchorWidth | boolean;
|
|
752
756
|
/** Shrink popover if even after flipping there is not enough space. */
|
|
753
757
|
fitWithinViewportHeight?: boolean;
|
|
754
758
|
/** Element to focus when opening the popover. */
|