@orion-studios/payload-studio 0.6.0-beta.144 → 0.6.0-beta.146
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,8 +1479,21 @@ 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");
|
|
1486
|
+
const label = trait?.querySelector(".gjs-trt-trait__label, .gjs-label");
|
|
1487
|
+
if (description && label && !label.querySelector(":scope > .orion-builder-v2-help-trigger")) {
|
|
1488
|
+
const trigger = document.createElement("button");
|
|
1489
|
+
trigger.type = "button";
|
|
1490
|
+
trigger.className = "orion-builder-v2-help-trigger";
|
|
1491
|
+
trigger.dataset.builderHelpText = description;
|
|
1492
|
+
trigger.setAttribute("aria-label", `About ${labelText || "setting"}`);
|
|
1493
|
+
trigger.tabIndex = -1;
|
|
1494
|
+
trigger.textContent = "?";
|
|
1495
|
+
label.appendChild(trigger);
|
|
1496
|
+
}
|
|
1484
1497
|
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1485
1498
|
const small = document.createElement("small");
|
|
1486
1499
|
small.textContent = description;
|
|
@@ -1355,8 +1355,21 @@ 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");
|
|
1362
|
+
const label = trait?.querySelector(".gjs-trt-trait__label, .gjs-label");
|
|
1363
|
+
if (description && label && !label.querySelector(":scope > .orion-builder-v2-help-trigger")) {
|
|
1364
|
+
const trigger = document.createElement("button");
|
|
1365
|
+
trigger.type = "button";
|
|
1366
|
+
trigger.className = "orion-builder-v2-help-trigger";
|
|
1367
|
+
trigger.dataset.builderHelpText = description;
|
|
1368
|
+
trigger.setAttribute("aria-label", `About ${labelText || "setting"}`);
|
|
1369
|
+
trigger.tabIndex = -1;
|
|
1370
|
+
trigger.textContent = "?";
|
|
1371
|
+
label.appendChild(trigger);
|
|
1372
|
+
}
|
|
1360
1373
|
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1361
1374
|
const small = document.createElement("small");
|
|
1362
1375
|
small.textContent = description;
|
|
@@ -1183,6 +1183,7 @@
|
|
|
1183
1183
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait {
|
|
1184
1184
|
display: flex !important;
|
|
1185
1185
|
margin-bottom: 8px !important;
|
|
1186
|
+
padding: 10px 12px !important;
|
|
1186
1187
|
position: relative;
|
|
1187
1188
|
width: 100% !important;
|
|
1188
1189
|
}
|
package/package.json
CHANGED