neo.mjs 4.6.9 → 4.6.10

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.6.9",
3
+ "version": "4.6.10",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -859,7 +859,7 @@ class Base extends CoreBase {
859
859
  * @protected
860
860
  */
861
861
  beforeSetCls(value, oldValue) {
862
- return NeoArray.union(value || [], this.baseCls);;
862
+ return NeoArray.union(value || [], this.baseCls);
863
863
  }
864
864
 
865
865
  /**
@@ -48,6 +48,14 @@ class CheckBox extends Base {
48
48
  * @member {String} inputType_='checkbox'
49
49
  */
50
50
  inputType_: 'checkbox',
51
+ /**
52
+ * @member {String[]} labelBaseCls=['neo-checkbox-label']
53
+ */
54
+ labelBaseCls: ['neo-checkbox-label'],
55
+ /**
56
+ * @member {String[]} labelCls_=[]
57
+ */
58
+ labelCls_: [],
51
59
  /**
52
60
  * Valid values: 'left', 'top'
53
61
  * @member {String} labelPosition_='left'
@@ -75,7 +83,7 @@ class CheckBox extends Base {
75
83
  */
76
84
  _vdom:
77
85
  {cn: [
78
- {tag: 'label', cls: ['neo-checkbox-label']},
86
+ {tag: 'label', cls: []},
79
87
  {tag: 'input', cls: ['neo-checkbox-input']},
80
88
  {tag: 'label', cls: ['neo-checkbox-value-label']}
81
89
  ]}
@@ -173,6 +181,22 @@ class CheckBox extends Base {
173
181
  this.update();
174
182
  }
175
183
 
184
+ /**
185
+ * Triggered after the labelCls config got changed
186
+ * @param {String[]} value
187
+ * @param {String[]} oldValue
188
+ * @protected
189
+ */
190
+ afterSetLabelCls(value, oldValue) {
191
+ let me = this,
192
+ cls = me.vdom.cn[0].cls;
193
+
194
+ NeoArray.remove(cls, oldValue);
195
+ NeoArray.add(cls, value);
196
+
197
+ me.update();
198
+ }
199
+
176
200
  /**
177
201
  * Triggered after the labelPosition config got changed
178
202
  * @param {String} value
@@ -259,6 +283,16 @@ class CheckBox extends Base {
259
283
  me.update();
260
284
  }
261
285
 
286
+ /**
287
+ * Triggered before the labelCls config gets changed.
288
+ * @param {String[]} value
289
+ * @param {String[]} oldValue
290
+ * @protected
291
+ */
292
+ beforeSetLabelCls(value, oldValue) {
293
+ return NeoArray.union(value || [], this.labelBaseCls);
294
+ }
295
+
262
296
  /**
263
297
  * Triggered before the labelPosition config gets changed
264
298
  * @param {String} value
@@ -25,12 +25,16 @@ class Radio extends CheckBox {
25
25
  * @member {String} inputType='radio'
26
26
  */
27
27
  inputType: 'radio',
28
+ /**
29
+ * @member {String[]} labelBaseCls=['neo-radio-label']
30
+ */
31
+ labelBaseCls: ['neo-radio-label'],
28
32
  /**
29
33
  * @member {Object} _vdom
30
34
  */
31
35
  _vdom:
32
36
  {cn: [
33
- {tag: 'label', cls: ['neo-radio-label']},
37
+ {tag: 'label', cls: []},
34
38
  {tag: 'input', cls: ['neo-radio-input']},
35
39
  {tag: 'label', cls: ['neo-radio-value-label']}
36
40
  ]}
@@ -94,9 +94,13 @@ class Text extends Base {
94
94
  */
95
95
  inputType_: 'text',
96
96
  /**
97
- * @member {String[]} labelCls_=['neo-textfield-label']
97
+ * @member {String[]} labelBaseCls=['neo-textfield-label']
98
98
  */
99
- labelCls_: ['neo-textfield-label'],
99
+ labelBaseCls: ['neo-textfield-label'],
100
+ /**
101
+ * @member {String[]} labelCls_=[]
102
+ */
103
+ labelCls_: [],
100
104
  /**
101
105
  * Valid values: 'bottom', 'inline', 'left', 'right', 'top'
102
106
  * @member {String} labelPosition_='left'
@@ -648,6 +652,16 @@ class Text extends Base {
648
652
  return this.beforeSetEnumValue(value, oldValue, 'autoCapitalize', 'autoCapitalizeValues');
649
653
  }
650
654
 
655
+ /**
656
+ * Triggered before the labelCls config gets changed.
657
+ * @param {String[]} value
658
+ * @param {String[]} oldValue
659
+ * @protected
660
+ */
661
+ beforeSetLabelCls(value, oldValue) {
662
+ return NeoArray.union(value || [], this.labelBaseCls);
663
+ }
664
+
651
665
  /**
652
666
  * Triggered before the labelPosition config gets changed
653
667
  * @param {String} value