@fluid-topics/ft-popover 1.1.118 → 1.1.119
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 +259 -259
- package/build/ft-popover.min.js +98 -98
- package/build/ftds-popover.d.ts +3 -0
- package/build/ftds-popover.js +12 -2
- package/package.json +7 -7
package/build/ftds-popover.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare class FtdsPopover extends FtLitElement implements FtdsPopoverProp
|
|
|
15
15
|
private openingButton;
|
|
16
16
|
private closingButton;
|
|
17
17
|
private popoverWrapper;
|
|
18
|
+
private slottedLinkContent;
|
|
19
|
+
private popoverLinkTypography;
|
|
18
20
|
static styles: import("lit").CSSResult;
|
|
19
21
|
protected render(): import("lit").TemplateResult<1>;
|
|
20
22
|
renderPopover(): import("lit").TemplateResult<1> | typeof nothing;
|
|
@@ -23,6 +25,7 @@ export declare class FtdsPopover extends FtLitElement implements FtdsPopoverProp
|
|
|
23
25
|
updated(properties: PropertyValues<FtdsPopover>): void;
|
|
24
26
|
close(): void;
|
|
25
27
|
open(): void;
|
|
28
|
+
hasTextLinkContent(): boolean;
|
|
26
29
|
private watchFocusIn;
|
|
27
30
|
private watchEscapeKey;
|
|
28
31
|
private closeAndFocusOpeningButton;
|
package/build/ftds-popover.js
CHANGED
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, nothing } from "lit";
|
|
8
8
|
import { property, query, } from "lit/decorators.js";
|
|
9
|
-
import { computeFlipOffsetPosition, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
9
|
+
import { computeFlipOffsetPosition, FtLitElement, unslotText } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
11
11
|
import { FtdsButton } from "@fluid-topics/ft-button";
|
|
12
12
|
import { styles } from "./ftds-popover.styles";
|
|
@@ -71,7 +71,7 @@ class FtdsPopover extends FtLitElement {
|
|
|
71
71
|
<slot></slot>
|
|
72
72
|
</ft-typography>
|
|
73
73
|
</div>
|
|
74
|
-
<ft-typography variant="body-2-medium">
|
|
74
|
+
<ft-typography variant="body-2-medium" part="popover-link-typography">
|
|
75
75
|
<slot name="link"
|
|
76
76
|
part="popover-link"
|
|
77
77
|
class="ftds-popover--link"
|
|
@@ -121,6 +121,9 @@ class FtdsPopover extends FtLitElement {
|
|
|
121
121
|
this.opened = true;
|
|
122
122
|
this.dispatchEvent(new CustomEvent("opened-changed", { detail: { opened: true } }));
|
|
123
123
|
}
|
|
124
|
+
hasTextLinkContent() {
|
|
125
|
+
return unslotText(this.slottedLinkContent).trim().length > 0;
|
|
126
|
+
}
|
|
124
127
|
async positionWrapper() {
|
|
125
128
|
this.popoverWrapper.classList.remove("ftds-popover--wrapper-positioned");
|
|
126
129
|
this.popoverWrapper.style.left = "";
|
|
@@ -131,6 +134,7 @@ class FtdsPopover extends FtLitElement {
|
|
|
131
134
|
this.popoverWrapper.style.left = `${x}px`;
|
|
132
135
|
this.popoverWrapper.style.top = `${y}px`;
|
|
133
136
|
this.popoverWrapper.classList.add("ftds-popover--wrapper-positioned");
|
|
137
|
+
this.popoverLinkTypography.hidden = !this.hasTextLinkContent();
|
|
134
138
|
this.closingButton.focus();
|
|
135
139
|
}
|
|
136
140
|
}
|
|
@@ -169,4 +173,10 @@ __decorate([
|
|
|
169
173
|
__decorate([
|
|
170
174
|
query("[part=wrapper]")
|
|
171
175
|
], FtdsPopover.prototype, "popoverWrapper", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
query("[part=popover-link]")
|
|
178
|
+
], FtdsPopover.prototype, "slottedLinkContent", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
query("[part=popover-link-typography]")
|
|
181
|
+
], FtdsPopover.prototype, "popoverLinkTypography", void 0);
|
|
172
182
|
export { FtdsPopover };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-popover",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.119",
|
|
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": "0.1.2",
|
|
23
|
-
"@fluid-topics/ft-button": "1.1.
|
|
24
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
25
|
-
"@fluid-topics/ft-link": "1.1.
|
|
26
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
23
|
+
"@fluid-topics/ft-button": "1.1.119",
|
|
24
|
+
"@fluid-topics/ft-icon": "1.1.119",
|
|
25
|
+
"@fluid-topics/ft-link": "1.1.119",
|
|
26
|
+
"@fluid-topics/ft-typography": "1.1.119",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.1.119",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a772950c2efeb1e66a2cff476f0c363eb84b4c55"
|
|
31
31
|
}
|