@primestyleai/tryon 5.5.10 → 5.5.12
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,125 +2971,236 @@ 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
|
+
}
|
|
2999
|
+
|
|
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;
|
|
2998
3012
|
}
|
|
3013
|
+
.ps-bpm-step-btn:hover { background: var(--ps-border-color); }
|
|
3014
|
+
.ps-bpm-step-btn:active { transform: scale(0.92); }
|
|
2999
3015
|
|
|
3000
|
-
/*
|
|
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-
|
|
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);
|
|
3024
3043
|
}
|
|
3025
|
-
.ps-bpm-slider::-moz-range-track { background: transparent; height:
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
}
|
|
3036
|
-
.ps-bpm-
|
|
3037
|
-
|
|
3038
|
-
|
|
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;
|
|
3044
|
+
.ps-bpm-slider::-moz-range-track { background: transparent; height: 4px; }
|
|
3045
|
+
|
|
3046
|
+
/* "or" divider — flanked by hairlines */
|
|
3047
|
+
.ps-bpm-or {
|
|
3048
|
+
display: flex; align-items: center; gap: 12px;
|
|
3049
|
+
margin: 14px 4px 4px;
|
|
3050
|
+
}
|
|
3051
|
+
.ps-bpm-or::before, .ps-bpm-or::after {
|
|
3052
|
+
content: ""; flex: 1; height: 1px;
|
|
3053
|
+
background: var(--ps-border-subtle);
|
|
3054
|
+
}
|
|
3055
|
+
.ps-bpm-or span {
|
|
3056
|
+
font-size: 10px; font-weight: 600;
|
|
3057
|
+
text-transform: uppercase; letter-spacing: 0.16em;
|
|
3043
3058
|
color: var(--ps-text-muted);
|
|
3044
|
-
margin-left: 1px; flex-shrink: 0;
|
|
3045
3059
|
}
|
|
3046
3060
|
|
|
3047
|
-
/*
|
|
3048
|
-
.ps-bpm-
|
|
3049
|
-
display: flex; align-items: center; gap:
|
|
3050
|
-
background:
|
|
3051
|
-
|
|
3052
|
-
padding: 10px 14px; margin-top: 6px;
|
|
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;
|
|
3053
3066
|
cursor: pointer; font-family: inherit;
|
|
3054
|
-
text-
|
|
3055
|
-
|
|
3067
|
+
color: var(--ps-text-primary); font-size: 13px; font-weight: 500;
|
|
3068
|
+
width: 100%;
|
|
3069
|
+
transition: opacity 0.15s;
|
|
3056
3070
|
}
|
|
3057
|
-
.ps-bpm-
|
|
3058
|
-
.ps-bpm-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3071
|
+
.ps-bpm-upload-link:hover { opacity: 0.7; }
|
|
3072
|
+
.ps-bpm-upload-link svg { color: var(--ps-text-secondary); flex-shrink: 0; }
|
|
3073
|
+
|
|
3074
|
+
.ps-bpm-error {
|
|
3075
|
+
font-size: 11px; color: var(--ps-error-color);
|
|
3076
|
+
text-align: center; margin: 4px 0 0;
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
/* ════════════════════════════════════════════════════════════════
|
|
3080
|
+
PhotoStepMobile (.ps-pm-*) — AI scan / photo upload step.
|
|
3081
|
+
Title + subtitle, large photo preview, "Checklist for accuracy"
|
|
3082
|
+
card, dark primary CTA, outlined RETAKE secondary, bottom tabs.
|
|
3083
|
+
════════════════════════════════════════════════════════════════ */
|
|
3084
|
+
.ps-pm-root {
|
|
3085
|
+
display: flex; flex-direction: column;
|
|
3086
|
+
gap: 14px; padding: 8px 4px 0;
|
|
3087
|
+
flex: 1; min-height: 0;
|
|
3088
|
+
}
|
|
3089
|
+
.ps-pm-header { margin: 4px 0 0; }
|
|
3090
|
+
.ps-pm-title {
|
|
3091
|
+
font-size: 22px; font-weight: 700; color: var(--ps-text-primary);
|
|
3092
|
+
margin: 0 0 6px; line-height: 1.25;
|
|
3093
|
+
}
|
|
3094
|
+
.ps-pm-subtitle {
|
|
3095
|
+
font-size: 13px; color: var(--ps-text-muted);
|
|
3096
|
+
margin: 0; line-height: 1.45; font-weight: 400;
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
/* Photo preview / upload zone */
|
|
3100
|
+
.ps-pm-preview {
|
|
3101
|
+
background: var(--ps-bg-tertiary);
|
|
3102
|
+
border-radius: 10px;
|
|
3103
|
+
height: 280px;
|
|
3104
|
+
overflow: hidden;
|
|
3062
3105
|
display: flex; align-items: center; justify-content: center;
|
|
3063
|
-
|
|
3106
|
+
position: relative;
|
|
3107
|
+
flex-shrink: 0;
|
|
3108
|
+
}
|
|
3109
|
+
.ps-pm-preview-img {
|
|
3110
|
+
width: 100%; height: 100%; object-fit: cover; display: block;
|
|
3064
3111
|
}
|
|
3065
|
-
.ps-
|
|
3066
|
-
|
|
3067
|
-
|
|
3112
|
+
.ps-pm-preview-empty {
|
|
3113
|
+
display: flex; flex-direction: column; align-items: center;
|
|
3114
|
+
gap: 6px; padding: 24px;
|
|
3115
|
+
background: none; border: none;
|
|
3116
|
+
color: var(--ps-text-muted); cursor: pointer;
|
|
3117
|
+
font-family: inherit; width: 100%; height: 100%;
|
|
3068
3118
|
}
|
|
3069
|
-
.ps-
|
|
3070
|
-
|
|
3071
|
-
color:
|
|
3119
|
+
.ps-pm-preview-empty svg { color: var(--ps-text-muted); }
|
|
3120
|
+
.ps-pm-preview-empty-title {
|
|
3121
|
+
font-size: 14px; font-weight: 600; color: var(--ps-text-secondary);
|
|
3122
|
+
margin-top: 4px;
|
|
3072
3123
|
}
|
|
3073
|
-
.ps-
|
|
3074
|
-
font-size:
|
|
3124
|
+
.ps-pm-preview-empty-hint {
|
|
3125
|
+
font-size: 11px; color: var(--ps-text-muted);
|
|
3075
3126
|
}
|
|
3076
|
-
.ps-
|
|
3077
|
-
|
|
3078
|
-
|
|
3127
|
+
.ps-pm-preview-remove {
|
|
3128
|
+
position: absolute; top: 10px; right: 10px;
|
|
3129
|
+
width: 28px; height: 28px; border-radius: 6px;
|
|
3130
|
+
background: rgba(255,255,255,0.9); border: none;
|
|
3131
|
+
color: var(--ps-text-primary); cursor: pointer;
|
|
3132
|
+
display: flex; align-items: center; justify-content: center;
|
|
3133
|
+
box-shadow: 0 1px 4px rgba(0,0,0,0.15);
|
|
3134
|
+
transition: background 0.15s;
|
|
3079
3135
|
}
|
|
3080
|
-
.ps-
|
|
3136
|
+
.ps-pm-preview-remove:hover { background: #FFFFFF; }
|
|
3081
3137
|
|
|
3082
|
-
/*
|
|
3083
|
-
.ps-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3138
|
+
/* Checklist for accuracy card */
|
|
3139
|
+
.ps-pm-checklist {
|
|
3140
|
+
display: flex; gap: 12px;
|
|
3141
|
+
padding: 12px 14px;
|
|
3142
|
+
background: var(--ps-bg-secondary);
|
|
3143
|
+
border-radius: 10px;
|
|
3144
|
+
border: 1px solid var(--ps-border-subtle);
|
|
3087
3145
|
}
|
|
3088
|
-
.ps-
|
|
3089
|
-
|
|
3090
|
-
|
|
3146
|
+
.ps-pm-checklist-icon {
|
|
3147
|
+
flex-shrink: 0;
|
|
3148
|
+
width: 22px; height: 22px;
|
|
3149
|
+
color: var(--ps-text-primary);
|
|
3150
|
+
display: flex; align-items: center; justify-content: center;
|
|
3151
|
+
margin-top: 1px;
|
|
3152
|
+
}
|
|
3153
|
+
.ps-pm-checklist-body { flex: 1; min-width: 0; }
|
|
3154
|
+
.ps-pm-checklist-title {
|
|
3155
|
+
font-size: 12px; font-weight: 700;
|
|
3156
|
+
color: var(--ps-text-primary);
|
|
3157
|
+
margin-bottom: 5px;
|
|
3158
|
+
}
|
|
3159
|
+
.ps-pm-checklist-items {
|
|
3160
|
+
list-style: none; padding: 0; margin: 0;
|
|
3161
|
+
}
|
|
3162
|
+
.ps-pm-checklist-items li {
|
|
3163
|
+
font-size: 11px; color: var(--ps-text-secondary);
|
|
3164
|
+
padding: 1px 0 1px 12px;
|
|
3165
|
+
position: relative; line-height: 1.5;
|
|
3166
|
+
}
|
|
3167
|
+
.ps-pm-checklist-items li::before {
|
|
3168
|
+
content: "•"; position: absolute; left: 2px;
|
|
3169
|
+
color: var(--ps-text-muted);
|
|
3091
3170
|
}
|
|
3092
3171
|
|
|
3172
|
+
/* Primary dark CTA: ANALYZE MY SIZE */
|
|
3173
|
+
.ps-pm-primary-btn {
|
|
3174
|
+
margin: 0 16px; width: calc(100% - 32px);
|
|
3175
|
+
background: var(--ps-text-primary); color: #FFFFFF;
|
|
3176
|
+
border: none; border-radius: 8px;
|
|
3177
|
+
padding: 16px 18px;
|
|
3178
|
+
font-family: inherit; font-size: 13px; font-weight: 700;
|
|
3179
|
+
letter-spacing: 0.1em; text-transform: uppercase;
|
|
3180
|
+
cursor: pointer;
|
|
3181
|
+
transition: opacity 0.15s, transform 0.15s;
|
|
3182
|
+
}
|
|
3183
|
+
.ps-pm-primary-btn:active { transform: scale(0.98); }
|
|
3184
|
+
.ps-pm-primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
3185
|
+
|
|
3186
|
+
/* Outlined secondary: RETAKE PHOTO */
|
|
3187
|
+
.ps-pm-secondary-btn {
|
|
3188
|
+
margin: 8px 16px 12px; width: calc(100% - 32px);
|
|
3189
|
+
background: transparent; color: var(--ps-text-secondary);
|
|
3190
|
+
border: 1px solid var(--ps-border-color); border-radius: 8px;
|
|
3191
|
+
padding: 13px 18px;
|
|
3192
|
+
font-family: inherit; font-size: 11px; font-weight: 700;
|
|
3193
|
+
letter-spacing: 0.12em; text-transform: uppercase;
|
|
3194
|
+
cursor: pointer;
|
|
3195
|
+
transition: background 0.15s;
|
|
3196
|
+
}
|
|
3197
|
+
.ps-pm-secondary-btn:hover { background: var(--ps-bg-secondary); }
|
|
3198
|
+
|
|
3199
|
+
/* When the bottom action area contains the primary button (photo step),
|
|
3200
|
+
it needs different padding than the basics step (which has the next btn
|
|
3201
|
+
baked in via .ps-bpm-next-btn). Both share .ps-bpm-bottom container. */
|
|
3202
|
+
.ps-bpm-bottom .ps-pm-primary-btn { margin: 14px 16px 0; }
|
|
3203
|
+
|
|
3093
3204
|
/* Bottom action area — Next button + tab bar grouped together,
|
|
3094
3205
|
pushed to the bottom of the modal body by .ps-bpm-spacer above. */
|
|
3095
3206
|
.ps-bpm-bottom {
|
|
@@ -3516,7 +3627,7 @@ function ClockIcon({ size = 16 }) {
|
|
|
3516
3627
|
/* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
|
|
3517
3628
|
] });
|
|
3518
3629
|
}
|
|
3519
|
-
function RulerIcon({ size = 18 }) {
|
|
3630
|
+
function RulerIcon$1({ size = 18 }) {
|
|
3520
3631
|
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
3632
|
/* @__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
3633
|
/* @__PURE__ */ jsx("path", { d: "m14.5 12.5 2-2" }),
|
|
@@ -3534,7 +3645,7 @@ function TrashIcon({ size = 14 }) {
|
|
|
3534
3645
|
/* @__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
3646
|
] });
|
|
3536
3647
|
}
|
|
3537
|
-
function ChevronRightIcon
|
|
3648
|
+
function ChevronRightIcon() {
|
|
3538
3649
|
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
3650
|
}
|
|
3540
3651
|
function CheckIcon({ size = 14 }) {
|
|
@@ -3864,7 +3975,7 @@ function DrawerPanel({
|
|
|
3864
3975
|
p.heightCm ? ` · ${Math.round(p.heightCm)}${t("cm")}` : ""
|
|
3865
3976
|
] })
|
|
3866
3977
|
] }),
|
|
3867
|
-
/* @__PURE__ */ jsx(ChevronRightIcon
|
|
3978
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
3868
3979
|
] }, p.id))
|
|
3869
3980
|
] }) : /* @__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
3981
|
history.map((entry, idx) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-history-item ps-tryon-history-clickable", onClick: () => restoreHistory(entry), children: [
|
|
@@ -3976,7 +4087,7 @@ function WelcomeView({
|
|
|
3976
4087
|
/* @__PURE__ */ jsx("p", { className: "ps-tryon-welcome-sub", children: t("Get the perfect fit, then try it on virtually") })
|
|
3977
4088
|
] }),
|
|
3978
4089
|
/* @__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") },
|
|
4090
|
+
{ icon: /* @__PURE__ */ jsx(RulerIcon$1, { size: 22 }), title: t("Get Your Size"), desc: t("Instant fit recommendation") },
|
|
3980
4091
|
{ icon: /* @__PURE__ */ jsx(CameraIcon, { size: 22 }), title: t("Try It On"), desc: t("See how it looks on you") }
|
|
3981
4092
|
].map((f, i) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-feature", children: [
|
|
3982
4093
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-feature-icon", children: f.icon }),
|
|
@@ -5416,25 +5527,62 @@ function useIsMobile() {
|
|
|
5416
5527
|
}, []);
|
|
5417
5528
|
return isMobile;
|
|
5418
5529
|
}
|
|
5419
|
-
function
|
|
5530
|
+
function RulerIcon() {
|
|
5531
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
|
|
5532
|
+
/* @__PURE__ */ jsx("path", { d: "M3 17l6 6 12-12-6-6z" }),
|
|
5533
|
+
/* @__PURE__ */ jsx("path", { d: "M9 11l2 2M11 9l2 2M13 7l2 2M7 13l2 2" })
|
|
5534
|
+
] });
|
|
5535
|
+
}
|
|
5536
|
+
function ScanIcon() {
|
|
5537
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "13", height: "13", children: [
|
|
5538
|
+
/* @__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" }),
|
|
5539
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
5540
|
+
] });
|
|
5541
|
+
}
|
|
5542
|
+
function MobileBottomTabs({ mode, onSwitchToManual, onSwitchToScan, t }) {
|
|
5543
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom-tabs", children: [
|
|
5544
|
+
/* @__PURE__ */ jsxs(
|
|
5545
|
+
"button",
|
|
5546
|
+
{
|
|
5547
|
+
type: "button",
|
|
5548
|
+
className: `ps-bpm-bottom-tab${mode === "manual" ? " ps-active" : ""}`,
|
|
5549
|
+
onClick: onSwitchToManual,
|
|
5550
|
+
children: [
|
|
5551
|
+
/* @__PURE__ */ jsx(RulerIcon, {}),
|
|
5552
|
+
t("MANUAL FIT")
|
|
5553
|
+
]
|
|
5554
|
+
}
|
|
5555
|
+
),
|
|
5556
|
+
/* @__PURE__ */ jsxs(
|
|
5557
|
+
"button",
|
|
5558
|
+
{
|
|
5559
|
+
type: "button",
|
|
5560
|
+
className: `ps-bpm-bottom-tab${mode === "scan" ? " ps-active" : ""}`,
|
|
5561
|
+
onClick: onSwitchToScan,
|
|
5562
|
+
children: [
|
|
5563
|
+
/* @__PURE__ */ jsx(ScanIcon, {}),
|
|
5564
|
+
t("AI SCAN")
|
|
5565
|
+
]
|
|
5566
|
+
}
|
|
5567
|
+
)
|
|
5568
|
+
] });
|
|
5569
|
+
}
|
|
5570
|
+
function CameraSmallIcon({ size = 16 }) {
|
|
5420
5571
|
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
5572
|
/* @__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
5573
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "13", r: "4" })
|
|
5423
5574
|
] });
|
|
5424
5575
|
}
|
|
5425
|
-
function
|
|
5426
|
-
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "
|
|
5576
|
+
function ChevronRight() {
|
|
5577
|
+
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
5578
|
}
|
|
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
|
-
] });
|
|
5579
|
+
function MinusIcon() {
|
|
5580
|
+
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
5581
|
}
|
|
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("
|
|
5582
|
+
function PlusIcon() {
|
|
5583
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", width: "14", height: "14", children: [
|
|
5584
|
+
/* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
5585
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" })
|
|
5438
5586
|
] });
|
|
5439
5587
|
}
|
|
5440
5588
|
function BasicsStepMobile({
|
|
@@ -5462,14 +5610,36 @@ function BasicsStepMobile({
|
|
|
5462
5610
|
}) {
|
|
5463
5611
|
const heightCm = parseFloat(height) || 173;
|
|
5464
5612
|
const heightInTotal = (parseFloat(heightFeet) || 5) * 12 + (parseFloat(heightInches) || 8);
|
|
5613
|
+
const ftDisplay = Math.floor(heightInTotal / 12);
|
|
5614
|
+
const inDisplay = heightInTotal % 12;
|
|
5465
5615
|
const weightNum = parseFloat(weight) || (wUnit === "kg" ? 70 : 154);
|
|
5466
5616
|
const ageNum = parseFloat(age) || 30;
|
|
5467
|
-
const wMax = wUnit === "kg" ? 200 : 440;
|
|
5468
5617
|
const wMinFix = wUnit === "kg" ? 30 : 66;
|
|
5469
|
-
const
|
|
5470
|
-
const
|
|
5618
|
+
const wMax = wUnit === "kg" ? 200 : 440;
|
|
5619
|
+
const hCmMin = 120, hCmMax = 220;
|
|
5620
|
+
const hInMin = 48, hInMax = 84;
|
|
5621
|
+
const ageMin = 13, ageMax = 100;
|
|
5622
|
+
const pctHCm = (heightCm - hCmMin) / (hCmMax - hCmMin) * 100;
|
|
5623
|
+
const pctHIn = (heightInTotal - hInMin) / (hInMax - hInMin) * 100;
|
|
5471
5624
|
const pctW = (weightNum - wMinFix) / (wMax - wMinFix) * 100;
|
|
5472
|
-
const pctA = (ageNum -
|
|
5625
|
+
const pctA = (ageNum - ageMin) / (ageMax - ageMin) * 100;
|
|
5626
|
+
const setHeightTotalIn = (totalIn) => {
|
|
5627
|
+
const v = Math.max(hInMin, Math.min(hInMax, totalIn));
|
|
5628
|
+
setHeightFeet(String(Math.floor(v / 12)));
|
|
5629
|
+
setHeightInches(String(v % 12));
|
|
5630
|
+
};
|
|
5631
|
+
const incHeight = () => {
|
|
5632
|
+
if (hUnit === "in") setHeightTotalIn(heightInTotal + 1);
|
|
5633
|
+
else setHeight(String(Math.min(hCmMax, heightCm + 1)));
|
|
5634
|
+
};
|
|
5635
|
+
const decHeight = () => {
|
|
5636
|
+
if (hUnit === "in") setHeightTotalIn(heightInTotal - 1);
|
|
5637
|
+
else setHeight(String(Math.max(hCmMin, heightCm - 1)));
|
|
5638
|
+
};
|
|
5639
|
+
const incWeight = () => setWeight(String(Math.min(wMax, weightNum + 1)));
|
|
5640
|
+
const decWeight = () => setWeight(String(Math.max(wMinFix, weightNum - 1)));
|
|
5641
|
+
const incAge = () => setAge(String(Math.min(ageMax, ageNum + 1)));
|
|
5642
|
+
const decAge = () => setAge(String(Math.max(ageMin, ageNum - 1)));
|
|
5473
5643
|
return /* @__PURE__ */ jsxs("div", { className: "ps-bpm-root", children: [
|
|
5474
5644
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-header", children: [
|
|
5475
5645
|
/* @__PURE__ */ jsx("h2", { className: "ps-bpm-title", children: t("Let's find your best fit") }),
|
|
@@ -5499,168 +5669,107 @@ function BasicsStepMobile({
|
|
|
5499
5669
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5500
5670
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5501
5671
|
/* @__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
|
-
] })
|
|
5672
|
+
/* @__PURE__ */ jsx("span", { className: "ps-bpm-value-display", children: hUnit === "in" ? `${ftDisplay}ft ${inDisplay}in` : `${Math.round(heightCm)} cm` })
|
|
5547
5673
|
] }),
|
|
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
|
-
)
|
|
5674
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5675
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decHeight, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5676
|
+
hUnit === "in" ? /* @__PURE__ */ jsx(
|
|
5677
|
+
"input",
|
|
5678
|
+
{
|
|
5679
|
+
type: "range",
|
|
5680
|
+
className: "ps-bpm-slider",
|
|
5681
|
+
min: hInMin,
|
|
5682
|
+
max: hInMax,
|
|
5683
|
+
step: 1,
|
|
5684
|
+
value: heightInTotal,
|
|
5685
|
+
onChange: (e) => setHeightTotalIn(parseInt(e.target.value, 10)),
|
|
5686
|
+
style: { ["--ps-pct"]: `${pctHIn}%` }
|
|
5687
|
+
}
|
|
5688
|
+
) : /* @__PURE__ */ jsx(
|
|
5689
|
+
"input",
|
|
5690
|
+
{
|
|
5691
|
+
type: "range",
|
|
5692
|
+
className: "ps-bpm-slider",
|
|
5693
|
+
min: hCmMin,
|
|
5694
|
+
max: hCmMax,
|
|
5695
|
+
step: 1,
|
|
5696
|
+
value: heightCm,
|
|
5697
|
+
onChange: (e) => setHeight(e.target.value),
|
|
5698
|
+
style: { ["--ps-pct"]: `${pctHCm}%` }
|
|
5699
|
+
}
|
|
5700
|
+
),
|
|
5701
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incHeight, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5702
|
+
] })
|
|
5577
5703
|
] }),
|
|
5578
5704
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5579
5705
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5580
5706
|
/* @__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 })
|
|
5707
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-bpm-value-display", children: [
|
|
5708
|
+
Math.round(weightNum),
|
|
5709
|
+
" ",
|
|
5710
|
+
wUnit.toUpperCase()
|
|
5596
5711
|
] })
|
|
5597
5712
|
] }),
|
|
5598
|
-
/* @__PURE__ */
|
|
5599
|
-
"
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5713
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5714
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decWeight, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5715
|
+
/* @__PURE__ */ jsx(
|
|
5716
|
+
"input",
|
|
5717
|
+
{
|
|
5718
|
+
type: "range",
|
|
5719
|
+
className: "ps-bpm-slider",
|
|
5720
|
+
min: wMinFix,
|
|
5721
|
+
max: wMax,
|
|
5722
|
+
step: 1,
|
|
5723
|
+
value: weightNum,
|
|
5724
|
+
onChange: (e) => setWeight(e.target.value),
|
|
5725
|
+
style: { ["--ps-pct"]: `${pctW}%` }
|
|
5726
|
+
}
|
|
5727
|
+
),
|
|
5728
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incWeight, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5729
|
+
] })
|
|
5611
5730
|
] }),
|
|
5612
5731
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row", children: [
|
|
5613
5732
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-row-top", children: [
|
|
5614
5733
|
/* @__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") })
|
|
5734
|
+
/* @__PURE__ */ jsxs("span", { className: "ps-bpm-value-display", children: [
|
|
5735
|
+
Math.round(ageNum),
|
|
5736
|
+
" ",
|
|
5737
|
+
t("YEARS")
|
|
5630
5738
|
] })
|
|
5631
5739
|
] }),
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
"
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5740
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-slider-row", children: [
|
|
5741
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: decAge, "aria-label": t("Decrease"), children: /* @__PURE__ */ jsx(MinusIcon, {}) }),
|
|
5742
|
+
/* @__PURE__ */ jsx(
|
|
5743
|
+
"input",
|
|
5744
|
+
{
|
|
5745
|
+
type: "range",
|
|
5746
|
+
className: "ps-bpm-slider",
|
|
5747
|
+
min: ageMin,
|
|
5748
|
+
max: ageMax,
|
|
5749
|
+
step: 1,
|
|
5750
|
+
value: ageNum,
|
|
5751
|
+
onChange: (e) => setAge(e.target.value),
|
|
5752
|
+
style: { ["--ps-pct"]: `${pctA}%` }
|
|
5753
|
+
}
|
|
5754
|
+
),
|
|
5755
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ps-bpm-step-btn", onClick: incAge, "aria-label": t("Increase"), children: /* @__PURE__ */ jsx(PlusIcon, {}) })
|
|
5756
|
+
] })
|
|
5645
5757
|
] })
|
|
5646
5758
|
] }),
|
|
5759
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-or", children: /* @__PURE__ */ jsx("span", { children: t("or") }) }),
|
|
5647
5760
|
/* @__PURE__ */ jsxs(
|
|
5648
5761
|
"button",
|
|
5649
5762
|
{
|
|
5650
5763
|
type: "button",
|
|
5651
|
-
className: "ps-bpm-
|
|
5764
|
+
className: "ps-bpm-upload-link",
|
|
5652
5765
|
onClick: onUploadPhoto,
|
|
5653
5766
|
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, {}) })
|
|
5767
|
+
/* @__PURE__ */ jsx(CameraSmallIcon, {}),
|
|
5768
|
+
/* @__PURE__ */ jsx("span", { children: t("Upload a photo for AI sizing") }),
|
|
5769
|
+
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
5660
5770
|
]
|
|
5661
5771
|
}
|
|
5662
5772
|
),
|
|
5663
|
-
/* @__PURE__ */ jsx("p", { className: "ps-bpm-hint", children: t("Enter accurate height for better fit recommendations") }),
|
|
5664
5773
|
error && /* @__PURE__ */ jsx("p", { className: "ps-bpm-error", children: error }),
|
|
5665
5774
|
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
5666
5775
|
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
@@ -5674,33 +5783,129 @@ function BasicsStepMobile({
|
|
|
5674
5783
|
children: t("Next")
|
|
5675
5784
|
}
|
|
5676
5785
|
),
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5786
|
+
/* @__PURE__ */ jsx(
|
|
5787
|
+
MobileBottomTabs,
|
|
5788
|
+
{
|
|
5789
|
+
mode: "manual",
|
|
5790
|
+
onSwitchToManual: () => {
|
|
5791
|
+
},
|
|
5792
|
+
onSwitchToScan,
|
|
5793
|
+
t
|
|
5794
|
+
}
|
|
5795
|
+
)
|
|
5796
|
+
] })
|
|
5797
|
+
] });
|
|
5798
|
+
}
|
|
5799
|
+
function UploadIconLg() {
|
|
5800
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", width: "32", height: "32", children: [
|
|
5801
|
+
/* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
5802
|
+
/* @__PURE__ */ jsx("polyline", { points: "17 8 12 3 7 8" }),
|
|
5803
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
|
|
5804
|
+
] });
|
|
5805
|
+
}
|
|
5806
|
+
function InfoIcon() {
|
|
5807
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "14", height: "14", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) });
|
|
5808
|
+
}
|
|
5809
|
+
function CloseIconSm() {
|
|
5810
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", width: "14", height: "14", children: [
|
|
5811
|
+
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
5812
|
+
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
5813
|
+
] });
|
|
5814
|
+
}
|
|
5815
|
+
function PhotoStepMobile({
|
|
5816
|
+
photoPreview,
|
|
5817
|
+
handlePhotoSelect,
|
|
5818
|
+
handleRemovePhoto,
|
|
5819
|
+
onAnalyze,
|
|
5820
|
+
onSwitchToManual,
|
|
5821
|
+
error,
|
|
5822
|
+
t
|
|
5823
|
+
}) {
|
|
5824
|
+
const fileRef = useRef(null);
|
|
5825
|
+
const hasPhoto = !!photoPreview;
|
|
5826
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-pm-root", children: [
|
|
5827
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-header", children: [
|
|
5828
|
+
/* @__PURE__ */ jsx("h2", { className: "ps-pm-title", children: t("Review your photo") }),
|
|
5829
|
+
/* @__PURE__ */ jsx("p", { className: "ps-pm-subtitle", children: t("Ensure your full body is visible for the most accurate digital tailoring scan.") })
|
|
5830
|
+
] }),
|
|
5831
|
+
/* @__PURE__ */ jsx(
|
|
5832
|
+
"input",
|
|
5833
|
+
{
|
|
5834
|
+
ref: fileRef,
|
|
5835
|
+
type: "file",
|
|
5836
|
+
accept: "image/*",
|
|
5837
|
+
onChange: handlePhotoSelect,
|
|
5838
|
+
style: { display: "none" }
|
|
5839
|
+
}
|
|
5840
|
+
),
|
|
5841
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-preview", children: hasPhoto ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5842
|
+
/* @__PURE__ */ jsx("img", { src: photoPreview, alt: t("Your photo"), className: "ps-pm-preview-img" }),
|
|
5843
|
+
/* @__PURE__ */ jsx(
|
|
5844
|
+
"button",
|
|
5845
|
+
{
|
|
5846
|
+
type: "button",
|
|
5847
|
+
className: "ps-pm-preview-remove",
|
|
5848
|
+
onClick: handleRemovePhoto,
|
|
5849
|
+
"aria-label": t("Remove photo"),
|
|
5850
|
+
children: /* @__PURE__ */ jsx(CloseIconSm, {})
|
|
5851
|
+
}
|
|
5852
|
+
)
|
|
5853
|
+
] }) : /* @__PURE__ */ jsxs(
|
|
5854
|
+
"button",
|
|
5855
|
+
{
|
|
5856
|
+
type: "button",
|
|
5857
|
+
className: "ps-pm-preview-empty",
|
|
5858
|
+
onClick: () => fileRef.current?.click(),
|
|
5859
|
+
children: [
|
|
5860
|
+
/* @__PURE__ */ jsx(UploadIconLg, {}),
|
|
5861
|
+
/* @__PURE__ */ jsx("span", { className: "ps-pm-preview-empty-title", children: t("Tap to upload") }),
|
|
5862
|
+
/* @__PURE__ */ jsx("span", { className: "ps-pm-preview-empty-hint", children: t("JPEG, PNG up to 10MB") })
|
|
5863
|
+
]
|
|
5864
|
+
}
|
|
5865
|
+
) }),
|
|
5866
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-checklist", children: [
|
|
5867
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-checklist-icon", children: /* @__PURE__ */ jsx(InfoIcon, {}) }),
|
|
5868
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-pm-checklist-body", children: [
|
|
5869
|
+
/* @__PURE__ */ jsx("div", { className: "ps-pm-checklist-title", children: t("Checklist for accuracy") }),
|
|
5870
|
+
/* @__PURE__ */ jsxs("ul", { className: "ps-pm-checklist-items", children: [
|
|
5871
|
+
/* @__PURE__ */ jsx("li", { children: t("Form-fitting clothing is recommended") }),
|
|
5872
|
+
/* @__PURE__ */ jsx("li", { children: t("Standing 2-3 meters from camera") }),
|
|
5873
|
+
/* @__PURE__ */ jsx("li", { children: t("Neutral background with good lighting") })
|
|
5874
|
+
] })
|
|
5703
5875
|
] })
|
|
5876
|
+
] }),
|
|
5877
|
+
error && /* @__PURE__ */ jsx("p", { className: "ps-bpm-error", children: error }),
|
|
5878
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
5879
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
5880
|
+
/* @__PURE__ */ jsx(
|
|
5881
|
+
"button",
|
|
5882
|
+
{
|
|
5883
|
+
type: "button",
|
|
5884
|
+
className: "ps-pm-primary-btn",
|
|
5885
|
+
onClick: onAnalyze,
|
|
5886
|
+
disabled: !hasPhoto,
|
|
5887
|
+
children: t("ANALYZE MY SIZE")
|
|
5888
|
+
}
|
|
5889
|
+
),
|
|
5890
|
+
hasPhoto && /* @__PURE__ */ jsx(
|
|
5891
|
+
"button",
|
|
5892
|
+
{
|
|
5893
|
+
type: "button",
|
|
5894
|
+
className: "ps-pm-secondary-btn",
|
|
5895
|
+
onClick: () => fileRef.current?.click(),
|
|
5896
|
+
children: t("RETAKE PHOTO")
|
|
5897
|
+
}
|
|
5898
|
+
),
|
|
5899
|
+
/* @__PURE__ */ jsx(
|
|
5900
|
+
MobileBottomTabs,
|
|
5901
|
+
{
|
|
5902
|
+
mode: "scan",
|
|
5903
|
+
onSwitchToManual,
|
|
5904
|
+
onSwitchToScan: () => {
|
|
5905
|
+
},
|
|
5906
|
+
t
|
|
5907
|
+
}
|
|
5908
|
+
)
|
|
5704
5909
|
] })
|
|
5705
5910
|
] });
|
|
5706
5911
|
}
|
|
@@ -6066,6 +6271,20 @@ function BodyProfileView({
|
|
|
6066
6271
|
const canProceed = step === "basics" ? true : step === "chest" ? !!chestProfile : step === "midsection" ? !!midsectionProfile : step === "seat" ? !!seatProfile : step === "hips" ? !!hipProfile : step === "bra" ? !!(bandSize && cupSize) : step === "photo" ? true : false;
|
|
6067
6272
|
const isLastStep = step === steps[steps.length - 1];
|
|
6068
6273
|
if (step === "photo") {
|
|
6274
|
+
if (isMobile) {
|
|
6275
|
+
return /* @__PURE__ */ jsx("div", { className: "ps-bp-wrapper", children: /* @__PURE__ */ jsx(
|
|
6276
|
+
PhotoStepMobile,
|
|
6277
|
+
{
|
|
6278
|
+
photoPreview,
|
|
6279
|
+
handlePhotoSelect,
|
|
6280
|
+
handleRemovePhoto,
|
|
6281
|
+
onAnalyze: handleNext,
|
|
6282
|
+
onSwitchToManual: () => setStep("basics"),
|
|
6283
|
+
error,
|
|
6284
|
+
t
|
|
6285
|
+
}
|
|
6286
|
+
) });
|
|
6287
|
+
}
|
|
6069
6288
|
return /* @__PURE__ */ jsxs("div", { className: "ps-bp-wrapper", children: [
|
|
6070
6289
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "1.2vw", padding: "1.5vw", width: "100%", height: "100%", minHeight: "20vw", alignItems: "stretch" }, children: [
|
|
6071
6290
|
/* @__PURE__ */ jsx(
|
|
@@ -6146,7 +6365,31 @@ function BodyProfileView({
|
|
|
6146
6365
|
] })
|
|
6147
6366
|
] }),
|
|
6148
6367
|
/* @__PURE__ */ jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handlePhotoSelect, style: { display: "none" } }),
|
|
6149
|
-
/* @__PURE__ */ jsxs(
|
|
6368
|
+
isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6369
|
+
/* @__PURE__ */ jsx("div", { className: "ps-bpm-spacer" }),
|
|
6370
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-bpm-bottom", children: [
|
|
6371
|
+
/* @__PURE__ */ jsx(
|
|
6372
|
+
"button",
|
|
6373
|
+
{
|
|
6374
|
+
type: "button",
|
|
6375
|
+
className: "ps-bpm-next-btn",
|
|
6376
|
+
onClick: handleNext,
|
|
6377
|
+
disabled: !photoPreview,
|
|
6378
|
+
children: t("Analyze My Size")
|
|
6379
|
+
}
|
|
6380
|
+
),
|
|
6381
|
+
/* @__PURE__ */ jsx(
|
|
6382
|
+
MobileBottomTabs,
|
|
6383
|
+
{
|
|
6384
|
+
mode: "scan",
|
|
6385
|
+
onSwitchToManual: () => setStep("basics"),
|
|
6386
|
+
onSwitchToScan: () => {
|
|
6387
|
+
},
|
|
6388
|
+
t
|
|
6389
|
+
}
|
|
6390
|
+
)
|
|
6391
|
+
] })
|
|
6392
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "ps-bp-nav", children: [
|
|
6150
6393
|
/* @__PURE__ */ jsxs("button", { className: "ps-bp-back-btn", onClick: handleBackStep, type: "button", children: [
|
|
6151
6394
|
/* @__PURE__ */ jsx("span", { className: "ps-bp-back-arrow", children: "←" }),
|
|
6152
6395
|
" ",
|