@orion-studios/payload-studio 0.6.0-beta.144 → 0.6.0-beta.145
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.
|
@@ -1479,7 +1479,9 @@ var decorateBuilderTraitToggles = () => {
|
|
|
1479
1479
|
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1480
1480
|
input.setAttribute("role", "switch");
|
|
1481
1481
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1482
|
-
const
|
|
1482
|
+
const labelText = trait?.querySelector(".gjs-trt-trait__label, .gjs-label")?.textContent?.trim();
|
|
1483
|
+
const traitName = input.getAttribute("name") || input.id || "";
|
|
1484
|
+
const description = input.dataset.orionTraitDescription || (traitName.includes("pause-on-hover") || labelText === "Pause on hover" ? "Stop scrolling while visitors hover over the banner." : "");
|
|
1483
1485
|
const labelWrapper = trait?.querySelector(".gjs-label-wrp");
|
|
1484
1486
|
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1485
1487
|
const small = document.createElement("small");
|
|
@@ -1355,7 +1355,9 @@ var decorateBuilderTraitToggles = () => {
|
|
|
1355
1355
|
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1356
1356
|
input.setAttribute("role", "switch");
|
|
1357
1357
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1358
|
-
const
|
|
1358
|
+
const labelText = trait?.querySelector(".gjs-trt-trait__label, .gjs-label")?.textContent?.trim();
|
|
1359
|
+
const traitName = input.getAttribute("name") || input.id || "";
|
|
1360
|
+
const description = input.dataset.orionTraitDescription || (traitName.includes("pause-on-hover") || labelText === "Pause on hover" ? "Stop scrolling while visitors hover over the banner." : "");
|
|
1359
1361
|
const labelWrapper = trait?.querySelector(".gjs-label-wrp");
|
|
1360
1362
|
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1361
1363
|
const small = document.createElement("small");
|
package/package.json
CHANGED