@primestyleai/tryon 5.5.20 → 5.5.22
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/react/index.js +236 -154
- package/dist/react/styles.d.ts +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -3263,25 +3263,29 @@ const STYLES = `
|
|
|
3263
3263
|
.ps-msc-corner.ps-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
|
|
3264
3264
|
.ps-msc-corner.ps-br { bottom: 0; right: 0; border-left: none; border-top: none; }
|
|
3265
3265
|
|
|
3266
|
-
/* Scanning line that sweeps top-to-bottom
|
|
3266
|
+
/* Scanning line that sweeps top-to-bottom — GPU-accelerated.
|
|
3267
|
+
Animating the top property caused first-paint stutter; switched
|
|
3268
|
+
to translate3d so the browser composites on its own layer
|
|
3269
|
+
without re-laying out the viewfinder on every frame. */
|
|
3267
3270
|
.ps-msc-scanline {
|
|
3268
3271
|
position: absolute; left: 28px; right: 28px;
|
|
3269
|
-
height: 1.5px; z-index: 3;
|
|
3272
|
+
top: 28px; height: 1.5px; z-index: 3;
|
|
3270
3273
|
background: linear-gradient(
|
|
3271
3274
|
to right,
|
|
3272
3275
|
transparent,
|
|
3273
|
-
rgba(180,220,255,0.
|
|
3274
|
-
rgba(180,220,255,0.
|
|
3276
|
+
rgba(180,220,255,0.9),
|
|
3277
|
+
rgba(180,220,255,0.9),
|
|
3275
3278
|
transparent
|
|
3276
3279
|
);
|
|
3277
|
-
|
|
3278
|
-
|
|
3280
|
+
will-change: transform, opacity;
|
|
3281
|
+
transform: translate3d(0, 0, 0);
|
|
3282
|
+
animation: ps-msc-scan 2.8s ease-in-out 0.4s infinite;
|
|
3279
3283
|
}
|
|
3280
3284
|
@keyframes ps-msc-scan {
|
|
3281
|
-
0% {
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
100% {
|
|
3285
|
+
0% { transform: translate3d(0, 0, 0); opacity: 0; }
|
|
3286
|
+
8% { opacity: 1; }
|
|
3287
|
+
92% { opacity: 1; }
|
|
3288
|
+
100% { transform: translate3d(0, min(calc(64vh - 60px), 480px), 0); opacity: 0; }
|
|
3285
3289
|
}
|
|
3286
3290
|
|
|
3287
3291
|
/* Pose skeleton overlay — sits over the photo */
|
|
@@ -3363,14 +3367,20 @@ const STYLES = `
|
|
|
3363
3367
|
MultiSectionMobile (.ps-msr-*) — mobile multi-section results
|
|
3364
3368
|
screen. Eyebrow + product hero + match badge + section list + CTA.
|
|
3365
3369
|
════════════════════════════════════════════════════════════════ */
|
|
3370
|
+
/* Layout: header (modal-level) → flex column root → scroll content
|
|
3371
|
+
(flex: 1, overflow-y: auto) → fixed bottom bar (flex-shrink: 0).
|
|
3372
|
+
This is more reliable than position: sticky inside an
|
|
3373
|
+
overflow:auto flex column, which was floating mid-screen. */
|
|
3366
3374
|
.ps-msr-root {
|
|
3367
3375
|
display: flex; flex-direction: column;
|
|
3368
|
-
gap: 14px; padding: 4px 4px 100px;
|
|
3369
|
-
/* Fill the modal body and create a self-scrolling region — the
|
|
3370
|
-
outer .ps-bp-root flex chain doesn't propagate scroll past the
|
|
3371
|
-
child level on mobile, so we own scrolling here. */
|
|
3372
3376
|
height: 100%; min-height: 0;
|
|
3377
|
+
margin: 0 -16px;
|
|
3378
|
+
}
|
|
3379
|
+
.ps-msr-scroll {
|
|
3380
|
+
flex: 1; min-height: 0;
|
|
3373
3381
|
overflow-y: auto; -webkit-overflow-scrolling: touch;
|
|
3382
|
+
display: flex; flex-direction: column;
|
|
3383
|
+
gap: 14px; padding: 8px 16px 24px;
|
|
3374
3384
|
}
|
|
3375
3385
|
.ps-msr-eyebrow {
|
|
3376
3386
|
font-size: 10px; font-weight: 600;
|
|
@@ -3474,16 +3484,13 @@ const STYLES = `
|
|
|
3474
3484
|
letter-spacing: -0.01em;
|
|
3475
3485
|
}
|
|
3476
3486
|
|
|
3477
|
-
/*
|
|
3478
|
-
while the cards above scroll. */
|
|
3487
|
+
/* Fixed bottom action bar — always visible, content scrolls above it */
|
|
3479
3488
|
.ps-msr-bottom {
|
|
3480
|
-
|
|
3481
|
-
margin: 14px -16px 0;
|
|
3482
|
-
padding: 14px 16px;
|
|
3483
|
-
padding-bottom: calc(14px + env(safe-area-inset-bottom));
|
|
3489
|
+
flex-shrink: 0;
|
|
3484
3490
|
background: var(--ps-bg-primary);
|
|
3485
3491
|
border-top: 1px solid var(--ps-border-subtle);
|
|
3486
|
-
|
|
3492
|
+
padding: 14px 16px;
|
|
3493
|
+
padding-bottom: calc(14px + env(safe-area-inset-bottom));
|
|
3487
3494
|
}
|
|
3488
3495
|
.ps-msr-tryon-cta {
|
|
3489
3496
|
display: flex; align-items: center; justify-content: center; gap: 8px;
|
|
@@ -3502,15 +3509,19 @@ const STYLES = `
|
|
|
3502
3509
|
|
|
3503
3510
|
/* ════════════════════════════════════════════════════════════════
|
|
3504
3511
|
MobileSectionDetail (.ps-msd-*) — section detail view on mobile.
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
Self-scrolling — content can be long.
|
|
3512
|
+
Layout: scroll container with rich blueprint rows matching the
|
|
3513
|
+
reference (number prefix, description, USER/SIZE labels, badge).
|
|
3508
3514
|
════════════════════════════════════════════════════════════════ */
|
|
3509
3515
|
.ps-msd-root {
|
|
3510
3516
|
display: flex; flex-direction: column;
|
|
3511
|
-
gap: 14px; padding: 4px 4px 60px;
|
|
3512
3517
|
height: 100%; min-height: 0;
|
|
3518
|
+
margin: 0 -16px;
|
|
3519
|
+
}
|
|
3520
|
+
.ps-msd-scroll {
|
|
3521
|
+
flex: 1; min-height: 0;
|
|
3513
3522
|
overflow-y: auto; -webkit-overflow-scrolling: touch;
|
|
3523
|
+
display: flex; flex-direction: column;
|
|
3524
|
+
gap: 18px; padding: 8px 16px 32px;
|
|
3514
3525
|
}
|
|
3515
3526
|
.ps-msd-back {
|
|
3516
3527
|
background: none; border: none;
|
|
@@ -3538,105 +3549,137 @@ const STYLES = `
|
|
|
3538
3549
|
object-fit: contain; display: block;
|
|
3539
3550
|
}
|
|
3540
3551
|
|
|
3541
|
-
/*
|
|
3542
|
-
.ps-msd-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
border-
|
|
3552
|
+
/* RECOMMENDED SIZE / FIT ACCURACY card */
|
|
3553
|
+
.ps-msd-card {
|
|
3554
|
+
background: var(--ps-bg-primary);
|
|
3555
|
+
border: 1px solid var(--ps-border-subtle);
|
|
3556
|
+
border-radius: 12px;
|
|
3557
|
+
padding: 22px 22px 18px;
|
|
3558
|
+
display: flex; flex-direction: column; gap: 8px;
|
|
3559
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
|
|
3546
3560
|
}
|
|
3547
|
-
.ps-msd-
|
|
3548
|
-
font-size:
|
|
3549
|
-
letter-spacing: 0.
|
|
3561
|
+
.ps-msd-card-eyebrow {
|
|
3562
|
+
font-size: 10px; font-weight: 700;
|
|
3563
|
+
letter-spacing: 0.16em; text-transform: uppercase;
|
|
3550
3564
|
color: var(--ps-text-muted);
|
|
3551
3565
|
}
|
|
3552
|
-
.ps-msd-size-row {
|
|
3553
|
-
display: flex; align-items: baseline; gap:
|
|
3566
|
+
.ps-msd-card-size-row {
|
|
3567
|
+
display: flex; align-items: baseline; gap: 12px;
|
|
3568
|
+
margin-top: 2px;
|
|
3554
3569
|
}
|
|
3555
|
-
.ps-msd-size
|
|
3556
|
-
font-size:
|
|
3570
|
+
.ps-msd-card-size {
|
|
3571
|
+
font-size: 56px; font-weight: 700;
|
|
3557
3572
|
color: var(--ps-text-primary);
|
|
3558
3573
|
line-height: 1; letter-spacing: -0.02em;
|
|
3559
3574
|
font-feature-settings: "tnum" 1;
|
|
3560
3575
|
}
|
|
3561
|
-
.ps-msd-size-
|
|
3562
|
-
font-size:
|
|
3563
|
-
|
|
3576
|
+
.ps-msd-card-size-meta {
|
|
3577
|
+
font-size: 12px; font-weight: 600;
|
|
3578
|
+
letter-spacing: 0.05em;
|
|
3579
|
+
color: var(--ps-text-muted);
|
|
3564
3580
|
}
|
|
3565
|
-
.ps-msd-
|
|
3566
|
-
|
|
3581
|
+
.ps-msd-card-divider {
|
|
3582
|
+
height: 1px; background: var(--ps-border-subtle);
|
|
3583
|
+
margin: 6px 0;
|
|
3584
|
+
}
|
|
3585
|
+
.ps-msd-card-pct-row {
|
|
3586
|
+
display: flex; align-items: center; gap: 12px;
|
|
3587
|
+
margin-top: 2px;
|
|
3567
3588
|
}
|
|
3568
|
-
.ps-msd-
|
|
3569
|
-
font-size:
|
|
3589
|
+
.ps-msd-card-pct {
|
|
3590
|
+
font-size: 30px; font-weight: 700;
|
|
3570
3591
|
color: var(--ps-accent);
|
|
3571
|
-
font-feature-settings: "tnum" 1;
|
|
3592
|
+
line-height: 1; font-feature-settings: "tnum" 1;
|
|
3572
3593
|
}
|
|
3573
|
-
.ps-msd-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3594
|
+
.ps-msd-card-bar {
|
|
3595
|
+
flex: 1; height: 2px;
|
|
3596
|
+
background: var(--ps-border-color); border-radius: 1px;
|
|
3597
|
+
overflow: hidden;
|
|
3598
|
+
}
|
|
3599
|
+
.ps-msd-card-bar-fill {
|
|
3600
|
+
height: 100%; background: var(--ps-accent);
|
|
3601
|
+
border-radius: 1px;
|
|
3602
|
+
}
|
|
3603
|
+
.ps-msd-card-note {
|
|
3604
|
+
font-size: 11px; color: var(--ps-text-muted);
|
|
3605
|
+
line-height: 1.5; margin: 2px 0 0;
|
|
3577
3606
|
}
|
|
3578
3607
|
|
|
3579
|
-
/* MEASUREMENT BLUEPRINT
|
|
3608
|
+
/* MEASUREMENT BLUEPRINT — rich rows with number, description, USER/SIZE
|
|
3609
|
+
labeled values, status badge with check icon */
|
|
3580
3610
|
.ps-msd-blueprint {
|
|
3581
|
-
display: flex; flex-direction: column; gap:
|
|
3582
|
-
padding-top:
|
|
3611
|
+
display: flex; flex-direction: column; gap: 6px;
|
|
3612
|
+
padding-top: 6px;
|
|
3583
3613
|
}
|
|
3584
3614
|
.ps-msd-blueprint-title {
|
|
3585
|
-
font-size:
|
|
3586
|
-
letter-spacing: 0.
|
|
3587
|
-
color: var(--ps-text-
|
|
3588
|
-
|
|
3615
|
+
font-size: 13px; font-weight: 800;
|
|
3616
|
+
letter-spacing: 0.12em; text-transform: uppercase;
|
|
3617
|
+
color: var(--ps-text-primary);
|
|
3618
|
+
margin-bottom: 0;
|
|
3619
|
+
}
|
|
3620
|
+
.ps-msd-blueprint-underline {
|
|
3621
|
+
width: 36px; height: 2px;
|
|
3622
|
+
background: var(--ps-text-primary);
|
|
3623
|
+
margin-bottom: 8px;
|
|
3589
3624
|
}
|
|
3590
3625
|
.ps-msd-rows {
|
|
3591
3626
|
display: flex; flex-direction: column;
|
|
3592
3627
|
}
|
|
3593
3628
|
.ps-msd-row {
|
|
3594
|
-
|
|
3629
|
+
display: flex; flex-direction: column;
|
|
3630
|
+
padding: 22px 0 24px;
|
|
3595
3631
|
border-bottom: 1px solid var(--ps-border-subtle);
|
|
3596
3632
|
}
|
|
3597
3633
|
.ps-msd-row:last-child { border-bottom: none; }
|
|
3598
|
-
.ps-msd-row-
|
|
3599
|
-
|
|
3600
|
-
|
|
3634
|
+
.ps-msd-row-num {
|
|
3635
|
+
font-size: 11px; font-weight: 700;
|
|
3636
|
+
letter-spacing: 0.14em; text-transform: uppercase;
|
|
3637
|
+
color: var(--ps-text-primary);
|
|
3638
|
+
margin-bottom: 4px;
|
|
3601
3639
|
}
|
|
3602
|
-
.ps-msd-row-
|
|
3603
|
-
font-size:
|
|
3604
|
-
|
|
3640
|
+
.ps-msd-row-desc {
|
|
3641
|
+
font-size: 12px; font-weight: 400;
|
|
3642
|
+
color: var(--ps-text-muted);
|
|
3643
|
+
margin: 0 0 14px;
|
|
3644
|
+
line-height: 1.5;
|
|
3645
|
+
}
|
|
3646
|
+
.ps-msd-row-cells {
|
|
3647
|
+
display: flex; justify-content: space-between; align-items: flex-end;
|
|
3648
|
+
gap: 16px; margin-bottom: 14px;
|
|
3649
|
+
}
|
|
3650
|
+
.ps-msd-row-cell {
|
|
3651
|
+
display: flex; flex-direction: column; gap: 4px;
|
|
3652
|
+
min-width: 0;
|
|
3653
|
+
}
|
|
3654
|
+
.ps-msd-row-cell.ps-right { text-align: right; }
|
|
3655
|
+
.ps-msd-cell-label {
|
|
3656
|
+
font-size: 9px; font-weight: 600;
|
|
3657
|
+
letter-spacing: 0.14em; text-transform: uppercase;
|
|
3605
3658
|
color: var(--ps-text-muted);
|
|
3606
3659
|
}
|
|
3660
|
+
.ps-msd-cell-value {
|
|
3661
|
+
font-size: 18px; font-weight: 700;
|
|
3662
|
+
color: var(--ps-text-primary);
|
|
3663
|
+
font-feature-settings: "tnum" 1;
|
|
3664
|
+
line-height: 1.1;
|
|
3665
|
+
}
|
|
3607
3666
|
.ps-msd-row-badge {
|
|
3608
|
-
|
|
3667
|
+
align-self: flex-end;
|
|
3668
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
3669
|
+
font-size: 10px; font-weight: 700;
|
|
3609
3670
|
letter-spacing: 0.12em; text-transform: uppercase;
|
|
3610
|
-
|
|
3671
|
+
white-space: nowrap;
|
|
3611
3672
|
}
|
|
3673
|
+
.ps-msd-row-badge svg { flex-shrink: 0; }
|
|
3612
3674
|
.ps-msd-row-badge.ps-good {
|
|
3613
|
-
background: rgba(33, 84, 239, 0.1);
|
|
3614
3675
|
color: var(--ps-accent);
|
|
3615
3676
|
}
|
|
3616
3677
|
.ps-msd-row-badge.ps-tight {
|
|
3617
|
-
background: rgba(220, 38, 38, 0.1);
|
|
3618
3678
|
color: #dc2626;
|
|
3619
3679
|
}
|
|
3620
3680
|
.ps-msd-row-badge.ps-loose {
|
|
3621
|
-
background: rgba(217, 119, 6, 0.1);
|
|
3622
3681
|
color: #d97706;
|
|
3623
3682
|
}
|
|
3624
|
-
.ps-msd-row-values {
|
|
3625
|
-
display: flex; gap: 16px;
|
|
3626
|
-
}
|
|
3627
|
-
.ps-msd-row-cell {
|
|
3628
|
-
flex: 1; display: flex; flex-direction: column; gap: 3px;
|
|
3629
|
-
}
|
|
3630
|
-
.ps-msd-cell-label {
|
|
3631
|
-
font-size: 9px; font-weight: 600;
|
|
3632
|
-
letter-spacing: 0.1em; text-transform: uppercase;
|
|
3633
|
-
color: var(--ps-text-muted);
|
|
3634
|
-
}
|
|
3635
|
-
.ps-msd-cell-value {
|
|
3636
|
-
font-size: 16px; font-weight: 600;
|
|
3637
|
-
color: var(--ps-text-primary);
|
|
3638
|
-
font-feature-settings: "tnum" 1;
|
|
3639
|
-
}
|
|
3640
3683
|
|
|
3641
3684
|
/* TRY ANOTHER SIZE picker */
|
|
3642
3685
|
.ps-msd-sizes {
|
|
@@ -4905,58 +4948,60 @@ function MultiSectionMobile({
|
|
|
4905
4948
|
return 72;
|
|
4906
4949
|
}, [sizingResult]);
|
|
4907
4950
|
return /* @__PURE__ */ jsxs("div", { className: "ps-msr-root", children: [
|
|
4908
|
-
/* @__PURE__ */
|
|
4909
|
-
|
|
4910
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msr-product
|
|
4911
|
-
/* @__PURE__ */
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
/* @__PURE__ */ jsx("h2", { className: "ps-msr-product-name", children: productTitle })
|
|
4915
|
-
] }),
|
|
4916
|
-
/* @__PURE__ */ jsx("div", { className: "ps-msr-match-row", children: /* @__PURE__ */ jsxs("div", { className: "ps-msr-match", children: [
|
|
4917
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msr-match-circle", children: [
|
|
4918
|
-
/* @__PURE__ */ jsxs("svg", { className: "ps-msr-match-ring", viewBox: "0 0 44 44", children: [
|
|
4919
|
-
/* @__PURE__ */ jsx("circle", { cx: "22", cy: "22", r: "20", fill: "none", stroke: "var(--ps-border-color)", strokeWidth: "3" }),
|
|
4920
|
-
/* @__PURE__ */ jsx(
|
|
4921
|
-
"circle",
|
|
4922
|
-
{
|
|
4923
|
-
cx: "22",
|
|
4924
|
-
cy: "22",
|
|
4925
|
-
r: "20",
|
|
4926
|
-
fill: "none",
|
|
4927
|
-
stroke: "var(--ps-accent)",
|
|
4928
|
-
strokeWidth: "3",
|
|
4929
|
-
strokeLinecap: "round",
|
|
4930
|
-
strokeDasharray: `${matchPct / 100 * 125.66} 125.66`,
|
|
4931
|
-
transform: "rotate(-90 22 22)"
|
|
4932
|
-
}
|
|
4933
|
-
)
|
|
4951
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msr-scroll", children: [
|
|
4952
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msr-eyebrow", children: t("Sizing Profile") }),
|
|
4953
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msr-product", children: [
|
|
4954
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msr-product-img-wrap", children: [
|
|
4955
|
+
/* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-msr-product-img" }),
|
|
4956
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-msr-bookmark", "aria-label": t("Save"), children: /* @__PURE__ */ jsx(BookmarkIcon, {}) })
|
|
4934
4957
|
] }),
|
|
4935
|
-
/* @__PURE__ */
|
|
4936
|
-
matchPct,
|
|
4937
|
-
"%"
|
|
4938
|
-
] })
|
|
4958
|
+
/* @__PURE__ */ jsx("h2", { className: "ps-msr-product-name", children: productTitle })
|
|
4939
4959
|
] }),
|
|
4940
|
-
/* @__PURE__ */ jsx("
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msr-match-row", children: /* @__PURE__ */ jsxs("div", { className: "ps-msr-match", children: [
|
|
4961
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msr-match-circle", children: [
|
|
4962
|
+
/* @__PURE__ */ jsxs("svg", { className: "ps-msr-match-ring", viewBox: "0 0 44 44", children: [
|
|
4963
|
+
/* @__PURE__ */ jsx("circle", { cx: "22", cy: "22", r: "20", fill: "none", stroke: "var(--ps-border-color)", strokeWidth: "3" }),
|
|
4964
|
+
/* @__PURE__ */ jsx(
|
|
4965
|
+
"circle",
|
|
4966
|
+
{
|
|
4967
|
+
cx: "22",
|
|
4968
|
+
cy: "22",
|
|
4969
|
+
r: "20",
|
|
4970
|
+
fill: "none",
|
|
4971
|
+
stroke: "var(--ps-accent)",
|
|
4972
|
+
strokeWidth: "3",
|
|
4973
|
+
strokeLinecap: "round",
|
|
4974
|
+
strokeDasharray: `${matchPct / 100 * 125.66} 125.66`,
|
|
4975
|
+
transform: "rotate(-90 22 22)"
|
|
4976
|
+
}
|
|
4977
|
+
)
|
|
4978
|
+
] }),
|
|
4979
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-msr-match-pct", children: [
|
|
4980
|
+
matchPct,
|
|
4981
|
+
"%"
|
|
4982
|
+
] })
|
|
4983
|
+
] }),
|
|
4984
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msr-match-label", children: t("FIT MATCH") })
|
|
4985
|
+
] }) }),
|
|
4986
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msr-sections", children: sectionEntries.map(({ name, secResult }) => {
|
|
4987
|
+
const cleanName = name.replace(/\s*[—–-]\s*.*/g, "");
|
|
4988
|
+
const sec = secResult;
|
|
4989
|
+
const sizeValue = sec.size || secResult.recommendedSize;
|
|
4990
|
+
return /* @__PURE__ */ jsxs(
|
|
4991
|
+
"button",
|
|
4992
|
+
{
|
|
4993
|
+
type: "button",
|
|
4994
|
+
className: "ps-msr-section-card",
|
|
4995
|
+
onClick: () => onSelectSection(name),
|
|
4996
|
+
children: [
|
|
4997
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msr-section-name", children: cleanName.toUpperCase() }),
|
|
4998
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msr-section-size", children: sizeValue })
|
|
4999
|
+
]
|
|
5000
|
+
},
|
|
5001
|
+
name
|
|
5002
|
+
);
|
|
5003
|
+
}) })
|
|
5004
|
+
] }),
|
|
4960
5005
|
/* @__PURE__ */ jsx("div", { className: "ps-msr-bottom", children: /* @__PURE__ */ jsxs(
|
|
4961
5006
|
"button",
|
|
4962
5007
|
{
|
|
@@ -5343,51 +5388,88 @@ function SectionDetailView({
|
|
|
5343
5388
|
const finalDisplayLength = selectedLength || backendLength;
|
|
5344
5389
|
const finalAllSizes = backendAvailableSizes.length > 0 ? backendAvailableSizes : allSizes;
|
|
5345
5390
|
if (isMobileProp) {
|
|
5346
|
-
|
|
5347
|
-
const
|
|
5348
|
-
|
|
5391
|
+
sectionName.replace(/\s*[—–-]\s*.*/g, "");
|
|
5392
|
+
const measurementDesc = (area) => {
|
|
5393
|
+
const a = area.toLowerCase().replace(/\s*\(.*?\)\s*/g, "").trim();
|
|
5394
|
+
if (a.includes("chest") || a.includes("bust")) return t("Full circumference at the widest point.");
|
|
5395
|
+
if (a.includes("waist")) return t("Circumference at the natural waistline.");
|
|
5396
|
+
if (a.includes("hip")) return t("Circumference at the fullest point.");
|
|
5397
|
+
if (a.includes("shoulder")) return t("Shoulder edge to shoulder edge.");
|
|
5398
|
+
if (a.includes("sleeve") || a.includes("arm")) return t("Shoulder seam to cuff edge.");
|
|
5399
|
+
if (a.includes("neck") || a.includes("collar")) return t("Around the base of the neck.");
|
|
5400
|
+
if (a.includes("inseam") || a.includes("inside leg")) return t("Inner leg seam length.");
|
|
5401
|
+
if (a.includes("thigh")) return t("Circumference around the upper leg.");
|
|
5402
|
+
if (a.includes("length") || a.includes("height")) return t("Top to bottom length.");
|
|
5403
|
+
return "";
|
|
5404
|
+
};
|
|
5405
|
+
const fitBadgeLabel = (fit, isLen) => {
|
|
5406
|
+
if (isLen && fit === "good") return t("EDITORIAL LENGTH");
|
|
5407
|
+
if (fit === "good") return t("PERFECT TENSION");
|
|
5408
|
+
if (fit === "a-bit-tight") return t("SLIGHTLY TIGHT");
|
|
5409
|
+
if (fit === "a-bit-loose") return t("SLIGHT EASE");
|
|
5410
|
+
if (fit.includes("tight")) return t("TIGHT");
|
|
5411
|
+
if (fit.includes("loose")) return t("LOOSE");
|
|
5412
|
+
return t("FIT");
|
|
5413
|
+
};
|
|
5414
|
+
return /* @__PURE__ */ jsx("div", { className: "ps-msd-root", children: /* @__PURE__ */ jsxs("div", { className: "ps-msd-scroll", children: [
|
|
5349
5415
|
/* @__PURE__ */ jsxs("button", { type: "button", className: "ps-msd-back", onClick: onBack, children: [
|
|
5350
5416
|
/* @__PURE__ */ jsx("span", { className: "ps-msd-back-arrow", children: "←" }),
|
|
5351
5417
|
" ",
|
|
5352
5418
|
t("Back to sections")
|
|
5353
5419
|
] }),
|
|
5354
5420
|
productImage && /* @__PURE__ */ jsx("div", { className: "ps-msd-image", children: /* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle || "", className: "ps-msd-image-img" }) }),
|
|
5355
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msd-
|
|
5356
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msd-
|
|
5357
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msd-size-row", children: [
|
|
5358
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msd-size
|
|
5359
|
-
finalDisplayLength && /* @__PURE__ */ jsx("span", { className: "ps-msd-size-
|
|
5421
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-card", children: [
|
|
5422
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msd-card-eyebrow", children: t("RECOMMENDED SIZE") }),
|
|
5423
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-card-size-row", children: [
|
|
5424
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msd-card-size", children: backendSize }),
|
|
5425
|
+
finalDisplayLength && /* @__PURE__ */ jsx("span", { className: "ps-msd-card-size-meta", children: finalDisplayLength })
|
|
5360
5426
|
] }),
|
|
5361
|
-
/* @__PURE__ */
|
|
5362
|
-
|
|
5427
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msd-card-divider" }),
|
|
5428
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msd-card-eyebrow", children: t("FIT ACCURACY") }),
|
|
5429
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-card-pct-row", children: [
|
|
5430
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-msd-card-pct", children: [
|
|
5363
5431
|
matchPercent,
|
|
5364
5432
|
"%"
|
|
5365
5433
|
] }),
|
|
5366
|
-
/* @__PURE__ */ jsx("
|
|
5367
|
-
] })
|
|
5434
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msd-card-bar", children: /* @__PURE__ */ jsx("div", { className: "ps-msd-card-bar-fill", style: { width: `${matchPercent}%` } }) })
|
|
5435
|
+
] }),
|
|
5436
|
+
/* @__PURE__ */ jsx("p", { className: "ps-msd-card-note", children: t("Based on your measurements and the garment's tailoring chart.") })
|
|
5368
5437
|
] }),
|
|
5369
5438
|
fitRows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-msd-blueprint", children: [
|
|
5370
5439
|
/* @__PURE__ */ jsx("span", { className: "ps-msd-blueprint-title", children: t("MEASUREMENT BLUEPRINT") }),
|
|
5440
|
+
/* @__PURE__ */ jsx("div", { className: "ps-msd-blueprint-underline" }),
|
|
5371
5441
|
/* @__PURE__ */ jsx("div", { className: "ps-msd-rows", children: fitRows.map((row, i) => {
|
|
5372
5442
|
const fitClass = row.fit === "good" ? "ps-good" : row.fit.includes("tight") ? "ps-tight" : "ps-loose";
|
|
5443
|
+
const desc = measurementDesc(row.area);
|
|
5444
|
+
const idxLbl = String(i + 1).padStart(2, "0");
|
|
5373
5445
|
return /* @__PURE__ */ jsxs("div", { className: "ps-msd-row", children: [
|
|
5374
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-
|
|
5375
|
-
|
|
5376
|
-
|
|
5446
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-num", children: [
|
|
5447
|
+
idxLbl,
|
|
5448
|
+
" ",
|
|
5449
|
+
row.area.toUpperCase()
|
|
5377
5450
|
] }),
|
|
5378
|
-
/* @__PURE__ */
|
|
5451
|
+
desc && /* @__PURE__ */ jsx("p", { className: "ps-msd-row-desc", children: desc }),
|
|
5452
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-cells", children: [
|
|
5379
5453
|
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-cell", children: [
|
|
5380
|
-
/* @__PURE__ */ jsx("span", { className: "ps-msd-cell-label", children: t("
|
|
5454
|
+
/* @__PURE__ */ jsx("span", { className: "ps-msd-cell-label", children: t("USER") }),
|
|
5381
5455
|
/* @__PURE__ */ jsxs("span", { className: "ps-msd-cell-value", children: [
|
|
5382
5456
|
row.userNum,
|
|
5383
5457
|
" ",
|
|
5384
5458
|
unitLbl
|
|
5385
5459
|
] })
|
|
5386
5460
|
] }),
|
|
5387
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-cell", children: [
|
|
5388
|
-
/* @__PURE__ */
|
|
5461
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-msd-row-cell ps-right", children: [
|
|
5462
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-msd-cell-label", children: [
|
|
5463
|
+
t("SIZE"),
|
|
5464
|
+
" ",
|
|
5465
|
+
backendSize
|
|
5466
|
+
] }),
|
|
5389
5467
|
/* @__PURE__ */ jsx("span", { className: "ps-msd-cell-value", children: row.chartLabel })
|
|
5390
5468
|
] })
|
|
5469
|
+
] }),
|
|
5470
|
+
/* @__PURE__ */ jsxs("div", { className: `ps-msd-row-badge ${fitClass}`, children: [
|
|
5471
|
+
row.isLength ? lengthFitLabelFn(row.fit, t).toUpperCase() : fitBadgeLabel(row.fit, row.isLength),
|
|
5472
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "11", height: "11", children: /* @__PURE__ */ jsx("path", { d: "M3 8l3.5 3.5L13 5" }) })
|
|
5391
5473
|
] })
|
|
5392
5474
|
] }, i);
|
|
5393
5475
|
}) })
|
|
@@ -5424,7 +5506,7 @@ function SectionDetailView({
|
|
|
5424
5506
|
);
|
|
5425
5507
|
}) })
|
|
5426
5508
|
] })
|
|
5427
|
-
] });
|
|
5509
|
+
] }) });
|
|
5428
5510
|
}
|
|
5429
5511
|
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sec-detail", style: { padding: "1.5vw", display: "flex", flexDirection: "column", height: "100%", background: "#F8F9FA" }, children: [
|
|
5430
5512
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|