@thefittingroom/shop-ui 5.0.4 → 5.0.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/index.js +504 -104
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19034,7 +19034,7 @@ const en$1 = {
|
|
|
19034
19034
|
"get-app": { "create_avatar": "Create your avatar" },
|
|
19035
19035
|
"sign-in": { "email": "Email", "password": "Password", "forgot_password": "Forgot password?", "sign_in": "Sign in", "no_account": "Don’t have an account?", "download_app": "Download the app.", "invalid_email": "Please enter a valid email address.", "missing_password": "Please enter your password.", "login_failed": "Incorrect email or password." },
|
|
19036
19036
|
"forgot-password": { "title": "Forgot password", "description": "We’ll send you an email with a link to reset your password.", "send_link": "Send link", "link_sent": "Link sent! Please check your email.", "need_help": "Need help?", "contact_us": "Contact us." },
|
|
19037
|
-
"vto-single": { "avatar_loading": "Finding your perfect fit...", "slide_to_rotate": "Slide to rotate", "sign_out": "Sign out", "color_label": "Color:", "add_to_cart": "Add to cart" },
|
|
19037
|
+
"vto-single": { "avatar_loading": "Finding your perfect fit...", "slide_to_rotate": "Slide to rotate", "sign_out": "Sign out", "color_label": "Color:", "add_to_cart": "Add to cart", "view_product_details": "View product details", "hide_product_details": "Hide product details" },
|
|
19038
19038
|
"size-rec": { "recommended_size": "Recommended Size: {{size}}", "item_fit": "This item is {{fit}}", "select_size": "Select a size to see how it fits", "fitClassification": { "form_fitting": "Form Fitting", "slim_fit": "Slim Fit", "regular_fit": "Regular Fit", "relaxed_fit": "Relaxed Fit", "oversized_fit": "Oversized Fit" }, "measurementLocation": { "neck_base": "Neck", "across_shoulder": "Shoulders", "cb_neck_to_wrist": "Neck to Wrist", "sleeve_length_from_shoulder_point": "Sleeve", "bust": "Bust", "waist": "Waist", "low_waist": "Low Waist", "low_hip": "Low Hip", "high_hip": "High Hip", "thigh": "Thigh", "inseam": "Inseam", "hsp_to_low_hip": "HSP to Low Hip", "hsp_to_crotch": "HSP to Crotch", "low_hip_bottoms": "Low Hip (Bottoms)", "high_hip_bottoms": "High Hip (Bottoms)" }, "fit": { "too_tight": "Too Tight", "tight": "Tight", "slightly_tight": "Slightly Tight", "perfect_fit": "Perfect Fit", "slightly_loose": "Slightly Loose", "loose": "Loose", "oversized": "Oversized", "too_short": "Too Short", "short": "Short", "slightly_short": "Slightly Short", "slightly_long": "Slightly Long", "long": "Long", "too_long": "Too Long" } }
|
|
19039
19039
|
};
|
|
19040
19040
|
const try_it_on = "Essayez-le";
|
|
@@ -19049,7 +19049,7 @@ const fr = {
|
|
|
19049
19049
|
"get-app": { "create_avatar": "Créez votre avatar" },
|
|
19050
19050
|
"sign-in": { "email": "Email", "password": "Mot de passe", "forgot_password": "Mot de passe oublié ?", "sign_in": "Se connecter", "no_account": "Vous n'avez pas de compte ?", "download_app": "Téléchargez l'application.", "invalid_email": "Veuillez entrer une adresse e-mail valide.", "missing_password": "Veuillez entrer votre mot de passe.", "login_failed": "Email ou mot de passe incorrect." },
|
|
19051
19051
|
"forgot-password": { "title": "Mot de passe oublié", "description": "Nous vous enverrons un e-mail avec un lien pour réinitialiser votre mot de passe.", "send_link": "Envoyer le lien", "link_sent": "Lien envoyé ! Veuillez vérifier votre e-mail.", "need_help": "Besoin d'aide ?", "contact_us": "Contactez-nous." },
|
|
19052
|
-
"vto-single": { "avatar_loading": "Trouver votre ajustement parfait...", "slide_to_rotate": "Faites glisser pour faire pivoter", "sign_out": "Se déconnecter", "color_label": "Couleur :", "add_to_cart": "Ajouter au panier" },
|
|
19052
|
+
"vto-single": { "avatar_loading": "Trouver votre ajustement parfait...", "slide_to_rotate": "Faites glisser pour faire pivoter", "sign_out": "Se déconnecter", "color_label": "Couleur :", "add_to_cart": "Ajouter au panier", "view_product_details": "Voir les détails du produit", "hide_product_details": "Masquer les détails du produit" },
|
|
19053
19053
|
"size-rec": { "recommended_size": "Taille recommandée : {{size}}", "item_fit": "Cet article est {{fit}}", "select_size": "Sélectionnez une taille pour voir comment elle s'adapte", "fitClassification": { "form_fitting": "Ajusté", "slim_fit": "Coupe slim", "regular_fit": "Coupe régulière", "relaxed_fit": "Coupe décontractée", "oversized_fit": "Coupe oversize" }, "measurementLocation": { "neck_base": "Cou", "across_shoulder": "Épaules", "cb_neck_to_wrist": "Cou jusqu'au poignet", "sleeve_length_from_shoulder_point": "Manche", "bust": "Buste", "waist": "Taille", "low_waist": "Bas de la taille", "low_hip": "Bas des hanches", "high_hip": "Haut des hanches", "thigh": "Cuisse", "inseam": "Entrejambe", "hsp_to_low_hip": "HSP au bas des hanches", "hsp_to_crotch": "HSP à l'entrejambe", "low_hip_bottoms": "Bas des hanches (bas)", "high_hip_bottoms": "Haut des hanches (bas)" }, "fit": { "too_tight": "Trop serré", "tight": "Serré", "slightly_tight": "Légèrement serré", "perfect_fit": "Parfait", "slightly_loose": "Légèrement ample", "loose": "Ample", "oversized": "Oversize", "too_short": "Trop court", "short": "Court", "slightly_short": "Légèrement court", "slightly_long": "Légèrement long", "long": "Long", "too_long": "Trop long" } }
|
|
19054
19054
|
};
|
|
19055
19055
|
instance.use(initReactI18next).init({
|
|
@@ -19116,6 +19116,9 @@ function _init$6(initThemeData) {
|
|
|
19116
19116
|
Object.assign(themeData, initThemeData);
|
|
19117
19117
|
}
|
|
19118
19118
|
}
|
|
19119
|
+
function getThemeData() {
|
|
19120
|
+
return themeData;
|
|
19121
|
+
}
|
|
19119
19122
|
function useCss(callback) {
|
|
19120
19123
|
return reactExports.useMemo(() => callback(themeData), []);
|
|
19121
19124
|
}
|
|
@@ -20736,6 +20739,7 @@ const SvgCheckCircle = (props) => /* @__PURE__ */ reactExports.createElement("sv
|
|
|
20736
20739
|
const SvgChevronLeft = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("g", { opacity: 0.35 }, /* @__PURE__ */ reactExports.createElement("path", { d: "M30 36L18 24L30 12", stroke: "#1E1E1E", strokeWidth: 4, strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
20737
20740
|
const SvgChevronRight = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("g", { opacity: 0.35 }, /* @__PURE__ */ reactExports.createElement("path", { d: "M18 36L30 24L18 12", stroke: "#1E1E1E", strokeWidth: 4, strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
20738
20741
|
const SvgCloseIcon = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 15, height: 16, viewBox: "0 0 15 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.249026 1.13202C0.353455 1.02778 0.494976 0.969238 0.642526 0.969238C0.790076 0.969238 0.931598 1.02778 1.03603 1.13202L14.423 14.498C14.4747 14.5498 14.5157 14.6112 14.5436 14.6788C14.5716 14.7463 14.5859 14.8187 14.5859 14.8919C14.5858 14.965 14.5714 15.0374 14.5434 15.1049C14.5153 15.1725 14.4743 15.2338 14.4225 15.2855C14.3708 15.3372 14.3094 15.3782 14.2418 15.4061C14.1742 15.4341 14.1018 15.4484 14.0287 15.4484C13.9555 15.4483 13.8831 15.4339 13.8156 15.4058C13.7481 15.3778 13.6867 15.3368 13.635 15.285L0.250026 1.91802C0.198323 1.86646 0.157301 1.80521 0.129312 1.73777C0.101322 1.67034 0.0869141 1.59804 0.0869141 1.52502C0.0869141 1.45201 0.101322 1.37971 0.129312 1.31227C0.157301 1.24483 0.197323 1.18358 0.249026 1.13202Z", fill: "#21201F" }), /* @__PURE__ */ reactExports.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.249003 15.285C0.197149 15.2335 0.156 15.1722 0.127922 15.1046C0.0998429 15.0371 0.0853882 14.9647 0.0853882 14.8916C0.0853882 14.8184 0.0998429 14.746 0.127922 14.6785C0.156 14.6109 0.197149 14.5496 0.249003 14.498L13.635 1.13205C13.7407 1.03479 13.8798 0.982096 14.0234 0.984975C14.167 0.987855 14.3039 1.04608 14.4056 1.1475C14.5073 1.24893 14.5658 1.3857 14.5691 1.52928C14.5723 1.67286 14.52 1.81214 14.423 1.91805L1.036 15.285C0.931574 15.3893 0.790052 15.4478 0.642502 15.4478C0.494952 15.4478 0.353431 15.3893 0.249003 15.285Z", fill: "#21201F" }));
|
|
20742
|
+
const SvgDragHandle = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 32, height: 4, viewBox: "0 0 32 4", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("rect", { width: 32, height: 4, rx: 2, fill: "black" }));
|
|
20739
20743
|
const SvgInfoIcon = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("path", { d: "M6.75 9.15V6.75M6.75 4.35H6.756M12.75 6.75C12.75 10.0637 10.0637 12.75 6.75 12.75C3.43629 12.75 0.75 10.0637 0.75 6.75C0.75 3.43629 3.43629 0.75 6.75 0.75C10.0637 0.75 12.75 3.43629 12.75 6.75Z", stroke: "#757575", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
20740
20744
|
const SvgLoadingCircle = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 108, height: 108, viewBox: "0 0 108 108", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M27.1325 75.9593C25.3424 77.0549 23.0032 76.4919 21.9077 74.7018L20.2636 72.0155L18.786 69.0476L17.5726 65.9622L16.6328 62.7828L15.9737 59.5336L15.6002 56.2393L15.5153 52.925L15.7196 49.6159L16.2115 46.3373L16.9485 43.2752C17.4396 41.2348 19.4918 39.9788 21.5322 40.4699C23.5726 40.961 24.8286 43.0132 24.3375 45.0536L23.6782 47.793L23.2847 50.4154L23.1213 53.0621L23.1893 55.713L23.4879 58.3479L24.0151 60.9467L24.7668 63.4897L25.7373 65.9574L26.9191 68.3312L28.39 70.7345C29.4855 72.5246 28.9225 74.8638 27.1325 75.9593Z", fill: "black" }), /* @__PURE__ */ reactExports.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32.542 81.0995C33.5444 79.2557 35.8518 78.5736 37.6955 79.5761L40.171 80.922L42.6022 81.9807L45.1164 82.8236L47.6945 83.4441L50.3169 83.8375L52.9636 84.0009L55.6145 83.933L58.2494 83.6343L60.8482 83.1071L63.3912 82.3554L65.8589 81.385L68.2327 80.2031L70.4945 78.8189L72.627 77.2428L74.6141 75.4868L76.4405 73.5643L78.0924 71.49L79.5573 69.2796L80.8239 66.9499L81.8827 64.5187L82.7255 62.0044L83.346 59.4264L83.7395 56.8039L83.9029 54.1572L83.8349 51.5064L83.5363 48.8715L83.0091 46.2727L82.2574 43.7297L81.2869 41.2619L80.1051 38.8882L78.7208 36.6263L77.1447 34.4938L75.3888 32.5068L73.4662 30.6803L71.392 29.0284L69.1815 27.5636L66.8518 26.297L64.4206 25.2382L61.9064 24.3954L59.3283 23.7749L56.7059 23.3814L54.0592 23.218L51.4083 23.2859L48.7734 23.5846L46.1747 24.1118L43.6316 24.8635L41.1639 25.834L38.7901 27.0158L36.5283 28.4001L34.3958 29.9762L32.4088 31.7321L30.4681 33.7749C29.0225 35.2964 26.6173 35.358 25.0958 33.9125C23.5743 32.467 23.5127 30.0618 24.9582 28.5403L27.1274 26.2569L29.6118 24.0615L32.278 22.0909L35.1058 20.3603L38.0737 18.8826L41.1591 17.6693L44.3385 16.7295L47.5877 16.0704L50.882 15.6969L54.1963 15.612L57.5054 15.8163L60.7841 16.3082L64.0074 17.084L67.1509 18.1378L70.1905 19.4615L73.1032 21.0451L75.8669 22.8766L78.4603 24.942L80.8639 27.2255L83.0594 29.7098L85.0299 32.376L86.7606 35.2039L88.2382 38.1718L89.4516 41.2571L90.3914 44.4365L91.0505 47.6857L91.424 50.98L91.5089 54.2943L91.3046 57.6034L90.8127 60.8821L90.0369 64.1055L88.9831 67.2489L87.6594 70.2886L86.0757 73.2013L84.2443 75.9649L82.1789 78.5584L79.8954 80.962L77.4111 83.1574L74.7448 85.128L71.917 86.8587L68.9491 88.3363L65.8637 89.5496L62.6843 90.4894L59.4351 91.1486L56.1408 91.522L52.8265 91.6069L49.5175 91.4026L46.2388 90.9107L43.0154 90.1349L39.872 89.0811L36.8323 87.7574L34.0653 86.253C32.2216 85.2506 31.5395 82.9432 32.542 81.0995Z", fill: "black", fillOpacity: 0.45 }));
|
|
20741
20745
|
const SvgTfrIcon = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 12, height: 24, viewBox: "0 0 12 24", fill: "#21201F", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("path", { d: "M11.9082 4.0752V19.8516L0.161133 22.8545V1.05859L11.9082 4.0752ZM9.31836 10.8525C8.96951 10.8525 8.68661 11.206 8.68652 11.6416C8.68652 12.0773 8.96946 12.4307 9.31836 12.4307C9.6671 12.4304 9.9502 12.0771 9.9502 11.6416C9.95011 11.2062 9.66705 10.8528 9.31836 10.8525Z" }));
|
|
@@ -20873,6 +20877,7 @@ function ModalTitlebar({
|
|
|
20873
20877
|
] });
|
|
20874
20878
|
}
|
|
20875
20879
|
function SidecarModalFrame({
|
|
20880
|
+
contentStyle,
|
|
20876
20881
|
onRequestClose,
|
|
20877
20882
|
children
|
|
20878
20883
|
}) {
|
|
@@ -20896,11 +20901,16 @@ function SidecarModalFrame({
|
|
|
20896
20901
|
height: "100vh",
|
|
20897
20902
|
margin: 0,
|
|
20898
20903
|
padding: 0,
|
|
20904
|
+
overflow: "hidden",
|
|
20899
20905
|
border: "none",
|
|
20900
20906
|
backgroundColor: "#FFFFFF"
|
|
20901
20907
|
}
|
|
20902
20908
|
}));
|
|
20903
|
-
|
|
20909
|
+
const applyContentStyle = {
|
|
20910
|
+
...isMobileLayout ? css2.frameContentFullScreen : css2.frameContentBase,
|
|
20911
|
+
...contentStyle
|
|
20912
|
+
};
|
|
20913
|
+
return /* @__PURE__ */ jsx$1(ModalFrame, { isOpen: true, onRequestClose, contentStyle: applyContentStyle, children });
|
|
20904
20914
|
}
|
|
20905
20915
|
var dayjs_min$1 = { exports: {} };
|
|
20906
20916
|
var dayjs_min = dayjs_min$1.exports;
|
|
@@ -41523,8 +41533,21 @@ async function getStyleByExternalId(brandId, externalId) {
|
|
|
41523
41533
|
recordCache[cacheKey] = record;
|
|
41524
41534
|
return record;
|
|
41525
41535
|
}
|
|
41536
|
+
async function getStyleGarmentCategoryById(styleGarmentCategoryId) {
|
|
41537
|
+
const cacheKey = `getStyleGarmentCategoryById/${styleGarmentCategoryId}`;
|
|
41538
|
+
if (recordCache[cacheKey]) {
|
|
41539
|
+
return recordCache[cacheKey];
|
|
41540
|
+
}
|
|
41541
|
+
const firestore = getFirestoreManager();
|
|
41542
|
+
const record = await firestore.getDocData("style_garment_categories", styleGarmentCategoryId.toString());
|
|
41543
|
+
if (!record) {
|
|
41544
|
+
return null;
|
|
41545
|
+
}
|
|
41546
|
+
recordCache[cacheKey] = record;
|
|
41547
|
+
return record;
|
|
41548
|
+
}
|
|
41526
41549
|
const AVATAR_IMAGE_ASPECT_RATIO = 2 / 3;
|
|
41527
|
-
const
|
|
41550
|
+
const AVATAR_GUTTER_HEIGHT_PX = 100;
|
|
41528
41551
|
const logger$1 = getLogger("vto-single");
|
|
41529
41552
|
function VtoSingleOverlay() {
|
|
41530
41553
|
const {
|
|
@@ -41539,6 +41562,7 @@ function VtoSingleOverlay() {
|
|
|
41539
41562
|
const [loadedProductData, setLoadedProductData] = reactExports.useState(null);
|
|
41540
41563
|
const [selectedSizeLabel, setSelectedSizeLabel] = reactExports.useState(null);
|
|
41541
41564
|
const [selectedColorLabel, setSelectedColorLabel] = reactExports.useState(null);
|
|
41565
|
+
const [modalStyle, setModalStyle] = reactExports.useState({});
|
|
41542
41566
|
reactExports.useEffect(() => {
|
|
41543
41567
|
if (!userIsLoggedIn) {
|
|
41544
41568
|
openOverlay(OverlayName.LANDING, {
|
|
@@ -41573,6 +41597,8 @@ function VtoSingleOverlay() {
|
|
|
41573
41597
|
logger$1.logError("Style not found for externalId:", currentProduct.externalId);
|
|
41574
41598
|
return;
|
|
41575
41599
|
}
|
|
41600
|
+
const styleGarmentCategoryRec = await getStyleGarmentCategoryById(styleRec.style_garment_category_id);
|
|
41601
|
+
const styleCategoryLabel = styleGarmentCategoryRec?.style_category_label ?? null;
|
|
41576
41602
|
const sizeRecommendationRecord = await getSizeRecommendation(styleRec.id);
|
|
41577
41603
|
let productData;
|
|
41578
41604
|
const recommendedSizeLabel = getSizeLabelFromSize(sizeRecommendationRecord.recommended_size) ?? "(unknown)";
|
|
@@ -41619,7 +41645,8 @@ function VtoSingleOverlay() {
|
|
|
41619
41645
|
fitClassification,
|
|
41620
41646
|
recommendedSizeId,
|
|
41621
41647
|
recommendedSizeLabel,
|
|
41622
|
-
sizes
|
|
41648
|
+
sizes,
|
|
41649
|
+
styleCategoryLabel
|
|
41623
41650
|
};
|
|
41624
41651
|
}
|
|
41625
41652
|
let recommendedColorLabel;
|
|
@@ -41729,21 +41756,26 @@ function VtoSingleOverlay() {
|
|
|
41729
41756
|
} else {
|
|
41730
41757
|
Layout = DesktopLayout;
|
|
41731
41758
|
}
|
|
41732
|
-
return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, children: /* @__PURE__ */ jsx$1(Layout, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, frameUrls, onClose: closeOverlay, onChangeColor: setSelectedColorLabel, onChangeSize: setSelectedSizeLabel, onAddToCart: handleAddToCartClick, onSignOut: handleSignOutClick }) });
|
|
41759
|
+
return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, contentStyle: modalStyle, children: /* @__PURE__ */ jsx$1(Layout, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, frameUrls, setModalStyle, onClose: closeOverlay, onChangeColor: setSelectedColorLabel, onChangeSize: setSelectedSizeLabel, onAddToCart: handleAddToCartClick, onSignOut: handleSignOutClick }) });
|
|
41733
41760
|
}
|
|
41734
41761
|
function MobileLayout({
|
|
41735
|
-
|
|
41736
|
-
|
|
41737
|
-
|
|
41738
|
-
|
|
41739
|
-
|
|
41762
|
+
loadedProductData,
|
|
41763
|
+
selectedColorSizeRecord,
|
|
41764
|
+
availableColorLabels,
|
|
41765
|
+
selectedColorLabel,
|
|
41766
|
+
selectedSizeLabel,
|
|
41740
41767
|
frameUrls,
|
|
41741
|
-
|
|
41742
|
-
|
|
41743
|
-
|
|
41744
|
-
|
|
41745
|
-
|
|
41768
|
+
setModalStyle,
|
|
41769
|
+
onClose,
|
|
41770
|
+
onChangeColor,
|
|
41771
|
+
onChangeSize,
|
|
41772
|
+
onAddToCart,
|
|
41773
|
+
onSignOut
|
|
41746
41774
|
}) {
|
|
41775
|
+
const [contentView, setContentView] = reactExports.useState("collapsed");
|
|
41776
|
+
const bottomFrameInnerRef = reactExports.useRef(null);
|
|
41777
|
+
const [bottomFrameOuterStyle, setBottomFrameOuterStyle] = reactExports.useState({});
|
|
41778
|
+
const [bottomFrameInnerStyle, setBottomFrameInnerStyle] = reactExports.useState({});
|
|
41747
41779
|
const css2 = useCss((_theme) => ({
|
|
41748
41780
|
mainContainer: {
|
|
41749
41781
|
width: "100%",
|
|
@@ -41751,7 +41783,7 @@ function MobileLayout({
|
|
|
41751
41783
|
},
|
|
41752
41784
|
closeButton: {
|
|
41753
41785
|
position: "absolute",
|
|
41754
|
-
top: "
|
|
41786
|
+
top: "12px",
|
|
41755
41787
|
right: "10px",
|
|
41756
41788
|
width: "30px",
|
|
41757
41789
|
height: "30px",
|
|
@@ -41765,11 +41797,307 @@ function MobileLayout({
|
|
|
41765
41797
|
closeIcon: {
|
|
41766
41798
|
width: "16px",
|
|
41767
41799
|
height: "16px"
|
|
41800
|
+
},
|
|
41801
|
+
bottomFrameOuter: {
|
|
41802
|
+
position: "absolute",
|
|
41803
|
+
width: "calc(100% - 16px)",
|
|
41804
|
+
maxWidth: "450px",
|
|
41805
|
+
bottom: "0",
|
|
41806
|
+
maxHeight: "95vh",
|
|
41807
|
+
left: "50%",
|
|
41808
|
+
transform: "translateX(-50%)",
|
|
41809
|
+
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
41810
|
+
borderTopLeftRadius: "28px",
|
|
41811
|
+
borderTopRightRadius: "28px",
|
|
41812
|
+
borderTop: "1px solid rgba(0, 0, 0, 0.1)",
|
|
41813
|
+
borderLeft: "1px solid rgba(0, 0, 0, 0.1)",
|
|
41814
|
+
borderRight: "1px solid rgba(0, 0, 0, 0.1)",
|
|
41815
|
+
margin: "0",
|
|
41816
|
+
padding: "0",
|
|
41817
|
+
transition: "height 0.5s"
|
|
41818
|
+
},
|
|
41819
|
+
bottomFrameInner: {
|
|
41820
|
+
width: "100%",
|
|
41821
|
+
padding: "16px 8px 0 8px",
|
|
41822
|
+
display: "flex",
|
|
41823
|
+
flexDirection: "column",
|
|
41824
|
+
alignItems: "center"
|
|
41825
|
+
},
|
|
41826
|
+
headerContainer: {
|
|
41827
|
+
width: "100%",
|
|
41828
|
+
flex: "none",
|
|
41829
|
+
display: "flex",
|
|
41830
|
+
flexDirection: "column",
|
|
41831
|
+
alignItems: "center"
|
|
41832
|
+
},
|
|
41833
|
+
dragHandleIcon: {
|
|
41834
|
+
width: "32px",
|
|
41835
|
+
height: "4px"
|
|
41836
|
+
},
|
|
41837
|
+
recommendedSizeContainer: {
|
|
41838
|
+
marginTop: "10px",
|
|
41839
|
+
marginBottom: "14px"
|
|
41840
|
+
},
|
|
41841
|
+
recommendedSizeText: {
|
|
41842
|
+
textTransform: "uppercase",
|
|
41843
|
+
fontWeight: "600"
|
|
41844
|
+
},
|
|
41845
|
+
contentContainer: {
|
|
41846
|
+
flexGrow: 1,
|
|
41847
|
+
width: "100%",
|
|
41848
|
+
display: "flex",
|
|
41849
|
+
flexDirection: "column",
|
|
41850
|
+
alignItems: "center",
|
|
41851
|
+
padding: "0 16px 16px 16px",
|
|
41852
|
+
backgroundColor: "#FFFFFF",
|
|
41853
|
+
overflowY: "auto"
|
|
41854
|
+
},
|
|
41855
|
+
sizeSelectorContainer: {},
|
|
41856
|
+
colorSelectorContainer: {
|
|
41857
|
+
marginTop: "16px"
|
|
41858
|
+
},
|
|
41859
|
+
itemFitTextContainer: {
|
|
41860
|
+
marginTop: "8px"
|
|
41861
|
+
},
|
|
41862
|
+
itemFitText: {},
|
|
41863
|
+
itemFitDetailsContainer: {
|
|
41864
|
+
marginTop: "8px",
|
|
41865
|
+
width: "70%"
|
|
41866
|
+
},
|
|
41867
|
+
buttonContainer: {
|
|
41868
|
+
marginTop: "16px",
|
|
41869
|
+
width: "100%"
|
|
41870
|
+
},
|
|
41871
|
+
productNameContainer: {
|
|
41872
|
+
marginTop: "16px"
|
|
41873
|
+
},
|
|
41874
|
+
productNameText: {},
|
|
41875
|
+
priceContainer: {},
|
|
41876
|
+
priceText: {},
|
|
41877
|
+
productDescriptionContainer: {
|
|
41878
|
+
marginTop: "8px"
|
|
41879
|
+
},
|
|
41880
|
+
footerContainer: {
|
|
41881
|
+
marginTop: "24px"
|
|
41768
41882
|
}
|
|
41769
41883
|
}));
|
|
41884
|
+
reactExports.useEffect(() => {
|
|
41885
|
+
function refreshBottomFrameStyle() {
|
|
41886
|
+
const bottomFrameInnerEl = bottomFrameInnerRef.current;
|
|
41887
|
+
if (!bottomFrameInnerEl) {
|
|
41888
|
+
return;
|
|
41889
|
+
}
|
|
41890
|
+
const maxHeightPx = Number(window.getComputedStyle(bottomFrameInnerEl.parentElement).getPropertyValue("max-height").replace("px", ""));
|
|
41891
|
+
const heightPx = Math.min(bottomFrameInnerEl.clientHeight, maxHeightPx);
|
|
41892
|
+
const bottomFrameStyle = {
|
|
41893
|
+
height: `${heightPx}px`
|
|
41894
|
+
};
|
|
41895
|
+
setBottomFrameOuterStyle(bottomFrameStyle);
|
|
41896
|
+
setBottomFrameInnerStyle(bottomFrameStyle);
|
|
41897
|
+
}
|
|
41898
|
+
setBottomFrameInnerStyle({});
|
|
41899
|
+
setTimeout(refreshBottomFrameStyle, 50);
|
|
41900
|
+
}, [contentView]);
|
|
41901
|
+
const handleBottomFrameTouchStart = reactExports.useCallback((e) => {
|
|
41902
|
+
let startY = e.touches[0].clientY;
|
|
41903
|
+
const initialContentView = contentView;
|
|
41904
|
+
const onTouchMove = (moveEvent) => {
|
|
41905
|
+
const deltaY = moveEvent.touches[0].clientY - startY;
|
|
41906
|
+
if (Math.abs(deltaY) >= 30) {
|
|
41907
|
+
if (deltaY > 0) {
|
|
41908
|
+
if (initialContentView === "full" || initialContentView === "expanded") {
|
|
41909
|
+
setContentView("collapsed");
|
|
41910
|
+
}
|
|
41911
|
+
} else {
|
|
41912
|
+
if (initialContentView === "collapsed") {
|
|
41913
|
+
setContentView("expanded");
|
|
41914
|
+
} else if (initialContentView === "expanded") {
|
|
41915
|
+
setContentView("full");
|
|
41916
|
+
}
|
|
41917
|
+
}
|
|
41918
|
+
document.removeEventListener("touchmove", onTouchMove);
|
|
41919
|
+
}
|
|
41920
|
+
};
|
|
41921
|
+
document.addEventListener("touchmove", onTouchMove);
|
|
41922
|
+
const onTouchEnd = () => {
|
|
41923
|
+
document.removeEventListener("touchmove", onTouchMove);
|
|
41924
|
+
document.removeEventListener("touchend", onTouchEnd);
|
|
41925
|
+
};
|
|
41926
|
+
document.addEventListener("touchend", onTouchEnd);
|
|
41927
|
+
}, [contentView]);
|
|
41928
|
+
let aboveContentNode = null;
|
|
41929
|
+
if (contentView === "expanded" || contentView === "full") {
|
|
41930
|
+
aboveContentNode = /* @__PURE__ */ jsx$1(ProductSummaryRow, { loadedProductData });
|
|
41931
|
+
}
|
|
41932
|
+
let Content;
|
|
41933
|
+
switch (contentView) {
|
|
41934
|
+
case "collapsed":
|
|
41935
|
+
Content = MobileContentCollapsed;
|
|
41936
|
+
break;
|
|
41937
|
+
case "expanded":
|
|
41938
|
+
Content = MobileContentExpanded;
|
|
41939
|
+
break;
|
|
41940
|
+
case "full":
|
|
41941
|
+
Content = MobileContentFull;
|
|
41942
|
+
break;
|
|
41943
|
+
}
|
|
41770
41944
|
return /* @__PURE__ */ jsxs("div", { css: css2.mainContainer, children: [
|
|
41771
|
-
/* @__PURE__ */ jsx$1(Avatar, { frameUrls }),
|
|
41772
|
-
/* @__PURE__ */ jsx$1("button", { onClick: onClose, "aria-label": "Close modal", css: css2.closeButton, children: /* @__PURE__ */ jsx$1(SvgCloseIcon, { css: css2.closeIcon }) })
|
|
41945
|
+
/* @__PURE__ */ jsx$1(Avatar, { frameUrls, setModalStyle }),
|
|
41946
|
+
/* @__PURE__ */ jsx$1("button", { onClick: onClose, "aria-label": "Close modal", css: css2.closeButton, children: /* @__PURE__ */ jsx$1(SvgCloseIcon, { css: css2.closeIcon }) }),
|
|
41947
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.bottomFrameOuter, style: bottomFrameOuterStyle, children: /* @__PURE__ */ jsxs("div", { ref: bottomFrameInnerRef, css: css2.bottomFrameInner, style: bottomFrameInnerStyle, children: [
|
|
41948
|
+
/* @__PURE__ */ jsxs("div", { css: css2.headerContainer, onTouchStart: handleBottomFrameTouchStart, children: [
|
|
41949
|
+
/* @__PURE__ */ jsx$1(SvgDragHandle, { css: css2.dragHandleIcon }),
|
|
41950
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.recommendedSizeContainer, children: /* @__PURE__ */ jsx$1(RecommendedSizeText, { loadedProductData, textCss: css2.recommendedSizeText }) })
|
|
41951
|
+
] }),
|
|
41952
|
+
aboveContentNode,
|
|
41953
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.contentContainer, children: /* @__PURE__ */ jsx$1(Content, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, onChangeContentView: setContentView, onChangeColor, onChangeSize, onAddToCart, onSignOut }) })
|
|
41954
|
+
] }) })
|
|
41955
|
+
] });
|
|
41956
|
+
}
|
|
41957
|
+
function MobileContentCollapsed({
|
|
41958
|
+
loadedProductData,
|
|
41959
|
+
selectedSizeLabel,
|
|
41960
|
+
onChangeSize
|
|
41961
|
+
}) {
|
|
41962
|
+
const css2 = useCss((_theme) => ({
|
|
41963
|
+
selectSizeLabelContainer: {
|
|
41964
|
+
marginTop: "8px"
|
|
41965
|
+
},
|
|
41966
|
+
selectSizeLabelText: {},
|
|
41967
|
+
sizeSelectorContainer: {
|
|
41968
|
+
marginTop: "8px"
|
|
41969
|
+
}
|
|
41970
|
+
}));
|
|
41971
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41972
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
|
|
41973
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: /* @__PURE__ */ jsx$1(SizeSelector, { loadedProductData, selectedSizeLabel, onChangeSize }) })
|
|
41974
|
+
] });
|
|
41975
|
+
}
|
|
41976
|
+
function MobileContentExpanded({
|
|
41977
|
+
loadedProductData,
|
|
41978
|
+
selectedSizeLabel,
|
|
41979
|
+
onChangeContentView,
|
|
41980
|
+
onChangeSize,
|
|
41981
|
+
onAddToCart
|
|
41982
|
+
}) {
|
|
41983
|
+
const css2 = useCss((_theme) => ({
|
|
41984
|
+
selectSizeLabelContainer: {
|
|
41985
|
+
marginTop: "8px"
|
|
41986
|
+
},
|
|
41987
|
+
selectSizeLabelText: {},
|
|
41988
|
+
sizeSelectorContainer: {
|
|
41989
|
+
marginTop: "8px"
|
|
41990
|
+
},
|
|
41991
|
+
itemFitTextContainer: {
|
|
41992
|
+
marginTop: "8px"
|
|
41993
|
+
},
|
|
41994
|
+
itemFitText: {},
|
|
41995
|
+
itemFitDetailsContainer: {
|
|
41996
|
+
marginTop: "8px",
|
|
41997
|
+
width: "70%"
|
|
41998
|
+
},
|
|
41999
|
+
buttonContainer: {
|
|
42000
|
+
marginTop: "24px",
|
|
42001
|
+
width: "100%"
|
|
42002
|
+
},
|
|
42003
|
+
productDetailsContainer: {
|
|
42004
|
+
marginTop: "24px",
|
|
42005
|
+
marginBottom: "16px"
|
|
42006
|
+
},
|
|
42007
|
+
productDetailsText: {
|
|
42008
|
+
textDecoration: "underline",
|
|
42009
|
+
textTransform: "uppercase",
|
|
42010
|
+
cursor: "pointer"
|
|
42011
|
+
}
|
|
42012
|
+
}));
|
|
42013
|
+
const handleProductDetailsClick = reactExports.useCallback(() => {
|
|
42014
|
+
onChangeContentView("full");
|
|
42015
|
+
}, [onChangeContentView]);
|
|
42016
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42017
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
|
|
42018
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: /* @__PURE__ */ jsx$1(SizeSelector, { loadedProductData, selectedSizeLabel, onChangeSize }) }),
|
|
42019
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitTextContainer, children: /* @__PURE__ */ jsx$1(ItemFitText, { loadedProductData }) }),
|
|
42020
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitDetailsContainer, children: /* @__PURE__ */ jsx$1(ItemFitDetails, { loadedProductData, selectedSizeLabel }) }),
|
|
42021
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.buttonContainer, children: /* @__PURE__ */ jsx$1(AddToCartButton, { onClick: onAddToCart }) }),
|
|
42022
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.productDetailsContainer, children: /* @__PURE__ */ jsx$1(LinkT, { variant: "base", css: css2.productDetailsText, t: "vto-single.view_product_details", onClick: handleProductDetailsClick }) })
|
|
42023
|
+
] });
|
|
42024
|
+
}
|
|
42025
|
+
function MobileContentFull({
|
|
42026
|
+
loadedProductData,
|
|
42027
|
+
selectedColorSizeRecord,
|
|
42028
|
+
availableColorLabels,
|
|
42029
|
+
selectedColorLabel,
|
|
42030
|
+
selectedSizeLabel,
|
|
42031
|
+
onChangeContentView,
|
|
42032
|
+
onChangeColor,
|
|
42033
|
+
onChangeSize,
|
|
42034
|
+
onAddToCart,
|
|
42035
|
+
onSignOut
|
|
42036
|
+
}) {
|
|
42037
|
+
const css2 = useCss((_theme) => ({
|
|
42038
|
+
sizeRecommendationFrame: {
|
|
42039
|
+
marginTop: "16px",
|
|
42040
|
+
display: "flex",
|
|
42041
|
+
flexDirection: "column",
|
|
42042
|
+
border: "1px solid rgba(33, 32, 31, 0.2)",
|
|
42043
|
+
padding: "16px 56px",
|
|
42044
|
+
justifyContent: "center",
|
|
42045
|
+
alignItems: "center"
|
|
42046
|
+
},
|
|
42047
|
+
selectSizeLabelContainer: {},
|
|
42048
|
+
selectSizeLabelText: {},
|
|
42049
|
+
sizeSelectorContainer: {
|
|
42050
|
+
marginTop: "16px"
|
|
42051
|
+
},
|
|
42052
|
+
colorSelectorContainer: {
|
|
42053
|
+
marginTop: "16px"
|
|
42054
|
+
},
|
|
42055
|
+
itemFitTextContainer: {
|
|
42056
|
+
marginTop: "8px"
|
|
42057
|
+
},
|
|
42058
|
+
itemFitText: {},
|
|
42059
|
+
itemFitDetailsContainer: {
|
|
42060
|
+
marginTop: "8px",
|
|
42061
|
+
width: "100%"
|
|
42062
|
+
},
|
|
42063
|
+
buttonContainer: {
|
|
42064
|
+
marginTop: "16px",
|
|
42065
|
+
width: "100%"
|
|
42066
|
+
},
|
|
42067
|
+
productDetailsContainer: {
|
|
42068
|
+
marginTop: "24px",
|
|
42069
|
+
marginBottom: "16px"
|
|
42070
|
+
},
|
|
42071
|
+
productDetailsText: {
|
|
42072
|
+
textDecoration: "underline",
|
|
42073
|
+
textTransform: "uppercase",
|
|
42074
|
+
cursor: "pointer"
|
|
42075
|
+
},
|
|
42076
|
+
priceContainer: {},
|
|
42077
|
+
priceText: {},
|
|
42078
|
+
productDescriptionContainer: {
|
|
42079
|
+
marginTop: "8px"
|
|
42080
|
+
},
|
|
42081
|
+
footerContainer: {
|
|
42082
|
+
marginTop: "48px"
|
|
42083
|
+
}
|
|
42084
|
+
}));
|
|
42085
|
+
const handleProductDetailsClick = reactExports.useCallback(() => {
|
|
42086
|
+
onChangeContentView("expanded");
|
|
42087
|
+
}, [onChangeContentView]);
|
|
42088
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42089
|
+
/* @__PURE__ */ jsxs("div", { css: css2.sizeRecommendationFrame, children: [
|
|
42090
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
|
|
42091
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: /* @__PURE__ */ jsx$1(SizeSelector, { loadedProductData, selectedSizeLabel, onChangeSize }) }),
|
|
42092
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitTextContainer, children: /* @__PURE__ */ jsx$1(ItemFitText, { loadedProductData }) }),
|
|
42093
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitDetailsContainer, children: /* @__PURE__ */ jsx$1(ItemFitDetails, { loadedProductData, selectedSizeLabel }) })
|
|
42094
|
+
] }),
|
|
42095
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.colorSelectorContainer, children: /* @__PURE__ */ jsx$1(ColorSelector, { availableColorLabels, selectedColorLabel, onChangeColor }) }),
|
|
42096
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.buttonContainer, children: /* @__PURE__ */ jsx$1(AddToCartButton, { onClick: onAddToCart }) }),
|
|
42097
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.productDetailsContainer, children: /* @__PURE__ */ jsx$1(LinkT, { variant: "base", css: css2.productDetailsText, t: "vto-single.hide_product_details", onClick: handleProductDetailsClick }) }),
|
|
42098
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.priceContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.priceText, children: selectedColorSizeRecord.priceFormatted }) }),
|
|
42099
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.productDescriptionContainer, children: /* @__PURE__ */ jsx$1(ProductDescriptionText, { loadedProductData }) }),
|
|
42100
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.footerContainer, children: /* @__PURE__ */ jsx$1(Footer, { onSignOutClick: onSignOut }) })
|
|
41773
42101
|
] });
|
|
41774
42102
|
}
|
|
41775
42103
|
function DesktopLayout({
|
|
@@ -41779,6 +42107,7 @@ function DesktopLayout({
|
|
|
41779
42107
|
selectedColorLabel,
|
|
41780
42108
|
selectedSizeLabel,
|
|
41781
42109
|
frameUrls,
|
|
42110
|
+
setModalStyle,
|
|
41782
42111
|
onClose,
|
|
41783
42112
|
onChangeColor,
|
|
41784
42113
|
onChangeSize,
|
|
@@ -41791,7 +42120,9 @@ function DesktopLayout({
|
|
|
41791
42120
|
const css2 = useCss((_theme) => ({
|
|
41792
42121
|
mainContainer: {
|
|
41793
42122
|
display: "flex",
|
|
41794
|
-
height: "100%"
|
|
42123
|
+
height: "100%",
|
|
42124
|
+
position: "relative",
|
|
42125
|
+
top: "-1px"
|
|
41795
42126
|
},
|
|
41796
42127
|
rightContainer: {
|
|
41797
42128
|
flexGrow: 1,
|
|
@@ -41820,7 +42151,7 @@ function DesktopLayout({
|
|
|
41820
42151
|
colorContainer: {
|
|
41821
42152
|
marginTop: "16px"
|
|
41822
42153
|
},
|
|
41823
|
-
|
|
42154
|
+
sizeRecommendationFrame: {
|
|
41824
42155
|
marginTop: "16px",
|
|
41825
42156
|
display: "flex",
|
|
41826
42157
|
flexDirection: "column",
|
|
@@ -41862,19 +42193,19 @@ function DesktopLayout({
|
|
|
41862
42193
|
}
|
|
41863
42194
|
}));
|
|
41864
42195
|
return /* @__PURE__ */ jsxs("div", { css: css2.mainContainer, children: [
|
|
41865
|
-
/* @__PURE__ */ jsx$1(Avatar, { frameUrls }),
|
|
42196
|
+
/* @__PURE__ */ jsx$1(Avatar, { frameUrls, setModalStyle }),
|
|
41866
42197
|
/* @__PURE__ */ jsxs("div", { css: css2.rightContainer, children: [
|
|
41867
42198
|
/* @__PURE__ */ jsx$1(ModalTitlebar, { title: t("try_it_on"), onCloseClick: onClose }),
|
|
41868
42199
|
/* @__PURE__ */ jsxs("div", { css: css2.contentContainer, children: [
|
|
41869
42200
|
/* @__PURE__ */ jsx$1("div", { css: css2.productNameContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "brand", css: css2.productNameText, children: loadedProductData.productName }) }),
|
|
41870
42201
|
/* @__PURE__ */ jsx$1("div", { css: css2.priceContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.priceText, children: selectedColorSizeRecord.priceFormatted }) }),
|
|
41871
42202
|
/* @__PURE__ */ jsx$1("div", { css: css2.colorContainer, children: /* @__PURE__ */ jsx$1(ColorSelector, { availableColorLabels, selectedColorLabel, onChangeColor }) }),
|
|
41872
|
-
/* @__PURE__ */ jsxs("div", { css: css2.
|
|
42203
|
+
/* @__PURE__ */ jsxs("div", { css: css2.sizeRecommendationFrame, children: [
|
|
41873
42204
|
/* @__PURE__ */ jsxs("div", { css: css2.recommendedSizeContainer, children: [
|
|
41874
42205
|
/* @__PURE__ */ jsx$1(SvgInfoIcon, {}),
|
|
41875
|
-
/* @__PURE__ */ jsx$1(RecommendedSizeText, { loadedProductData,
|
|
42206
|
+
/* @__PURE__ */ jsx$1(RecommendedSizeText, { loadedProductData, textCss: css2.recommendedSizeText })
|
|
41876
42207
|
] }),
|
|
41877
|
-
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitContainer, children: /* @__PURE__ */ jsx$1(ItemFitText, { loadedProductData,
|
|
42208
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitContainer, children: /* @__PURE__ */ jsx$1(ItemFitText, { loadedProductData, textCss: css2.itemFitText }) }),
|
|
41878
42209
|
/* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
|
|
41879
42210
|
/* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: /* @__PURE__ */ jsx$1(SizeSelector, { loadedProductData, selectedSizeLabel, onChangeSize }) }),
|
|
41880
42211
|
/* @__PURE__ */ jsx$1("div", { css: css2.itemFitDetailsContainer, children: /* @__PURE__ */ jsx$1(ItemFitDetails, { loadedProductData, selectedSizeLabel }) })
|
|
@@ -41887,15 +42218,17 @@ function DesktopLayout({
|
|
|
41887
42218
|
] });
|
|
41888
42219
|
}
|
|
41889
42220
|
function Avatar({
|
|
41890
|
-
frameUrls
|
|
42221
|
+
frameUrls,
|
|
42222
|
+
setModalStyle
|
|
41891
42223
|
}) {
|
|
41892
42224
|
const deviceLayout = useMainStore((state) => state.deviceLayout);
|
|
41893
42225
|
const isMobileLayout = deviceLayout === DeviceLayout.MOBILE_PORTRAIT || deviceLayout === DeviceLayout.TABLET_PORTRAIT;
|
|
41894
|
-
const [
|
|
41895
|
-
|
|
41896
|
-
|
|
42226
|
+
const [layoutData, setLayoutData] = reactExports.useState({
|
|
42227
|
+
topContainerStyle: {},
|
|
42228
|
+
imageContainerStyle: {},
|
|
42229
|
+
imageStyle: {},
|
|
42230
|
+
bottomContainerStyle: {}
|
|
41897
42231
|
});
|
|
41898
|
-
const topContainerRef = reactExports.useRef(null);
|
|
41899
42232
|
const [selectedFrameIndex, setSelectedFrameIndex] = reactExports.useState(null);
|
|
41900
42233
|
const css2 = useCss((theme) => ({
|
|
41901
42234
|
topContainer: {
|
|
@@ -41929,7 +42262,7 @@ function Avatar({
|
|
|
41929
42262
|
},
|
|
41930
42263
|
bottomContainer: {
|
|
41931
42264
|
position: "absolute",
|
|
41932
|
-
bottom: "
|
|
42265
|
+
bottom: "1px",
|
|
41933
42266
|
height: "50px",
|
|
41934
42267
|
display: "flex",
|
|
41935
42268
|
flexDirection: "column",
|
|
@@ -41950,23 +42283,90 @@ function Avatar({
|
|
|
41950
42283
|
}
|
|
41951
42284
|
}));
|
|
41952
42285
|
reactExports.useEffect(() => {
|
|
41953
|
-
|
|
41954
|
-
|
|
41955
|
-
|
|
41956
|
-
|
|
41957
|
-
|
|
41958
|
-
|
|
41959
|
-
|
|
41960
|
-
|
|
42286
|
+
function refreshLayoutData() {
|
|
42287
|
+
let imageSize;
|
|
42288
|
+
let bottomContainerStyle;
|
|
42289
|
+
let modalStyle;
|
|
42290
|
+
if (isMobileLayout) {
|
|
42291
|
+
const screenWidthPx = window.innerWidth;
|
|
42292
|
+
const screenHeightPx = window.innerHeight;
|
|
42293
|
+
let imageWidthPx = screenWidthPx;
|
|
42294
|
+
let imageHeightPx = Math.floor(imageWidthPx / AVATAR_IMAGE_ASPECT_RATIO);
|
|
42295
|
+
let bottomContainerHeightPx = screenHeightPx - imageHeightPx;
|
|
42296
|
+
let modalWidthPx = null;
|
|
42297
|
+
if (bottomContainerHeightPx < AVATAR_GUTTER_HEIGHT_PX) {
|
|
42298
|
+
bottomContainerHeightPx = AVATAR_GUTTER_HEIGHT_PX;
|
|
42299
|
+
imageHeightPx = screenHeightPx - bottomContainerHeightPx;
|
|
42300
|
+
imageWidthPx = Math.floor(imageHeightPx * AVATAR_IMAGE_ASPECT_RATIO);
|
|
42301
|
+
modalWidthPx = imageWidthPx;
|
|
42302
|
+
}
|
|
42303
|
+
imageSize = {
|
|
42304
|
+
width: imageWidthPx,
|
|
42305
|
+
height: imageHeightPx
|
|
42306
|
+
};
|
|
42307
|
+
bottomContainerStyle = {
|
|
42308
|
+
width: imageWidthPx,
|
|
42309
|
+
height: bottomContainerHeightPx
|
|
42310
|
+
};
|
|
42311
|
+
if (modalWidthPx != null) {
|
|
42312
|
+
const theme = getThemeData();
|
|
42313
|
+
modalStyle = {
|
|
42314
|
+
width: modalWidthPx + "px",
|
|
42315
|
+
left: "50%",
|
|
42316
|
+
transform: "translateX(-50%)",
|
|
42317
|
+
borderTopColor: theme.color_tfr_800,
|
|
42318
|
+
borderTopStyle: "solid",
|
|
42319
|
+
borderTopWidth: "1px",
|
|
42320
|
+
borderRightColor: theme.color_tfr_800,
|
|
42321
|
+
borderRightStyle: "solid",
|
|
42322
|
+
borderRightWidth: "1px",
|
|
42323
|
+
borderLeftColor: theme.color_tfr_800,
|
|
42324
|
+
borderLeftStyle: "solid",
|
|
42325
|
+
borderLeftWidth: "1px"
|
|
42326
|
+
};
|
|
42327
|
+
} else {
|
|
42328
|
+
modalStyle = {};
|
|
42329
|
+
}
|
|
42330
|
+
} else {
|
|
42331
|
+
const screenHeightPx = window.innerHeight;
|
|
42332
|
+
const bottomContainerHeightPx = AVATAR_GUTTER_HEIGHT_PX;
|
|
42333
|
+
const imageHeightPx = screenHeightPx - bottomContainerHeightPx;
|
|
42334
|
+
const imageWidthPx = Math.floor(imageHeightPx * AVATAR_IMAGE_ASPECT_RATIO);
|
|
42335
|
+
imageSize = {
|
|
42336
|
+
width: imageWidthPx,
|
|
42337
|
+
height: imageHeightPx
|
|
42338
|
+
};
|
|
42339
|
+
bottomContainerStyle = {
|
|
42340
|
+
width: imageWidthPx,
|
|
42341
|
+
height: bottomContainerHeightPx
|
|
42342
|
+
};
|
|
42343
|
+
modalStyle = {};
|
|
42344
|
+
}
|
|
42345
|
+
const topContainerStyle = {
|
|
42346
|
+
width: imageSize.width + "px"
|
|
41961
42347
|
};
|
|
41962
|
-
|
|
41963
|
-
|
|
41964
|
-
|
|
41965
|
-
|
|
42348
|
+
const imageContainerStyle = {
|
|
42349
|
+
width: imageSize.width + "px",
|
|
42350
|
+
height: imageSize.height + "px"
|
|
42351
|
+
};
|
|
42352
|
+
const imageStyle = {
|
|
42353
|
+
width: imageSize.width + "px",
|
|
42354
|
+
height: imageSize.height + "px"
|
|
42355
|
+
};
|
|
42356
|
+
setLayoutData({
|
|
42357
|
+
topContainerStyle,
|
|
42358
|
+
imageContainerStyle,
|
|
42359
|
+
imageStyle,
|
|
42360
|
+
bottomContainerStyle
|
|
42361
|
+
});
|
|
42362
|
+
setModalStyle(modalStyle);
|
|
42363
|
+
}
|
|
42364
|
+
refreshLayoutData();
|
|
42365
|
+
window.addEventListener("resize", refreshLayoutData);
|
|
41966
42366
|
return () => {
|
|
41967
|
-
window.removeEventListener("resize",
|
|
42367
|
+
window.removeEventListener("resize", refreshLayoutData);
|
|
41968
42368
|
};
|
|
41969
|
-
}, []);
|
|
42369
|
+
}, [isMobileLayout]);
|
|
41970
42370
|
reactExports.useEffect(() => {
|
|
41971
42371
|
if (frameUrls && frameUrls.length > 0 && selectedFrameIndex == null) {
|
|
41972
42372
|
let currentFrameIndex = 0;
|
|
@@ -41980,42 +42380,6 @@ function Avatar({
|
|
|
41980
42380
|
}, 200);
|
|
41981
42381
|
}
|
|
41982
42382
|
}, [frameUrls, selectedFrameIndex]);
|
|
41983
|
-
const {
|
|
41984
|
-
imageSize,
|
|
41985
|
-
bottomContainerSize
|
|
41986
|
-
} = reactExports.useMemo(() => {
|
|
41987
|
-
let imageSize2;
|
|
41988
|
-
let bottomContainerSize2;
|
|
41989
|
-
if (isMobileLayout) {
|
|
41990
|
-
const imageWidthPx = containerSize.width;
|
|
41991
|
-
const imageHeightPx = Math.floor(imageWidthPx / AVATAR_IMAGE_ASPECT_RATIO);
|
|
41992
|
-
const bottomContainerHeightPx = containerSize.height - imageHeightPx;
|
|
41993
|
-
imageSize2 = {
|
|
41994
|
-
width: imageWidthPx,
|
|
41995
|
-
height: imageHeightPx
|
|
41996
|
-
};
|
|
41997
|
-
bottomContainerSize2 = {
|
|
41998
|
-
width: imageWidthPx,
|
|
41999
|
-
height: bottomContainerHeightPx
|
|
42000
|
-
};
|
|
42001
|
-
} else {
|
|
42002
|
-
const imageHeightPx = containerSize.height - AVATAR_DESKTOP_BOTTOM_CONTAINER_HEIGHT_PX;
|
|
42003
|
-
const imageWidthPx = Math.floor(imageHeightPx * AVATAR_IMAGE_ASPECT_RATIO);
|
|
42004
|
-
const bottomContainerHeightPx = AVATAR_DESKTOP_BOTTOM_CONTAINER_HEIGHT_PX;
|
|
42005
|
-
imageSize2 = {
|
|
42006
|
-
width: imageWidthPx,
|
|
42007
|
-
height: imageHeightPx
|
|
42008
|
-
};
|
|
42009
|
-
bottomContainerSize2 = {
|
|
42010
|
-
width: imageWidthPx,
|
|
42011
|
-
height: bottomContainerHeightPx
|
|
42012
|
-
};
|
|
42013
|
-
}
|
|
42014
|
-
return {
|
|
42015
|
-
imageSize: imageSize2,
|
|
42016
|
-
bottomContainerSize: bottomContainerSize2
|
|
42017
|
-
};
|
|
42018
|
-
}, [isMobileLayout, containerSize]);
|
|
42019
42383
|
const rotateLeft = reactExports.useCallback(() => {
|
|
42020
42384
|
setSelectedFrameIndex((prevIndex) => {
|
|
42021
42385
|
if (prevIndex == null) {
|
|
@@ -42032,7 +42396,7 @@ function Avatar({
|
|
|
42032
42396
|
return prevIndex === (frameUrls ? frameUrls.length - 1 : 0) ? 0 : prevIndex + 1;
|
|
42033
42397
|
});
|
|
42034
42398
|
}, [frameUrls]);
|
|
42035
|
-
const
|
|
42399
|
+
const handleImageMouseDrag = reactExports.useCallback((e) => {
|
|
42036
42400
|
e.preventDefault();
|
|
42037
42401
|
let startX = e.clientX;
|
|
42038
42402
|
const onMouseMove = (moveEvent) => {
|
|
@@ -42053,24 +42417,36 @@ function Avatar({
|
|
|
42053
42417
|
window.addEventListener("mousemove", onMouseMove);
|
|
42054
42418
|
window.addEventListener("mouseup", onMouseUp);
|
|
42055
42419
|
}, [rotateLeft, rotateRight]);
|
|
42420
|
+
const handleImageTouchDrag = reactExports.useCallback((e) => {
|
|
42421
|
+
e.preventDefault();
|
|
42422
|
+
let startX = e.touches[0].clientX;
|
|
42423
|
+
const onTouchMove = (moveEvent) => {
|
|
42424
|
+
const deltaX = moveEvent.touches[0].clientX - startX;
|
|
42425
|
+
if (Math.abs(deltaX) >= 50) {
|
|
42426
|
+
if (deltaX > 0) {
|
|
42427
|
+
rotateRight();
|
|
42428
|
+
} else {
|
|
42429
|
+
rotateLeft();
|
|
42430
|
+
}
|
|
42431
|
+
startX = moveEvent.touches[0].clientX;
|
|
42432
|
+
}
|
|
42433
|
+
};
|
|
42434
|
+
const onTouchEnd = () => {
|
|
42435
|
+
window.removeEventListener("touchmove", onTouchMove);
|
|
42436
|
+
window.removeEventListener("touchend", onTouchEnd);
|
|
42437
|
+
};
|
|
42438
|
+
window.addEventListener("touchmove", onTouchMove);
|
|
42439
|
+
window.addEventListener("touchend", onTouchEnd);
|
|
42440
|
+
}, [rotateLeft, rotateRight]);
|
|
42056
42441
|
let contentNode;
|
|
42057
42442
|
if (frameUrls && selectedFrameIndex != null) {
|
|
42058
42443
|
contentNode = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42059
|
-
/* @__PURE__ */ jsxs("div", { css: css2.imageContainer, style:
|
|
42060
|
-
|
|
42061
|
-
height: imageSize.height + "px"
|
|
42062
|
-
}, children: [
|
|
42063
|
-
/* @__PURE__ */ jsx$1("img", { src: frameUrls[selectedFrameIndex], css: css2.image, style: {
|
|
42064
|
-
width: imageSize.width + "px",
|
|
42065
|
-
height: imageSize.height + "px"
|
|
42066
|
-
}, onMouseDown: handleImageDrag }),
|
|
42444
|
+
/* @__PURE__ */ jsxs("div", { css: css2.imageContainer, style: layoutData.imageContainerStyle, children: [
|
|
42445
|
+
/* @__PURE__ */ jsx$1("img", { src: frameUrls[selectedFrameIndex], css: css2.image, style: layoutData.imageStyle, onMouseDown: handleImageMouseDrag, onTouchStart: handleImageTouchDrag }),
|
|
42067
42446
|
/* @__PURE__ */ jsx$1("div", { css: css2.chevronLeftContainer, onClick: rotateLeft, children: /* @__PURE__ */ jsx$1(SvgChevronLeft, { css: css2.chevronIcon }) }),
|
|
42068
42447
|
/* @__PURE__ */ jsx$1("div", { css: css2.chevronRightContainer, onClick: rotateRight, children: /* @__PURE__ */ jsx$1(SvgChevronRight, { css: css2.chevronIcon }) })
|
|
42069
42448
|
] }),
|
|
42070
|
-
/* @__PURE__ */ jsx$1("div", { css: css2.bottomContainer, style: {
|
|
42071
|
-
width: bottomContainerSize.width + "px",
|
|
42072
|
-
height: bottomContainerSize.height + "px"
|
|
42073
|
-
}, children: isMobileLayout ? /* @__PURE__ */ jsx$1(Fragment, { children: " " }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42449
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.bottomContainer, style: layoutData.bottomContainerStyle, children: isMobileLayout ? /* @__PURE__ */ jsx$1(Fragment, { children: " " }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42074
42450
|
/* @__PURE__ */ jsx$1("input", { type: "range", min: 0, max: frameUrls.length - 1, step: 1, value: selectedFrameIndex, onChange: (e) => setSelectedFrameIndex(Number(e.target.value)), css: css2.sliderInput }),
|
|
42075
42451
|
/* @__PURE__ */ jsx$1(TextT, { variant: "base", t: "vto-single.slide_to_rotate", css: css2.sliderText })
|
|
42076
42452
|
] }) })
|
|
@@ -42078,9 +42454,33 @@ function Avatar({
|
|
|
42078
42454
|
} else {
|
|
42079
42455
|
contentNode = /* @__PURE__ */ jsx$1(Loading, { t: "vto-single.avatar_loading" });
|
|
42080
42456
|
}
|
|
42081
|
-
return /* @__PURE__ */ jsx$1("div", {
|
|
42082
|
-
|
|
42083
|
-
|
|
42457
|
+
return /* @__PURE__ */ jsx$1("div", { css: css2.topContainer, style: layoutData.topContainerStyle, children: contentNode });
|
|
42458
|
+
}
|
|
42459
|
+
function ProductSummaryRow({
|
|
42460
|
+
loadedProductData
|
|
42461
|
+
}) {
|
|
42462
|
+
const css2 = useCss((_theme) => ({
|
|
42463
|
+
container: {
|
|
42464
|
+
width: "100%",
|
|
42465
|
+
padding: "4px 16px",
|
|
42466
|
+
display: "flex",
|
|
42467
|
+
alignItems: "center",
|
|
42468
|
+
gap: "8px",
|
|
42469
|
+
backgroundColor: "#F8F8F8"
|
|
42470
|
+
},
|
|
42471
|
+
labelContainer: {},
|
|
42472
|
+
labelText: {
|
|
42473
|
+
color: "#1A1A1A"
|
|
42474
|
+
},
|
|
42475
|
+
nameContainer: {},
|
|
42476
|
+
nameText: {
|
|
42477
|
+
color: "#9F9F9F"
|
|
42478
|
+
}
|
|
42479
|
+
}));
|
|
42480
|
+
return /* @__PURE__ */ jsxs("div", { css: css2.container, children: [
|
|
42481
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.labelContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "brand", css: css2.labelText, children: loadedProductData.styleCategoryLabel }) }),
|
|
42482
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.nameContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "brand", css: css2.nameText, children: loadedProductData.productName }) })
|
|
42483
|
+
] });
|
|
42084
42484
|
}
|
|
42085
42485
|
function ColorSelector({
|
|
42086
42486
|
availableColorLabels,
|
|
@@ -42149,20 +42549,20 @@ function SizeSelector({
|
|
|
42149
42549
|
}
|
|
42150
42550
|
function RecommendedSizeText({
|
|
42151
42551
|
loadedProductData,
|
|
42152
|
-
|
|
42552
|
+
textCss
|
|
42153
42553
|
}) {
|
|
42154
|
-
return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css:
|
|
42554
|
+
return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: textCss, t: "size-rec.recommended_size", vars: {
|
|
42155
42555
|
size: loadedProductData.recommendedSizeLabel
|
|
42156
42556
|
} });
|
|
42157
42557
|
}
|
|
42158
42558
|
function ItemFitText({
|
|
42159
42559
|
loadedProductData,
|
|
42160
|
-
|
|
42560
|
+
textCss
|
|
42161
42561
|
}) {
|
|
42162
42562
|
const {
|
|
42163
42563
|
t
|
|
42164
42564
|
} = useTranslation();
|
|
42165
|
-
return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css:
|
|
42565
|
+
return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: textCss, t: "size-rec.item_fit", vars: {
|
|
42166
42566
|
fit: t(`size-rec.fitClassification.${loadedProductData.fitClassification}`) || loadedProductData.fitClassification
|
|
42167
42567
|
} });
|
|
42168
42568
|
}
|
|
@@ -42559,9 +42959,9 @@ const SHARED_CONFIG = {
|
|
|
42559
42959
|
appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
|
|
42560
42960
|
},
|
|
42561
42961
|
build: {
|
|
42562
|
-
version: `${"5.0.
|
|
42563
|
-
commitHash: `${"
|
|
42564
|
-
date: `${"2026-01-
|
|
42962
|
+
version: `${"5.0.6"}`,
|
|
42963
|
+
commitHash: `${"e594d20"}`,
|
|
42964
|
+
date: `${"2026-01-12T14:54:57.160Z"}`
|
|
42565
42965
|
}
|
|
42566
42966
|
};
|
|
42567
42967
|
const CONFIGS = {
|