@fluid-topics/ft-drawer 1.3.56
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 +19 -0
- package/build/FtDrawerMessages.d.ts +6 -0
- package/build/FtDrawerMessages.js +5 -0
- package/build/ft-drawer.d.ts +23 -0
- package/build/ft-drawer.js +131 -0
- package/build/ft-drawer.light.js +1274 -0
- package/build/ft-drawer.min.js +1509 -0
- package/build/ft-drawer.properties.d.ts +7 -0
- package/build/ft-drawer.properties.js +2 -0
- package/build/ft-drawer.styles.d.ts +24 -0
- package/build/ft-drawer.styles.js +141 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +6 -0
- package/package.json +29 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const FtDrawerCssVariables: {
|
|
2
|
+
shadow: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
width: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
headerPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
headerGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
headerBorderColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
headerBorderWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
headerBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
headerColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
contentPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
+
contentGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
+
contentBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
+
contentColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
actionsGap: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
+
actionsPadding: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
+
actionsBorderColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
+
actionsBorderWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
18
|
+
actionsBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
+
overlayBackgroundColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
+
overlayOpacity: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
21
|
+
closingButtonColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
22
|
+
contentOverflow: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
23
|
+
};
|
|
24
|
+
export declare const ftDrawerStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
export const FtDrawerCssVariables = {
|
|
4
|
+
shadow: FtCssVariableFactory.extend("--ft-drawer-shadow", "", designSystemVariables.elevation03),
|
|
5
|
+
width: FtCssVariableFactory.create("--ft-drawer-width", "", "SIZE", "800px"),
|
|
6
|
+
headerPadding: FtCssVariableFactory.create("--ft-drawer-header-padding", "", "SIZE", "8px 16px"),
|
|
7
|
+
headerGap: FtCssVariableFactory.create("--ft-drawer-header-gap", "", "SIZE", "8px"),
|
|
8
|
+
headerBorderColor: FtCssVariableFactory.extend("--ft-drawer-header-border-color", "", designSystemVariables.colorOutline),
|
|
9
|
+
headerBorderWidth: FtCssVariableFactory.create("--ft-drawer-header-border-width", "", "SIZE", "1px"),
|
|
10
|
+
headerBackgroundColor: FtCssVariableFactory.extend("--ft-drawer-header-background-color", "", designSystemVariables.colorSurface),
|
|
11
|
+
headerColor: FtCssVariableFactory.extend("--ft-drawer-header-color", "", designSystemVariables.colorOnSurfaceHigh),
|
|
12
|
+
contentPadding: FtCssVariableFactory.create("--ft-drawer-content-padding", "", "SIZE", "16px"),
|
|
13
|
+
contentGap: FtCssVariableFactory.create("--ft-drawer-content-gap", "", "SIZE", "16px"),
|
|
14
|
+
contentBackgroundColor: FtCssVariableFactory.extend("--ft-drawer-content-background-color", "", designSystemVariables.colorSurface),
|
|
15
|
+
contentColor: FtCssVariableFactory.extend("--ft-drawer-content-color", "", designSystemVariables.colorOnSurfaceMedium),
|
|
16
|
+
actionsGap: FtCssVariableFactory.create("--ft-drawer-action-gap", "", "SIZE", "8px"),
|
|
17
|
+
actionsPadding: FtCssVariableFactory.create("--ft-drawer-actions-padding", "", "SIZE", "8px 16px"),
|
|
18
|
+
actionsBorderColor: FtCssVariableFactory.extend("--ft-drawer-actions-border-color", "", designSystemVariables.colorOutline),
|
|
19
|
+
actionsBorderWidth: FtCssVariableFactory.create("--ft-drawer-actions-border-width", "", "SIZE", "1px"),
|
|
20
|
+
actionsBackgroundColor: FtCssVariableFactory.extend("--ft-drawer-actions-background-color", "", designSystemVariables.colorSurface),
|
|
21
|
+
overlayBackgroundColor: FtCssVariableFactory.create("--ft-drawer-overlay-background-color", "", "COLOR", "rgb(10, 10, 13)"),
|
|
22
|
+
overlayOpacity: FtCssVariableFactory.create("--ft-drawer-overlay-opacity", "", "NUMBER", "0.4"),
|
|
23
|
+
closingButtonColor: FtCssVariableFactory.extend("--ft-drawer-closing-button-color", "", designSystemVariables.colorOnSurfaceMedium),
|
|
24
|
+
contentOverflow: FtCssVariableFactory.create("--ft-drawer-content-overflow", "", "UNKNOWN", "visible"),
|
|
25
|
+
};
|
|
26
|
+
// language=CSS
|
|
27
|
+
export const ftDrawerStyles = css `
|
|
28
|
+
|
|
29
|
+
@keyframes slide-in-from-right {
|
|
30
|
+
0% {
|
|
31
|
+
transform: translateX(100%);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
100% {
|
|
35
|
+
transform: translateX(0%);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes fade-in {
|
|
40
|
+
0% {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
100% {
|
|
45
|
+
opacity: ${FtDrawerCssVariables.overlayOpacity};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[part=container] {
|
|
50
|
+
display: contents;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[part=dialog] {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 100%;
|
|
56
|
+
max-width: unset; /*Override user-agent stylesheet for dialog:modal set a max width and height to 100% - 6px*/
|
|
57
|
+
max-height: unset;
|
|
58
|
+
background: transparent;
|
|
59
|
+
border: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[part=overlay] {
|
|
63
|
+
animation-duration: 0.1s;
|
|
64
|
+
animation-name: fade-in;
|
|
65
|
+
animation-timing-function: ease-in-out;
|
|
66
|
+
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
background-color: ${FtDrawerCssVariables.overlayBackgroundColor};
|
|
70
|
+
opacity: ${FtDrawerCssVariables.overlayOpacity};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[part=inner-container] {
|
|
74
|
+
position: fixed;
|
|
75
|
+
top: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
height: 100%;
|
|
81
|
+
max-height: 100%;
|
|
82
|
+
width: ${FtDrawerCssVariables.width};
|
|
83
|
+
max-width: 100%;
|
|
84
|
+
box-shadow: ${FtDrawerCssVariables.shadow};
|
|
85
|
+
|
|
86
|
+
animation-duration: 0.2s;
|
|
87
|
+
animation-name: slide-in-from-right;
|
|
88
|
+
animation-timing-function: cubic-bezier(.46, 0, .31, .95);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[part=header] {
|
|
92
|
+
padding: ${FtDrawerCssVariables.headerPadding};
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: ${FtDrawerCssVariables.headerGap};
|
|
96
|
+
border-color: ${FtDrawerCssVariables.headerBorderColor};
|
|
97
|
+
border-bottom-width: ${FtDrawerCssVariables.headerBorderWidth};
|
|
98
|
+
border-bottom-style: solid;
|
|
99
|
+
color: ${FtDrawerCssVariables.headerColor};
|
|
100
|
+
background-color: ${FtDrawerCssVariables.headerBackgroundColor};
|
|
101
|
+
flex-shrink: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[part=heading] {
|
|
105
|
+
flex-grow: 1;
|
|
106
|
+
word-break: break-word;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[part=actions] {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: ${FtDrawerCssVariables.actionsGap};
|
|
113
|
+
padding: ${FtDrawerCssVariables.actionsPadding};
|
|
114
|
+
border-color: ${FtDrawerCssVariables.actionsBorderColor};
|
|
115
|
+
border-top-width: ${FtDrawerCssVariables.actionsBorderWidth};
|
|
116
|
+
border-top-style: solid;
|
|
117
|
+
background-color: ${FtDrawerCssVariables.actionsBackgroundColor};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[part=closing-button] {
|
|
121
|
+
color: ${FtDrawerCssVariables.closingButtonColor};
|
|
122
|
+
order: -1;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[part=body] {
|
|
126
|
+
flex-shrink: 1;
|
|
127
|
+
flex-grow: 1;
|
|
128
|
+
padding: ${FtDrawerCssVariables.contentPadding};
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: ${FtDrawerCssVariables.contentGap};
|
|
132
|
+
color: ${FtDrawerCssVariables.contentColor};
|
|
133
|
+
background-color: ${FtDrawerCssVariables.contentBackgroundColor};
|
|
134
|
+
overflow: ${FtDrawerCssVariables.contentOverflow};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[part=content] {
|
|
138
|
+
flex-grow: 1;
|
|
139
|
+
overflow: ${FtDrawerCssVariables.contentOverflow};
|
|
140
|
+
}
|
|
141
|
+
`;
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluid-topics/ft-drawer",
|
|
3
|
+
"version": "1.3.56",
|
|
4
|
+
"description": "A drawer component",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Lit"
|
|
7
|
+
],
|
|
8
|
+
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"main": "build/index.js",
|
|
11
|
+
"web": "build/ft-drawer.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/ft-wc-utils": "1.3.56",
|
|
23
|
+
"lit": "3.1.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@fluid-topics/ft-wc-test-utils": "1.3.56"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "01868f9694982c27cc22b788567208da17c855e2"
|
|
29
|
+
}
|