Skip to content

Commit

Permalink
Merge branch 'feature/v3-colors-and-tweaks' of github.com:rapidez/che…
Browse files Browse the repository at this point in the history
…ckout-theme into feature/WCAG-fixes-tailwind-cleanup
  • Loading branch information
JimmyHoenderdaal committed Dec 18, 2024
2 parents a37b74a + 588cc0f commit 26adb84
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 55 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"require": {
"php": "^8.0|^8.1|^8.2",
"blade-ui-kit/blade-heroicons": "^2.0",
"rapidez/account": "^3.0",
"rapidez/core": "^3.0"
},
"autoload": {
Expand Down
21 changes: 4 additions & 17 deletions lang/nl.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"Account features": "Account voordelen",
"Account overview": "Account overzicht",
"Account registration successful.": "Accountregistratie succesvol.",
"Account settings": "Account instellingen",
"Add a new address": "Voeg een nieuw adres toe",
"Add address and save": "Voeg adres toe en sla op",
"Address": "Adres",
"Address changed successfully": "Adres succesvol gewijzigd",
"Address created successfully": "Adres succesvol aangemaakt",
"Address data": "Adresgegevens",
"Already logged in": "Al ingelogd",
"Amount": "Bedrag",
"An email is send with a password reset link if an account exists with the provided email address.": "Een e-mail is verzonden met een link om het wachtwoord te resetten, als er een account bestaat met het opgegeven e-mailadres.",
"Back to account": "Terug naar account",
"Back to cart": "Terug naar winkelwagen",
"Back to credentials": "Terug naar inloggegevens",
Expand All @@ -22,23 +19,15 @@
"Change address and save": "Adres wijzigen en opslaan",
"Change credentials / Add addresses / Newsletters": "Wijzig gegevens / Voeg adressen toe / Nieuwsbrieven",
"Change e-mail address": "E-mailadres wijzigen",
"Change password": "Wachtwoord wijzigen",
"Changed successfully!": "Succesvol gewijzigd!",
"Contact information": "Contactgegevens",
"Continue shopping": "Verder winkelen",
"Coupon code": "Kortingscode",
"Current password": "Huidig wachtwoord",
"Customer centre": "Klantenservice",
"Decrease quantity": "Aantal verlagen",
"Default billing address": "Standaard factuuradres",
"Default shipping address": "Standaard verzendadres",
"Delete address": "Adres verwijderen",
"Delivery method": "Bezorgmethode",
"Deselect as billing": "Deselecteer als factuuradres",
"Deselect as shipping": "Deselecteer als verzendadres",
"Don't have an account yet? Create an account and enjoy faster ordering, repeat orders, status of your order, easy returns and more!": "Nog geen account? Maak een account aan en geniet van sneller bestellen, herhaalde bestellingen, bestelstatus, gemakkelijke retouren en meer!",
"Edit": "Bewerken",
"Email": "E-mail",
"Enter your e-mail address": "Voer uw e-mailadres in",
"Enter your email address": "Voer uw e-mailadres in",
"Enter your email address below, you will receive an email within minutes to reset the password.": "Voer hieronder uw e-mailadres in, u ontvangt binnen enkele minuten een e-mail om het wachtwoord te resetten.",
Expand All @@ -52,21 +41,18 @@
"Log out": "Uitloggen",
"Logout from your account": "Uitloggen van uw account",
"My addresses": "Mijn adressen",
"New password": "Nieuw wachtwoord",
"Newsletter": "Nieuwsbrief",
"No account yet? Create an account and benefit instantly from repeat orders, order statuses and easy returns!": "Nog geen account? Maak direct een account aan en profiteer van herhaalde bestellingen, bestelstatus en gemakkelijke retouren!",
"No default address has been set yet.": "Er is nog geen standaardadres ingesteld.",
"Number of products": "Aantal producten",
"Order": "Bestelling",
"Order again": "Bestelling herhalen",
"Order date": "Besteldatum",
"Order overview": "Bestellingsoverzicht",
"Ordered within 2 minutes": "Besteld binnen 2 minuten",
"Place repeat order / View orders": "Herhaal bestelling / Bekijk bestellingen",
"Please select an address": "Selecteer een adres",
"Price": "Prijs",
"Product": "Product",
"Quick and easy ordering without having to fill in your details every time": "Snel en eenvoudig bestellen zonder elke keer uw gegevens in te vullen",
"Register": "Registreren",
"Register account": "Account registreren",
"Register within 1 minute": "Registreer binnen 1 minuut",
"Return to home": "Terug naar home",
Expand All @@ -80,7 +66,6 @@
"Thank you for subscribing": "Bedankt voor uw inschrijving",
"Thank you for your order": "Bedankt voor uw bestelling",
"This is a business account": "Dit is een zakelijke account",
"This product is out of stock, remove it to continue your order.": "Dit product is op dit moment niet op voorraad, verwijder deze om verder te gaan met de bestelling.",
"This product it out of stock, remove it to continue your order.": "Dit product is niet op voorraad, verwijder het om verder te gaan met je bestelling.",
"To checkout": "Naar afrekenen",
"Total price": "Totale prijs",
Expand All @@ -89,12 +74,14 @@
"Use a new address": "Gebruik een nieuw adres",
"Vat ID": "BTW-nummer",
"We will also check if you already have an account so you can checkout more efficiently.": "We zullen ook controleren of u al een account heeft, zodat u efficiënter kunt afrekenen.",
"We will send your order confirmation to this e-mail address.": "We sturen uw orderbevestiging naar dit e-mailadres.",
"We will send a confirmation of your order :orderid to :email": "We sturen een orderbevestiging van bestelling :orderid naar :email",
"We will send your order confirmation to this e-mail address. We will also check if you already have an account so you can checkout more efficiently.": "We sturen uw orderbevestiging naar dit e-mailadres. We zullen ook controleren of u al een account heeft om het bestelproces te versnellen.",
"Welcome back": "Welkom terug",
"Yes, I want to subscribe to the newsletter": "Ja, ik wil me inschrijven voor de nieuwsbrief",
"You already have an account with this e-mail address. Please log in to continue.": "U heeft al een account met dit e-mailadres. Log in om verder te gaan.",
"You do not have any orders yet.": "U heeft nog geen bestellingen.",
"You will receive this newsletter approximately 2x a year": "U ontvangt deze nieuwsbrief ongeveer 2x per jaar",
"Your password has been changed, please login.": "Uw wachtwoord is gewijzigd, log alstublieft in.",
"and use a different e-mail address.": "en gebruik een ander e-mailadres."
"Your order is currently": "Uw bestelling is momenteel"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="bg-inactive-100 text-muted relative py-3 text-xs font-semibold">
<div class="bg text-muted relative py-3 text-xs font-semibold">
<slider reference="header-usp-slider" autoplay>
<ul
ref="header-usp-slider"
Expand Down
1 change: 1 addition & 0 deletions resources/views/account/address-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<graphql-mutation
query="@include('rapidez::account.partials.queries.address-edit')"
:variables="data.customer.addresses.find(a => a.id == {{ request()->id }})"
:callback="refreshUserInfoCallback"
:notify="{ 'message': '@lang('Address changed successfully')' }"
redirect="{{ route('account.edit') }}"
>
Expand Down
1 change: 1 addition & 0 deletions resources/views/account/address-new.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
query="@include('rapidez::account.partials.queries.address-create')"
:variables="{ street: [] }"
:watch="false"
:callback="refreshUserInfoCallback"
:notify="{ 'message': '@lang('Address created successfully')' }"
redirect="{{ route('account.edit') }}"
>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/account/forgotpassword.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@extends('rapidez::layouts.app')

@section('title', __('Forgot password'))
@section('title', __('Forgot your password?'))

@section('robots', 'NOINDEX,NOFOLLOW')

Expand Down
2 changes: 1 addition & 1 deletion resources/views/account/partials/address-cards.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>
<a href="/account/address/new" class="min-h-[180px] flex flex-col items-center justify-center gap-y-2 font-medium bg-emphasis rounded max-md:hidden">
<span>+</span>
<span>@lang('Add new address')</span>
<span>@lang('Add a new address')</span>
</a>
</template>
<template v-else>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<graphql-mutation query="mutation deleteCustomerAddress($id: Int!){ deleteCustomerAddress ( id: $id ) }" :variables="{ id: userAddress.id }" v-slot="{ mutate }">
<graphql-mutation
query="mutation deleteCustomerAddress($id: Int!){ deleteCustomerAddress ( id: $id ) }"
:variables="{ id: userAddress.id }"
:callback="refreshUserInfoCallback"
v-slot="{ mutate }"
>
<x-rapidez-ct::button.link v-if="!userAddress.default_billing && !userAddress.default_shipping" v-on:click="data.customer.addresses.splice(addressIndex,1);mutate()">
@lang('Delete address')
</x-rapidez-ct::button.link>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/account/partials/forgotpassword.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
query="mutation reset($email: String!) { requestPasswordResetEmail ( email: $email ) }"
v-slot="{ mutate, variables }"
:clear="true"
:notify="{ message: '@lang('An email is send with a password reset link if an account exists with the provided email address.')' }"
:notify="{ message: '@lang('An email has been sent with a password reset link if an account exists with the provided email address.')' }"
>
<form v-on:submit.prevent="mutate">
<x-rapidez-ct::title.lg class="mb-4">
@lang('Forgot Your Password?')
@lang('Forgot your password?')
</x-rapidez-ct::title.lg>
<p class="mb-5 text-sm">
@lang('Enter your email address below, you will receive an email within minutes to reset the password.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<span class="relative flex flex-col gap-y-1.5 sm:gap-y-2 text-sm !mb-3">
<label>
<x-rapidez::label>@lang('Country')</x-rapidez::label>
<x-rapidez::country-select
<x-rapidez::input.select.country
name="country_code"
v-model="addressVariables.country_code"
v-on:change="window.app.$emit('postcode-change', addressVariables)"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/cart/coupon.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<x-rapidez-ct::coupon-field />
<template v-if="cart.applied_coupons?.length" v-for="coupon in cart.applied_coupons" v-cloak>
<graphql-mutation
:query="'mutation ($cart_id: String!) { removeCouponFromCart(input: { cart_id: $cart_id }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!) { removeCouponFromCart(input: { cart_id: $cart_id }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask }"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/cart/partials/product/remove-button.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<graphql-mutation
:query="'mutation ($cart_id: String!, $cart_item_id: Int) { removeItemFromCart(input: { cart_id: $cart_id, cart_item_id: $cart_item_id }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $cart_item_id: Int) { removeItemFromCart(input: { cart_id: $cart_id, cart_item_id: $cart_item_id }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask, cart_item_id: item.id }"
:notify="{ message: item.product.name+' '+config.translations.cart.remove }"
:callback="updateCart"
Expand All @@ -9,4 +9,4 @@
<button v-on:click="mutate" class="text-muted mt-1 text-xs hover:underline" :dusk="'item-delete-' + index">
@lang('Remove')
</button>
</graphql-mutation>
</graphql-mutation>
6 changes: 3 additions & 3 deletions resources/views/checkout/partials/address-cards.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="grid gap-5 md:grid-cols-2">
<template v-if="cart.billing_address?.same_as_shipping">
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping billing check>
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping billing check="cart.shipping_addresses[0]">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
</x-rapidez-ct::card.address>
@include('rapidez-ct::checkout.partials.buttons.new-address')
</template>
<template v-else>
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping check class="h-full">
<x-rapidez-ct::card.address v-bind:address="cart.shipping_addresses[0]" shipping check="cart.shipping_addresses[0]" class="h-full">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
Expand All @@ -20,7 +20,7 @@
<input type="checkbox" oninvalid="this.setCustomValidity('{{ __('Please select an address') }}')" required class="absolute w-full h-full inset-0 opacity-0 pointer-events-none">
</x-slot>
</x-rapidez-ct::card.address>
<x-rapidez-ct::card.address v-bind:address="cart.billing_address" billing check class="h-full">
<x-rapidez-ct::card.address v-bind:address="cart.billing_address" billing check="cart.billing_address" class="h-full">
<x-rapidez-ct::button.link v-on:click.prevent="toggleEdit">
@lang('Edit')
</x-rapidez-ct::button.link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<button v-on:click.prevent="toggleEdit" class="flex flex-col items-center justify-center gap-y-2 font-medium bg-emphasis rounded max-md:hidden">
<span>+</span>
<span>@lang('Add new address')</span>
<span>@lang('Add a new address')</span>
</button>
2 changes: 0 additions & 2 deletions resources/views/checkout/partials/sections/address.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
country_code: cart.shipping_addresses[0]?.country.code || window.address_defaults.country_code
}"
group="shipping"
:before-request="(query, variables, options) => [variables.customer_address_id ? config.queries.setExistingShippingAddressesOnCart : query, variables, options]"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
:watch="false"
Expand All @@ -37,7 +36,6 @@
same_as_shipping: !cart.is_virtual && (cart?.billing_address?.same_as_shipping ?? true),
country_code: cart.billing_address?.country.code || window.address_defaults.country_code
}))"
:before-request="(query, variables, options) => [variables.customer_address_id ? config.queries.setExistingBillingAddressOnCart : query, variables, options]"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
:watch="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class="justify-center"
</label>

