@exmg/exm-form-drawer 1.0.14 → 1.0.15
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/index.d.ts +0 -2
- package/index.js +0 -2
- package/package.json +4 -6
- package/src/exm-drawer.d.ts +21 -5
- package/src/exm-form-drawer-base.d.ts +1 -1
- package/src/exm-form-drawer-base.js +2 -2
- package/src/styles/exm-form-drawer-styles-css.js +1 -1
- package/src/exm-drawer.js +0 -71
- package/src/styles/exm-drawer-styles-css.js +0 -17
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { ExmDrawer } from './src/exm-drawer.js';
|
|
2
1
|
export { ExmFormDrawer } from './src/exm-form-drawer.js';
|
|
3
2
|
export { ExmFormDrawerBase } from './src/exm-form-drawer-base.js';
|
|
4
|
-
export { style as drawerStyles } from './src/styles/exm-drawer-styles-css.js';
|
|
5
3
|
export { style as formDrawerStyles } from './src/styles/exm-form-drawer-styles-css.js';
|
package/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export { ExmDrawer } from './src/exm-drawer.js';
|
|
2
1
|
export { ExmFormDrawer } from './src/exm-form-drawer.js';
|
|
3
2
|
export { ExmFormDrawerBase } from './src/exm-form-drawer-base.js';
|
|
4
|
-
export { style as drawerStyles } from './src/styles/exm-drawer-styles-css.js';
|
|
5
3
|
export { style as formDrawerStyles } from './src/styles/exm-form-drawer-styles-css.js';
|
|
6
4
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-form-drawer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -30,11 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@exmg/exm-
|
|
34
|
-
"@exmg/exm-form": "^1.0.
|
|
33
|
+
"@exmg/exm-drawer": "^1.0.1",
|
|
34
|
+
"@exmg/exm-form": "^1.0.10",
|
|
35
35
|
"@material/typography": "^14.0.0",
|
|
36
|
-
"@polymer/neon-animation": "^3.0.1",
|
|
37
|
-
"@polymer/paper-dialog": "^3.0.1",
|
|
38
36
|
"lit": "^3.0.0",
|
|
39
37
|
"tslib": "^2.6.2"
|
|
40
38
|
},
|
|
@@ -47,5 +45,5 @@
|
|
|
47
45
|
"publishConfig": {
|
|
48
46
|
"access": "public"
|
|
49
47
|
},
|
|
50
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5747be50ecb7c46ed349c74a6e8d66895d835455"
|
|
51
49
|
}
|
package/src/exm-drawer.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import '@polymer/neon-animation/animations/slide-from-right-animation.js';
|
|
3
|
-
import '@polymer/neon-animation/animations/slide-right-animation.js';
|
|
4
|
-
import '@polymer/paper-dialog/paper-dialog.js';
|
|
5
2
|
export declare class ExmDrawer extends LitElement {
|
|
6
3
|
/**
|
|
7
4
|
* The opened state of the drawer
|
|
@@ -18,9 +15,28 @@ export declare class ExmDrawer extends LitElement {
|
|
|
18
15
|
* @type {'lock' | 'refit' | 'cancel' | undefined}
|
|
19
16
|
*/
|
|
20
17
|
scrollAction?: 'lock' | 'refit' | 'cancel' | undefined;
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A query to the native <dialog> element.
|
|
20
|
+
*/
|
|
21
|
+
dialogElement: HTMLDialogElement;
|
|
22
|
+
/**
|
|
23
|
+
* Internal flag used when animating the closing.
|
|
24
|
+
*/
|
|
25
|
+
private _isClosing;
|
|
26
|
+
updated(changedProperties: Map<string, any>): void;
|
|
27
|
+
private _onDialogClick;
|
|
28
|
+
private _onDialogCancel;
|
|
29
|
+
private _onDialogClose;
|
|
30
|
+
private _animateClose;
|
|
31
|
+
/**
|
|
32
|
+
* Public method to open the drawer.
|
|
33
|
+
*/
|
|
22
34
|
openDialog(): void;
|
|
23
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Public method to close the drawer.
|
|
37
|
+
*/
|
|
38
|
+
closeDialog(): void;
|
|
39
|
+
static styles: import("lit").CSSResult;
|
|
24
40
|
render(): import("lit-html").TemplateResult<1>;
|
|
25
41
|
}
|
|
26
42
|
declare global {
|
|
@@ -2,7 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
-
import '
|
|
5
|
+
import '@exmg/exm-drawer/exm-drawer.js';
|
|
6
6
|
import '@exmg/exm-button/exm-filled-button.js';
|
|
7
7
|
import '@material/web/button/text-button.js';
|
|
8
8
|
import { ExmgElement } from '@exmg/lit-base';
|
|
@@ -140,7 +140,7 @@ export class ExmFormDrawerBase extends ExmFormValidateMixin(ExmgElement) {
|
|
|
140
140
|
?no-cancel-on-outside-click="${this.noCancelOnOutsideClick}"
|
|
141
141
|
@exm-drawer-opened-changed=${this.handleDrawerOpenedChanged}
|
|
142
142
|
scroll-action=${ifDefined(this.scrollAction)}
|
|
143
|
-
|
|
143
|
+
maxWidth="${this.style.maxWidth || '547px'}"
|
|
144
144
|
>
|
|
145
145
|
<div class="header">
|
|
146
146
|
<slot name="title" class="title">${this.title}</slot>
|
package/src/exm-drawer.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement, html } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import '@polymer/neon-animation/animations/slide-from-right-animation.js';
|
|
5
|
-
import '@polymer/neon-animation/animations/slide-right-animation.js';
|
|
6
|
-
import '@polymer/paper-dialog/paper-dialog.js';
|
|
7
|
-
import { style } from './styles/exm-drawer-styles-css.js';
|
|
8
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
|
-
let ExmDrawer = class ExmDrawer extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
/**
|
|
13
|
-
* The opened state of the drawer
|
|
14
|
-
* @type {Boolean}
|
|
15
|
-
*/
|
|
16
|
-
this.opened = false;
|
|
17
|
-
/**
|
|
18
|
-
* Prevent cancel on outside click or not
|
|
19
|
-
* @type {Boolean}
|
|
20
|
-
*/
|
|
21
|
-
this.noCancelOnOutsideClick = false;
|
|
22
|
-
}
|
|
23
|
-
handleOpenedChanged(e) {
|
|
24
|
-
this.opened = e.detail.value;
|
|
25
|
-
this.dispatchEvent(new CustomEvent('exm-drawer-opened-changed', {
|
|
26
|
-
bubbles: true,
|
|
27
|
-
composed: true,
|
|
28
|
-
detail: {
|
|
29
|
-
value: e.detail.value,
|
|
30
|
-
},
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
openDialog() {
|
|
34
|
-
this.opened = true;
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return html `
|
|
38
|
-
<style>
|
|
39
|
-
paper-dialog {
|
|
40
|
-
max-width: var(--exm-drawer-max-width, ${this.style.maxWidth || '547px'});
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
<paper-dialog
|
|
44
|
-
scroll-action=${ifDefined(this.scrollAction)}
|
|
45
|
-
?opened="${this.opened}"
|
|
46
|
-
?no-cancel-on-outside-click="${this.noCancelOnOutsideClick}"
|
|
47
|
-
@opened-changed="${this.handleOpenedChanged}"
|
|
48
|
-
entry-animation="slide-from-right-animation"
|
|
49
|
-
exit-animation="slide-right-animation"
|
|
50
|
-
with-backdrop
|
|
51
|
-
>
|
|
52
|
-
<slot></slot>
|
|
53
|
-
</paper-dialog>
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
ExmDrawer.styles = [style];
|
|
58
|
-
__decorate([
|
|
59
|
-
property({ type: Boolean })
|
|
60
|
-
], ExmDrawer.prototype, "opened", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
property({ type: Boolean, attribute: 'no-cancel-on-outside-click' })
|
|
63
|
-
], ExmDrawer.prototype, "noCancelOnOutsideClick", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
property({ type: String, attribute: 'scroll-action' })
|
|
66
|
-
], ExmDrawer.prototype, "scrollAction", void 0);
|
|
67
|
-
ExmDrawer = __decorate([
|
|
68
|
-
customElement('exm-drawer')
|
|
69
|
-
], ExmDrawer);
|
|
70
|
-
export { ExmDrawer };
|
|
71
|
-
//# sourceMappingURL=exm-drawer.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const style = css `
|
|
3
|
-
paper-dialog {
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
position: fixed;
|
|
7
|
-
top: 0;
|
|
8
|
-
right: 0;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
box-shadow: none;
|
|
12
|
-
overflow: scroll;
|
|
13
|
-
color: var(--exm-drawer-color, var(--md-sys-color-on-surface, black));
|
|
14
|
-
background-color: var(--exm-drawer-bg-color, var(--md-sys-color-surface-variant, white));
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
//# sourceMappingURL=exm-drawer-styles-css.js.map
|