material 0.6.1 → 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 (87) 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 -88
  12. package/src/control/button.new.js +25 -25
  13. package/src/control/datehour.js +4 -4
  14. package/src/control/dialog.js +12 -11
  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 +25 -35
  19. package/src/control/loading.js +10 -10
  20. package/src/control/menu.js +85 -0
  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 +91 -0
  25. package/src/control/switch.js +18 -18
  26. package/src/control/switcher.js +16 -16
  27. package/src/control/text.js +11 -7
  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/element.js +6 -31
  33. package/src/field/email.js +5 -5
  34. package/src/field/image.js +4 -4
  35. package/src/form/build.js +7 -7
  36. package/src/form.js +6 -6
  37. package/src/icon.js +8 -8
  38. package/src/image.js +14 -14
  39. package/src/item.js +7 -7
  40. package/src/layout.js +10 -10
  41. package/src/list/add.js +1 -1
  42. package/src/list/build.js +7 -7
  43. package/src/list/display.js +10 -10
  44. package/src/list/search.js +2 -2
  45. package/src/list.js +13 -13
  46. package/src/map/build.js +6 -6
  47. package/src/map/display.js +8 -8
  48. package/src/menu.js +15 -15
  49. package/src/{component → mixin}/control.js +10 -10
  50. package/src/{component → mixin}/create.js +1 -1
  51. package/src/mixin/display.js +76 -0
  52. package/src/mixin/emitter.js +23 -0
  53. package/src/{component → mixin}/events.js +2 -2
  54. package/src/{component → mixin}/focus.js +2 -3
  55. package/src/{component → mixin}/insert.js +1 -1
  56. package/src/module/build.js +44 -0
  57. package/src/{component → module}/classify.js +0 -13
  58. package/src/module/dataset.js +12 -0
  59. package/src/module/dom.js +1 -57
  60. package/src/module/events.js +57 -0
  61. package/src/module/jsontohtml.js +20 -0
  62. package/src/module/last.js +0 -0
  63. package/src/{component → module}/ripple.js +15 -42
  64. package/src/progress.js +7 -7
  65. package/src/select.js +16 -16
  66. package/src/selector.js +32 -32
  67. package/src/skin/material/control/menu.sass +29 -0
  68. package/src/skin/material/control/snackbar.sass +65 -0
  69. package/src/slider.js +32 -32
  70. package/src/snackbar.js +8 -8
  71. package/src/switch.js +9 -9
  72. package/src/tabs.js +8 -8
  73. package/src/tabview.js +8 -8
  74. package/src/text.js +5 -5
  75. package/src/textfield.js +16 -16
  76. package/src/toolbar.js +28 -28
  77. package/src/tooltip.js +11 -11
  78. package/src/tree.js +12 -16
  79. package/src/view/build.js +7 -7
  80. package/src/view/display.js +16 -16
  81. package/src/view.js +5 -5
  82. package/src/component/click.js +0 -17
  83. /package/src/{component → mixin}/controller.js +0 -0
  84. /package/src/{component → mixin}/icon.js +0 -0
  85. /package/src/{component → mixin}/init.js +0 -0
  86. /package/src/{component → mixin}/label.js +0 -0
  87. /package/src/{component → mixin}/settings.js +0 -0
