smartcomply-web-sdk 1.0.71 → 1.0.73

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.
@@ -6508,38 +6508,44 @@ var SmartComplySDK = (() => {
6508
6508
  `;
6509
6509
  stepBadge.textContent = "STEP 1 OF 2 · CHECK THE PHOTO";
6510
6510
  this.root.appendChild(stepBadge);
6511
+ const imgWrap = document.createElement("div");
6512
+ imgWrap.style.cssText = "position:relative;width:100%;";
6511
6513
  const img = document.createElement("img");
6512
6514
  let currentUrl = URL.createObjectURL(imageData);
6513
6515
  img.src = currentUrl;
6514
6516
  img.style.cssText = `
6515
- width:100%;max-height:300px;object-fit:contain;border-radius:${RADIUS.md}px;
6516
- border:2px solid ${theme.border};
6517
+ display:block;width:100%;max-height:300px;object-fit:contain;
6518
+ border-radius:${RADIUS.md}px;border:2px solid ${theme.border};
6519
+ background:${theme.inputBg};
6517
6520
  `;
6518
- this.root.appendChild(img);
6521
+ imgWrap.appendChild(img);
6519
6522
  let currentBlob = imageData;
6520
6523
  let isRotating = false;
6521
- const label = document.createElement("div");
6522
- label.style.cssText = `color:${theme.text};font-size:${TYPE.base}px;font-weight:700;text-align:center;`;
6523
- label.textContent = "Does the photo look clear?";
6524
- this.root.appendChild(label);
6525
- const sublabel = document.createElement("div");
6526
- sublabel.style.cssText = `color:${theme.textMuted};font-size:${TYPE.xs}px;text-align:center;line-height:1.6;`;
6527
- sublabel.textContent = "All text must be readable and all four corners must be visible.";
6528
- this.root.appendChild(sublabel);
6529
6524
  const rotateBtn = document.createElement("button");
6530
6525
  rotateBtn.type = "button";
6531
- rotateBtn.setAttribute("aria-label", "Rotate photo 90 degrees");
6526
+ rotateBtn.setAttribute("aria-label", "Photo sideways or upside-down? Rotate it 90 degrees");
6527
+ rotateBtn.title = "Rotate 90°";
6532
6528
  rotateBtn.style.cssText = `
6529
+ position:absolute;bottom:10px;right:10px;
6533
6530
  display:flex;align-items:center;justify-content:center;gap:6px;
6534
- margin:0 auto;padding:8px 16px;background:transparent;
6535
- color:${theme.textSecondary};border:1.5px solid ${theme.border};
6531
+ padding:8px 14px;background:${theme.isDark ? "rgba(20,20,20,0.72)" : "rgba(255,255,255,0.92)"};
6532
+ backdrop-filter:blur(6px);color:${theme.text};border:1px solid ${theme.border};
6536
6533
  border-radius:${RADIUS.pill}px;cursor:pointer;
6537
- font-size:12.5px;font-weight:600;font-family:inherit;
6534
+ box-shadow:0 2px 10px rgba(0,0,0,${theme.isDark ? "0.4" : "0.15"});
6535
+ font-size:12.5px;font-weight:600;font-family:inherit;line-height:1;
6536
+ transition:transform 0.15s ease,opacity 0.15s ease;
6538
6537
  `;
6539
6538
  rotateBtn.innerHTML = `<span style="display:inline-flex;">${icon("rotate", 15)}</span><span>Rotate</span>`;
6539
+ rotateBtn.addEventListener("mouseenter", () => {
6540
+ rotateBtn.style.transform = "translateY(-1px)";
6541
+ });
6542
+ rotateBtn.addEventListener("mouseleave", () => {
6543
+ rotateBtn.style.transform = "translateY(0)";
6544
+ });
6540
6545
  rotateBtn.addEventListener("click", async () => {
6541
6546
  if (isRotating) return;
6542
6547
  isRotating = true;
6548
+ rotateBtn.style.opacity = "0.5";
6543
6549
  rotateBtn.disabled = true;
6544
6550
  try {
6545
6551
  const rotated = await this._rotateImage(currentBlob, 90);
@@ -6551,10 +6557,20 @@ var SmartComplySDK = (() => {
6551
6557
  } catch {
6552
6558
  } finally {
6553
6559
  isRotating = false;
6560
+ rotateBtn.style.opacity = "1";
6554
6561
  rotateBtn.disabled = false;
6555
6562
  }
6556
6563
  });
6557
- this.root.appendChild(rotateBtn);
6564
+ imgWrap.appendChild(rotateBtn);
6565
+ this.root.appendChild(imgWrap);
6566
+ const label = document.createElement("div");
6567
+ label.style.cssText = `color:${theme.text};font-size:${TYPE.base}px;font-weight:700;text-align:center;`;
6568
+ label.textContent = "Does the photo look clear?";
6569
+ this.root.appendChild(label);
6570
+ const sublabel = document.createElement("div");
6571
+ sublabel.style.cssText = `color:${theme.textMuted};font-size:${TYPE.xs}px;text-align:center;line-height:1.6;`;
6572
+ sublabel.textContent = "All text must be readable and all four corners must be visible. Sideways or upside-down? Use Rotate on the photo above.";
6573
+ this.root.appendChild(sublabel);
6558
6574
  const qualityNotice = document.createElement("div");
6559
6575
  qualityNotice.style.cssText = `
6560
6576
  display:none;width:100%;padding:10px 14px;border-radius:${RADIUS.md}px;