@leavittsoftware/web 2.28.0 → 2.30.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.30.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": "3437b45aa20bb40c9566a869f2b47d791bbd5042"
|
|
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,34 @@ 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 24px;
|
|
156
|
+
gap: 24px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
footer ::slotted(a) {
|
|
160
|
+
text-decoration: none;
|
|
161
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
162
|
+
font-family: var(--titanium-styles-a-font-family, Metropolis, Roboto, Noto, sans-serif);
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
opacity: 0.8;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([always-show-content]) dialog:not([open]) {
|
|
169
|
+
display: grid;
|
|
131
170
|
inset-inline-start: initial;
|
|
132
171
|
inset-inline-end: inherit;
|
|
133
172
|
border: 0;
|
|
@@ -136,7 +175,9 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
136
175
|
padding: 0;
|
|
137
176
|
margin: 0;
|
|
138
177
|
width: 100%;
|
|
139
|
-
|
|
178
|
+
|
|
179
|
+
min-height: calc(100dvh - var(--titanium-drawer-full-height-padding, 48px));
|
|
180
|
+
height: 100%;
|
|
140
181
|
|
|
141
182
|
animation: show 0.25s ease normal;
|
|
142
183
|
}
|
|
@@ -146,6 +187,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
146
187
|
top: 56px;
|
|
147
188
|
max-width: 300px;
|
|
148
189
|
max-height: calc(100vh - 56px);
|
|
190
|
+
|
|
149
191
|
overflow-y: auto;
|
|
150
192
|
}
|
|
151
193
|
|
|
@@ -216,7 +258,8 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
216
258
|
}}
|
|
217
259
|
part="dialog"
|
|
218
260
|
>
|
|
219
|
-
<slot></slot>
|
|
261
|
+
<main part="main"><slot></slot></main>
|
|
262
|
+
<footer part="footer"><slot name="footer" @slotchange=${() => (this.hasFooter = this.footerElements.length > 0)}></slot></footer>
|
|
220
263
|
</dialog>`;
|
|
221
264
|
}
|
|
222
265
|
};
|
|
@@ -229,6 +272,12 @@ __decorate([
|
|
|
229
272
|
__decorate([
|
|
230
273
|
property({ type: Boolean, reflect: true, attribute: 'always-show-content' })
|
|
231
274
|
], TitaniumDrawer.prototype, "alwayShowContent", null);
|
|
275
|
+
__decorate([
|
|
276
|
+
property({ type: Boolean, reflect: true, attribute: 'has-footer' })
|
|
277
|
+
], TitaniumDrawer.prototype, "hasFooter", null);
|
|
278
|
+
__decorate([
|
|
279
|
+
queryAssignedElements({ slot: 'footer' })
|
|
280
|
+
], TitaniumDrawer.prototype, "footerElements", void 0);
|
|
232
281
|
TitaniumDrawer = TitaniumDrawer_1 = __decorate([
|
|
233
282
|
customElement('titanium-drawer')
|
|
234
283
|
], TitaniumDrawer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["drawer.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["drawer.ts"],"names":[],"mappings":";;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