@fluid-topics/ft-popover 2.0.36 → 2.0.38
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-base-popover.d.ts +7 -0
- package/build/ft-base-popover.js +51 -12
- package/build/ft-popover.light.js +227 -191
- package/build/ft-popover.min.js +211 -187
- package/build/ftds-popover.d.ts +4 -1
- package/build/ftds-popover.js +16 -6
- package/build/ftds-popover.properties.d.ts +5 -0
- package/build/ftds-popover.properties.js +5 -1
- package/build/ftds-popover.styles.js +13 -4
- package/package.json +8 -8
package/build/ftds-popover.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { TemplateResult } from "lit";
|
|
2
2
|
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
import { FtdsButton } from "@fluid-topics/ft-button";
|
|
4
|
-
import { FtdsPopoverProperties } from "./ftds-popover.properties";
|
|
4
|
+
import { FtdsPopoverMargins, FtdsPopoverProperties } from "./ftds-popover.properties";
|
|
5
5
|
import { FtBasePopover } from "./ft-base-popover";
|
|
6
|
+
import { ClassInfo } from "lit/directives/class-map";
|
|
6
7
|
export declare class FtdsPopover extends FtBasePopover implements FtdsPopoverProperties {
|
|
7
8
|
static styles: import("lit").CSSResult;
|
|
8
9
|
static elementDefinitions: ElementDefinitionsMap;
|
|
9
10
|
heading: string;
|
|
11
|
+
margins: FtdsPopoverMargins;
|
|
10
12
|
protected openingButton?: FtdsButton;
|
|
11
13
|
protected closingButton?: FtdsButton;
|
|
12
14
|
private popoverContentDiv?;
|
|
@@ -24,4 +26,5 @@ export declare class FtdsPopover extends FtBasePopover implements FtdsPopoverPro
|
|
|
24
26
|
protected renderFullContent(): TemplateResult;
|
|
25
27
|
protected hideUnusedSlots(): void;
|
|
26
28
|
private hasEmptySlot;
|
|
29
|
+
protected getPopoverWrapperClasses(): ClassInfo;
|
|
27
30
|
}
|
package/build/ftds-popover.js
CHANGED
|
@@ -4,20 +4,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, nothing } from "lit";
|
|
8
|
-
import { query } from "lit/decorators.js";
|
|
9
|
-
import { unslotText } from "@fluid-topics/ft-wc-utils";
|
|
10
|
-
import { FtdsTypography, FtdsTypographyVariants } from "@fluid-topics/ft-typography";
|
|
7
|
+
import { html, nothing, } from "lit";
|
|
8
|
+
import { property, query, } from "lit/decorators.js";
|
|
9
|
+
import { unslotText, } from "@fluid-topics/ft-wc-utils";
|
|
10
|
+
import { FtdsTypography, FtdsTypographyVariants, } from "@fluid-topics/ft-typography";
|
|
11
11
|
import { FtdsButton } from "@fluid-topics/ft-button";
|
|
12
|
-
import {
|
|
12
|
+
import { FtdsPopoverMargins, } from "./ftds-popover.properties";
|
|
13
|
+
import { DesignSystemFamily, DesignSystemSize, popover, } from "@fluid-topics/design-system-variables";
|
|
13
14
|
import { FtIcons } from "@fluid-topics/ft-icon";
|
|
14
15
|
import { FtBasePopover } from "./ft-base-popover";
|
|
15
|
-
import { property } from "lit/decorators.js";
|
|
16
16
|
import { styles } from "./ftds-popover.styles";
|
|
17
17
|
export class FtdsPopover extends FtBasePopover {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this.heading = "";
|
|
21
|
+
this.margins = FtdsPopoverMargins.default;
|
|
21
22
|
this.wrapperId = "ftds-popover-wrapper";
|
|
22
23
|
this.headingId = "ftds-popover-heading";
|
|
23
24
|
this.contentId = "ftds-popover-content";
|
|
@@ -82,6 +83,12 @@ export class FtdsPopover extends FtBasePopover {
|
|
|
82
83
|
hasEmptySlot(slot) {
|
|
83
84
|
return unslotText(slot).trim().length === 0;
|
|
84
85
|
}
|
|
86
|
+
getPopoverWrapperClasses() {
|
|
87
|
+
return {
|
|
88
|
+
...super.getPopoverWrapperClasses(),
|
|
89
|
+
"ftds-popover--dense": this.margins === FtdsPopoverMargins.dense,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
85
92
|
}
|
|
86
93
|
FtdsPopover.styles = styles;
|
|
87
94
|
FtdsPopover.elementDefinitions = {
|
|
@@ -91,6 +98,9 @@ FtdsPopover.elementDefinitions = {
|
|
|
91
98
|
__decorate([
|
|
92
99
|
property()
|
|
93
100
|
], FtdsPopover.prototype, "heading", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
property()
|
|
103
|
+
], FtdsPopover.prototype, "margins", void 0);
|
|
94
104
|
__decorate([
|
|
95
105
|
query(`[part="opening-button"]`)
|
|
96
106
|
], FtdsPopover.prototype, "openingButton", void 0);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { FtBasePopoverProperties } from "./ft-base-popover";
|
|
2
2
|
export interface FtdsPopoverProperties extends FtBasePopoverProperties {
|
|
3
3
|
heading?: string;
|
|
4
|
+
margins?: FtdsPopoverMargins;
|
|
5
|
+
}
|
|
6
|
+
export declare enum FtdsPopoverMargins {
|
|
7
|
+
default = "default",
|
|
8
|
+
dense = "dense"
|
|
4
9
|
}
|
|
@@ -42,11 +42,13 @@ export const styles = css `
|
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
|
|
44
44
|
max-width: ${popover.maxWidth};
|
|
45
|
+
min-width: ${popover.minWidth};
|
|
46
|
+
max-height: ${popover.maxHeight}
|
|
45
47
|
|
|
46
|
-
padding-left: ${popover.
|
|
47
|
-
padding-right: ${popover.
|
|
48
|
-
padding-top: ${popover.
|
|
49
|
-
padding-bottom: ${popover.
|
|
48
|
+
padding-left: ${popover.defaultHorizontalPadding};
|
|
49
|
+
padding-right: ${popover.defaultHorizontalPadding};
|
|
50
|
+
padding-top: ${popover.defaultVerticalPadding};
|
|
51
|
+
padding-bottom: ${popover.defaultVerticalPadding};
|
|
50
52
|
gap: ${popover.gap};
|
|
51
53
|
|
|
52
54
|
background-color: ${popover.backgroundColor};
|
|
@@ -56,6 +58,13 @@ export const styles = css `
|
|
|
56
58
|
&.positioned {
|
|
57
59
|
visibility: visible;
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
&.ftds-popover--dense {
|
|
63
|
+
padding-left: ${popover.denseHorizontalPadding};
|
|
64
|
+
padding-right: ${popover.denseHorizontalPadding};
|
|
65
|
+
padding-top: ${popover.denseVerticalPadding};
|
|
66
|
+
padding-bottom: ${popover.denseVerticalPadding};
|
|
67
|
+
}
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
[part="heading"] {
|
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.38",
|
|
4
4
|
"description": "A simple popover component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/design-system-variables": "3.
|
|
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.
|
|
22
|
+
"@fluid-topics/design-system-variables": "3.4.1",
|
|
23
|
+
"@fluid-topics/ft-button": "2.0.38",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.0.38",
|
|
25
|
+
"@fluid-topics/ft-link": "2.0.38",
|
|
26
|
+
"@fluid-topics/ft-typography": "2.0.38",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "2.0.38",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "8a5f1d6fb69ac18ec2e6d05dcf82e036d7423c35"
|
|
31
31
|
}
|