@primestyleai/tryon 5.6.7 → 5.6.9
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.
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { TranslateFn } from "../../i18n";
|
|
2
2
|
import type { Profile } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Edit profile dialog — opens as a dark overlay ABOVE the main modal
|
|
5
|
+
* (z-index matches the .ps-tryon-overlay max-int so it always stacks
|
|
6
|
+
* on top). Wraps ProfileEditView so the user gets a real editable form
|
|
7
|
+
* with name + gender + units + height/weight/age + Save / Cancel.
|
|
8
|
+
*
|
|
9
|
+
* Portaled to document.body so parent stacking contexts can't clip it.
|
|
10
|
+
*/
|
|
3
11
|
export declare function ProfileDetailModal({ profileDetail, setProfileDetail, setProfiles, activeProfileId, setActiveProfileId, t, }: {
|
|
4
12
|
profileDetail: Profile | null;
|
|
5
13
|
setProfileDetail: (p: Profile | null) => void;
|
|
@@ -7,4 +15,4 @@ export declare function ProfileDetailModal({ profileDetail, setProfileDetail, se
|
|
|
7
15
|
activeProfileId: string | null;
|
|
8
16
|
setActiveProfileId: (id: string | null) => void;
|
|
9
17
|
t: TranslateFn;
|
|
10
|
-
}): import("react
|
|
18
|
+
}): import("react").ReactPortal | null;
|
package/dist/react/index.js
CHANGED
|
@@ -2805,15 +2805,28 @@ const STYLES = `
|
|
|
2805
2805
|
}
|
|
2806
2806
|
.ps-tryon-drawer-clear:hover { color: var(--ps-error-color); }
|
|
2807
2807
|
|
|
2808
|
-
/* Profile detail modal
|
|
2808
|
+
/* Profile detail modal — portaled to body, sits ABOVE the main modal
|
|
2809
|
+
overlay (which has z-index 2147483647). Equal z-index + later DOM
|
|
2810
|
+
order means this stacks on top. Same trick as the language dropdown. */
|
|
2809
2811
|
.ps-tryon-detail-overlay {
|
|
2810
2812
|
position: fixed; inset: 0; background: rgba(0,0,0,0.55);
|
|
2811
2813
|
display: flex; align-items: center; justify-content: center;
|
|
2812
|
-
z-index:
|
|
2814
|
+
z-index: 2147483647; padding: 0.83vw; animation: ps-fade-in 0.2s ease;
|
|
2815
|
+
isolation: isolate;
|
|
2816
|
+
--ps-accent: #3B82F6;
|
|
2817
|
+
--ps-accent-hover: #2563EB;
|
|
2818
|
+
--ps-text-primary: #1C1D1E;
|
|
2819
|
+
--ps-text-secondary: #454545;
|
|
2820
|
+
--ps-text-muted: #84898C;
|
|
2821
|
+
--ps-border-color: #E7E7E7;
|
|
2822
|
+
--ps-border-subtle: #F0F0F0;
|
|
2823
|
+
--ps-bg-primary: #FFFFFF;
|
|
2824
|
+
--ps-bg-secondary: #F8FAFF;
|
|
2825
|
+
--ps-error-color: #E7000B;
|
|
2813
2826
|
}
|
|
2814
2827
|
.ps-tryon-detail-modal {
|
|
2815
|
-
background: var(--ps-bg-primary); border-radius:
|
|
2816
|
-
overflow-y: auto; box-shadow: 0
|
|
2828
|
+
background: var(--ps-bg-primary); border-radius: 14px; width: 100%; max-width: 480px; max-height: 85vh;
|
|
2829
|
+
overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,0.3); animation: ps-slide-up 0.25s ease;
|
|
2817
2830
|
font-family: var(--ps-modal-font, system-ui, sans-serif); color: var(--ps-text-primary);
|
|
2818
2831
|
}
|
|
2819
2832
|
.ps-tryon-detail-header {
|
|
@@ -3719,6 +3732,155 @@ const STYLES = `
|
|
|
3719
3732
|
.ps-msr-tryon-cta:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
3720
3733
|
.ps-msr-tryon-cta svg { flex-shrink: 0; }
|
|
3721
3734
|
|
|
3735
|
+
/* ════════════════════════════════════════════════════════════════
|
|
3736
|
+
BodyShapeStepMobile (.ps-bsm-*) — vertical stacked option cards
|
|
3737
|
+
for body shape questions on mobile (chest / midsection / seat /
|
|
3738
|
+
hips). Matches the THE DIGITAL TAILOR reference design themed
|
|
3739
|
+
with the user's accent color.
|
|
3740
|
+
════════════════════════════════════════════════════════════════ */
|
|
3741
|
+
.ps-bsm-root {
|
|
3742
|
+
display: flex; flex-direction: column;
|
|
3743
|
+
gap: 18px; padding: 8px 4px 24px;
|
|
3744
|
+
flex: 1; min-height: 0;
|
|
3745
|
+
}
|
|
3746
|
+
.ps-bsm-step {
|
|
3747
|
+
font-size: 11px; font-weight: 700;
|
|
3748
|
+
letter-spacing: 0.16em; text-transform: uppercase;
|
|
3749
|
+
color: var(--ps-text-muted);
|
|
3750
|
+
margin-bottom: -4px;
|
|
3751
|
+
}
|
|
3752
|
+
.ps-bsm-question {
|
|
3753
|
+
font-size: 26px; font-weight: 800;
|
|
3754
|
+
color: var(--ps-text-primary);
|
|
3755
|
+
line-height: 1.15;
|
|
3756
|
+
letter-spacing: -0.01em;
|
|
3757
|
+
margin: 0 0 6px;
|
|
3758
|
+
}
|
|
3759
|
+
.ps-bsm-options {
|
|
3760
|
+
display: flex; flex-direction: column; gap: 12px;
|
|
3761
|
+
}
|
|
3762
|
+
.ps-bsm-card {
|
|
3763
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
3764
|
+
width: 100%;
|
|
3765
|
+
padding: 16px 18px;
|
|
3766
|
+
background: var(--ps-bg-secondary);
|
|
3767
|
+
border: 2px solid transparent;
|
|
3768
|
+
border-radius: 14px;
|
|
3769
|
+
cursor: pointer; font-family: inherit;
|
|
3770
|
+
text-align: left;
|
|
3771
|
+
transition: background 0.18s, border-color 0.18s, transform 0.15s;
|
|
3772
|
+
}
|
|
3773
|
+
.ps-bsm-card:active { transform: scale(0.985); }
|
|
3774
|
+
.ps-bsm-card.ps-active {
|
|
3775
|
+
background: var(--ps-accent);
|
|
3776
|
+
border-color: var(--ps-accent);
|
|
3777
|
+
box-shadow: 0 8px 24px rgba(33, 84, 239, 0.22);
|
|
3778
|
+
}
|
|
3779
|
+
.ps-bsm-card-content {
|
|
3780
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
3781
|
+
min-width: 0;
|
|
3782
|
+
}
|
|
3783
|
+
.ps-bsm-card-eyebrow {
|
|
3784
|
+
font-size: 10px; font-weight: 700;
|
|
3785
|
+
letter-spacing: 0.14em; text-transform: uppercase;
|
|
3786
|
+
color: var(--ps-text-muted);
|
|
3787
|
+
}
|
|
3788
|
+
.ps-bsm-card.ps-active .ps-bsm-card-eyebrow {
|
|
3789
|
+
color: rgba(255, 255, 255, 0.7);
|
|
3790
|
+
}
|
|
3791
|
+
.ps-bsm-card-label {
|
|
3792
|
+
font-size: 22px; font-weight: 800;
|
|
3793
|
+
color: var(--ps-text-primary);
|
|
3794
|
+
letter-spacing: 0.02em;
|
|
3795
|
+
}
|
|
3796
|
+
.ps-bsm-card.ps-active .ps-bsm-card-label { color: #FFFFFF; }
|
|
3797
|
+
.ps-bsm-card-thumb {
|
|
3798
|
+
flex-shrink: 0;
|
|
3799
|
+
width: 64px; height: 64px;
|
|
3800
|
+
border-radius: 10px;
|
|
3801
|
+
background: rgba(255, 255, 255, 0.6);
|
|
3802
|
+
display: flex; align-items: center; justify-content: center;
|
|
3803
|
+
overflow: hidden;
|
|
3804
|
+
margin-left: 14px;
|
|
3805
|
+
}
|
|
3806
|
+
.ps-bsm-card.ps-active .ps-bsm-card-thumb {
|
|
3807
|
+
background: rgba(255, 255, 255, 0.18);
|
|
3808
|
+
}
|
|
3809
|
+
.ps-bsm-card-thumb img {
|
|
3810
|
+
max-width: 100%; max-height: 100%;
|
|
3811
|
+
width: auto; height: 100%;
|
|
3812
|
+
object-fit: contain;
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
/* Mobile bra step fixes — give grid items breathing room and keep
|
|
3816
|
+
the dropdown visible. The desktop layout uses .ps-bp-bra-* but
|
|
3817
|
+
it's tight on phones. */
|
|
3818
|
+
@media (max-width: 768px) {
|
|
3819
|
+
.ps-bp-bra-step { padding: 4px 4px 24px; }
|
|
3820
|
+
.ps-bp-bra-step .ps-bp-title {
|
|
3821
|
+
font-size: 22px; font-weight: 800;
|
|
3822
|
+
text-align: left; margin-bottom: 18px;
|
|
3823
|
+
letter-spacing: -0.01em;
|
|
3824
|
+
}
|
|
3825
|
+
.ps-bp-bra-section { margin-bottom: 22px; }
|
|
3826
|
+
.ps-bp-bra-header {
|
|
3827
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
3828
|
+
margin-bottom: 12px;
|
|
3829
|
+
}
|
|
3830
|
+
.ps-bp-bra-label {
|
|
3831
|
+
font-size: 11px !important; font-weight: 700;
|
|
3832
|
+
letter-spacing: 0.14em; text-transform: uppercase;
|
|
3833
|
+
color: var(--ps-text-muted);
|
|
3834
|
+
}
|
|
3835
|
+
.ps-bp-bra-region-trigger {
|
|
3836
|
+
padding: 6px 12px !important; font-size: 12px !important;
|
|
3837
|
+
border: 1px solid var(--ps-border-color); border-radius: 999px;
|
|
3838
|
+
background: var(--ps-bg-secondary);
|
|
3839
|
+
color: var(--ps-text-secondary);
|
|
3840
|
+
}
|
|
3841
|
+
.ps-bp-bra-region-dropdown {
|
|
3842
|
+
position: absolute; right: 0; top: 100%;
|
|
3843
|
+
margin-top: 6px;
|
|
3844
|
+
background: var(--ps-bg-primary);
|
|
3845
|
+
border: 1px solid var(--ps-border-color);
|
|
3846
|
+
border-radius: 10px;
|
|
3847
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
|
|
3848
|
+
padding: 6px;
|
|
3849
|
+
z-index: 5;
|
|
3850
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
3851
|
+
min-width: 80px;
|
|
3852
|
+
}
|
|
3853
|
+
.ps-bp-bra-region-item {
|
|
3854
|
+
padding: 8px 12px !important; font-size: 12px !important;
|
|
3855
|
+
border-radius: 6px; background: none; border: none;
|
|
3856
|
+
cursor: pointer; text-align: left;
|
|
3857
|
+
color: var(--ps-text-secondary);
|
|
3858
|
+
}
|
|
3859
|
+
.ps-bp-bra-region-item.ps-selected {
|
|
3860
|
+
background: var(--ps-accent); color: #FFFFFF;
|
|
3861
|
+
}
|
|
3862
|
+
.ps-bp-bra-grid {
|
|
3863
|
+
display: grid !important;
|
|
3864
|
+
grid-template-columns: repeat(4, 1fr);
|
|
3865
|
+
gap: 8px;
|
|
3866
|
+
}
|
|
3867
|
+
.ps-bp-bra-btn {
|
|
3868
|
+
padding: 12px 4px !important; font-size: 13px !important;
|
|
3869
|
+
border-radius: 8px;
|
|
3870
|
+
border: 1.5px solid var(--ps-border-color);
|
|
3871
|
+
background: var(--ps-bg-primary);
|
|
3872
|
+
color: var(--ps-text-primary);
|
|
3873
|
+
font-weight: 600;
|
|
3874
|
+
cursor: pointer;
|
|
3875
|
+
min-height: 44px;
|
|
3876
|
+
}
|
|
3877
|
+
.ps-bp-bra-btn-selected {
|
|
3878
|
+
background: var(--ps-accent) !important;
|
|
3879
|
+
border-color: var(--ps-accent) !important;
|
|
3880
|
+
color: #FFFFFF !important;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3722
3884
|
/* ════════════════════════════════════════════════════════════════
|
|
3723
3885
|
MobileSectionDetail (.ps-msd-*) — section detail view on mobile.
|
|
3724
3886
|
Layout: scroll container with rich blueprint rows matching the
|
|
@@ -3851,6 +4013,8 @@ const STYLES = `
|
|
|
3851
4013
|
}
|
|
3852
4014
|
.ps-msp-card-photo {
|
|
3853
4015
|
width: 100%; height: 100%; object-fit: cover; display: block;
|
|
4016
|
+
/* Same head-bias crop as the profile detail avatar */
|
|
4017
|
+
object-position: 50% 12%;
|
|
3854
4018
|
}
|
|
3855
4019
|
.ps-msp-avatar {
|
|
3856
4020
|
position: relative;
|
|
@@ -4045,15 +4209,17 @@ const STYLES = `
|
|
|
4045
4209
|
════════════════════════════════════════════════════════════════ */
|
|
4046
4210
|
.ps-cpw-root {
|
|
4047
4211
|
display: flex; flex-direction: column;
|
|
4048
|
-
|
|
4212
|
+
height: 100%; min-height: 0;
|
|
4213
|
+
margin: 0 -16px;
|
|
4049
4214
|
}
|
|
4050
4215
|
|
|
4051
|
-
/* Step header —
|
|
4216
|
+
/* Step header — sticky at top */
|
|
4052
4217
|
.ps-cpw-step-head {
|
|
4053
4218
|
display: flex; align-items: flex-start; justify-content: space-between;
|
|
4054
4219
|
gap: 16px;
|
|
4055
|
-
padding
|
|
4220
|
+
padding: 4px 16px 18px;
|
|
4056
4221
|
border-bottom: 1px solid var(--ps-border-subtle);
|
|
4222
|
+
flex-shrink: 0;
|
|
4057
4223
|
}
|
|
4058
4224
|
.ps-cpw-eyebrow {
|
|
4059
4225
|
font-size: 10px; font-weight: 700;
|
|
@@ -4091,6 +4257,9 @@ const STYLES = `
|
|
|
4091
4257
|
.ps-cpw-body {
|
|
4092
4258
|
display: flex; flex-direction: column;
|
|
4093
4259
|
gap: 24px;
|
|
4260
|
+
flex: 1; min-height: 0;
|
|
4261
|
+
overflow-y: auto; -webkit-overflow-scrolling: touch;
|
|
4262
|
+
padding: 18px 16px 24px;
|
|
4094
4263
|
}
|
|
4095
4264
|
|
|
4096
4265
|
/* Step 1 — Identity form */
|
|
@@ -4177,7 +4346,8 @@ const STYLES = `
|
|
|
4177
4346
|
}
|
|
4178
4347
|
.ps-cpw-photo-upload {
|
|
4179
4348
|
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
4180
|
-
gap:
|
|
4349
|
+
gap: 8px; padding: 38px 18px;
|
|
4350
|
+
min-height: 220px;
|
|
4181
4351
|
background: var(--ps-bg-secondary);
|
|
4182
4352
|
border: 2px dashed var(--ps-border-color);
|
|
4183
4353
|
border-radius: 12px;
|
|
@@ -4282,13 +4452,14 @@ const STYLES = `
|
|
|
4282
4452
|
color: var(--ps-accent);
|
|
4283
4453
|
}
|
|
4284
4454
|
|
|
4285
|
-
/* Footer actions */
|
|
4455
|
+
/* Footer actions — sticky at the bottom */
|
|
4286
4456
|
.ps-cpw-footer {
|
|
4287
4457
|
display: flex; align-items: center; justify-content: space-between;
|
|
4288
4458
|
gap: 12px;
|
|
4289
|
-
padding
|
|
4459
|
+
padding: 16px 16px;
|
|
4290
4460
|
border-top: 1px solid var(--ps-border-subtle);
|
|
4291
|
-
|
|
4461
|
+
background: var(--ps-bg-primary);
|
|
4462
|
+
flex-shrink: 0;
|
|
4292
4463
|
}
|
|
4293
4464
|
.ps-cpw-back-btn {
|
|
4294
4465
|
background: none; border: none;
|
|
@@ -4355,6 +4526,11 @@ const STYLES = `
|
|
|
4355
4526
|
}
|
|
4356
4527
|
.ps-pmv-hero-avatar img {
|
|
4357
4528
|
width: 100%; height: 100%; object-fit: cover;
|
|
4529
|
+
/* Bias the crop toward the top of the photo so the head/face shows
|
|
4530
|
+
through the circular avatar instead of the torso. Works for any
|
|
4531
|
+
full-body or head-and-torso photo where the head is in the upper
|
|
4532
|
+
portion of the frame. */
|
|
4533
|
+
object-position: 50% 12%;
|
|
4358
4534
|
}
|
|
4359
4535
|
.ps-pmv-hero-info { flex: 1; min-width: 0; }
|
|
4360
4536
|
.ps-pmv-hero-eyebrow {
|
|
@@ -5588,60 +5764,59 @@ function ProfileDetailModal({
|
|
|
5588
5764
|
setActiveProfileId: setActiveProfileId2,
|
|
5589
5765
|
t
|
|
5590
5766
|
}) {
|
|
5767
|
+
useEffect(() => {
|
|
5768
|
+
if (!profileDetail || typeof document === "undefined") return;
|
|
5769
|
+
const prev = document.body.style.overflow;
|
|
5770
|
+
document.body.style.overflow = "hidden";
|
|
5771
|
+
return () => {
|
|
5772
|
+
document.body.style.overflow = prev;
|
|
5773
|
+
};
|
|
5774
|
+
}, [profileDetail]);
|
|
5591
5775
|
if (!profileDetail) return null;
|
|
5592
|
-
|
|
5593
|
-
const
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
return
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5776
|
+
if (typeof document === "undefined") return null;
|
|
5777
|
+
const handleSave = (updated) => {
|
|
5778
|
+
setProfiles((prev) => prev.map(
|
|
5779
|
+
(p) => p.id === profileDetail.id ? {
|
|
5780
|
+
...p,
|
|
5781
|
+
...updated,
|
|
5782
|
+
// Keep id + createdAt + sizeHistory + measurements; bump lastEditedAt
|
|
5783
|
+
id: p.id,
|
|
5784
|
+
createdAt: p.createdAt,
|
|
5785
|
+
sizeHistory: p.sizeHistory,
|
|
5786
|
+
measurements: p.measurements,
|
|
5787
|
+
lastEditedAt: Date.now()
|
|
5788
|
+
} : p
|
|
5789
|
+
));
|
|
5790
|
+
setProfileDetail(null);
|
|
5791
|
+
};
|
|
5792
|
+
const handleClose = () => setProfileDetail(null);
|
|
5793
|
+
return createPortal(
|
|
5794
|
+
/* @__PURE__ */ jsx(
|
|
5795
|
+
"div",
|
|
5796
|
+
{
|
|
5797
|
+
className: "ps-tryon-detail-overlay",
|
|
5798
|
+
onClick: (e) => {
|
|
5799
|
+
if (e.target === e.currentTarget) handleClose();
|
|
5800
|
+
},
|
|
5801
|
+
children: /* @__PURE__ */ jsxs("div", { className: "ps-tryon-detail-modal", children: [
|
|
5802
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-detail-header", children: [
|
|
5803
|
+
/* @__PURE__ */ jsx("span", { children: t("Edit Profile") }),
|
|
5804
|
+
/* @__PURE__ */ jsx("button", { onClick: handleClose, "aria-label": t("Close"), children: /* @__PURE__ */ jsx(XIcon, { size: 18 }) })
|
|
5805
|
+
] }),
|
|
5806
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-detail-body", children: /* @__PURE__ */ jsx(
|
|
5807
|
+
ProfileEditView,
|
|
5808
|
+
{
|
|
5809
|
+
profile: profileDetail,
|
|
5810
|
+
onSave: handleSave,
|
|
5811
|
+
onCancel: handleClose,
|
|
5812
|
+
t
|
|
5813
|
+
}
|
|
5814
|
+
) })
|
|
5627
5815
|
] })
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
new Date(p.createdAt).toLocaleDateString()
|
|
5633
|
-
] }),
|
|
5634
|
-
/* @__PURE__ */ jsxs("button", { className: "ps-tryon-detail-delete", onClick: () => {
|
|
5635
|
-
setProfiles((prev) => prev.filter((x) => x.id !== p.id));
|
|
5636
|
-
if (activeProfileId === p.id) setActiveProfileId2(null);
|
|
5637
|
-
setProfileDetail(null);
|
|
5638
|
-
}, children: [
|
|
5639
|
-
/* @__PURE__ */ jsx(TrashIcon, {}),
|
|
5640
|
-
" ",
|
|
5641
|
-
t("Delete Profile")
|
|
5642
|
-
] })
|
|
5643
|
-
] })
|
|
5644
|
-
] }) });
|
|
5816
|
+
}
|
|
5817
|
+
),
|
|
5818
|
+
document.body
|
|
5819
|
+
);
|
|
5645
5820
|
}
|
|
5646
5821
|
function WelcomeView({
|
|
5647
5822
|
productImage,
|
|
@@ -7690,6 +7865,10 @@ function ShapeSection({
|
|
|
7690
7865
|
}
|
|
7691
7866
|
function CreateProfileWizard({ onSave, onCancel, t }) {
|
|
7692
7867
|
const [step, setStep] = useState(1);
|
|
7868
|
+
const bodyScrollRef = useRef(null);
|
|
7869
|
+
useEffect(() => {
|
|
7870
|
+
if (bodyScrollRef.current) bodyScrollRef.current.scrollTop = 0;
|
|
7871
|
+
}, [step]);
|
|
7693
7872
|
const [name, setName] = useState("");
|
|
7694
7873
|
const [gender, setGender] = useState("male");
|
|
7695
7874
|
const [unit, setUnit] = useState("cm");
|
|
@@ -7807,7 +7986,7 @@ function CreateProfileWizard({ onSave, onCancel, t }) {
|
|
|
7807
7986
|
] })
|
|
7808
7987
|
] })
|
|
7809
7988
|
] }),
|
|
7810
|
-
/* @__PURE__ */ jsx("div", { className: "ps-cpw-body", children: step === 1 ? /* @__PURE__ */ jsxs("div", { className: "ps-cpw-identity", children: [
|
|
7989
|
+
/* @__PURE__ */ jsx("div", { className: "ps-cpw-body", ref: bodyScrollRef, children: step === 1 ? /* @__PURE__ */ jsxs("div", { className: "ps-cpw-identity", children: [
|
|
7811
7990
|
/* @__PURE__ */ jsxs("div", { className: "ps-cpw-field", children: [
|
|
7812
7991
|
/* @__PURE__ */ jsx("label", { className: "ps-cpw-field-label", children: t("PROFILE NAME") }),
|
|
7813
7992
|
/* @__PURE__ */ jsx(
|
|
@@ -8691,6 +8870,50 @@ function PhotoStepMobile({
|
|
|
8691
8870
|
] })
|
|
8692
8871
|
] });
|
|
8693
8872
|
}
|
|
8873
|
+
function BodyShapeStepMobile({
|
|
8874
|
+
stepNumber,
|
|
8875
|
+
totalSteps,
|
|
8876
|
+
title,
|
|
8877
|
+
options,
|
|
8878
|
+
selected,
|
|
8879
|
+
onSelect,
|
|
8880
|
+
t
|
|
8881
|
+
}) {
|
|
8882
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-bsm-root", children: [
|
|
8883
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bsm-step", children: [
|
|
8884
|
+
t("STEP"),
|
|
8885
|
+
" ",
|
|
8886
|
+
String(stepNumber).padStart(2, "0"),
|
|
8887
|
+
" / ",
|
|
8888
|
+
String(totalSteps).padStart(2, "0")
|
|
8889
|
+
] }),
|
|
8890
|
+
/* @__PURE__ */ jsx("h2", { className: "ps-bsm-question", children: title }),
|
|
8891
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bsm-options", children: options.map((opt, idx) => {
|
|
8892
|
+
const isActive = selected === opt.value;
|
|
8893
|
+
const profileLetter = String.fromCharCode(65 + idx);
|
|
8894
|
+
return /* @__PURE__ */ jsxs(
|
|
8895
|
+
"button",
|
|
8896
|
+
{
|
|
8897
|
+
type: "button",
|
|
8898
|
+
className: `ps-bsm-card${isActive ? " ps-active" : ""}`,
|
|
8899
|
+
onClick: () => onSelect(opt.value),
|
|
8900
|
+
children: [
|
|
8901
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bsm-card-content", children: [
|
|
8902
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-bsm-card-eyebrow", children: [
|
|
8903
|
+
t("PROFILE"),
|
|
8904
|
+
" ",
|
|
8905
|
+
profileLetter
|
|
8906
|
+
] }),
|
|
8907
|
+
/* @__PURE__ */ jsx("span", { className: "ps-bsm-card-label", children: opt.label.toUpperCase() })
|
|
8908
|
+
] }),
|
|
8909
|
+
opt.img && /* @__PURE__ */ jsx("div", { className: "ps-bsm-card-thumb", children: /* @__PURE__ */ jsx("img", { src: opt.img, alt: opt.label }) })
|
|
8910
|
+
]
|
|
8911
|
+
},
|
|
8912
|
+
opt.value
|
|
8913
|
+
);
|
|
8914
|
+
}) })
|
|
8915
|
+
] });
|
|
8916
|
+
}
|
|
8694
8917
|
function CameraUploadIcon() {
|
|
8695
8918
|
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "24", height: "24", children: [
|
|
8696
8919
|
/* @__PURE__ */ jsx("path", { d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }),
|
|
@@ -9250,7 +9473,23 @@ function BodyProfileView({
|
|
|
9250
9473
|
error && /* @__PURE__ */ jsx("p", { className: "ps-bp-error", children: error })
|
|
9251
9474
|
] }, "step-basics");
|
|
9252
9475
|
})(),
|
|
9253
|
-
step === "chest" && !isWomen && /* @__PURE__ */
|
|
9476
|
+
step === "chest" && !isWomen && (isMobile ? /* @__PURE__ */ jsx(
|
|
9477
|
+
BodyShapeStepMobile,
|
|
9478
|
+
{
|
|
9479
|
+
stepNumber: steps.indexOf("chest") + 1,
|
|
9480
|
+
totalSteps: steps.length,
|
|
9481
|
+
title: t("WHICH BEST DESCRIBES YOUR CHEST?"),
|
|
9482
|
+
options: [
|
|
9483
|
+
{ value: "narrow", label: t("Narrow"), img: BODY_IMAGES.male.chest.narrow },
|
|
9484
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.male.chest.average },
|
|
9485
|
+
{ value: "broad", label: t("Broad"), img: BODY_IMAGES.male.chest.broad }
|
|
9486
|
+
],
|
|
9487
|
+
selected: chestProfile,
|
|
9488
|
+
onSelect: (v) => setChestProfile(v),
|
|
9489
|
+
t
|
|
9490
|
+
},
|
|
9491
|
+
"step-chest-mobile"
|
|
9492
|
+
) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
|
|
9254
9493
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your chest?") }),
|
|
9255
9494
|
/* @__PURE__ */ jsxs("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: [
|
|
9256
9495
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.chest.narrow, label: t("Narrow"), selected: chestProfile === "narrow", onSelect: () => setChestProfile("narrow"), onHover: () => setHoverDesc(t("A slimmer, narrower chest build")), onLeave: () => setHoverDesc("") }),
|
|
@@ -9258,8 +9497,28 @@ function BodyProfileView({
|
|
|
9258
9497
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.chest.broad, label: t("Broad"), selected: chestProfile === "broad", onSelect: () => setChestProfile("broad"), onHover: () => setHoverDesc(t("A wider, more muscular chest")), onLeave: () => setHoverDesc("") })
|
|
9259
9498
|
] }),
|
|
9260
9499
|
/* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
|
|
9261
|
-
] }, "step-chest"),
|
|
9262
|
-
step === "midsection" && /* @__PURE__ */
|
|
9500
|
+
] }, "step-chest")),
|
|
9501
|
+
step === "midsection" && (isMobile ? /* @__PURE__ */ jsx(
|
|
9502
|
+
BodyShapeStepMobile,
|
|
9503
|
+
{
|
|
9504
|
+
stepNumber: steps.indexOf("midsection") + 1,
|
|
9505
|
+
totalSteps: steps.length,
|
|
9506
|
+
title: t("WHICH BEST DESCRIBES YOUR MIDSECTION?"),
|
|
9507
|
+
options: isWomen ? [
|
|
9508
|
+
{ value: "flat", label: t("Flat"), img: BODY_IMAGES.female.stomach.flat },
|
|
9509
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.female.stomach.average },
|
|
9510
|
+
{ value: "round", label: t("Full"), img: BODY_IMAGES.female.stomach.round }
|
|
9511
|
+
] : [
|
|
9512
|
+
{ value: "flat", label: t("Flat"), img: BODY_IMAGES.male.stomach.flat },
|
|
9513
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.male.stomach.average },
|
|
9514
|
+
{ value: "round", label: t("Full"), img: BODY_IMAGES.male.stomach.round }
|
|
9515
|
+
],
|
|
9516
|
+
selected: midsectionProfile,
|
|
9517
|
+
onSelect: (v) => setMidsectionProfile(v),
|
|
9518
|
+
t
|
|
9519
|
+
},
|
|
9520
|
+
"step-midsection-mobile"
|
|
9521
|
+
) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
|
|
9263
9522
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your midsection?") }),
|
|
9264
9523
|
/* @__PURE__ */ jsx("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: isWomen ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9265
9524
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.stomach.flat, label: t("Flat"), selected: midsectionProfile === "flat", onSelect: () => setMidsectionProfile("flat"), onHover: () => setHoverDesc(t("A flatter midsection with minimal protrusion")), onLeave: () => setHoverDesc("") }),
|
|
@@ -9271,8 +9530,28 @@ function BodyProfileView({
|
|
|
9271
9530
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.stomach.round, label: t("Full"), selected: midsectionProfile === "round", onSelect: () => setMidsectionProfile("round"), onHover: () => setHoverDesc(t("A fuller, more rounded midsection")), onLeave: () => setHoverDesc("") })
|
|
9272
9531
|
] }) }),
|
|
9273
9532
|
/* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
|
|
9274
|
-
] }, "step-midsection"),
|
|
9275
|
-
step === "seat" && /* @__PURE__ */
|
|
9533
|
+
] }, "step-midsection")),
|
|
9534
|
+
step === "seat" && (isMobile ? /* @__PURE__ */ jsx(
|
|
9535
|
+
BodyShapeStepMobile,
|
|
9536
|
+
{
|
|
9537
|
+
stepNumber: steps.indexOf("seat") + 1,
|
|
9538
|
+
totalSteps: steps.length,
|
|
9539
|
+
title: t("WHICH BEST DESCRIBES YOUR SEAT?"),
|
|
9540
|
+
options: isWomen ? [
|
|
9541
|
+
{ value: "narrow", label: t("Flat"), img: BODY_IMAGES.female.seat.narrow },
|
|
9542
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.female.seat.average },
|
|
9543
|
+
{ value: "full", label: t("Full"), img: BODY_IMAGES.female.seat.full }
|
|
9544
|
+
] : [
|
|
9545
|
+
{ value: "narrow", label: t("Flat"), img: BODY_IMAGES.male.seat.narrow },
|
|
9546
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.male.seat.average },
|
|
9547
|
+
{ value: "full", label: t("Full"), img: BODY_IMAGES.male.seat.full }
|
|
9548
|
+
],
|
|
9549
|
+
selected: seatProfile,
|
|
9550
|
+
onSelect: (v) => setSeatProfile(v),
|
|
9551
|
+
t
|
|
9552
|
+
},
|
|
9553
|
+
"step-seat-mobile"
|
|
9554
|
+
) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
|
|
9276
9555
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your seat?") }),
|
|
9277
9556
|
/* @__PURE__ */ jsx("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: isWomen ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9278
9557
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.seat.narrow, label: t("Flat"), selected: seatProfile === "narrow", onSelect: () => setSeatProfile("narrow"), onHover: () => setHoverDesc(t("A flatter backside with less projection")), onLeave: () => setHoverDesc("") }),
|
|
@@ -9284,8 +9563,24 @@ function BodyProfileView({
|
|
|
9284
9563
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.male.seat.full, label: t("Full"), selected: seatProfile === "full", onSelect: () => setSeatProfile("full"), onHover: () => setHoverDesc(t("A fuller, more rounded backside")), onLeave: () => setHoverDesc("") })
|
|
9285
9564
|
] }) }),
|
|
9286
9565
|
/* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
|
|
9287
|
-
] }, "step-seat"),
|
|
9288
|
-
step === "hips" && isWomen && /* @__PURE__ */
|
|
9566
|
+
] }, "step-seat")),
|
|
9567
|
+
step === "hips" && isWomen && (isMobile ? /* @__PURE__ */ jsx(
|
|
9568
|
+
BodyShapeStepMobile,
|
|
9569
|
+
{
|
|
9570
|
+
stepNumber: steps.indexOf("hips") + 1,
|
|
9571
|
+
totalSteps: steps.length,
|
|
9572
|
+
title: t("WHICH BEST DESCRIBES YOUR HIPS?"),
|
|
9573
|
+
options: [
|
|
9574
|
+
{ value: "narrow", label: t("Narrow"), img: BODY_IMAGES.female.hips.narrow },
|
|
9575
|
+
{ value: "average", label: t("Average"), img: BODY_IMAGES.female.hips.average },
|
|
9576
|
+
{ value: "full", label: t("Curvy"), img: BODY_IMAGES.female.hips.full }
|
|
9577
|
+
],
|
|
9578
|
+
selected: hipProfile,
|
|
9579
|
+
onSelect: (v) => setHipProfile(v),
|
|
9580
|
+
t
|
|
9581
|
+
},
|
|
9582
|
+
"step-hips-mobile"
|
|
9583
|
+
) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-single-q", children: [
|
|
9289
9584
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Which best describes your hips?") }),
|
|
9290
9585
|
/* @__PURE__ */ jsxs("div", { className: "ps-bp-shape-row ps-bp-shape-row-full", children: [
|
|
9291
9586
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.hips.narrow, label: t("Narrow"), selected: hipProfile === "narrow", onSelect: () => setHipProfile("narrow"), onHover: () => setHoverDesc(t("Hips closer to shoulder width")), onLeave: () => setHoverDesc("") }),
|
|
@@ -9293,7 +9588,7 @@ function BodyProfileView({
|
|
|
9293
9588
|
/* @__PURE__ */ jsx(ImageOptionCard, { img: BODY_IMAGES.female.hips.full, label: t("Curvy"), selected: hipProfile === "full", onSelect: () => setHipProfile("full"), onHover: () => setHoverDesc(t("Hips wider than shoulders")), onLeave: () => setHoverDesc("") })
|
|
9294
9589
|
] }),
|
|
9295
9590
|
/* @__PURE__ */ jsx("p", { className: "ps-bp-hover-hint", children: hoverDesc || " " })
|
|
9296
|
-
] }, "step-hips"),
|
|
9591
|
+
] }, "step-hips")),
|
|
9297
9592
|
step === "bra" && isWomen && /* @__PURE__ */ jsxs("div", { className: "ps-bp-step ps-bp-step-enter ps-bp-bra-step", children: [
|
|
9298
9593
|
/* @__PURE__ */ jsx("h2", { className: "ps-bp-title", children: t("Select your bra size") }),
|
|
9299
9594
|
/* @__PURE__ */ jsxs("div", { className: "ps-bp-bra-section", children: [
|