package/src/textfield.js CHANGED
@@ -62,28 +62,28 @@ class Textfield {
62
62
  build () {
63
63
  // create a new div as input element
64
64
  var tag = this.options.tag || 'div'
65
- this.root = document.createElement(tag)
66
- this.root.classList.add(this.options.prefix + '-' + this.options.class)
65
+ this.element = document.createElement(tag)
66
+ this.element.classList.add(this.options.prefix + '-' + this.options.class)
67
67
 
68
68
  this.buildLabel()
69
69
  this.buildInput()
70
70
  this.buildUnderline()
71
71
 
72
72
  if (this.disabled) {
73
- css.add(this.root, 'is-disabled')
73
+ css.add(this.element, 'is-disabled')
74
74
  }
75
75
 
76
76
  // insert if container this.options is given
77
77
  if (this.options.container) {
78
78
  // console.log(this.name, opts.container);
79
- insert(this.root, this.options.container)
79
+ insert(this.element, this.options.container)
80
80
  }
81
81
  }
82
82
 
83
83
  buildLabel () {
84
84
  this.label = document.createElement('label')
85
85
  this.label.classList.add(this.options.class + '-label')
86
- this.root.appendChild(this.label)
86
+ this.element.appendChild(this.label)
87
87
 
88
88
  if (this.options.label !== false) {
89
89
  this.setLabel()
@@ -98,14 +98,14 @@ class Textfield {
98
98
  this.input = document.createElement('input')
99
99
  this.input.classList.add(this.options.class + '-input')
100
100
  this.input.setAttribute('type', 'text')
101
- this.root.appendChild(this.input)
101
+ this.element.appendChild(this.input)
102
102
 
103
103
  if (this.options.name) {
104
104
  this.input.setAttribute('name', this.options.name)
105
105
  }
106
106
 
107
107
  if (!this.options.value) {
108
- this.root.classList.add('is-empty')
108
+ this.element.classList.add('is-empty')
109
109
  }
110
110
 
111
111
  if (this.readonly) {
@@ -123,7 +123,7 @@ class Textfield {
123
123
  buildUnderline () {
124
124
  this.underline = document.createElement('span')
125
125
  this.underline.classList.add(this.options.class + '-underline')
126
- this.root.appendChild(this.underline)
126
+ this.element.appendChild(this.underline)
127
127
  }
128
128
 
129
129
  /**
@@ -176,7 +176,7 @@ class Textfield {
176
176
  this.disabled = true
177
177
 
178
178
  this.input.setAttribute('disabled', 'disabled')
179
- this.root.classList.add('is-disabled')
179
+ this.element.classList.add('is-disabled')
180
180
  return this
181
181
  }
182
182
 
@@ -184,7 +184,7 @@ class Textfield {
184
184
  this.disabled = false
185
185
 
186
186
  this.element.input.removeAttribute('disabled')
187
- this.root.classList.remove('is-disabled')
187
+ this.element.classList.remove('is-disabled')
188
188
  return this
189
189
  }
190
190
 
@@ -228,9 +228,9 @@ class Textfield {
228
228
  this.input.value = value
229
229
 
230
230
  if (value) {
231
- this.root.classList.remove('is-empty')
231
+ this.element.classList.remove('is-empty')
232
232
  } else {
233
- this.root.classList.add('is-empty')
233
+ this.element.classList.add('is-empty')
234
234
  }
235
235
 
236
236
  if (!silent) { this.emit('change', value) }
@@ -258,9 +258,9 @@ class Textfield {
258
258
  if (this.readonly) return
259
259
 
260
260
  if (this.get('value') === '') {
261
- this.root.classList.add('is-empty')
261
+ this.element.classList.add('is-empty')
262
262
  } else {
263
- this.root.classList.remove('is-empty')
263
+ this.element.classList.remove('is-empty')
264
264
  }
265
265
 
266
266
  this.emit('change', this.getValue())
@@ -274,7 +274,7 @@ class Textfield {
274
274
  if (this.disabled) return this
275
275
  if (this.readonly) return this
276
276
 
277
- this.root.classList.add('is-focused')
277
+ this.element.classList.add('is-focused')
278
278
  if (this.input !== document.activeElement) { this.input.focus() }
279
279
  return this
280
280
  }
@@ -286,7 +286,7 @@ class Textfield {
286
286
  blur () {
287
287
  if (this.readonly) return this
288
288
 
289
- this.root.classList.remove('is-focused')
289
+ this.element.classList.remove('is-focused')
290
290
 
291
291
  return this
292
292
  }
package/src/toolbar.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
- import create from './component/create'
4
- import insert from './component/insert'
3
+ import create from './mixin/create'
4
+ import insert from './mixin/insert'
5
5
  import offset from './element/offset'
6
6
 
7
7
  const defaults = {
@@ -37,21 +37,21 @@ class Toolbar {
37
37
  * @return {Object} This class instance
38
38
  */
39
39
  build () {
40
- this.root = create(this.options)
40
+ this.element = create(this.options)
41
41
 
42
42
  // console.log(this.options.height, this.options.fixed)
43
43
 
44
44
  if (this.options.height) {
45
- this.root.style.height = this.options.height + 'px'
45
+ this.element.style.height = this.options.height + 'px'
46
46
  }
47
47
 
48
48
  if (this.options.fixed) {
49
49
  // console.log('is-fixed')
50
- this.root.classList.add('is-fixed')
50
+ this.element.classList.add('is-fixed')
51
51
  }
52
52
 
53
53
  if (this.options.flexible) {
54
- this.root.classList.add('is-flexible')
54
+ this.element.classList.add('is-flexible')
55
55
  }
56
56
 
57
57
  // if (this.options.container) {
@@ -62,19 +62,19 @@ class Toolbar {
62
62
  }
63
63
 
64
64
  attach () {
65
- this.root.addEventListener('DOMNodeInserted', (e) => {
65
+ this.element.addEventListener('DOMNodeInserted', (e) => {
66
66
  var textNode = e.target
67
- if (textNode !== this.root) return
67
+ if (textNode !== this.element) return
68
68
 
69
- var size = this.size = offset(this.root, 'height')
69
+ var size = this.size = offset(this.element, 'height')
70
70
 
71
- var view = this.view = this.root.parentNode
71
+ var view = this.view = this.element.parentNode
72
72
 
73
73
  // console.log('view', view)
74
74
 
75
75
  var padding = window.getComputedStyle(view)['padding-top']
76
76
  // console.log('paddingTop', padding)
77
- // if (!padding) padding = window.getComputedStyle(this.root.parentNode, 'padding')
77
+ // if (!padding) padding = window.getComputedStyle(this.element.parentNode, 'padding')
78
78
  // console.log('padding', padding)
79
79
 
80
80
  padding = parseInt(padding, 10)
@@ -89,7 +89,7 @@ class Toolbar {
89
89
 
90
90
  if (document.body == view) {
91
91
  // console.log('toolbar container body')
92
- this.root.classList.add('toolbar-body')
92
+ this.element.classList.add('toolbar-body')
93
93
  }
94
94
 
95
95
  // view.setAttribute('style', 'padding-top: ' + ptop + 'px')
@@ -107,7 +107,7 @@ class Toolbar {
107
107
  set (prop, value) {
108
108
  switch (prop) {
109
109
  case 'minimize':
110
- this.root.setAttribute('style', 'height: 64px')
110
+ this.element.setAttribute('style', 'height: 64px')
111
111
  break
112
112
  case 'value':
113
113
  this.setValue(value)
@@ -150,9 +150,9 @@ class Toolbar {
150
150
  }
151
151
 
152
152
  if (scrollTop > 0) {
153
- this.root.classList.add('is-scrolled')
153
+ this.element.classList.add('is-scrolled')
154
154
  } else {
155
- this.root.classList.remove('is-scrolled')
155
+ this.element.classList.remove('is-scrolled')
156
156
  }
157
157
 
158
158
  // console.log('scroll', scrollTop)
@@ -167,42 +167,42 @@ class Toolbar {
167
167
  }
168
168
 
169
169
  flexible (e, scrollTop) {
170
- var size = offset(this.root, 'height')
171
- // console.log('flexible', size, this.root.offsetHeight, scrollTop)
170
+ var size = offset(this.element, 'height')
171
+ // console.log('flexible', size, this.element.offsetHeight, scrollTop)
172
172
  // if (scrollTop < this.size) {
173
173
  //
174
174
  var height = '64'
175
175
  if (size < height) {
176
- this.root.style.height = height + 'px'
176
+ this.element.style.height = height + 'px'
177
177
  } else {
178
178
  height = this.size - scrollTop
179
179
  if (height < 64) height = 64
180
- this.root.style.height = height + 'px'
180
+ this.element.style.height = height + 'px'
181
181
  }
182
182
 
183
- // console.log('scroll', this.root.style.top, scrollTop)
183
+ // console.log('scroll', this.element.style.top, scrollTop)
184
184
 
185
185
  // if (scrollTop > 50) {
186
- // this.root.style.trans = scrollTop + 'px'
186
+ // this.element.style.trans = scrollTop + 'px'
187
187
  // } else {
188
- // this.root.style.top = scrollTop + 'px'
188
+ // this.element.style.top = scrollTop + 'px'
189
189
  // }
190
190
  // }
191
- // this.root.style.top = scrollTop + 'px'
192
- // this.root.style.height = this.size - scrollTop
191
+ // this.element.style.top = scrollTop + 'px'
192
+ // this.element.style.height = this.size - scrollTop
193
193
  // } else {
194
194
  // console.log('size scroll', this.size, scrollTop)
195
195
 
196
- // this.root.style.height = this.size - scrollTop + 'px'
197
- // // this.root.style.top = scrollTop + 'px'
196
+ // this.element.style.height = this.size - scrollTop + 'px'
197
+ // // this.element.style.top = scrollTop + 'px'
198
198
  // }
199
199
  }
200
200
 
201
201
  fixed (e, scrollTop) {
202
202
  if (scrollTop > 0) {
203
- this.root.style.transform = 'translateY(' + scrollTop + 'px)'
203
+ this.element.style.transform = 'translateY(' + scrollTop + 'px)'
204
204
  } else {
205
- this.root.style.transform = 'translateY(' + scrollTop + 'px)'
205
+ this.element.style.transform = 'translateY(' + scrollTop + 'px)'
206
206
  }
207
207
  }
208
208
 
package/src/tooltip.js CHANGED
@@ -40,19 +40,19 @@ class Tooltip {
40
40
  build () {
41
41
  var container = this.options.container || document.body
42
42
 
43
- this.root = document.createElement('span')
44
- this.root.classList.add('tooltip')
45
- this.root.classList.add('control')
43
+ this.element = document.createElement('span')
44
+ this.element.classList.add('tooltip')
45
+ this.element.classList.add('control')
46
46
 
47
47
  this.pointer = document.createElement('span')
48
48
  this.pointer.classList.add('pointer')
49
- this.root.appendChild(this.pointer)
49
+ this.element.appendChild(this.pointer)
50
50
 
51
51
  this.label = document.createElement('span')
52
52
  this.label.classList.add('label')
53
- this.root.appendChild(this.label)
53
+ this.element.appendChild(this.label)
54
54
 
55
- container.appendChild(this.root)
55
+ container.appendChild(this.element)
56
56
  }
57
57
 
58
58
  attach () {
@@ -78,8 +78,8 @@ class Tooltip {
78
78
  var coord = this.offset(e.currentTarget)
79
79
 
80
80
  this.show()
81
- this.root.style.top = (coord.top + this.options.offset.top) + 'px'
82
- this.root.style.left = coord.left - (this.root.offsetWidth / 2) + (e.currentTarget.offsetWidth / 2) + 'px'
81
+ this.element.style.top = (coord.top + this.options.offset.top) + 'px'
82
+ this.element.style.left = coord.left - (this.element.offsetWidth / 2) + (e.currentTarget.offsetWidth / 2) + 'px'
83
83
  })
84
84
 
85
85
  targets[i].addEventListener('mouseleave', (e) => {
@@ -88,7 +88,7 @@ class Tooltip {
88
88
  })
89
89
  }
90
90
 
91
- this.root.addEventListener('click', (e) => {
91
+ this.element.addEventListener('click', (e) => {
92
92
  e.preventDefault()
93
93
  e.stop()
94
94
  this.hide()
@@ -103,11 +103,11 @@ class Tooltip {
103
103
  }
104
104
 
105
105
  hide () {
106
- this.root.classList.remove('show')
106
+ this.element.classList.remove('show')
107
107
  }
108
108
 
109
109
  show () {
110
- this.root.classList.add('show')
110
+ this.element.classList.add('show')
111
111
  }
112
112
 
113
113
  disable () {
package/src/tree.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import insert from './component/insert'
3
+ import insert from './mixin/insert'
4
4
  import css from './module/css'
5
5
  import attach from './module/attach'
6
6
 
@@ -85,8 +85,8 @@ class Tree {
85
85
  // define main tag
86
86
  var tag = this.options.tag || 'div'
87
87
 
88
- this.root = document.createElement(tag)
89
- css.add(this.root, this.options.prefix + '-' + this.options.class)
88
+ this.element = document.createElement(tag)
89
+ css.add(this.element, this.options.prefix + '-' + this.options.class)
90
90
 
91
91
  if (this.options.container) {
92
92
  this.insert(this.options.container)
@@ -96,7 +96,7 @@ class Tree {
96
96
  this.buildTree(this.options.data)
97
97
  }
98
98
 
99
- // this.root.addEventListener("click", function(e) {
99
+ // this.element.addEventListener("click", function(e) {
100
100
  // // console.log("list", this, e);
101
101
  // // e.target was the clicked element
102
102
  // });
@@ -105,13 +105,12 @@ class Tree {
105
105
  }
106
106
 
107
107
  buildTree (data) {
108
- this.root.innerHTML = ''
108
+ this.element.innerHTML = ''
109
109
 
110
110
  // console.log('buildTree', data);
111
111
 
112
112
  var tree = ''
113
113
 
114
-
115
114
  function checkChildren (parentObj, level) {
116
115
  if (level) {
117
116
  level++
@@ -119,11 +118,10 @@ class Tree {
119
118
  level = 0
120
119
  }
121
120
 
122
-
123
- level++;
121
+ level++
124
122
 
125
123
  // console.log('-- ', level, parentObj);
126
- if (parentObj.path) {
124
+ if (parentObj.path) {
127
125
  var level = (parentObj.path.split('/').length - 1)
128
126
 
129
127
  if (level > 0) {
@@ -131,7 +129,7 @@ class Tree {
131
129
  }
132
130
  } else {
133
131
  if (level > 1) {
134
- tree += '<li class="item-tree" data-id="'+parentObj._id+'">' + parentObj.name
132
+ tree += '<li class="item-tree" data-id="' + parentObj._id + '">' + parentObj.name
135
133
  }
136
134
  }
137
135
 
@@ -150,13 +148,11 @@ class Tree {
150
148
  }
151
149
  }
152
150
 
153
-
154
-
155
151
  checkChildren(data)
156
152
 
157
153
  // console.log('html tree', tree);
158
154
 
159
- this.root.innerHTML = tree
155
+ this.element.innerHTML = tree
160
156
 
161
157
  return tree
162
158
  }
@@ -238,8 +234,8 @@ class Tree {
238
234
  }
239
235
 
240
236
  var where = 'bottom'
241
- this.insertElement(item.root, this.root, where)
242
- // item.insert(this.root, where);
237
+ this.insertElement(item.root, this.element, where)
238
+ // item.insert(this.element, where);
243
239
  this.items.push(item)
244
240
 
245
241
  return item
@@ -247,7 +243,7 @@ class Tree {
247
243
 
248
244
  empty () {
249
245
  // console.log('empty')
250
- this.root.innerHTML = ''
246
+ this.element.innerHTML = ''
251
247
  this.items = []
252
248
  this.item = null
253
249
  }
package/src/view/build.js CHANGED
@@ -1,25 +1,25 @@
1
1
  import scrollbar from '../module/scrollbar'
2
- import dataset from './dataset'
2
+ import dataset from '../module/dataset'
3
3
  import Layout from '../layout'
4
4
 
5
5
  export default {
6
6
  build () {
7
- this.root = document.createElement('div')
8
- this.root.classList.add('view')
7
+ this.element = document.createElement('div')
8
+ this.element.classList.add('view')
9
9
 
10
10
  if (this.options.class) {
11
11
  this.addClass(this.options.class)
12
12
  }
13
13
 
14
14
  if (this.options.data) {
15
- dataset(this.root, this.options.data)
15
+ dataset(this.element, this.options.data)
16
16
  }
17
17
 
18
18
  this.container = this.options.container || document.body
19
- this.container.appendChild(this.root)
19
+ this.container.appendChild(this.element)
20
20
 
21
21
  if (this.options.layout) {
22
- this.layout = new Layout(this.options.layout, this.root)
22
+ this.layout = new Layout(this.options.layout, this.element)
23
23
  this.ui = this.layout.component
24
24
  }
25
25
  },
@@ -28,7 +28,7 @@ export default {
28
28
  var list = c.split(' ')
29
29
 
30
30
  for (var i = 0; i < list.length; i++) {
31
- this.root.classList.add(list[i])
31
+ this.element.classList.add(list[i])
32
32
  }
33
33
  }
34
34
  }
@@ -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', this.root.style.display)
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