@fluid-topics/ftds-modal 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.
- package/README.md +34 -0
- package/build/FtDsModalMessages.d.ts +6 -0
- package/build/FtDsModalMessages.js +5 -0
- package/build/define.d.ts +1 -0
- package/build/define.js +3 -0
- package/build/definitions.d.ts +7 -0
- package/build/definitions.js +6 -0
- package/build/ftds-modal-confirm.d.ts +20 -0
- package/build/ftds-modal-confirm.js +107 -0
- package/build/ftds-modal.d.ts +25 -0
- package/build/ftds-modal.js +122 -0
- package/build/ftds-modal.light.js +1670 -0
- package/build/ftds-modal.min.js +1786 -0
- package/build/ftds-modal.properties.d.ts +9 -0
- package/build/ftds-modal.properties.js +2 -0
- package/build/ftds-modal.styles.d.ts +3 -0
- package/build/ftds-modal.styles.js +95 -0
- package/build/index.d.ts +8 -0
- package/build/index.js +8 -0
- package/package.json +34 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FtdsTypographyVariants } from "@fluid-topics/ftds-typography";
|
|
2
|
+
import { FtdsBaseInterface } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtdsIcons, FtdsIconVariants } from "@fluid-topics/ftds-icon";
|
|
4
|
+
export interface FtdsModalProperties extends FtdsBaseInterface {
|
|
5
|
+
heading: string;
|
|
6
|
+
icon?: FtdsIcons;
|
|
7
|
+
iconVariant?: FtdsIconVariants;
|
|
8
|
+
}
|
|
9
|
+
export declare const FtDsModalBodyTypography = FtdsTypographyVariants.body2regular;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { modal } from "@fluid-topics/design-system-variables";
|
|
3
|
+
import { foundation } from "@fluid-topics/ft-wc-utils";
|
|
4
|
+
export { modal as FtdsModalCssVariables };
|
|
5
|
+
// language=CSS
|
|
6
|
+
export const designSystemStyle = [
|
|
7
|
+
css `
|
|
8
|
+
.ftds--size-small [part=dialog] {
|
|
9
|
+
--ftds-modal--target-width: ${modal.smallContainerTargetWidth};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ftds--size-medium [part=dialog] {
|
|
13
|
+
--ftds-modal--target-width: ${modal.mediumContainerTargetWidth};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ftds--size-large [part=dialog] {
|
|
17
|
+
--ftds-modal--target-width: ${modal.largeContainerTargetWidth};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[part=container] {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part=dialog] {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
max-width: unset; /*Override user-agent stylesheet for dialog:modal set a max width and height to 100% - 6px*/
|
|
28
|
+
max-height: unset;
|
|
29
|
+
background: transparent;
|
|
30
|
+
border: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[part=overlay] {
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset: 0;
|
|
36
|
+
background-color: rgba(from ${modal.overlayBackgroundColor} r g b / ${modal.overlayOpacity});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[part=inner-container] {
|
|
40
|
+
position: fixed;
|
|
41
|
+
top: 50%;
|
|
42
|
+
transform: translate(0, -50%);
|
|
43
|
+
box-shadow: ${modal.shadow};
|
|
44
|
+
border-radius: ${modal.borderRadius};
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
width: var(--ftds-modal--target-width);
|
|
47
|
+
background-color: ${modal.bodyBackgroundColor};
|
|
48
|
+
margin: auto max(
|
|
49
|
+
${foundation.spacing6},
|
|
50
|
+
calc((100% - var(--ftds-modal--target-width)) / 2)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[part=header] {
|
|
55
|
+
padding: ${modal.headerVerticalPadding} ${modal.headerRightPadding} ${modal.headerVerticalPadding} ${modal.headerLeftPadding};
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: ${modal.headerGap};
|
|
59
|
+
border-color: ${modal.headerBorderColor};
|
|
60
|
+
border-bottom-width: ${modal.headerBorderBottomWidth};
|
|
61
|
+
border-bottom-style: solid;
|
|
62
|
+
color: ${modal.headerColor};
|
|
63
|
+
background-color: ${modal.headerBackgroundColor};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[part=heading] {
|
|
67
|
+
flex-grow: 1;
|
|
68
|
+
overflow-wrap: anywhere;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[part=icon] {
|
|
72
|
+
color: ${modal.headerLeadingIconColor};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[part=closing-button] {
|
|
76
|
+
justify-self: flex-end;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[part=body] {
|
|
80
|
+
padding: ${modal.bodyVerticalPadding} ${modal.bodyHorizontalPadding};
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: ${modal.bodyVerticalGap};
|
|
84
|
+
color: ${modal.bodyColor};
|
|
85
|
+
background-color: ${modal.bodyBackgroundColor};
|
|
86
|
+
overflow-wrap: anywhere;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[part=actions] {
|
|
90
|
+
align-self: flex-end;
|
|
91
|
+
display: flex;
|
|
92
|
+
gap: ${foundation.spacing3}
|
|
93
|
+
}
|
|
94
|
+
`,
|
|
95
|
+
];
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./ftds-modal.styles";
|
|
2
|
+
export * from "./ftds-modal.properties";
|
|
3
|
+
export * from "./ftds-modal";
|
|
4
|
+
export * from "./ftds-modal.styles";
|
|
5
|
+
export * from "./ftds-modal.properties";
|
|
6
|
+
export * from "./ftds-modal";
|
|
7
|
+
export * from "./ftds-modal-confirm";
|
|
8
|
+
import "./define";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./ftds-modal.styles";
|
|
2
|
+
export * from "./ftds-modal.properties";
|
|
3
|
+
export * from "./ftds-modal";
|
|
4
|
+
export * from "./ftds-modal.styles";
|
|
5
|
+
export * from "./ftds-modal.properties";
|
|
6
|
+
export * from "./ftds-modal";
|
|
7
|
+
export * from "./ftds-modal-confirm";
|
|
8
|
+
import "./define";
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluid-topics/ftds-modal",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "The design system modal 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-modal.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
|
+
"@fluid-topics/design-system-variables": "3.5.0",
|
|
23
|
+
"@fluid-topics/ft-i18n": "2.1.0",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.1.0",
|
|
25
|
+
"@fluid-topics/ftds-button": "2.1.0",
|
|
26
|
+
"@fluid-topics/ftds-icon": "2.1.0",
|
|
27
|
+
"@fluid-topics/ftds-typography": "2.1.0",
|
|
28
|
+
"lit": "3.1.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.0"
|
|
32
|
+
},
|
|
33
|
+
"gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
|
|
34
|
+
}
|