@yourself_id/siwys-react-js 0.34.2-sapp-917.88.0 → 0.35.0

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.mjs CHANGED
@@ -365,8 +365,7 @@ function _templateObject8() {
365
365
  }
366
366
  function _templateObject9() {
367
367
  var data = _tagged_template_literal([
368
- '\n margin: -54px 0 20px;\n max-width: 240px;\n text-align: center;\n font-family: "Inter", sans-serif;\n font-size: 13px;\n line-height: 1.4;\n color: ',
369
- ";\n"
368
+ "\n display: block;\n padding: 0;\n border: none;\n background: none;\n line-height: 0;\n border-radius: 16px;\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: 2px solid #d8ee4f;\n outline-offset: 4px;\n }\n"
370
369
  ]);
371
370
  _templateObject9 = function _templateObject() {
372
371
  return data;
@@ -375,8 +374,8 @@ function _templateObject9() {
375
374
  }
376
375
  function _templateObject10() {
377
376
  var data = _tagged_template_literal([
378
- '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 400;\n font-size: 20px;\n line-height: 95%;\n color: ',
379
- ";\n @media (min-width: 1024px) {\n font-size: 28px;\n }\n"
377
+ '\n margin: -54px 0 20px;\n max-width: 240px;\n text-align: center;\n font-family: "Inter", sans-serif;\n font-size: 13px;\n line-height: 1.4;\n color: ',
378
+ ";\n"
380
379
  ]);
381
380
  _templateObject10 = function _templateObject() {
382
381
  return data;
@@ -385,7 +384,8 @@ function _templateObject10() {
385
384
  }
386
385
  function _templateObject11() {
387
386
  var data = _tagged_template_literal([
388
- "\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 24px;\n"
387
+ '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 400;\n font-size: 20px;\n line-height: 95%;\n color: ',
388
+ ";\n @media (min-width: 1024px) {\n font-size: 28px;\n }\n"
389
389
  ]);
390
390
  _templateObject11 = function _templateObject() {
391
391
  return data;
@@ -394,8 +394,7 @@ function _templateObject11() {
394
394
  }
395
395
  function _templateObject12() {
396
396
  var data = _tagged_template_literal([
397
- '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 600;\n font-size: 16px;\n line-height: 140%;\n letter-spacing: 0.025em;\n color: ',
398
- ";\n"
397
+ "\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 24px;\n"
399
398
  ]);
400
399
  _templateObject12 = function _templateObject() {
401
400
  return data;
@@ -404,7 +403,7 @@ function _templateObject12() {
404
403
  }
405
404
  function _templateObject13() {
406
405
  var data = _tagged_template_literal([
407
- '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.025em;\n margin-bottom: 8px;\n color: ',
406
+ '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 600;\n font-size: 16px;\n line-height: 140%;\n letter-spacing: 0.025em;\n color: ',
408
407
  ";\n"
409
408
  ]);
410
409
  _templateObject13 = function _templateObject() {
@@ -414,7 +413,7 @@ function _templateObject13() {
414
413
  }
415
414
  function _templateObject14() {
416
415
  var data = _tagged_template_literal([
417
- '\n font-family: "Inter", sans-serif;\n list-style-type: decimal;\n padding-left: 20px;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 400;\n font-size: 14px;\n letter-spacing: 0.025em;\n color: ',
416
+ '\n font-family: "Inter", sans-serif;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.025em;\n margin-bottom: 8px;\n color: ',
418
417
  ";\n"
419
418
  ]);
420
419
  _templateObject14 = function _templateObject() {
@@ -424,7 +423,8 @@ function _templateObject14() {
424
423
  }
425
424
  function _templateObject15() {
426
425
  var data = _tagged_template_literal([
427
- "\n margin-bottom: 8px;\n"
426
+ '\n font-family: "Inter", sans-serif;\n list-style-type: decimal;\n padding-left: 20px;\n margin-top: 0px;\n margin-bottom: 0px;\n font-weight: 400;\n font-size: 14px;\n letter-spacing: 0.025em;\n color: ',
427
+ ";\n"
428
428
  ]);
429
429
  _templateObject15 = function _templateObject() {
430
430
  return data;
@@ -433,7 +433,7 @@ function _templateObject15() {
433
433
  }
434
434
  function _templateObject16() {
435
435
  var data = _tagged_template_literal([
436
- "\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n margin-top: 8px;\n margin-bottom: 8px;\n"
436
+ "\n margin-bottom: 8px;\n"
437
437
  ]);
438
438
  _templateObject16 = function _templateObject() {
439
439
  return data;
@@ -442,7 +442,7 @@ function _templateObject16() {
442
442
  }
443
443
  function _templateObject17() {
444
444
  var data = _tagged_template_literal([
445
- "\n display: flex;\n flex-direction: column;\n width: 100%;\n @media (min-width: 1024px) {\n width: auto;\n }\n"
445
+ "\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n margin-top: 8px;\n margin-bottom: 8px;\n"
446
446
  ]);
447
447
  _templateObject17 = function _templateObject() {
448
448
  return data;
@@ -451,7 +451,7 @@ function _templateObject17() {
451
451
  }
452
452
  function _templateObject18() {
453
453
  var data = _tagged_template_literal([
454
- "\n display: flex;\n flex-direction: column;\n background: #121114;\n border: 1px solid #3d414c;\n border-radius: 8px;\n padding: 20px;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n @media (min-width: 1024px) {\n padding-left: 53px;\n padding-right: 53px;\n max-width: 446px;\n }\n }\n"
454
+ "\n display: flex;\n flex-direction: column;\n width: 100%;\n @media (min-width: 1024px) {\n width: auto;\n }\n"
455
455
  ]);
456
456
  _templateObject18 = function _templateObject() {
457
457
  return data;
@@ -460,7 +460,7 @@ function _templateObject18() {
460
460
  }
461
461
  function _templateObject19() {
462
462
  var data = _tagged_template_literal([
463
- "\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n @media (min-width: 1024px) {\n gap: 16px;\n align-items: center;\n }\n"
463
+ "\n display: flex;\n flex-direction: column;\n background: #121114;\n border: 1px solid #3d414c;\n border-radius: 8px;\n padding: 20px;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n @media (min-width: 1024px) {\n padding-left: 53px;\n padding-right: 53px;\n max-width: 446px;\n }\n }\n"
464
464
  ]);
465
465
  _templateObject19 = function _templateObject() {
466
466
  return data;
@@ -469,7 +469,7 @@ function _templateObject19() {
469
469
  }
470
470
  function _templateObject20() {
471
471
  var data = _tagged_template_literal([
472
- '\n font-family: "Inter", sans-serif;\n font-weight: 500;\n margin-top: 0px;\n margin-bottom: 0px;\n font-size: 15px;\n line-height: 126%;\n letter-spacing: 0.025em;\n max-width: 128px;\n color: #ffffff;\n'
472
+ "\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n @media (min-width: 1024px) {\n gap: 16px;\n align-items: center;\n }\n"
473
473
  ]);
474
474
  _templateObject20 = function _templateObject() {
475
475
  return data;
@@ -478,7 +478,7 @@ function _templateObject20() {
478
478
  }
479
479
  function _templateObject21() {
480
480
  var data = _tagged_template_literal([
481
- "\n display: flex;\n flex-direction: row;\n gap: 8px;\n @media (min-width: 1024px) {\n gap: 16px;\n }\n"
481
+ '\n font-family: "Inter", sans-serif;\n font-weight: 500;\n margin-top: 0px;\n margin-bottom: 0px;\n font-size: 15px;\n line-height: 126%;\n letter-spacing: 0.025em;\n max-width: 128px;\n color: #ffffff;\n'
482
482
  ]);
483
483
  _templateObject21 = function _templateObject() {
484
484
  return data;
@@ -487,8 +487,7 @@ function _templateObject21() {
487
487
  }
488
488
  function _templateObject22() {
489
489
  var data = _tagged_template_literal([
490
- "\n margin: 0;\n color: ",
491
- ';\n font-family: "Inter", sans-serif;\n font-size: 14px;\n text-align: center;\n'
490
+ "\n display: flex;\n flex-direction: row;\n gap: 8px;\n @media (min-width: 1024px) {\n gap: 16px;\n }\n"
492
491
  ]);
493
492
  _templateObject22 = function _templateObject() {
494
493
  return data;
@@ -496,11 +495,21 @@ function _templateObject22() {
496
495
  return data;
497
496
  }
498
497
  function _templateObject23() {
498
+ var data = _tagged_template_literal([
499
+ "\n margin: 0;\n color: ",
500
+ ';\n font-family: "Inter", sans-serif;\n font-size: 14px;\n text-align: center;\n'
501
+ ]);
502
+ _templateObject23 = function _templateObject() {
503
+ return data;
504
+ };
505
+ return data;
506
+ }
507
+ function _templateObject24() {
499
508
  var data = _tagged_template_literal([
500
509
  "\n width: 28px;\n height: 28px;\n margin: 24px 0 70px;\n border: 3px solid\n ",
501
510
  ";\n border-top-color: transparent;\n border-radius: 50%;\n animation: siwys-challenge-spin 0.8s linear infinite;\n\n @keyframes siwys-challenge-spin {\n to {\n transform: rotate(360deg);\n }\n }\n"
502
511
  ]);
503
- _templateObject23 = function _templateObject() {
512
+ _templateObject24 = function _templateObject() {
504
513
  return data;
505
514
  };
506
515
  return data;
@@ -1318,29 +1327,30 @@ var QRContainer = styled4.div(_templateObject8(), function(props) {
1318
1327
  }, function(props) {
1319
1328
  return props.$highlight ? props.$theme === "dark" ? "outline: 2px solid #0f0f10; outline-offset: 10px;" : "box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35); border-radius: 20px;" : "";
1320
1329
  });
1321
- var ExtensionUnavailableNotice = styled4.p(_templateObject9(), function(props) {
1330
+ var QRButton = styled4.button(_templateObject9());
1331
+ var ExtensionUnavailableNotice = styled4.p(_templateObject10(), function(props) {
1322
1332
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1323
1333
  });
1324
- var Title = styled4.h4(_templateObject10(), function(props) {
1334
+ var Title = styled4.h4(_templateObject11(), function(props) {
1325
1335
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1326
1336
  });
1327
- var InstructionsContainer = styled4.div(_templateObject11());
1328
- var InstructionsTitle = styled4.h4(_templateObject12(), function(props) {
1337
+ var InstructionsContainer = styled4.div(_templateObject12());
1338
+ var InstructionsTitle = styled4.h4(_templateObject13(), function(props) {
1329
1339
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1330
1340
  });
1331
- var InstructionsSubtitle = styled4.p(_templateObject13(), function(props) {
1341
+ var InstructionsSubtitle = styled4.p(_templateObject14(), function(props) {
1332
1342
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1333
1343
  });
1334
- var InstructionsDescription = styled4.ul(_templateObject14(), function(props) {
1344
+ var InstructionsDescription = styled4.ul(_templateObject15(), function(props) {
1335
1345
  return props.$theme === "dark" ? "#292D36" : "#c4ccd4";
1336
1346
  });
1337
- var InstructionsDescriptionItem = styled4.li(_templateObject15());
1338
- var DownloadTitleContainer = styled4.div(_templateObject16());
1339
- var ParentDownloadContainer = styled4.div(_templateObject17());
1340
- var DownloadContainer = styled4.div(_templateObject18());
1341
- var DownloadContainerFlex = styled4.div(_templateObject19());
1342
- var DownloadAppTitle = styled4.p(_templateObject20());
1343
- var AppIconsContainer = styled4.div(_templateObject21());
1347
+ var InstructionsDescriptionItem = styled4.li(_templateObject16());
1348
+ var DownloadTitleContainer = styled4.div(_templateObject17());
1349
+ var ParentDownloadContainer = styled4.div(_templateObject18());
1350
+ var DownloadContainer = styled4.div(_templateObject19());
1351
+ var DownloadContainerFlex = styled4.div(_templateObject20());
1352
+ var DownloadAppTitle = styled4.p(_templateObject21());
1353
+ var AppIconsContainer = styled4.div(_templateObject22());
1344
1354
  var REPLACE_CHALLENGE_CODES = [
1345
1355
  EXTENSION_ERROR_CODE.expired,
1346
1356
  EXTENSION_ERROR_CODE.timedOut
@@ -1456,10 +1466,10 @@ function readSignInSession(value, options) {
1456
1466
  did: typeof did === "string" ? did : void 0
1457
1467
  };
1458
1468
  }
1459
- var ChallengeMessage = styled4.p(_templateObject22(), function(props) {
1469
+ var ChallengeMessage = styled4.p(_templateObject23(), function(props) {
1460
1470
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1461
1471
  });
1462
- var ChallengeSpinner = styled4.div(_templateObject23(), function(props) {
1472
+ var ChallengeSpinner = styled4.div(_templateObject24(), function(props) {
1463
1473
  return props.$theme === "dark" ? "#0F0F10" : "#ffffff";
1464
1474
  });
1465
1475
  var SignInWithYourSelf = function SignInWithYourSelf(param) {
@@ -1800,11 +1810,16 @@ var SignInWithYourSelf = function SignInWithYourSelf(param) {
1800
1810
  $theme: theme,
1801
1811
  $highlight: shouldHighlightQrFallback,
1802
1812
  "data-testid": "qr-container"
1813
+ }, /* @__PURE__ */ React19.createElement(QRButton, {
1814
+ type: "button",
1815
+ onClick: defaultSiwysClick,
1816
+ disabled: isExtensionRequestActive || isReplacingChallenge,
1817
+ "aria-label": "Open the challenge in the SELF app or extension"
1803
1818
  }, /* @__PURE__ */ React19.createElement(QrCode_default, {
1804
1819
  challengeUrl: challengeUrl,
1805
1820
  size: 200,
1806
1821
  level: "H"
1807
- })), shouldHighlightQrFallback && /* @__PURE__ */ React19.createElement(ExtensionUnavailableNotice, {
1822
+ }))), shouldHighlightQrFallback && /* @__PURE__ */ React19.createElement(ExtensionUnavailableNotice, {
1808
1823
  $theme: theme,
1809
1824
  role: "status"
1810
1825
  }, "SELF browser extension not detected. Scan this QR with the SELF app or install the extension."), isCYS ? /* @__PURE__ */ React19.createElement(CysButton, {