@jungherz-de/glasskit-elements 1.22.1 → 1.22.3

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.
@@ -3,7 +3,7 @@ import '@jungherz-de/glasskit/glasskit-styles.js';
3
3
 
4
4
  class GlkTextarea extends GlkFormElement {
5
5
  static get observedAttributes() {
6
- return ['label', 'placeholder', 'rows', 'disabled', 'readonly', 'name', 'value', 'required'];
6
+ return ['label', 'placeholder', 'rows', 'readonly', 'name', 'value', 'required'];
7
7
  }
8
8
 
9
9
  render() {
@@ -28,7 +28,6 @@ class GlkTextarea extends GlkFormElement {
28
28
  this._pendingValue = undefined;
29
29
  if (value) this._textarea.value = value;
30
30
 
31
- if (this.getBoolAttr('disabled')) this._textarea.disabled = true;
32
31
  if (this.getBoolAttr('readonly')) this._textarea.readOnly = true;
33
32
  if (this.getBoolAttr('required')) this._textarea.required = true;
34
33
 
@@ -64,9 +63,6 @@ class GlkTextarea extends GlkFormElement {
64
63
  case 'rows':
65
64
  this._textarea.setAttribute('rows', this.getAttribute('rows') || '');
66
65
  break;
67
- case 'disabled':
68
- this._textarea.disabled = this.getBoolAttr('disabled');
69
- break;
70
66
  case 'readonly':
71
67
  this._textarea.readOnly = this.getBoolAttr('readonly');
72
68
  break;
@@ -83,6 +79,8 @@ class GlkTextarea extends GlkFormElement {
83
79
  }
84
80
  }
85
81
 
82
+ applyDisabled(disabled) { this._textarea.disabled = disabled; }
83
+
86
84
  get _validityField() { return this._textarea; }
87
85
 
88
86
  _syncFormValue() {
@@ -104,9 +102,6 @@ class GlkTextarea extends GlkFormElement {
104
102
  this._syncFormValue();
105
103
  }
106
104
 
107
- get disabled() { return this.getBoolAttr('disabled'); }
108
- set disabled(v) { this.setBoolAttr('disabled', v); }
109
-
110
105
  get readOnly() { return this.getBoolAttr('readonly'); }
111
106
  set readOnly(v) { this.setBoolAttr('readonly', v); }
112
107
  }
@@ -3,7 +3,7 @@ import '@jungherz-de/glasskit/glasskit-styles.js';
3
3
 
4
4
  class GlkToggle extends GlkFormElement {
5
5
  static get observedAttributes() {
6
- return ['checked', 'disabled', 'label', 'name', 'value', 'required'];
6
+ return ['checked', 'label', 'name', 'value', 'required'];
7
7
  }
8
8
 
9
9
  static get hostStyles() { return checkControlSheet; }
@@ -35,7 +35,6 @@ class GlkToggle extends GlkFormElement {
35
35
  label.appendChild(this._labelEl);
36
36
 
37
37
  if (this.getBoolAttr('checked')) this._input.checked = true;
38
- if (this.getBoolAttr('disabled')) this._input.disabled = true;
39
38
  if (this.getBoolAttr('required')) this._input.required = true;
40
39
 
41
40
  this._defaultChecked = this.getBoolAttr('checked');
@@ -70,9 +69,6 @@ class GlkToggle extends GlkFormElement {
70
69
  this._input.checked = this.getBoolAttr('checked');
71
70
  this._syncFormValue();
72
71
  break;
73
- case 'disabled':
74
- this._input.disabled = this.getBoolAttr('disabled');
75
- break;
76
72
  case 'label':
77
73
  this._labelEl.textContent = this.getAttribute('label') || '';
78
74
  break;
@@ -85,6 +81,8 @@ class GlkToggle extends GlkFormElement {
85
81
  }
86
82
  }
87
83
 
84
+ applyDisabled(disabled) { this._input.disabled = disabled; }
85
+
88
86
  get _validityField() { return this._input; }
89
87
 
90
88
  _syncFormValue() {
@@ -113,9 +111,6 @@ class GlkToggle extends GlkFormElement {
113
111
  if (this._input) this._syncFormValue();
114
112
  }
115
113
 
116
- get disabled() { return this.getBoolAttr('disabled'); }
117
- set disabled(v) { this.setBoolAttr('disabled', v); }
118
-
119
114
  get name() { return this.getAttribute('name'); }
120
115
  set name(v) { this.setAttribute('name', v); }
121
116