@pelican-identity/react 2.0.9 → 2.0.11
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/components/PelicanAuth.d.ts.map +1 -1
- package/dist/components/PelicanAuth.js +369 -34
- package/dist/components/PelicanAuth.js.map +1 -1
- package/dist/components/PelicanButton.d.ts.map +1 -1
- package/dist/components/PelicanButton.js +34 -0
- package/dist/components/PelicanButton.js.map +1 -0
- package/dist/index.js +517 -178
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +518 -179
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/components/PelicanAuth.d.ts +0 -5
- package/dist/hooks/usePelicanAuth.d.ts.map +0 -1
- package/dist/index.css +0 -397
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -9,59 +9,62 @@ var PelicanButton = ({
|
|
|
9
9
|
authType,
|
|
10
10
|
text
|
|
11
11
|
}) => {
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13
|
-
"
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
border: "1px solid #353535ff"
|
|
26
|
-
},
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29
|
-
"svg",
|
|
30
|
-
{
|
|
31
|
-
width: "28",
|
|
32
|
-
height: "28",
|
|
33
|
-
viewBox: "0 0 100 100",
|
|
34
|
-
fill: "none",
|
|
35
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
-
role: "img",
|
|
37
|
-
"aria-label": "Pelican logo",
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100", height: "100", rx: "32", fill: "#121212" }),
|
|
40
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41
|
-
"path",
|
|
42
|
-
{
|
|
43
|
-
d: "M56.5511 56.8089C56.5705 55.5878 57.5734 54.0696 58.7917 53.4254C60.0572 52.7596 61.0322 53.2324 61.0193 54.5099C60.9978 55.744 59.9754 57.2947 58.7572 57.9346C57.539 58.5744 56.5296 58.0777 56.5511 56.8089ZM70.0957 49.6364C70.2081 49.5555 70.2954 49.4442 70.3475 49.3154C70.369 48.6278 70.3626 47.9555 70.3626 47.2354C68.4083 48.5172 66.5142 49.7665 64.6202 51.0158V53.2389L65.1174 52.9114C66.7725 51.8183 68.4341 50.7338 70.0957 49.6364ZM69.7147 58.5592C68.4463 60.5076 66.7916 62.1705 64.8548 63.4436C63.1329 64.6039 61.4778 65.222 59.9389 65.1787C58.359 65.1375 57.2893 64.3957 56.6695 62.9686C57.2678 62.448 57.8059 61.9665 58.344 61.4937C58.5418 61.8163 58.7688 62.1198 59.022 62.4003C60.0572 63.3828 61.5488 63.3134 63.3546 62.4762C63.5698 62.3743 63.77 62.2593 63.9809 62.1401C64.8419 61.6607 65.2874 61.1033 65.5069 60.123C65.6834 59.3053 65.7932 58.5158 65.9374 57.7068C66.1135 56.6524 66.4412 55.6295 66.9102 54.6704C67.4634 53.5512 68.2382 52.7184 69.2412 52.3085C70.1323 51.9528 70.7048 52.2065 70.9911 52.8854C71.6432 54.4687 71.0965 56.425 69.7147 58.5592ZM69.3273 54.5923C69.2714 54.434 69.1013 54.2691 68.9528 54.3168C68.8043 54.3646 68.5632 54.6877 68.4341 54.9068C68.2881 55.1536 68.1759 55.4192 68.1005 55.6963C67.8293 56.8913 67.5775 58.082 67.3106 59.2641C67.356 59.263 67.4013 59.2586 67.4462 59.2511C68.1303 58.4928 68.6892 57.6287 69.1013 56.6918C69.4349 55.8741 69.5038 55.1757 69.3273 54.5923ZM80.7949 39.7072V60.2726C80.7942 62.6299 80.1786 64.9455 79.0098 66.9874C77.841 69.0293 76.1601 70.7257 74.1356 71.9066L56.4607 82.1785C54.4328 83.3608 52.1313 83.9834 49.7885 83.9834C47.4456 83.9834 45.1441 83.3608 43.1162 82.1785L25.4671 71.9001C23.4402 70.7208 21.7567 69.0251 20.5856 66.9831C19.4145 64.9411 18.7969 62.6246 18.7949 60.2661V39.7007C18.7969 37.3422 19.4145 35.0257 20.5856 32.9837C21.7567 30.9417 23.4402 29.246 25.4671 28.0667L43.1378 17.7883C45.1657 16.606 47.4671 15.9834 49.81 15.9834C52.1529 15.9834 54.4543 16.606 56.4822 17.7883L74.1356 28.0667C76.1601 29.2476 77.841 30.944 79.0098 32.9859C80.1786 35.0278 80.7942 37.3434 80.7949 39.7007V39.7072ZM77.8333 47.6887C77.8333 42.3077 73.5007 40.2624 68.1629 43.134L52.9287 51.2956C51.6739 51.9679 50.6602 53.5382 50.6602 54.8005V77.5956C50.6602 78.8644 51.6739 79.3307 52.9287 78.6649L58.5936 75.6284C59.1636 75.3055 59.6456 74.8458 59.997 74.2902C60.3517 73.7796 60.5547 73.1777 60.5824 72.5551C60.5824 71.9435 61.0731 71.1887 61.6779 70.8655L64.4975 69.3473C65.0291 69.0653 65.5414 68.7769 66.0299 68.4797L68.1629 67.3411C73.5007 64.4716 77.8333 57.7979 77.8333 52.4082V47.6887Z",
|
|
44
|
-
fill: "#D9EB1B"
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
) }),
|
|
50
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
51
|
-
"p",
|
|
52
|
-
{
|
|
53
|
-
style: {
|
|
54
|
-
fontSize: "14px",
|
|
55
|
-
fontWeight: "500",
|
|
56
|
-
color: "#fff",
|
|
57
|
-
fontFamily: "Onest, system-ui, Avenir, Helvetica, Arial, sans-serif"
|
|
58
|
-
},
|
|
59
|
-
children: text || /* @__PURE__ */ jsxRuntime.jsx("span", { children: authType === "login" ? "Login with Pelican" : authType === "signup" ? "Signup with Pelican" : authType === "id-verification" ? "Verify with Pelican" : "Authenticate with Pelican" })
|
|
60
|
-
}
|
|
61
|
-
) })
|
|
62
|
-
]
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
14
|
+
.peli-button {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
gap: 0.35rem;
|
|
20
|
+
padding: 0.05rem 0.7rem;
|
|
21
|
+
border-radius: 20px;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
background-color: #2b2b2bff;
|
|
24
|
+
border: 1px solid #353535ff;
|
|
63
25
|
}
|
|
64
|
-
|
|
26
|
+
.peli-button:hover {
|
|
27
|
+
background-color: #313131ff;
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
` }),
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "peli-button", children: [
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33
|
+
"svg",
|
|
34
|
+
{
|
|
35
|
+
width: "28",
|
|
36
|
+
height: "28",
|
|
37
|
+
viewBox: "0 0 100 100",
|
|
38
|
+
fill: "none",
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
role: "img",
|
|
41
|
+
"aria-label": "Pelican logo",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100", height: "100", rx: "32", fill: "#121212" }),
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
"path",
|
|
46
|
+
{
|
|
47
|
+
d: "M56.5511 56.8089C56.5705 55.5878 57.5734 54.0696 58.7917 53.4254C60.0572 52.7596 61.0322 53.2324 61.0193 54.5099C60.9978 55.744 59.9754 57.2947 58.7572 57.9346C57.539 58.5744 56.5296 58.0777 56.5511 56.8089ZM70.0957 49.6364C70.2081 49.5555 70.2954 49.4442 70.3475 49.3154C70.369 48.6278 70.3626 47.9555 70.3626 47.2354C68.4083 48.5172 66.5142 49.7665 64.6202 51.0158V53.2389L65.1174 52.9114C66.7725 51.8183 68.4341 50.7338 70.0957 49.6364ZM69.7147 58.5592C68.4463 60.5076 66.7916 62.1705 64.8548 63.4436C63.1329 64.6039 61.4778 65.222 59.9389 65.1787C58.359 65.1375 57.2893 64.3957 56.6695 62.9686C57.2678 62.448 57.8059 61.9665 58.344 61.4937C58.5418 61.8163 58.7688 62.1198 59.022 62.4003C60.0572 63.3828 61.5488 63.3134 63.3546 62.4762C63.5698 62.3743 63.77 62.2593 63.9809 62.1401C64.8419 61.6607 65.2874 61.1033 65.5069 60.123C65.6834 59.3053 65.7932 58.5158 65.9374 57.7068C66.1135 56.6524 66.4412 55.6295 66.9102 54.6704C67.4634 53.5512 68.2382 52.7184 69.2412 52.3085C70.1323 51.9528 70.7048 52.2065 70.9911 52.8854C71.6432 54.4687 71.0965 56.425 69.7147 58.5592ZM69.3273 54.5923C69.2714 54.434 69.1013 54.2691 68.9528 54.3168C68.8043 54.3646 68.5632 54.6877 68.4341 54.9068C68.2881 55.1536 68.1759 55.4192 68.1005 55.6963C67.8293 56.8913 67.5775 58.082 67.3106 59.2641C67.356 59.263 67.4013 59.2586 67.4462 59.2511C68.1303 58.4928 68.6892 57.6287 69.1013 56.6918C69.4349 55.8741 69.5038 55.1757 69.3273 54.5923ZM80.7949 39.7072V60.2726C80.7942 62.6299 80.1786 64.9455 79.0098 66.9874C77.841 69.0293 76.1601 70.7257 74.1356 71.9066L56.4607 82.1785C54.4328 83.3608 52.1313 83.9834 49.7885 83.9834C47.4456 83.9834 45.1441 83.3608 43.1162 82.1785L25.4671 71.9001C23.4402 70.7208 21.7567 69.0251 20.5856 66.9831C19.4145 64.9411 18.7969 62.6246 18.7949 60.2661V39.7007C18.7969 37.3422 19.4145 35.0257 20.5856 32.9837C21.7567 30.9417 23.4402 29.246 25.4671 28.0667L43.1378 17.7883C45.1657 16.606 47.4671 15.9834 49.81 15.9834C52.1529 15.9834 54.4543 16.606 56.4822 17.7883L74.1356 28.0667C76.1601 29.2476 77.841 30.944 79.0098 32.9859C80.1786 35.0278 80.7942 37.3434 80.7949 39.7007V39.7072ZM77.8333 47.6887C77.8333 42.3077 73.5007 40.2624 68.1629 43.134L52.9287 51.2956C51.6739 51.9679 50.6602 53.5382 50.6602 54.8005V77.5956C50.6602 78.8644 51.6739 79.3307 52.9287 78.6649L58.5936 75.6284C59.1636 75.3055 59.6456 74.8458 59.997 74.2902C60.3517 73.7796 60.5547 73.1777 60.5824 72.5551C60.5824 71.9435 61.0731 71.1887 61.6779 70.8655L64.4975 69.3473C65.0291 69.0653 65.5414 68.7769 66.0299 68.4797L68.1629 67.3411C73.5007 64.4716 77.8333 57.7979 77.8333 52.4082V47.6887Z",
|
|
48
|
+
fill: "#D9EB1B"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
"p",
|
|
56
|
+
{
|
|
57
|
+
style: {
|
|
58
|
+
fontSize: "14px",
|
|
59
|
+
fontWeight: "500",
|
|
60
|
+
color: "#fff",
|
|
61
|
+
fontFamily: "Onest, system-ui, Avenir, Helvetica, Arial, sans-serif"
|
|
62
|
+
},
|
|
63
|
+
children: text || /* @__PURE__ */ jsxRuntime.jsx("span", { children: authType === "login" ? "Login with Pelican" : authType === "signup" ? "Signup with Pelican" : authType === "id-verification" ? "Verify with Pelican" : "Authenticate with Pelican" })
|
|
64
|
+
}
|
|
65
|
+
) })
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
65
68
|
};
|
|
66
69
|
var PelicanButton_default = PelicanButton;
|
|
67
70
|
var usePelicanAuth = (config) => {
|
|
@@ -255,134 +258,470 @@ var PelicanAuth = (config) => {
|
|
|
255
258
|
start();
|
|
256
259
|
}
|
|
257
260
|
}, [config.continuousMode]);
|
|
258
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
259
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
261
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
262
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `@keyframes fadeUp {
|
|
263
|
+
from {
|
|
264
|
+
opacity: 0;
|
|
265
|
+
transform: translateY(20px);
|
|
266
|
+
}
|
|
267
|
+
to {
|
|
268
|
+
opacity: 1;
|
|
269
|
+
transform: translateY(0);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@keyframes spin {
|
|
274
|
+
to {
|
|
275
|
+
transform: rotate(360deg);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@keyframes successPulse {
|
|
280
|
+
0%,
|
|
281
|
+
100% {
|
|
282
|
+
transform: scale(1);
|
|
283
|
+
opacity: 1;
|
|
284
|
+
}
|
|
285
|
+
50% {
|
|
286
|
+
transform: scale(1.05);
|
|
287
|
+
opacity: 0.9;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.auth-container {
|
|
292
|
+
width: 300px;
|
|
293
|
+
max-width: fit-content;
|
|
294
|
+
padding: 1rem;
|
|
295
|
+
margin-top: 0.3rem;
|
|
296
|
+
position: relative;
|
|
297
|
+
animation: fadeUp 0.5s ease-out;
|
|
298
|
+
background-color: #fcfcfc;
|
|
299
|
+
border-radius: 2.5rem;
|
|
300
|
+
display: flex;
|
|
301
|
+
flex-direction: column;
|
|
302
|
+
justify-content: space-between;
|
|
303
|
+
align-items: center;
|
|
304
|
+
gap: 1rem;
|
|
305
|
+
min-height: 320px;
|
|
306
|
+
}
|
|
307
|
+
.js-auth-container {
|
|
308
|
+
width: 300px;
|
|
309
|
+
max-width: fit-content;
|
|
310
|
+
padding: 1rem;
|
|
311
|
+
margin-top: 0.3rem;
|
|
312
|
+
position: relative;
|
|
313
|
+
background-color: #fcfcfc;
|
|
314
|
+
border-radius: 2.5rem;
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
justify-content: space-between;
|
|
318
|
+
align-items: center;
|
|
319
|
+
gap: 1rem;
|
|
320
|
+
min-height: 320px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.close-button {
|
|
324
|
+
background-color: #2b2b2bff;
|
|
325
|
+
border: none;
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
transition: opacity 0.2s;
|
|
328
|
+
height: 1.5rem;
|
|
329
|
+
width: 1.5rem;
|
|
330
|
+
display: flex;
|
|
331
|
+
align-items: center;
|
|
332
|
+
justify-content: center;
|
|
333
|
+
border-radius: 50%;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.close-button:hover {
|
|
337
|
+
opacity: 0.6;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.close-icon {
|
|
341
|
+
width: 1.5rem;
|
|
342
|
+
height: 1.5rem;
|
|
343
|
+
fill: #000000;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.retry-container {
|
|
347
|
+
text-align: center;
|
|
348
|
+
padding: 3rem 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.retry-container > div:first-child {
|
|
352
|
+
margin-bottom: 1rem;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.retry-text {
|
|
356
|
+
font-size: 1.125rem;
|
|
357
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.content-wrapper {
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-direction: column;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
align-items: center;
|
|
365
|
+
gap: 2rem;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.unpaired-container {
|
|
369
|
+
text-align: center;
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.main-heading {
|
|
375
|
+
font-size: 0.75rem;
|
|
376
|
+
font-weight: 600;
|
|
377
|
+
color: #585858;
|
|
378
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@media (min-width: 768px) {
|
|
382
|
+
.main-heading {
|
|
383
|
+
font-size: 1rem;
|
|
384
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@media (min-width: 1024px) {
|
|
389
|
+
.main-heading {
|
|
390
|
+
font-size: 1rem;
|
|
391
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.mobile-auth-container {
|
|
396
|
+
display: flex;
|
|
397
|
+
flex-direction: column;
|
|
398
|
+
gap: 0.7rem;
|
|
399
|
+
width: 253px;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.logo-container {
|
|
403
|
+
display: flex;
|
|
404
|
+
justify-content: center;
|
|
405
|
+
padding: 2rem 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.open-app-link {
|
|
409
|
+
display: inline-block;
|
|
410
|
+
padding: 0.75rem 2rem;
|
|
411
|
+
background-color: #2b2b2bff;
|
|
412
|
+
width: fit-content;
|
|
413
|
+
align-self: center;
|
|
414
|
+
|
|
415
|
+
border-radius: 18px;
|
|
416
|
+
color: #fff;
|
|
417
|
+
font-weight: 600;
|
|
418
|
+
font-size: 1rem;
|
|
419
|
+
text-decoration: none;
|
|
420
|
+
transition: background-color 0.2s;
|
|
421
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.open-app-link:hover {
|
|
425
|
+
background-color: rgba(217, 235, 27, 0.9);
|
|
426
|
+
color: #000;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.helper-text {
|
|
430
|
+
font-size: 0.75rem;
|
|
431
|
+
color: #6b7280;
|
|
432
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.qr-container {
|
|
436
|
+
display: flex;
|
|
437
|
+
justify-content: center;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.qr-wrapper {
|
|
441
|
+
display: flex;
|
|
442
|
+
justify-content: center;
|
|
443
|
+
align-items: center;
|
|
444
|
+
overflow: hidden;
|
|
445
|
+
border-radius: 2rem;
|
|
446
|
+
background-color: #fff;
|
|
447
|
+
padding: 0.2rem;
|
|
448
|
+
height: 244px;
|
|
449
|
+
width: 244px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.qr-image {
|
|
453
|
+
height: 90%;
|
|
454
|
+
width: 90%;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.loader-container {
|
|
458
|
+
display: flex;
|
|
459
|
+
justify-content: center;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.instruction-text {
|
|
463
|
+
font-size: 0.875rem;
|
|
464
|
+
color: #9ca3af;
|
|
465
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.paired-container {
|
|
469
|
+
text-align: center;
|
|
470
|
+
display: flex;
|
|
471
|
+
flex-direction: column;
|
|
472
|
+
gap: 1rem;
|
|
473
|
+
max-width: 250px;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.paired-heading {
|
|
477
|
+
font-size: 1rem;
|
|
478
|
+
font-weight: 800;
|
|
479
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
@media (min-width: 768px) {
|
|
483
|
+
.paired-heading {
|
|
484
|
+
font-size: 1rem;
|
|
485
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.success-message {
|
|
490
|
+
background-color: #121212;
|
|
491
|
+
color: #d9eb1b;
|
|
492
|
+
padding: 0.5rem 1rem;
|
|
493
|
+
border-radius: 1.3rem;
|
|
494
|
+
font-weight: 700;
|
|
495
|
+
font-size: 1rem;
|
|
496
|
+
animation: successPulse 0.2s ease-in-out;
|
|
497
|
+
margin: 0.5rem 0;
|
|
498
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
499
|
+
width: 300px;
|
|
500
|
+
max-width: fit-content;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.auto-renew-badge {
|
|
504
|
+
display: inline-block;
|
|
505
|
+
background-color: rgba(217, 235, 27, 0.2);
|
|
506
|
+
border: 1px solid #d9eb1b;
|
|
507
|
+
color: #d9eb1b;
|
|
508
|
+
padding: 0.25rem 0.75rem;
|
|
509
|
+
border-radius: 9999px;
|
|
510
|
+
font-size: 0.75rem;
|
|
511
|
+
font-weight: 600;
|
|
512
|
+
margin-top: 0.5rem;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.error-wrapper {
|
|
516
|
+
display: flex;
|
|
517
|
+
justify-content: center;
|
|
518
|
+
align-items: center;
|
|
519
|
+
text-align: center;
|
|
520
|
+
border-radius: 1.5rem;
|
|
521
|
+
border: 1px solid rgb(255, 236, 236);
|
|
522
|
+
background-color: rgb(255, 255, 255);
|
|
523
|
+
width: 250px;
|
|
524
|
+
height: 80px;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.error-message {
|
|
528
|
+
font-size: 0.75rem;
|
|
529
|
+
font-weight: 400;
|
|
530
|
+
color: rgb(255, 139, 139);
|
|
531
|
+
font-family: Onest, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
532
|
+
max-width: 70%;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.loader {
|
|
536
|
+
width: 48px;
|
|
537
|
+
height: 48px;
|
|
538
|
+
position: relative;
|
|
539
|
+
}
|
|
540
|
+
.loader::before,
|
|
541
|
+
.loader::after {
|
|
542
|
+
content: "";
|
|
543
|
+
position: absolute;
|
|
544
|
+
left: 50%;
|
|
545
|
+
top: 50%;
|
|
546
|
+
transform: translate(-50%, -50%);
|
|
547
|
+
width: 48em;
|
|
548
|
+
height: 48em;
|
|
549
|
+
background-image: radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
550
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
551
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
552
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
553
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
554
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
555
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
556
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0),
|
|
557
|
+
radial-gradient(circle 10px, #585858 100%, transparent 0);
|
|
558
|
+
background-position: 0em -18em, 0em 18em, 18em 0em, -18em 0em, 13em -13em,
|
|
559
|
+
-13em -13em, 13em 13em, -13em 13em;
|
|
560
|
+
background-repeat: no-repeat;
|
|
561
|
+
font-size: 0.5px;
|
|
562
|
+
border-radius: 50%;
|
|
563
|
+
animation: blast 1s ease-in infinite;
|
|
564
|
+
}
|
|
565
|
+
.loader::after {
|
|
566
|
+
font-size: 1px;
|
|
567
|
+
background: #585858;
|
|
568
|
+
animation: bounce 1s ease-in infinite;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@keyframes bounce {
|
|
572
|
+
0%,
|
|
573
|
+
100% {
|
|
574
|
+
font-size: 0.75px;
|
|
575
|
+
}
|
|
576
|
+
50% {
|
|
577
|
+
font-size: 1.5px;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
@keyframes blast {
|
|
581
|
+
0%,
|
|
582
|
+
40% {
|
|
583
|
+
font-size: 0.5px;
|
|
584
|
+
}
|
|
585
|
+
70% {
|
|
586
|
+
opacity: 1;
|
|
587
|
+
font-size: 4px;
|
|
588
|
+
}
|
|
589
|
+
100% {
|
|
590
|
+
font-size: 6px;
|
|
591
|
+
opacity: 0;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
` }),
|
|
595
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
596
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
style: {
|
|
600
|
+
maxWidth: "275px",
|
|
601
|
+
justifyContent: "space-between",
|
|
602
|
+
alignItems: "center",
|
|
603
|
+
width: "100%"
|
|
604
|
+
},
|
|
605
|
+
children: !config.continuousMode && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
606
|
+
"div",
|
|
368
607
|
{
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
608
|
+
style: {
|
|
609
|
+
width: "100%",
|
|
610
|
+
display: "flex",
|
|
611
|
+
justifyContent: "space-between",
|
|
612
|
+
alignItems: "center"
|
|
613
|
+
},
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
616
|
+
"button",
|
|
617
|
+
{
|
|
618
|
+
type: "button",
|
|
619
|
+
style: {
|
|
620
|
+
border: "none",
|
|
621
|
+
background: "transparent",
|
|
622
|
+
cursor: "pointer"
|
|
623
|
+
},
|
|
624
|
+
onClick: () => {
|
|
625
|
+
start();
|
|
626
|
+
},
|
|
627
|
+
disabled: config.continuousMode,
|
|
628
|
+
children: config.buttonComponent ? config.buttonComponent : /* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
+
PelicanButton_default,
|
|
630
|
+
{
|
|
631
|
+
authType: config.authType,
|
|
632
|
+
text: config.buttonText
|
|
633
|
+
}
|
|
634
|
+
)
|
|
635
|
+
}
|
|
636
|
+
),
|
|
637
|
+
state !== "idle" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
638
|
+
"button",
|
|
639
|
+
{
|
|
640
|
+
onClick: () => {
|
|
641
|
+
stop();
|
|
642
|
+
config.onClose?.();
|
|
643
|
+
},
|
|
644
|
+
className: "close-button",
|
|
645
|
+
"aria-label": "Close",
|
|
646
|
+
type: "button",
|
|
647
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
648
|
+
"svg",
|
|
649
|
+
{
|
|
650
|
+
fill: "#fff",
|
|
651
|
+
stroke: "#fff",
|
|
652
|
+
viewBox: "0 0 24 24",
|
|
653
|
+
role: "img",
|
|
654
|
+
"aria-label": "close icon",
|
|
655
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
656
|
+
"path",
|
|
657
|
+
{
|
|
658
|
+
strokeLinecap: "round",
|
|
659
|
+
strokeLinejoin: "round",
|
|
660
|
+
strokeWidth: 4,
|
|
661
|
+
d: "M6 18L18 6M6 6l12 12",
|
|
662
|
+
height: "24",
|
|
663
|
+
width: "24"
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
}
|
|
667
|
+
)
|
|
668
|
+
}
|
|
669
|
+
)
|
|
670
|
+
]
|
|
372
671
|
}
|
|
373
|
-
)
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
672
|
+
)
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
state !== "idle" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "auth-container", children: [
|
|
676
|
+
successMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "success-message", style: { textAlign: "center" }, children: [
|
|
677
|
+
successMessage,
|
|
678
|
+
config.continuousMode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
679
|
+
"p",
|
|
680
|
+
{
|
|
681
|
+
style: {
|
|
682
|
+
fontSize: "0.8rem",
|
|
683
|
+
marginTop: "0.5rem",
|
|
684
|
+
color: "#f3f3f3",
|
|
685
|
+
textAlign: "center"
|
|
686
|
+
},
|
|
687
|
+
children: "Preparing next session..."
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
] }),
|
|
691
|
+
error && state === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "error-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "error-message", children: error.message }) }),
|
|
692
|
+
isProcessing ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "content-wrapper", children: [
|
|
693
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "main-heading", children: "one sec..." }),
|
|
694
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
695
|
+
"span",
|
|
696
|
+
{
|
|
697
|
+
className: "loader",
|
|
698
|
+
style: { margin: "1rem auto", width: "252px" }
|
|
699
|
+
}
|
|
700
|
+
)
|
|
701
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "content-wrapper", children: state === "awaiting-pair" && !successMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "unpaired-container", children: [
|
|
702
|
+
!deeplink && !config.forceQRCode && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "main-heading", children: "Open Pelican Vault" }),
|
|
703
|
+
!config.forceQRCode && deeplink ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mobile-auth-container", children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "logo-container", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
705
|
+
"img",
|
|
706
|
+
{
|
|
707
|
+
src: "https://res.cloudinary.com/de0jr8mcm/image/upload/v1765904735/pelican/pelican_icon_r9ghqw.png ",
|
|
708
|
+
alt: "Pelican Logo",
|
|
709
|
+
style: { width: "80px", height: "80px" }
|
|
710
|
+
}
|
|
711
|
+
) }),
|
|
712
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: deeplink, className: "open-app-link", children: "Open Pelican Vault" }),
|
|
713
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "helper-text", children: [
|
|
714
|
+
"Open the app to",
|
|
715
|
+
" ",
|
|
716
|
+
config.authType === "login" ? "login" : config.authType === "signup" ? "signup" : config.authType === "id-verification" ? "verify identity" : "authenticate"
|
|
717
|
+
] })
|
|
718
|
+
] }) : config.forceQRCode && qr && state === "awaiting-pair" || !config.forceQRCode && qr && state === "awaiting-pair" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "qr-container", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "qr-wrapper", children: [
|
|
719
|
+
qr && /* @__PURE__ */ jsxRuntime.jsx("img", { src: qr, alt: "QR Code", className: "qr-image" }),
|
|
720
|
+
!qr && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "loader" })
|
|
721
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "loader-container", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "loader" }) })
|
|
722
|
+
] }) }),
|
|
723
|
+
/* @__PURE__ */ jsxRuntime.jsx(StoreIcons_default, {})
|
|
724
|
+
] })
|
|
386
725
|
] })
|
|
387
726
|
] });
|
|
388
727
|
};
|