neo.mjs 4.3.30 → 4.3.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.3.30",
3
+ "version": "4.3.32",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -169,7 +169,7 @@
169
169
  flex-direction: column;
170
170
 
171
171
  .neo-textfield-label {
172
- margin-bottom: 3px;
172
+ margin: v(textfield-label-top-margin);
173
173
  }
174
174
  }
175
175
 
@@ -43,7 +43,6 @@
43
43
 
44
44
  .neo-list-item {
45
45
  background-color: v(list-item-background-color);
46
- cursor : pointer;
47
46
  padding : v(list-item-padding);
48
47
  white-space : nowrap;
49
48
 
@@ -52,8 +51,11 @@
52
51
  }
53
52
 
54
53
  &:not(.neo-list-header) {
54
+ cursor: pointer;
55
+
55
56
  &:hover {
56
57
  background-color: v(list-item-background-color-hover);
58
+ color : v(list-container-list-color);
57
59
  }
58
60
  }
59
61
 
@@ -7,7 +7,8 @@ $neoMap: map-merge($neoMap, (
7
7
  'textfield-input-color' : #ccc,
8
8
  'textfield-input-placeholder-color' : #ccc,
9
9
  'textfield-input-placeholder-opacity': 0.6,
10
- 'textfield-label-color' : #bbb
10
+ 'textfield-label-color' : #bbb,
11
+ 'textfield-label-top-margin' : 0 0 3px
11
12
  ));
12
13
 
13
14
  @if $useCssVars == true {
@@ -21,5 +22,6 @@ $neoMap: map-merge($neoMap, (
21
22
  --textfield-input-placeholder-color : #{neo(textfield-input-placeholder-color)};
22
23
  --textfield-input-placeholder-opacity: #{neo(textfield-input-placeholder-opacity)};
23
24
  --textfield-label-color : #{neo(textfield-label-color)};
25
+ --textfield-label-top-margin : #{neo(textfield-label-top-margin)};
24
26
  }
25
27
  }
@@ -7,7 +7,8 @@ $neoMap: map-merge($neoMap, (
7
7
  'textfield-input-color' : #000,
8
8
  'textfield-input-placeholder-color' : #333,
9
9
  'textfield-input-placeholder-opacity': 0.6,
10
- 'textfield-label-color' : #666
10
+ 'textfield-label-color' : #666,
11
+ 'textfield-label-top-margin' : 0 0 3px
11
12
  ));
12
13
 
13
14
  @if $useCssVars == true {
@@ -21,5 +22,6 @@ $neoMap: map-merge($neoMap, (
21
22
  --textfield-input-placeholder-color : #{neo(textfield-input-placeholder-color)};
22
23
  --textfield-input-placeholder-opacity: #{neo(textfield-input-placeholder-opacity)};
23
24
  --textfield-label-color : #{neo(textfield-label-color)};
25
+ --textfield-label-top-margin : #{neo(textfield-label-top-margin)};
24
26
  }
25
27
  }
@@ -93,6 +93,10 @@ class Text extends Base {
93
93
  * @member {String} inputType_='text'
94
94
  */
95
95
  inputType_: 'text',
96
+ /**
97
+ * @member {String[]} labelCls_=['neo-textfield-label']
98
+ */
99
+ labelCls_: ['neo-textfield-label'],
96
100
  /**
97
101
  * Valid values: 'bottom', 'inline', 'left', 'right', 'top'
98
102
  * @member {String} labelPosition_='left'
@@ -139,7 +143,7 @@ class Text extends Base {
139
143
  */
140
144
  _vdom:
141
145
  {cn: [
142
- {tag: 'label', cls: ['neo-textfield-label'], style: {}},
146
+ {tag: 'label', cls: [], style: {}},
143
147
  {tag: 'input', cls: ['neo-textfield-input'], flag: 'neo-real-input', style: {}},
144
148
  {cls: ['neo-textfield-error'], removeDom: true}
145
149
  ]}
@@ -290,6 +294,22 @@ class Text extends Base {
290
294
  this.changeInputElKey('type', value);
291
295
  }
292
296
 
297
+ /**
298
+ * Triggered after the labelCls config got changed
299
+ * @param {String[]} value
300
+ * @param {String[]} oldValue
301
+ * @protected
302
+ */
303
+ afterSetLabelCls(value, oldValue) {
304
+ let me = this,
305
+ cls = me.getLabelEl().cls;
306
+
307
+ NeoArray.remove(cls, oldValue);
308
+ NeoArray.add(cls, value);
309
+
310
+ me.update();
311
+ }
312
+
293
313
  /**
294
314
  * Triggered after the labelPosition config got changed
295
315
  * @param {String} value