Compare commits

...

8 Commits

13 changed files with 73 additions and 47 deletions

View File

@@ -24,7 +24,6 @@
top: 76px; top: 76px;
right: calc((100% - 1320px) / 2 + 1.5rem); right: calc((100% - 1320px) / 2 + 1.5rem);
height: 520px;
max-height: calc(100vh - 120px); max-height: calc(100vh - 120px);
z-index: 1050; z-index: 1050;
background-color: #ffffff; background-color: #ffffff;

View File

@@ -454,6 +454,7 @@
</div> </div>
} }
</div> </div>
</div> </div>
</section> </section>
@@ -652,3 +653,4 @@
</div> </div>
</app-store-section> </app-store-section>
</main> </main>

View File

@@ -113,8 +113,8 @@ h1 {
.cart-showcase__viewport { .cart-showcase__viewport {
width: 100%; width: 100%;
max-width: 370px; max-width: 504px;
height: 360px; height: 640px;
} }
.cart-showcase__header { .cart-showcase__header {

View File

@@ -257,3 +257,5 @@ export class ReutilizablesTestPageComponent {
}); });
} }
} }

View File

@@ -9,19 +9,18 @@
} }
&__actions { &__actions {
display: grid; display: flex;
grid-template-columns: 1fr 1fr; justify-content: flex-end;
flex-wrap: wrap;
gap: 1rem; gap: 1rem;
margin-top: 0.5rem; margin-top: 0.5rem;
@media (max-width: 540px) {
grid-template-columns: 1fr;
}
} }
&__action-btn { &__action-btn {
display: block; display: block;
width: 100%; width: 100%;
flex: 1 1 290px;
max-width: 290px;
} }
} }
@@ -46,3 +45,4 @@
color: var(--bs-danger, #dc3545); color: var(--bs-danger, #dc3545);
} }
} }

View File

@@ -1,6 +1,6 @@
<div class="container-xl px-3 px-md-4 py-4"> <div class="container-xl px-3 px-md-4 py-4">
<div class="checkout-page"> <div class="checkout-page">
<div class="checkout-page__stepper-col"> <div class="checkout-page__stepper-col ">
<app-stepper #stepper> <app-stepper #stepper>
<app-step label="Datos" [isValid]="isStep1Valid()"> <app-step label="Datos" [isValid]="isStep1Valid()">
<app-checkout-data-step <app-checkout-data-step

View File

@@ -1,7 +1,7 @@
.checkout-page { .checkout-page {
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr) 420px; grid-template-columns: minmax(0, 1fr) 420px;
gap: 2rem; gap: 4rem;
align-items: start; align-items: start;
padding: 2rem 0; padding: 2rem 0;
@@ -16,9 +16,7 @@
} }
&__cart-col { &__cart-col {
border: 1px solid #ececec;
border-radius: 4px;
padding: 1.25rem 1.5rem;
max-height: 80vh; max-height: 80vh;
overflow: hidden; overflow: hidden;
display: flex; display: flex;

View File

@@ -34,7 +34,7 @@
</div> </div>
</section> </section>
<section class="payment-panel" aria-live="polite"> <section class="payment-panel d-flex justify-content-end" aria-live="polite">
@if (isGeneratingIntent()) { @if (isGeneratingIntent()) {
<div class="payment-panel__card" style="text-align: center; padding: 2rem;"> <div class="payment-panel__card" style="text-align: center; padding: 2rem;">
<h3 class="payment-panel__title">Cargando información de pago...</h3> <h3 class="payment-panel__title">Cargando información de pago...</h3>
@@ -133,6 +133,8 @@
type="button" type="button"
variant="cancel" variant="cancel"
hostClass="checkout-payment__action-btn" hostClass="checkout-payment__action-btn"
buttonClass="w-100"
[disabled]="true"
(click)="cancelStep.emit()" (click)="cancelStep.emit()"
> >
Cancelar Cancelar
@@ -141,6 +143,7 @@
<app-button <app-button
type="button" type="button"
hostClass="checkout-payment__action-btn" hostClass="checkout-payment__action-btn"
buttonClass="w-100"
[disabled]="isGeneratingIntent()" [disabled]="isGeneratingIntent()"
(click)="complete.emit()" (click)="complete.emit()"
> >
@@ -148,3 +151,4 @@
</app-button> </app-button>
</div> </div>
</div> </div>

View File

@@ -14,17 +14,17 @@
} }
&__actions { &__actions {
display: grid; display: flex;
grid-template-columns: 1fr 1fr; justify-content: flex-end;
flex-wrap: wrap;
gap: 1rem; gap: 1rem;
margin-top: 2rem; margin-top: 2rem;
@media (max-width: 540px) {
grid-template-columns: 1fr;
}
} }
&__action-btn { &__action-btn {
width: 100%;
flex: 1 1 290px;
max-width: 290px;
display: block; display: block;
} }
} }
@@ -110,10 +110,9 @@
.payment-panel { .payment-panel {
min-width: 0; min-width: 0;
&__card { &__card {
width: fit-content; width: 100%;
max-width: 100%; max-width: 290px;
min-height: 269px; min-height: 269px;
padding: 1.5rem 1.75rem; padding: 1.5rem 1.75rem;
border-radius: 5px; border-radius: 5px;
@@ -304,3 +303,4 @@
} }
} }
} }

