@primestyleai/tryon 5.5.10 → 5.5.11
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
CHANGED
|
@@ -2971,120 +2971,106 @@ const STYLES = `
|
|
|
2971
2971
|
border-bottom-color: var(--ps-accent);
|
|
2972
2972
|
}
|
|
2973
2973
|
|
|
2974
|
-
/*
|
|
2974
|
+
/* Slider rows — label top-left, value top-right, then [-] [track] [+] */
|
|
2975
2975
|
.ps-bpm-fields {
|
|
2976
2976
|
display: flex; flex-direction: column;
|
|
2977
2977
|
margin-top: 4px;
|
|
2978
2978
|
}
|
|
2979
2979
|
.ps-bpm-row {
|
|
2980
2980
|
display: flex; flex-direction: column;
|
|
2981
|
-
padding:
|
|
2982
|
-
gap:
|
|
2981
|
+
padding: 14px 4px;
|
|
2982
|
+
gap: 12px;
|
|
2983
2983
|
border-bottom: 1px solid var(--ps-border-subtle);
|
|
2984
2984
|
}
|
|
2985
2985
|
.ps-bpm-row:last-child { border-bottom: none; }
|
|
2986
2986
|
.ps-bpm-row-top {
|
|
2987
|
-
display: flex; align-items:
|
|
2987
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
2988
2988
|
}
|
|
2989
2989
|
.ps-bpm-label {
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
letter-spacing: 0.1em; text-transform: uppercase;
|
|
2990
|
+
font-size: 11px; font-weight: 600;
|
|
2991
|
+
letter-spacing: 0.12em; text-transform: uppercase;
|
|
2993
2992
|
color: var(--ps-text-muted);
|
|
2994
2993
|
}
|
|
2995
|
-
.ps-bpm-value-
|
|
2996
|
-
|
|
2997
|
-
|
|
2994
|
+
.ps-bpm-value-display {
|
|
2995
|
+
font-size: 14px; font-weight: 700;
|
|
2996
|
+
color: var(--ps-text-primary);
|
|
2997
|
+
font-feature-settings: "tnum" 1;
|
|
2998
2998
|
}
|
|
2999
2999
|
|
|
3000
|
-
/*
|
|
3000
|
+
/* Slider row container: [-] [track] [+] */
|
|
3001
|
+
.ps-bpm-slider-row {
|
|
3002
|
+
display: flex; align-items: center; gap: 12px;
|
|
3003
|
+
}
|
|
3004
|
+
.ps-bpm-step-btn {
|
|
3005
|
+
flex-shrink: 0;
|
|
3006
|
+
width: 34px; height: 34px; border-radius: 50%;
|
|
3007
|
+
background: var(--ps-bg-tertiary); border: none;
|
|
3008
|
+
display: flex; align-items: center; justify-content: center;
|
|
3009
|
+
cursor: pointer;
|
|
3010
|
+
color: var(--ps-text-secondary);
|
|
3011
|
+
transition: background 0.15s, transform 0.1s;
|
|
3012
|
+
}
|
|
3013
|
+
.ps-bpm-step-btn:hover { background: var(--ps-border-color); }
|
|
3014
|
+
.ps-bpm-step-btn:active { transform: scale(0.92); }
|
|
3015
|
+
|
|
3016
|
+
/* The slider — thicker track, dark navy thumb, monochrome */
|
|
3001
3017
|
.ps-bpm-slider {
|
|
3002
3018
|
-webkit-appearance: none; appearance: none;
|
|
3003
|
-
|
|
3019
|
+
flex: 1; min-width: 0;
|
|
3020
|
+
height: 4px; outline: none;
|
|
3004
3021
|
background: linear-gradient(
|
|
3005
3022
|
to right,
|
|
3006
|
-
var(--ps-
|
|
3007
|
-
var(--ps-
|
|
3023
|
+
var(--ps-text-primary) 0%,
|
|
3024
|
+
var(--ps-text-primary) var(--ps-pct, 0%),
|
|
3008
3025
|
var(--ps-border-color) var(--ps-pct, 0%),
|
|
3009
3026
|
var(--ps-border-color) 100%
|
|
3010
3027
|
);
|
|
3011
|
-
border-radius:
|
|
3012
|
-
margin: 0
|
|
3028
|
+
border-radius: 999px; cursor: pointer;
|
|
3029
|
+
margin: 0;
|
|
3013
3030
|
}
|
|
3014
3031
|
.ps-bpm-slider::-webkit-slider-thumb {
|
|
3015
3032
|
-webkit-appearance: none; appearance: none;
|
|
3016
|
-
width:
|
|
3017
|
-
background: var(--ps-
|
|
3033
|
+
width: 18px; height: 18px; border-radius: 50%;
|
|
3034
|
+
background: var(--ps-text-primary); border: none;
|
|
3018
3035
|
cursor: grab; transition: transform 0.15s ease;
|
|
3036
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.18);
|
|
3019
3037
|
}
|
|
3020
|
-
.ps-bpm-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.
|
|
3038
|
+
.ps-bpm-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.1); }
|
|
3021
3039
|
.ps-bpm-slider::-moz-range-thumb {
|
|
3022
|
-
width:
|
|
3023
|
-
background: var(--ps-
|
|
3024
|
-
|
|
3025
|
-
.ps-bpm-slider::-moz-range-track { background: transparent; height: 2px; }
|
|
3026
|
-
.ps-bpm-input {
|
|
3027
|
-
background: transparent; border: none; outline: none;
|
|
3028
|
-
font-family: inherit;
|
|
3029
|
-
font-size: 20px; font-weight: 600;
|
|
3030
|
-
color: var(--ps-text-primary);
|
|
3031
|
-
padding: 0; margin: 0;
|
|
3032
|
-
width: auto; min-width: 0;
|
|
3033
|
-
field-sizing: content;
|
|
3034
|
-
max-width: 4ch;
|
|
3035
|
-
}
|
|
3036
|
-
.ps-bpm-input::-webkit-outer-spin-button,
|
|
3037
|
-
.ps-bpm-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
|
3038
|
-
.ps-bpm-input[type="number"] { -moz-appearance: textfield; }
|
|
3039
|
-
.ps-bpm-input::placeholder { color: var(--ps-border-color); }
|
|
3040
|
-
.ps-bpm-input:focus { outline: none; }
|
|
3041
|
-
.ps-bpm-unit {
|
|
3042
|
-
font-size: 11px; font-weight: 500;
|
|
3043
|
-
color: var(--ps-text-muted);
|
|
3044
|
-
margin-left: 1px; flex-shrink: 0;
|
|
3040
|
+
width: 18px; height: 18px; border-radius: 50%;
|
|
3041
|
+
background: var(--ps-text-primary); border: none; cursor: grab;
|
|
3042
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.18);
|
|
3045
3043
|
}
|
|
3044
|
+
.ps-bpm-slider::-moz-range-track { background: transparent; height: 4px; }
|
|
3046
3045
|
|
|
3047
|
-
/*
|
|
3048
|
-
.ps-bpm-
|
|
3046
|
+
/* "or" divider — flanked by hairlines */
|
|
3047
|
+
.ps-bpm-or {
|
|
3049
3048
|
display: flex; align-items: center; gap: 12px;
|
|
3050
|
-
|
|
3051
|
-
border: none; border-radius: 10px;
|
|
3052
|
-
padding: 10px 14px; margin-top: 6px;
|
|
3053
|
-
cursor: pointer; font-family: inherit;
|
|
3054
|
-
text-align: left; width: 100%;
|
|
3055
|
-
transition: transform 0.15s ease;
|
|
3056
|
-
}
|
|
3057
|
-
.ps-bpm-photo-card:active { transform: scale(0.98); }
|
|
3058
|
-
.ps-bpm-photo-card-icon {
|
|
3059
|
-
flex-shrink: 0;
|
|
3060
|
-
width: 32px; height: 32px; border-radius: 7px;
|
|
3061
|
-
background: rgba(255,255,255,0.08);
|
|
3062
|
-
display: flex; align-items: center; justify-content: center;
|
|
3063
|
-
color: #FFFFFF;
|
|
3064
|
-
}
|
|
3065
|
-
.ps-bpm-photo-card-icon svg { width: 16px; height: 16px; }
|
|
3066
|
-
.ps-bpm-photo-card-content {
|
|
3067
|
-
flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0;
|
|
3049
|
+
margin: 14px 4px 4px;
|
|
3068
3050
|
}
|
|
3069
|
-
.ps-bpm-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
}
|
|
3073
|
-
.ps-bpm-photo-card-text {
|
|
3074
|
-
font-size: 13px; font-weight: 500; color: #FFFFFF;
|
|
3051
|
+
.ps-bpm-or::before, .ps-bpm-or::after {
|
|
3052
|
+
content: ""; flex: 1; height: 1px;
|
|
3053
|
+
background: var(--ps-border-subtle);
|
|
3075
3054
|
}
|
|
3076
|
-
.ps-bpm-
|
|
3077
|
-
|
|
3078
|
-
|
|
3055
|
+
.ps-bpm-or span {
|
|
3056
|
+
font-size: 10px; font-weight: 600;
|
|
3057
|
+
text-transform: uppercase; letter-spacing: 0.16em;
|
|
3058
|
+
color: var(--ps-text-muted);
|
|
3079
3059
|
}
|
|
3080
|
-
.ps-bpm-photo-card-arrow svg { width: 16px; height: 16px; }
|
|
3081
3060
|
|
|
3082
|
-
/*
|
|
3083
|
-
.ps-bpm-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3061
|
+
/* Minimal upload link — no card, no background, just text + icons */
|
|
3062
|
+
.ps-bpm-upload-link {
|
|
3063
|
+
display: flex; align-items: center; justify-content: center; gap: 10px;
|
|
3064
|
+
background: none; border: none;
|
|
3065
|
+
padding: 8px 4px; margin: 0;
|
|
3066
|
+
cursor: pointer; font-family: inherit;
|
|
3067
|
+
color: var(--ps-text-primary); font-size: 13px; font-weight: 500;
|
|
3068
|
+
width: 100%;
|
|
3069
|
+
transition: opacity 0.15s;
|
|
3087
3070
|
}
|
|
3071
|
+
.ps-bpm-upload-link:hover { opacity: 0.7; }
|
|
3072
|
+
.ps-bpm-upload-link svg { color: var(--ps-text-secondary); flex-shrink: 0; }
|
|
3073
|
+
|
|
3088
3074
|
.ps-bpm-error {
|
|
3089
3075
|
font-size: 11px; color: var(--ps-error-color);
|
|
3090
3076
|
text-align: center; margin: 4px 0 0;
|
|
@@ -3516,7 +3502,7 @@ function ClockIcon({ size = 16 }) {
|
|
|
3516
3502
|
/* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
|
|
3517
3503
|
] });
|
|
3518
3504
|
}
|
|
3519
|
-
function RulerIcon({ size = 18 }) {
|
|
3505
|
+
function RulerIcon$1({ size = 18 }) {
|
|
3520
3506
|
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
3521
3507
|
/* @__PURE__ */ jsx("path", { d: "M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z" }),
|
|
3522
3508
|
/* @__PURE__ */ jsx("path", { d: "m14.5 12.5 2-2" }),
|
|
@@ -3534,7 +3520,7 @@ function TrashIcon({ size = 14 }) {
|
|
|
3534
3520
|
/* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
3535
3521
|
] });
|
|
3536
3522
|
}
|
|
3537
|
-
function ChevronRightIcon
|
|
3523
|
+
function ChevronRightIcon() {
|
|
3538
3524
|
return /* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M9 18l6-6-6-6" }) });
|
|
3539
3525
|
}
|
|
3540
3526
|
function CheckIcon({ size = 14 }) {
|
|
@@ -3864,7 +3850,7 @@ function DrawerPanel({
|
|
|
3864
3850
|
p.heightCm ? ` · ${Math.round(p.heightCm)}${t("cm")}` : ""
|
|
3865
3851
|
] })
|
|
3866
3852
|
] }),
|
|
3867
|
-
/* @__PURE__ */ jsx(ChevronRightIcon
|
|
3853
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
3868
3854
|
] }, p.id))
|
|
3869
3855
|
] }) : /* @__PURE__ */ jsx(Fragment, { children: history.length === 0 ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-drawer-empty", children: t("No history yet.") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3870
3856
|
history.map((entry, idx) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-history-item ps-tryon-history-clickable", onClick: () => restoreHistory(entry), children: [
|
|
@@ -3976,7 +3962,7 @@ function WelcomeView({
|
|
|
3976
3962
|
/* @__PURE__ */ jsx("p", { className: "ps-tryon-welcome-sub", children: t("Get the perfect fit, then try it on virtually") })
|
|
3977
3963
|
] }),
|
|
3978
3964
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-features", children: [
|
|
3979
|
-
{ icon: /* @__PURE__ */ jsx(RulerIcon, { size: 22 }), title: t("Get Your Size"), desc: t("Instant fit recommendation") },
|
|
3965
|
+
{ icon: /* @__PURE__ */ jsx(RulerIcon$1, { size: 22 }), title: t("Get Your Size"), desc: t("Instant fit recommendation") },
|
|
3980
3966
|
{ icon: /* @__PURE__ */ jsx(CameraIcon, { size: 22 }), title: t("Try It On"), desc: t("See how it looks on you") }
|
|
3981
3967
|
].map((f, i) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-feature", children: [
|
|
3982
3968
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-feature-icon", children: f.icon }),
|
|
@@ -5416,25 +5402,62 @@ function useIsMobile() {
|
|
|
5416
5402
|
}, []);
|
|
5417
5403
|
return isMobile;
|
|
5418
5404
|
}
|
|
5419
|
-
function
|
|
5405
|
+
function RulerIcon() {
|
|
5406
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
|
|
5407
|
+
/* @__PURE__ */ jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
|
|
5408
|
+
/* @__PURE__ */ jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
|
|
5409
|
+
] });
|
|
5410
|
+
}
|
|
5411
|
+
function ScanIcon() {
|
|
5412
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
|
|
5413
|
+
/* @__PURE__ */ jsx("path", { d: "M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
5414
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
5415
|
+
] });
|
|
5416
|
+
}
|
|
5417
|
+
function MobileBottomTabs({ mode, onSwitchToManual, onSwitchToScan, t }) {
|
|
5418
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom-tabs", children: [
|
|
5419
|
+
/* @__PURE__ */ jsxs(
|
|
5420
|
+
"button",
|
|
5421
|
+
{
|
|
5422
|
+
type: "button",
|
|
5423
|
+
className: `ps-bpm-bottom-tab${mode === "manual" ? " ps-active" : ""}`,
|
|
5424
|
+
onClick: onSwitchToManual,
|
|
5425
|
+
children: [
|
|
5426
|
+
/* @__PURE__ */ jsx(RulerIcon, {}),
|
|
5427
|
+
t("MANUAL FIT")
|
|
5428
|
+
]
|
|
5429
|
+
}
|
|
5430
|
+
),
|
|
5431
|
+
/* @__PURE__ */ jsxs(
|
|
5432
|
+
"button",
|
|
5433
|
+
{
|
|
5434
|
+
type: "button",
|
|
5435
|
+
className: `ps-bpm-bottom-tab${mode === "scan" ? " ps-active" : ""}`,
|
|
5436
|
+
onClick: onSwitchToScan,
|
|
5437
|
+
children: [
|
|
5438
|
+
/* @__PURE__ */ jsx(ScanIcon, {}),
|
|
5439
|
+
t("AI SCAN")
|
|
5440
|
+
]
|
|
5441
|
+
}
|
|
5442
|
+
)
|
|
5443
|
+
] });
|
|
5444
|
+
}
|
|
5445
|
+
function CameraSmallIcon({ size = 16 }) {
|
|
5420
5446
|
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", width: size, height: size, children: [
|
|
5421
5447
|
/* @__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" }),
|
|
5422
5448
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "13", r: "4" })
|
|
5423
5449
|
] });
|
|
5424
5450
|
}
|
|
5425
|
-
function
|
|
5426
|
-
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "
|
|
5451
|
+
function ChevronRight() {
|
|
5452
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "14", height: "14", children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" }) });
|
|
5427
5453
|
}
|
|
5428
|
-
function
|
|
5429
|
-
return /* @__PURE__ */
|
|
5430
|
-
/* @__PURE__ */ jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
|
|
5431
|
-
/* @__PURE__ */ jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
|
|
5432
|
-
] });
|
|
5454
|
+
function MinusIcon() {
|
|
5455
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", width: "14", height: "14", children: /* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) });
|
|
5433
5456
|
}
|
|
5434
|
-
function
|
|
5435
|
-
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round",
|
|
5436
|
-
/* @__PURE__ */ jsx("
|
|
5437
|
-
/* @__PURE__ */ jsx("
|
|
5457
|
+
function PlusIcon() {
|
|
5458
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", width: "14", height: "14", children: [
|
|
5459
|
+
/* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
5460
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" })
|
|
5438
5461
|
] });
|
|
5439
5462
|
}
|
|
5440
5463
|
function BasicsStepMobile({
|
|
@@ -5462,14 +5485,36 @@ function BasicsStepMobile({
|
|
|
5462
5485
|
}) {
|
|
5463
5486
|
const heightCm = parseFloat(height) || 173;
|
|
5464
5487
|
const heightInTotal = (parseFloat(heightFeet) || 5) * 12 + (parseFloat(heightInches) || 8);
|
|
5488
|
+
const ftDisplay = Math.floor(heightInTotal / 12);
|
|
5489
|
+
const inDisplay = heightInTotal % 12;
|
|
5465
5490
|
const weightNum = parseFloat(weight) || (wUnit === "kg" ? 70 : 154);
|
|
5466
5491
|
const ageNum = parseFloat(age) || 30;
|
|
5467
|
-
const wMax = wUnit === "kg" ? 200 : 440;
|
|
5468
5492
|
const wMinFix = wUnit === "kg" ? 30 : 66;
|
|
5469
|
-
const
|
|
5470
|
-
const
|
|
5493
|
+
const wMax = wUnit === "kg" ? 200 : 440;
|
|
5494
|
+
const hCmMin = 120, hCmMax = 220;
|
|
5495
|
+
const hInMin = 48, hInMax = 84;
|
|
5496
|
+
const ageMin = 13, ageMax = 100;
|
|
5497
|
+
const pctHCm = (heightCm - hCmMin) / (hCmMax - hCmMin) * 100;
|
|
5498
|
+
const pctHIn = (heightInTotal - hInMin) / (hInMax - hInMin) * 100;
|
|
5471
5499
|
const pctW = (weightNum - wMinFix) / (wMax - wMinFix) * 100;
|
|
5472
|
-
const pctA = (ageNum -
|
|
5500
|
+
const pctA = (ageNum - ageMin) / (ageMax - ageMin) * 100;
|
|
5501
|
+
const setHeightTotalIn = (totalIn) => {
|
|
5502
|
+
const v = Math.max(hInMin, Math.min(hInMax, totalIn));
|
|
5503
|
+
setHeightFeet(String(Math.floor(v / 12)));
|
|
5504
|
+
setHeightInches(String(v % 12));
|
|
5505
|
+
};
|
|
5506
|
+
const incHeight = () => {
|
|
5507
|
+
if (hUnit === "in") setHeightTotalIn(heightInTotal + 1);
|
|
5508
|
+
else setHeight(String(Math.min(hCmMax, heightCm + 1)));
|
|
5509
|
+
};
|
|
5510
|
+
const decHeight = () => {
|
|
5511
|
+
if (hUnit === "in") setHeightTotalIn(heightInTotal - 1);
|
|
5512
|
+
else setHeight(String(Math.max(hCmMin, heightCm - 1)));
|
|
5513
|
+
};
|
|
5514
|
+
const incWeight = () => setWeight(String(Math.min(wMax, weightNum + 1)));
|
|
5515
|
+
const decWeight = () => setWeight(String(Math.max(wMinFix, weightNum - 1)));
|
|
5516
|
+
const incAge = () => setAge(String(Math.min(ageMax, ageNum + 1)));
|
|
5517
|
+
const decAge = () => setAge(String(Math.max(ageMin, ageNum - 1)));
|
|
5473
5518
|
return /* @__PURE__ */ jsxs("div", { className: "ps-bpm-root", children: [
|
|
5474
5519
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-header", children: [
|
|
5475
5520
|
/* @__PURE__ */ jsx("h2", { className: "ps-bpm-title", children: t("Let's find your best fit") }),
|
|
@@ -5499,168 +5544,107 @@ function BasicsStepMobile({
|
|
|
5499
5544
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5500
5545
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5501
5546
|
/* @__PURE__ */ jsx("span", { className: "ps-bpm-label", children: t("HEIGHT") }),
|
|
5502
|
-
|
|
5503
|
-
/* @__PURE__ */ jsx(
|
|
5504
|
-
"input",
|
|
5505
|
-
{
|
|
5506
|
-
type: "number",
|
|
5507
|
-
inputMode: "numeric",
|
|
5508
|
-
className: "ps-bpm-input",
|
|
5509
|
-
value: heightFeet,
|
|
5510
|
-
onChange: (e) => setHeightFeet(e.target.value),
|
|
5511
|
-
min: 3,
|
|
5512
|
-
max: 8,
|
|
5513
|
-
placeholder: "5"
|
|
5514
|
-
}
|
|
5515
|
-
),
|
|
5516
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-unit", children: "ft" }),
|
|
5517
|
-
/* @__PURE__ */ jsx(
|
|
5518
|
-
"input",
|
|
5519
|
-
{
|
|
5520
|
-
type: "number",
|
|
5521
|
-
inputMode: "numeric",
|
|
5522
|
-
className: "ps-bpm-input",
|
|
5523
|
-
value: heightInches,
|
|
5524
|
-
onChange: (e) => setHeightInches(e.target.value),
|
|
5525
|
-
min: 0,
|
|
5526
|
-
max: 11,
|
|
5527
|
-
placeholder: "8"
|
|
5528
|
-
}
|
|
5529
|
-
),
|
|
5530
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-unit", children: "in" })
|
|
5531
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "ps-bpm-value-group", children: [
|
|
5532
|
-
/* @__PURE__ */ jsx(
|
|
5533
|
-
"input",
|
|
5534
|
-
{
|
|
5535
|
-
type: "number",
|
|
5536
|
-
inputMode: "numeric",
|
|
5537
|
-
className: "ps-bpm-input",
|
|
5538
|
-
value: height,
|
|
5539
|
-
onChange: (e) => setHeight(e.target.value),
|
|
5540
|
-
min: 100,
|
|
5541
|
-
max: 250,
|
|
5542
|
-
placeholder: "173"
|
|
5543
|
-
}
|
|
5544
|
-
),
|
|
5545
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-unit", children: "cm" })
|
|
5546
|
-
] })
|
|
5547
|
+
/* @__PURE__ */ jsx("span", { className: "ps-bpm-value-display", children: hUnit === "in" ? `${ftDisplay}ft ${inDisplay}in` : `${Math.round(heightCm)} cm` })
|
|
5547
5548
|
] }),
|
|
5548
|
-
|
|
5549
|
-
"
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
}
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
}
|
|
5576
|
-
)
|
|
5549
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5550
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decHeight, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5551
|
+
hUnit === "in" ? /* @__PURE__ */ jsx(
|
|
5552
|
+
"input",
|
|
5553
|
+
{
|
|
5554
|
+
type: "range",
|
|
5555
|
+
className: "ps-bpm-slider",
|
|
5556
|
+
min: hInMin,
|
|
5557
|
+
max: hInMax,
|
|
5558
|
+
step: 1,
|
|
5559
|
+
value: heightInTotal,
|
|
5560
|
+
onChange: (e) => setHeightTotalIn(parseInt(e.target.value, 10)),
|
|
5561
|
+
style: { ["--ps-pct"]: `${pctHIn}%` }
|
|
5562
|
+
}
|
|
5563
|
+
) : /* @__PURE__ */ jsx(
|
|
5564
|
+
"input",
|
|
5565
|
+
{
|
|
5566
|
+
type: "range",
|
|
5567
|
+
className: "ps-bpm-slider",
|
|
5568
|
+
min: hCmMin,
|
|
5569
|
+
max: hCmMax,
|
|
5570
|
+
step: 1,
|
|
5571
|
+
value: heightCm,
|
|
5572
|
+
onChange: (e) => setHeight(e.target.value),
|
|
5573
|
+
style: { ["--ps-pct"]: `${pctHCm}%` }
|
|
5574
|
+
}
|
|
5575
|
+
),
|
|
5576
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incHeight, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5577
|
+
] })
|
|
5577
5578
|
] }),
|
|
5578
5579
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5579
5580
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5580
5581
|
/* @__PURE__ */ jsx("span", { className: "ps-bpm-label", children: t("WEIGHT") }),
|
|
5581
|
-
/* @__PURE__ */ jsxs("
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
type: "number",
|
|
5586
|
-
inputMode: "numeric",
|
|
5587
|
-
className: "ps-bpm-input",
|
|
5588
|
-
value: weight,
|
|
5589
|
-
onChange: (e) => setWeight(e.target.value),
|
|
5590
|
-
min: wUnit === "kg" ? 30 : 66,
|
|
5591
|
-
max: wUnit === "kg" ? 300 : 660,
|
|
5592
|
-
placeholder: wUnit === "kg" ? "70" : "154"
|
|
5593
|
-
}
|
|
5594
|
-
),
|
|
5595
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-unit", children: wUnit })
|
|
5582
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-bpm-value-display", children: [
|
|
5583
|
+
Math.round(weightNum),
|
|
5584
|
+
" ",
|
|
5585
|
+
wUnit.toUpperCase()
|
|
5596
5586
|
] })
|
|
5597
5587
|
] }),
|
|
5598
|
-
/* @__PURE__ */
|
|
5599
|
-
"
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5588
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5589
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decWeight, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5590
|
+
/* @__PURE__ */ jsx(
|
|
5591
|
+
"input",
|
|
5592
|
+
{
|
|
5593
|
+
type: "range",
|
|
5594
|
+
className: "ps-bpm-slider",
|
|
5595
|
+
min: wMinFix,
|
|
5596
|
+
max: wMax,
|
|
5597
|
+
step: 1,
|
|
5598
|
+
value: weightNum,
|
|
5599
|
+
onChange: (e) => setWeight(e.target.value),
|
|
5600
|
+
style: { ["--ps-pct"]: `${pctW}%` }
|
|
5601
|
+
}
|
|
5602
|
+
),
|
|
5603
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incWeight, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5604
|
+
] })
|
|
5611
5605
|
] }),
|
|
5612
5606
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5613
5607
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5614
5608
|
/* @__PURE__ */ jsx("span", { className: "ps-bpm-label", children: t("AGE") }),
|
|
5615
|
-
/* @__PURE__ */ jsxs("
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
type: "number",
|
|
5620
|
-
inputMode: "numeric",
|
|
5621
|
-
className: "ps-bpm-input",
|
|
5622
|
-
value: age,
|
|
5623
|
-
onChange: (e) => setAge(e.target.value),
|
|
5624
|
-
min: 13,
|
|
5625
|
-
max: 100,
|
|
5626
|
-
placeholder: "30"
|
|
5627
|
-
}
|
|
5628
|
-
),
|
|
5629
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-unit", children: t("years") })
|
|
5609
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-bpm-value-display", children: [
|
|
5610
|
+
Math.round(ageNum),
|
|
5611
|
+
" ",
|
|
5612
|
+
t("YEARS")
|
|
5630
5613
|
] })
|
|
5631
5614
|
] }),
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
"
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5615
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5616
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decAge, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5617
|
+
/* @__PURE__ */ jsx(
|
|
5618
|
+
"input",
|
|
5619
|
+
{
|
|
5620
|
+
type: "range",
|
|
5621
|
+
className: "ps-bpm-slider",
|
|
5622
|
+
min: ageMin,
|
|
5623
|
+
max: ageMax,
|
|
5624
|
+
step: 1,
|
|
5625
|
+
value: ageNum,
|
|
5626
|
+
onChange: (e) => setAge(e.target.value),
|
|
5627
|
+
style: { ["--ps-pct"]: `${pctA}%` }
|
|
5628
|
+
}
|
|
5629
|
+
),
|
|
5630
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incAge, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5631
|
+
] })
|
|
5645
5632
|
] })
|
|
5646
5633
|
] }),
|
|
5634
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-or", children: /* @__PURE__ */ jsx("span", { children: t("or") }) }),
|
|
5647
5635
|
/* @__PURE__ */ jsxs(
|
|
5648
5636
|
"button",
|
|
5649
5637
|
{
|
|
5650
5638
|
type: "button",
|
|
5651
|
-
className: "ps-bpm-
|
|
5639
|
+
className: "ps-bpm-upload-link",
|
|
5652
5640
|
onClick: onUploadPhoto,
|
|
5653
5641
|
children: [
|
|
5654
|
-
/* @__PURE__ */ jsx(
|
|
5655
|
-
/* @__PURE__ */
|
|
5656
|
-
|
|
5657
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-photo-card-text", children: t("Upload a photo for AI sizing") })
|
|
5658
|
-
] }),
|
|
5659
|
-
/* @__PURE__ */ jsx("span", { className: "ps-bpm-photo-card-arrow", children: /* @__PURE__ */ jsx(ChevronRightIcon, {}) })
|
|
5642
|
+
/* @__PURE__ */ jsx(CameraSmallIcon, {}),
|
|
5643
|
+
/* @__PURE__ */ jsx("span", { children: t("Upload a photo for AI sizing") }),
|
|
5644
|
+
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
5660
5645
|
]
|
|
5661
5646
|
}
|
|
5662
5647
|
),
|
|
5663
|
-
/* @__PURE__ */ jsx("p", { className: "ps-bpm-hint", children: t("Enter accurate height for better fit recommendations") }),
|
|
5664
5648
|
error && /* @__PURE__ */ jsx("p", { className: "ps-bpm-error", children: error }),
|
|
5665
5649
|
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
5666
5650
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
@@ -5674,33 +5658,16 @@ function BasicsStepMobile({
|
|
|
5674
5658
|
children: t("Next")
|
|
5675
5659
|
}
|
|
5676
5660
|
),
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
t("MANUAL FIT")
|
|
5688
|
-
]
|
|
5689
|
-
}
|
|
5690
|
-
),
|
|
5691
|
-
/* @__PURE__ */ jsxs(
|
|
5692
|
-
"button",
|
|
5693
|
-
{
|
|
5694
|
-
type: "button",
|
|
5695
|
-
className: "ps-bpm-bottom-tab",
|
|
5696
|
-
onClick: onSwitchToScan,
|
|
5697
|
-
children: [
|
|
5698
|
-
/* @__PURE__ */ jsx(ScanIconSmall, {}),
|
|
5699
|
-
t("AI SCAN")
|
|
5700
|
-
]
|
|
5701
|
-
}
|
|
5702
|
-
)
|
|
5703
|
-
] })
|
|
5661
|
+
/* @__PURE__ */ jsx(
|
|
5662
|
+
MobileBottomTabs,
|
|
5663
|
+
{
|
|
5664
|
+
mode: "manual",
|
|
5665
|
+
onSwitchToManual: () => {
|
|
5666
|
+
},
|
|
5667
|
+
onSwitchToScan,
|
|
5668
|
+
t
|
|
5669
|
+
}
|
|
5670
|
+
)
|
|
5704
5671
|
] })
|
|
5705
5672
|
] });
|
|
5706
5673
|
}
|
|
@@ -6146,7 +6113,31 @@ function BodyProfileView({
|
|
|
6146
6113
|
] })
|
|
6147
6114
|
] }),
|
|
6148
6115
|
/* @__PURE__ */ jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handlePhotoSelect, style: { display: "none" } }),
|
|
6149
|
-
/* @__PURE__ */ jsxs(
|
|
6116
|
+
isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6117
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
6118
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
6119
|
+
/* @__PURE__ */ jsx(
|
|
6120
|
+
"button",
|
|
6121
|
+
{
|
|
6122
|
+
type: "button",
|
|
6123
|
+
className: "ps-bpm-next-btn",
|
|
6124
|
+
onClick: handleNext,
|
|
6125
|
+
disabled: !photoPreview,
|
|
6126
|
+
children: t("Analyze My Size")
|
|
6127
|
+
}
|
|
6128
|
+
),
|
|
6129
|
+
/* @__PURE__ */ jsx(
|
|
6130
|
+
MobileBottomTabs,
|
|
6131
|
+
{
|
|
6132
|
+
mode: "scan",
|
|
6133
|
+
onSwitchToManual: () => setStep("basics"),
|
|
6134
|
+
onSwitchToScan: () => {
|
|
6135
|
+
},
|
|
6136
|
+
t
|
|
6137
|
+
}
|
|
6138
|
+
)
|
|
6139
|
+
] })
|
|
6140
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-nav", children: [
|
|
6150
6141
|
/* @__PURE__ */ jsxs("button", { className: "ps-bp-back-btn", onClick: handleBackStep, type: "button", children: [
|
|
6151
6142
|
/* @__PURE__ */ jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
6152
6143
|
" ",
|