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.
- package/examples/{toast → component/toast}/MainContainer.mjs +18 -17
- package/examples/{toast → component/toast}/MainContainerController.mjs +5 -5
- package/examples/{toast → component/toast}/app.mjs +1 -1
- package/examples/{toast → component/toast}/index.html +2 -2
- package/examples/component/toast/neo-config.json +7 -0
- package/examples/{toast → component/toast}/resources/highlight/CHANGES.md +0 -0
- package/examples/{toast → component/toast}/resources/highlight/LICENSE +0 -0
- package/examples/{toast → component/toast}/resources/highlight/README.md +0 -0
- package/examples/{toast → component/toast}/resources/highlight/highlight.pack.js +0 -0
- package/examples/{toast → component/toast}/resources/highlightjs-custom-dark-theme.css +0 -0
- package/examples/{toast → component/toast}/resources/highlightjs-custom-github-theme.css +0 -0
- package/package.json +1 -1
- package/resources/scss/src/form/field/CheckBox.scss +1 -0
- package/resources/scss/src/form/field/Radio.scss +1 -0
- package/resources/scss/theme-dark/form/field/CheckBox.scss +7 -5
- package/resources/scss/theme-dark/form/field/Radio.scss +7 -5
- package/resources/scss/theme-light/form/field/CheckBox.scss +7 -5
- package/resources/scss/theme-light/form/field/Radio.scss +7 -5
- package/src/main/DomEvents.mjs +7 -9
- package/examples/toast/neo-config.json +0 -7
@@ -1,20 +1,20 @@
|
|
1
|
-
import Button from '
|
2
|
-
import CheckBox from '
|
3
|
-
import Component from '
|
4
|
-
import FormContainer from '
|
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 '
|
7
|
-
import SelectField from '
|
8
|
-
import TextField from '
|
9
|
-
import Viewport from '
|
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
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
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/
|
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 '
|
2
|
-
import Toast from '
|
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
|
/**
|
@@ -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
|
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="
|
25
|
+
<script src="../../../src/MicroLoader.mjs" type="module"></script>
|
26
26
|
</body>
|
27
27
|
</html>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/package.json
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
$neoMap: map-merge($neoMap, (
|
2
|
-
'checkboxfield-color'
|
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
|
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'
|
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
|
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'
|
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
|
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'
|
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
|
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
|
+
}
|
package/src/main/DomEvents.mjs
CHANGED
@@ -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 :
|
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
|
/**
|