View File

@@ -1,4 +1,4 @@
<article class="w-100 rounded-0 cart-item"> <article class="w-100 p-3 rounded-0 cart-item">
<div class="position-relative overflow-hidden cart-item-media"> <div class="position-relative overflow-hidden cart-item-media">
@if (discountPercentage() && discountPercentage()! > 0) { @if (discountPercentage() && discountPercentage()! > 0) {
<span class="position-absolute top-0 start-0 z-1 rounded-0 cart-item-discount-badge">-{{ discountPercentage() }}%</span> <span class="position-absolute top-0 start-0 z-1 rounded-0 cart-item-discount-badge">-{{ discountPercentage() }}%</span>
@@ -17,10 +17,10 @@
<div class="text-nowrap cart-item-prices"> <div class="text-nowrap cart-item-prices">
@if (formattedOriginalPrice(); as originalPrice) { @if (formattedOriginalPrice(); as originalPrice) {
<span class="text-decoration-line-through fw-light cart-item-original-price">{{ originalPrice }}</span> <span class="text-decoration-line-through mb-1 fw-light cart-item-original-price">{{ originalPrice }}</span>
} }
<span class="fw-normal cart-item-discounted-price">{{ formattedDiscountedPrice() }}</span> <span class="fw-bold cart-item-discounted-price">{{ formattedDiscountedPrice() }}</span>
</div> </div>
</div> </div>

View File

@@ -1,28 +1,43 @@
:host { :host {
display: block; display: block;
--item-media-width: 64px; --item-media-size: 90px;
--item-media-height: 72px; --item-divider-inset: 1rem;
} }
@media (max-width: 420px) { :host(:first-child) .cart-item,
:host { :host .cart-item {
--item-media-width: 56px; position: relative;
--item-media-height: 64px; }
}
:host(:first-child) .cart-item::before,
:host .cart-item::after {
content: "";
position: absolute;
right: var(--item-divider-inset);
left: var(--item-divider-inset);
height: 1px;
background-color: #ffffff;
}
:host(:first-child) .cart-item::before {
top: 0;
}
:host .cart-item::after {
bottom: 0;
} }
.cart-item { .cart-item {
display: grid; display: grid;
grid-template-columns: var(--item-media-width) minmax(0, 1fr); grid-template-columns: var(--item-media-size) minmax(0, 1fr);
gap: 0.75rem; gap: 0.75rem;
padding: 10px 12px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.cart-item-media { .cart-item-media {
width: var(--item-media-width); width: var(--item-media-size);
height: var(--item-media-height); aspect-ratio: 1 / 1;
border-radius: 6px; border-radius: 5px 0 0 5px;
background-color: #ffffff; background-color: #ffffff;
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
overflow: hidden; overflow: hidden;
@@ -30,14 +45,14 @@
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: cover;
} }
} }
.cart-item-discount-badge { .cart-item-discount-badge {
padding: 2px 5px; padding: 2px 5px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
background-color: #6173ff; background-color: var(--bs-primary);
color: #ffffff; color: #ffffff;
font-size: 8px; font-size: 8px;
font-weight: 500; font-weight: 500;
@@ -45,6 +60,8 @@
} }
.cart-item-placeholder { .cart-item-placeholder {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #d2d2d2, #ececec); background: linear-gradient(135deg, #d2d2d2, #ececec);
} }
@@ -100,9 +117,6 @@
gap: 0.125rem; gap: 0.125rem;
} }
.cart-item-remove-btn { .cart-item-remove-btn {
margin-left: 0.35rem; margin-left: 0.35rem;
} }

View File

@@ -1,5 +1,5 @@
<section class="d-flex flex-column h-100 overflow-hidden text-secondary" [style.background-color]="backgroundColor()"> <section class="d-flex flex-column h-100 overflow-hidden text-secondary" [style.background-color]="backgroundColor()">
<header class="d-flex align-items-center justify-content-between bg-transparent cart-header"> <header class="d-flex align-items-center p-3 justify-content-between bg-transparent cart-header">
<h2 class="m-0 text-uppercase fw-bold cart-title">{{ title() }}</h2> <h2 class="m-0 text-uppercase fw-bold cart-title">{{ title() }}</h2>
@if (showClose()) { @if (showClose()) {
@@ -9,7 +9,7 @@
} }
</header> </header>
<div class="d-grid gap-2 flex-grow-1 overflow-y-auto cart-items-container"> <div class="d-grid w-100 flex-grow-1 overflow-y-auto cart-items-container">
@for (item of items(); track item.productVariantId || item.product + item.discountedPrice; let idx = $index) { @for (item of items(); track item.productVariantId || item.product + item.discountedPrice; let idx = $index) {
<app-cart-item <app-cart-item
[imageUrl]="item.imageUrl" [imageUrl]="item.imageUrl"
@@ -48,3 +48,4 @@
</section> </section>

View File

@@ -23,10 +23,16 @@
.cart-items-container { .cart-items-container {
min-height: 0; min-height: 0;
padding: 0 0 0 24px; gap: 0;
scrollbar-color: #d5d5d5 transparent; scrollbar-color: #d5d5d5 transparent;
scrollbar-width: thin; scrollbar-width: thin;
app-cart-item {
display: block;
}
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;
} }