@fluid-topics/ft-modal 1.3.22 → 1.3.23
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/README.md +7 -10
- package/build/FtModalMessages.d.ts +6 -0
- package/build/FtModalMessages.js +5 -0
- package/build/ft-modal.d.ts +22 -0
- package/build/ft-modal.js +110 -0
- package/build/ft-modal.light.js +335 -203
- package/build/ft-modal.min.js +307 -182
- package/build/ft-modal.properties.d.ts +7 -0
- package/build/ft-modal.properties.js +2 -0
- package/build/ft-modal.styles.d.ts +21 -0
- package/build/ft-modal.styles.js +110 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const FtModalCssVariables: {
|
|
2
|
+
shadow: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
borderRadius: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
width: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
headerPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
headerGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
headerBorderColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
headerBorderWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
headerBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
headerColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
+
headerIconColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
+
contentMargin: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
+
contentPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
contentGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
+
contentBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
+
contentColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
+
actionsGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
18
|
+
overlayBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
+
closingButtonColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
+
};
|
|
21
|
+
export declare const ftmodalStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
export const FtModalCssVariables = {
|
|
4
|
+
shadow: FtCssVariableFactory.create("--ft-modal-shadow", "", "SHADOW", "0 6px 13px 0 rgba(0, 0, 0, .06), 0 3px 7px 0 rgba(0, 0, 0, .14), 0 1px 2px 0 rgba(0, 0, 0, .06)"),
|
|
5
|
+
borderRadius: FtCssVariableFactory.extend("--ft-modal-border-radius", "", designSystemVariables.borderRadiusM),
|
|
6
|
+
width: FtCssVariableFactory.create("--ft-modal-width", "", "SIZE", "800px"),
|
|
7
|
+
headerPadding: FtCssVariableFactory.create("--ft-modal-header-padding", "", "SIZE", "8px"),
|
|
8
|
+
headerGap: FtCssVariableFactory.create("--ft-modal-header-gap", "", "SIZE", "8px"),
|
|
9
|
+
headerBorderColor: FtCssVariableFactory.extend("--ft-modal-header-border-color", "", designSystemVariables.colorOutline),
|
|
10
|
+
headerBorderWidth: FtCssVariableFactory.create("--ft-modal-header-border-width", "", "SIZE", "1px"),
|
|
11
|
+
headerBackgroundColor: FtCssVariableFactory.create("--ft-modal-header-background-color", "", "COLOR", "#fbfbfc"),
|
|
12
|
+
headerColor: FtCssVariableFactory.extend("--ft-modal-header-color", "", designSystemVariables.colorOnSurfaceHigh),
|
|
13
|
+
headerIconColor: FtCssVariableFactory.extend("--ft-modal-header-icon-color", "", designSystemVariables.colorOnSurfaceHigh),
|
|
14
|
+
contentMargin: FtCssVariableFactory.create("--ft-modal-content-margin", "", "SIZE", "16px"),
|
|
15
|
+
contentPadding: FtCssVariableFactory.create("--ft-modal-content-padding", "", "SIZE", "16px"),
|
|
16
|
+
contentGap: FtCssVariableFactory.create("--ft-modal-content-gap", "", "SIZE", "16px"),
|
|
17
|
+
contentBackgroundColor: FtCssVariableFactory.extend("--ft-modal-content-background-color", "", designSystemVariables.colorSurface),
|
|
18
|
+
contentColor: FtCssVariableFactory.extend("--ft-modal-content-color", "", designSystemVariables.colorOnSurfaceHigh),
|
|
19
|
+
actionsGap: FtCssVariableFactory.create("--ft-modal-action-gap", "", "SIZE", "8px"),
|
|
20
|
+
overlayBackgroundColor: FtCssVariableFactory.create("--ft-modal-overlay-background-color", "", "COLOR", "rgba(10, 10, 13, 0.4)"),
|
|
21
|
+
closingButtonColor: FtCssVariableFactory.extend("--ft-modal-closing-button-color", "", designSystemVariables.colorOnSurfaceMedium),
|
|
22
|
+
};
|
|
23
|
+
// language=CSS
|
|
24
|
+
export const ftmodalStyles = css `
|
|
25
|
+
[part=dialog] {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
max-width: unset; /*Override user-agent stylesheet for dialog:modal set a max width and height to 100% - 6px*/
|
|
29
|
+
max-height: unset;
|
|
30
|
+
background: transparent;
|
|
31
|
+
border: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[part=overlay] {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
background-color: ${FtModalCssVariables.overlayBackgroundColor};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[part=inner-container] {
|
|
41
|
+
position: fixed;
|
|
42
|
+
inset: 0;
|
|
43
|
+
background-color: ${FtModalCssVariables.contentBackgroundColor};
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
|
|
47
|
+
@media (min-width: 768px) {
|
|
48
|
+
top: 50%;
|
|
49
|
+
bottom: unset;
|
|
50
|
+
transform: translate(0, -50%);
|
|
51
|
+
box-shadow: ${FtModalCssVariables.shadow};
|
|
52
|
+
border-radius: ${FtModalCssVariables.borderRadius};
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
width: ${FtModalCssVariables.width};
|
|
55
|
+
margin: auto max(
|
|
56
|
+
${FtModalCssVariables.contentMargin},
|
|
57
|
+
calc((100% - ${FtModalCssVariables.width}) / 2)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
[part=header] {
|
|
64
|
+
padding: ${FtModalCssVariables.headerPadding};
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: ${FtModalCssVariables.headerGap};
|
|
68
|
+
border-color: ${FtModalCssVariables.headerBorderColor};
|
|
69
|
+
border-bottom-width: ${FtModalCssVariables.headerBorderWidth};
|
|
70
|
+
border-bottom-style: solid;
|
|
71
|
+
color: ${FtModalCssVariables.headerColor};
|
|
72
|
+
background-color: ${FtModalCssVariables.headerBackgroundColor};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[part=heading] {
|
|
76
|
+
flex-grow: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[part=icon] {
|
|
80
|
+
color: ${FtModalCssVariables.headerIconColor};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[part=closing-button] {
|
|
84
|
+
justify-self: flex-end;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[part=body] {
|
|
88
|
+
flex-grow: 1;
|
|
89
|
+
padding: ${FtModalCssVariables.contentPadding};
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: ${FtModalCssVariables.contentGap};
|
|
93
|
+
color: ${FtModalCssVariables.contentColor};
|
|
94
|
+
background-color: ${FtModalCssVariables.contentBackgroundColor};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[part=content] {
|
|
98
|
+
flex-grow: 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[part=actions] {
|
|
102
|
+
align-self: flex-end;
|
|
103
|
+
display: flex;
|
|
104
|
+
gap: ${FtModalCssVariables.actionsGap};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[part=closing-button] {
|
|
108
|
+
color: ${FtModalCssVariables.closingButtonColor};
|
|
109
|
+
}
|
|
110
|
+
`;
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { customElement } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { FtdsModal } from "./ftds-modal";
|
|
3
3
|
import { FtdsModalConfirm } from "./ftds-modal-confirm";
|
|
4
|
+
import { FtModal } from "./ft-modal";
|
|
5
|
+
export * from "./ft-modal";
|
|
6
|
+
export * from "./ft-modal.styles";
|
|
7
|
+
export * from "./ft-modal.properties";
|
|
4
8
|
export * from "./ftds-modal.styles";
|
|
5
9
|
export * from "./ftds-modal.properties";
|
|
6
10
|
export * from "./ftds-modal";
|
|
7
11
|
export * from "./ftds-modal-confirm";
|
|
12
|
+
customElement("ft-modal")(FtModal);
|
|
8
13
|
customElement("ftds-modal")(FtdsModal);
|
|
9
14
|
customElement("ftds-modal-confirm")(FtdsModalConfirm);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-modal",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.23",
|
|
4
4
|
"description": "Modal for Design System V2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.3.23",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fluid-topics/ft-wc-test-utils": "1.3.
|
|
26
|
+
"@fluid-topics/ft-wc-test-utils": "1.3.23"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "1449ae5b73dbdbe40583d414fc5d8e5395694146"
|
|
29
29
|
}
|