neo.mjs 4.6.10 → 4.6.11

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.
@@ -1,20 +1,20 @@
1
- import Button from '../../src/button/Base.mjs';
2
- import CheckBox from '../../src/form/field/CheckBox.mjs';
3
- import Component from '../../src/component/Base.mjs';
4
- import FormContainer from '../../src/form/Container.mjs';
1
+ import Button from '../../../src/button/Base.mjs';
2
+ import CheckBox from '../../../src/form/field/CheckBox.mjs';
3
+ import Component from '../../../src/component/Base.mjs';
4
+ import FormContainer from '../../../src/form/Container.mjs';
5
5
  import MainContainerController from './MainContainerController.mjs';
6
- import NumberField from '../../src/form/field/Number.mjs';
7
- import SelectField from '../../src/form/field/Select.mjs';
8
- import TextField from '../../src/form/field/Text.mjs';
9
- import Viewport from '../../src/container/Viewport.mjs';
6
+ import NumberField from '../../../src/form/field/Number.mjs';
7
+ import SelectField from '../../../src/form/field/Select.mjs';
8
+ import TextField from '../../../src/form/field/Text.mjs';
9
+ import Viewport from '../../../src/container/Viewport.mjs';
10
10
 
11
11
  /**
12
- * @class Neo.examples.toast.MainContainer
12
+ * @class Neo.examples.component.toast.MainContainer
13
13
  * @extends Neo.container.Viewport
14
14
  */
