@primestyleai/tryon 5.8.28 → 5.8.29
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 +70 -61
- package/dist/react/styles.d.ts +1 -1
- package/dist/storefront/primestyle-tryon.js +70 -61
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -965,10 +965,11 @@ const STYLES = `
|
|
|
965
965
|
height: 100%; overflow: hidden;
|
|
966
966
|
}
|
|
967
967
|
|
|
968
|
-
/* Left image column — proper contained display
|
|
968
|
+
/* Left image column — proper contained display.
|
|
969
|
+
No background — the product/try-on image sits directly on the modal
|
|
970
|
+
surface without a gray placeholder box behind it. */
|
|
969
971
|
.ps-tryon-v2-bg {
|
|
970
972
|
flex: 0 0 43%; position: relative; min-width: 0;
|
|
971
|
-
background: var(--ps-bg-secondary);
|
|
972
973
|
border-radius: 0.9vw; overflow: hidden;
|
|
973
974
|
display: flex; align-items: center; justify-content: center;
|
|
974
975
|
}
|
|
@@ -4516,10 +4517,11 @@ const STYLES = `
|
|
|
4516
4517
|
}
|
|
4517
4518
|
.ps-cpw-field {
|
|
4518
4519
|
display: flex; flex-direction: column;
|
|
4519
|
-
gap:
|
|
4520
|
+
gap: clamp(4px, 0.4vw, 10px);
|
|
4520
4521
|
}
|
|
4521
4522
|
.ps-cpw-field-label {
|
|
4522
|
-
font-size:
|
|
4523
|
+
font-size: clamp(9px, 0.62vw, 12px);
|
|
4524
|
+
font-weight: 700;
|
|
4523
4525
|
letter-spacing: 0.14em; text-transform: uppercase;
|
|
4524
4526
|
color: var(--ps-text-muted);
|
|
4525
4527
|
}
|
|
@@ -4527,8 +4529,10 @@ const STYLES = `
|
|
|
4527
4529
|
background: transparent; border: none;
|
|
4528
4530
|
border-bottom: 1px solid var(--ps-border-color);
|
|
4529
4531
|
color: var(--ps-text-primary);
|
|
4530
|
-
font-family: inherit;
|
|
4531
|
-
|
|
4532
|
+
font-family: inherit;
|
|
4533
|
+
font-size: clamp(13px, 0.95vw, 18px);
|
|
4534
|
+
font-weight: 500;
|
|
4535
|
+
padding: clamp(4px, 0.4vw, 10px) 0 clamp(6px, 0.55vw, 12px);
|
|
4532
4536
|
outline: none;
|
|
4533
4537
|
transition: border-color 0.15s;
|
|
4534
4538
|
}
|
|
@@ -4566,29 +4570,31 @@ const STYLES = `
|
|
|
4566
4570
|
|
|
4567
4571
|
.ps-cpw-field-grid {
|
|
4568
4572
|
display: grid;
|
|
4569
|
-
grid-template-columns: repeat(auto-fit, minmax(
|
|
4570
|
-
gap:
|
|
4573
|
+
grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 11vw, 220px), 1fr));
|
|
4574
|
+
gap: clamp(14px, 1.2vw, 28px);
|
|
4571
4575
|
}
|
|
4572
4576
|
|
|
4573
4577
|
/* Two-column split: inputs stacked left, photo right */
|
|
4574
4578
|
.ps-cpw-split {
|
|
4575
4579
|
display: grid;
|
|
4576
|
-
grid-template-columns: 1fr
|
|
4577
|
-
gap:
|
|
4580
|
+
grid-template-columns: 1fr clamp(180px, 14vw, 320px);
|
|
4581
|
+
gap: clamp(16px, 1.4vw, 32px);
|
|
4578
4582
|
align-items: start;
|
|
4579
4583
|
}
|
|
4580
4584
|
.ps-cpw-split-left {
|
|
4581
|
-
display: flex; flex-direction: column;
|
|
4585
|
+
display: flex; flex-direction: column;
|
|
4586
|
+
gap: clamp(14px, 1.2vw, 24px);
|
|
4582
4587
|
min-width: 0;
|
|
4583
4588
|
}
|
|
4584
4589
|
.ps-cpw-split-right {
|
|
4585
|
-
display: flex; flex-direction: column;
|
|
4590
|
+
display: flex; flex-direction: column;
|
|
4591
|
+
gap: clamp(6px, 0.55vw, 12px);
|
|
4586
4592
|
min-width: 0;
|
|
4587
4593
|
}
|
|
4588
4594
|
.ps-cpw-error {
|
|
4589
|
-
font-size:
|
|
4595
|
+
font-size: clamp(10px, 0.72vw, 13px);
|
|
4590
4596
|
color: var(--ps-error-color);
|
|
4591
|
-
margin-top: -
|
|
4597
|
+
margin-top: calc(clamp(4px, 0.4vw, 10px) * -1);
|
|
4592
4598
|
}
|
|
4593
4599
|
|
|
4594
4600
|
/* Optional photo upload (step 1) */
|
|
@@ -4644,67 +4650,84 @@ const STYLES = `
|
|
|
4644
4650
|
display: flex; align-items: center; justify-content: center;
|
|
4645
4651
|
}
|
|
4646
4652
|
|
|
4647
|
-
/* Step 2 — Silhouette */
|
|
4653
|
+
/* Step 2 — Silhouette (vw-scaled) */
|
|
4648
4654
|
.ps-cpw-silhouette {
|
|
4649
|
-
display: flex; flex-direction: column;
|
|
4655
|
+
display: flex; flex-direction: column;
|
|
4656
|
+
gap: clamp(16px, 1.4vw, 32px);
|
|
4650
4657
|
}
|
|
4651
4658
|
.ps-cpw-section {
|
|
4652
|
-
display: flex; flex-direction: column;
|
|
4659
|
+
display: flex; flex-direction: column;
|
|
4660
|
+
gap: clamp(8px, 0.7vw, 16px);
|
|
4653
4661
|
}
|
|
4654
4662
|
.ps-cpw-section-head {
|
|
4655
|
-
display: flex; flex-direction: column;
|
|
4663
|
+
display: flex; flex-direction: column;
|
|
4664
|
+
gap: clamp(2px, 0.2vw, 6px);
|
|
4656
4665
|
}
|
|
4657
4666
|
.ps-cpw-section-title {
|
|
4658
|
-
font-size:
|
|
4667
|
+
font-size: clamp(10px, 0.72vw, 14px);
|
|
4668
|
+
font-weight: 700;
|
|
4659
4669
|
letter-spacing: 0.14em; text-transform: uppercase;
|
|
4660
4670
|
color: var(--ps-text-primary);
|
|
4661
4671
|
}
|
|
4662
4672
|
.ps-cpw-section-sub {
|
|
4663
|
-
font-size:
|
|
4673
|
+
font-size: clamp(10px, 0.7vw, 13px);
|
|
4674
|
+
font-weight: 400;
|
|
4664
4675
|
color: var(--ps-text-muted);
|
|
4665
4676
|
}
|
|
4666
4677
|
.ps-cpw-card-row {
|
|
4667
4678
|
display: grid;
|
|
4668
4679
|
grid-template-columns: repeat(3, 1fr);
|
|
4669
|
-
gap:
|
|
4680
|
+
gap: clamp(8px, 0.75vw, 16px);
|
|
4681
|
+
/* Inside a flex parent (ProgressiveStep with flex:1), let the row
|
|
4682
|
+
claim leftover vertical space so the cards stretch to fill it. */
|
|
4683
|
+
flex: 1; min-height: 0;
|
|
4670
4684
|
}
|
|
4671
4685
|
.ps-cpw-bra-row {
|
|
4672
4686
|
display: grid;
|
|
4673
4687
|
grid-template-columns: 1fr 1fr;
|
|
4674
|
-
gap:
|
|
4688
|
+
gap: clamp(8px, 0.75vw, 16px);
|
|
4675
4689
|
}
|
|
4676
4690
|
.ps-cpw-bra-field {
|
|
4677
|
-
display: flex; flex-direction: column;
|
|
4691
|
+
display: flex; flex-direction: column;
|
|
4692
|
+
gap: clamp(4px, 0.4vw, 10px);
|
|
4678
4693
|
}
|
|
4679
4694
|
.ps-cpw-card {
|
|
4680
4695
|
display: flex; flex-direction: column; align-items: center;
|
|
4681
4696
|
background: var(--ps-bg-primary);
|
|
4682
4697
|
border: 2px solid var(--ps-border-subtle);
|
|
4683
|
-
border-radius:
|
|
4684
|
-
padding:
|
|
4698
|
+
border-radius: clamp(8px, 0.6vw, 14px);
|
|
4699
|
+
padding: clamp(10px, 0.85vw, 18px) clamp(6px, 0.5vw, 12px) clamp(8px, 0.65vw, 14px);
|
|
4685
4700
|
cursor: pointer; font-family: inherit;
|
|
4686
4701
|
transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
|
|
4702
|
+
/* Stretch inside the grid track so all 3 cards in the row fill
|
|
4703
|
+
the available height equally. */
|
|
4704
|
+
min-width: 0; min-height: 0;
|
|
4687
4705
|
}
|
|
4688
4706
|
.ps-cpw-card:hover {
|
|
4689
4707
|
border-color: rgba(33, 84, 239, 0.35);
|
|
4690
4708
|
}
|
|
4691
4709
|
.ps-cpw-card.ps-active {
|
|
4692
4710
|
border-color: var(--ps-accent);
|
|
4693
|
-
box-shadow: 0
|
|
4711
|
+
box-shadow: 0 0.4vw 1.1vw rgba(33, 84, 239, 0.16);
|
|
4694
4712
|
transform: translateY(-1px);
|
|
4695
4713
|
}
|
|
4696
4714
|
.ps-cpw-card-thumb {
|
|
4697
|
-
width: 100%;
|
|
4715
|
+
width: 100%;
|
|
4716
|
+
/* Fills whatever space the card has — combined with the card's
|
|
4717
|
+
min-height: 0, this lets the thumb image grow with viewport size
|
|
4718
|
+
and stretch to fill the wizard body. */
|
|
4719
|
+
flex: 1; min-height: 0;
|
|
4698
4720
|
display: flex; align-items: center; justify-content: center;
|
|
4699
4721
|
overflow: hidden;
|
|
4700
|
-
margin-bottom:
|
|
4722
|
+
margin-bottom: clamp(4px, 0.4vw, 10px);
|
|
4701
4723
|
}
|
|
4702
4724
|
.ps-cpw-card-thumb img {
|
|
4703
4725
|
max-width: 100%; max-height: 100%;
|
|
4704
4726
|
object-fit: contain;
|
|
4705
4727
|
}
|
|
4706
4728
|
.ps-cpw-card-label {
|
|
4707
|
-
font-size:
|
|
4729
|
+
font-size: clamp(9px, 0.65vw, 12px);
|
|
4730
|
+
font-weight: 700;
|
|
4708
4731
|
letter-spacing: 0.12em; text-transform: uppercase;
|
|
4709
4732
|
color: var(--ps-text-muted);
|
|
4710
4733
|
}
|
|
@@ -4753,34 +4776,18 @@ const STYLES = `
|
|
|
4753
4776
|
.ps-cpw-next-btn:hover { opacity: 0.92; }
|
|
4754
4777
|
.ps-cpw-next-btn:active { transform: scale(0.98); }
|
|
4755
4778
|
|
|
4756
|
-
@media (max-width: 768px)
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
flex-direction: column; gap: 10px;
|
|
4760
|
-
padding-bottom: 12px;
|
|
4761
|
-
}
|
|
4762
|
-
.ps-cpw-progress { min-width: 0; width: 100%; align-items: flex-start; margin-top: 0; }
|
|
4763
|
-
.ps-cpw-step-title { font-size: 22px; }
|
|
4764
|
-
.ps-cpw-field-grid { grid-template-columns: 1fr; gap: 18px; }
|
|
4765
|
-
.ps-cpw-split { grid-template-columns: 1fr; gap: 18px; }
|
|
4766
|
-
.ps-cpw-photo-preview { max-width: 220px; }
|
|
4767
|
-
.ps-cpw-card-row { gap: 8px; }
|
|
4768
|
-
.ps-cpw-card { padding: 10px 6px 8px; }
|
|
4769
|
-
.ps-cpw-card-thumb { height: 80px; }
|
|
4770
|
-
.ps-cpw-card-label { font-size: 9px; }
|
|
4771
|
-
.ps-cpw-footer { flex-direction: column-reverse; gap: 10px; align-items: stretch; }
|
|
4772
|
-
.ps-cpw-next-btn { width: 100%; padding: 14px; }
|
|
4773
|
-
.ps-cpw-back-btn { text-align: center; }
|
|
4774
|
-
.ps-cpw-method-grid { grid-template-columns: 1fr; }
|
|
4775
|
-
.ps-cpw-method-card { padding: 22px 18px; }
|
|
4776
|
-
.ps-cpw-photo-frame { max-width: 100%; height: 320px; }
|
|
4777
|
-
}
|
|
4779
|
+
/* No wizard-specific @media (max-width: 768px) overrides anymore.
|
|
4780
|
+
Every ps-cpw-* rule is clamp/vw-driven, so the layout shrinks
|
|
4781
|
+
gracefully from 320px → 5000px without a hard breakpoint. */
|
|
4778
4782
|
|
|
4779
4783
|
/* ── Progressive (one-question-at-a-time) flow ── */
|
|
4780
4784
|
.ps-cpw-progressive {
|
|
4781
4785
|
display: flex; flex-direction: column;
|
|
4782
4786
|
gap: clamp(12px, 1vw, 22px);
|
|
4783
4787
|
padding: clamp(6px, 0.5vw, 12px) 0;
|
|
4788
|
+
/* Fills the wizard body so the card row can stretch vertically */
|
|
4789
|
+
flex: 1; min-height: 0;
|
|
4790
|
+
width: 100%; box-sizing: border-box;
|
|
4784
4791
|
}
|
|
4785
4792
|
.ps-cpw-fade-in {
|
|
4786
4793
|
animation: ps-cpw-fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
|
@@ -4790,27 +4797,29 @@ const STYLES = `
|
|
|
4790
4797
|
to { opacity: 1; transform: translateY(0); }
|
|
4791
4798
|
}
|
|
4792
4799
|
|
|
4793
|
-
/* ── Method picker (initial step) —
|
|
4800
|
+
/* ── Method picker (initial step) — cards stretch to fill body ── */
|
|
4794
4801
|
.ps-cpw-method-picker {
|
|
4795
4802
|
display: flex; flex-direction: column;
|
|
4796
4803
|
gap: clamp(8px, 0.7vw, 14px);
|
|
4797
4804
|
padding: clamp(4px, 0.4vw, 10px) 0;
|
|
4798
4805
|
flex: 1; min-height: 0;
|
|
4799
4806
|
width: 100%; box-sizing: border-box;
|
|
4800
|
-
justify-content: center;
|
|
4801
4807
|
}
|
|
4802
4808
|
.ps-cpw-method-intro { display: none; }
|
|
4809
|
+
/* Grid claims the picker's leftover height so the cards inside
|
|
4810
|
+
stretch vertically to fill it. */
|
|
4803
4811
|
.ps-cpw-method-grid {
|
|
4804
4812
|
display: grid;
|
|
4805
4813
|
grid-template-columns: 1fr 1fr;
|
|
4806
4814
|
gap: clamp(8px, 0.75vw, 16px);
|
|
4807
4815
|
width: 100%; max-width: 100%;
|
|
4808
4816
|
box-sizing: border-box;
|
|
4817
|
+
flex: 1; min-height: 0;
|
|
4809
4818
|
}
|
|
4810
4819
|
.ps-cpw-method-card {
|
|
4811
4820
|
display: flex; flex-direction: column; align-items: stretch;
|
|
4812
4821
|
gap: 0;
|
|
4813
|
-
min-width: 0;
|
|
4822
|
+
min-width: 0; min-height: 0;
|
|
4814
4823
|
width: 100%; max-width: 100%;
|
|
4815
4824
|
box-sizing: border-box;
|
|
4816
4825
|
background: var(--ps-bg-primary);
|
|
@@ -4825,21 +4834,21 @@ const STYLES = `
|
|
|
4825
4834
|
transform: translateY(-1px);
|
|
4826
4835
|
box-shadow: 0 0.4vw 1.2vw rgba(33, 84, 239, 0.10);
|
|
4827
4836
|
}
|
|
4828
|
-
/*
|
|
4829
|
-
|
|
4837
|
+
/* Illustration fills the upper portion of each card — flex 1 instead
|
|
4838
|
+
of a fixed height so the image grows with the available card height
|
|
4839
|
+
instead of leaving empty space. */
|
|
4830
4840
|
.ps-cpw-method-img {
|
|
4831
4841
|
width: 100%;
|
|
4832
|
-
|
|
4833
|
-
flex-shrink: 0;
|
|
4842
|
+
flex: 1; min-height: 0;
|
|
4834
4843
|
background: var(--ps-bg-secondary);
|
|
4835
4844
|
display: flex; align-items: center; justify-content: center;
|
|
4836
4845
|
border-bottom: 1px solid var(--ps-border-subtle);
|
|
4837
|
-
padding: clamp(
|
|
4846
|
+
padding: clamp(6px, 0.6vw, 14px);
|
|
4838
4847
|
box-sizing: border-box;
|
|
4839
4848
|
}
|
|
4840
4849
|
.ps-cpw-method-img img {
|
|
4841
|
-
width:
|
|
4842
|
-
max-width: 100%;
|
|
4850
|
+
width: 100%; height: 100%;
|
|
4851
|
+
max-width: 100%; max-height: 100%;
|
|
4843
4852
|
object-fit: contain;
|
|
4844
4853
|
display: block;
|
|
4845
4854
|
}
|