@thefittingroom/shop-ui 5.0.2 → 5.0.4

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.
Files changed (2) hide show
  1. package/dist/index.js +363 -187
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20731,7 +20731,7 @@ function TextT({
20731
20731
  return /* @__PURE__ */ jsx$1(Text, { ...props, children: translatedText });
20732
20732
  }
20733
20733
  const SvgArrowBack = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("path", { d: "M7.825 13L13.425 18.6L12 20L4 12L12 4L13.425 5.4L7.825 11H20V13H7.825Z", fill: "#1E1E1E" }));
20734
- const AvatarBottomBackgroundUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAAHCAYAAACbWWcuAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kbtLw1AUxr+makUqCnYQcchQneyiIo61CkWoEGqFVh1MbvqCJg1Jiouj4Fpw8LFYdXBx1tXBVRAEHyD+AeKk6CIlnpsUWsR44HJ/fPd8h3PPAYRGhWlWVxzQdNtMJxNiNrcqhl4RQA8GAQzIzDLmJCkF3/i6p2yKuxiv5Z/3Z/SreYsBAZE4zgzTJt4gntm0Dc77xBFWklXic+IJkxokfuS64vEb56LLAq8ZMTPpeeIIsVjsYKWDWcnUiKeJo6qmU30h67HKeYuzVqmxVp/8h+G8vrLMdTqjSGIRS5AgQkENZVRgI0a3ToqFNL0nfPwjrl8il0KuMhg5FlCFBtn1g+/g92ytwtSkVymcALpfHOdjDAjtAs2643wfO07zBAg+A1d6219tALOfpNfbWvSI1roNXFy3NWUPuNwBhp8M2ZRdKUhHKBSA9zNaUw4YugX61ry5td5x+gBkaFapG+DgEBgvUu11n3/3ds7t35zW/H4AAbNyeaZGKRsAAAAGYktHRAAAADQAefP4P6sAA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OnBQEiXDCGO2DpejQAwd25RWWHy1BaPpyVrR9HPmtOA/ebyotWMdKf11qHvB05ypJse+8kIzZHcq49TjGSmbbIgcY/TvYk+Ue/DaGNZwERkbEtAFoLmCJVBWcC5Mjc0dJYDzi3+AFoX7RqEAHgaCWF9xse2hmPVkNlA9+zAPsrfD0/4gN77X7Ex6e+S9bHF+l4+77/nuW90uR2u5V/yJQ49anG7eoAAAAASUVORK5CYII=";
20735
20735
  const SvgCheckCircle = (props) => /* @__PURE__ */ reactExports.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ reactExports.createElement("g", { clipPath: "url(#clip0_4454_620)" }, /* @__PURE__ */ reactExports.createElement("path", { d: "M14.6666 7.38674V8.00007C14.6658 9.43769 14.2003 10.8365 13.3395 11.988C12.4787 13.1394 11.2688 13.9817 9.89016 14.3893C8.51154 14.797 7.03809 14.748 5.68957 14.2498C4.34104 13.7516 3.18969 12.8308 2.40723 11.6248C1.62476 10.4188 1.25311 8.99211 1.3477 7.55761C1.44229 6.12312 1.99806 4.75762 2.93211 3.66479C3.86615 2.57195 5.12844 1.81033 6.53071 1.4935C7.93298 1.17668 9.4001 1.32163 10.7133 1.90674M14.6666 2.66674L7.99992 9.34007L5.99992 7.34007", stroke: "#21201F", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ reactExports.createElement("defs", null, /* @__PURE__ */ reactExports.createElement("clipPath", { id: "clip0_4454_620" }, /* @__PURE__ */ reactExports.createElement("rect", { width: 16, height: 16, fill: "white" }))));
20736
20736
  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
20737
  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" })));
@@ -20855,8 +20855,10 @@ function ModalTitlebar({
20855
20855
  let titleNode;
20856
20856
  if (typeof title === "string") {
20857
20857
  titleNode = /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.titleText, children: title });
20858
- } else {
20858
+ } else if (title) {
20859
20859
  titleNode = title;
20860
+ } else {
20861
+ titleNode = /* @__PURE__ */ jsx$1("div", { children: " " });
20860
20862
  }
20861
20863
  let backNode;
20862
20864
  if (onBackClick) {
@@ -20875,6 +20877,7 @@ function SidecarModalFrame({
20875
20877
  children
20876
20878
  }) {
20877
20879
  const deviceLayout = useMainStore((state) => state.deviceLayout);
20880
+ const isMobileLayout = deviceLayout === DeviceLayout.MOBILE_PORTRAIT || deviceLayout === DeviceLayout.TABLET_PORTRAIT;
20878
20881
  const css2 = useCss((_theme) => ({
20879
20882
  frameContentBase: {
20880
20883
  position: "absolute",
@@ -20891,10 +20894,13 @@ function SidecarModalFrame({
20891
20894
  left: 0,
20892
20895
  width: "100vw",
20893
20896
  height: "100vh",
20897
+ margin: 0,
20898
+ padding: 0,
20899
+ border: "none",
20894
20900
  backgroundColor: "#FFFFFF"
20895
20901
  }
20896
20902
  }));
20897
- return /* @__PURE__ */ jsx$1(ModalFrame, { isOpen: true, onRequestClose, contentStyle: deviceLayout === DeviceLayout.MOBILE_PORTRAIT ? css2.frameContentFullScreen : css2.frameContentBase, children });
20903
+ return /* @__PURE__ */ jsx$1(ModalFrame, { isOpen: true, onRequestClose, contentStyle: isMobileLayout ? css2.frameContentFullScreen : css2.frameContentBase, children });
20898
20904
  }
20899
20905
  var dayjs_min$1 = { exports: {} };
20900
20906
  var dayjs_min = dayjs_min$1.exports;
@@ -41517,93 +41523,22 @@ async function getStyleByExternalId(brandId, externalId) {
41517
41523
  recordCache[cacheKey] = record;
41518
41524
  return record;
41519
41525
  }
41526
+ const AVATAR_IMAGE_ASPECT_RATIO = 2 / 3;
41527
+ const AVATAR_DESKTOP_BOTTOM_CONTAINER_HEIGHT_PX = 100;
41520
41528
  const logger$1 = getLogger("vto-single");
41521
41529
  function VtoSingleOverlay() {
41522
- const {
41523
- t
41524
- } = useTranslation();
41525
41530
  const {
41526
41531
  brandId
41527
41532
  } = getStaticData();
41528
41533
  const userIsLoggedIn = useMainStore((state) => state.userIsLoggedIn);
41529
41534
  const userHasAvatar = useMainStore((state) => state.userHasAvatar);
41530
41535
  const userProfile = useMainStore((state) => state.userProfile);
41536
+ const deviceLayout = useMainStore((state) => state.deviceLayout);
41531
41537
  const openOverlay = useMainStore((state) => state.openOverlay);
41532
41538
  const closeOverlay = useMainStore((state) => state.closeOverlay);
41533
41539
  const [loadedProductData, setLoadedProductData] = reactExports.useState(null);
41534
41540
  const [selectedSizeLabel, setSelectedSizeLabel] = reactExports.useState(null);
41535
41541
  const [selectedColorLabel, setSelectedColorLabel] = reactExports.useState(null);
41536
- const css2 = useCss((theme) => ({
41537
- mainContainer: {
41538
- display: "flex",
41539
- height: "100%"
41540
- },
41541
- rightContainer: {
41542
- flexGrow: 1,
41543
- padding: "16px",
41544
- display: "flex",
41545
- flexDirection: "column"
41546
- },
41547
- contentContainer: {
41548
- flexGrow: 1,
41549
- display: "flex",
41550
- flexDirection: "column",
41551
- margin: "8px 0px",
41552
- padding: "16px 48px",
41553
- overflowY: "auto"
41554
- },
41555
- productNameContainer: {},
41556
- productNameText: {
41557
- fontSize: "32px"
41558
- },
41559
- priceContainer: {
41560
- marginTop: "8px"
41561
- },
41562
- priceText: {
41563
- fontSize: "18px"
41564
- },
41565
- colorContainer: {
41566
- marginTop: "16px"
41567
- },
41568
- colorLabelText: {
41569
- fontSize: "12px"
41570
- },
41571
- colorSelect: {
41572
- border: "none",
41573
- color: theme.color_fg_text,
41574
- fontFamily: theme.font_family,
41575
- fontSize: "12px"
41576
- },
41577
- sizeRecContainer: {
41578
- marginTop: "16px"
41579
- },
41580
- buttonContainer: {
41581
- marginTop: "24px"
41582
- },
41583
- descriptionContainer: {
41584
- marginTop: "32px"
41585
- },
41586
- descriptionText: {
41587
- fontSize: "12px"
41588
- },
41589
- footerContainer: {
41590
- marginLeft: "auto",
41591
- marginRight: "auto",
41592
- paddingBottom: "16px",
41593
- display: "flex",
41594
- justifyContent: "center",
41595
- alignItems: "center",
41596
- gap: "4px"
41597
- },
41598
- footerSignOutLink: {
41599
- fontSize: "10px",
41600
- color: theme.color_tfr_800
41601
- },
41602
- footerTfrIcon: {
41603
- width: "100px",
41604
- height: "24px"
41605
- }
41606
- }));
41607
41542
  reactExports.useEffect(() => {
41608
41543
  if (!userIsLoggedIn) {
41609
41544
  openOverlay(OverlayName.LANDING, {
@@ -41768,10 +41703,6 @@ function VtoSingleOverlay() {
41768
41703
  logger$1.logError("Error during logout:", error);
41769
41704
  });
41770
41705
  }, [closeOverlay, openOverlay]);
41771
- const handleColorSelectChange = reactExports.useCallback((e) => {
41772
- const newColorLabel = e.target.value || null;
41773
- setSelectedColorLabel(newColorLabel);
41774
- }, []);
41775
41706
  const handleAddToCartClick = reactExports.useCallback(async () => {
41776
41707
  try {
41777
41708
  if (!selectedSizeLabel) {
@@ -41792,35 +41723,178 @@ function VtoSingleOverlay() {
41792
41723
  if (!userIsLoggedIn || !userHasAvatar || !loadedProductData || !selectedColorSizeRecord) {
41793
41724
  return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, children: /* @__PURE__ */ jsx$1(Loading, {}) });
41794
41725
  }
41795
- return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, children: /* @__PURE__ */ jsxs("div", { css: css2.mainContainer, children: [
41796
- /* @__PURE__ */ jsx$1(VtoAvatar, { frameUrls }),
41726
+ let Layout;
41727
+ if (deviceLayout === DeviceLayout.MOBILE_PORTRAIT || deviceLayout === DeviceLayout.TABLET_PORTRAIT) {
41728
+ Layout = MobileLayout;
41729
+ } else {
41730
+ Layout = DesktopLayout;
41731
+ }
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 }) });
41733
+ }
41734
+ function MobileLayout({
41735
+ // loadedProductData,
41736
+ // selectedColorSizeRecord,
41737
+ // availableColorLabels,
41738
+ // selectedColorLabel,
41739
+ // selectedSizeLabel,
41740
+ frameUrls,
41741
+ onClose
41742
+ // onChangeColor,
41743
+ // onChangeSize,
41744
+ // onAddToCart,
41745
+ // onSignOut,
41746
+ }) {
41747
+ const css2 = useCss((_theme) => ({
41748
+ mainContainer: {
41749
+ width: "100%",
41750
+ height: "100%"
41751
+ },
41752
+ closeButton: {
41753
+ position: "absolute",
41754
+ top: "10px",
41755
+ right: "10px",
41756
+ width: "30px",
41757
+ height: "30px",
41758
+ border: "none",
41759
+ borderRadius: "15px",
41760
+ backgroundColor: "rgba(255, 255, 255, 0.15)",
41761
+ display: "flex",
41762
+ alignItems: "center",
41763
+ justifyContent: "center"
41764
+ },
41765
+ closeIcon: {
41766
+ width: "16px",
41767
+ height: "16px"
41768
+ }
41769
+ }));
41770
+ 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 }) })
41773
+ ] });
41774
+ }
41775
+ function DesktopLayout({
41776
+ loadedProductData,
41777
+ selectedColorSizeRecord,
41778
+ availableColorLabels,
41779
+ selectedColorLabel,
41780
+ selectedSizeLabel,
41781
+ frameUrls,
41782
+ onClose,
41783
+ onChangeColor,
41784
+ onChangeSize,
41785
+ onAddToCart,
41786
+ onSignOut
41787
+ }) {
41788
+ const {
41789
+ t
41790
+ } = useTranslation();
41791
+ const css2 = useCss((_theme) => ({
41792
+ mainContainer: {
41793
+ display: "flex",
41794
+ height: "100%"
41795
+ },
41796
+ rightContainer: {
41797
+ flexGrow: 1,
41798
+ padding: "16px",
41799
+ display: "flex",
41800
+ flexDirection: "column"
41801
+ },
41802
+ contentContainer: {
41803
+ flexGrow: 1,
41804
+ display: "flex",
41805
+ flexDirection: "column",
41806
+ margin: "8px 0px",
41807
+ padding: "16px 48px",
41808
+ overflowY: "auto"
41809
+ },
41810
+ productNameContainer: {},
41811
+ productNameText: {
41812
+ fontSize: "32px"
41813
+ },
41814
+ priceContainer: {
41815
+ marginTop: "8px"
41816
+ },
41817
+ priceText: {
41818
+ fontSize: "18px"
41819
+ },
41820
+ colorContainer: {
41821
+ marginTop: "16px"
41822
+ },
41823
+ sizeRecommendationContainer: {
41824
+ marginTop: "16px",
41825
+ display: "flex",
41826
+ flexDirection: "column",
41827
+ border: "1px solid rgba(33, 32, 31, 0.2)",
41828
+ padding: "32px 56px",
41829
+ justifyContent: "center",
41830
+ alignItems: "center"
41831
+ },
41832
+ recommendedSizeContainer: {
41833
+ display: "flex",
41834
+ alignItems: "center",
41835
+ gap: "6px",
41836
+ lineHeight: "normal"
41837
+ },
41838
+ recommendedSizeText: {
41839
+ fontWeight: "600"
41840
+ },
41841
+ itemFitContainer: {
41842
+ marginTop: "8px",
41843
+ lineHeight: "normal"
41844
+ },
41845
+ itemFitText: {},
41846
+ selectSizeLabelContainer: {
41847
+ lineHeight: "normal"
41848
+ },
41849
+ selectSizeLabelText: {},
41850
+ sizeSelectorContainer: {
41851
+ marginTop: "24px"
41852
+ },
41853
+ itemFitDetailsContainer: {
41854
+ marginTop: "24px",
41855
+ width: "100%"
41856
+ },
41857
+ buttonContainer: {
41858
+ marginTop: "24px"
41859
+ },
41860
+ descriptionContainer: {
41861
+ marginTop: "32px"
41862
+ }
41863
+ }));
41864
+ return /* @__PURE__ */ jsxs("div", { css: css2.mainContainer, children: [
41865
+ /* @__PURE__ */ jsx$1(Avatar, { frameUrls }),
41797
41866
  /* @__PURE__ */ jsxs("div", { css: css2.rightContainer, children: [
41798
- /* @__PURE__ */ jsx$1(ModalTitlebar, { title: t("try_it_on"), onCloseClick: closeOverlay }),
41867
+ /* @__PURE__ */ jsx$1(ModalTitlebar, { title: t("try_it_on"), onCloseClick: onClose }),
41799
41868
  /* @__PURE__ */ jsxs("div", { css: css2.contentContainer, children: [
41800
41869
  /* @__PURE__ */ jsx$1("div", { css: css2.productNameContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "brand", css: css2.productNameText, children: loadedProductData.productName }) }),
41801
41870
  /* @__PURE__ */ jsx$1("div", { css: css2.priceContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.priceText, children: selectedColorSizeRecord.priceFormatted }) }),
41802
- availableColorLabels.length >= 2 && /* @__PURE__ */ jsx$1("div", { css: css2.colorContainer, children: /* @__PURE__ */ jsxs("label", { children: [
41803
- /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.colorLabelText, t: "vto-single.color_label" }),
41804
- /* @__PURE__ */ jsx$1("select", { value: selectedColorLabel ?? "", onChange: handleColorSelectChange, css: css2.colorSelect, children: availableColorLabels.map((colorLabel) => /* @__PURE__ */ jsx$1("option", { value: colorLabel, children: colorLabel }, colorLabel)) })
41805
- ] }) }),
41806
- /* @__PURE__ */ jsx$1("div", { css: css2.sizeRecContainer, children: /* @__PURE__ */ jsx$1(SizeRecommendation, { loadedProductData, selectedSizeLabel, onChangeSize: setSelectedSizeLabel }) }),
41807
- /* @__PURE__ */ jsx$1("div", { css: css2.buttonContainer, children: /* @__PURE__ */ jsx$1(ButtonT, { variant: "brand", t: "vto-single.add_to_cart", onClick: handleAddToCartClick }) }),
41808
- /* @__PURE__ */ jsx$1("div", { css: css2.descriptionContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.descriptionText, children: /* @__PURE__ */ jsx$1("span", { dangerouslySetInnerHTML: {
41809
- __html: loadedProductData.productDescriptionHtml
41810
- } }) }) })
41871
+ /* @__PURE__ */ jsx$1("div", { css: css2.colorContainer, children: /* @__PURE__ */ jsx$1(ColorSelector, { availableColorLabels, selectedColorLabel, onChangeColor }) }),
41872
+ /* @__PURE__ */ jsxs("div", { css: css2.sizeRecommendationContainer, children: [
41873
+ /* @__PURE__ */ jsxs("div", { css: css2.recommendedSizeContainer, children: [
41874
+ /* @__PURE__ */ jsx$1(SvgInfoIcon, {}),
41875
+ /* @__PURE__ */ jsx$1(RecommendedSizeText, { loadedProductData, css: css2.recommendedSizeText })
41876
+ ] }),
41877
+ /* @__PURE__ */ jsx$1("div", { css: css2.itemFitContainer, children: /* @__PURE__ */ jsx$1(ItemFitText, { loadedProductData, css: css2.itemFitText }) }),
41878
+ /* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
41879
+ /* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: /* @__PURE__ */ jsx$1(SizeSelector, { loadedProductData, selectedSizeLabel, onChangeSize }) }),
41880
+ /* @__PURE__ */ jsx$1("div", { css: css2.itemFitDetailsContainer, children: /* @__PURE__ */ jsx$1(ItemFitDetails, { loadedProductData, selectedSizeLabel }) })
41881
+ ] }),
41882
+ /* @__PURE__ */ jsx$1("div", { css: css2.buttonContainer, children: /* @__PURE__ */ jsx$1(AddToCartButton, { onClick: onAddToCart }) }),
41883
+ /* @__PURE__ */ jsx$1("div", { css: css2.descriptionContainer, children: /* @__PURE__ */ jsx$1(ProductDescriptionText, { loadedProductData }) })
41811
41884
  ] }),