15
15
  class MainContainer extends Viewport {
16
16
  static getConfig() {return {
17
- className : 'Neo.examples.toast.MainContainer',
17
+ className : 'Neo.examples.component.toast.MainContainer',
18
18
  autoMount : true,
19
19
  controller: MainContainerController,
20
20
  layout: {ntype: 'hbox', align: 'stretch'},
@@ -79,12 +79,13 @@ class MainContainer extends Viewport {
79
79
  name : 'timeout',
80
80
  maxValue : 99999
81
81
  }, {
82
- module : CheckBox,
83
- labelText : 'Closable',
84
- labelWidth: 70,
85
- name : 'closable',
86
- reference : 'closable',
87
- style : {padding: '8px 0 10px 9px'}
82
+ module : CheckBox,
83
+ labelPosition: 'left',
84
+ labelText : 'Closable',
85
+ labelWidth : 70,
86
+ name : 'closable',
87
+ reference : 'closable',
88
+ style : {padding: '8px 0 10px 9px'}
88
89
  }, {
89
90
  module : Button,
90
91
  reference: 'creation-button',
@@ -108,7 +109,7 @@ class MainContainer extends Viewport {
108
109
 
109
110
  itemTpl: data => {
110
111
  return [
111
- {cls: 'import', innerHTML: 'import Toast from \'../../../../node_modules/neo.mjs/src/dialog/Toast.mjs\';'},
112
+ {cls: 'import', innerHTML: 'import Toast from \'../../../../node_modules/neo.mjs/src/component/Toast.mjs\';'},
112
113
  {innerHTML: 'Neo.toast({'},
113
114
  {cls: 'tab', cn: [
114
115
  {cls: 'grey', innerHTML: '/* mandatory */'},
@@ -1,17 +1,17 @@
1
- import ComponentController from '../../src/controller/Component.mjs';
2
- import Toast from '../../src/component/Toast.mjs';
1
+ import ComponentController from '../../../src/controller/Component.mjs';
2
+ import Toast from '../../../src/component/Toast.mjs';
3
3
 
4
4
  /**
5
- * @class Neo.examples.toast.MainContainerController
5
+ * @class Neo.examples.component.toast.MainContainerController
6
6
  * @extends Neo.controller.Component
7
7
  */
8
8
  class MainContainerController extends ComponentController {
9
9
  static getConfig() {return {
10
10
  /**
11
- * @member {String} className='Neo.examples.toast.MainContainerController'
11
+ * @member {String} className='Neo.examples.component.toast.MainContainerController'
12
12
  * @protected
13
13
  */
14
- className: 'Neo.examples.toast.MainContainerController'
14
+ className: 'Neo.examples.component.toast.MainContainerController'
15
15
  }}
16
16
 
17
17
  /**
@@ -2,6 +2,6 @@ import MainContainer from './MainContainer.mjs';
2
2
 
3
3
  export const onStart = () => Neo.app({
4
4
  mainView: MainContainer,
5
- name : 'Neo.examples.toast'
5
+ name : 'Neo.examples.component.toast'
6
6
  });
7
7
 
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
5
  <meta charset="UTF-8">
6
- <title>Neo GoogleMaps Component</title>
6
+ <title>Neo Toast Component</title>
7
7
 
8
8
  <style>
9
9
  .output {
@@ -22,6 +22,6 @@
22
22
  </head>
23
23
  </head>
24
24
  <body>
25
- <script src="../../src/MicroLoader.mjs" type="module"></script>
25
+ <script src="../../../src/MicroLoader.mjs" type="module"></script>
26
26
  </body>
27
27
  </html>
@@ -0,0 +1,7 @@
1
+ {
2
+ "appPath" : "examples/component/toast/app.mjs",
3
+ "basePath" : "../../../",
4
+ "environment" : "development",
5
+ "mainPath" : "./Main.mjs",
6
+ "mainThreadAddons": ["HighlightJS", "Stylesheet"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.6.10",
3
+ "version": "4.6.11",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -43,6 +43,7 @@
43
43
 
44
44
  .neo-checkbox-label {
45
45
  display: block;
46
+ margin : v(checkboxfield-label-top-margin);
46
47
  }
47
48
  }
48
49
  }
@@ -43,6 +43,7 @@
43
43
 
44
44
  .neo-radio-label {
45
45
  display: block;
46
+ margin : v(radiofield-label-top-margin);
46
47
  }
47
48
  }
48
49
  }
@@ -1,11 +1,13 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'checkboxfield-color' : #eee,
3
- 'checkboxfield-checked-color': #64B5F6
2
+ 'checkboxfield-color' : #eee,
3
+ 'checkboxfield-checked-color' : #64B5F6,
4
+ 'checkboxfield-label-top-margin': 0 0 3px
4
5
  ));
5
6
 
6
7
  @if $useCssVars == true {
7
8
  :root .neo-theme-dark { // .neo-checkboxfield
8
- --checkboxfield-color : #{neo(checkboxfield-color)};
9
- --checkboxfield-checked-color: #{neo(checkboxfield-checked-color)};
9
+ --checkboxfield-color : #{neo(checkboxfield-color)};
10
+ --checkboxfield-checked-color : #{neo(checkboxfield-checked-color)};
11
+ --checkboxfield-label-top-margin: #{neo(checkboxfield-label-top-margin)};
10
12
  }
11
- }
13
+ }
@@ -1,11 +1,13 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'radiofield-color' : #eee,
3
- 'radiofield-checked-color': #64B5F6
2
+ 'radiofield-color' : #eee,
3
+ 'radiofield-checked-color' : #64B5F6,
4
+ 'radiofield-label-top-margin': 0 0 3px
4
5
  ));
5
6
 
6
7
  @if $useCssVars == true {
7
8
  :root .neo-theme-dark { // .neo-radiofield
8
- --radiofield-color : #{neo(radiofield-color)};
9
- --radiofield-checked-color: #{neo(radiofield-checked-color)};
9
+ --radiofield-color : #{neo(radiofield-color)};
10
+ --radiofield-checked-color : #{neo(radiofield-checked-color)};
11
+ --radiofield-label-top-margin: #{neo(radiofield-label-top-margin)};
10
12
  }
11
- }
13
+ }
@@ -1,11 +1,13 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'checkboxfield-color' : #aaa,
3
- 'checkboxfield-checked-color': #1c60a0
2
+ 'checkboxfield-color' : #aaa,
3
+ 'checkboxfield-checked-color' : #1c60a0,
4
+ 'checkboxfield-label-top-margin': 0 0 3px
4
5
  ));
5
6
 
6
7
  @if $useCssVars == true {
7
8
  :root .neo-theme-light { // .neo-checkboxfield
8
- --checkboxfield-color : #{neo(checkboxfield-color)};
9
- --checkboxfield-checked-color: #{neo(checkboxfield-checked-color)};
9
+ --checkboxfield-color : #{neo(checkboxfield-color)};
10
+ --checkboxfield-checked-color : #{neo(checkboxfield-checked-color)};
11
+ --checkboxfield-label-top-margin: #{neo(checkboxfield-label-top-margin)};
10
12
  }
11
- }
13
+ }
@@ -1,11 +1,13 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'radiofield-color' : #aaa,
3
- 'radiofield-checked-color': #1c60a0
2
+ 'radiofield-color' : #aaa,
3
+ 'radiofield-checked-color' : #1c60a0,
4
+ 'radiofield-label-top-margin': 0 0 3px
4
5
  ));
5
6
 
6
7
  @if $useCssVars == true {
7
8
  :root .neo-theme-light { // .neo-radiofield
8
- --radiofield-color : #{neo(radiofield-color)};
9
- --radiofield-checked-color: #{neo(radiofield-checked-color)};
9
+ --radiofield-color : #{neo(radiofield-color)};
10
+ --radiofield-checked-color : #{neo(radiofield-checked-color)};
11
+ --radiofield-label-top-margin: #{neo(radiofield-label-top-margin)};
10
12
  }
11
- }
13
+ }
@@ -251,14 +251,12 @@ class DomEvents extends Base {
251
251
  * @returns {Object}
252
252
  */
253
253
  getEventData(event) {
254
- let path = event.path || event.composedPath(); // FF does not support path
255
-
256
254
  return {
257
- path : path.map(e => this.getTargetData(e)),
255
+ path : event.composedPath().map(e => this.getTargetData(e)),
258
256
  target : this.getTargetData(event.target),
259
257
  timeStamp: event.timeStamp,
260
258
  type : event.type
261
- };
259
+ }
262
260
  }
263
261
 
264
262
  /**
@@ -277,7 +275,7 @@ class DomEvents extends Base {
277
275
  keyCode,
278
276
  metaKey,
279
277
  shiftKey
280
- };
278
+ }
281
279
  }
282
280
 
283
281
  /**
@@ -301,7 +299,7 @@ class DomEvents extends Base {
301
299
  screenX,
302
300
  screenY,
303
301
  shiftKey
304
- };
302
+ }
305
303
  }
306
304
 
307
305
  /**
@@ -341,7 +339,7 @@ class DomEvents extends Base {
341
339
  width : r.width,
342
340
  x : r.x,
343
341
  y : r.y
344
- });
342
+ })
345
343
  }
346
344
 
347
345
  return {
@@ -372,7 +370,7 @@ class DomEvents extends Base {
372
370
  style : node.style?.cssText,
373
371
  tabIndex : node.tabIndex,
374
372
  tagName : node.tagName?.toLowerCase()
375
- };
373
+ }
376
374
  }
377
375
 
378
376
  /**
@@ -686,7 +684,7 @@ class DomEvents extends Base {
686
684
  action : 'domEvent',
687
685
  eventName: data.type,
688
686
  data
689
- });
687
+ })
690
688
  }
691
689
 
692
690
  /**
@@ -1,7 +0,0 @@
1
- {
2
- "appPath": "examples/toast/app.mjs",
3
- "basePath": "../../",
4
- "environment": "development",
5
- "mainPath": "./Main.mjs",
6
- "mainThreadAddons": ["HighlightJS", "Stylesheet"]
7
- }