@fluid-topics/ftds-popover 2.1.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.
@@ -0,0 +1,14 @@
1
+ import { Position } from "@fluid-topics/ft-tooltip";
2
+ export interface FtdsPopoverProperties {
3
+ heading?: string;
4
+ opened?: boolean;
5
+ hidden?: boolean;
6
+ closeButtonLabel?: string;
7
+ openButtonLabel?: string;
8
+ openButtonTooltipPosition?: Position;
9
+ margins?: FtdsPopoverMargins;
10
+ }
11
+ export declare enum FtdsPopoverMargins {
12
+ default = "default",
13
+ dense = "dense"
14
+ }
@@ -0,0 +1,5 @@
1
+ export var FtdsPopoverMargins;
2
+ (function (FtdsPopoverMargins) {
3
+ FtdsPopoverMargins["default"] = "default";
4
+ FtdsPopoverMargins["dense"] = "dense";
5
+ })(FtdsPopoverMargins || (FtdsPopoverMargins = {}));
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,102 @@
1
+ import { css } from "lit";
2
+ import { popover } from "@fluid-topics/design-system-variables";
3
+ // language=css
4
+ export const styles = css `
5
+ :host {
6
+ position: relative;
7
+ display: inline-block;
8
+ }
9
+
10
+ [part="root-container"] {
11
+ position: relative;
12
+ }
13
+
14
+ [part="popover-container"] {
15
+ position: absolute;
16
+ z-index: 100;
17
+ display: block;
18
+ margin: auto;
19
+ }
20
+
21
+ [part="closing-button-container"] {
22
+ position: absolute;
23
+ top: 8px;
24
+ right: 8px;
25
+ }
26
+
27
+ [part="overlay"] {
28
+ position: fixed;
29
+ top: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ left: 0;
33
+ height: 100%;
34
+ width: 100%;
35
+ opacity: 0;
36
+ }
37
+
38
+ [part="wrapper"] {
39
+ visibility: hidden;
40
+ position: fixed;
41
+ display: flex;
42
+ flex-direction: column;
43
+
44
+ max-width: ${popover.maxWidth};
45
+ min-width: ${popover.minWidth};
46
+ max-height: ${popover.maxHeight};
47
+
48
+ padding-left: ${popover.defaultHorizontalPadding};
49
+ padding-right: ${popover.defaultHorizontalPadding};
50
+ padding-top: ${popover.defaultVerticalPadding};
51
+ padding-bottom: ${popover.defaultVerticalPadding};
52
+ gap: ${popover.gap};
53
+
54
+ background-color: ${popover.backgroundColor};
55
+ border-radius: ${popover.borderRadius};
56
+ box-shadow: ${popover.shadow};
57
+
58
+ &.positioned {
59
+ visibility: visible;
60
+ }
61
+
62
+
63
+ &.ftds-popover--dense {
64
+ padding-left: ${popover.denseHorizontalPadding};
65
+ padding-right: ${popover.denseHorizontalPadding};
66
+ padding-top: ${popover.denseVerticalPadding};
67
+ padding-bottom: ${popover.denseVerticalPadding};
68
+ }
69
+ }
70
+
71
+ [part="heading"] {
72
+ flex-shrink: 0;
73
+
74
+ display: flex;
75
+ align-items: center;
76
+ gap: ${popover.gap};
77
+
78
+ color: ${popover.titleColor};
79
+ }
80
+
81
+ [part="heading"] ftds-typography {
82
+ flex-grow: 1;
83
+ flex-shrink: 1;
84
+ text-overflow: ellipsis;
85
+ overflow: hidden;
86
+ white-space: nowrap;
87
+ }
88
+
89
+ [part="content"] {
90
+ color: ${popover.bodyColor};
91
+ }
92
+
93
+ [part="popover-sections"] {
94
+ display: flex;
95
+ flex-direction: column;
96
+ gap: ${popover.multiSectionVerticalGap};
97
+ }
98
+
99
+ .hidden {
100
+ display: none;
101
+ }
102
+ `;
@@ -0,0 +1,7 @@
1
+ export * from "./ftds-popover";
2
+ export * from "./ftds-popover.styles";
3
+ export * from "./ftds-popover.properties";
4
+ export * from "./ftds-popover-section";
5
+ export * from "./ftds-popover-section.styles";
6
+ export * from "./ftds-popover-section.properties";
7
+ import "./define";
package/build/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export * from "./ftds-popover";
2
+ export * from "./ftds-popover.styles";
3
+ export * from "./ftds-popover.properties";
4
+ export * from "./ftds-popover-section";
5
+ export * from "./ftds-popover-section.styles";
6
+ export * from "./ftds-popover-section.properties";
7
+ import "./define";
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@fluid-topics/ftds-popover",
3
+ "version": "2.1.0",
4
+ "description": "The design system popover component",
5
+ "keywords": [
6
+ "Lit"
7
+ ],
8
+ "author": "Fluid Topics <devtopics@antidot.net>",
9
+ "license": "ISC",
10
+ "main": "build/index.js",
11
+ "web": "build/ftds-popover.min.js",
12
+ "typings": "build/index",
13
+ "files": [
14
+ "build/**/*.js",
15
+ "build/**/*.ts"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
+ },
21
+ "dependencies": {
22
+ "@floating-ui/dom": "1.7.6",
23
+ "@fluid-topics/design-system-variables": "3.5.0",
24
+ "@fluid-topics/ft-tooltip": "2.1.0",
25
+ "@fluid-topics/ft-wc-utils": "2.1.0",
26
+ "@fluid-topics/ftds-button": "2.1.0",
27
+ "@fluid-topics/ftds-icon": "2.1.0",
28
+ "@fluid-topics/ftds-typography": "2.1.0",
29
+ "lit": "3.1.0"
30
+ },
31
+ "devDependencies": {
32
+ "@fluid-topics/ft-wc-test-utils": "2.1.0"
33
+ },
34
+ "gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
35
+ }