-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
327 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,71 @@ | ||
{% if cart.shippingMethod != null and cart.shippingMethod.handle != 'freeShipping' %} | ||
{% set postalCode = cart.estimatedShippingAddress.postalCode|default('') %} | ||
{% set postalCode = cart.estimatedShippingAddress.postalCode|default('') %} | ||
|
||
<div v-scope="FocusModal({ isOpen: false })" class="relative" @vue:mounted="mounted"> | ||
<div v-scope="FocusModal({ isOpen: false })" class="relative" @vue:mounted="mounted"> | ||
|
||
<div class="flex justify-between items-center gap-4"> | ||
<dt class="text-gray-500"> | ||
{% if postalCode %}{{ 'Estimated shipping to'|t('foster-checkout') }}{% endif %} | ||
<button id="estimatedShippingLabel" class="text-[var(--brandColor)] underline" @click="toggleModal"> | ||
{{ postalCode ? postalCode : 'Get estimated shipping'|t('foster-checkout') }} | ||
</button> | ||
</dt> | ||
<dd class="text-right text-black">{{ cart.totalShippingCostAsCurrency }}</dd> | ||
</div> | ||
<div class="flex justify-between items-center gap-4"> | ||
<dt class="text-gray-500"> | ||
{% if postalCode %}{{ 'Estimated shipping to'|t('foster-checkout') }}{% endif %} | ||
<button id="estimatedShippingLabel" class="text-[var(--brandColor)] underline" @click="toggleModal"> | ||
{{ postalCode ? postalCode : 'Get estimated shipping'|t('foster-checkout') }} | ||
</button> | ||
</dt> | ||
<dd class="text-right text-black">{{ cart.totalShippingCostAsCurrency }}</dd> | ||
</div> | ||
|
||
<div | ||
v-cloak | ||
v-show="isOpen" | ||
role="dialog" | ||
ref="modal" | ||
:aria-hidden="!isOpen" | ||
aria-labelledby="estimatedShippingLabel" | ||
aria-describedby="estimatedShippingDesc" | ||
class="absolute top-10 z-20 inset-x-0 p-4 bg-gray-100 rounded-xl shadow-[0_5px_40px_0_rgba(0,0,0,0.2)]" | ||
> | ||
<div | ||
v-cloak | ||
v-show="isOpen" | ||
role="dialog" | ||
ref="modal" | ||
:aria-hidden="!isOpen" | ||
aria-labelledby="estimatedShippingLabel" | ||
aria-describedby="estimatedShippingDesc" | ||
class="absolute top-10 z-20 inset-x-0 p-4 bg-gray-100 rounded-xl shadow-[0_5px_40px_0_rgba(0,0,0,0.2)]" | ||
> | ||
|
||
<header class="flex justify-between items-center gap-4 -mt-[8px]"> | ||
<h4 class="font-semibold text-black">{{ 'Delivery Postal Code'|t('foster-checkout') }}</h4> | ||
<button class="w-[48px] h-[48px] -mt-[6px] -mr-[17px] flex justify-center items-center" | ||
@click="toggleModal"> | ||
<span class="sr-only">{{ 'Close'|t('foster-checkout') }}</span> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" class="fill-current"> | ||
<path d="M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z"/> | ||
</svg> | ||
</button> | ||
</header> | ||
<header class="flex justify-between items-center gap-4 -mt-[8px]"> | ||
<h4 class="font-semibold text-black">{{ 'Delivery Postal Code'|t('foster-checkout') }}</h4> | ||
<button class="w-[48px] h-[48px] -mt-[6px] -mr-[17px] flex justify-center items-center" | ||
@click="toggleModal"> | ||
<span class="sr-only">{{ 'Close'|t('foster-checkout') }}</span> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" class="fill-current"> | ||
<path d="M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z"/> | ||
</svg> | ||
</button> | ||
</header> | ||
|
||
<div class="mt-4"> | ||
<div class="mt-4"> | ||
|
||
<form class="grid grid-cols-[1fr,_90px] gap-4"> | ||
{% include 'foster-checkout/_components/base/input-text-clearable' with { | ||
label: 'Postal Code'|t('foster-checkout'), | ||
hideLabel: true, | ||
id: 'postalCode', | ||
name: 'postalCode', | ||
type: 'text', | ||
autocomplete: 'postal-code', | ||
placeholder: 'postalCodeFormat'|t('foster-checkout'), | ||
value: postalCode, | ||
action: 'if (isOpen) $el.focus()' | ||
} %} | ||
<button type="submit" | ||
class="text-white bg-[var(--brandColor)] rounded-xl">{{ 'Update'|t('foster-checkout') }}</button> | ||
</form> | ||
<form class="grid grid-cols-[1fr,_90px] gap-4"> | ||
{% include 'foster-checkout/_components/base/input-text-clearable' with { | ||
label: 'Postal Code'|t('foster-checkout'), | ||
hideLabel: true, | ||
id: 'postalCode', | ||
name: 'postalCode', | ||
type: 'text', | ||
autocomplete: 'postal-code', | ||
placeholder: 'postalCodeFormat'|t('foster-checkout'), | ||
value: postalCode, | ||
action: 'if (isOpen) $el.focus()' | ||
} %} | ||
<button type="submit" | ||
class="text-white bg-[var(--brandColor)] rounded-xl">{{ 'Update'|t('foster-checkout') }}</button> | ||
</form> | ||
|
||
<div class="flex justify-start items-start gap-4 mt-4 pt-4 text-gray-500 border-t border-gray-300"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="16" viewBox="0 0 22 16" | ||
class="mt-1 fill-current flex-shrink-0" aria-hidden="true"> | ||
<path | ||
d="M5 16C4.16667 16 3.45833 15.7083 2.875 15.125C2.29167 14.5417 2 13.8333 2 13H0V2C0 1.45 0.195833 0.979167 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0H16V4H19L22 8V13H20C20 13.8333 19.7083 14.5417 19.125 15.125C18.5417 15.7083 17.8333 16 17 16C16.1667 16 15.4583 15.7083 14.875 15.125C14.2917 14.5417 14 13.8333 14 13H8C8 13.8333 7.70833 14.5417 7.125 15.125C6.54167 15.7083 5.83333 16 5 16ZM5 14C5.28333 14 5.52083 13.9042 5.7125 13.7125C5.90417 13.5208 6 13.2833 6 13C6 12.7167 5.90417 12.4792 5.7125 12.2875C5.52083 12.0958 5.28333 12 5 12C4.71667 12 4.47917 12.0958 4.2875 12.2875C4.09583 12.4792 4 12.7167 4 13C4 13.2833 4.09583 13.5208 4.2875 13.7125C4.47917 13.9042 4.71667 14 5 14ZM17 14C17.2833 14 17.5208 13.9042 17.7125 13.7125C17.9042 13.5208 18 13.2833 18 13C18 12.7167 17.9042 12.4792 17.7125 12.2875C17.5208 12.0958 17.2833 12 17 12C16.7167 12 16.4792 12.0958 16.2875 12.2875C16.0958 12.4792 16 12.7167 16 13C16 13.2833 16.0958 13.5208 16.2875 13.7125C16.4792 13.9042 16.7167 14 17 14ZM16 9H20.25L18 6H16V9Z"/> | ||
</svg> | ||
<p | ||
id="estimatedShippingDesc">{{ 'Your postal code helps us provide the most accurate delivery information.'|t('foster-checkout') }}</p> | ||
</div> | ||
|
||
<div class="flex justify-start items-start gap-4 mt-4 pt-4 text-gray-500 border-t border-gray-300"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="16" viewBox="0 0 22 16" | ||
class="mt-1 fill-current flex-shrink-0" aria-hidden="true"> | ||
<path | ||
d="M5 16C4.16667 16 3.45833 15.7083 2.875 15.125C2.29167 14.5417 2 13.8333 2 13H0V2C0 1.45 0.195833 0.979167 0.5875 0.5875C0.979167 0.195833 1.45 0 2 0H16V4H19L22 8V13H20C20 13.8333 19.7083 14.5417 19.125 15.125C18.5417 15.7083 17.8333 16 17 16C16.1667 16 15.4583 15.7083 14.875 15.125C14.2917 14.5417 14 13.8333 14 13H8C8 13.8333 7.70833 14.5417 7.125 15.125C6.54167 15.7083 5.83333 16 5 16ZM5 14C5.28333 14 5.52083 13.9042 5.7125 13.7125C5.90417 13.5208 6 13.2833 6 13C6 12.7167 5.90417 12.4792 5.7125 12.2875C5.52083 12.0958 5.28333 12 5 12C4.71667 12 4.47917 12.0958 4.2875 12.2875C4.09583 12.4792 4 12.7167 4 13C4 13.2833 4.09583 13.5208 4.2875 13.7125C4.47917 13.9042 4.71667 14 5 14ZM17 14C17.2833 14 17.5208 13.9042 17.7125 13.7125C17.9042 13.5208 18 13.2833 18 13C18 12.7167 17.9042 12.4792 17.7125 12.2875C17.5208 12.0958 17.2833 12 17 12C16.7167 12 16.4792 12.0958 16.2875 12.2875C16.0958 12.4792 16 12.7167 16 13C16 13.2833 16.0958 13.5208 16.2875 13.7125C16.4792 13.9042 16.7167 14 17 14ZM16 9H20.25L18 6H16V9Z"/> | ||
</svg> | ||
<p id="estimatedShippingDesc">{{ 'Your postal code helps us provide the most accurate delivery information.'|t('foster-checkout') }}</p> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
{% endif %} |
Oops, something went wrong.