@shortfuse/materialdesignweb 0.7.5 → 0.7.6
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/components/Layout.js +5 -0
- package/components/ListOption.js +4 -0
- package/components/ListSelect.js +7 -3
- package/components/TextArea.js +7 -4
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +2 -2
- package/dist/meta.json +1 -1
- package/package.json +1 -1
package/components/Layout.js
CHANGED
package/components/ListOption.js
CHANGED
|
@@ -149,6 +149,10 @@ export default class ListOption extends ListItem
|
|
|
149
149
|
if (selected !== undefined) {
|
|
150
150
|
this._selected = selected;
|
|
151
151
|
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
connectedCallback() {
|
|
155
|
+
super.connectedCallback();
|
|
152
156
|
if (!this.hasAttribute('tabindex')) {
|
|
153
157
|
this.tabIndex = 0;
|
|
154
158
|
}
|
package/components/ListSelect.js
CHANGED
|
@@ -41,14 +41,18 @@ export default class ListSelect extends List
|
|
|
41
41
|
|
|
42
42
|
constructor() {
|
|
43
43
|
super();
|
|
44
|
-
if (!this.hasAttribute('tabindex')) {
|
|
45
|
-
this.tabIndex = 0;
|
|
46
|
-
}
|
|
47
44
|
this.refs.slot.addEventListener('slotchange', this.onSlotChange);
|
|
48
45
|
this.addEventListener('keydown', this.onControlKeydown);
|
|
49
46
|
this.addEventListener('click', this.onListSelectClick);
|
|
50
47
|
}
|
|
51
48
|
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
super.connectedCallback();
|
|
51
|
+
if (!this.hasAttribute('tabindex')) {
|
|
52
|
+
this.tabIndex = 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
* _selectedOptionsGenerator() {
|
|
53
57
|
for (const el of this.options) {
|
|
54
58
|
if (!el.selected) continue;
|
package/components/TextArea.js
CHANGED
|
@@ -133,7 +133,6 @@ export default CustomElement
|
|
|
133
133
|
|
|
134
134
|
/** @param {ResizeObserverEntry} entry */
|
|
135
135
|
onResizeObserved(entry) {
|
|
136
|
-
super.onResizeObserved(entry);
|
|
137
136
|
if (this.matches(':active')) return;
|
|
138
137
|
this.resize();
|
|
139
138
|
},
|
|
@@ -173,10 +172,8 @@ export default CustomElement
|
|
|
173
172
|
// Custom
|
|
174
173
|
control.setAttribute('input-prefix', '{inputPrefix}');
|
|
175
174
|
control.setAttribute('input-suffix', '{inputSuffix}');
|
|
176
|
-
control.setAttribute('minrows', '{minRows}');
|
|
177
175
|
control.setAttribute('fixed', '{fixed}');
|
|
178
176
|
control.setAttribute('icon', '{icon}');
|
|
179
|
-
control.setAttribute('maxrows', '{maxRows}');
|
|
180
177
|
},
|
|
181
178
|
defaultValueAttrChanged(oldValue, newValue) {
|
|
182
179
|
this.defaultValue = newValue;
|
|
@@ -210,6 +207,8 @@ export default CustomElement
|
|
|
210
207
|
minlength: cloneAttributeCallback('minlength', 'control'),
|
|
211
208
|
maxlength: cloneAttributeCallback('maxlength', 'control'),
|
|
212
209
|
placeholder: cloneAttributeCallback('placeholder', 'control'),
|
|
210
|
+
minrows: cloneAttributeCallback('minrows', 'control'),
|
|
211
|
+
maxrows: cloneAttributeCallback('maxrows', 'control'),
|
|
213
212
|
},
|
|
214
213
|
})
|
|
215
214
|
.css`
|
|
@@ -231,7 +230,11 @@ export default CustomElement
|
|
|
231
230
|
#label {
|
|
232
231
|
--max-rows: none;
|
|
233
232
|
--line-height: var(--mdw-typescale__body-large__line-height);
|
|
234
|
-
--expected-height: calc(
|
|
233
|
+
--expected-height: calc(var(--line-height)
|
|
234
|
+
+ var(--control__margin-top)
|
|
235
|
+
+ var(--control__padding-top)
|
|
236
|
+
+ var(--control__padding-bottom)
|
|
237
|
+
+ var(--control__margin-bottom));
|
|
235
238
|
max-block-size: 100%;
|
|
236
239
|
grid-row: 1 / 1;
|
|
237
240
|
padding: 0;
|