@pelican-identity/react 2.0.35 → 2.0.38
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 +32 -18
- package/dist/components/PelicanAuth.js.map +1 -1
- package/dist/components/PelicanButton.d.ts +8 -0
- package/dist/components/PelicanButton.d.ts.map +1 -1
- package/dist/components/PelicanButton.js +87 -0
- package/dist/components/PelicanButton.js.map +1 -0
- package/dist/index.js +162 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/components/StoreIcons.d.ts.map +0 -1
- package/dist/components/StoreIcons.js +0 -59
- package/dist/components/StoreIcons.js.map +0 -1
- package/dist/hooks/usePelicanAuth.d.ts +0 -16
- package/dist/hooks/usePelicanAuth.d.ts.map +0 -1
- package/dist/hooks/usePelicanAuth.js +0 -64
- package/dist/hooks/usePelicanAuth.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PelicanAuth.d.ts","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,QAAA,MAAM,WAAW,GAAI,QAAQ,mBAAmB,
|
|
1
|
+
{"version":3,"file":"PelicanAuth.d.ts","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,QAAA,MAAM,WAAW,GAAI,QAAQ,mBAAmB,4CAuoB/C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -66,7 +66,7 @@ const PelicanAuth = (config) => {
|
|
|
66
66
|
justify-content: space-between;
|
|
67
67
|
align-items: center;
|
|
68
68
|
gap: 1rem;
|
|
69
|
-
min-height:
|
|
69
|
+
min-height: 300px;
|
|
70
70
|
}
|
|
71
71
|
.js-auth-container {
|
|
72
72
|
width: 300px;
|
|
@@ -81,7 +81,7 @@ const PelicanAuth = (config) => {
|
|
|
81
81
|
justify-content: space-between;
|
|
82
82
|
align-items: center;
|
|
83
83
|
gap: 1rem;
|
|
84
|
-
min-height:
|
|
84
|
+
min-height: 300px;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.pelican-modal-close-btn {
|
|
@@ -393,31 +393,32 @@ opacity: 0.9;
|
|
|
393
393
|
width: "100%",
|
|
394
394
|
justifyContent: "space-between",
|
|
395
395
|
alignItems: "center",
|
|
396
|
-
maxWidth: "
|
|
397
|
-
}, children: !config.continuousMode && (
|
|
396
|
+
maxWidth: "300px",
|
|
397
|
+
}, children: !config.continuousMode && (_jsx("div", { style: {
|
|
398
398
|
width: "100%",
|
|
399
399
|
display: "flex",
|
|
400
400
|
justifyContent: "space-between",
|
|
401
401
|
alignItems: "center",
|
|
402
|
-
}, children:
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
402
|
+
}, children: state === "idle" && (_jsx("button", { type: "button", style: {
|
|
403
|
+
border: "none",
|
|
404
|
+
background: "transparent",
|
|
405
|
+
cursor: "pointer",
|
|
406
|
+
width: "100%",
|
|
407
|
+
alignSelf: "center",
|
|
408
|
+
}, onClick: () => {
|
|
409
|
+
if (state !== "idle") {
|
|
409
410
|
stop();
|
|
410
411
|
config.onClose?.();
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
start();
|
|
415
|
+
}
|
|
416
|
+
}, children: config.buttonComponent ? (config.buttonComponent) : (_jsx(PelicanButton, { authType: config.authType, text: config.buttonText, type: "idle" })) })) })) }), _jsx("div", { style: {
|
|
416
417
|
width: "100%",
|
|
417
418
|
display: "flex",
|
|
418
419
|
justifyContent: "center",
|
|
419
420
|
alignItems: "center",
|
|
420
|
-
maxWidth: "
|
|
421
|
+
maxWidth: "300px",
|
|
421
422
|
}, children: state !== "idle" && (_jsxs("div", { className: "auth-container", children: [successMessage && (_jsxs("div", { className: "success-message", style: { textAlign: "center" }, children: [successMessage, config.continuousMode && (_jsx("p", { style: {
|
|
422
423
|
fontSize: "0.8rem",
|
|
423
424
|
marginTop: "0.5rem",
|
|
@@ -450,7 +451,20 @@ opacity: 0.9;
|
|
|
450
451
|
state === "awaiting-pair") ||
|
|
451
452
|
(!config.forceQRCode &&
|
|
452
453
|
qr &&
|
|
453
|
-
state === "awaiting-pair") ? (_jsx("div", { className: "qr-container", children: _jsxs("div", { className: "qr-wrapper", children: [qr && (_jsx("img", { src: qr, alt: "QR Code", className: "qr-image" })), !qr && _jsx("span", { className: "loader" })] }) })) : (_jsx("div", { className: "loader-container", children: _jsx("span", { className: "loader" }) })), state === "awaiting-pair" && (_jsx("button", { type: "button", className: "web-auth-btn", onClick: useWebAuth, children: "Use browser vault instead" }))] })) })), _jsx(StoreIcons, {})] })) })
|
|
454
|
+
state === "awaiting-pair") ? (_jsx("div", { className: "qr-container", children: _jsxs("div", { className: "qr-wrapper", children: [qr && (_jsx("img", { src: qr, alt: "QR Code", className: "qr-image" })), !qr && _jsx("span", { className: "loader" })] }) })) : (_jsx("div", { className: "loader-container", children: _jsx("span", { className: "loader" }) })), state === "awaiting-pair" && (_jsx("button", { type: "button", className: "web-auth-btn", onClick: useWebAuth, children: "Use browser vault instead" }))] })) })), _jsx(StoreIcons, {})] })) }), state !== "idle" && (_jsx("div", { style: {
|
|
455
|
+
width: "300px",
|
|
456
|
+
display: "flex",
|
|
457
|
+
justifyContent: "center",
|
|
458
|
+
alignItems: "center",
|
|
459
|
+
}, children: _jsx("button", { type: "button", style: {
|
|
460
|
+
border: "none",
|
|
461
|
+
background: "transparent",
|
|
462
|
+
cursor: "pointer",
|
|
463
|
+
alignSelf: "center",
|
|
464
|
+
}, onClick: () => {
|
|
465
|
+
stop();
|
|
466
|
+
config.onClose?.();
|
|
467
|
+
}, children: _jsx(PelicanButton, { authType: config.authType, text: `Cancel`, type: "cancel" }) }) }))] })] }));
|
|
454
468
|
};
|
|
455
469
|
export default PelicanAuth;
|
|
456
470
|
//# sourceMappingURL=PelicanAuth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PelicanAuth.js","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,UAAU,MAAM,cAAc,CAAC;AAItC,MAAM,WAAW,GAAG,CAAC,MAA2B,EAAE,EAAE;IAClD,MAAM,EACJ,KAAK,EACL,EAAE,EACF,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,cAAc,EACd,YAAY,EACZ,UAAU,GACX,GAAG,cAAc,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE;YACtB,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,KAAK,EAAE,CAAC;QACV,CAAC;IACH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Z,CACV,IACG,CACP,GACG,CACP,EACD,KAAC,UAAU,KAAG,IACV,CACP,GACG,EAEL,KAAK,KAAK,MAAM,IAAI,CACnB,cACE,KAAK,EAAE;4BACL,KAAK,EAAE,OAAO;4BACd,OAAO,EAAE,MAAM;4BACf,cAAc,EAAE,QAAQ;4BACxB,UAAU,EAAE,QAAQ;yBACrB,YAED,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;gCACL,MAAM,EAAE,MAAM;gCACd,UAAU,EAAE,aAAa;gCACzB,MAAM,EAAE,SAAS;gCAEjB,SAAS,EAAE,QAAQ;6BACpB,EACD,OAAO,EAAE,GAAG,EAAE;gCACZ,IAAI,EAAE,CAAC;gCACP,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;4BACrB,CAAC,YAED,KAAC,aAAa,IACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,QAAQ,GACd,GACK,GACL,CACP,IACO,IACT,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AuthType } from "@pelican-identity/auth-core";
|
|
2
|
+
declare const PelicanButton: ({ authType, text, type, }: {
|
|
3
|
+
authType: AuthType;
|
|
4
|
+
text?: string;
|
|
5
|
+
type: "idle" | "cancel";
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default PelicanButton;
|
|
8
|
+
//# sourceMappingURL=PelicanButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PelicanButton.d.ts","sourceRoot":"","sources":["../../src/components/PelicanButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,QAAA,MAAM,aAAa,GAAI,
|
|
1
|
+
{"version":3,"file":"PelicanButton.d.ts","sourceRoot":"","sources":["../../src/components/PelicanButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,QAAA,MAAM,aAAa,GAAI,2BAIpB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;CACzB,4CAsJA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
const PelicanButton = ({ authType, text, type, }) => {
|
|
3
|
+
if (type === "idle") {
|
|
4
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
|
|
5
|
+
.pelican-auth-btn-wrapper * {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
cursor: pointer !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn {
|
|
11
|
+
all: initial;
|
|
12
|
+
display: flex !important;
|
|
13
|
+
flex-direction: row !important;
|
|
14
|
+
align-items: center !important;
|
|
15
|
+
justify-content: center !important;
|
|
16
|
+
gap: 0.35rem !important;
|
|
17
|
+
padding: 0.3rem 0.5rem !important;
|
|
18
|
+
border-radius: 20px !important;
|
|
19
|
+
cursor: pointer !important;
|
|
20
|
+
background-color: #2b2b2b !important;
|
|
21
|
+
border: 1px solid #353535 !important;
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn:hover {
|
|
26
|
+
background-color: #313131 !important;
|
|
27
|
+
cursor: pointer !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn p {
|
|
31
|
+
all: initial;
|
|
32
|
+
font-size: 14px !important;
|
|
33
|
+
font-weight: 500 !important;
|
|
34
|
+
color: #fff !important;
|
|
35
|
+
font-family: Onest, system-ui, -apple-system, sans-serif !important;
|
|
36
|
+
margin: 0 !important;
|
|
37
|
+
padding: 0 !important;
|
|
38
|
+
}
|
|
39
|
+
` }), _jsx("div", { className: "pelican-auth-btn-wrapper", children: _jsxs("div", { className: "pelican-auth-btn", children: [_jsx("div", { children: _jsxs("svg", { width: "28", height: "28", viewBox: "0 0 100 100", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Pelican logo", children: [_jsx("rect", { width: "100", height: "100", rx: "32", fill: "#121212" }), _jsx("path", { 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", fill: "#D9EB1B" })] }) }), _jsx("div", { children: _jsx("p", { children: text || (_jsx("span", { children: authType === "login"
|
|
40
|
+
? "Login with Pelican"
|
|
41
|
+
: authType === "signup"
|
|
42
|
+
? "Signup with Pelican"
|
|
43
|
+
: authType === "id-verification"
|
|
44
|
+
? "Verify with Pelican"
|
|
45
|
+
: "Authenticate with Pelican" })) }) })] }) })] }));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
|
|
49
|
+
.pelican-auth-btn-wrapper * {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
cursor: pointer !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn {
|
|
55
|
+
all: initial;
|
|
56
|
+
display: flex !important;
|
|
57
|
+
flex-direction: row !important;
|
|
58
|
+
align-items: center !important;
|
|
59
|
+
justify-content: center !important;
|
|
60
|
+
gap: 0.35rem !important;
|
|
61
|
+
padding: 0.3rem 0.6rem !important;
|
|
62
|
+
border-radius: 24px !important;
|
|
63
|
+
cursor: pointer !important;
|
|
64
|
+
background-color: #f8f8f8ff !important;
|
|
65
|
+
height: 30px !important;
|
|
66
|
+
margin: 8px 0 !important;
|
|
67
|
+
width: fit-content !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn:hover {
|
|
71
|
+
cursor: pointer !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn p {
|
|
75
|
+
all: initial;
|
|
76
|
+
font-size: 14px !important;
|
|
77
|
+
font-weight: 500 !important;
|
|
78
|
+
color: #111827 !important;
|
|
79
|
+
font-family: Onest, system-ui, -apple-system, sans-serif !important;
|
|
80
|
+
margin: 0 !important;
|
|
81
|
+
padding: 0 !important;
|
|
82
|
+
}
|
|
83
|
+
` }), _jsx("div", { className: "pelican-auth-btn-wrapper", children: _jsxs("div", { className: "pelican-auth-btn", children: [_jsx("svg", { fill: "#111827", stroke: "#111827", viewBox: "0 0 24 24", role: "img", "aria-label": "close icon", height: "16", width: "16", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M6 18L18 6M6 6l12 12", fill: "#e94e4eff", stroke: "#e94e4eff", color: "#e94e4eff" }) }), _jsx("div", { children: _jsx("p", { children: "cancel" }) })] }) })] }));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export default PelicanButton;
|
|
87
|
+
//# sourceMappingURL=PelicanButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PelicanButton.js","sourceRoot":"","sources":["../../src/components/PelicanButton.tsx"],"names":[],"mappings":";AAEA,MAAM,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,IAAI,GAKL,EAAE,EAAE;IACH,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,CACL,8BACE,0BACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCN,GACW,EACR,cAAK,SAAS,EAAC,0BAA0B,YACvC,eAAK,SAAS,EAAC,kBAAkB,aAC/B,wBACE,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,aAAa,EACrB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,KAAK,gBACC,cAAc,aAEzB,eAAM,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EACxD,eACE,CAAC,EAAC,8gFAA8gF,EAChhF,IAAI,EAAC,SAAS,GACd,IACE,GACF,EACN,wBACE,sBACG,IAAI,IAAI,CACP,yBACG,QAAQ,KAAK,OAAO;4CACnB,CAAC,CAAC,oBAAoB;4CACtB,CAAC,CAAC,QAAQ,KAAK,QAAQ;gDACrB,CAAC,CAAC,qBAAqB;gDACvB,CAAC,CAAC,QAAQ,KAAK,iBAAiB;oDAC9B,CAAC,CAAC,qBAAqB;oDACvB,CAAC,CAAC,2BAA2B,GAC9B,CACR,GACC,GACA,IACF,GACF,IACL,CACJ,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CACL,8BACE,0BACG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCN,GACW,EACR,cAAK,SAAS,EAAC,0BAA0B,YACvC,eAAK,SAAS,EAAC,kBAAkB,aAC/B,cACE,IAAI,EAAC,SAAS,EACd,MAAM,EAAC,SAAS,EAChB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,KAAK,gBACC,YAAY,EACvB,MAAM,EAAC,IAAI,EACX,KAAK,EAAC,IAAI,YAEV,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,sBAAsB,EACxB,IAAI,EAAC,WAAW,EAChB,MAAM,EAAC,WAAW,EAClB,KAAK,EAAC,WAAW,GACjB,GACE,EACN,wBACE,iCAAa,GACT,IACF,GACF,IACL,CACJ,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,12 @@ var authCore = require('@pelican-identity/auth-core');
|
|
|
7
7
|
// src/components/PelicanAuth.tsx
|
|
8
8
|
var PelicanButton = ({
|
|
9
9
|
authType,
|
|
10
|
-
text
|
|
10
|
+
text,
|
|
11
|
+
type
|
|
11
12
|
}) => {
|
|
12
|
-
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13
|
+
if (type === "idle") {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
14
16
|
.pelican-auth-btn-wrapper * {
|
|
15
17
|
box-sizing: border-box;
|
|
16
18
|
cursor: pointer !important;
|
|
@@ -24,7 +26,7 @@ var PelicanButton = ({
|
|
|
24
26
|
justify-content: center !important;
|
|
25
27
|
gap: 0.35rem !important;
|
|
26
28
|
padding: 0.3rem 0.5rem !important;
|
|
27
|
-
border-radius:
|
|
29
|
+
border-radius: 20px !important;
|
|
28
30
|
cursor: pointer !important;
|
|
29
31
|
background-color: #2b2b2b !important;
|
|
30
32
|
border: 1px solid #353535 !important;
|
|
@@ -46,32 +48,99 @@ var PelicanButton = ({
|
|
|
46
48
|
padding: 0 !important;
|
|
47
49
|
}
|
|
48
50
|
` }),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pelican-auth-btn-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pelican-auth-btn", children: [
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53
|
+
"svg",
|
|
54
|
+
{
|
|
55
|
+
width: "28",
|
|
56
|
+
height: "28",
|
|
57
|
+
viewBox: "0 0 100 100",
|
|
58
|
+
fill: "none",
|
|
59
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
60
|
+
role: "img",
|
|
61
|
+
"aria-label": "Pelican logo",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100", height: "100", rx: "32", fill: "#121212" }),
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
65
|
+
"path",
|
|
66
|
+
{
|
|
67
|
+
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",
|
|
68
|
+
fill: "#D9EB1B"
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
) }),
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("p", { 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" }) }) })
|
|
75
|
+
] }) })
|
|
76
|
+
] });
|
|
77
|
+
} else {
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
80
|
+
.pelican-auth-btn-wrapper * {
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
cursor: pointer !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn {
|
|
86
|
+
all: initial;
|
|
87
|
+
display: flex !important;
|
|
88
|
+
flex-direction: row !important;
|
|
89
|
+
align-items: center !important;
|
|
90
|
+
justify-content: center !important;
|
|
91
|
+
gap: 0.35rem !important;
|
|
92
|
+
padding: 0.3rem 0.6rem !important;
|
|
93
|
+
border-radius: 24px !important;
|
|
94
|
+
cursor: pointer !important;
|
|
95
|
+
background-color: #f8f8f8ff !important;
|
|
96
|
+
height: 30px !important;
|
|
97
|
+
margin: 8px 0 !important;
|
|
98
|
+
width: fit-content !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn:hover {
|
|
102
|
+
cursor: pointer !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.pelican-auth-btn-wrapper .pelican-auth-btn p {
|
|
106
|
+
all: initial;
|
|
107
|
+
font-size: 14px !important;
|
|
108
|
+
font-weight: 500 !important;
|
|
109
|
+
color: #111827 !important;
|
|
110
|
+
font-family: Onest, system-ui, -apple-system, sans-serif !important;
|
|
111
|
+
margin: 0 !important;
|
|
112
|
+
padding: 0 !important;
|
|
113
|
+
}
|
|
114
|
+
` }),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pelican-auth-btn-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pelican-auth-btn", children: [
|
|
116
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
117
|
+
"svg",
|
|
118
|
+
{
|
|
119
|
+
fill: "#111827",
|
|
120
|
+
stroke: "#111827",
|
|
121
|
+
viewBox: "0 0 24 24",
|
|
122
|
+
role: "img",
|
|
123
|
+
"aria-label": "close icon",
|
|
124
|
+
height: "16",
|
|
125
|
+
width: "16",
|
|
126
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
127
|
"path",
|
|
64
128
|
{
|
|
65
|
-
|
|
66
|
-
|
|
129
|
+
strokeLinecap: "round",
|
|
130
|
+
strokeLinejoin: "round",
|
|
131
|
+
strokeWidth: 3,
|
|
132
|
+
d: "M6 18L18 6M6 6l12 12",
|
|
133
|
+
fill: "#e94e4eff",
|
|
134
|
+
stroke: "#e94e4eff",
|
|
135
|
+
color: "#e94e4eff"
|
|
67
136
|
}
|
|
68
137
|
)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
] })
|
|
74
|
-
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "cancel" }) })
|
|
141
|
+
] }) })
|
|
142
|
+
] });
|
|
143
|
+
}
|
|
75
144
|
};
|
|
76
145
|
var PelicanButton_default = PelicanButton;
|
|
77
146
|
var usePelicanAuth = (config) => {
|
|
@@ -356,7 +425,7 @@ var PelicanAuth = (config) => {
|
|
|
356
425
|
justify-content: space-between;
|
|
357
426
|
align-items: center;
|
|
358
427
|
gap: 1rem;
|
|
359
|
-
min-height:
|
|
428
|
+
min-height: 300px;
|
|
360
429
|
}
|
|
361
430
|
.js-auth-container {
|
|
362
431
|
width: 300px;
|
|
@@ -371,7 +440,7 @@ var PelicanAuth = (config) => {
|
|
|
371
440
|
justify-content: space-between;
|
|
372
441
|
align-items: center;
|
|
373
442
|
gap: 1rem;
|
|
374
|
-
min-height:
|
|
443
|
+
min-height: 300px;
|
|
375
444
|
}
|
|
376
445
|
|
|
377
446
|
.pelican-modal-close-btn {
|
|
@@ -688,9 +757,9 @@ opacity: 0.9;
|
|
|
688
757
|
width: "100%",
|
|
689
758
|
justifyContent: "space-between",
|
|
690
759
|
alignItems: "center",
|
|
691
|
-
maxWidth: "
|
|
760
|
+
maxWidth: "300px"
|
|
692
761
|
},
|
|
693
|
-
children: !config.continuousMode && /* @__PURE__ */ jsxRuntime.
|
|
762
|
+
children: !config.continuousMode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
694
763
|
"div",
|
|
695
764
|
{
|
|
696
765
|
style: {
|
|
@@ -699,71 +768,35 @@ opacity: 0.9;
|
|
|
699
768
|
justifyContent: "space-between",
|
|
700
769
|
alignItems: "center"
|
|
701
770
|
},
|
|
702
|
-
children:
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
disabled: config.continuousMode,
|
|
716
|
-
children: config.buttonComponent ? config.buttonComponent : /* @__PURE__ */ jsxRuntime.jsx(
|
|
717
|
-
PelicanButton_default,
|
|
718
|
-
{
|
|
719
|
-
authType: config.authType,
|
|
720
|
-
text: config.buttonText
|
|
721
|
-
}
|
|
722
|
-
)
|
|
723
|
-
}
|
|
724
|
-
),
|
|
725
|
-
state !== "idle" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
726
|
-
"button",
|
|
727
|
-
{
|
|
728
|
-
onClick: () => {
|
|
771
|
+
children: state === "idle" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
772
|
+
"button",
|
|
773
|
+
{
|
|
774
|
+
type: "button",
|
|
775
|
+
style: {
|
|
776
|
+
border: "none",
|
|
777
|
+
background: "transparent",
|
|
778
|
+
cursor: "pointer",
|
|
779
|
+
width: "100%",
|
|
780
|
+
alignSelf: "center"
|
|
781
|
+
},
|
|
782
|
+
onClick: () => {
|
|
783
|
+
if (state !== "idle") {
|
|
729
784
|
stop();
|
|
730
785
|
config.onClose?.();
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
viewBox: "0 0 24 24",
|
|
746
|
-
role: "img",
|
|
747
|
-
"aria-label": "close icon",
|
|
748
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
749
|
-
"path",
|
|
750
|
-
{
|
|
751
|
-
strokeLinecap: "round",
|
|
752
|
-
strokeLinejoin: "round",
|
|
753
|
-
strokeWidth: 3,
|
|
754
|
-
d: "M6 18L18 6M6 6l12 12",
|
|
755
|
-
height: "24",
|
|
756
|
-
width: "24",
|
|
757
|
-
fill: "#fff",
|
|
758
|
-
stroke: "#fff",
|
|
759
|
-
color: "#fff"
|
|
760
|
-
}
|
|
761
|
-
)
|
|
762
|
-
}
|
|
763
|
-
)
|
|
764
|
-
}
|
|
765
|
-
)
|
|
766
|
-
]
|
|
786
|
+
} else {
|
|
787
|
+
start();
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
children: config.buttonComponent ? config.buttonComponent : /* @__PURE__ */ jsxRuntime.jsx(
|
|
791
|
+
PelicanButton_default,
|
|
792
|
+
{
|
|
793
|
+
authType: config.authType,
|
|
794
|
+
text: config.buttonText,
|
|
795
|
+
type: "idle"
|
|
796
|
+
}
|
|
797
|
+
)
|
|
798
|
+
}
|
|
799
|
+
)
|
|
767
800
|
}
|
|
768
801
|
)
|
|
769
802
|
}
|
|
@@ -776,7 +809,7 @@ opacity: 0.9;
|
|
|
776
809
|
display: "flex",
|
|
777
810
|
justifyContent: "center",
|
|
778
811
|
alignItems: "center",
|
|
779
|
-
maxWidth: "
|
|
812
|
+
maxWidth: "300px"
|
|
780
813
|
},
|
|
781
814
|
children: state !== "idle" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "auth-container", children: [
|
|
782
815
|
successMessage && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -907,6 +940,41 @@ opacity: 0.9;
|
|
|
907
940
|
/* @__PURE__ */ jsxRuntime.jsx(StoreIcons_default, {})
|
|
908
941
|
] })
|
|
909
942
|
}
|
|
943
|
+
),
|
|
944
|
+
state !== "idle" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
945
|
+
"div",
|
|
946
|
+
{
|
|
947
|
+
style: {
|
|
948
|
+
width: "300px",
|
|
949
|
+
display: "flex",
|
|
950
|
+
justifyContent: "center",
|
|
951
|
+
alignItems: "center"
|
|
952
|
+
},
|
|
953
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
954
|
+
"button",
|
|
955
|
+
{
|
|
956
|
+
type: "button",
|
|
957
|
+
style: {
|
|
958
|
+
border: "none",
|
|
959
|
+
background: "transparent",
|
|
960
|
+
cursor: "pointer",
|
|
961
|
+
alignSelf: "center"
|
|
962
|
+
},
|
|
963
|
+
onClick: () => {
|
|
964
|
+
stop();
|
|
965
|
+
config.onClose?.();
|
|
966
|
+
},
|
|
967
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
968
|
+
PelicanButton_default,
|
|
969
|
+
{
|
|
970
|
+
authType: config.authType,
|
|
971
|
+
text: `Cancel`,
|
|
972
|
+
type: "cancel"
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
}
|
|
910
978
|
)
|
|
911
979
|
] })
|
|
912
980
|
] });
|