@thefittingroom/shop-ui 1.4.5 → 1.4.6
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/esm/components/SizeRec.d.ts +1 -0
- package/dist/esm/index.js +22 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +50 -50
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v1.4.
|
|
2
|
+
* thefittingroom v1.4.6 (2024-08-02T18:18:06.336Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
function loadImageRecursive(imageURL, imageURLs) {
|
|
@@ -26013,7 +26013,7 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
|
|
|
26013
26013
|
var css$9 = ".tfr-c-white{color:var(--tfr-white)}.tfr-c-brand{color:var(--tfr-brand-color)}.tfr-c-brand-bg{background-color:var(--tfr-brand-color)}.tfr-c-black{color:var(--tfr-black)}.tfr-c-black-o5{color:rgba(0,0,0,.5)}.tfr-c-red{color:var(--tfr-red)}";
|
|
26014
26014
|
n(css$9,{});
|
|
26015
26015
|
|
|
26016
|
-
var css$8 = ".tfr-home-button-container{display:flex;flex-wrap:wrap;margin:20px}.tfr-home-button-container>button{border:0;cursor:pointer;height:60px;margin:20px;width:200px}.tfr-home-button-container>button:hover{background-color:#e6e6e6}[data-tfr=hidden]{display:none}.tfr-modal{background-color:rgba(0,0,0,.53);display:flex;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.tfr-modal-content{margin:auto;text-align:center;width:90%}.tfr-modal-content-flex{align-items:center;display:flex}.tfr-modal-content-container{background-color:#fff;border:1px solid #434343;border-radius:0;box-shadow:0 6px 6px #00000029;line-height:normal;margin:auto;max-height:100vh;max-width:709px;overflow:auto;width:100%}.tfr-close-container{text-align:end}.tfr-close{color:#aaa;font-size:28px;font-weight:700;height:50px;width:50px}.tfr-close:focus,.tfr-close:hover{color:#000;text-decoration:none}.tfr-cursor:hover{cursor:pointer}.tfr-underline{text-decoration:underline}.tfr-standard-button{border:0;border-radius:3px;color:#fff;height:43px;width:138px}.tfr-logo-container{align-items:center;display:flex}.tfr-modal-title-logo-container{align-items:center;display:flex;justify-content:center}.tfr-girl-clothes{display:inline-block;height:316px;width:253px}.tfr-t-a-center{text-align:center}.tfr-w-70-p{width:70%}.tfr-w-80-p{width:80%}.tfr-w-85-p{width:85%}.tfr-w-150{width:150px}.tfr-h-150{height:150px}.tfr-d-none{display:none}.tfr-d-block{display:block}.tfr-d-flex{display:flex}.tfr-how-it-works-item{align-items:center;display:flex;justify-items:center}.tfr-try-on-content{margin-left:60px}#tfr-tryon-image{max-width:30vw}.progress-bar{background-color:#fff;border:1px solid #bdbdbd;height:10px;margin:15px auto 0;width:55%}.progress-bar-fill{animation-duration:120s;animation-name:progress;background-color:#209da7;color:#fff;display:block;font-size:16px;height:100%;text-align:center;transition:width .6s linear}#tfr-video{height:100%;max-height:390px;max-width:390px}.tfr-logo-box{aspect-ratio:1;margin:auto;max-height:430px;max-width:430px;padding:20px}.tfr-flex,.tfr-logo-box{align-items:center;display:flex;justify-content:center}.tfr-qr-code{width:
|
|
26016
|
+
var css$8 = ".tfr-home-button-container{display:flex;flex-wrap:wrap;margin:20px}.tfr-home-button-container>button{border:0;cursor:pointer;height:60px;margin:20px;width:200px}.tfr-home-button-container>button:hover{background-color:#e6e6e6}[data-tfr=hidden]{display:none}.tfr-modal{background-color:rgba(0,0,0,.53);display:flex;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.tfr-modal-content{margin:auto;text-align:center;width:90%}.tfr-modal-content-flex{align-items:center;display:flex}.tfr-modal-content-container{background-color:#fff;border:1px solid #434343;border-radius:0;box-shadow:0 6px 6px #00000029;line-height:normal;margin:auto;max-height:100vh;max-width:709px;overflow:auto;width:100%}.tfr-close-container{text-align:end}.tfr-close{color:#aaa;font-size:28px;font-weight:700;height:50px;width:50px}.tfr-close:focus,.tfr-close:hover{color:#000;text-decoration:none}.tfr-cursor:hover{cursor:pointer}.tfr-underline{text-decoration:underline}.tfr-standard-button{border:0;border-radius:3px;color:#fff;height:43px;width:138px}.tfr-logo-container{align-items:center;display:flex}.tfr-modal-title-logo-container{align-items:center;display:flex;justify-content:center}.tfr-girl-clothes{display:inline-block;height:316px;width:253px}.tfr-t-a-center{text-align:center}.tfr-w-70-p{width:70%}.tfr-w-80-p{width:80%}.tfr-w-85-p{width:85%}.tfr-w-150{width:150px}.tfr-h-150{height:150px}.tfr-d-none{display:none}.tfr-d-block{display:block}.tfr-d-flex{display:flex}.tfr-how-it-works-item{align-items:center;display:flex;justify-items:center}.tfr-try-on-content{margin-left:60px}#tfr-tryon-image{max-width:30vw}.progress-bar{background-color:#fff;border:1px solid #bdbdbd;height:10px;margin:15px auto 0;width:55%}.progress-bar-fill{animation-duration:120s;animation-name:progress;background-color:#209da7;color:#fff;display:block;font-size:16px;height:100%;text-align:center;transition:width .6s linear}#tfr-video{height:100%;max-height:390px;max-width:390px}.tfr-logo-box{aspect-ratio:1;margin:auto;max-height:430px;max-width:430px;padding:20px}.tfr-flex,.tfr-logo-box{align-items:center;display:flex;justify-content:center}.tfr-qr-code{width:150px}.tfr-space-above{margin-top:10px}";
|
|
26017
26017
|
n(css$8,{});
|
|
26018
26018
|
|
|
26019
26019
|
var css$7 = "input{border:none;box-shadow:none!important;width:100%}input:focus,select:focus,textarea:focus{border:none;outline:none}.tfr-fieldset{margin-left:auto;margin-right:auto;width:65%}.tfr-fieldset,.tfr-fieldset-inline{border-color:rgba(0,0,0,.5);border-radius:10px;border-width:1px;padding:5px 10px 10px;text-align:left}.tfr-fieldset-inline{margin-right:10px;width:250px}.tfr-fieldset-err{border-color:red}";
|
|
@@ -26321,20 +26321,25 @@ const ScanCodeModal = (props) => {
|
|
|
26321
26321
|
(_b = document.getElementById('tfr-app-store')) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', onCtaClickApple);
|
|
26322
26322
|
(_c = document.getElementById('tfr-google-play')) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', onCtaClickGoogle);
|
|
26323
26323
|
};
|
|
26324
|
-
const
|
|
26325
|
-
const
|
|
26326
|
-
|
|
26327
|
-
|
|
26328
|
-
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
|
|
26324
|
+
const imageBaseUrl = 'https://assets.dev.thefittingroom.xyz/images/';
|
|
26325
|
+
const renderMobile = () => !isMobile
|
|
26326
|
+
? ``
|
|
26327
|
+
: `<div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${L.ClickHereToDownload}</div>
|
|
26328
|
+
|
|
26329
|
+
<div tfr-element="true" class="tfr-flex tfr-space-above">
|
|
26330
|
+
<img src="${imageBaseUrl}apple.png" id="tfr-app-store" />
|
|
26331
|
+
<img src="${imageBaseUrl}google.png" id="tfr-google-play" />
|
|
26332
|
+
</div>`;
|
|
26333
|
+
const renderDesktop = () => isMobile
|
|
26334
|
+
? ``
|
|
26335
|
+
: `<div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${L.ScanQrToDownload}</div>
|
|
26336
|
+
|
|
26337
|
+
<img src="${imageBaseUrl}qr.png" class="tfr-qr-code" />`;
|
|
26334
26338
|
const body = () => {
|
|
26335
26339
|
return `
|
|
26336
26340
|
<div tfr-element="true">
|
|
26337
26341
|
<div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${L.ModalText}</div>
|
|
26342
|
+
${renderDesktop()}
|
|
26338
26343
|
</div>
|
|
26339
26344
|
<div tfr-element="true" class="tfr-logo-box">
|
|
26340
26345
|
<video id="tfr-video" controls autoplay loop>
|
|
@@ -26342,11 +26347,7 @@ const ScanCodeModal = (props) => {
|
|
|
26342
26347
|
</video>
|
|
26343
26348
|
</div>
|
|
26344
26349
|
|
|
26345
|
-
|
|
26346
|
-
|
|
26347
|
-
<div tfr-element="true" class="tfr-flex tfr-space-above">
|
|
26348
|
-
${renderImages()}
|
|
26349
|
-
</div>
|
|
26350
|
+
${renderMobile()}
|
|
26350
26351
|
|
|
26351
26352
|
<div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${L.HaveAcc}</div>
|
|
26352
26353
|
`;
|
|
@@ -26640,6 +26641,7 @@ class SizeRecComponent {
|
|
|
26640
26641
|
this.isCollapsed = false;
|
|
26641
26642
|
this.tfrSizeRecTitleToggle.classList.add('tfr-chevron-up');
|
|
26642
26643
|
this.tfrSizeRecTitleToggle.classList.remove('tfr-chevron-down');
|
|
26644
|
+
this.tfrSizeHowItFits.style.display = 'block';
|
|
26643
26645
|
}
|
|
26644
26646
|
else {
|
|
26645
26647
|
this.tfrSizeRecActionLogin.style.display = 'block';
|
|
@@ -26648,6 +26650,7 @@ class SizeRecComponent {
|
|
|
26648
26650
|
this.tfrSizeRecSubtitle.style.display = 'block';
|
|
26649
26651
|
this.tfrSizeRecommendationError.style.display = 'none';
|
|
26650
26652
|
this.tfrSizeRecommendationError.innerHTML = '';
|
|
26653
|
+
this.tfrSizeHowItFits.style.display = 'none';
|
|
26651
26654
|
}
|
|
26652
26655
|
}
|
|
26653
26656
|
setLoading(isLoading) {
|
|
@@ -26690,6 +26693,7 @@ class SizeRecComponent {
|
|
|
26690
26693
|
this.bindEvents();
|
|
26691
26694
|
}
|
|
26692
26695
|
setElements() {
|
|
26696
|
+
this.tfrSizeHowItFits = document.getElementById('tfr-size-how-it-fits');
|
|
26693
26697
|
this.tfrSizeRecTitle = document.getElementById('tfr-size-rec-title');
|
|
26694
26698
|
this.tfrSizeRecSubtitle = document.getElementById('tfr-size-rec-subtitle');
|
|
26695
26699
|
this.tfrSizeRecActionLogin = document.getElementById('tfr-size-rec-action-login');
|
|
@@ -27014,6 +27018,7 @@ class FittingRoom {
|
|
|
27014
27018
|
: typeof process !== 'undefined'
|
|
27015
27019
|
? process.env.NODE_ENV
|
|
27016
27020
|
: 'dev';
|
|
27021
|
+
console.log('tfr-env', env);
|
|
27017
27022
|
this.tfrModal = new TfrModal(modalDivId, this.signIn.bind(this), this.forgotPassword.bind(this), this.submitTel.bind(this));
|
|
27018
27023
|
this.tfrShop = initShop(Number(this.shopId), env);
|
|
27019
27024
|
this.tfrSizeRec = new TfrSizeRec(sizeRecMainDivId, cssVariables, this.tfrShop, this.onSignInClick.bind(this), this.signOut.bind(this));
|