<p v-if="checkoutLogin.isEmailAvailable" class="self-end text-muted">
@lang('We will send your order confirmation to this e-mail address. We will also check if you already have an account so you can checkout more efficiently.')
@lang('We\'ll email your order confirmation and check if you have an account for faster checkout.')
</p>

<template v-if="!loggedIn && (!checkoutLogin.isEmailAvailable || checkoutLogin.createAccount)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
mutate-event="setPaymentMethodOnCart"
v-slot="{ mutate, variables }"
>
<div partial-submit="mutate" class="flex flex-col gap-4">
<div partial-submit="mutate" class="flex flex-col gap-3">
<div v-for="(method, index) in cart.available_payment_methods">
@include('rapidez-ct::checkout.partials.sections.payment.payment-methods')
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<x-rapidez-ct::title.lg>
@lang('Create account')
@lang('Create an account')
</x-rapidez-ct::title.lg>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<x-rapidez::button.seconary class="self-end justify-self-start" loader>
@lang('Create account')
@lang('Create an account')
</x-rapidez::button.seconary>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<x-rapidez-ct::card>
<x-rapidez-ct::title.lg class="mb-5">
@lang('Success usps')
Success usps
</x-rapidez-ct::title.lg>
<x-rapidez-ct::usp-list>
<li>
<x-heroicon-o-check class="absolute left-0 top-0 size-5 text-primary" stroke-width="2.5" />
<span>@lang('Success usp 1')</span>
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-primary" stroke-width="2.5" />
<span>Success usp 1</span>
</li>
<li>
<x-heroicon-o-check class="absolute left-0 top-0 size-5 text-primary" stroke-width="2.5" />
<span>@lang('Success usp 2')</span>
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-primary" stroke-width="2.5" />
<span>Success usp 2</span>
</li>
<li>
<x-heroicon-o-check class="absolute left-0 top-0 size-5 text-primary" stroke-width="2.5" />
<span>@lang('Success usp 3')</span>
<x-heroicon-o-check class="absolute left-0 top-0 h-5 text-primary" stroke-width="2.5" />
<span>Success usp 3</span>
</li>
</x-rapidez-ct::usp-list>
</x-rapidez-ct::card>
2 changes: 1 addition & 1 deletion resources/views/components/address-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@endif
<label class="sm:col-span-2">
<x-rapidez::label>@lang('Country')</x-rapidez::label>
<x-rapidez::country-select
<x-rapidez::input.select.country
name="{{ $type }}_country"
v-model="{{ $address }}.{{ $countryKey }}"
required
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/coupon-field.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<graphql-mutation
:query="'mutation ($cart_id: String!, $coupon_code: String!) { applyCouponToCart(input: { cart_id: $cart_id, coupon_code: $coupon_code }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $coupon_code: String!) { applyCouponToCart(input: { cart_id: $cart_id, coupon_code: $coupon_code }) { ...cart } } ' + config.fragments.cart"
:variables="{ cart_id: mask, coupon_code: '' }"
:notify="{ message: config.translations.cart.coupon.applied }"
:clear="true"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/input/checkbox/tile.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@props(['name' => '', 'id' => uniqid('checkbox-')])
<label for="{{ $id }}" {{ $attributes->only('class')->class('relative flex cursor-pointer select-none flex-wrap gap-x-3 text-sm') }}>
<label for="{{ $id }}" {{ $attributes->only('class')->class('relative flex cursor-pointer select-none gap-x-3 text-sm') }}>
<x-rapidez::input.checkbox.base
class="size-6 text-primary peer"
id="{{ $id }}"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/input/quantity.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<graphql-mutation
:query="'mutation ($cart_id: String!, $cart_item_id: Int, $quantity: Float) { updateCartItems(input: { cart_id: $cart_id, cart_items: [{ cart_item_id: $cart_item_id, quantity: $quantity }] }) { cart { ' + config.queries.cart + ' } } }'"
:query="'mutation ($cart_id: String!, $cart_item_id: Int, $quantity: Float) { updateCartItems(input: { cart_id: $cart_id, cart_items: [{ cart_item_id: $cart_item_id, quantity: $quantity }] }) { cart { ...cart } } } ' + config.fragments.cart"
:variables="{ cart_id: mask, cart_item_id: item.id, quantity: item.quantity }"
:callback="updateCart"
:error-callback="checkResponseForExpiredCart"
Expand Down
10 changes: 6 additions & 4 deletions resources/views/components/input/radio/tile.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<label {{ $attributes->only('class')->class('relative flex w-full cursor-pointer items-center justify-start gap-x-3 rounded border bg-white px-5 sm:px-7 py-7') }}>
<span class="flex aspect-square size-6 items-center justify-center rounded-full border bg-white">
<input type="radio" {{ $attributes->except('class') }} class="peer size-3 border-none text-primary transition checked:bg-none focus:ring-0 focus:ring-offset-0" />
<span class="absolute -inset-y-px -left-px w-1 rounded-l bg-primary opacity-0 transition-all peer-checked:opacity-100"></span>
</span>
<x-rapidez::input.radio.base
class="size-6 text-primary peer"
name="{{ $name }}"
{{ $attributes->except('class') }}
/>
@isset($slot)
<span class="flex w-full flex-wrap items-center justify-between gap-x-3">
{{ $slot }}
</span>
@endisset
<div class="absolute -inset-y-px -left-px w-1 rounded-l bg-primary opacity-0 transition-all peer-checked:opacity-100"></div>
</label>
Loading

0 comments on commit 26adb84

Please sign in to comment.