feedbackkit-web 1.0.49 → 1.0.51
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/feedbackkit.js
CHANGED
|
@@ -1364,6 +1364,39 @@ button:disabled { cursor: not-allowed; opacity: 0.45; }
|
|
|
1364
1364
|
.fk-trigger[data-compact="true"] { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 24px; }
|
|
1365
1365
|
.fk-trigger[data-compact="true"] .fk-trigger-label { display: none; }
|
|
1366
1366
|
.fk-trigger[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
|
|
1367
|
+
.fk-trigger-hint {
|
|
1368
|
+
position: absolute;
|
|
1369
|
+
bottom: calc(100% + 8px);
|
|
1370
|
+
left: 50%;
|
|
1371
|
+
transform: translateX(-50%) translateY(4px);
|
|
1372
|
+
background: rgba(17, 17, 20, 0.92);
|
|
1373
|
+
color: #ffffff;
|
|
1374
|
+
padding: 4px 8px;
|
|
1375
|
+
border-radius: 6px;
|
|
1376
|
+
font-size: 11px;
|
|
1377
|
+
font-weight: 500;
|
|
1378
|
+
line-height: 1.2;
|
|
1379
|
+
white-space: nowrap;
|
|
1380
|
+
pointer-events: none;
|
|
1381
|
+
opacity: 0;
|
|
1382
|
+
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
1383
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
|
|
1384
|
+
letter-spacing: 0.02em;
|
|
1385
|
+
}
|
|
1386
|
+
.fk-trigger-hint::after {
|
|
1387
|
+
content: "";
|
|
1388
|
+
position: absolute;
|
|
1389
|
+
top: 100%;
|
|
1390
|
+
left: 50%;
|
|
1391
|
+
transform: translateX(-50%);
|
|
1392
|
+
border: 4px solid transparent;
|
|
1393
|
+
border-top-color: rgba(17, 17, 20, 0.92);
|
|
1394
|
+
}
|
|
1395
|
+
.fk-trigger:hover .fk-trigger-hint,
|
|
1396
|
+
.fk-trigger:focus-visible .fk-trigger-hint {
|
|
1397
|
+
opacity: 1;
|
|
1398
|
+
transform: translateX(-50%) translateY(0);
|
|
1399
|
+
}
|
|
1367
1400
|
|
|
1368
1401
|
/* ---------- overlay ---------- */
|
|
1369
1402
|
.fk-overlay {
|
|
@@ -1677,7 +1710,7 @@ class Widget {
|
|
|
1677
1710
|
button2.title = `${label} (${shortcutLabel})`;
|
|
1678
1711
|
button2.setAttribute("aria-label", `${label} (${shortcutLabel})`);
|
|
1679
1712
|
button2.setAttribute("aria-keyshortcuts", isMac ? "Meta+Shift+F" : "Control+Shift+F");
|
|
1680
|
-
button2.innerHTML = `${icons.feedback}<span class="fk-trigger-label"></span>`;
|
|
1713
|
+
button2.innerHTML = `${icons.feedback}<span class="fk-trigger-label"></span><span class="fk-trigger-hint" aria-hidden="true">${shortcutLabel}</span>`;
|
|
1681
1714
|
button2.querySelector(".fk-trigger-label").textContent = label;
|
|
1682
1715
|
button2.addEventListener("click", onClick);
|
|
1683
1716
|
shadow.append(button2);
|
|
@@ -1994,7 +2027,7 @@ class Dialog {
|
|
|
1994
2027
|
const summary = el("span", "fk-options-summary");
|
|
1995
2028
|
const renderSummary = () => {
|
|
1996
2029
|
const parts = [];
|
|
1997
|
-
if (!this.
|
|
2030
|
+
if (!this.shot) parts.push("No screenshot");
|
|
1998
2031
|
if (this.notifyReporter) parts.push("Notify me");
|
|
1999
2032
|
summary.textContent = parts.join(" · ");
|
|
2000
2033
|
};
|
|
@@ -2018,16 +2051,6 @@ class Dialog {
|
|
|
2018
2051
|
menu.append(item("Attach file…", () => fileInput.click()));
|
|
2019
2052
|
if (window.matchMedia?.("(pointer: coarse)").matches) menu.append(item("Take photo", () => cameraInput.click()));
|
|
2020
2053
|
menu.append(el("hr", "fk-menu-sep"));
|
|
2021
|
-
if (this.shot) {
|
|
2022
|
-
menu.append(
|
|
2023
|
-
item("Include screenshot", () => {
|
|
2024
|
-
this.includeScreenshot = !this.includeScreenshot;
|
|
2025
|
-
this.stage.dataset.screenshot = this.includeScreenshot ? "on" : "off";
|
|
2026
|
-
renderSummary();
|
|
2027
|
-
this.refreshState();
|
|
2028
|
-
}, this.includeScreenshot)
|
|
2029
|
-
);
|
|
2030
|
-
}
|
|
2031
2054
|
menu.append(
|
|
2032
2055
|
item("Notify me when it's fixed", () => {
|
|
2033
2056
|
this.notifyReporter = !this.notifyReporter;
|
|
@@ -2078,7 +2101,17 @@ class Dialog {
|
|
|
2078
2101
|
this.sendButton.title = "Send (⌘/Ctrl + Enter)";
|
|
2079
2102
|
this.sendButton.addEventListener("click", () => void this.send());
|
|
2080
2103
|
actions.append(cancel, this.sendButton);
|
|
2081
|
-
composer.append(header, textGroup, productsGroup
|
|
2104
|
+
composer.append(header, textGroup, productsGroup);
|
|
2105
|
+
if (this.shot) {
|
|
2106
|
+
composer.append(
|
|
2107
|
+
switchControl("Include screenshot", this.includeScreenshot, (on) => {
|
|
2108
|
+
this.includeScreenshot = on;
|
|
2109
|
+
this.stage.dataset.screenshot = on ? "on" : "off";
|
|
2110
|
+
this.refreshState();
|
|
2111
|
+
})
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
composer.append(optionsRow);
|
|
2082
2115
|
if (meta) composer.append(meta);
|
|
2083
2116
|
composer.append(el("div", "fk-spacer"), this.errorBox, actions);
|
|
2084
2117
|
this.refreshState();
|