@openremote/or-mwc-components 1.8.0-snapshot.20250725120000 → 1.8.0-snapshot.20250725123024
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/README.md +32 -32
- package/build.gradle +19 -19
- package/custom-elements.json +4 -4
- package/lib/or-mwc-dialog.js +76 -329
- package/lib/or-mwc-drawer.js +10 -114
- package/lib/or-mwc-input.js +439 -1760
- package/lib/or-mwc-list.js +71 -283
- package/lib/or-mwc-menu.js +45 -237
- package/lib/or-mwc-snackbar.d.ts +1 -1
- package/lib/or-mwc-snackbar.js +17 -141
- package/lib/or-mwc-table.js +245 -685
- package/lib/or-mwc-tabs.js +53 -173
- package/lib/style.js +121 -125
- package/package.json +5 -5
- package/rspack.config.js +7 -7
- package/src/or-mwc-dialog.ts +374 -374
- package/src/or-mwc-drawer.ts +100 -100
- package/src/or-mwc-input.ts +1876 -1876
- package/src/or-mwc-list.ts +335 -335
- package/src/or-mwc-menu.ts +279 -279
- package/src/or-mwc-snackbar.ts +157 -157
- package/src/or-mwc-table.ts +712 -712
- package/src/or-mwc-tabs.ts +175 -175
- package/src/style.ts +125 -125
- package/tsconfig.json +15 -15
- package/tsconfig.tsbuildinfo +1 -1
package/lib/or-mwc-drawer.js
CHANGED
|
@@ -1,114 +1,10 @@
|
|
|
1
|
-
var __decorate
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const drawerStyle = require("@material/drawer/dist/mdc.drawer.css");
|
|
12
|
-
export class OrMwcDrawerChangedEvent extends CustomEvent {
|
|
13
|
-
constructor(value) {
|
|
14
|
-
super(OrMwcDrawerChangedEvent.NAME, {
|
|
15
|
-
detail: value,
|
|
16
|
-
bubbles: true,
|
|
17
|
-
composed: true
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
OrMwcDrawerChangedEvent.NAME = "or-mwc-drawer-changed";
|
|
22
|
-
let OrMwcDrawer = class OrMwcDrawer extends LitElement {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.dismissible = false;
|
|
26
|
-
this.rightSided = false;
|
|
27
|
-
this.transparent = false;
|
|
28
|
-
this.open = false;
|
|
29
|
-
}
|
|
30
|
-
static get styles() {
|
|
31
|
-
return [
|
|
32
|
-
css `${unsafeCSS(drawerStyle)}`,
|
|
33
|
-
css `
|
|
34
|
-
.transparent{
|
|
35
|
-
background: none;
|
|
36
|
-
}`
|
|
37
|
-
];
|
|
38
|
-
}
|
|
39
|
-
toggle() {
|
|
40
|
-
this.open = !this.open;
|
|
41
|
-
}
|
|
42
|
-
disconnectedCallback() {
|
|
43
|
-
super.disconnectedCallback();
|
|
44
|
-
if (this.drawer) {
|
|
45
|
-
this.drawer.destroy();
|
|
46
|
-
this.drawer = undefined;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
const isModal = !this.dismissible;
|
|
51
|
-
const classes = {
|
|
52
|
-
"mdc-drawer--dismissible": this.dismissible,
|
|
53
|
-
"mdc-drawer--modal": isModal,
|
|
54
|
-
"transparent": this.transparent
|
|
55
|
-
};
|
|
56
|
-
return html `
|
|
57
|
-
<aside class="mdc-drawer ${classMap(classes)}" dir="${(this.rightSided ? "rtl" : "ltr")}">
|
|
58
|
-
${this.header}
|
|
59
|
-
<div class="mdc-drawer__content" dir="ltr">
|
|
60
|
-
<slot></slot>
|
|
61
|
-
</div>
|
|
62
|
-
</aside>`;
|
|
63
|
-
}
|
|
64
|
-
updated() {
|
|
65
|
-
if (this.drawer.open !== this.open) {
|
|
66
|
-
this.drawer.open = this.open;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
dispatchChangedEvent(value) {
|
|
70
|
-
this.dispatchEvent(new OrMwcDrawerChangedEvent(value));
|
|
71
|
-
}
|
|
72
|
-
firstUpdated() {
|
|
73
|
-
this.drawer = MDCDrawer.attachTo(this.drawerElement);
|
|
74
|
-
const openHandler = () => { this.dispatchChangedEvent(true); };
|
|
75
|
-
const closeHandler = () => { this.dispatchChangedEvent(false); };
|
|
76
|
-
this.drawer.listen("MDCDrawer:opened", openHandler);
|
|
77
|
-
this.drawer.listen("MDCDrawer:closed", closeHandler);
|
|
78
|
-
if (this.appContent) {
|
|
79
|
-
this.appContent.classList.add("mdc-drawer-app-content");
|
|
80
|
-
}
|
|
81
|
-
if (this.topBar) {
|
|
82
|
-
this.topBar.classList.add("mdc-top-app-bar");
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ attribute: false })
|
|
88
|
-
], OrMwcDrawer.prototype, "header", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property({ type: Boolean })
|
|
91
|
-
], OrMwcDrawer.prototype, "dismissible", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: Boolean })
|
|
94
|
-
], OrMwcDrawer.prototype, "rightSided", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
property({ type: Boolean })
|
|
97
|
-
], OrMwcDrawer.prototype, "transparent", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
property({ type: Boolean })
|
|
100
|
-
], OrMwcDrawer.prototype, "open", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
property({ attribute: false })
|
|
103
|
-
], OrMwcDrawer.prototype, "appContent", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
property({ attribute: false })
|
|
106
|
-
], OrMwcDrawer.prototype, "topBar", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
query(".mdc-drawer")
|
|
109
|
-
], OrMwcDrawer.prototype, "drawerElement", void 0);
|
|
110
|
-
OrMwcDrawer = __decorate([
|
|
111
|
-
customElement("or-mwc-drawer")
|
|
112
|
-
], OrMwcDrawer);
|
|
113
|
-
export { OrMwcDrawer };
|
|
114
|
-
//# sourceMappingURL=or-mwc-drawer.js.map
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,r,t,a){var d,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,r,t,a);else for(var i=e.length-1;i>=0;i--)(d=e[i])&&(s=(o<3?d(s):o>3?d(r,t,s):d(r,t))||s);return o>3&&s&&Object.defineProperty(r,t,s),s};import{css as e,html as r,LitElement as t,unsafeCSS as a}from"lit";import{customElement as d,property as o,query as s}from"lit/decorators.js";import{MDCDrawer as i}from"@material/drawer";import{classMap as c}from"lit/directives/class-map.js";let drawerStyle=require("@material/drawer/dist/mdc.drawer.css");export class OrMwcDrawerChangedEvent extends CustomEvent{constructor(e){super(OrMwcDrawerChangedEvent.NAME,{detail:e,bubbles:!0,composed:!0})}}OrMwcDrawerChangedEvent.NAME="or-mwc-drawer-changed";let OrMwcDrawer=class extends t{constructor(){super(...arguments),this.dismissible=!1,this.rightSided=!1,this.transparent=!1,this.open=!1}static get styles(){return[e`${a(drawerStyle)}`,e`
|
|
2
|
+
.transparent{
|
|
3
|
+
background: none;
|
|
4
|
+
}`]}toggle(){this.open=!this.open}disconnectedCallback(){super.disconnectedCallback(),this.drawer&&(this.drawer.destroy(),this.drawer=void 0)}render(){let e=!this.dismissible,t={"mdc-drawer--dismissible":this.dismissible,"mdc-drawer--modal":e,transparent:this.transparent};return r`
|
|
5
|
+
<aside class="mdc-drawer ${c(t)}" dir="${this.rightSided?"rtl":"ltr"}">
|
|
6
|
+
${this.header}
|
|
7
|
+
<div class="mdc-drawer__content" dir="ltr">
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
|
+
</aside>`}updated(){this.drawer.open!==this.open&&(this.drawer.open=this.open)}dispatchChangedEvent(e){this.dispatchEvent(new OrMwcDrawerChangedEvent(e))}firstUpdated(){this.drawer=i.attachTo(this.drawerElement),this.drawer.listen("MDCDrawer:opened",()=>{this.dispatchChangedEvent(!0)}),this.drawer.listen("MDCDrawer:closed",()=>{this.dispatchChangedEvent(!1)}),this.appContent&&this.appContent.classList.add("mdc-drawer-app-content"),this.topBar&&this.topBar.classList.add("mdc-top-app-bar")}};__decorate([o({attribute:!1})],OrMwcDrawer.prototype,"header",void 0),__decorate([o({type:Boolean})],OrMwcDrawer.prototype,"dismissible",void 0),__decorate([o({type:Boolean})],OrMwcDrawer.prototype,"rightSided",void 0),__decorate([o({type:Boolean})],OrMwcDrawer.prototype,"transparent",void 0),__decorate([o({type:Boolean})],OrMwcDrawer.prototype,"open",void 0),__decorate([o({attribute:!1})],OrMwcDrawer.prototype,"appContent",void 0),__decorate([o({attribute:!1})],OrMwcDrawer.prototype,"topBar",void 0),__decorate([s(".mdc-drawer")],OrMwcDrawer.prototype,"drawerElement",void 0),OrMwcDrawer=__decorate([d("or-mwc-drawer")],OrMwcDrawer);export{OrMwcDrawer};
|