@lookiero/checkout 11.1.0 → 11.3.0
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/src/Expo.js +2 -8
- package/dist/src/ExpoRoot.d.ts +1 -5
- package/dist/src/ExpoRoot.js +7 -6
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +3 -2
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +8 -6
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.js +18 -16
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +7 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +4 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +26 -22
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.style.js +11 -9
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.style.d.ts +3 -3
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.style.js +18 -13
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +4 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.d.ts +3 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.js +14 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +25 -23
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +5 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +11 -9
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.d.ts +1 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.style.js +13 -11
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +3 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +23 -18
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +4 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.d.ts +4 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.js +11 -6
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +5 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.d.ts +2 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.js +15 -12
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +4 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +3 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +18 -13
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +10 -5
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.d.ts +10 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.js +16 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +12 -10
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +30 -28
- package/dist/src/infrastructure/ui/components/templates/header/Header.js +6 -3
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.js +17 -15
- package/dist/src/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.js +6 -3
- package/dist/src/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.style.js +10 -8
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +6 -4
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.js +10 -8
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +6 -4
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.js +10 -8
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +7 -5
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.d.ts +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.js +11 -9
- package/dist/src/infrastructure/ui/views/App.js +8 -6
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +12 -10
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +63 -61
- package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +4 -3
- package/dist/src/infrastructure/ui/views/feedback/Feedback.js +3 -2
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.js +13 -11
- package/dist/src/infrastructure/ui/views/item/Item.js +4 -2
- package/dist/src/infrastructure/ui/views/item/Item.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/Item.style.js +21 -19
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -2
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +11 -9
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +7 -6
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +3 -1
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +26 -22
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +28 -26
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +7 -6
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +6 -3
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +23 -18
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +13 -6
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +2 -1
- package/dist/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +34 -28
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +5 -3
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +11 -9
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +7 -7
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +5 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +27 -18
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +3 -2
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +17 -15
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +3 -2
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.style.js +19 -17
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +6 -5
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.d.ts +2 -1
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +13 -7
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.js +3 -2
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.js +17 -15
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -2
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.js +18 -16
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +10 -9
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.d.ts +4 -1
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.js +35 -30
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +12 -8
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +50 -48
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +7 -6
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.d.ts +4 -1
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.js +43 -38
- package/dist/src/infrastructure/ui/views/summary/Summary.js +12 -10
- package/dist/src/infrastructure/ui/views/summary/Summary.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.style.js +72 -70
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +5 -3
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.js +20 -18
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +9 -5
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.js +15 -13
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +19 -7
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +29 -27
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
- package/src/Expo.tsx +2 -10
- package/src/ExpoRoot.tsx +8 -10
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +8 -6
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +4 -2
- package/src/infrastructure/ui/components/atoms/price/Price.style.ts +18 -16
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +34 -31
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +9 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.style.ts +11 -9
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.style.ts +19 -13
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.ts +16 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.tsx +6 -6
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +26 -24
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +3 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.ts +11 -9
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +6 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.style.ts +13 -11
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +24 -18
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +6 -5
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.ts +11 -6
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +5 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.ts +15 -12
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +8 -6
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.ts +19 -13
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +5 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.ts +16 -4
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +24 -14
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.ts +12 -10
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +31 -29
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +4 -2
- package/src/infrastructure/ui/components/templates/header/Header.style.ts +18 -16
- package/src/infrastructure/ui/components/templates/header/Header.tsx +11 -7
- package/src/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.style.ts +10 -8
- package/src/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.tsx +7 -3
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.ts +10 -8
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +7 -4
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +31 -80
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.ts +10 -8
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +7 -4
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +31 -80
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.ts +11 -9
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +8 -5
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +62 -160
- package/src/infrastructure/ui/views/App.tsx +12 -10
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +63 -61
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +16 -12
- package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +4 -3
- package/src/infrastructure/ui/views/feedback/Feedback.style.ts +13 -11
- package/src/infrastructure/ui/views/feedback/Feedback.tsx +5 -2
- package/src/infrastructure/ui/views/item/Item.style.ts +21 -19
- package/src/infrastructure/ui/views/item/Item.tsx +6 -2
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.ts +11 -9
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +5 -2
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +26 -22
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +8 -6
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.style.ts +28 -26
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +3 -1
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +23 -18
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +9 -6
- package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.ts +37 -29
- package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.tsx +13 -6
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.ts +11 -9
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +6 -3
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +29 -18
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +8 -9
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.ts +18 -15
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -2
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.style.ts +19 -17
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +4 -2
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +15 -8
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +7 -6
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.ts +17 -15
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.tsx +4 -2
- package/src/infrastructure/ui/views/return/components/price/Price.style.ts +18 -16
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +4 -2
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.ts +36 -31
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +11 -9
- package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +11 -12
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +50 -48
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +13 -10
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts +56 -50
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +8 -6
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +18 -0
- package/src/infrastructure/ui/views/summary/Summary.style.ts +84 -82
- package/src/infrastructure/ui/views/summary/Summary.tsx +17 -13
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.ts +20 -18
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +6 -3
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +22 -6
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.ts +15 -13
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +15 -10
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.ts +29 -27
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +22 -8
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +36 -0
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { colorBgBase, fontInputPaddingLeft, space2, space4, space6 } = theme();
|
|
4
3
|
const INPUT_HEIGHT = 96;
|
|
5
|
-
const style =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
const style = () => {
|
|
5
|
+
const { colorBgBase, fontInputPaddingLeft, space2, space4, space6 } = theme();
|
|
6
|
+
return StyleSheet.create({
|
|
7
|
+
input: {
|
|
8
|
+
paddingTop: space4,
|
|
9
|
+
...Platform.select({
|
|
10
|
+
android: {
|
|
11
|
+
paddingTop: space2,
|
|
12
|
+
},
|
|
13
|
+
}),
|
|
14
|
+
},
|
|
15
|
+
inputContainer: {
|
|
16
|
+
height: INPUT_HEIGHT,
|
|
17
|
+
...Platform.select({
|
|
18
|
+
android: {
|
|
19
|
+
alignItems: "flex-start",
|
|
20
|
+
paddingLeft: fontInputPaddingLeft,
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
inputField: {
|
|
25
|
+
height: INPUT_HEIGHT,
|
|
26
|
+
},
|
|
27
|
+
wrapper: {
|
|
28
|
+
backgroundColor: colorBgBase,
|
|
29
|
+
padding: space6,
|
|
30
|
+
paddingTop: 0,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
};
|
|
32
34
|
export { style };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { style } from "./Header.style";
|
|
4
|
-
const Header = ({ children, style: customStyle, ...props }) =>
|
|
3
|
+
import { style as headerStyle } from "./Header.style";
|
|
4
|
+
const Header = ({ children, style: customStyle, ...props }) => {
|
|
5
|
+
const style = useMemo(() => headerStyle(), []);
|
|
6
|
+
return (React.createElement(View, { ...props, style: [style.header, customStyle] }, children));
|
|
7
|
+
};
|
|
5
8
|
export { Header };
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { colorBgBase, space2 } = theme();
|
|
4
3
|
const HEADER_HEIGHT = 48;
|
|
5
|
-
const style =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
const style = () => {
|
|
5
|
+
const { colorBgBase, space2 } = theme();
|
|
6
|
+
return StyleSheet.create({
|
|
7
|
+
header: {
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
backgroundColor: colorBgBase,
|
|
10
|
+
flexDirection: "row",
|
|
11
|
+
flexGrow: 0,
|
|
12
|
+
flexWrap: "nowrap",
|
|
13
|
+
height: HEADER_HEIGHT,
|
|
14
|
+
justifyContent: "space-between",
|
|
15
|
+
overflow: "visible",
|
|
16
|
+
paddingHorizontal: space2,
|
|
17
|
+
width: "100%",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
};
|
|
19
21
|
export { style, HEADER_HEIGHT };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { style } from "./ButtonIconPlaceholder.style";
|
|
4
|
-
const ButtonIconPlaceholder = () =>
|
|
3
|
+
import { style as buttonIconPlaceholderStyle } from "./ButtonIconPlaceholder.style";
|
|
4
|
+
const ButtonIconPlaceholder = () => {
|
|
5
|
+
const style = useMemo(() => buttonIconPlaceholderStyle(), []);
|
|
6
|
+
return React.createElement(View, { style: style.buttonIconPlaceholder });
|
|
7
|
+
};
|
|
5
8
|
export { ButtonIconPlaceholder };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space10 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
buttonIconPlaceholder: {
|
|
7
|
+
flexGrow: 0,
|
|
8
|
+
height: space10,
|
|
9
|
+
width: space10,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
};
|
|
11
13
|
export { style };
|
package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
import { Header } from "../Header";
|
|
6
7
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
|
-
import { style } from "./CheckoutHeader.style";
|
|
8
|
+
import { style as checkoutHeader } from "./CheckoutHeader.style";
|
|
8
9
|
const CheckoutHeader = ({ onBack }) => {
|
|
9
10
|
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
11
|
+
const style = useMemo(() => checkoutHeader(), []);
|
|
10
12
|
return (React.createElement(Header, { testID: "checkout-header" },
|
|
11
|
-
React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
13
|
+
React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
12
14
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
13
15
|
React.createElement(ButtonIconPlaceholder, null)));
|
|
14
16
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space10 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
button: {
|
|
7
|
+
alignSelf: "auto",
|
|
8
|
+
height: space10,
|
|
9
|
+
width: space10,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
};
|
|
11
13
|
export { style };
|
package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
import { Header } from "../Header";
|
|
6
7
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
|
-
import { style } from "./ItemDetailHeader.style";
|
|
8
|
+
import { style as itemDetailHeaderStyle } from "./ItemDetailHeader.style";
|
|
8
9
|
const ItemDetailHeader = ({ onBack }) => {
|
|
9
10
|
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
11
|
+
const style = useMemo(() => itemDetailHeaderStyle(), []);
|
|
10
12
|
return (React.createElement(Header, { testID: "item-detail-header" },
|
|
11
13
|
React.createElement(ButtonIconPlaceholder, null),
|
|
12
14
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
13
|
-
React.createElement(ButtonIcon, { name: "close", style: style.button, testID: "close-button-icon", onPress: onBack })));
|
|
15
|
+
React.createElement(ButtonIcon, { name: "close", style: { button: style.button }, testID: "close-button-icon", onPress: onBack })));
|
|
14
16
|
};
|
|
15
17
|
export { ItemDetailHeader };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space10 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
button: {
|
|
7
|
+
alignSelf: "auto",
|
|
8
|
+
height: space10,
|
|
9
|
+
width: space10,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
};
|
|
11
13
|
export { style };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { generatePath, useNavigate } from "react-router-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
6
7
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
8
|
import { Routes } from "../../../../routing/routes";
|
|
8
9
|
import { Header } from "../Header";
|
|
9
10
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
10
|
-
import style from "./ItemHeader.style";
|
|
11
|
+
import { style as itemHeaderStyle } from "./ItemHeader.style";
|
|
11
12
|
const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
13
|
+
const style = useMemo(() => itemHeaderStyle(), []);
|
|
12
14
|
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
13
15
|
const itemIndex = items.indexOf(item);
|
|
14
16
|
const isFirstItem = itemIndex === 0;
|
|
@@ -28,8 +30,8 @@ const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
|
28
30
|
navigate(generatePath(`${basePath}/${Routes.ITEM}`, { id: nextItem.id }));
|
|
29
31
|
}, [basePath, item.id, itemIndex, items, navigate, onNext]);
|
|
30
32
|
return (React.createElement(Header, { testID: "item-header" },
|
|
31
|
-
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
33
|
+
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
32
34
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
33
|
-
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: style.button, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
35
|
+
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: { button: style.button }, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
34
36
|
};
|
|
35
37
|
export { ItemHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space10 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
button: {
|
|
7
|
+
alignSelf: "auto",
|
|
8
|
+
height: space10,
|
|
9
|
+
width: space10,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export { style };
|
|
@@ -6,10 +6,12 @@ import { Notifications } from "@lookiero/sty-psp-notifications";
|
|
|
6
6
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
7
7
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
8
8
|
import { DOMAIN } from "../i18n/i18n";
|
|
9
|
-
const {
|
|
10
|
-
const
|
|
11
|
-
React.createElement(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const App = ({ children }) => {
|
|
10
|
+
const { colorBgBase } = theme();
|
|
11
|
+
return (React.createElement(SafeAreaProvider, null,
|
|
12
|
+
React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
|
|
13
|
+
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID, domain: DOMAIN, portalHostName: "Checkout" }),
|
|
14
|
+
React.createElement(PortalHost, { name: "Checkout" }),
|
|
15
|
+
children));
|
|
16
|
+
};
|
|
15
17
|
export { App };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { Platform, ScrollView, View } from "react-native";
|
|
3
3
|
import { useNavigate } from "react-router-native";
|
|
4
|
-
import { Box, Button, Layout as AuroraLayout, Spinner, Text
|
|
4
|
+
import { Box, Button, Layout as AuroraLayout, Spinner, Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
7
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
8
|
-
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
8
|
+
import { Sticky, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
9
9
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
10
10
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
11
11
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -21,14 +21,16 @@ import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
|
21
21
|
import { Routes } from "../../routing/routes";
|
|
22
22
|
import { ProductVariant } from "../shared/components/productVariant/ProductVariant";
|
|
23
23
|
import { Pricing } from "../summary/components/pricing/Pricing";
|
|
24
|
-
import { style } from "./Checkout.style";
|
|
24
|
+
import { style as checkoutStyle } from "./Checkout.style";
|
|
25
25
|
import { DeliveryBanner } from "./components/deliveryBanner/DeliveryBanner";
|
|
26
26
|
import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrument";
|
|
27
27
|
const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedirect, onCheckoutFlowSuccess, }) => {
|
|
28
28
|
const { customer: { customerId, country, segment }, basePath, } = useStaticInfo();
|
|
29
|
+
const screenSize = useScreenSize();
|
|
30
|
+
const isDektopScreen = screenSize === "L";
|
|
31
|
+
const style = useMemo(() => checkoutStyle(), []);
|
|
29
32
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_TITLE });
|
|
30
33
|
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
31
|
-
const { screen } = useDevice();
|
|
32
34
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
33
35
|
const handleOnPricingLayout = useCallback(({ height }) => setPricingHeight(height), []);
|
|
34
36
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
@@ -81,9 +83,9 @@ const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedire
|
|
|
81
83
|
} },
|
|
82
84
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "checkout-view" },
|
|
83
85
|
hasReplacedCheckoutItem && React.createElement(DeliveryBanner, null),
|
|
84
|
-
React.createElement(AuroraLayout, { fullWidth: !
|
|
85
|
-
React.createElement(Box, { size: { L: "2/3" }, style:
|
|
86
|
-
React.createElement(View, { style: [style.contentWrapper,
|
|
86
|
+
React.createElement(AuroraLayout, { fullWidth: !isDektopScreen, style: [isDektopScreen && style.desktopLayoutSpacing, !isDektopScreen && { paddingBottom: pricingHeight }] },
|
|
87
|
+
React.createElement(Box, { size: { L: "2/3" }, style: isDektopScreen && style.desktopListSpacing },
|
|
88
|
+
React.createElement(View, { style: [style.contentWrapper, isDektopScreen && style.desktopContentWrapper] },
|
|
87
89
|
country === Country.NL && (React.createElement(View, { style: style.paymentSelectorNL },
|
|
88
90
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))),
|
|
89
91
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
@@ -93,10 +95,10 @@ const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedire
|
|
|
93
95
|
: checkoutItem.productVariant.size })))),
|
|
94
96
|
country !== Country.NL && (React.createElement(View, { style: style.paymentSelector },
|
|
95
97
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))))),
|
|
96
|
-
React.createElement(Box, { size: { L: "1/3" }, style: [style.resume,
|
|
98
|
+
React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, isDektopScreen && style.desktopResume] }, pricing ? (React.createElement(View, { style: [style.princingWrapper, !isDektopScreen && style.princingWrapperSmall] },
|
|
97
99
|
React.createElement(Pricing, { pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0 }),
|
|
98
|
-
|
|
99
|
-
pricing && !
|
|
100
|
+
isDektopScreen ? (React.createElement(Button, { busy: checkoutFlowStatus === "loading", testID: "confirm-checkout-button", onPress: handleOnSubmit }, submitButtonText)) : null)) : null))),
|
|
101
|
+
pricing && !isDektopScreen ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
|
|
100
102
|
React.createElement(Body, null,
|
|
101
103
|
React.createElement(Button, { busy: checkoutFlowStatus === "loading", testID: "confirm-checkout-button", small: true, onPress: handleOnSubmit }, submitButtonText)))) : null,
|
|
102
104
|
paymentFlowComponent));
|
|
@@ -1,65 +1,67 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
4
|
+
const style = () => {
|
|
5
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
6
|
+
return StyleSheet.create({
|
|
7
|
+
contentWrapper: {
|
|
8
|
+
backgroundColor: colorBgBase,
|
|
9
|
+
flexGrow: 0,
|
|
10
|
+
paddingHorizontal: space6,
|
|
11
|
+
paddingVertical: space6,
|
|
12
|
+
},
|
|
13
|
+
desktopContentWrapper: {
|
|
14
|
+
borderRadius: borderRadius4,
|
|
15
|
+
paddingVertical: space12,
|
|
16
|
+
},
|
|
17
|
+
desktopLayoutSpacing: {
|
|
18
|
+
paddingVertical: space12,
|
|
19
|
+
},
|
|
20
|
+
desktopListSpacing: {
|
|
21
|
+
paddingRight: space16,
|
|
22
|
+
},
|
|
23
|
+
desktopResume: {
|
|
24
|
+
borderRadius: borderRadius4,
|
|
25
|
+
},
|
|
26
|
+
header: {
|
|
27
|
+
height: HEADER_HEIGHT,
|
|
28
|
+
},
|
|
29
|
+
paymentSelector: {
|
|
30
|
+
marginTop: space6,
|
|
31
|
+
},
|
|
32
|
+
paymentSelectorNL: {
|
|
33
|
+
marginBottom: space6,
|
|
34
|
+
},
|
|
35
|
+
princingWrapper: {
|
|
36
|
+
padding: space6,
|
|
37
|
+
},
|
|
38
|
+
princingWrapperSmall: {
|
|
39
|
+
backgroundColor: colorBgPrimaryLight,
|
|
40
|
+
paddingBottom: space2,
|
|
41
|
+
},
|
|
42
|
+
resume: {
|
|
43
|
+
overflow: "hidden",
|
|
44
|
+
backgroundColor: colorBgBase,
|
|
45
|
+
...Platform.select({
|
|
46
|
+
web: {
|
|
47
|
+
position: "sticky",
|
|
48
|
+
top: space12,
|
|
49
|
+
alignSelf: "flex-start",
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
},
|
|
54
|
+
scrollView: {
|
|
55
|
+
backgroundColor: colorBgPrimaryLight,
|
|
56
|
+
flex: 1,
|
|
57
|
+
},
|
|
58
|
+
sticky: {
|
|
59
|
+
paddingBottom: space4,
|
|
60
|
+
paddingTop: space3,
|
|
61
|
+
},
|
|
62
|
+
title: {
|
|
63
|
+
marginBottom: space4,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
};
|
|
65
67
|
export { style };
|
package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ALIGN, InfoBox, INFOBOX_TYPE
|
|
2
|
+
import { ALIGN, InfoBox, INFOBOX_TYPE } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
const DeliveryBanner = () => {
|
|
6
|
-
const
|
|
7
|
-
return (React.createElement(InfoBox, { contentAlign:
|
|
7
|
+
const screenSize = useScreenSize();
|
|
8
|
+
return (React.createElement(InfoBox, { contentAlign: screenSize === "L" ? ALIGN.CENTER : undefined, testID: "delivery-banner", text: useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_DELIVERY_BANNER }), type: INFOBOX_TYPE.SQUARED }));
|
|
8
9
|
};
|
|
9
10
|
export { DeliveryBanner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef } from "react";
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
2
|
import { Spinner } from "@lookiero/aurora";
|
|
3
3
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
@@ -14,13 +14,14 @@ import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
|
14
14
|
import { Body } from "../../components/layouts/body/Body";
|
|
15
15
|
import { CheckoutQuestionFeedbackProvider } from "../../components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionFeedback";
|
|
16
16
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
17
|
-
import { style } from "./Feedback.style";
|
|
17
|
+
import { style as feedbackStyle } from "./Feedback.style";
|
|
18
18
|
import { CheckoutQuestionsForm } from "./components/checkoutQuestionsForm/CheckoutQuestionsForm";
|
|
19
19
|
const Feedback = ({ layout: Layout }) => {
|
|
20
20
|
const logger = useLogger();
|
|
21
21
|
const screenSize = useScreenSize();
|
|
22
22
|
const isDesktop = screenSize === "L";
|
|
23
23
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
24
|
+
const style = useMemo(() => feedbackStyle(), []);
|
|
24
25
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
25
26
|
const [checkoutQuestions, checkoutQuestionsStatus] = useListCheckoutQuestionsByCheckoutId({
|
|
26
27
|
checkoutId: checkout?.id,
|