@vandeurenglenn/lite-elements 0.3.41 → 0.3.43
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/bar/top-app-bar.d.ts +1 -1
- package/exports/bundle/banner.js +1 -1
- package/exports/bundle/button.js +1 -1
- package/exports/bundle/card.js +1 -1
- package/exports/bundle/code.js +1 -1
- package/exports/bundle/{column-CNOGwAhj.js → column-B0bUzxkF.js} +1 -1
- package/exports/bundle/custom-element-CAdbJRVg.js +1 -0
- package/exports/bundle/demo-elements.js +1 -1
- package/exports/bundle/demo-icons.js +3 -3
- package/exports/bundle/demo-shell.js +1 -1
- package/exports/bundle/demo.js +1 -1
- package/exports/bundle/dialog.js +1 -1
- package/exports/bundle/divider.js +1 -1
- package/exports/bundle/drawer-button.js +1 -1
- package/exports/bundle/drawer-item.js +1 -1
- package/exports/bundle/drawer-layout.js +1 -1
- package/exports/bundle/drawer.js +49 -47
- package/exports/bundle/dropdown-menu.js +1 -1
- package/exports/bundle/dropdown.js +1 -1
- package/exports/bundle/elements.js +1 -1
- package/exports/bundle/elevation.js +1 -1
- package/exports/bundle/fab.js +2 -2
- package/exports/bundle/hash-router.js +1 -0
- package/exports/bundle/icon-button.js +1 -1
- package/exports/bundle/icon-set.js +1 -1
- package/exports/bundle/icon.js +1 -1
- package/exports/bundle/input.js +1 -1
- package/exports/bundle/list-item.js +1 -1
- package/exports/bundle/menu.js +1 -1
- package/exports/bundle/minute-field.js +1 -1
- package/exports/bundle/notification.js +1 -1
- package/exports/bundle/notifications.js +1 -1
- package/exports/bundle/pages.js +1 -1
- package/exports/bundle/pane.js +76 -67
- package/exports/bundle/property-BYA8Sw2t.js +11 -0
- package/exports/bundle/property-C4lhirVQ.js +23 -0
- package/exports/bundle/query-DCTzLeFk.js +1 -0
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/row-DYDgQVDj.js +28 -0
- package/exports/bundle/section.js +1 -1
- package/exports/bundle/section2.js +1 -1
- package/exports/bundle/select-mixin.js +1 -1
- package/exports/bundle/selector-mixin.js +1 -1
- package/exports/bundle/selector.js +1 -1
- package/exports/bundle/simple-hash-router.js +1 -0
- package/exports/bundle/summary-mirror.js +1 -1
- package/exports/bundle/summary.js +1 -1
- package/exports/bundle/supporting-pane.js +1 -1
- package/exports/bundle/tab.js +1 -1
- package/exports/bundle/tabs.js +1 -1
- package/exports/bundle/text-field.js +1 -1
- package/exports/bundle/theme.js +1 -1
- package/exports/bundle/time-picker.js +1 -1
- package/exports/bundle/toggle-button.js +1 -1
- package/exports/bundle/toggle.js +1 -1
- package/exports/bundle/top-app-bar.js +4 -4
- package/exports/bundle/types2.js +1 -0
- package/exports/bundle/typography.js +1 -1
- package/exports/bundle/upload-file.js +1 -1
- package/exports/bundle/upload-image.js +91 -88
- package/exports/button/button.d.ts +1 -1
- package/exports/button/icon-button.d.ts +1 -1
- package/exports/demo/code.d.ts +1 -1
- package/exports/demo/demo-icons.d.ts +1 -1
- package/exports/demo/demo-shell.d.ts +1 -1
- package/exports/demo/demo.d.ts +1 -1
- package/exports/demo/section.d.ts +1 -1
- package/exports/demo-shell.js +2 -0
- package/exports/dialog/dialog.d.ts +1 -1
- package/exports/drawer/drawer-button.d.ts +1 -1
- package/exports/drawer/drawer-item.d.ts +1 -1
- package/exports/drawer/drawer.d.ts +1 -0
- package/exports/drawer-layout.js +2 -0
- package/exports/drawer.js +9 -54
- package/exports/dropdown/dropdown-menu.d.ts +1 -1
- package/exports/dropdown/dropdown.d.ts +1 -1
- package/exports/elements.js +2 -0
- package/exports/fab/fab.d.ts +1 -1
- package/exports/hash-router.js +97 -0
- package/exports/icon/icon-set.d.ts +1 -1
- package/exports/icon/icon.d.ts +1 -1
- package/exports/list/list-item.d.ts +1 -1
- package/exports/menu/menu.d.ts +1 -1
- package/exports/mixins/file-reader-mixin.d.ts +1 -1
- package/exports/notification/notifications.d.ts +1 -1
- package/exports/notifications.js +1 -0
- package/exports/pages/pages.d.ts +1 -1
- package/exports/pane/pane.d.ts +1 -0
- package/exports/pane.js +8 -82
- package/exports/rail.js +1 -0
- package/exports/root/root.d.ts +1 -1
- package/exports/router/hash-router.d.ts +18 -0
- package/exports/router/types.d.ts +45 -0
- package/exports/section/section.d.ts +1 -1
- package/exports/selector/selector.d.ts +1 -1
- package/exports/simple-hash-router.js +111 -0
- package/exports/summary/summary.d.ts +1 -1
- package/exports/supporting-pane.js +1 -0
- package/exports/text-field/text-field.d.ts +1 -1
- package/exports/time-picker/input.d.ts +1 -1
- package/exports/time-picker/minute-field.d.ts +1 -1
- package/exports/time-picker/time-picker.d.ts +1 -1
- package/exports/toggle/toggle.d.ts +1 -1
- package/exports/types2.js +1 -0
- package/exports/typography/typography.d.ts +1 -1
- package/exports/upload/upload-file.d.ts +1 -1
- package/exports/upload/upload-image.d.ts +2 -2
- package/package.json +14 -4
- package/exports/bundle/custom-element-BOdKJYdz.js +0 -1
- package/exports/bundle/property-BhmaXNYq.js +0 -39
- package/exports/bundle/property-D-Y1CFIF.js +0 -11
- package/exports/bundle/query-D-PG8Oyh.js +0 -1
- package/exports/bundle/row-BHK6Zell.js +0 -28
|
@@ -6,7 +6,7 @@ export declare class CustomButton extends LiteElement {
|
|
|
6
6
|
accessor hasLabel: boolean;
|
|
7
7
|
accessor type: 'elevated' | 'filled' | 'text' | 'tonal' | 'outlined';
|
|
8
8
|
accessor label: any;
|
|
9
|
-
static styles: import("
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
10
|
connectedCallback(): void;
|
|
11
11
|
onChange(propertyKey: any, value: any): void;
|
|
12
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -3,6 +3,6 @@ import './button.js';
|
|
|
3
3
|
import './../icon/icon.js';
|
|
4
4
|
export declare class CustomIconButton extends LiteElement {
|
|
5
5
|
accessor icon: string;
|
|
6
|
-
static styles: import("
|
|
6
|
+
static styles: import("lit").CSSResult[];
|
|
7
7
|
render(): import("lit-html").TemplateResult<1>;
|
|
8
8
|
}
|
package/exports/demo/code.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
export declare class DemoCode extends LiteElement {
|
|
3
3
|
accessor code: string;
|
|
4
|
-
static styles: import("
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
import './../icon/icon-set.js';
|
|
3
3
|
export declare class DemoIcons extends LiteElement {
|
|
4
|
-
static styles: import("
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
@@ -5,6 +5,6 @@ export declare class DemoShell extends LiteElement {
|
|
|
5
5
|
accessor selector: any;
|
|
6
6
|
accessor pages: any;
|
|
7
7
|
connectedCallback(): void;
|
|
8
|
-
static styles: import("
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
}
|
package/exports/demo/demo.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LiteElement } from '@vandeurenglenn/lite';
|
|
|
2
2
|
export declare class DemoShell extends LiteElement {
|
|
3
3
|
accessor selector: any;
|
|
4
4
|
accessor pages: any;
|
|
5
|
-
static styles: import("
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
6
|
connectedCallback(): Promise<void>;
|
|
7
7
|
render(): import("lit-html").TemplateResult<1>;
|
|
8
8
|
}
|
|
@@ -3,6 +3,6 @@ import '../section/section.js';
|
|
|
3
3
|
import './code.js';
|
|
4
4
|
export declare class DemoSection extends LiteElement {
|
|
5
5
|
connectedCallback(): Promise<void>;
|
|
6
|
-
static styles: import("
|
|
6
|
+
static styles: import("lit").CSSResult[];
|
|
7
7
|
render(): import("lit-html").TemplateResult<1>;
|
|
8
8
|
}
|
package/exports/demo-shell.js
CHANGED
|
@@ -38,10 +38,12 @@ import './elevation.js';
|
|
|
38
38
|
import '@vandeurenglenn/flex-elements/it.js';
|
|
39
39
|
import './selector-mixin.js';
|
|
40
40
|
import './select-mixin.js';
|
|
41
|
+
import '@vandeurenglenn/custom-shared-styles/drawer.css';
|
|
41
42
|
import './scroll-mixin.js';
|
|
42
43
|
import '@vandeurenglenn/flex-elements/column.js';
|
|
43
44
|
import '@vandeurenglenn/flex-elements/row.js';
|
|
44
45
|
import '@vandeurenglenn/little-pubsub';
|
|
46
|
+
import '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
45
47
|
import './tab.js';
|
|
46
48
|
import './input.js';
|
|
47
49
|
import 'lit';
|
|
@@ -11,6 +11,6 @@ export declare class CustomDialog extends LiteElement {
|
|
|
11
11
|
connectedCallback(): void;
|
|
12
12
|
onChange(propertyKey: any, value: any): void;
|
|
13
13
|
_close(event: Event): void;
|
|
14
|
-
static styles: import("
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
16
16
|
}
|
|
@@ -5,6 +5,6 @@ export declare class CustomDrawerButton extends LiteElement {
|
|
|
5
5
|
accessor drawerOpen: boolean;
|
|
6
6
|
accessor id: string;
|
|
7
7
|
openPane(): void;
|
|
8
|
-
static styles: import("
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
export declare class CustomDrawerItem extends LiteElement {
|
|
3
|
-
static styles: import("
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
4
|
render(): import("lit-html").TemplateResult<1>;
|
|
5
5
|
}
|
package/exports/drawer-layout.js
CHANGED
|
@@ -11,6 +11,8 @@ import './pane.js';
|
|
|
11
11
|
import './icon-button.js';
|
|
12
12
|
import './icon.js';
|
|
13
13
|
import '@vandeurenglenn/little-pubsub';
|
|
14
|
+
import '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
15
|
+
import '@vandeurenglenn/custom-shared-styles/drawer.css';
|
|
14
16
|
import '@vandeurenglenn/flex-elements/it.js';
|
|
15
17
|
import '@vandeurenglenn/flex-elements/row.js';
|
|
16
18
|
|
package/exports/drawer.js
CHANGED
|
@@ -3,9 +3,11 @@ import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite
|
|
|
3
3
|
import './elevation.js';
|
|
4
4
|
import './button.js';
|
|
5
5
|
import './pane.js';
|
|
6
|
+
import style from '@vandeurenglenn/custom-shared-styles/drawer.css';
|
|
6
7
|
import './icon-button.js';
|
|
7
8
|
import './icon.js';
|
|
8
9
|
import '@vandeurenglenn/little-pubsub';
|
|
10
|
+
import '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
9
11
|
|
|
10
12
|
let CustomDrawer = (() => {
|
|
11
13
|
let _classDecorators = [customElement('custom-drawer')];
|
|
@@ -45,7 +47,6 @@ let CustomDrawer = (() => {
|
|
|
45
47
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
46
48
|
_classThis = _classDescriptor.value;
|
|
47
49
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
48
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
49
50
|
}
|
|
50
51
|
#open_accessor_storage = __runInitializers(this, _open_initializers, void 0);
|
|
51
52
|
get open() { return this.#open_accessor_storage; }
|
|
@@ -72,70 +73,24 @@ let CustomDrawer = (() => {
|
|
|
72
73
|
this.open = true;
|
|
73
74
|
});
|
|
74
75
|
}
|
|
76
|
+
static styles = [style];
|
|
75
77
|
render() {
|
|
76
|
-
return html
|
|
77
|
-
:host {
|
|
78
|
-
display: contents;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
custom-pane {
|
|
82
|
-
box-sizing: border-box;
|
|
83
|
-
padding: 12px 24px;
|
|
84
|
-
height: 100%;
|
|
85
|
-
--custom-pane-width: var(--custom-drawer-with, 320px);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
slot[name='headline']::slotted(*) {
|
|
89
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
90
|
-
font-family: var(--md-sys-typescale-title-small-font-family-name);
|
|
91
|
-
font-style: var(--md-sys-typescale-title-small-font-family-style);
|
|
92
|
-
font-weight: var(--md-sys-typescale-title-small-font-weight);
|
|
93
|
-
font-size: var(--md-sys-typescale-title-small-font-size);
|
|
94
|
-
letter-spacing: var(--md-sys-typescale-title-small-tracking);
|
|
95
|
-
line-height: var(--md-sys-typescale-title-small-height);
|
|
96
|
-
text-transform: var(--md-sys-typescale-title-small-text-transform);
|
|
97
|
-
text-decoration: var(--md-sys-typescale-title-small-text-decoration);
|
|
98
|
-
text-transform: capitalize;
|
|
99
|
-
margin: 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
::slotted([slot='footer']) {
|
|
103
|
-
display: block;
|
|
104
|
-
box-sizing: border-box;
|
|
105
|
-
min-height: 48px;
|
|
106
|
-
border-top: 1px solid rgba(0, 0, 0, 0.14);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
::slotted([slot='content']) {
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
height: 100%;
|
|
113
|
-
width: 100%;
|
|
114
|
-
overflow-y: auto;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
::slotted(*) {
|
|
118
|
-
pointer-events: none;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
aside {
|
|
122
|
-
display: flex;
|
|
123
|
-
flex-direction: column;
|
|
124
|
-
width: 100%;
|
|
125
|
-
}
|
|
126
|
-
</style>
|
|
127
|
-
|
|
78
|
+
return html `
|
|
128
79
|
<custom-pane .open=${this.open} .mobile=${this.mobile} .type=${this.type} .id=${this.id}>
|
|
129
80
|
<slot name="headline" slot="headline"></slot>
|
|
130
81
|
<slot name="menu-button" slot="menu-button"></slot>
|
|
131
82
|
<slot name="content" slot="content"></slot>
|
|
132
83
|
<slot name="footer" slot="footer"></slot>
|
|
133
|
-
</custom-pane>
|
|
84
|
+
</custom-pane>
|
|
85
|
+
`;
|
|
134
86
|
}
|
|
135
87
|
constructor() {
|
|
136
88
|
super(...arguments);
|
|
137
89
|
__runInitializers(this, _id_extraInitializers);
|
|
138
90
|
}
|
|
91
|
+
static {
|
|
92
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
93
|
+
}
|
|
139
94
|
});
|
|
140
95
|
return _classThis;
|
|
141
96
|
})();
|
|
@@ -15,6 +15,6 @@ export declare class CustomDropdownMenu extends LiteElement {
|
|
|
15
15
|
accessor _dropdown: CustomDropdown;
|
|
16
16
|
private _onselected;
|
|
17
17
|
private _scrimClick;
|
|
18
|
-
static styles: import("
|
|
18
|
+
static styles: import("lit").CSSResult[];
|
|
19
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
export declare class CustomDropdown extends LiteElement {
|
|
3
3
|
accessor open: boolean;
|
|
4
|
-
static styles: import("
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
package/exports/elements.js
CHANGED
|
@@ -35,10 +35,12 @@ import './elevation.js';
|
|
|
35
35
|
import '@vandeurenglenn/flex-elements/it.js';
|
|
36
36
|
import './selector-mixin.js';
|
|
37
37
|
import './select-mixin.js';
|
|
38
|
+
import '@vandeurenglenn/custom-shared-styles/drawer.css';
|
|
38
39
|
import './scroll-mixin.js';
|
|
39
40
|
import '@vandeurenglenn/flex-elements/column.js';
|
|
40
41
|
import '@vandeurenglenn/flex-elements/row.js';
|
|
41
42
|
import '@vandeurenglenn/little-pubsub';
|
|
43
|
+
import '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
42
44
|
import './tab.js';
|
|
43
45
|
import './input.js';
|
|
44
46
|
import 'lit';
|
package/exports/fab/fab.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { LiteElement } from '@vandeurenglenn/lite';
|
|
|
2
2
|
import '../elevation/elevation.js';
|
|
3
3
|
export declare class CustomButton extends LiteElement {
|
|
4
4
|
accessor type: 'normal' | 'extended';
|
|
5
|
-
static styles: import("
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
6
|
render(): import("lit-html").TemplateResult<1>;
|
|
7
7
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
class HashRouter {
|
|
3
|
+
host;
|
|
4
|
+
routes;
|
|
5
|
+
constructor({ host, fallback, routes }) {
|
|
6
|
+
this.host = host;
|
|
7
|
+
this.routes = routes;
|
|
8
|
+
globalThis.onhashchange = this.#onhashchange;
|
|
9
|
+
if (!location.hash && fallback?.route) {
|
|
10
|
+
location.hash = _a.bang(fallback.params ? `${fallback.route}?${_a.queryIt(fallback.params)}` : fallback.route);
|
|
11
|
+
}
|
|
12
|
+
else
|
|
13
|
+
this.#onhashchange();
|
|
14
|
+
}
|
|
15
|
+
static queryIt(params) {
|
|
16
|
+
return Object.entries(params)
|
|
17
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
18
|
+
.join('&');
|
|
19
|
+
}
|
|
20
|
+
static dequeryIt(query) {
|
|
21
|
+
const params = {};
|
|
22
|
+
if (!query)
|
|
23
|
+
return params;
|
|
24
|
+
for (const item of query.split('&')) {
|
|
25
|
+
const [key, value] = item.split('=');
|
|
26
|
+
params[key] = value;
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
static bang(route) {
|
|
31
|
+
return `#!/${route}`;
|
|
32
|
+
}
|
|
33
|
+
static debang(route) {
|
|
34
|
+
return route.split('#!/')[1];
|
|
35
|
+
}
|
|
36
|
+
static parseHash(hash) {
|
|
37
|
+
const afterBang = _a.debang(hash);
|
|
38
|
+
const splitted = afterBang.split('?');
|
|
39
|
+
const routes = splitted[0].split('/');
|
|
40
|
+
const route = routes[0];
|
|
41
|
+
const subRoutes = routes.slice(1, -1);
|
|
42
|
+
const params = _a.dequeryIt(splitted[1]);
|
|
43
|
+
return { route, routes, subRoutes, params, url: splitted[0] };
|
|
44
|
+
}
|
|
45
|
+
#handleSubRoutes = async (routing, routeInfo) => {
|
|
46
|
+
const { params, subRoutes } = routing;
|
|
47
|
+
let selected = this.host.pages.querySelector('.custom-selected');
|
|
48
|
+
if (routing.subRoutes?.length > 0) {
|
|
49
|
+
for (const route of routing.subRoutes) {
|
|
50
|
+
const subRouteInfo = routeInfo.subRoutes[route];
|
|
51
|
+
if (subRouteInfo) {
|
|
52
|
+
if (!customElements.get(`./${subRouteInfo.tagName}`))
|
|
53
|
+
await import(`./${subRouteInfo.import}.js`);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (!customElements.get(`./${route}`))
|
|
57
|
+
await import(`./${route}.js`);
|
|
58
|
+
console.warn(`handling undefined subroute for ${routing.route} falling back to default behavior.`);
|
|
59
|
+
}
|
|
60
|
+
selected.select({ route, params, subRoutes });
|
|
61
|
+
selected = selected.pages.querySelector('.custom-selected');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (params) {
|
|
65
|
+
for (const [key, value] of Object.entries(params)) {
|
|
66
|
+
selected[key] = value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
#onhashchange = async () => {
|
|
71
|
+
const routing = _a.parseHash(location.hash);
|
|
72
|
+
const routeInfo = this.routes[routing.url];
|
|
73
|
+
// todo allow to set loading
|
|
74
|
+
if (routeInfo) {
|
|
75
|
+
if (!customElements.get(`./${routeInfo.tagName}`))
|
|
76
|
+
await import(`./${routeInfo.import}.js`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (!customElements.get(`./${routing.route}`))
|
|
80
|
+
await import(`./${routing.route}.js`);
|
|
81
|
+
}
|
|
82
|
+
this.host.select(routing);
|
|
83
|
+
// when a custom-pages element (or sortlike) is defined loop trough subroutes and make devlife easier
|
|
84
|
+
if (this.host.pages) {
|
|
85
|
+
this.#handleSubRoutes(routing, routeInfo);
|
|
86
|
+
}
|
|
87
|
+
document.dispatchEvent(new CustomEvent('route-change', {
|
|
88
|
+
detail: {
|
|
89
|
+
routing,
|
|
90
|
+
routeInfo
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
_a = HashRouter;
|
|
96
|
+
|
|
97
|
+
export { HashRouter as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
export declare class CustomIconSet extends LiteElement {
|
|
3
3
|
#private;
|
|
4
|
-
static styles: import("
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
5
|
getIcon(name: string): string | Node;
|
|
6
6
|
get setName(): string;
|
|
7
7
|
connectedCallback(): void;
|
package/exports/icon/icon.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class CustomIcon extends LiteElement {
|
|
|
5
5
|
accessor setName: any;
|
|
6
6
|
accessor _icon: any;
|
|
7
7
|
onChange(propertyKey: any, value: any): void;
|
|
8
|
-
static styles: import("
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
9
|
connectedCallback(): void;
|
|
10
10
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
11
|
}
|
|
@@ -8,6 +8,6 @@ export declare class CustomListItem extends LiteElement {
|
|
|
8
8
|
accessor assignedStartElements: any;
|
|
9
9
|
accessor startSlot: any;
|
|
10
10
|
connectedCallback(): void;
|
|
11
|
-
static styles: import("
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
13
13
|
}
|
package/exports/menu/menu.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export declare class CustomMenu extends LiteElement {
|
|
|
10
10
|
select(selected: any): void;
|
|
11
11
|
connectedCallback(): void;
|
|
12
12
|
disconnectedCallback(): void;
|
|
13
|
-
static styles: import("
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
15
15
|
}
|
|
@@ -337,5 +337,5 @@ export declare const FileReaderMixin: (Base: typeof LiteElement) => {
|
|
|
337
337
|
focus(options?: FocusOptions): void;
|
|
338
338
|
};
|
|
339
339
|
readonly observedAttributes: any;
|
|
340
|
-
styles?: import("
|
|
340
|
+
styles?: import("lit").CSSResultGroup;
|
|
341
341
|
};
|
|
@@ -12,6 +12,6 @@ export declare class CustomNotifications extends LiteElement {
|
|
|
12
12
|
image?: string;
|
|
13
13
|
}, timeout?: EpochTimeStamp): void;
|
|
14
14
|
_onclick(): void;
|
|
15
|
-
static styles: import("
|
|
15
|
+
static styles: import("lit").CSSResult[];
|
|
16
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
17
17
|
}
|
package/exports/notifications.js
CHANGED
|
@@ -11,6 +11,7 @@ import '@vandeurenglenn/little-pubsub';
|
|
|
11
11
|
import './elevation.js';
|
|
12
12
|
import './icon-button.js';
|
|
13
13
|
import './button.js';
|
|
14
|
+
import '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
14
15
|
|
|
15
16
|
let CustomNotifications = (() => {
|
|
16
17
|
let _classDecorators = [customElement('custom-notifications')];
|
package/exports/pages/pages.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export declare class CustomPages extends SelectBase {
|
|
|
9
9
|
* set animation class when slot changes
|
|
10
10
|
*/
|
|
11
11
|
slotchange(): void;
|
|
12
|
-
static styles: import("
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
13
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
14
|
}
|
package/exports/pane/pane.d.ts
CHANGED
package/exports/pane.js
CHANGED
|
@@ -3,6 +3,7 @@ import { customElement, property, html, LiteElement } from '@vandeurenglenn/lite
|
|
|
3
3
|
import './elevation.js';
|
|
4
4
|
import './icon-button.js';
|
|
5
5
|
import './icon.js';
|
|
6
|
+
import style from '@vandeurenglenn/custom-shared-styles/pane.css';
|
|
6
7
|
import './button.js';
|
|
7
8
|
import '@vandeurenglenn/little-pubsub';
|
|
8
9
|
|
|
@@ -49,7 +50,6 @@ let CustomPane = (() => {
|
|
|
49
50
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
50
51
|
_classThis = _classDescriptor.value;
|
|
51
52
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
52
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
53
53
|
}
|
|
54
54
|
#open_accessor_storage = __runInitializers(this, _open_initializers, false);
|
|
55
55
|
get open() { return this.#open_accessor_storage; }
|
|
@@ -74,87 +74,9 @@ let CustomPane = (() => {
|
|
|
74
74
|
this.open = false;
|
|
75
75
|
document.dispatchEvent(new CustomEvent(`custom-pane-close`, { detail: this.id || `${this.left ? 'left' : 'right'}` }));
|
|
76
76
|
}
|
|
77
|
+
static styles = [style];
|
|
77
78
|
render() {
|
|
78
|
-
return html
|
|
79
|
-
:host {
|
|
80
|
-
--custom-pane-width: 100%;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
height: 100%;
|
|
84
|
-
background: var(--md-sys-color-surface);
|
|
85
|
-
color: var(--md-sys-color-on-surface);
|
|
86
|
-
position: relative;
|
|
87
|
-
/* border-radius: 12px; */
|
|
88
|
-
|
|
89
|
-
--md-elevation-level: 0;
|
|
90
|
-
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
opacity: 0;
|
|
93
|
-
width: 100%;
|
|
94
|
-
max-width: var(--custom-pane-width);
|
|
95
|
-
transition: var(--md-sys-motion-easing-emphasized-accelerate) 200ms opacity,
|
|
96
|
-
var(--md-sys-motion-easing-emphasized-accelerate) 200ms transform;
|
|
97
|
-
|
|
98
|
-
--custom-pane-footer-height: 54px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:host([left]) {
|
|
102
|
-
border-radius: var(--md-sys-shape-corner-large-end);
|
|
103
|
-
transform: translateX(-100%);
|
|
104
|
-
z-index: 1002;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([right]) {
|
|
108
|
-
border-radius: var(--md-sys-shape-corner-large-start);
|
|
109
|
-
transform: translateX(100%);
|
|
110
|
-
z-index: 1001;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([mobile]) {
|
|
114
|
-
inset: 0;
|
|
115
|
-
position: fixed;
|
|
116
|
-
z-index: 1001;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
:host([type='modal']) {
|
|
120
|
-
--md-elevation-level: 1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:host([open]) {
|
|
124
|
-
transform: translateX(0);
|
|
125
|
-
opacity: 1;
|
|
126
|
-
pointer-events: auto;
|
|
127
|
-
transition: var(--md-sys-motion-easing-emphasized-decelerate) 500ms opacity,
|
|
128
|
-
var(--md-sys-motion-easing-emphasized-decelerate) 500ms transform;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:host([open]) {
|
|
132
|
-
position: relative;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host([open][mobile]) {
|
|
136
|
-
position: fixed;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
aside {
|
|
140
|
-
width: 100%;
|
|
141
|
-
height: 100%;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.content {
|
|
145
|
-
height: calc(100% - var(--custom-pane-footer-height));
|
|
146
|
-
width: 100%;
|
|
147
|
-
overflow-y: auto;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.footer {
|
|
151
|
-
height: var(--custom-pane-footer-height);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:host([right]) custom-icon-button {
|
|
155
|
-
transform: rotateZ(180deg);
|
|
156
|
-
}
|
|
157
|
-
</style>
|
|
79
|
+
return html `
|
|
158
80
|
<custom-elevation></custom-elevation>
|
|
159
81
|
<aside>
|
|
160
82
|
<slot name="header">
|
|
@@ -171,12 +93,16 @@ let CustomPane = (() => {
|
|
|
171
93
|
<flex-row class="footer">
|
|
172
94
|
<slot name="footer"></slot>
|
|
173
95
|
</flex-row>
|
|
174
|
-
</aside>
|
|
96
|
+
</aside>
|
|
97
|
+
`;
|
|
175
98
|
}
|
|
176
99
|
constructor() {
|
|
177
100
|
super(...arguments);
|
|
178
101
|
__runInitializers(this, _id_extraInitializers);
|
|
179
102
|
}
|
|
103
|
+
static {
|
|
104
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
105
|
+
}
|
|
180
106
|
});
|
|
181
107
|
return _classThis;
|
|
182
108
|
})();
|
package/exports/rail.js
CHANGED
package/exports/root/root.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LiteElement } from '@vandeurenglenn/lite';
|
|
2
2
|
import '../theme/theme.js';
|
|
3
3
|
export declare class CustomRoot extends LiteElement {
|
|
4
|
-
static styles: import("
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
5
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HashRouterConstructorOptions, RouteAble, RoutesOption } from './types.js';
|
|
2
|
+
export default class HashRouter {
|
|
3
|
+
#private;
|
|
4
|
+
host: RouteAble;
|
|
5
|
+
routes: RoutesOption;
|
|
6
|
+
constructor({ host, fallback, routes }: HashRouterConstructorOptions);
|
|
7
|
+
static queryIt(params: any): string;
|
|
8
|
+
static dequeryIt(query: any): {};
|
|
9
|
+
static bang(route: string): string;
|
|
10
|
+
static debang(route: string): string;
|
|
11
|
+
static parseHash(hash: any): {
|
|
12
|
+
route: string;
|
|
13
|
+
routes: string[];
|
|
14
|
+
subRoutes: string[];
|
|
15
|
+
params: {};
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CustomPages } from '../elements.js';
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* tagName: 'home-view',
|
|
6
|
+
* import: './views/home',
|
|
7
|
+
* subRoutes: [
|
|
8
|
+
* 'home/one' : {
|
|
9
|
+
* tagName: 'home-view-one',
|
|
10
|
+
* import: '...'
|
|
11
|
+
* },
|
|
12
|
+
* 'home/one/two' : {
|
|
13
|
+
* tagName: 'home-two',
|
|
14
|
+
* import: '...'
|
|
15
|
+
* }]
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export type RouteInfo = {
|
|
20
|
+
tagName: string;
|
|
21
|
+
import: string;
|
|
22
|
+
subRoutes?: {
|
|
23
|
+
[route: string]: Omit<RouteInfo, 'subRoutes'>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type RoutesOption = {
|
|
27
|
+
[route: string]: RouteInfo;
|
|
28
|
+
};
|
|
29
|
+
export type HashRouterConstructorOptions = {
|
|
30
|
+
host: RouteAble;
|
|
31
|
+
fallback?: {
|
|
32
|
+
route: string;
|
|
33
|
+
params?: object;
|
|
34
|
+
};
|
|
35
|
+
routes?: RoutesOption;
|
|
36
|
+
};
|
|
37
|
+
export type RouteSelectInput = {
|
|
38
|
+
route: string;
|
|
39
|
+
subRoutes?: string[];
|
|
40
|
+
params?: object;
|
|
41
|
+
};
|
|
42
|
+
export interface RouteAble extends HTMLElement {
|
|
43
|
+
select: ({ route, subRoutes, params }: RouteSelectInput) => void;
|
|
44
|
+
pages?: CustomPages;
|
|
45
|
+
}
|
|
@@ -13,7 +13,7 @@ declare const CustomSection_base: {
|
|
|
13
13
|
[x: string]: any;
|
|
14
14
|
};
|
|
15
15
|
export declare class CustomSection extends CustomSection_base {
|
|
16
|
-
static styles: import("
|
|
16
|
+
static styles: import("lit").CSSResult[];
|
|
17
17
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
18
|
}
|
|
19
19
|
export {};
|