41812
- /* @__PURE__ */ jsxs("div", { css: css2.footerContainer, children: [
41813
- /* @__PURE__ */ jsx$1(LinkT, { variant: "underline", css: css2.footerSignOutLink, onClick: handleSignOutClick, t: "vto-single.sign_out" }),
41814
- /* @__PURE__ */ jsx$1(SvgTfrName, { css: css2.footerTfrIcon })
41815
- ] })
41885
+ /* @__PURE__ */ jsx$1(Footer, { onSignOutClick: onSignOut })
41816
41886
  ] })
41817
- ] }) });
41887
+ ] });
41818
41888
  }
41819
- const AVATAR_CONTROLS_HEIGHT_PX = 100;
41820
- function VtoAvatar({
41889
+ function Avatar({
41821
41890
  frameUrls
41822
41891
  }) {
41823
- const [containerHeightPx, setContainerHeightPx] = reactExports.useState(window.innerHeight);
41892
+ const deviceLayout = useMainStore((state) => state.deviceLayout);
41893
+ const isMobileLayout = deviceLayout === DeviceLayout.MOBILE_PORTRAIT || deviceLayout === DeviceLayout.TABLET_PORTRAIT;
41894
+ const [containerSize, setContainerSize] = reactExports.useState({
41895
+ width: window.innerWidth,
41896
+ height: window.innerHeight
41897
+ });
41824
41898
  const topContainerRef = reactExports.useRef(null);
41825
41899
  const [selectedFrameIndex, setSelectedFrameIndex] = reactExports.useState(null);
41826
41900
  const css2 = useCss((theme) => ({
@@ -41853,17 +41927,17 @@ function VtoAvatar({
41853
41927
  width: "48px",
41854
41928
  height: "48px"
41855
41929
  },
41856
- controlsContainer: {
41930
+ bottomContainer: {
41857
41931
  position: "absolute",
41858
41932
  bottom: "0",
41859
- height: AVATAR_CONTROLS_HEIGHT_PX + "px",
41933
+ height: "50px",
41860
41934
  display: "flex",
41861
41935
  flexDirection: "column",
41862
41936
  alignItems: "center",
41863
41937
  justifyContent: "center",
41864
41938
  paddingBottom: "32px",
41865
41939
  backgroundColor: "#FFFFFF",
41866
- backgroundImage: `url(${AvatarBottomBackgroundUrl})`,
41940
+ backgroundImage: `url(${AVATAR_BOTTOM_BACKGROUND_URL})`,
41867
41941
  backgroundSize: "contain",
41868
41942
  backgroundRepeat: "repeat-y"
41869
41943
  },
@@ -41877,7 +41951,15 @@ function VtoAvatar({
41877
41951
  }));
41878
41952
  reactExports.useEffect(() => {
41879
41953
  const handleResize = () => {
41880
- setContainerHeightPx(topContainerRef.current?.clientHeight ?? window.innerHeight);
41954
+ const containerEl = topContainerRef.current;
41955
+ const size = containerEl ? {
41956
+ width: containerEl.clientWidth,
41957
+ height: containerEl.clientHeight
41958
+ } : {
41959
+ width: window.innerWidth,
41960
+ height: window.innerHeight
41961
+ };
41962
+ setContainerSize(size);
41881
41963
  };
41882
41964
  handleResize();
41883
41965
  window.addEventListener("resize", handleResize);
@@ -41898,8 +41980,42 @@ function VtoAvatar({
41898
41980
  }, 200);
41899
41981
  }
41900
41982
  }, [frameUrls, selectedFrameIndex]);
41901
- const imageHeightPx = containerHeightPx - AVATAR_CONTROLS_HEIGHT_PX;
41902
- const imageWidthPx = Math.floor(imageHeightPx / 1.5);
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]);
41903
42019
  const rotateLeft = reactExports.useCallback(() => {
41904
42020
  setSelectedFrameIndex((prevIndex) => {
41905
42021
  if (prevIndex == null) {
@@ -41941,86 +42057,127 @@ function VtoAvatar({
41941
42057
  if (frameUrls && selectedFrameIndex != null) {
41942
42058
  contentNode = /* @__PURE__ */ jsxs(Fragment, { children: [
41943
42059
  /* @__PURE__ */ jsxs("div", { css: css2.imageContainer, style: {
41944
- width: imageWidthPx + "px",
41945
- height: imageHeightPx + "px"
42060
+ width: imageSize.width + "px",
42061
+ height: imageSize.height + "px"
41946
42062
  }, children: [
41947
42063
  /* @__PURE__ */ jsx$1("img", { src: frameUrls[selectedFrameIndex], css: css2.image, style: {
41948
- width: imageWidthPx + "px",
41949
- height: imageHeightPx + "px"
42064
+ width: imageSize.width + "px",
42065
+ height: imageSize.height + "px"
41950
42066
  }, onMouseDown: handleImageDrag }),
41951
42067
  /* @__PURE__ */ jsx$1("div", { css: css2.chevronLeftContainer, onClick: rotateLeft, children: /* @__PURE__ */ jsx$1(SvgChevronLeft, { css: css2.chevronIcon }) }),
41952
42068
  /* @__PURE__ */ jsx$1("div", { css: css2.chevronRightContainer, onClick: rotateRight, children: /* @__PURE__ */ jsx$1(SvgChevronRight, { css: css2.chevronIcon }) })
41953
42069
  ] }),
41954
- /* @__PURE__ */ jsxs("div", { css: css2.controlsContainer, style: {
41955
- width: imageWidthPx + "px"
41956
- }, children: [
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: [
41957
42074
  /* @__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 }),
41958
42075
  /* @__PURE__ */ jsx$1(TextT, { variant: "base", t: "vto-single.slide_to_rotate", css: css2.sliderText })
41959
- ] })
42076
+ ] }) })
41960
42077
  ] });
41961
42078
  } else {
41962
42079
  contentNode = /* @__PURE__ */ jsx$1(Loading, { t: "vto-single.avatar_loading" });
41963
42080
  }
41964
42081
  return /* @__PURE__ */ jsx$1("div", { ref: topContainerRef, css: css2.topContainer, style: {
41965
- width: imageWidthPx + "px"
42082
+ width: imageSize.width + "px"
41966
42083
  }, children: contentNode });
41967
42084
  }
41968
- function SizeRecommendation({
42085
+ function ColorSelector({
42086
+ availableColorLabels,
42087
+ selectedColorLabel,
42088
+ onChangeColor
42089
+ }) {
42090
+ const css2 = useCss((theme) => ({
42091
+ colorContainer: {},
42092
+ colorLabelText: {
42093
+ fontSize: "12px"
42094
+ },
42095
+ colorSelect: {
42096
+ border: "none",
42097
+ color: theme.color_fg_text,
42098
+ fontFamily: theme.font_family,
42099
+ fontSize: "12px"
42100
+ }
42101
+ }));
42102
+ const handleColorSelectChange = reactExports.useCallback((e) => {
42103
+ const newColorLabel = e.target.value || null;
42104
+ onChangeColor(newColorLabel);
42105
+ }, []);
42106
+ if (availableColorLabels.length < 2) {
42107
+ return null;
42108
+ }
42109
+ return /* @__PURE__ */ jsx$1("div", { css: css2.colorContainer, children: /* @__PURE__ */ jsxs("label", { children: [
42110
+ /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.colorLabelText, t: "vto-single.color_label" }),
42111
+ /* @__PURE__ */ jsx$1("select", { value: selectedColorLabel ?? "", onChange: handleColorSelectChange, css: css2.colorSelect, children: availableColorLabels.map((colorLabel) => /* @__PURE__ */ jsx$1("option", { value: colorLabel, children: colorLabel }, colorLabel)) })
42112
+ ] }) });
42113
+ }
42114
+ function SizeSelector({
41969
42115
  loadedProductData,
41970
42116
  selectedSizeLabel,
41971
42117
  onChangeSize
41972
42118
  }) {
41973
- const {
41974
- t
41975
- } = useTranslation();
41976
42119
  const css2 = useCss((_theme) => ({
41977
- frame: {
41978
- display: "flex",
41979
- flexDirection: "column",
41980
- border: "1px solid rgba(33, 32, 31, 0.2)",
41981
- padding: "32px 56px",
41982
- justifyContent: "center",
41983
- alignItems: "center"
41984
- },
41985
- recommendedSizeContainer: {
41986
- display: "flex",
41987
- alignItems: "center",
41988
- gap: "6px",
41989
- lineHeight: "normal"
41990
- },
41991
- recommendedSizeText: {
41992
- fontWeight: "600"
41993
- },
41994
- itemFitContainer: {
41995
- marginTop: "8px",
41996
- lineHeight: "normal"
41997
- },
41998
- itemFitText: {},
41999
- selectSizeLabelContainer: {
42000
- lineHeight: "normal"
42001
- },
42002
- selectSizeLabelText: {},
42003
- sizeSelectorContainer: {
42004
- marginTop: "24px",
42120
+ container: {
42005
42121
  display: "flex",
42006
42122
  alignItems: "center",
42007
42123
  gap: "12px"
42008
42124
  },
42009
- sizeSelectorButton: {
42125
+ button: {
42010
42126
  width: "54px",
42011
42127
  height: "44px",
42012
42128
  border: "1px solid rgba(33, 32, 31, 0.2)",
42013
42129
  padding: "9px 5px"
42014
42130
  },
42015
- sizeSelectorButtonSelected: {
42131
+ selectedButton: {
42016
42132
  border: "1px solid rgb(33, 32, 31)",
42017
42133
  cursor: "default"
42018
- },
42019
- fitContainer: {
42020
- marginTop: "24px",
42134
+ }
42135
+ }));
42136
+ const sizeSelectorNodeList = reactExports.useMemo(() => loadedProductData.sizes.map((sizeRecord) => {
42137
+ const isSelected = sizeRecord.sizeLabel === selectedSizeLabel;
42138
+ return /* @__PURE__ */ jsx$1(Button, { variant: "base", css: /* @__PURE__ */ css$1({
42139
+ ...css2.button,
42140
+ ...isSelected && css2.selectedButton
42141
+ }, "", ""), onClick: () => {
42142
+ if (isSelected) {
42143
+ return;
42144
+ }
42145
+ onChangeSize(sizeRecord.sizeLabel);
42146
+ }, children: sizeRecord.sizeLabel }, sizeRecord.sizeLabel);
42147
+ }), [loadedProductData.sizes, selectedSizeLabel, onChangeSize]);
42148
+ return /* @__PURE__ */ jsx$1("div", { css: css2.container, children: sizeSelectorNodeList });
42149
+ }
42150
+ function RecommendedSizeText({
42151
+ loadedProductData,
42152
+ css: css2
42153
+ }) {
42154
+ return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2, t: "size-rec.recommended_size", vars: {
42155
+ size: loadedProductData.recommendedSizeLabel
42156
+ } });
42157
+ }
42158
+ function ItemFitText({
42159
+ loadedProductData,
42160
+ css: css2
42161
+ }) {
42162
+ const {
42163
+ t
42164
+ } = useTranslation();
42165
+ return /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2, t: "size-rec.item_fit", vars: {
42166
+ fit: t(`size-rec.fitClassification.${loadedProductData.fitClassification}`) || loadedProductData.fitClassification
42167
+ } });
42168
+ }
42169
+ function ItemFitDetails({
42170
+ loadedProductData,
42171
+ selectedSizeLabel
42172
+ }) {
42173
+ const {
42174
+ t
42175
+ } = useTranslation();
42176
+ const css2 = useCss((_theme) => ({
42177
+ container: {
42021
42178
  width: "100%"
42022
42179
  },
42023
- fitLine: {
42180
+ line: {
42024
42181
  display: "flex",
42025
42182
  justifyContent: "space-between",
42026
42183
  alignItems: "center",
@@ -42029,29 +42186,17 @@ function SizeRecommendation({
42029
42186
  borderTop: "1px solid rgb(33, 32, 31)",
42030
42187
  paddingTop: "4px"
42031
42188
  },
42032
- fitFirstLine: {
42189
+ firstLine: {
42033
42190
  borderTop: "none",
42034
42191
  marginTop: "0px",
42035
42192
  paddingTop: "0px"
42036
42193
  },
42037
- fitDetail: {
42194
+ detailCell: {
42038
42195
  display: "flex",
42039
42196
  alignItems: "center",
42040
42197
  gap: "6px"
42041
42198
  }
42042
42199
  }));
42043
- const sizeSelectorNodeList = reactExports.useMemo(() => loadedProductData.sizes.map((sizeRecord) => {
42044
- const isSelected = sizeRecord.sizeLabel === selectedSizeLabel;
42045
- return /* @__PURE__ */ jsx$1(Button, { variant: "base", css: /* @__PURE__ */ css$1({
42046
- ...css2.sizeSelectorButton,
42047
- ...isSelected && css2.sizeSelectorButtonSelected
42048
- }, "", ""), onClick: () => {
42049
- if (isSelected) {
42050
- return;
42051
- }
42052
- onChangeSize(sizeRecord.sizeLabel);
42053
- }, children: sizeRecord.sizeLabel }, sizeRecord.sizeLabel);
42054
- }), [loadedProductData.sizes, selectedSizeLabel, onChangeSize]);
42055
42200
  const fitLineNodeList = reactExports.useMemo(() => {
42056
42201
  const selectedSizeRecord = loadedProductData.sizes.find((s) => s.sizeLabel === selectedSizeLabel);
42057
42202
  if (!selectedSizeRecord) {
@@ -42061,9 +42206,9 @@ function SizeRecommendation({
42061
42206
  const locationLabel = t(`size-rec.measurementLocation.${mlf.measurement_location}`) || mlf.measurement_location;
42062
42207
  const fit = mlf.fit;
42063
42208
  const fitLabel = t(`size-rec.fit.${fit}`) || fit;
42064
- return /* @__PURE__ */ jsxs("div", { css: [css2.fitLine, index === 0 && css2.fitFirstLine, "", ""], children: [
42065
- /* @__PURE__ */ jsx$1("div", { css: css2.fitDetail, children: locationLabel }),
42066
- /* @__PURE__ */ jsx$1("div", { css: css2.fitDetail, children: fit === "perfect_fit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
42209
+ return /* @__PURE__ */ jsxs("div", { css: [css2.line, index === 0 && css2.firstLine, "", ""], children: [
42210
+ /* @__PURE__ */ jsx$1("div", { css: css2.detailCell, children: locationLabel }),
42211
+ /* @__PURE__ */ jsx$1("div", { css: css2.detailCell, children: fit === "perfect_fit" ? /* @__PURE__ */ jsxs(Fragment, { children: [
42067
42212
  /* @__PURE__ */ jsx$1(SvgCheckCircle, {}),
42068
42213
  " ",
42069
42214
  fitLabel
@@ -42071,19 +42216,50 @@ function SizeRecommendation({
42071
42216
  ] }, index);
42072
42217
  });
42073
42218
  }, [loadedProductData, selectedSizeLabel]);
42074
- return /* @__PURE__ */ jsxs("div", { css: css2.frame, children: [
42075
- /* @__PURE__ */ jsxs("div", { css: css2.recommendedSizeContainer, children: [
42076
- /* @__PURE__ */ jsx$1(SvgInfoIcon, {}),
42077
- /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.recommendedSizeText, t: "size-rec.recommended_size", vars: {
42078
- size: loadedProductData.recommendedSizeLabel
42079
- } })
42080
- ] }),
42081
- /* @__PURE__ */ jsx$1("div", { css: css2.itemFitContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.itemFitText, t: "size-rec.item_fit", vars: {
42082
- fit: t(`size-rec.fitClassification.${loadedProductData.fitClassification}`) || loadedProductData.fitClassification
42083
- } }) }),
42084
- /* @__PURE__ */ jsx$1("div", { css: css2.selectSizeLabelContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", css: css2.selectSizeLabelText, t: "size-rec.select_size" }) }),
42085
- /* @__PURE__ */ jsx$1("div", { css: css2.sizeSelectorContainer, children: sizeSelectorNodeList }),
42086
- /* @__PURE__ */ jsx$1("div", { css: css2.fitContainer, children: fitLineNodeList })
42219
+ return /* @__PURE__ */ jsx$1("div", { css: css2.container, children: fitLineNodeList });
42220
+ }
42221
+ function AddToCartButton({
42222
+ onClick
42223
+ }) {
42224
+ return /* @__PURE__ */ jsx$1(ButtonT, { variant: "brand", t: "vto-single.add_to_cart", onClick });
42225
+ }
42226
+ function ProductDescriptionText({
42227
+ loadedProductData
42228
+ }) {
42229
+ const css2 = useCss((_theme) => ({
42230
+ descriptionText: {
42231
+ fontSize: "12px"
42232
+ }
42233
+ }));
42234
+ return /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.descriptionText, children: /* @__PURE__ */ jsx$1("span", { dangerouslySetInnerHTML: {
42235
+ __html: loadedProductData.productDescriptionHtml
42236
+ } }) });
42237
+ }
42238
+ function Footer({
42239
+ onSignOutClick
42240
+ }) {
42241
+ const css2 = useCss((theme) => ({
42242
+ container: {
42243
+ marginLeft: "auto",
42244
+ marginRight: "auto",
42245
+ paddingBottom: "16px",
42246
+ display: "flex",
42247
+ justifyContent: "center",
42248
+ alignItems: "center",
42249
+ gap: "4px"
42250
+ },
42251
+ signOutLink: {
42252
+ fontSize: "10px",
42253
+ color: theme.color_tfr_800
42254
+ },
42255
+ tfrIcon: {
42256
+ width: "100px",
42257
+ height: "24px"
42258
+ }
42259
+ }));
42260
+ return /* @__PURE__ */ jsxs("div", { css: css2.container, children: [
42261
+ /* @__PURE__ */ jsx$1(LinkT, { variant: "underline", css: css2.signOutLink, onClick: onSignOutClick, t: "vto-single.sign_out" }),
42262
+ /* @__PURE__ */ jsx$1(SvgTfrName, { css: css2.tfrIcon })
42087
42263
  ] });
42088
42264
  }
42089
42265
  function useSizeRecommendation(load) {
@@ -42383,9 +42559,9 @@ const SHARED_CONFIG = {
42383
42559
  appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
42384
42560
  },
42385
42561
  build: {
42386
- version: `${"5.0.2"}`,
42387
- commitHash: `${"cc69523"}`,
42388
- date: `${"2026-01-07T05:13:26.880Z"}`
42562
+ version: `${"5.0.4"}`,
42563
+ commitHash: `${"ab04059"}`,
42564
+ date: `${"2026-01-07T14:09:55.391Z"}`
42389
42565
  }
42390
42566
  };
42391
42567
  const CONFIGS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thefittingroom/shop-ui",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "the fitting room UI library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",