@fluid-topics/ft-popover 2.0.4 → 2.0.6
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/build/ft-popover.light.js +72 -72
- package/build/ft-popover.min.js +69 -69
- package/build/ftds-popover.js +5 -3
- package/package.json +7 -7
package/build/ftds-popover.js
CHANGED
|
@@ -12,7 +12,7 @@ import { FtdsTypography, FtdsTypographyVariants } from "@fluid-topics/ft-typogra
|
|
|
12
12
|
import { FtdsButton } from "@fluid-topics/ft-button";
|
|
13
13
|
import { styles } from "./ftds-popover.styles";
|
|
14
14
|
import { classMap } from "lit/directives/class-map.js";
|
|
15
|
-
import { DesignSystemFamily, DesignSystemSize } from "@fluid-topics/design-system-variables";
|
|
15
|
+
import { DesignSystemFamily, DesignSystemSize, popover } from "@fluid-topics/design-system-variables";
|
|
16
16
|
import { FtIcons } from "@fluid-topics/ft-icon";
|
|
17
17
|
class FtdsPopover extends FtLitElement {
|
|
18
18
|
constructor() {
|
|
@@ -141,8 +141,10 @@ class FtdsPopover extends FtLitElement {
|
|
|
141
141
|
this.popoverWrapper.style.left = "";
|
|
142
142
|
this.popoverWrapper.style.top = "";
|
|
143
143
|
if (this.openingButton) {
|
|
144
|
-
const
|
|
145
|
-
const
|
|
144
|
+
const allowedPlacements = ["bottom-start", "right-start", "bottom-end", "right-end", "left-start", "left-end", "top-start", "top-end"];
|
|
145
|
+
const defaultPlacement = "bottom-start";
|
|
146
|
+
const options = { placement: defaultPlacement, allowedPlacements: allowedPlacements, maxWidthCssVariable: popover.maxWidth };
|
|
147
|
+
const { x, y } = await computeOffsetAutoPosition(this.openingButton, this.popoverWrapper, options);
|
|
146
148
|
this.popoverWrapper.style.left = `${x}px`;
|
|
147
149
|
this.popoverWrapper.style.top = `${y}px`;
|
|
148
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-popover",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "A simple popover component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fluid-topics/design-system-variables": "3.1.0",
|
|
23
|
-
"@fluid-topics/ft-button": "2.0.
|
|
24
|
-
"@fluid-topics/ft-icon": "2.0.
|
|
25
|
-
"@fluid-topics/ft-link": "2.0.
|
|
26
|
-
"@fluid-topics/ft-typography": "2.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
23
|
+
"@fluid-topics/ft-button": "2.0.6",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.0.6",
|
|
25
|
+
"@fluid-topics/ft-link": "2.0.6",
|
|
26
|
+
"@fluid-topics/ft-typography": "2.0.6",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "2.0.6",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "5ac509a512d721285a979c031a69f29cad891ce8"
|
|
31
31
|
}
|