@leavittsoftware/web 2.27.2 → 2.29.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "ce2a71b36972e908a8af422c8f1711444cb330ce"
|
|
44
44
|
}
|
|
@@ -18,6 +18,8 @@ export declare class TitaniumDrawer extends LitElement {
|
|
|
18
18
|
* Show the slotted content regardless if the menu is open or closed
|
|
19
19
|
*/
|
|
20
20
|
accessor alwayShowContent: boolean;
|
|
21
|
+
private accessor hasFooter;
|
|
22
|
+
private readonly footerElements;
|
|
21
23
|
firstUpdated(): Promise<void>;
|
|
22
24
|
static animationsComplete(element: HTMLElement): Promise<PromiseSettledResult<Animation>[]>;
|
|
23
25
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var TitaniumDrawer_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { LitElement, css, html } from 'lit';
|
|
4
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
|
+
import { customElement, property, query, queryAssignedElements } from 'lit/decorators.js';
|
|
5
5
|
/**
|
|
6
6
|
* Titanium drawer - a minimalist fly-out style drawer based on a native dialog
|
|
7
7
|
*
|
|
@@ -28,6 +28,9 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
28
28
|
*/
|
|
29
29
|
get alwayShowContent() { return this.#alwayShowContent_accessor_storage; }
|
|
30
30
|
set alwayShowContent(value) { this.#alwayShowContent_accessor_storage = value; }
|
|
31
|
+
#hasFooter_accessor_storage = false;
|
|
32
|
+
get hasFooter() { return this.#hasFooter_accessor_storage; }
|
|
33
|
+
set hasFooter(value) { this.#hasFooter_accessor_storage = value; }
|
|
31
34
|
async firstUpdated() {
|
|
32
35
|
let touchstartX = 0;
|
|
33
36
|
let touchendX = 0;
|
|
@@ -36,7 +39,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
36
39
|
});
|
|
37
40
|
this.addEventListener('touchend', (e) => {
|
|
38
41
|
touchendX = e.changedTouches[0].screenX;
|
|
39
|
-
if (touchendX
|
|
42
|
+
if (touchstartX - touchendX > 50) {
|
|
40
43
|
this.close();
|
|
41
44
|
}
|
|
42
45
|
});
|
|
@@ -102,6 +105,15 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
102
105
|
dialog {
|
|
103
106
|
background-color: var(--md-sys-color-background);
|
|
104
107
|
color: var(--md-sys-color-on-background);
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
|
|
110
|
+
grid:
|
|
111
|
+
'content' 1fr
|
|
112
|
+
'footer' auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
dialog[has-footer] {
|
|
116
|
+
grid: 'content' 1fr;
|
|
105
117
|
}
|
|
106
118
|
|
|
107
119
|
dialog[loading] {
|
|
@@ -109,7 +121,8 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
109
121
|
}
|
|
110
122
|
|
|
111
123
|
dialog[open] {
|
|
112
|
-
display:
|
|
124
|
+
display: grid;
|
|
125
|
+
|
|
113
126
|
inset-inline-end: inherit;
|
|
114
127
|
border: 0;
|
|
115
128
|
padding: 0;
|
|
@@ -118,7 +131,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
118
131
|
flex-direction: column;
|
|
119
132
|
width: 300px;
|
|
120
133
|
|
|
121
|
-
min-height:
|
|
134
|
+
min-height: 100dvh;
|
|
122
135
|
max-height: -webkit-fill-available;
|
|
123
136
|
|
|
124
137
|
border-right: 1px solid var(--md-sys-color-outline-variant);
|
|
@@ -126,8 +139,25 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
126
139
|
animation: show 0.25s ease normal;
|
|
127
140
|
}
|
|
128
141
|
|
|
129
|
-
|
|
142
|
+
main {
|
|
143
|
+
grid-area: content;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
footer {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host([has-footer]) footer {
|
|
151
|
+
grid-area: footer;
|
|
152
|
+
|
|
130
153
|
display: flex;
|
|
154
|
+
flex-direction: row;
|
|
155
|
+
padding: 8px;
|
|
156
|
+
gap: 8px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([always-show-content]) dialog:not([open]) {
|
|
160
|
+
display: grid;
|
|
131
161
|
inset-inline-start: initial;
|
|
132
162
|
inset-inline-end: inherit;
|
|
133
163
|
border: 0;
|
|
@@ -136,7 +166,9 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
136
166
|
padding: 0;
|
|
137
167
|
margin: 0;
|
|
138
168
|
width: 100%;
|
|
139
|
-
|
|
169
|
+
|
|
170
|
+
min-height: calc(100dvh - var(--titanium-drawer-full-height-padding, 48px));
|
|
171
|
+
height: 100%;
|
|
140
172
|
|
|
141
173
|
animation: show 0.25s ease normal;
|
|
142
174
|
}
|
|
@@ -146,6 +178,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
146
178
|
top: 56px;
|
|
147
179
|
max-width: 300px;
|
|
148
180
|
max-height: calc(100vh - 56px);
|
|
181
|
+
|
|
149
182
|
overflow-y: auto;
|
|
150
183
|
}
|
|
151
184
|
|
|
@@ -154,7 +187,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
154
187
|
color: var(--md-sys-color-on-background);
|
|
155
188
|
margin: 0px;
|
|
156
189
|
font-weight: 400;
|
|
157
|
-
padding: 12px 0px 4px
|
|
190
|
+
padding: 12px 0px 4px 16px;
|
|
158
191
|
}
|
|
159
192
|
|
|
160
193
|
::slotted(h4) {
|
|
@@ -164,7 +197,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
164
197
|
color: var(--md-sys-color-on-background);
|
|
165
198
|
font-weight: 400;
|
|
166
199
|
margin: 0px;
|
|
167
|
-
padding: 16px
|
|
200
|
+
padding: 16px 16px 8px 16px;
|
|
168
201
|
min-height: 24px;
|
|
169
202
|
}
|
|
170
203
|
|
|
@@ -216,7 +249,8 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
216
249
|
}}
|
|
217
250
|
part="dialog"
|
|
218
251
|
>
|
|
219
|
-
<slot></slot>
|
|
252
|
+
<main part="main"><slot></slot></main>
|
|
253
|
+
<footer part="footer"><slot name="footer" @slotchange=${() => (this.hasFooter = this.footerElements.length > 0)}></slot></footer>
|
|
220
254
|
</dialog>`;
|
|
221
255
|
}
|
|
222
256
|
};
|
|
@@ -229,6 +263,12 @@ __decorate([
|
|
|
229
263
|
__decorate([
|
|
230
264
|
property({ type: Boolean, reflect: true, attribute: 'always-show-content' })
|
|
231
265
|
], TitaniumDrawer.prototype, "alwayShowContent", null);
|
|
266
|
+
__decorate([
|
|
267
|
+
property({ type: Boolean, reflect: true, attribute: 'has-footer' })
|
|
268
|
+
], TitaniumDrawer.prototype, "hasFooter", null);
|
|
269
|
+
__decorate([
|
|
270
|
+
queryAssignedElements({ slot: 'footer' })
|
|
271
|
+
], TitaniumDrawer.prototype, "footerElements", void 0);
|
|
232
272
|
TitaniumDrawer = TitaniumDrawer_1 = __decorate([
|
|
233
273
|
customElement('titanium-drawer')
|
|
234
274
|
], TitaniumDrawer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["drawer.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