Skip to content

Commit 275fbc5

Browse files
committed
Additional componets
1 parent cf33598 commit 275fbc5

File tree

7 files changed

+307
-5
lines changed

7 files changed

+307
-5
lines changed

gulpfile.babel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ gulp.task('3rdparty.css', () => {
6060
gulp.task('components.js', () => {
6161
var deps = [
6262
'./node_modules/@webcomponents/custom-elements/src/native-shim.js',
63+
'./material/components/collapsible/index.js',
64+
'./material/components/dropdown/index.js',
6365
'./material/components/datatable/index.js',
6466
'./material/components/datetime/index.js',
6567
'./material/components/form/index.js',
68+
'./material/components/modal/index.js',
69+
'./material/components/perfectScrollbar/index.js',
6670
'./material/components/select/index.js',
6771
'./material/components/sidenav/index.js',
6872
'./material/components/snackbar/index.js',
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class Collapsible extends HTMLElement {
2+
constructor() {
3+
super();
4+
}
5+
6+
connectedCallback() {
7+
$(this).find('.collapsible').collapsible();
8+
}
9+
10+
disconnectedCallback() {
11+
$(this).find('.collapsible').collapsible('destroy');
12+
}
13+
}
14+
15+
window.addEventListener('load', () => {
16+
window.customElements.define('dmc-collapsible', Collapsible);
17+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class Dropdown extends HTMLElement {
2+
constructor() {
3+
super();
4+
}
5+
6+
connectedCallback() {
7+
$(this).find('.dropdown-button').dropdown();
8+
}
9+
10+
disconnectedCallback() {
11+
$(this).find('.dropdown-button').dropdown('destroy');
12+
}
13+
}
14+
15+
window.addEventListener('load', () => {
16+
window.customElements.define('dmc-dropdown', Dropdown);
17+
});

material/components/modal/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class Modal extends HTMLElement {
2+
constructor() {
3+
super();
4+
}
5+
6+
connectedCallback() {
7+
$(this).find('.modal').modal({preventScrolling: false})
8+
}
9+
10+
disconnectedCallback() {
11+
$(this).find('.modal').modal('destroy');
12+
}
13+
}
14+
15+
window.addEventListener('load', () => {
16+
window.customElements.define('dmc-dropdown', Modal);
17+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class PerfectScrollbar extends HTMLElement {
2+
constructor() {
3+
super();
4+
}
5+
6+
connectedCallback() {
7+
$(this).parent().perfectScrollbar()
8+
}
9+
10+
disconnectedCallback() {
11+
$(this).parent().perfectScrollbar('destroy');
12+
}
13+
}
14+
15+
window.addEventListener('load', () => {
16+
window.customElements.define('dmc-scrollbar', PerfectScrollbar);
17+
});

material/static/material/js/materialize.components.js

Lines changed: 234 additions & 4 deletions
Large diffs are not rendered by default.

material/static/material/js/materialize.frontend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)