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.
Files changed (82) hide show
  1. package/index.js +11 -2
  2. package/package.json +1 -1
  3. package/src/appbar.js +28 -28
  4. package/src/banner.js +20 -20
  5. package/src/button.js +18 -19
  6. package/src/calendar.js +8 -8
  7. package/src/card.js +4 -4
  8. package/src/checkbox.js +8 -8
  9. package/src/component.js +4 -4
  10. package/src/container.js +4 -4
  11. package/src/control/button.js +64 -92
  12. package/src/control/button.new.js +25 -25
  13. package/src/control/datehour.js +4 -4
  14. package/src/control/dialog.js +10 -10
  15. package/src/control/file.js +8 -8
  16. package/src/control/image.js +6 -6
  17. package/src/control/link.js +9 -9
  18. package/src/control/list.js +3 -3
  19. package/src/control/loading.js +10 -10
  20. package/src/control/menu.js +2 -2
  21. package/src/control/search.js +9 -9
  22. package/src/control/select.js +6 -6
  23. package/src/control/selecter.js +15 -15
  24. package/src/control/snackbar.js +7 -5
  25. package/src/control/switch.js +18 -18
  26. package/src/control/switcher.js +16 -16
  27. package/src/control/text.js +8 -8
  28. package/src/control/textfield.js +12 -12
  29. package/src/dialog.js +19 -19
  30. package/src/divider.js +4 -4
  31. package/src/drawer.js +11 -11
  32. package/src/field/email.js +5 -5
  33. package/src/field/image.js +4 -4
  34. package/src/form/build.js +7 -7
  35. package/src/form.js +6 -6
  36. package/src/icon.js +8 -8
  37. package/src/image.js +14 -14
  38. package/src/item.js +7 -7
  39. package/src/layout.js +10 -10
  40. package/src/list/add.js +1 -1
  41. package/src/list/build.js +7 -7
  42. package/src/list/display.js +10 -10
  43. package/src/list/search.js +2 -2
  44. package/src/list.js +13 -13
  45. package/src/map/build.js +6 -6
  46. package/src/map/display.js +8 -8
  47. package/src/menu.js +15 -15
  48. package/src/{component → mixin}/control.js +10 -10
  49. package/src/{component → mixin}/create.js +1 -1
  50. package/src/{module → mixin}/display.js +10 -22
  51. package/src/{component → mixin}/events.js +2 -2
  52. package/src/{component → mixin}/focus.js +2 -3
  53. package/src/{component → mixin}/insert.js +1 -1
  54. package/src/module/build.js +4 -3
  55. package/src/{component → module}/classify.js +0 -13
  56. package/src/module/dom.js +1 -57
  57. package/src/module/events.js +4 -2
  58. package/src/module/last.js +0 -0
  59. package/src/{component → module}/ripple.js +15 -42
  60. package/src/progress.js +7 -7
  61. package/src/select.js +16 -16
  62. package/src/selector.js +32 -32
  63. package/src/slider.js +32 -32
  64. package/src/snackbar.js +8 -8
  65. package/src/switch.js +9 -9
  66. package/src/tabs.js +8 -8
  67. package/src/tabview.js +8 -8
  68. package/src/text.js +5 -5
  69. package/src/textfield.js +16 -16
  70. package/src/toolbar.js +28 -28
  71. package/src/tooltip.js +11 -11
  72. package/src/tree.js +12 -16
  73. package/src/view/build.js +6 -6
  74. package/src/view/display.js +16 -16
  75. package/src/view.js +5 -5
  76. package/src/component/click.js +0 -17
  77. /package/src/{component → mixin}/controller.js +0 -0
  78. /package/src/{component → mixin}/emitter.js +0 -0
  79. /package/src/{component → mixin}/icon.js +0 -0
  80. /package/src/{component → mixin}/init.js +0 -0
  81. /package/src/{component → mixin}/label.js +0 -0
  82. /package/src/{component → mixin}/settings.js +0 -0
@@ -11,15 +11,15 @@ export default {
11
11
  // console.log('show', this.visible)
12
12
 
13
13
  // if (this.options.transition) {
14
- // this.root.style.display = 'initial'
14
+ // this.element.style.display = 'initial'
15
15
  // }
16
16
 
17
- this.root.getBoundingClientRect()
17
+ this.element.getBoundingClientRect()
18
18
 
19
19
  // clearTimeout(this.displayTimeout)
20
- // this.root.style.display = this._display
20
+ // this.element.style.display = this._display
21
21
 
22
- this.root.classList.add('show')
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.log('hide')
35
- // if (this.root.style.display === 'none') return
34
+ // console.trace('hide')
35
+ // if (this.element.style.display === 'none') return
36
36
  // clearTimeout(this.displayTimeout)
37
- // this._display = getComputedStyle(this.root).display
37
+ // this._display = getComputedStyle(this.element).display
38
38
 
39
- if (!this.root) return
39
+ if (!this.element) return
40
40
 
41
- this.root.classList.remove('show')
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.root.style.display = 'none'
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.root)
61
- if (this.options.transition && this.root) {
62
- this.root.classList.remove('show')
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.root && this.root.parentNode) {
80
- this.root.parentNode.removeChild(this.root)
81
- this.root = null
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.root = create(tag, this.options.prefix + '-' + this.options.class)
65
+ this.element = create(tag, this.options.prefix + '-' + this.options.class)
66
66
 
67
67
  if (this.options.name) {
68
- css.add(this.root, this.options.class + '-' + this.options.name)
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.root, this.options.css)
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.root, this.options.container)
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.root, container, context)
84
+ insert(this.element, container, context)
85
85
  return this
86
86
  }
87
87
  }
@@ -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