material 0.6.2 → 0.7.0
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.js +11 -2
- package/package.json +1 -1
- package/src/appbar.js +28 -28
- package/src/banner.js +20 -20
- package/src/button.js +18 -19
- package/src/calendar.js +8 -8
- package/src/card.js +4 -4
- package/src/checkbox.js +8 -8
- package/src/component.js +4 -4
- package/src/container.js +4 -4
- package/src/control/button.js +64 -92
- package/src/control/button.new.js +25 -25
- package/src/control/datehour.js +4 -4
- package/src/control/dialog.js +10 -10
- package/src/control/file.js +8 -8
- package/src/control/image.js +6 -6
- package/src/control/link.js +9 -9
- package/src/control/list.js +3 -3
- package/src/control/loading.js +10 -10
- package/src/control/menu.js +2 -2
- package/src/control/search.js +9 -9
- package/src/control/select.js +6 -6
- package/src/control/selecter.js +15 -15
- package/src/control/snackbar.js +7 -5
- package/src/control/switch.js +18 -18
- package/src/control/switcher.js +16 -16
- package/src/control/text.js +8 -8
- package/src/control/textfield.js +12 -12
- package/src/dialog.js +19 -19
- package/src/divider.js +4 -4
- package/src/drawer.js +11 -11
- package/src/field/email.js +5 -5
- package/src/field/image.js +4 -4
- package/src/form/build.js +7 -7
- package/src/form.js +6 -6
- package/src/icon.js +8 -8
- package/src/image.js +14 -14
- package/src/item.js +7 -7
- package/src/layout.js +10 -10
- package/src/list/add.js +1 -1
- package/src/list/build.js +7 -7
- package/src/list/display.js +10 -10
- package/src/list/search.js +2 -2
- package/src/list.js +13 -13
- package/src/map/build.js +6 -6
- package/src/map/display.js +8 -8
- package/src/menu.js +15 -15
- package/src/{component → mixin}/control.js +10 -10
- package/src/{component → mixin}/create.js +1 -1
- package/src/{module → mixin}/display.js +10 -22
- package/src/{component → mixin}/events.js +2 -2
- package/src/{component → mixin}/focus.js +2 -3
- package/src/{component → mixin}/insert.js +1 -1
- package/src/module/build.js +4 -3
- package/src/{component → module}/classify.js +0 -13
- package/src/module/dom.js +1 -57
- package/src/module/events.js +4 -2
- package/src/module/last.js +0 -0
- package/src/{component → module}/ripple.js +15 -42
- package/src/progress.js +7 -7
- package/src/select.js +16 -16
- package/src/selector.js +32 -32
- package/src/slider.js +32 -32
- package/src/snackbar.js +8 -8
- package/src/switch.js +9 -9
- package/src/tabs.js +8 -8
- package/src/tabview.js +8 -8
- package/src/text.js +5 -5
- package/src/textfield.js +16 -16
- package/src/toolbar.js +28 -28
- package/src/tooltip.js +11 -11
- package/src/tree.js +12 -16
- package/src/view/build.js +6 -6
- package/src/view/display.js +16 -16
- package/src/view.js +5 -5
- package/src/component/click.js +0 -17
- /package/src/{component → mixin}/controller.js +0 -0
- /package/src/{component → mixin}/emitter.js +0 -0
- /package/src/{component → mixin}/icon.js +0 -0
- /package/src/{component → mixin}/init.js +0 -0
- /package/src/{component → mixin}/label.js +0 -0
- /package/src/{component → mixin}/settings.js +0 -0
package/src/view/display.js
CHANGED
|
@@ -11,15 +11,15 @@ export default {
|
|
|
11
11
|
// console.log('show', this.visible)
|
|
12
12
|
|
|
13
13
|
// if (this.options.transition) {
|
|
14
|
-
// this.
|
|
14
|
+
// this.element.style.display = 'initial'
|
|
15
15
|
// }
|
|
16
16
|
|
|
17
|
-
this.
|
|
17
|
+
this.element.getBoundingClientRect()
|
|
18
18
|
|
|
19
19
|
// clearTimeout(this.displayTimeout)
|
|
20
|
-
// this.
|
|
20
|
+
// this.element.style.display = this._display
|
|
21
21
|
|
|
22
|
-
this.
|
|
22
|
+
this.element.classList.add('show')
|
|
23
23
|
this.visible = true
|
|
24
24
|
|
|
25
25
|
if (this.underlay) {
|
|
@@ -31,14 +31,14 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
hide () {
|
|
34
|
-
// console.
|
|
35
|
-
// if (this.
|
|
34
|
+
// console.trace('hide')
|
|
35
|
+
// if (this.element.style.display === 'none') return
|
|
36
36
|
// clearTimeout(this.displayTimeout)
|
|
37
|
-
// this._display = getComputedStyle(this.
|
|
37
|
+
// this._display = getComputedStyle(this.element).display
|
|
38
38
|
|
|
39
|
-
if (!this.
|
|
39
|
+
if (!this.element) return
|
|
40
40
|
|
|
41
|
-
this.
|
|
41
|
+
this.element.classList.remove('show')
|
|
42
42
|
this.visible = false
|
|
43
43
|
|
|
44
44
|
if (this.underlay) {
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
// if (this.options.transition) {
|
|
49
49
|
// this.displayTimeout = setTimeout(() => {
|
|
50
50
|
// console.log('display: none', this._display)
|
|
51
|
-
// this.
|
|
51
|
+
// this.element.style.display = 'none'
|
|
52
52
|
// }, this.options.transition)
|
|
53
53
|
// }
|
|
54
54
|
|
|
@@ -57,9 +57,9 @@ export default {
|
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
destroy () {
|
|
60
|
-
// console.log('destroy', this.options.transition, this.
|
|
61
|
-
if (this.options.transition && this.
|
|
62
|
-
this.
|
|
60
|
+
// console.log('destroy', this.options.transition, this.element)
|
|
61
|
+
if (this.options.transition && this.element) {
|
|
62
|
+
this.element.classList.remove('show')
|
|
63
63
|
|
|
64
64
|
if (this.underlay) {
|
|
65
65
|
this.underlay.classList.remove('show')
|
|
@@ -76,9 +76,9 @@ export default {
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
removeChild () {
|
|
79
|
-
if (this.
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
79
|
+
if (this.element && this.element.parentNode) {
|
|
80
|
+
this.element.parentNode.removeChild(this.element)
|
|
81
|
+
this.element = null
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
if (this.underlay && this.underlay.parentNode) {
|
package/src/view.js
CHANGED
|
@@ -62,26 +62,26 @@ class View {
|
|
|
62
62
|
build (props) {
|
|
63
63
|
var tag = this.options.tag || 'div'
|
|
64
64
|
|
|
65
|
-
this.
|
|
65
|
+
this.element = create(tag, this.options.prefix + '-' + this.options.class)
|
|
66
66
|
|
|
67
67
|
if (this.options.name) {
|
|
68
|
-
css.add(this.
|
|
68
|
+
css.add(this.element, this.options.class + '-' + this.options.name)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
if (this.options.css) {
|
|
72
|
-
css.add(this.
|
|
72
|
+
css.add(this.element, this.options.css)
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
if (this.options.container) {
|
|
76
76
|
// console.log(this.options.name, opts.container);
|
|
77
|
-
insert(this.
|
|
77
|
+
insert(this.element, this.options.container)
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return this
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
insert (container, context) {
|
|
84
|
-
insert(this.
|
|
84
|
+
insert(this.element, container, context)
|
|
85
85
|
return this
|
|
86
86
|
}
|
|
87
87
|
}
|
package/src/component/click.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// event related functions and listeners
|
|
2
|
-
/**
|
|
3
|
-
* on element click
|
|
4
|
-
* @param {event} e click event
|
|
5
|
-
* @return {void}
|
|
6
|
-
*/
|
|
7
|
-
function click(e) {
|
|
8
|
-
e.preventDefault()
|
|
9
|
-
|
|
10
|
-
// console.log('click caller', arguments.callee.caller)
|
|
11
|
-
|
|
12
|
-
if (e && e.target && e.target.disabled === 'disabled') return
|
|
13
|
-
// if (options.upload) return
|
|
14
|
-
// api.emit('click', e)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default click
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|