neo.mjs 5.13.4 → 5.13.5

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.
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='5.13.4'
23
+ * @member {String} version='5.13.5'
24
24
  */
25
- version: '5.13.4'
25
+ version: '5.13.5'
26
26
  }
27
27
 
28
28
  /**
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='5.13.4'
23
+ * @member {String} version='5.13.5'
24
24
  */
25
- version: '5.13.4'
25
+ version: '5.13.5'
26
26
  }
27
27
 
28
28
  /**
@@ -135,12 +135,11 @@ class MainContainer extends ConfigurationViewport {
135
135
  labelPosition: 'inline',
136
136
  labelText : 'US States',
137
137
  labelWidth : 80,
138
- width : 200,
139
-
140
- store: {
141
- module: MainStore
142
- }
143
- });
138
+ store : MainStore,
139
+ value : 'Arizona',
140
+ valueField : 'abbreviation',
141
+ width : 200
142
+ })
144
143
  }
145
144
  }
146
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "5.13.4",
3
+ "version": "5.13.5",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -177,7 +177,7 @@
177
177
 
178
178
  &:active {
179
179
  background-color: v(button-ghost-background-color-active) !important;
180
- border : v(button-ghost-border-active);
180
+ border : v(button-ghost-border-active) !important;
181
181
 
182
182
  .neo-button-glyph {
183
183
  color: v(button-ghost-glyph-color-active);
@@ -230,7 +230,7 @@
230
230
 
231
231
  &:active {
232
232
  background-color: v(button-secondary-background-color-active) !important;
233
- border : v(button-secondary-border-active);
233
+ border : v(button-secondary-border-active) !important;
234
234
 
235
235
  .neo-button-glyph {
236
236
  color: v(button-secondary-glyph-color-active);
@@ -283,7 +283,7 @@
283
283
 
284
284
  &:active {
285
285
  background-color: v(button-tertiary-background-color-active) !important;
286
- border : v(button-tertiary-border-active);
286
+ border : v(button-tertiary-border-active) !important;
287
287
 
288
288
  .neo-button-glyph {
289
289
  color: v(button-tertiary-glyph-color-active);
@@ -1,7 +1,7 @@
1
1
  .neo-menu-list {
2
- border : 1px solid v(menu-list-border-color);
3
- overflow-y: auto;
4
- width : fit-content;
2
+ border : 1px solid v(menu-list-border-color);
3
+ overflow-y : auto;
4
+ width : fit-content;
5
5
 
6
6
  &.neo-floating {
7
7
  box-shadow: v(menu-list-box-shadow);
@@ -9,17 +9,24 @@
9
9
  }
10
10
 
11
11
  .neo-list-item {
12
- align-items: center;
13
- display : flex;
12
+ align-items : center;
13
+ color : v(menu-list-item-color);
14
+ display : flex;
15
+ font-family : v(menu-list-item-font-family);
16
+ font-weight : v(menu-list-item-font-weight);
17
+ height : v(menu-list-item-height);
18
+ line-height : v(menu-list-item-line-height);
19
+ padding : v(menu-list-item-padding);
20
+ text-transform: v(menu-list-item-text-transform);
14
21
 
15
22
  &.neo-selected {
16
23
  .neo-icon {
17
- color: v(menu-list-icon-color-selected);
24
+ color: v(menu-list-item-icon-color-selected);
18
25
  }
19
26
  }
20
27
 
21
28
  .neo-arrow-icon {
22
- color : v(menu-list-icon-color);
29
+ color : v(menu-list-item-icon-color);
23
30
  margin-left: 1em;
24
31
  }
25
32
 
@@ -28,13 +35,13 @@
28
35
  }
29
36
 
30
37
  .neo-icon {
31
- color : v(menu-list-icon-color);
38
+ color : v(menu-list-item-icon-color);
32
39
  display : flex;
33
40
  justify-content: center;
34
41
  }
35
42
 
36
43
  .neo-menu-icon {
37
- margin-right: .4em;
44
+ margin-right: v(menu-list-item-icon-gap);
38
45
  width : 1.2em;
39
46
  }
40
47
  }
@@ -1,15 +1,31 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'menu-list-border-color' : #3c3f41,
3
- 'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
4
- 'menu-list-icon-color' : #bbb,
5
- 'menu-list-icon-color-selected': #2b2b2b
2
+ 'menu-list-border-color' : #3c3f41,
3
+ 'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
4
+ 'menu-list-item-color' : inherit,
5
+ 'menu-list-item-font-family' : inherit,
6
+ 'menu-list-item-font-weight' : inherit,
7
+ 'menu-list-item-icon-color' : #bbb,
8
+ 'menu-list-item-icon-color-selected': #2b2b2b,
9
+ 'menu-list-item-icon-gap' : .4em,
10
+ 'menu-list-item-height' : inherit,
11
+ 'menu-list-item-line-height' : inherit,
12
+ 'menu-list-item-padding' : 5px,
13
+ 'menu-list-item-text-transform' : inherit
6
14
  ));
7
15
 
8
16
  @if $useCssVars == true {
9
17
  :root .neo-theme-dark { // .neo-menu-list
10
- --menu-list-border-color : #{neo(menu-list-border-color)};
11
- --menu-list-box-shadow : #{neo(menu-list-box-shadow)};
12
- --menu-list-icon-color : #{neo(menu-list-icon-color)};
13
- --menu-list-icon-color-selected: #{neo(menu-list-icon-color-selected)};
18
+ --menu-list-border-color : #{neo(menu-list-border-color)};
19
+ --menu-list-box-shadow : #{neo(menu-list-box-shadow)};
20
+ --menu-list-item-color : #{neo(menu-list-item-color)};
21
+ --menu-list-item-font-family : #{neo(menu-list-item-font-family)};
22
+ --menu-list-item-font-weight : #{neo(menu-list-item-font-weight)};
23
+ --menu-list-item-icon-color : #{neo(menu-list-item-icon-color)};
24
+ --menu-list-item-icon-color-selected: #{neo(menu-list-item-icon-color-selected)};
25
+ --menu-list-item-icon-gap : #{neo(menu-list-item-icon-gap)};
26
+ --menu-list-item-height : #{neo(menu-list-item-height)};
27
+ --menu-list-item-line-height : #{neo(menu-list-item-line-height)};
28
+ --menu-list-item-padding : #{neo(menu-list-item-padding)};
29
+ --menu-list-item-text-transform : #{neo(menu-list-item-text-transform)};
14
30
  }
15
31
  }
@@ -1,15 +1,31 @@
1
1
  $neoMap: map-merge($neoMap, (
2
- 'menu-list-border-color' : #1c60a0,
3
- 'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
4
- 'menu-list-icon-color' : #1c60a0,
5
- 'menu-list-icon-color-selected': #1c60a0
2
+ 'menu-list-border-color' : #1c60a0,
3
+ 'menu-list-box-shadow' : 0 5px 10px rgba(0,0,0,.4),
4
+ 'menu-list-item-color' : inherit,
5
+ 'menu-list-item-font-family' : inherit,
6
+ 'menu-list-item-font-weight' : inherit,
7
+ 'menu-list-item-icon-color' : #1c60a0,
8
+ 'menu-list-item-icon-color-selected': #1c60a0,
9
+ 'menu-list-item-icon-gap' : .4em,
10
+ 'menu-list-item-height' : inherit,
11
+ 'menu-list-item-line-height' : inherit,
12
+ 'menu-list-item-padding' : 5px,
13
+ 'menu-list-item-text-transform' : inherit
6
14
  ));
7
15
 
8
16
  @if $useCssVars == true {
9
17
  :root .neo-theme-light { // .neo-menu-list
10
- --menu-list-border-color : #{neo(menu-list-border-color)};
11
- --menu-list-box-shadow : #{neo(menu-list-box-shadow)};
12
- --menu-list-icon-color : #{neo(menu-list-icon-color)};
13
- --menu-list-icon-color-selected: #{neo(menu-list-icon-color-selected)};
18
+ --menu-list-border-color : #{neo(menu-list-border-color)};
19
+ --menu-list-box-shadow : #{neo(menu-list-box-shadow)};
20
+ --menu-list-item-color : #{neo(menu-list-item-color)};
21
+ --menu-list-item-font-family : #{neo(menu-list-item-font-family)};
22
+ --menu-list-item-font-weight : #{neo(menu-list-item-font-weight)};
23
+ --menu-list-item-icon-color : #{neo(menu-list-item-icon-color)};
24
+ --menu-list-item-icon-color-selected: #{neo(menu-list-item-icon-color-selected)};
25
+ --menu-list-item-icon-gap : #{neo(menu-list-item-icon-gap)};
26
+ --menu-list-item-height : #{neo(menu-list-item-height)};
27
+ --menu-list-item-line-height : #{neo(menu-list-item-line-height)};
28
+ --menu-list-item-padding : #{neo(menu-list-item-padding)};
29
+ --menu-list-item-text-transform : #{neo(menu-list-item-text-transform)};
14
30
  }
15
31
  }
@@ -236,12 +236,12 @@ const DefaultConfig = {
236
236
  useVdomWorker: true,
237
237
  /**
238
238
  * buildScripts/injectPackageVersion.mjs will update this value
239
- * @default '5.13.4'
239
+ * @default '5.13.5'
240
240
  * @memberOf! module:Neo
241
241
  * @name config.version
242
242
  * @type String
243
243
  */
244
- version: '5.13.4'
244
+ version: '5.13.5'
245
245
  };
246
246
 
247
247
  Object.assign(DefaultConfig, {
@@ -210,6 +210,8 @@ class Select extends Picker {
210
210
  if (me.list) {
211
211
  me.list.store = value
212
212
  }
213
+
214
+ value.on('load', me.onStoreLoad, me)
213
215
  }
214
216
  }
215
217
 
@@ -577,6 +579,20 @@ class Select extends Picker {
577
579
  this.focusInputEl()
578
580
  }
579
581
 
582
+ /**
583
+ * Selecting a record, if required
584
+ * @param {Object[]} items
585
+ */
586
+ onStoreLoad(items) {
587
+ let me = this,
588
+ value = me.value;
589
+
590
+ if (value) {
591
+ me._value = null; // silent update
592
+ me.value = value
593
+ }
594
+ }
595
+
580
596
  /**
581
597
  *
582
598
  */