@vandeurenglenn/lite-elements 0.3.18
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/exports/banner/banner.d.ts +7 -0
- package/exports/banner.js +68 -0
- package/exports/bundle/banner.js +37 -0
- package/exports/bundle/button.js +144 -0
- package/exports/bundle/card.js +140 -0
- package/exports/bundle/code.js +35 -0
- package/exports/bundle/custom-element-c2e883ba.js +1 -0
- package/exports/bundle/demo-elements.js +1 -0
- package/exports/bundle/demo-icons.js +16 -0
- package/exports/bundle/demo-shell.js +540 -0
- package/exports/bundle/demo.js +457 -0
- package/exports/bundle/dial.js +1 -0
- package/exports/bundle/dialog.js +149 -0
- package/exports/bundle/divider.js +21 -0
- package/exports/bundle/drawer-button.js +18 -0
- package/exports/bundle/drawer-item.js +39 -0
- package/exports/bundle/drawer-layout.js +96 -0
- package/exports/bundle/drawer.js +56 -0
- package/exports/bundle/dropdown-menu.js +59 -0
- package/exports/bundle/dropdown.js +26 -0
- package/exports/bundle/elements.js +1 -0
- package/exports/bundle/elevation.js +56 -0
- package/exports/bundle/hour-field.js +1 -0
- package/exports/bundle/icon-button.js +13 -0
- package/exports/bundle/icon-set.js +5 -0
- package/exports/bundle/icon.js +16 -0
- package/exports/bundle/index-3c006227.js +1 -0
- package/exports/bundle/index.html +590 -0
- package/exports/bundle/input.js +6 -0
- package/exports/bundle/it-d4d177bf.js +1 -0
- package/exports/bundle/list-item.js +43 -0
- package/exports/bundle/list.js +1 -0
- package/exports/bundle/menu.js +13 -0
- package/exports/bundle/menu2.js +1 -0
- package/exports/bundle/minute-field.js +5 -0
- package/exports/bundle/pages.js +43 -0
- package/exports/bundle/pane.js +96 -0
- package/exports/bundle/property-58e28172.js +11 -0
- package/exports/bundle/query-73dacde5.js +1 -0
- package/exports/bundle/rail.js +58 -0
- package/exports/bundle/root.js +8 -0
- package/exports/bundle/scroll-mixin.js +1 -0
- package/exports/bundle/section.js +11 -0
- package/exports/bundle/section2.js +25 -0
- package/exports/bundle/select-mixin.js +1 -0
- package/exports/bundle/selector-mixin.js +1 -0
- package/exports/bundle/selector.js +31 -0
- package/exports/bundle/supporting-pane.js +47 -0
- package/exports/bundle/tab.js +22 -0
- package/exports/bundle/tabs.js +51 -0
- package/exports/bundle/text-field.js +10 -0
- package/exports/bundle/theme.js +1 -0
- package/exports/bundle/themes/default/colors.module.css +180 -0
- package/exports/bundle/themes/default/missing/motion.css +4 -0
- package/exports/bundle/themes/default/missing/shape.css +13 -0
- package/exports/bundle/themes/default/missing/theme.dark.css +5 -0
- package/exports/bundle/themes/default/missing/theme.light.css +5 -0
- package/exports/bundle/themes/default/missing/tokens.css +9 -0
- package/exports/bundle/themes/default/theme.css +10 -0
- package/exports/bundle/themes/default/theme.dark.css +33 -0
- package/exports/bundle/themes/default/theme.light.css +33 -0
- package/exports/bundle/themes/default/tokens.css +256 -0
- package/exports/bundle/themes/default/typography.module.css +150 -0
- package/exports/bundle/time-picker.js +21 -0
- package/exports/bundle/title.js +1 -0
- package/exports/bundle/toggle-button.js +4 -0
- package/exports/bundle/toggle.js +5 -0
- package/exports/bundle/top-app-bar-e6e33a9e.js +114 -0
- package/exports/bundle/top-app-bar.js +1 -0
- package/exports/bundle/types.js +1 -0
- package/exports/bundle/typography.js +156 -0
- package/exports/button.js +227 -0
- package/exports/card/card.d.ts +13 -0
- package/exports/card.js +187 -0
- package/exports/code.js +77 -0
- package/exports/demo-elements.d.ts +9 -0
- package/exports/demo-elements.js +10 -0
- package/exports/demo-icons.js +48 -0
- package/exports/demo-shell.js +648 -0
- package/exports/demo.js +524 -0
- package/exports/dial.js +1 -0
- package/exports/dialog.js +256 -0
- package/exports/divider/divider.d.ts +17 -0
- package/exports/divider.js +54 -0
- package/exports/drawer/drawer-button.d.ts +9 -0
- package/exports/drawer/drawer-layout.d.ts +19 -0
- package/exports/drawer/drawer.d.ts +13 -0
- package/exports/drawer-button.js +83 -0
- package/exports/drawer-item.js +69 -0
- package/exports/drawer-layout.js +209 -0
- package/exports/drawer.js +140 -0
- package/exports/dropdown-menu.js +172 -0
- package/exports/dropdown.js +68 -0
- package/exports/elements.d.ts +63 -0
- package/exports/elements.js +41 -0
- package/exports/elevation/elevation.d.ts +11 -0
- package/exports/elevation.js +97 -0
- package/exports/hour-field.js +1 -0
- package/exports/icon-button.js +59 -0
- package/exports/icon-set.js +52 -0
- package/exports/icon.js +103 -0
- package/exports/input.js +36 -0
- package/exports/list/list.d.ts +1 -0
- package/exports/list-item.js +127 -0
- package/exports/list.js +1 -0
- package/exports/menu.js +68 -0
- package/exports/menu2.js +1 -0
- package/exports/minute-field.js +36 -0
- package/exports/mixins/scroll-mixin.d.ts +13 -0
- package/exports/mixins/select-mixin.d.ts +32 -0
- package/exports/mixins/selector-mixin.d.ts +8 -0
- package/exports/pages.js +88 -0
- package/exports/pane/pane.d.ts +14 -0
- package/exports/pane.js +182 -0
- package/exports/rail/rail.d.ts +9 -0
- package/exports/rail.js +124 -0
- package/exports/root.js +39 -0
- package/exports/scroll-mixin.js +36 -0
- package/exports/section.js +54 -0
- package/exports/section2.js +58 -0
- package/exports/select-mixin.js +139 -0
- package/exports/selector-mixin.js +43 -0
- package/exports/selector.js +63 -0
- package/exports/supporting-pane/supporting-pane.d.ts +12 -0
- package/exports/supporting-pane.js +133 -0
- package/exports/tab.js +47 -0
- package/exports/tabs/menu.d.ts +1 -0
- package/exports/tabs/tab.d.ts +4 -0
- package/exports/tabs/tabs.d.ts +5 -0
- package/exports/tabs.js +80 -0
- package/exports/text-field.js +88 -0
- package/exports/theme/theme.d.ts +15 -0
- package/exports/theme.js +123 -0
- package/exports/themes/default/colors.module.css +180 -0
- package/exports/themes/default/missing/motion.css +4 -0
- package/exports/themes/default/missing/shape.css +13 -0
- package/exports/themes/default/missing/theme.dark.css +5 -0
- package/exports/themes/default/missing/theme.light.css +5 -0
- package/exports/themes/default/missing/tokens.css +9 -0
- package/exports/themes/default/theme.css +10 -0
- package/exports/themes/default/theme.dark.css +33 -0
- package/exports/themes/default/theme.light.css +33 -0
- package/exports/themes/default/tokens.css +256 -0
- package/exports/themes/default/typography.module.css +150 -0
- package/exports/time-picker/dial.d.ts +1 -0
- package/exports/time-picker/hour-field.d.ts +1 -0
- package/exports/time-picker.js +52 -0
- package/exports/title.js +1 -0
- package/exports/toggle/toggle-button.d.ts +13 -0
- package/exports/toggle-button.js +63 -0
- package/exports/toggle.js +78 -0
- package/exports/top-app-bar.js +143 -0
- package/exports/tslib.es6-d3ba6528.js +57 -0
- package/exports/types.d.ts +18 -0
- package/exports/types.js +1 -0
- package/exports/typography/title.d.ts +1 -0
- package/exports/typography.js +206 -0
- package/package.json +256 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
|
|
2
|
+
import { customElement, property, css, html, LiteElement } from '@vandeurenglenn/lite';
|
|
3
|
+
import './elevation.js';
|
|
4
|
+
import './icon.js';
|
|
5
|
+
import '@vandeurenglenn/little-pubsub';
|
|
6
|
+
|
|
7
|
+
let CustomDialog = (() => {
|
|
8
|
+
let _classDecorators = [customElement('custom-dialog')];
|
|
9
|
+
let _classDescriptor;
|
|
10
|
+
let _classExtraInitializers = [];
|
|
11
|
+
let _classThis;
|
|
12
|
+
let _classSuper = LiteElement;
|
|
13
|
+
let _open_decorators;
|
|
14
|
+
let _open_initializers = [];
|
|
15
|
+
let _open_extraInitializers = [];
|
|
16
|
+
let _fullscreen_decorators;
|
|
17
|
+
let _fullscreen_initializers = [];
|
|
18
|
+
let _fullscreen_extraInitializers = [];
|
|
19
|
+
let _hasActions_decorators;
|
|
20
|
+
let _hasActions_initializers = [];
|
|
21
|
+
let _hasActions_extraInitializers = [];
|
|
22
|
+
let _hasHeader_decorators;
|
|
23
|
+
let _hasHeader_initializers = [];
|
|
24
|
+
let _hasHeader_extraInitializers = [];
|
|
25
|
+
let _hasHero_decorators;
|
|
26
|
+
let _hasHero_initializers = [];
|
|
27
|
+
let _hasHero_extraInitializers = [];
|
|
28
|
+
(class extends _classSuper {
|
|
29
|
+
static { _classThis = this; }
|
|
30
|
+
static {
|
|
31
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
32
|
+
_open_decorators = [property({ type: Boolean, reflect: true })];
|
|
33
|
+
_fullscreen_decorators = [property({ type: Boolean, reflect: true })];
|
|
34
|
+
_hasActions_decorators = [property({ type: Boolean, reflect: true, attribute: 'has-actions' })];
|
|
35
|
+
_hasHeader_decorators = [property({ type: Boolean, reflect: true, attribute: 'has-header' })];
|
|
36
|
+
_hasHero_decorators = [property({ type: Boolean, reflect: true, attribute: 'has-hero' })];
|
|
37
|
+
__esDecorate(this, null, _open_decorators, { kind: "accessor", name: "open", static: false, private: false, access: { has: obj => "open" in obj, get: obj => obj.open, set: (obj, value) => { obj.open = value; } }, metadata: _metadata }, _open_initializers, _open_extraInitializers);
|
|
38
|
+
__esDecorate(this, null, _fullscreen_decorators, { kind: "accessor", name: "fullscreen", static: false, private: false, access: { has: obj => "fullscreen" in obj, get: obj => obj.fullscreen, set: (obj, value) => { obj.fullscreen = value; } }, metadata: _metadata }, _fullscreen_initializers, _fullscreen_extraInitializers);
|
|
39
|
+
__esDecorate(this, null, _hasActions_decorators, { kind: "accessor", name: "hasActions", static: false, private: false, access: { has: obj => "hasActions" in obj, get: obj => obj.hasActions, set: (obj, value) => { obj.hasActions = value; } }, metadata: _metadata }, _hasActions_initializers, _hasActions_extraInitializers);
|
|
40
|
+
__esDecorate(this, null, _hasHeader_decorators, { kind: "accessor", name: "hasHeader", static: false, private: false, access: { has: obj => "hasHeader" in obj, get: obj => obj.hasHeader, set: (obj, value) => { obj.hasHeader = value; } }, metadata: _metadata }, _hasHeader_initializers, _hasHeader_extraInitializers);
|
|
41
|
+
__esDecorate(this, null, _hasHero_decorators, { kind: "accessor", name: "hasHero", static: false, private: false, access: { has: obj => "hasHero" in obj, get: obj => obj.hasHero, set: (obj, value) => { obj.hasHero = value; } }, metadata: _metadata }, _hasHero_initializers, _hasHero_extraInitializers);
|
|
42
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
43
|
+
_classThis = _classDescriptor.value;
|
|
44
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
45
|
+
}
|
|
46
|
+
#open_accessor_storage = __runInitializers(this, _open_initializers, false);
|
|
47
|
+
get open() { return this.#open_accessor_storage; }
|
|
48
|
+
set open(value) { this.#open_accessor_storage = value; }
|
|
49
|
+
#fullscreen_accessor_storage = (__runInitializers(this, _open_extraInitializers), __runInitializers(this, _fullscreen_initializers, false));
|
|
50
|
+
get fullscreen() { return this.#fullscreen_accessor_storage; }
|
|
51
|
+
set fullscreen(value) { this.#fullscreen_accessor_storage = value; }
|
|
52
|
+
#hasActions_accessor_storage = (__runInitializers(this, _fullscreen_extraInitializers), __runInitializers(this, _hasActions_initializers, false));
|
|
53
|
+
get hasActions() { return this.#hasActions_accessor_storage; }
|
|
54
|
+
set hasActions(value) { this.#hasActions_accessor_storage = value; }
|
|
55
|
+
#hasHeader_accessor_storage = (__runInitializers(this, _hasActions_extraInitializers), __runInitializers(this, _hasHeader_initializers, false));
|
|
56
|
+
get hasHeader() { return this.#hasHeader_accessor_storage; }
|
|
57
|
+
set hasHeader(value) { this.#hasHeader_accessor_storage = value; }
|
|
58
|
+
#hasHero_accessor_storage = (__runInitializers(this, _hasHeader_extraInitializers), __runInitializers(this, _hasHero_initializers, false));
|
|
59
|
+
get hasHero() { return this.#hasHero_accessor_storage; }
|
|
60
|
+
set hasHero(value) { this.#hasHero_accessor_storage = value; }
|
|
61
|
+
connectedCallback() {
|
|
62
|
+
const actionsSlot = this.shadowRoot.querySelector('slot[name="actions"]');
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
this.hasActions = Array.from(actionsSlot?.assignedNodes() || []).length !== 0;
|
|
65
|
+
let headerSlot = this.shadowRoot.querySelector('slot[name="header"]');
|
|
66
|
+
const checks = ['title', 'header-start', 'header-end'];
|
|
67
|
+
let i = 0;
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
while (Array.from(headerSlot.assignedElements()).length === 0 && i < checks.length) {
|
|
70
|
+
headerSlot = this.shadowRoot.querySelector(`slot[name="${checks[i]}"]`);
|
|
71
|
+
i += 1;
|
|
72
|
+
}
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
this.hasHeader = headerSlot.assignedElements().length !== 0;
|
|
75
|
+
const heroSlot = this.shadowRoot.querySelector('slot[name="hero-icon"]');
|
|
76
|
+
// @ts-ignore
|
|
77
|
+
this.hashero = Array.from(heroSlot?.assignedNodes() || []).length !== 0;
|
|
78
|
+
}
|
|
79
|
+
onChange(propertyKey, value) {
|
|
80
|
+
if (propertyKey === 'open') {
|
|
81
|
+
this.open
|
|
82
|
+
? this.querySelector('[slot="actions"]').addEventListener('click', this._close)
|
|
83
|
+
: this.querySelector('[slot="actions"]').removeEventListener('click', this._close);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
_close = (__runInitializers(this, _hasHero_extraInitializers), (event) => {
|
|
87
|
+
const target = event.composedPath()[0];
|
|
88
|
+
this.dispatchEvent(new CustomEvent('close', { detail: target.getAttribute('action') || 'close' }));
|
|
89
|
+
this.open = false;
|
|
90
|
+
});
|
|
91
|
+
static styles = [
|
|
92
|
+
css `
|
|
93
|
+
:host {
|
|
94
|
+
position: fixed;
|
|
95
|
+
inset: 0;
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.header {
|
|
104
|
+
height: 56px;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.scrim,
|
|
109
|
+
.dialog {
|
|
110
|
+
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
111
|
+
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.scrim {
|
|
115
|
+
position: absolute;
|
|
116
|
+
inset: 0;
|
|
117
|
+
background-color: var(--md-sys-color-scrim);
|
|
118
|
+
opacity: 0;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
dialog {
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
border: none;
|
|
125
|
+
min-width: 280px;
|
|
126
|
+
max-width: 560px;
|
|
127
|
+
width: fit-content;
|
|
128
|
+
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
129
|
+
background-color: var(--md-sys-color-surface-container-high);
|
|
130
|
+
color: var(--md-sys-color-on-surface);
|
|
131
|
+
padding: 24px;
|
|
132
|
+
box-sizing: border-box;
|
|
133
|
+
position: relative;
|
|
134
|
+
opacity: 0;
|
|
135
|
+
transform: scaleY(0.1);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.body {
|
|
139
|
+
overflow-y: auto;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:host([has-actions]) .body {
|
|
143
|
+
padding-top: 16px;
|
|
144
|
+
padding-bottom: 24px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:host([has-header][has-hero]) .header {
|
|
148
|
+
padding-top: 16px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
slot[name='title']::slotted(*) {
|
|
152
|
+
font-family: var(--md-sys-typescale-title-large-font-family-name);
|
|
153
|
+
font-style: var(--md-sys-typescale-title-large-font-family-style);
|
|
154
|
+
font-weight: var(--md-sys-typescale-title-large-font-weight);
|
|
155
|
+
font-size: var(--md-sys-typescale-title-large-font-size);
|
|
156
|
+
letter-spacing: var(--md-sys-typescale-title-large-tracking);
|
|
157
|
+
line-height: var(--md-sys-typescale-title-large-height);
|
|
158
|
+
text-transform: var(--md-sys-typescale-title-large-text-transform);
|
|
159
|
+
text-decoration: var(--md-sys-typescale-title-large-text-decoration);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([has-hero]) slot[name='title']::slotted(*) {
|
|
163
|
+
padding-top: 16px;
|
|
164
|
+
position: absolute;
|
|
165
|
+
left: 50%;
|
|
166
|
+
transform: translateX(-50%);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host([fullscreen]) slot[name='title']::slotted(*) {
|
|
170
|
+
padding-left: 16px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:host(:not([fullscreen])) dialog {
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
slot[name='supporting-text']::slotted(*) {
|
|
179
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
180
|
+
padding-bottom: 16px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
slot[name='actions']::slotted(*) {
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: end;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:host([open]) dialog,
|
|
189
|
+
:host([open]) .scrim {
|
|
190
|
+
pointer-events: auto;
|
|
191
|
+
opacity: 1;
|
|
192
|
+
transform: scaleY(1);
|
|
193
|
+
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms opacity,
|
|
194
|
+
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host([open]) .scrim {
|
|
198
|
+
opacity: 0.44;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host([fullscreen]) slot[name='actions']::slotted(*) {
|
|
202
|
+
--custom-icon-size: 12px;
|
|
203
|
+
--custom-button-color: var(--md-sys-color-primary);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
slot[name='actions'] {
|
|
207
|
+
align-items: flex-end;
|
|
208
|
+
}
|
|
209
|
+
`
|
|
210
|
+
];
|
|
211
|
+
render() {
|
|
212
|
+
return html `
|
|
213
|
+
<span class="scrim" @click=${this._close}></span>
|
|
214
|
+
<dialog ?open=${this.open}>
|
|
215
|
+
<custom-elevation level=${this.fullscreen ? 0 : 3}></custom-elevation>
|
|
216
|
+
<slot name="hero-icon"></slot>
|
|
217
|
+
<slot name="supporting-text"></slot>
|
|
218
|
+
<flex-row class="header" center>
|
|
219
|
+
<slot name="header">
|
|
220
|
+
<flex-row center style="width: 100%">
|
|
221
|
+
<slot name="header-start">
|
|
222
|
+
${this.fullscreen
|
|
223
|
+
? html `<custom-button @click=${this._close}
|
|
224
|
+
><custom-icon slot="icon">close</custom-icon></custom-button
|
|
225
|
+
>`
|
|
226
|
+
: ''}
|
|
227
|
+
</slot>
|
|
228
|
+
<slot name="title"></slot>
|
|
229
|
+
<flex-it></flex-it>
|
|
230
|
+
<slot name="header-end">
|
|
231
|
+
${this.fullscreen ? html `<slot name="actions"></slot>` : ''}
|
|
232
|
+
${this.fullscreen
|
|
233
|
+
? ''
|
|
234
|
+
: html `<custom-button @click=${this._close}
|
|
235
|
+
><custom-icon slot="icon">close</custom-icon></custom-button
|
|
236
|
+
>`}
|
|
237
|
+
</slot>
|
|
238
|
+
</flex-row>
|
|
239
|
+
</slot>
|
|
240
|
+
</flex-row>
|
|
241
|
+
<flex-column class="body">
|
|
242
|
+
<slot></slot>
|
|
243
|
+
</flex-column>
|
|
244
|
+
|
|
245
|
+
${this.fullscreen ? '' : html `<slot name="actions"></slot>`}
|
|
246
|
+
</dialog>
|
|
247
|
+
`;
|
|
248
|
+
}
|
|
249
|
+
static {
|
|
250
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
return _classThis;
|
|
254
|
+
})();
|
|
255
|
+
|
|
256
|
+
export { CustomDialog };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
|
+
import '../button/button.js';
|
|
3
|
+
export declare class CustomDivider extends LiteElement {
|
|
4
|
+
static properties: {
|
|
5
|
+
inset: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
reflect: boolean;
|
|
8
|
+
attribute: string;
|
|
9
|
+
};
|
|
10
|
+
middleInset: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
reflect: boolean;
|
|
13
|
+
attribute: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
|
|
2
|
+
import { customElement, html, LiteElement } from '@vandeurenglenn/lite';
|
|
3
|
+
import './button.js';
|
|
4
|
+
import './elevation.js';
|
|
5
|
+
|
|
6
|
+
let CustomDivider = (() => {
|
|
7
|
+
let _classDecorators = [customElement('custom-divider')];
|
|
8
|
+
let _classDescriptor;
|
|
9
|
+
let _classExtraInitializers = [];
|
|
10
|
+
let _classThis;
|
|
11
|
+
let _classSuper = LiteElement;
|
|
12
|
+
(class extends _classSuper {
|
|
13
|
+
static { _classThis = this; }
|
|
14
|
+
static {
|
|
15
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
16
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
17
|
+
_classThis = _classDescriptor.value;
|
|
18
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
19
|
+
}
|
|
20
|
+
static properties = {
|
|
21
|
+
inset: { type: Boolean, reflect: true, attribute: 'inset' },
|
|
22
|
+
middleInset: { type: Boolean, reflect: true, attribute: 'middle-inset' }
|
|
23
|
+
};
|
|
24
|
+
render() {
|
|
25
|
+
return html `
|
|
26
|
+
<style>
|
|
27
|
+
:host {
|
|
28
|
+
display: block;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
min-height: 1px;
|
|
31
|
+
margin: 8px 0 16px 0;
|
|
32
|
+
background: var(--md-sys-color-outline);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([inset]) {
|
|
36
|
+
margin-left: 16px;
|
|
37
|
+
margin-right: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([middle-inset]) {
|
|
41
|
+
margin-left: 16px;
|
|
42
|
+
margin-right: 16px;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
static {
|
|
48
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return _classThis;
|
|
52
|
+
})();
|
|
53
|
+
|
|
54
|
+
export { CustomDivider };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
|
+
import '../icon/icon.js';
|
|
3
|
+
import '../button/button.js';
|
|
4
|
+
export declare class CustomDrawerButton extends LiteElement {
|
|
5
|
+
accessor mobile: boolean;
|
|
6
|
+
accessor drawerOpen: boolean;
|
|
7
|
+
accessor id: string;
|
|
8
|
+
openPane: any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
|
+
import './drawer.js';
|
|
3
|
+
import './drawer-button.js';
|
|
4
|
+
import './drawer-item.js';
|
|
5
|
+
import '../bar/top-app-bar.js';
|
|
6
|
+
import { AppBarTypes } from '../bar/top-app-bar.js';
|
|
7
|
+
import '@vandeurenglenn/flex-elements/column.js';
|
|
8
|
+
export declare class CustomDrawerLayout extends LiteElement {
|
|
9
|
+
accessor drawerOpen: boolean;
|
|
10
|
+
accessor keepClosed: boolean;
|
|
11
|
+
accessor narrow: boolean;
|
|
12
|
+
accessor drawerType: 'modal' | undefined;
|
|
13
|
+
accessor appBarType: AppBarTypes;
|
|
14
|
+
accessor mainDrawerId: string;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
_onnarrow({ detail }: CustomEvent): boolean;
|
|
17
|
+
private _click;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
|
+
import '../elevation/elevation.js';
|
|
3
|
+
import '../button/button.js';
|
|
4
|
+
import '../pane/pane.js';
|
|
5
|
+
export declare class CustomDrawer extends LiteElement {
|
|
6
|
+
accessor open: boolean;
|
|
7
|
+
accessor mobile: boolean;
|
|
8
|
+
accessor type: 'modal' | undefined;
|
|
9
|
+
accessor right: boolean;
|
|
10
|
+
accessor id: string;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
|
|
2
|
+
import { customElement, property, css, html, LiteElement } from '@vandeurenglenn/lite';
|
|
3
|
+
import './icon.js';
|
|
4
|
+
import './button.js';
|
|
5
|
+
import '@vandeurenglenn/little-pubsub';
|
|
6
|
+
import './elevation.js';
|
|
7
|
+
|
|
8
|
+
let CustomDrawerButton = (() => {
|
|
9
|
+
let _classDecorators = [customElement('custom-drawer-button')];
|
|
10
|
+
let _classDescriptor;
|
|
11
|
+
let _classExtraInitializers = [];
|
|
12
|
+
let _classThis;
|
|
13
|
+
let _classSuper = LiteElement;
|
|
14
|
+
let _mobile_decorators;
|
|
15
|
+
let _mobile_initializers = [];
|
|
16
|
+
let _mobile_extraInitializers = [];
|
|
17
|
+
let _drawerOpen_decorators;
|
|
18
|
+
let _drawerOpen_initializers = [];
|
|
19
|
+
let _drawerOpen_extraInitializers = [];
|
|
20
|
+
let _id_decorators;
|
|
21
|
+
let _id_initializers = [];
|
|
22
|
+
let _id_extraInitializers = [];
|
|
23
|
+
(class extends _classSuper {
|
|
24
|
+
static { _classThis = this; }
|
|
25
|
+
static {
|
|
26
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
27
|
+
_mobile_decorators = [property({ type: Boolean, reflect: true })];
|
|
28
|
+
_drawerOpen_decorators = [property({ type: Boolean, reflect: true, attribute: 'drawer-open' })];
|
|
29
|
+
_id_decorators = [property()];
|
|
30
|
+
__esDecorate(this, null, _mobile_decorators, { kind: "accessor", name: "mobile", static: false, private: false, access: { has: obj => "mobile" in obj, get: obj => obj.mobile, set: (obj, value) => { obj.mobile = value; } }, metadata: _metadata }, _mobile_initializers, _mobile_extraInitializers);
|
|
31
|
+
__esDecorate(this, null, _drawerOpen_decorators, { kind: "accessor", name: "drawerOpen", static: false, private: false, access: { has: obj => "drawerOpen" in obj, get: obj => obj.drawerOpen, set: (obj, value) => { obj.drawerOpen = value; } }, metadata: _metadata }, _drawerOpen_initializers, _drawerOpen_extraInitializers);
|
|
32
|
+
__esDecorate(this, null, _id_decorators, { kind: "accessor", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
|
|
33
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
34
|
+
_classThis = _classDescriptor.value;
|
|
35
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
36
|
+
}
|
|
37
|
+
#mobile_accessor_storage = __runInitializers(this, _mobile_initializers, false);
|
|
38
|
+
get mobile() { return this.#mobile_accessor_storage; }
|
|
39
|
+
set mobile(value) { this.#mobile_accessor_storage = value; }
|
|
40
|
+
#drawerOpen_accessor_storage = (__runInitializers(this, _mobile_extraInitializers), __runInitializers(this, _drawerOpen_initializers, void 0));
|
|
41
|
+
get drawerOpen() { return this.#drawerOpen_accessor_storage; }
|
|
42
|
+
set drawerOpen(value) { this.#drawerOpen_accessor_storage = value; }
|
|
43
|
+
#id_accessor_storage = (__runInitializers(this, _drawerOpen_extraInitializers), __runInitializers(this, _id_initializers, void 0));
|
|
44
|
+
get id() { return this.#id_accessor_storage; }
|
|
45
|
+
set id(value) { this.#id_accessor_storage = value; }
|
|
46
|
+
openPane() {
|
|
47
|
+
document.dispatchEvent(new CustomEvent('custom-pane-open', { detail: this.id }));
|
|
48
|
+
}
|
|
49
|
+
static styles = [
|
|
50
|
+
css `
|
|
51
|
+
:host {
|
|
52
|
+
display: block;
|
|
53
|
+
opacity: 1;
|
|
54
|
+
pointer-events: auto;
|
|
55
|
+
will-change: width, opacity;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([drawer-open]) {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
width: 0;
|
|
62
|
+
}
|
|
63
|
+
`
|
|
64
|
+
];
|
|
65
|
+
render() {
|
|
66
|
+
return html `
|
|
67
|
+
<custom-button @click=${() => this.openPane()}>
|
|
68
|
+
<custom-icon slot="icon">menu</custom-icon>
|
|
69
|
+
</custom-button>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
__runInitializers(this, _id_extraInitializers);
|
|
75
|
+
}
|
|
76
|
+
static {
|
|
77
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return _classThis;
|
|
81
|
+
})();
|
|
82
|
+
|
|
83
|
+
export { CustomDrawerButton };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { _ as __esDecorate, a as __runInitializers } from './tslib.es6-d3ba6528.js';
|
|
2
|
+
import { customElement, css, html, LiteElement } from '@vandeurenglenn/lite';
|
|
3
|
+
|
|
4
|
+
let CustomDrawerItem = (() => {
|
|
5
|
+
let _classDecorators = [customElement('custom-drawer-item')];
|
|
6
|
+
let _classDescriptor;
|
|
7
|
+
let _classExtraInitializers = [];
|
|
8
|
+
let _classThis;
|
|
9
|
+
let _classSuper = LiteElement;
|
|
10
|
+
(class extends _classSuper {
|
|
11
|
+
static { _classThis = this; }
|
|
12
|
+
static {
|
|
13
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
14
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
15
|
+
_classThis = _classDescriptor.value;
|
|
16
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
17
|
+
}
|
|
18
|
+
static styles = [
|
|
19
|
+
css `
|
|
20
|
+
:host {
|
|
21
|
+
display: flex;
|
|
22
|
+
padding-left: 16px;
|
|
23
|
+
padding-right: 24px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
min-height: 54px;
|
|
26
|
+
max-height: 54px;
|
|
27
|
+
width: 100%;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
30
|
+
align-items: center;
|
|
31
|
+
pointer-events: auto;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
slot {
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
slot[name='icon']::slotted(*) {
|
|
40
|
+
margin-right: 12px;
|
|
41
|
+
height: 24px;
|
|
42
|
+
width: 24px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
slot[name='end']::slotted(*) {
|
|
46
|
+
margin-left: 12px;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([non-interactive]) {
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
`
|
|
54
|
+
];
|
|
55
|
+
render() {
|
|
56
|
+
return html `
|
|
57
|
+
<slot name="icon"></slot>
|
|
58
|
+
<slot></slot>
|
|
59
|
+
<slot name="end"></slot>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
static {
|
|
63
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return _classThis;
|
|
67
|
+
})();
|
|
68
|
+
|
|
69
|
+
export { CustomDrawerItem };
|