webs-sdk 0.18.39 → 0.18.41
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/README.md +451 -451
- package/dist/components/ARFilters/ARFilters.js +54 -54
- package/dist/components/AvatarAI.js +4 -4
- package/dist/components/CookieConsent/constants.js +31 -31
- package/dist/components/CreativeFaceSwap.js +12 -12
- package/dist/components/MemeGenerator.js +12 -12
- package/dist/components/PasswordReset/PasswordResetForm.d.ts +3 -0
- package/dist/components/PasswordReset/PasswordResetForm.d.ts.map +1 -0
- package/dist/components/PasswordReset/PasswordResetForm.js +130 -0
- package/dist/components/PasswordReset/PasswordResetForm.js.map +1 -0
- package/dist/components/PasswordReset/PasswordResetRequest.d.ts +3 -0
- package/dist/components/PasswordReset/PasswordResetRequest.d.ts.map +1 -0
- package/dist/components/PasswordReset/PasswordResetRequest.js +102 -0
- package/dist/components/PasswordReset/PasswordResetRequest.js.map +1 -0
- package/dist/components/PasswordReset/constants.d.ts +6 -0
- package/dist/components/PasswordReset/constants.d.ts.map +1 -0
- package/dist/components/PasswordReset/constants.js +55 -0
- package/dist/components/PasswordReset/constants.js.map +1 -0
- package/dist/components/PasswordReset/index.d.ts +5 -0
- package/dist/components/PasswordReset/index.d.ts.map +1 -0
- package/dist/components/PasswordReset/index.js +10 -0
- package/dist/components/PasswordReset/index.js.map +1 -0
- package/dist/components/PasswordReset/translations.d.ts +3 -0
- package/dist/components/PasswordReset/translations.d.ts.map +1 -0
- package/dist/components/PasswordReset/translations.js +72 -0
- package/dist/components/PasswordReset/translations.js.map +1 -0
- package/dist/components/PasswordReset/types.d.ts +89 -0
- package/dist/components/PasswordReset/types.d.ts.map +1 -0
- package/dist/components/PasswordReset/types.js +3 -0
- package/dist/components/PasswordReset/types.js.map +1 -0
- package/dist/components/SpinningWheel/SpinningWheel.js +7 -7
- package/dist/components/esports/live/EsportsLive.d.ts.map +1 -1
- package/dist/components/esports/live/EsportsLive.js +4 -1
- package/dist/components/esports/live/EsportsLive.js.map +1 -1
- package/dist/utils/videoValidation.d.ts.map +1 -1
- package/dist/utils/videoValidation.js +59 -4
- package/dist/utils/videoValidation.js.map +1 -1
- package/package.json +78 -78
- package/public/spin2win/assets/border-afristream.svg +26 -26
- package/public/spin2win/assets/border-efc.svg +23 -23
- package/public/spin2win/assets/border-totalgym.svg +27 -27
- package/public/spin2win/assets/border-womantoday.svg +26 -26
- package/public/spin2win/assets/indicator-afristream.svg +28 -28
- package/public/spin2win/assets/indicator-efc.svg +29 -29
- package/public/spin2win/assets/indicator-totalgym.svg +29 -29
- package/public/spin2win/fonts/switzer/README.md +22 -22
- package/dist/libraries/globals.d.ts +0 -17
- package/dist/libraries/globals.d.ts.map +0 -1
- package/dist/libraries/globals.js +0 -38
- package/dist/libraries/globals.js.map +0 -1
|
@@ -7,60 +7,60 @@ const useDeepAR_1 = require("./useDeepAR");
|
|
|
7
7
|
const FilterCarousel_1 = require("./FilterCarousel");
|
|
8
8
|
const Popups_1 = require("./Popups");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
|
-
const DEEPAR_CSS = `
|
|
11
|
-
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
12
|
-
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
13
|
-
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
14
|
-
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
15
|
-
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
16
|
-
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
17
|
-
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
18
|
-
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
19
|
-
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:16px;z-index:20}
|
|
20
|
-
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
|
|
21
|
-
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.8);border-color:rgba(255,255,255,.5)}
|
|
22
|
-
.deepar-fullscreen-button:active{transform:scale(.95);background:rgba(0,0,0,.9)}
|
|
23
|
-
@media(max-width:768px){.deepar-fullscreen-button{width:56px;height:56px;background:rgba(0,0,0,.7)}}
|
|
24
|
-
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
25
|
-
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
26
|
-
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
27
|
-
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
28
|
-
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
29
|
-
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
30
|
-
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
31
|
-
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
32
|
-
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
33
|
-
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
34
|
-
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
35
|
-
.deepar-carousel-slides{display:flex;gap:16px}
|
|
36
|
-
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
37
|
-
.deepar-carousel-slide:hover{opacity:.8}
|
|
38
|
-
.deepar-carousel-slide.active{opacity:1}
|
|
39
|
-
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
40
|
-
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
41
|
-
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
42
|
-
.deepar-carousel-arrow.prev{left:16px}
|
|
43
|
-
.deepar-carousel-arrow.next{right:16px}
|
|
44
|
-
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
45
|
-
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
46
|
-
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
47
|
-
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
48
|
-
.deepar-selection-ring-camera{color:#fff}
|
|
49
|
-
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
50
|
-
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
51
|
-
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
52
|
-
.deepar-creation-buttons>*{pointer-events:all}
|
|
53
|
-
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
54
|
-
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
55
|
-
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
56
|
-
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
57
|
-
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
58
|
-
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
59
|
-
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
60
|
-
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
61
|
-
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
62
|
-
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
63
|
-
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
10
|
+
const DEEPAR_CSS = `
|
|
11
|
+
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
12
|
+
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
13
|
+
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
14
|
+
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
15
|
+
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
16
|
+
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
17
|
+
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
18
|
+
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
19
|
+
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:16px;z-index:20}
|
|
20
|
+
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
|
|
21
|
+
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.8);border-color:rgba(255,255,255,.5)}
|
|
22
|
+
.deepar-fullscreen-button:active{transform:scale(.95);background:rgba(0,0,0,.9)}
|
|
23
|
+
@media(max-width:768px){.deepar-fullscreen-button{width:56px;height:56px;background:rgba(0,0,0,.7)}}
|
|
24
|
+
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
25
|
+
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
26
|
+
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
27
|
+
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
28
|
+
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
29
|
+
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
30
|
+
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
31
|
+
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
32
|
+
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
33
|
+
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
34
|
+
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
35
|
+
.deepar-carousel-slides{display:flex;gap:16px}
|
|
36
|
+
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
37
|
+
.deepar-carousel-slide:hover{opacity:.8}
|
|
38
|
+
.deepar-carousel-slide.active{opacity:1}
|
|
39
|
+
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
40
|
+
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
41
|
+
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
42
|
+
.deepar-carousel-arrow.prev{left:16px}
|
|
43
|
+
.deepar-carousel-arrow.next{right:16px}
|
|
44
|
+
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
45
|
+
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
46
|
+
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
47
|
+
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
48
|
+
.deepar-selection-ring-camera{color:#fff}
|
|
49
|
+
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
50
|
+
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
51
|
+
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
52
|
+
.deepar-creation-buttons>*{pointer-events:all}
|
|
53
|
+
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
54
|
+
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
55
|
+
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
56
|
+
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
57
|
+
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
58
|
+
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
59
|
+
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
60
|
+
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
61
|
+
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
62
|
+
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
63
|
+
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
64
64
|
`;
|
|
65
65
|
function ARFilters(props) {
|
|
66
66
|
(0, react_1.useEffect)(() => {
|
|
@@ -5,10 +5,10 @@ exports.AvatarAIForYouCard = AvatarAIForYouCard;
|
|
|
5
5
|
exports.AvatarAIPage = AvatarAIPage;
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const AVATAR_AI_CSS = `
|
|
9
|
-
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
10
|
-
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
11
|
-
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
8
|
+
const AVATAR_AI_CSS = `
|
|
9
|
+
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
10
|
+
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
11
|
+
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
12
12
|
`;
|
|
13
13
|
const defaultStyles = [
|
|
14
14
|
{ id: 1, name: 'Pirate', image: 'https://cdn.smarthubtech.net/upload/20240426_135427_99796_1_cuadrada.png' },
|
|
@@ -5,36 +5,36 @@ exports.COOKIE_CONSENT_COOKIE_NAME = 'cookieConsent';
|
|
|
5
5
|
exports.COOKIE_CONSENT_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
6
6
|
exports.TRACKING_PERMISSION_KEY = 'TRACKING_PERMISSION';
|
|
7
7
|
exports.FUNCTIONAL_PERMISSION_KEY = 'FUNCTIONAL_PERMISSION';
|
|
8
|
-
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
-
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
-
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
-
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
-
.cc-content{flex:1;min-width:0}
|
|
13
|
-
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
-
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
-
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
-
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
-
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
-
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
-
.cc-btn:hover{opacity:.88}
|
|
20
|
-
.cc-btn-essential{background:transparent}
|
|
21
|
-
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
-
.cc-config-link:hover{opacity:1}
|
|
23
|
-
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
-
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
-
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
-
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
-
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
-
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
-
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
-
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
-
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
-
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
-
.cc-checkbox:disabled{cursor:default}
|
|
34
|
-
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
-
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
-
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
-
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
-
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
8
|
+
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
+
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
+
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
+
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
+
.cc-content{flex:1;min-width:0}
|
|
13
|
+
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
+
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
+
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
+
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
+
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
+
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
+
.cc-btn:hover{opacity:.88}
|
|
20
|
+
.cc-btn-essential{background:transparent}
|
|
21
|
+
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
+
.cc-config-link:hover{opacity:1}
|
|
23
|
+
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
+
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
+
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
+
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
+
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
+
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
+
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
+
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
+
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
+
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
+
.cc-checkbox:disabled{cursor:default}
|
|
34
|
+
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
+
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
+
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
+
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
+
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
39
39
|
`;
|
|
40
40
|
//# sourceMappingURL=constants.js.map
|
|
@@ -9,18 +9,18 @@ exports.CreativeFaceSwap = CreativeFaceSwap;
|
|
|
9
9
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
10
|
const react_1 = require("react");
|
|
11
11
|
const link_1 = __importDefault(require("next/link"));
|
|
12
|
-
const FACESWAP_CSS = `
|
|
13
|
-
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
14
|
-
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
15
|
-
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
16
|
-
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
17
|
-
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
18
|
-
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
19
|
-
@media (max-width: 768px) {
|
|
20
|
-
.faceswap-layout { flex-direction: column; }
|
|
21
|
-
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
22
|
-
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
23
|
-
}
|
|
12
|
+
const FACESWAP_CSS = `
|
|
13
|
+
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
14
|
+
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
15
|
+
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
16
|
+
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
17
|
+
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
18
|
+
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
19
|
+
@media (max-width: 768px) {
|
|
20
|
+
.faceswap-layout { flex-direction: column; }
|
|
21
|
+
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
22
|
+
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
23
|
+
}
|
|
24
24
|
`;
|
|
25
25
|
function CreativeFaceSwapForYouCard({ title, description, ctaText, ctaHref, desktopImage, mobileImage, imageAlt = '', imageOnRight = true, titleColor = '#001B5E', descriptionColor = '#001B5E', ctaColor = '#FF5500', ctaHoverColor = '#ff1600', backgroundColor = '#F9F9F9', paddingClass = 'py-12 md:py-16 lg:py-20', }) {
|
|
26
26
|
const effectiveMobileImage = mobileImage || desktopImage;
|
|
@@ -31,18 +31,18 @@ const defaultTexts = {
|
|
|
31
31
|
noMemes: 'No memes available',
|
|
32
32
|
};
|
|
33
33
|
const TEXT_SHADOW = '2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000';
|
|
34
|
-
const MEME_CSS = `
|
|
35
|
-
.memegen-grid {
|
|
36
|
-
display: grid;
|
|
37
|
-
grid-template-columns: 1fr;
|
|
38
|
-
gap: 24px;
|
|
39
|
-
align-items: stretch;
|
|
40
|
-
}
|
|
41
|
-
@media (min-width: 1024px) {
|
|
42
|
-
.memegen-grid {
|
|
43
|
-
grid-template-columns: 1fr 1fr;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
34
|
+
const MEME_CSS = `
|
|
35
|
+
.memegen-grid {
|
|
36
|
+
display: grid;
|
|
37
|
+
grid-template-columns: 1fr;
|
|
38
|
+
gap: 24px;
|
|
39
|
+
align-items: stretch;
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 1024px) {
|
|
42
|
+
.memegen-grid {
|
|
43
|
+
grid-template-columns: 1fr 1fr;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
46
|
`;
|
|
47
47
|
function MemeGenerator({ memes: memesProp, config, fonts = defaultFonts, defaultMemeIndex = 0, theme = {}, texts = {}, imageProxyUrl, onDownload, }) {
|
|
48
48
|
const mergedTheme = Object.assign(Object.assign({}, defaultTheme), theme);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PasswordResetFormProps } from './types';
|
|
2
|
+
export declare function PasswordResetForm({ token, websiteId, locale, logoUrl, logoAlt, theme: themeProp, texts: textsProp, passwordRules: rulesProp, onSuccess, onError, }: PasswordResetFormProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=PasswordResetForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordResetForm.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordReset/PasswordResetForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAA8C,MAAM,SAAS,CAAC;AAuFlG,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,SAAS,EACT,MAAa,EACb,OAAO,EACP,OAAY,EACZ,KAAK,EAAE,SAAc,EACrB,KAAK,EAAE,SAAc,EACrB,aAAa,EAAE,SAAc,EAC7B,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,2CAsPxB"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PasswordResetForm = PasswordResetForm;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const translations_1 = require("./translations");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
function injectStyles(css) {
|
|
10
|
+
if (typeof document === 'undefined')
|
|
11
|
+
return;
|
|
12
|
+
if (document.getElementById(constants_1.STYLE_ID))
|
|
13
|
+
return;
|
|
14
|
+
const style = document.createElement('style');
|
|
15
|
+
style.id = constants_1.STYLE_ID;
|
|
16
|
+
style.textContent = css;
|
|
17
|
+
document.head.appendChild(style);
|
|
18
|
+
}
|
|
19
|
+
function IconLock({ color }) {
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }));
|
|
21
|
+
}
|
|
22
|
+
function IconEye({ color }) {
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "3" })] }));
|
|
24
|
+
}
|
|
25
|
+
function IconEyeOff({ color }) {
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }), (0, jsx_runtime_1.jsx)("line", { x1: "1", y1: "1", x2: "23", y2: "23" })] }));
|
|
27
|
+
}
|
|
28
|
+
function evaluateRules(password, rules, minLengthLabel, uppercaseLabel, numberLabel, specialCharLabel) {
|
|
29
|
+
const results = [
|
|
30
|
+
{
|
|
31
|
+
key: 'minLength',
|
|
32
|
+
label: minLengthLabel.replace('{n}', String(rules.minLength)),
|
|
33
|
+
met: password.length >= rules.minLength,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
if (rules.requireUppercase) {
|
|
37
|
+
results.push({ key: 'uppercase', label: uppercaseLabel, met: /[A-Z]/.test(password) });
|
|
38
|
+
}
|
|
39
|
+
if (rules.requireNumber) {
|
|
40
|
+
results.push({ key: 'number', label: numberLabel, met: /[0-9]/.test(password) });
|
|
41
|
+
}
|
|
42
|
+
if (rules.requireSpecialChar) {
|
|
43
|
+
results.push({ key: 'specialChar', label: specialCharLabel, met: /[^a-zA-Z0-9]/.test(password) });
|
|
44
|
+
}
|
|
45
|
+
return results;
|
|
46
|
+
}
|
|
47
|
+
function PasswordResetForm({ token, websiteId, locale = 'en', logoUrl, logoAlt = '', theme: themeProp = {}, texts: textsProp = {}, passwordRules: rulesProp = {}, onSuccess, onError, }) {
|
|
48
|
+
const [newPassword, setNewPassword] = (0, react_1.useState)('');
|
|
49
|
+
const [confirmPassword, setConfirmPassword] = (0, react_1.useState)('');
|
|
50
|
+
const [showNew, setShowNew] = (0, react_1.useState)(false);
|
|
51
|
+
const [showConfirm, setShowConfirm] = (0, react_1.useState)(false);
|
|
52
|
+
const [status, setStatus] = (0, react_1.useState)('idle');
|
|
53
|
+
const [errorMessage, setErrorMessage] = (0, react_1.useState)('');
|
|
54
|
+
const theme = Object.assign(Object.assign({}, constants_1.DEFAULT_THEME), themeProp);
|
|
55
|
+
const texts = Object.assign(Object.assign({}, (0, translations_1.getPasswordResetTexts)(locale)), textsProp);
|
|
56
|
+
const rules = Object.assign(Object.assign({}, constants_1.DEFAULT_PASSWORD_RULES), rulesProp);
|
|
57
|
+
(0, react_1.useEffect)(() => {
|
|
58
|
+
injectStyles(constants_1.PASSWORD_RESET_CSS);
|
|
59
|
+
}, []);
|
|
60
|
+
const ruleResults = (0, react_1.useMemo)(() => evaluateRules(newPassword, rules, texts.ruleMinLength, texts.ruleUppercase, texts.ruleNumber, texts.ruleSpecialChar), [newPassword, rules.minLength, rules.requireUppercase, rules.requireNumber, rules.requireSpecialChar]);
|
|
61
|
+
const allRulesMet = ruleResults.every((r) => r.met);
|
|
62
|
+
const iconColor = theme.mutedTextColor;
|
|
63
|
+
const handleSubmit = async (e) => {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
if (!newPassword) {
|
|
66
|
+
setErrorMessage(texts.errorRequired);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!allRulesMet) {
|
|
70
|
+
setErrorMessage(texts.errorPasswordInvalid);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!confirmPassword) {
|
|
74
|
+
setErrorMessage(texts.errorRequired);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (newPassword !== confirmPassword) {
|
|
78
|
+
setErrorMessage(texts.errorPasswordMismatch);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
setErrorMessage('');
|
|
82
|
+
setStatus('loading');
|
|
83
|
+
const payload = {
|
|
84
|
+
token,
|
|
85
|
+
newPassword,
|
|
86
|
+
confirmPassword,
|
|
87
|
+
websiteId,
|
|
88
|
+
};
|
|
89
|
+
try {
|
|
90
|
+
await onSuccess(payload);
|
|
91
|
+
setStatus('success');
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
const error = err instanceof Error ? err : new Error(texts.errorGeneric);
|
|
95
|
+
setStatus('error');
|
|
96
|
+
setErrorMessage(error.message);
|
|
97
|
+
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "pr-page", style: {
|
|
101
|
+
backgroundColor: theme.backgroundColor,
|
|
102
|
+
fontFamily: theme.fontFamily,
|
|
103
|
+
color: theme.textColor,
|
|
104
|
+
['--pr-ph']: theme.mutedTextColor,
|
|
105
|
+
}, children: [logoUrl && ((0, jsx_runtime_1.jsx)("div", { className: "pr-logo-wrap", children: (0, jsx_runtime_1.jsx)("img", { src: logoUrl, alt: logoAlt, className: "pr-logo" }) })), (0, jsx_runtime_1.jsx)("div", { className: "pr-card", style: {
|
|
106
|
+
backgroundColor: theme.cardBackgroundColor,
|
|
107
|
+
borderRadius: theme.cardBorderRadius,
|
|
108
|
+
}, children: status === 'success' ? ((0, jsx_runtime_1.jsxs)("div", { className: "pr-success", children: [(0, jsx_runtime_1.jsx)("div", { className: "pr-success-icon", "aria-hidden": "true", children: "\u2705" }), (0, jsx_runtime_1.jsx)("p", { className: "pr-success-text", style: { color: theme.textColor }, children: texts.formSuccessMessage })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h1", { className: "pr-title", style: { color: theme.textColor }, children: texts.formTitle }), texts.formSubtitle && ((0, jsx_runtime_1.jsx)("p", { className: "pr-subtitle", style: { color: theme.mutedTextColor }, children: texts.formSubtitle })), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handleSubmit, noValidate: true, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-field", children: [(0, jsx_runtime_1.jsx)("label", { className: "pr-label", style: { color: theme.textColor }, children: texts.newPasswordLabel }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-input-wrap", children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-input-icon", children: (0, jsx_runtime_1.jsx)(IconLock, { color: iconColor }) }), (0, jsx_runtime_1.jsx)("input", { className: "pr-input", type: showNew ? 'text' : 'password', value: newPassword, onChange: (e) => {
|
|
109
|
+
setNewPassword(e.target.value);
|
|
110
|
+
if (errorMessage)
|
|
111
|
+
setErrorMessage('');
|
|
112
|
+
}, placeholder: texts.newPasswordPlaceholder, disabled: status === 'loading', autoComplete: "new-password", style: {
|
|
113
|
+
backgroundColor: theme.inputBackgroundColor,
|
|
114
|
+
borderColor: errorMessage ? theme.errorColor : theme.inputBorderColor,
|
|
115
|
+
color: theme.textColor,
|
|
116
|
+
paddingRight: '44px',
|
|
117
|
+
} }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "pr-input-eye", onClick: () => setShowNew((v) => !v), "aria-label": showNew ? 'Hide password' : 'Show password', tabIndex: -1, style: { color: iconColor }, children: showNew ? (0, jsx_runtime_1.jsx)(IconEyeOff, { color: iconColor }) : (0, jsx_runtime_1.jsx)(IconEye, { color: iconColor }) })] }), newPassword.length > 0 && ((0, jsx_runtime_1.jsx)("ul", { className: "pr-rules", role: "list", "aria-label": "Password requirements", children: ruleResults.map((rule) => ((0, jsx_runtime_1.jsxs)("li", { className: "pr-rule", style: { color: rule.met ? theme.successColor : theme.mutedTextColor }, children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-rule-dot", style: { backgroundColor: rule.met ? theme.successColor : 'rgba(255,255,255,0.2)' } }), rule.label] }, rule.key))) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-field", children: [(0, jsx_runtime_1.jsx)("label", { className: "pr-label", style: { color: theme.textColor }, children: texts.confirmPasswordLabel }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-input-wrap", children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-input-icon", children: (0, jsx_runtime_1.jsx)(IconLock, { color: iconColor }) }), (0, jsx_runtime_1.jsx)("input", { className: "pr-input", type: showConfirm ? 'text' : 'password', value: confirmPassword, onChange: (e) => {
|
|
118
|
+
setConfirmPassword(e.target.value);
|
|
119
|
+
if (errorMessage)
|
|
120
|
+
setErrorMessage('');
|
|
121
|
+
}, placeholder: texts.confirmPasswordPlaceholder, disabled: status === 'loading', autoComplete: "off", style: {
|
|
122
|
+
backgroundColor: theme.inputBackgroundColor,
|
|
123
|
+
borderColor: errorMessage ? theme.errorColor : theme.inputBorderColor,
|
|
124
|
+
color: theme.textColor,
|
|
125
|
+
paddingRight: '44px',
|
|
126
|
+
} }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "pr-input-eye", onClick: () => setShowConfirm((v) => !v), "aria-label": showConfirm ? 'Hide password' : 'Show password', tabIndex: -1, style: { color: iconColor }, children: showConfirm ? (0, jsx_runtime_1.jsx)(IconEyeOff, { color: iconColor }) : (0, jsx_runtime_1.jsx)(IconEye, { color: iconColor }) })] })] }), (status === 'error' || errorMessage) && ((0, jsx_runtime_1.jsx)("p", { className: "pr-error-msg", role: "alert", style: { color: theme.errorColor }, children: errorMessage })), (0, jsx_runtime_1.jsxs)("button", { type: "submit", className: "pr-btn", disabled: status === 'loading', style: { backgroundColor: theme.accentColor, color: '#ffffff' }, children: [status === 'loading' && (0, jsx_runtime_1.jsx)("span", { className: "pr-spinner", "aria-hidden": "true" }), status === 'loading'
|
|
127
|
+
? texts.submitFormLoadingButton
|
|
128
|
+
: texts.submitFormButton] })] })] })) })] }));
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=PasswordResetForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordResetForm.js","sourceRoot":"","sources":["../../../src/components/PasswordReset/PasswordResetForm.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AA0Fb,8CAiQC;;AAzVD,iCAA4D;AAE5D,iDAAuD;AACvD,2CAAkG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,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,YACxE,YAAY,GACX,CACL,EAED,oCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAE,MAAM,KAAK,SAAS,EAC9B,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,aAE9D,MAAM,KAAK,SAAS,IAAI,iCAAM,SAAS,EAAC,YAAY,iBAAa,MAAM,GAAG,EAC1E,MAAM,KAAK,SAAS;4CACnB,CAAC,CAAC,KAAK,CAAC,uBAAuB;4CAC/B,CAAC,CAAC,KAAK,CAAC,gBAAgB,IACnB,IACJ,IACN,CACJ,GACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PasswordResetRequestProps } from './types';
|
|
2
|
+
export declare function PasswordResetRequest({ websiteId, identifierType, locale, logoUrl, logoAlt, theme: themeProp, texts: textsProp, websiteMeta, onSuccess, onError, }: PasswordResetRequestProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=PasswordResetRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordResetRequest.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordReset/PasswordResetRequest.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAA+B,MAAM,SAAS,CAAC;AAiDtF,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,cAAc,EACd,MAAa,EACb,OAAO,EACP,OAAY,EACZ,KAAK,EAAE,SAAc,EACrB,KAAK,EAAE,SAAc,EACrB,WAAW,EACX,SAAS,EACT,OAAO,GACR,EAAE,yBAAyB,2CA8K3B"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PasswordResetRequest = PasswordResetRequest;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const translations_1 = require("./translations");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
function injectStyles(css) {
|
|
10
|
+
if (typeof document === 'undefined')
|
|
11
|
+
return;
|
|
12
|
+
if (document.getElementById(constants_1.STYLE_ID))
|
|
13
|
+
return;
|
|
14
|
+
const style = document.createElement('style');
|
|
15
|
+
style.id = constants_1.STYLE_ID;
|
|
16
|
+
style.textContent = css;
|
|
17
|
+
document.head.appendChild(style);
|
|
18
|
+
}
|
|
19
|
+
function isValidEmail(value) {
|
|
20
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
|
21
|
+
}
|
|
22
|
+
function IconEmail({ color }) {
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }), (0, jsx_runtime_1.jsx)("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })] }));
|
|
24
|
+
}
|
|
25
|
+
function IconPhone({ color }) {
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12 19.79 19.79 0 0 1 1.61 3.42 2 2 0 0 1 3.6 1.27h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.91a16 16 0 0 0 6 6l.92-.92a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z" }) }));
|
|
27
|
+
}
|
|
28
|
+
function IconUser({ color }) {
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "8", r: "4" }), (0, jsx_runtime_1.jsx)("path", { d: "M4 20c0-4 3.6-7 8-7s8 3 8 7" })] }));
|
|
30
|
+
}
|
|
31
|
+
function PasswordResetRequest({ websiteId, identifierType, locale = 'en', logoUrl, logoAlt = '', theme: themeProp = {}, texts: textsProp = {}, websiteMeta, onSuccess, onError, }) {
|
|
32
|
+
const [identifier, setIdentifier] = (0, react_1.useState)('');
|
|
33
|
+
const [status, setStatus] = (0, react_1.useState)('idle');
|
|
34
|
+
const [errorMessage, setErrorMessage] = (0, react_1.useState)('');
|
|
35
|
+
const theme = Object.assign(Object.assign({}, constants_1.DEFAULT_THEME), themeProp);
|
|
36
|
+
const texts = Object.assign(Object.assign({}, (0, translations_1.getPasswordResetTexts)(locale)), textsProp);
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
38
|
+
injectStyles(constants_1.PASSWORD_RESET_CSS);
|
|
39
|
+
}, []);
|
|
40
|
+
const identifierLabel = identifierType === 'email' ? texts.identifierLabelEmail :
|
|
41
|
+
identifierType === 'phone' ? texts.identifierLabelPhone :
|
|
42
|
+
texts.identifierLabelUsername;
|
|
43
|
+
const identifierPlaceholder = identifierType === 'email' ? texts.identifierPlaceholderEmail :
|
|
44
|
+
identifierType === 'phone' ? texts.identifierPlaceholderPhone :
|
|
45
|
+
texts.identifierPlaceholderUsername;
|
|
46
|
+
const inputType = identifierType === 'email' ? 'email' :
|
|
47
|
+
identifierType === 'phone' ? 'tel' :
|
|
48
|
+
'text';
|
|
49
|
+
const inputAutoComplete = identifierType === 'email' ? 'email' :
|
|
50
|
+
identifierType === 'phone' ? 'tel' :
|
|
51
|
+
'username';
|
|
52
|
+
const IdentifierIcon = identifierType === 'email' ? IconEmail :
|
|
53
|
+
identifierType === 'phone' ? IconPhone :
|
|
54
|
+
IconUser;
|
|
55
|
+
const handleSubmit = async (e) => {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
const trimmed = identifier.trim();
|
|
58
|
+
if (!trimmed) {
|
|
59
|
+
setErrorMessage(texts.errorRequired);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (identifierType === 'email' && !isValidEmail(trimmed)) {
|
|
63
|
+
setErrorMessage(texts.errorInvalidEmail);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
setErrorMessage('');
|
|
67
|
+
setStatus('loading');
|
|
68
|
+
const payload = Object.assign({ identifier: trimmed, identifierType,
|
|
69
|
+
websiteId }, (websiteMeta ? { websiteMeta } : {}));
|
|
70
|
+
try {
|
|
71
|
+
await onSuccess(payload);
|
|
72
|
+
setStatus('success');
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
const error = err instanceof Error ? err : new Error(texts.errorGeneric);
|
|
76
|
+
setStatus('error');
|
|
77
|
+
setErrorMessage(error.message);
|
|
78
|
+
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const iconColor = theme.mutedTextColor;
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "pr-page", style: {
|
|
83
|
+
backgroundColor: theme.backgroundColor,
|
|
84
|
+
fontFamily: theme.fontFamily,
|
|
85
|
+
color: theme.textColor,
|
|
86
|
+
['--pr-ph']: theme.mutedTextColor,
|
|
87
|
+
}, children: [logoUrl && ((0, jsx_runtime_1.jsx)("div", { className: "pr-logo-wrap", children: (0, jsx_runtime_1.jsx)("img", { src: logoUrl, alt: logoAlt, className: "pr-logo" }) })), (0, jsx_runtime_1.jsx)("div", { className: "pr-card", style: {
|
|
88
|
+
backgroundColor: theme.cardBackgroundColor,
|
|
89
|
+
borderRadius: theme.cardBorderRadius,
|
|
90
|
+
}, children: status === 'success' ? ((0, jsx_runtime_1.jsxs)("div", { className: "pr-success", children: [(0, jsx_runtime_1.jsx)("div", { className: "pr-success-icon", "aria-hidden": "true", children: "\u2709\uFE0F" }), (0, jsx_runtime_1.jsx)("p", { className: "pr-success-text", style: { color: theme.textColor }, children: texts.requestSuccessMessage })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h1", { className: "pr-title", style: { color: theme.textColor }, children: texts.requestTitle }), texts.requestSubtitle && ((0, jsx_runtime_1.jsx)("p", { className: "pr-subtitle", style: { color: theme.mutedTextColor }, children: texts.requestSubtitle })), (0, jsx_runtime_1.jsxs)("form", { onSubmit: handleSubmit, noValidate: true, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-field", children: [(0, jsx_runtime_1.jsx)("label", { className: "pr-label", style: { color: theme.textColor }, children: identifierLabel }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-input-wrap", children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-input-icon", children: (0, jsx_runtime_1.jsx)(IdentifierIcon, { color: iconColor }) }), (0, jsx_runtime_1.jsx)("input", { className: "pr-input", type: inputType, value: identifier, onChange: (e) => {
|
|
91
|
+
setIdentifier(e.target.value);
|
|
92
|
+
if (errorMessage)
|
|
93
|
+
setErrorMessage('');
|
|
94
|
+
}, placeholder: identifierPlaceholder, disabled: status === 'loading', autoComplete: inputAutoComplete, style: {
|
|
95
|
+
backgroundColor: theme.inputBackgroundColor,
|
|
96
|
+
borderColor: errorMessage ? theme.errorColor : theme.inputBorderColor,
|
|
97
|
+
color: theme.textColor,
|
|
98
|
+
} })] })] }), (status === 'error' || errorMessage) && ((0, jsx_runtime_1.jsx)("p", { className: "pr-error-msg", role: "alert", style: { color: theme.errorColor }, children: errorMessage })), (0, jsx_runtime_1.jsxs)("button", { type: "submit", className: "pr-btn", disabled: status === 'loading', style: { backgroundColor: theme.accentColor, color: '#ffffff' }, children: [status === 'loading' && (0, jsx_runtime_1.jsx)("span", { className: "pr-spinner", "aria-hidden": "true" }), status === 'loading'
|
|
99
|
+
? texts.submitRequestLoadingButton
|
|
100
|
+
: texts.submitRequestButton] })] })] })) })] }));
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=PasswordResetRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordResetRequest.js","sourceRoot":"","sources":["../../../src/components/PasswordReset/PasswordResetRequest.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAoDb,oDAyLC;;AA3OD,iCAAmD;AAEnD,iDAAuD;AACvD,2CAA0E;AAI1E,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAC5C,IAAI,QAAQ,CAAC,cAAc,CAAC,oBAAQ,CAAC;QAAE,OAAO;IAC9C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,oBAAQ,CAAC;IACpB,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClD,CAAC;AAID,SAAS,SAAS,CAAC,EAAE,KAAK,EAAqB;IAC7C,OAAO,CACL,iCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAC,GAAG,E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0B;4CAClC,CAAC,CAAC,KAAK,CAAC,mBAAmB,IACtB,IACJ,IACN,CACJ,GACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PasswordResetTheme, PasswordRules } from './types';
|
|
2
|
+
export declare const STYLE_ID = "webs-sdk-password-reset";
|
|
3
|
+
export declare const DEFAULT_THEME: Required<PasswordResetTheme>;
|
|
4
|
+
export declare const DEFAULT_PASSWORD_RULES: Required<PasswordRules>;
|
|
5
|
+
export declare const PASSWORD_RESET_CSS = "\n.pr-page{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:24px 16px;box-sizing:border-box}\n.pr-logo-wrap{margin-bottom:24px;text-align:center}\n.pr-logo{display:block;max-width:180px;max-height:52px;width:auto;height:auto;object-fit:contain;margin:0 auto}\n.pr-card{width:100%;max-width:448px;padding:40px 36px;box-sizing:border-box}\n@media(max-width:480px){.pr-card{padding:32px 20px}}\n.pr-title{font-size:22px;font-weight:700;text-align:center;margin:0 0 8px 0;line-height:1.25}\n.pr-subtitle{font-size:14px;text-align:center;margin:0 0 28px 0;line-height:1.55}\n.pr-field{margin-bottom:18px}\n.pr-label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}\n.pr-input-wrap{position:relative;display:flex;align-items:center}\n.pr-input-icon{position:absolute;left:14px;width:17px;height:17px;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center}\n.pr-input-icon svg{width:17px;height:17px;display:block}\n.pr-input{width:100%;padding:13px 44px;border-radius:999px;border:1.5px solid;font-size:14px;outline:none;transition:border-color .18s;box-sizing:border-box;font-family:inherit;line-height:1.4}\n.pr-input::placeholder{color:var(--pr-ph,rgba(255,255,255,0.35))}\n.pr-input-eye{position:absolute;right:14px;background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:opacity .18s;line-height:0}\n.pr-input-eye svg{width:17px;height:17px;display:block}\n.pr-btn{width:100%;padding:14px 24px;border-radius:999px;border:none;font-size:15px;font-weight:700;cursor:pointer;transition:opacity .18s,transform .1s;margin-top:12px;font-family:inherit;display:flex;align-items:center;justify-content:center;gap:8px;line-height:1}\n.pr-btn:hover:not(:disabled){opacity:.85}\n.pr-btn:active:not(:disabled){transform:scale(.98)}\n.pr-btn:disabled{cursor:not-allowed;opacity:.5}\n.pr-spinner{width:15px;height:15px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:pr-spin .65s linear infinite;flex-shrink:0}\n@keyframes pr-spin{to{transform:rotate(360deg)}}\n.pr-error-msg{font-size:13px;text-align:center;margin:14px 0 0 0;line-height:1.5}\n.pr-success{text-align:center;padding:8px 0}\n.pr-success-icon{font-size:42px;margin-bottom:16px;line-height:1}\n.pr-success-text{font-size:15px;line-height:1.65;margin:0}\n.pr-rules{margin:10px 0 4px 6px;display:flex;flex-direction:column;gap:7px}\n.pr-rule{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.3;transition:color .2s}\n.pr-rule-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;transition:background-color .2s}\n";
|
|
6
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/PasswordReset/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,QAAQ,4BAA4B,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,kBAAkB,CAYtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,aAAa,CAK1D,CAAC;AASF,eAAO,MAAM,kBAAkB,ypFA8B9B,CAAC"}
|