@fluid-topics/ft-dialog 0.3.11 → 0.3.13
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-dialog.css.d.ts +16 -0
- package/build/ft-dialog.css.js +111 -0
- package/build/ft-dialog.d.ts +2 -23
- package/build/ft-dialog.js +5 -112
- package/build/ft-dialog.light.js +501 -501
- package/build/ft-dialog.min.js +517 -517
- package/build/ft-dialog.properties.d.ts +9 -0
- package/build/ft-dialog.properties.js +2 -0
- package/build/index.d.ts +2 -2
- package/build/index.js +2 -1
- package/package.json +6 -6
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const FtDialogCssVariables: {
|
|
2
|
+
zIndex: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
overlayBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
height: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
width: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
minWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
paddingTop: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
paddingSide: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
paddingButtons: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
colorSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
+
headingColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
+
borderRadiusS: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
+
elevation24: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
};
|
|
15
|
+
export declare const styles: import("lit").CSSResult;
|
|
16
|
+
//# sourceMappingURL=ft-dialog.css.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.css";
|
|
4
|
+
export const FtDialogCssVariables = {
|
|
5
|
+
zIndex: FtCssVariableFactory.create("--ft-dialog-z-index", "NUMBER", "2"),
|
|
6
|
+
overlayBackgroundColor: FtCssVariableFactory.create("--ft-dialog-overlay-background-color", "COLOR", "rgba(0, 0, 0, 0.3)"),
|
|
7
|
+
height: FtCssVariableFactory.create("--ft-dialog-height", "SIZE", "unset"),
|
|
8
|
+
width: FtCssVariableFactory.create("--ft-dialog-width", "SIZE", "unset"),
|
|
9
|
+
minWidth: FtCssVariableFactory.create("--ft-dialog-min-width", "SIZE", "unset"),
|
|
10
|
+
paddingTop: FtCssVariableFactory.create("--ft-dialog-padding-top", "SIZE", "20px"),
|
|
11
|
+
paddingSide: FtCssVariableFactory.create("--ft-dialog-padding-side", "SIZE", "16px"),
|
|
12
|
+
paddingButtons: FtCssVariableFactory.create("--ft-dialog-padding-buttons", "SIZE", "20px"),
|
|
13
|
+
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
14
|
+
headingColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
15
|
+
borderRadiusS: FtCssVariableFactory.external(designSystemVariables.borderRadiusS, "Design system"),
|
|
16
|
+
elevation24: FtCssVariableFactory.external(designSystemVariables.elevation24, "Design system"),
|
|
17
|
+
};
|
|
18
|
+
//language=css
|
|
19
|
+
export const styles = css `
|
|
20
|
+
.ft-dialog {
|
|
21
|
+
position: fixed;
|
|
22
|
+
top: 0;
|
|
23
|
+
right: 0;
|
|
24
|
+
bottom: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
z-index: ${FtDialogCssVariables.zIndex};
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
|
|
33
|
+
margin: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ft-dialog-overlay {
|
|
37
|
+
position: fixed;
|
|
38
|
+
top: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
|
|
46
|
+
background-color: ${FtDialogCssVariables.overlayBackgroundColor};
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ft-dialog-wrapper {
|
|
51
|
+
position: fixed;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
|
|
55
|
+
width: ${FtDialogCssVariables.width};
|
|
56
|
+
height: ${FtDialogCssVariables.height};
|
|
57
|
+
max-width: 95vw;
|
|
58
|
+
max-height: 95vh;
|
|
59
|
+
min-width: ${FtDialogCssVariables.minWidth};
|
|
60
|
+
|
|
61
|
+
padding-top: ${FtDialogCssVariables.paddingTop};
|
|
62
|
+
padding-right: ${FtDialogCssVariables.paddingSide};
|
|
63
|
+
padding-left: ${FtDialogCssVariables.paddingSide};
|
|
64
|
+
|
|
65
|
+
background-color: ${FtDialogCssVariables.colorSurface};
|
|
66
|
+
|
|
67
|
+
border-radius: ${FtDialogCssVariables.borderRadiusS};
|
|
68
|
+
box-shadow: ${FtDialogCssVariables.elevation24};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ft-dialog-content {
|
|
72
|
+
flex-grow: 2;
|
|
73
|
+
overflow: auto;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ft-dialog-heading {
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
margin-bottom: 20px;
|
|
84
|
+
gap: 8px;
|
|
85
|
+
|
|
86
|
+
color: ${FtDialogCssVariables.headingColor};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ft-dialog-buttons {
|
|
90
|
+
padding-top: ${FtDialogCssVariables.paddingButtons};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
slot[name=buttons] {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: flex-end;
|
|
97
|
+
gap: 8px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
slot[name=buttons]::slotted(*) {
|
|
101
|
+
margin-top: 8px;
|
|
102
|
+
margin-bottom: 8px
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ft-dialog-heading ft-button {
|
|
106
|
+
margin-left: auto;
|
|
107
|
+
${setVariable(FtButtonCssVariables.color, FtDialogCssVariables.headingColor)};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
`;
|
|
111
|
+
//# sourceMappingURL=ft-dialog.css.js.map
|
package/build/ft-dialog.d.ts
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
|
|
4
|
-
opened: boolean;
|
|
5
|
-
closeOnEsc: boolean;
|
|
6
|
-
closeOnClickOutside: boolean;
|
|
7
|
-
closable: boolean;
|
|
8
|
-
heading: string;
|
|
9
|
-
icon: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const FtDialogCssVariables: {
|
|
12
|
-
zIndex: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
-
overlayBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
-
height: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
-
width: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
-
minWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
-
paddingTop: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
18
|
-
paddingSide: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
-
paddingButtons: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
-
colorSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
21
|
-
headingColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
22
|
-
borderRadiusS: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
23
|
-
elevation24: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
24
|
-
};
|
|
3
|
+
import { FtDialogProperties } from "./ft-dialog.properties";
|
|
25
4
|
export declare class FtDialog extends FtLitElement implements FtDialogProperties {
|
|
26
5
|
static elementDefinitions: ElementDefinitionsMap;
|
|
27
6
|
opened: boolean;
|
|
@@ -31,7 +10,7 @@ export declare class FtDialog extends FtLitElement implements FtDialogProperties
|
|
|
31
10
|
beforeClose: () => boolean;
|
|
32
11
|
heading: string;
|
|
33
12
|
icon: string;
|
|
34
|
-
static
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
35
14
|
protected render(): import("lit-html").TemplateResult<1> | null;
|
|
36
15
|
updated(properties: PropertyValues<FtDialog>): void;
|
|
37
16
|
connectedCallback(): void;
|
package/build/ft-dialog.js
CHANGED
|
@@ -4,26 +4,13 @@ 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 {
|
|
7
|
+
import { html } from "lit";
|
|
8
8
|
import { property, } from "lit/decorators.js";
|
|
9
|
-
import {
|
|
9
|
+
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
11
11
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
12
|
-
import { FtButton
|
|
13
|
-
|
|
14
|
-
zIndex: FtCssVariableFactory.create("--ft-dialog-z-index", "NUMBER", "2"),
|
|
15
|
-
overlayBackgroundColor: FtCssVariableFactory.create("--ft-dialog-overlay-background-color", "COLOR", "rgba(0, 0, 0, 0.3)"),
|
|
16
|
-
height: FtCssVariableFactory.create("--ft-dialog-height", "SIZE", "unset"),
|
|
17
|
-
width: FtCssVariableFactory.create("--ft-dialog-width", "SIZE", "unset"),
|
|
18
|
-
minWidth: FtCssVariableFactory.create("--ft-dialog-min-width", "SIZE", "unset"),
|
|
19
|
-
paddingTop: FtCssVariableFactory.create("--ft-dialog-padding-top", "SIZE", "20px"),
|
|
20
|
-
paddingSide: FtCssVariableFactory.create("--ft-dialog-padding-side", "SIZE", "16px"),
|
|
21
|
-
paddingButtons: FtCssVariableFactory.create("--ft-dialog-padding-buttons", "SIZE", "20px"),
|
|
22
|
-
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
23
|
-
headingColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
24
|
-
borderRadiusS: FtCssVariableFactory.external(designSystemVariables.borderRadiusS, "Design system"),
|
|
25
|
-
elevation24: FtCssVariableFactory.external(designSystemVariables.elevation24, "Design system"),
|
|
26
|
-
};
|
|
12
|
+
import { FtButton } from "@fluid-topics/ft-button";
|
|
13
|
+
import { styles } from "./ft-dialog.css";
|
|
27
14
|
export class FtDialog extends FtLitElement {
|
|
28
15
|
constructor() {
|
|
29
16
|
super(...arguments);
|
|
@@ -35,101 +22,6 @@ export class FtDialog extends FtLitElement {
|
|
|
35
22
|
this.heading = "";
|
|
36
23
|
this.icon = "";
|
|
37
24
|
}
|
|
38
|
-
static get styles() {
|
|
39
|
-
//language=css
|
|
40
|
-
return css `
|
|
41
|
-
.ft-dialog {
|
|
42
|
-
position: fixed;
|
|
43
|
-
top: 0;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
left: 0;
|
|
47
|
-
z-index: ${FtDialogCssVariables.zIndex};
|
|
48
|
-
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
justify-content: center;
|
|
52
|
-
align-items: center;
|
|
53
|
-
|
|
54
|
-
margin: auto;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ft-dialog-overlay {
|
|
58
|
-
position: fixed;
|
|
59
|
-
top: 0;
|
|
60
|
-
right: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
|
|
64
|
-
height: 100%;
|
|
65
|
-
width: 100%;
|
|
66
|
-
|
|
67
|
-
background-color: ${FtDialogCssVariables.overlayBackgroundColor};
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.ft-dialog-wrapper {
|
|
72
|
-
position: fixed;
|
|
73
|
-
display: flex;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
|
|
76
|
-
width: ${FtDialogCssVariables.width};
|
|
77
|
-
height: ${FtDialogCssVariables.height};
|
|
78
|
-
max-width: 95vw;
|
|
79
|
-
max-height: 95vh;
|
|
80
|
-
min-width: ${FtDialogCssVariables.minWidth};
|
|
81
|
-
|
|
82
|
-
padding-top: ${FtDialogCssVariables.paddingTop};
|
|
83
|
-
padding-right: ${FtDialogCssVariables.paddingSide};
|
|
84
|
-
padding-left: ${FtDialogCssVariables.paddingSide};
|
|
85
|
-
|
|
86
|
-
background-color: ${FtDialogCssVariables.colorSurface};
|
|
87
|
-
|
|
88
|
-
border-radius: ${FtDialogCssVariables.borderRadiusS};
|
|
89
|
-
box-shadow: ${FtDialogCssVariables.elevation24};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ft-dialog-content {
|
|
93
|
-
flex-grow: 2;
|
|
94
|
-
overflow: auto;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ft-dialog-heading {
|
|
98
|
-
text-overflow: ellipsis;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
white-space: nowrap;
|
|
101
|
-
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
margin-bottom: 20px;
|
|
105
|
-
gap: 8px;
|
|
106
|
-
|
|
107
|
-
color: ${FtDialogCssVariables.headingColor};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.ft-dialog-buttons {
|
|
111
|
-
padding-top: ${FtDialogCssVariables.paddingButtons};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
slot[name=buttons] {
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
justify-content: flex-end;
|
|
118
|
-
gap: 8px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
slot[name=buttons]::slotted(*) {
|
|
122
|
-
margin-top: 8px;
|
|
123
|
-
margin-bottom: 8px
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.ft-dialog-heading ft-button {
|
|
127
|
-
margin-left: auto;
|
|
128
|
-
${setVariable(FtButtonCssVariables.color, FtDialogCssVariables.headingColor)};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
`;
|
|
132
|
-
}
|
|
133
25
|
render() {
|
|
134
26
|
if (!this.opened) {
|
|
135
27
|
return null;
|
|
@@ -195,6 +87,7 @@ FtDialog.elementDefinitions = {
|
|
|
195
87
|
"ft-icon": FtIcon,
|
|
196
88
|
"ft-button": FtButton,
|
|
197
89
|
};
|
|
90
|
+
FtDialog.styles = styles;
|
|
198
91
|
__decorate([
|
|
199
92
|
property({
|
|
200
93
|
type: Boolean,
|