@schukai/monster 3.56.1 → 3.57.0
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/CHANGELOG.md +32 -0
- package/example/components/form/toggle-switch.mjs +7 -0
- package/package.json +1 -1
- package/source/components/form/button.mjs +3 -3
- package/source/components/form/select.mjs +1773 -1745
- package/source/components/form/style/select.pcss +1 -1
- package/source/components/form/style/toggle-switch.pcss +74 -0
- package/source/components/form/stylesheet/select.mjs +1 -1
- package/source/components/form/stylesheet/toggle-switch.mjs +27 -0
- package/source/components/form/toggle-switch.mjs +427 -0
- package/source/data/transformer.mjs +33 -1
- package/source/dom/attributes.mjs +1 -1
- package/source/dom/customcontrol.mjs +6 -2
- package/source/dom/customelement.mjs +909 -864
- package/source/dom/updater.mjs +754 -732
- package/source/dom/util/set-option-from-attribute.mjs +2 -1
- package/source/monster.mjs +5 -0
- package/source/types/version.mjs +1 -1
- package/test/cases/components/form/select.mjs +1 -1
- package/test/cases/components/form/toggle-switch.mjs +310 -0
- package/test/cases/components/form/tree-select.mjs +1 -8
- package/test/cases/data/transformer.mjs +16 -0
- package/test/cases/dom/customcontrol.mjs +53 -8
- package/test/cases/dom/customelement-initfromscripthost.mjs +0 -4
- package/test/cases/dom/customelement.mjs +30 -26
- package/test/cases/dom/updater.mjs +14 -3
- package/test/cases/monster.mjs +1 -1
- package/test/util/jsdom.mjs +9 -10
- package/test/web/test.html +2 -2
- package/test/web/tests.js +3044 -1023
@@ -377,7 +377,7 @@ function findClosestByAttribute(element, key, value) {
|
|
377
377
|
}
|
378
378
|
|
379
379
|
/**
|
380
|
-
* This function searches, starting from an `
|
380
|
+
* This function searches, starting from an `HTMLElement`, for the next element that has a certain attribute.
|
381
381
|
*
|
382
382
|
* ```html
|
383
383
|
* <div class="myclass" id="2">
|
@@ -320,9 +320,13 @@ class CustomControl extends CustomElement {
|
|
320
320
|
*/
|
321
321
|
formDisabledCallback(disabled) {
|
322
322
|
if (disabled) {
|
323
|
-
this.
|
323
|
+
if (!this.hasAttribute("disabled")) {
|
324
|
+
this.setAttribute("disabled", "");
|
325
|
+
}
|
324
326
|
} else {
|
325
|
-
this.
|
327
|
+
if (this.hasAttribute("disabled")) {
|
328
|
+
this.removeAttribute("disabled");
|
329
|
+
}
|
326
330
|
}
|
327
331
|
}
|
328
332
|
|