@orion-studios/payload-studio 0.6.0-beta.143 → 0.6.0-beta.144
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.
|
@@ -1126,7 +1126,11 @@ var registerProjectDynamicComponents = (editor, adapter) => {
|
|
|
1126
1126
|
options: trait.options,
|
|
1127
1127
|
placeholder: trait.placeholder,
|
|
1128
1128
|
type: trait.type,
|
|
1129
|
-
...trait.type === "checkbox" ? {
|
|
1129
|
+
...trait.type === "checkbox" ? {
|
|
1130
|
+
attributes: trait.description ? { "data-orion-trait-description": trait.description } : void 0,
|
|
1131
|
+
valueFalse: "false",
|
|
1132
|
+
valueTrue: "true"
|
|
1133
|
+
} : {}
|
|
1130
1134
|
}))
|
|
1131
1135
|
]
|
|
1132
1136
|
}
|
|
@@ -1471,15 +1475,31 @@ var decorateBuilderTraitToggles = () => {
|
|
|
1471
1475
|
}
|
|
1472
1476
|
traitsRoot.querySelectorAll('input[type="checkbox"]').forEach((input) => {
|
|
1473
1477
|
const trait = input.closest(".gjs-trt-trait");
|
|
1474
|
-
trait?.classList.add("has-orion-builder-toggle-trait");
|
|
1478
|
+
trait?.classList.add("has-orion-builder-toggle-trait", "orion-builder-v2-toggle");
|
|
1479
|
+
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1475
1480
|
input.setAttribute("role", "switch");
|
|
1476
1481
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1482
|
+
const description = input.dataset.orionTraitDescription;
|
|
1483
|
+
const labelWrapper = trait?.querySelector(".gjs-label-wrp");
|
|
1484
|
+
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1485
|
+
const small = document.createElement("small");
|
|
1486
|
+
small.textContent = description;
|
|
1487
|
+
labelWrapper.appendChild(small);
|
|
1488
|
+
}
|
|
1477
1489
|
if (input.dataset.orionToggleBound === "true") {
|
|
1478
1490
|
return;
|
|
1479
1491
|
}
|
|
1480
1492
|
input.dataset.orionToggleBound = "true";
|
|
1493
|
+
trait?.addEventListener("click", (event) => {
|
|
1494
|
+
if (event.target === input) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
event.preventDefault();
|
|
1498
|
+
input.click();
|
|
1499
|
+
});
|
|
1481
1500
|
input.addEventListener("change", () => {
|
|
1482
1501
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1502
|
+
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1483
1503
|
});
|
|
1484
1504
|
});
|
|
1485
1505
|
};
|
|
@@ -1002,7 +1002,11 @@ var registerProjectDynamicComponents = (editor, adapter) => {
|
|
|
1002
1002
|
options: trait.options,
|
|
1003
1003
|
placeholder: trait.placeholder,
|
|
1004
1004
|
type: trait.type,
|
|
1005
|
-
...trait.type === "checkbox" ? {
|
|
1005
|
+
...trait.type === "checkbox" ? {
|
|
1006
|
+
attributes: trait.description ? { "data-orion-trait-description": trait.description } : void 0,
|
|
1007
|
+
valueFalse: "false",
|
|
1008
|
+
valueTrue: "true"
|
|
1009
|
+
} : {}
|
|
1006
1010
|
}))
|
|
1007
1011
|
]
|
|
1008
1012
|
}
|
|
@@ -1347,15 +1351,31 @@ var decorateBuilderTraitToggles = () => {
|
|
|
1347
1351
|
}
|
|
1348
1352
|
traitsRoot.querySelectorAll('input[type="checkbox"]').forEach((input) => {
|
|
1349
1353
|
const trait = input.closest(".gjs-trt-trait");
|
|
1350
|
-
trait?.classList.add("has-orion-builder-toggle-trait");
|
|
1354
|
+
trait?.classList.add("has-orion-builder-toggle-trait", "orion-builder-v2-toggle");
|
|
1355
|
+
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1351
1356
|
input.setAttribute("role", "switch");
|
|
1352
1357
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1358
|
+
const description = input.dataset.orionTraitDescription;
|
|
1359
|
+
const labelWrapper = trait?.querySelector(".gjs-label-wrp");
|
|
1360
|
+
if (description && labelWrapper && !labelWrapper.querySelector(":scope > small")) {
|
|
1361
|
+
const small = document.createElement("small");
|
|
1362
|
+
small.textContent = description;
|
|
1363
|
+
labelWrapper.appendChild(small);
|
|
1364
|
+
}
|
|
1353
1365
|
if (input.dataset.orionToggleBound === "true") {
|
|
1354
1366
|
return;
|
|
1355
1367
|
}
|
|
1356
1368
|
input.dataset.orionToggleBound = "true";
|
|
1369
|
+
trait?.addEventListener("click", (event) => {
|
|
1370
|
+
if (event.target === input) {
|
|
1371
|
+
return;
|
|
1372
|
+
}
|
|
1373
|
+
event.preventDefault();
|
|
1374
|
+
input.click();
|
|
1375
|
+
});
|
|
1357
1376
|
input.addEventListener("change", () => {
|
|
1358
1377
|
input.setAttribute("aria-checked", input.checked ? "true" : "false");
|
|
1378
|
+
trait?.setAttribute("aria-pressed", input.checked ? "true" : "false");
|
|
1359
1379
|
});
|
|
1360
1380
|
});
|
|
1361
1381
|
};
|
|
@@ -1181,25 +1181,15 @@
|
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
1183
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait {
|
|
1184
|
-
align-items: center;
|
|
1185
|
-
background: #fffdf9;
|
|
1186
|
-
border: 1px solid #e4c6b3;
|
|
1187
|
-
border-radius: 10px;
|
|
1188
|
-
box-sizing: border-box;
|
|
1189
1184
|
display: flex !important;
|
|
1190
|
-
justify-content: space-between;
|
|
1191
1185
|
margin-bottom: 8px !important;
|
|
1192
|
-
|
|
1193
|
-
padding: 10px 12px;
|
|
1194
|
-
transition:
|
|
1195
|
-
border-color 160ms ease,
|
|
1196
|
-
box-shadow 160ms ease;
|
|
1186
|
+
position: relative;
|
|
1197
1187
|
width: 100% !important;
|
|
1198
1188
|
}
|
|
1199
1189
|
|
|
1200
|
-
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait:
|
|
1201
|
-
|
|
1202
|
-
|
|
1190
|
+
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait:focus-within {
|
|
1191
|
+
outline: 2px solid rgba(35, 54, 84, 0.32);
|
|
1192
|
+
outline-offset: 2px;
|
|
1203
1193
|
}
|
|
1204
1194
|
|
|
1205
1195
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait .gjs-trt-trait__wrp,
|
|
@@ -1218,15 +1208,28 @@
|
|
|
1218
1208
|
|
|
1219
1209
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait .gjs-trt-trait__label,
|
|
1220
1210
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait .gjs-label {
|
|
1221
|
-
|
|
1211
|
+
align-items: center;
|
|
1212
|
+
display: flex !important;
|
|
1222
1213
|
font-size: 0.78rem !important;
|
|
1223
1214
|
font-weight: 900 !important;
|
|
1215
|
+
gap: 8px;
|
|
1216
|
+
justify-content: flex-start;
|
|
1224
1217
|
line-height: 1.2 !important;
|
|
1225
1218
|
margin: 0 !important;
|
|
1219
|
+
position: relative;
|
|
1226
1220
|
width: auto !important;
|
|
1227
1221
|
white-space: normal !important;
|
|
1228
1222
|
}
|
|
1229
1223
|
|
|
1224
|
+
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait .gjs-label-wrp small {
|
|
1225
|
+
color: var(--builder-v2-muted);
|
|
1226
|
+
display: block;
|
|
1227
|
+
font-size: 0.68rem;
|
|
1228
|
+
font-weight: 700;
|
|
1229
|
+
line-height: 1.3;
|
|
1230
|
+
margin-top: 2px;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1230
1233
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait .gjs-field {
|
|
1231
1234
|
background: transparent !important;
|
|
1232
1235
|
border: 0 !important;
|
|
@@ -1241,34 +1244,20 @@
|
|
|
1241
1244
|
|
|
1242
1245
|
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait input[type='checkbox'] {
|
|
1243
1246
|
appearance: none;
|
|
1244
|
-
|
|
1245
|
-
border:
|
|
1246
|
-
border-radius: 999px;
|
|
1247
|
-
box-shadow: none;
|
|
1248
|
-
box-sizing: border-box;
|
|
1247
|
+
border: 0 !important;
|
|
1248
|
+
border-radius: 10px;
|
|
1249
1249
|
cursor: pointer;
|
|
1250
1250
|
display: block;
|
|
1251
|
-
|
|
1251
|
+
inset: 0;
|
|
1252
|
+
height: 100% !important;
|
|
1252
1253
|
margin: 0 !important;
|
|
1253
1254
|
max-width: none !important;
|
|
1254
1255
|
min-height: 0 !important;
|
|
1255
1256
|
min-width: 0 !important;
|
|
1257
|
+
opacity: 0;
|
|
1256
1258
|
padding: 0 !important;
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
border-color 0.15s ease,
|
|
1260
|
-
box-shadow 0.15s ease;
|
|
1261
|
-
width: 34px !important;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait input[type='checkbox']:checked {
|
|
1265
|
-
background: radial-gradient(circle at calc(100% - 8px) 50%, #ffffff 0 6px, transparent 6.5px), var(--builder-v2-accent);
|
|
1266
|
-
border-color: rgba(255, 255, 255, 0.72) !important;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
.orion-builder-v2-inspector #orion-builder-v2-traits .gjs-trt-trait.has-orion-builder-toggle-trait input[type='checkbox']:focus-visible {
|
|
1270
|
-
outline: 2px solid rgba(35, 54, 84, 0.32) !important;
|
|
1271
|
-
outline-offset: 3px;
|
|
1259
|
+
position: absolute;
|
|
1260
|
+
width: 100% !important;
|
|
1272
1261
|
}
|
|
1273
1262
|
|
|
1274
1263
|
.orion-builder-v2-editor .gjs-sm-sectors {
|
package/package.json
CHANGED