@broberg/cms-inline-edit 0.6.0 → 0.6.1
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/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -291,10 +291,12 @@ function showIdlePill() {
|
|
|
291
291
|
removeIdlePill();
|
|
292
292
|
const wrap = document.createElement("div");
|
|
293
293
|
wrap.setAttribute("data-cms-inline-edit-idle", "");
|
|
294
|
+
wrap.setAttribute("data-testid", "inline-edit-idle");
|
|
294
295
|
wrap.style.cssText = "position:fixed;bottom:16px;left:16px;display:inline-flex;align-items:stretch;z-index:2147483647;box-shadow:0 4px 16px rgba(0,0,0,.3);border-radius:999px;overflow:hidden;";
|
|
295
296
|
const edit = document.createElement("button");
|
|
296
297
|
edit.type = "button";
|
|
297
298
|
edit.setAttribute("data-cms-inline-edit-enter", "");
|
|
299
|
+
edit.setAttribute("data-testid", "inline-edit-enter");
|
|
298
300
|
edit.style.cssText = "display:inline-flex;align-items:center;gap:7px;background:#1c2027;color:#fff;font:600 12px system-ui,sans-serif;padding:8px 14px;border:none;cursor:pointer;";
|
|
299
301
|
const editText = document.createElement("span");
|
|
300
302
|
editText.textContent = options.connectLabel;
|
|
@@ -303,6 +305,7 @@ function showIdlePill() {
|
|
|
303
305
|
const out = document.createElement("button");
|
|
304
306
|
out.type = "button";
|
|
305
307
|
out.setAttribute("data-cms-inline-edit-logout", "");
|
|
308
|
+
out.setAttribute("data-testid", "inline-edit-logout");
|
|
306
309
|
out.textContent = options.logoutLabel;
|
|
307
310
|
out.style.cssText = "background:#141821;color:#9aa4b2;font:600 11px system-ui,sans-serif;padding:8px 12px;border:none;border-left:1px solid rgba(255,255,255,.12);cursor:pointer;";
|
|
308
311
|
out.addEventListener("click", () => {
|
|
@@ -1137,6 +1140,7 @@ function showPill(el, state) {
|
|
|
1137
1140
|
if (!pill) {
|
|
1138
1141
|
pill = document.createElement("span");
|
|
1139
1142
|
pill.setAttribute("data-cms-inline-edit-pill", "");
|
|
1143
|
+
pill.setAttribute("data-testid", "inline-edit-pill");
|
|
1140
1144
|
document.body.appendChild(pill);
|
|
1141
1145
|
pills.set(el, pill);
|
|
1142
1146
|
}
|
|
@@ -1164,6 +1168,7 @@ function showActiveBadge(options) {
|
|
|
1164
1168
|
const badge = document.createElement("button");
|
|
1165
1169
|
badge.type = "button";
|
|
1166
1170
|
badge.setAttribute("data-cms-inline-edit-badge", "");
|
|
1171
|
+
badge.setAttribute("data-testid", "inline-edit-badge");
|
|
1167
1172
|
badge.style.cssText = "position:fixed;bottom:16px;left:16px;display:inline-flex;align-items:center;gap:7px;background:#1c2027;color:#fff;font:600 12px system-ui,sans-serif;padding:8px 14px;border-radius:999px;z-index:2147483647;box-shadow:0 4px 16px rgba(0,0,0,.3);border:none;cursor:pointer;opacity:.9;transition:opacity .15s;";
|
|
1168
1173
|
const text = document.createElement("span");
|
|
1169
1174
|
text.textContent = options.disconnectLabel;
|