@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,18 +1,18 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { TouchableHighlight, View } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import { Modal
|
|
5
|
-
import { style } from "./SelectModal.style";
|
|
6
|
-
const { colorBgPrimaryLight } = theme();
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
|
+
import { Modal } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { style as modalStyle } from "./SelectModal.style";
|
|
7
6
|
const SelectModal = ({ modalVisible, options, style: customStyle, testID, title, value, portalHostName, onChange = () => void 0, onClose = () => void 0, }) => {
|
|
8
7
|
const handleOnPressOption = useCallback((value) => {
|
|
9
8
|
onChange(value);
|
|
10
9
|
onClose();
|
|
11
10
|
}, [onClose, onChange]);
|
|
11
|
+
const style = useMemo(() => modalStyle(), []);
|
|
12
12
|
return (React.createElement(Modal, { portalHostName: portalHostName, testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
13
13
|
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
|
|
14
14
|
title && (React.createElement(Text, { level: 3, style: style.modalTitle, heading: true }, title)),
|
|
15
|
-
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, accessibilityLabel: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], testID: optionValue, underlayColor:
|
|
16
|
-
React.createElement(Text, {
|
|
15
|
+
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, accessibilityLabel: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], testID: optionValue, underlayColor: style.underlayColor, accessible: true, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
16
|
+
React.createElement(Text, { level: 3, style: [style.optionText, value === optionValue && style.textActive, customStyle?.optionText] }, label)))))));
|
|
17
17
|
};
|
|
18
18
|
export { SelectModal };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const style: {
|
|
1
|
+
declare const style: () => {
|
|
2
|
+
underlayColor: string;
|
|
2
3
|
modalContent: {
|
|
3
4
|
paddingBottom: number;
|
|
4
5
|
paddingHorizontal: number;
|
|
@@ -14,5 +15,8 @@ declare const style: {
|
|
|
14
15
|
optionText: {
|
|
15
16
|
lineHeight: number;
|
|
16
17
|
};
|
|
18
|
+
textActive: {
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
17
21
|
};
|
|
18
22
|
export { style };
|
|
@@ -1,21 +1,30 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { borderWidth1, colorBgPrimaryLight, colorBorderInteractive, colorTextMedium, space1, space5, space6 } = theme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
modalContent: {
|
|
7
|
+
paddingBottom: space6,
|
|
8
|
+
paddingHorizontal: space6,
|
|
9
|
+
},
|
|
10
|
+
modalTitle: {
|
|
11
|
+
marginBottom: space1,
|
|
12
|
+
},
|
|
13
|
+
option: {
|
|
14
|
+
borderBottomColor: colorBorderInteractive,
|
|
15
|
+
borderBottomWidth: borderWidth1,
|
|
16
|
+
paddingVertical: space5,
|
|
17
|
+
},
|
|
18
|
+
optionText: {
|
|
19
|
+
lineHeight: space6,
|
|
20
|
+
},
|
|
21
|
+
textActive: {
|
|
22
|
+
color: colorTextMedium,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
...styles,
|
|
27
|
+
underlayColor: colorBgPrimaryLight,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
21
30
|
export { style };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Button, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
|
-
import { style } from "./SizeWithoutStockModal.style";
|
|
7
|
+
import { style as sizeWithoutStockModalStyle } from "./SizeWithoutStockModal.style";
|
|
8
8
|
const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
9
9
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
10
10
|
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
11
11
|
const buttonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
12
|
+
const style = useMemo(() => sizeWithoutStockModalStyle(), []);
|
|
12
13
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
13
14
|
React.createElement(View, { style: style.modalContent },
|
|
14
15
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
@@ -1,18 +1,20 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space1, space6, colorTextMedium } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
description: {
|
|
7
|
+
color: colorTextMedium,
|
|
8
|
+
marginBottom: space6,
|
|
9
|
+
width: "100%",
|
|
10
|
+
},
|
|
11
|
+
modalContent: {
|
|
12
|
+
paddingHorizontal: space6,
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
marginBottom: space1,
|
|
16
|
+
width: "100%",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
};
|
|
18
20
|
export { style };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Spinner } from "@lookiero/aurora";
|
|
4
4
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
@@ -13,8 +13,9 @@ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
|
13
13
|
import { CustomerDecissionBanner, } from "../../components/banner/CustomerDecissionBanner";
|
|
14
14
|
import { ReturnQuestionsFeedback } from "../../components/returnQuestionsFeedback/ReturnQuestionsFeedback";
|
|
15
15
|
import { ProductVariant } from "../../views/productVariant/ProductVariant";
|
|
16
|
-
import { style } from "./ItemWithCustomerDecission.style";
|
|
16
|
+
import { style as itemWithCustomerDecissionStyle } from "./ItemWithCustomerDecission.style";
|
|
17
17
|
const ItemWithCustomerDecission = ({ checkoutId, checkoutItem, returnQuestions, currentProductVariant, onEditFeedback, }) => {
|
|
18
|
+
const style = useMemo(() => itemWithCustomerDecissionStyle(), []);
|
|
18
19
|
const screenSize = useScreenSize();
|
|
19
20
|
const isMobile = screenSize === "S";
|
|
20
21
|
const logger = useLogger();
|
|
@@ -1,20 +1,22 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { borderWidth1, colorBorderInput, space6 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
justifyContent: "flex-start",
|
|
8
|
+
paddingBottom: space6,
|
|
9
|
+
paddingHorizontal: 0,
|
|
10
|
+
},
|
|
11
|
+
feedbackContainer: {
|
|
12
|
+
borderTopColor: colorBorderInput,
|
|
13
|
+
borderTopWidth: borderWidth1,
|
|
14
|
+
marginTop: space6,
|
|
15
|
+
paddingTop: space6,
|
|
16
|
+
},
|
|
17
|
+
feedbackContainerMobile: {
|
|
18
|
+
paddingHorizontal: space6,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
20
22
|
export { style };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React, { useCallback, useState } from "react";
|
|
1
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { Platform, ScrollView } from "react-native";
|
|
3
3
|
import { Spinner } from "@lookiero/aurora";
|
|
4
4
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
5
5
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
6
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
7
6
|
import "../../../../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
|
|
8
7
|
import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/useKeepCheckoutItem";
|
|
9
8
|
import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
|
|
@@ -15,11 +14,11 @@ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
|
15
14
|
import { ItemActions } from "../../components/itemActions/ItemActions";
|
|
16
15
|
import { SizeWithoutStockModal } from "../../components/sizeWithoutStockModal/SizeWithoutStockModal";
|
|
17
16
|
import { ProductVariant } from "../productVariant/ProductVariant";
|
|
18
|
-
import { style } from "./ItemWithoutCustomerDecission.style";
|
|
19
|
-
const { space6 } = theme();
|
|
17
|
+
import { style as itemWithoutCustomerDecissionStyle } from "./ItemWithoutCustomerDecission.style";
|
|
20
18
|
const ItemWithoutCustomerDecission = ({ checkoutId, checkoutItem, bookedProductsVariants, currentProductVariant, onReturn, }) => {
|
|
21
19
|
const logger = useLogger();
|
|
22
20
|
const { customer: { country, segment }, } = useStaticInfo();
|
|
21
|
+
const style = useMemo(() => itemWithoutCustomerDecissionStyle(), []);
|
|
23
22
|
/* KeepCheckoutItem */
|
|
24
23
|
const [keepCheckoutItem, keepCheckoutItemStatus] = useKeepCheckoutItem({ checkoutItemId: checkoutItem.id, logger });
|
|
25
24
|
const trackKeepItem = useTrackKeepItem({
|
|
@@ -65,7 +64,9 @@ const ItemWithoutCustomerDecission = ({ checkoutId, checkoutItem, bookedProducts
|
|
|
65
64
|
React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
|
|
66
65
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: checkoutItem.id },
|
|
67
66
|
React.createElement(Body, { style: { row: style.container } },
|
|
68
|
-
React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, segment: segment, style: {
|
|
67
|
+
React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, segment: segment, style: {
|
|
68
|
+
content: { paddingBottom: Platform.OS === "web" ? style.productVariantPaddingBottom : stickyHeight },
|
|
69
|
+
} }))),
|
|
69
70
|
React.createElement(ItemActions, { country: country, currentProductVariant: currentProductVariant, productVariants: bookedProductsVariants?.productVariants, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: onReturn, onShowSizeWithoutStockModal: handleOnShowSizeWithoutStockModal })));
|
|
70
71
|
};
|
|
71
72
|
export { ItemWithoutCustomerDecission };
|
|
@@ -1,10 +1,16 @@
|
|
|
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
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space6, space10 } = theme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
paddingBottom: space10,
|
|
8
|
+
paddingHorizontal: 0,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
...styles,
|
|
13
|
+
productVariantPaddingBottom: space6,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
export { style };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect } from "react";
|
|
1
|
+
import React, { useCallback, useEffect, useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
4
4
|
import { MediaPerspective, } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
@@ -6,10 +6,11 @@ import { TrackingPage } from "../../../../../tracking/tracking";
|
|
|
6
6
|
import { useTrackImageView } from "../../../../../tracking/useTrackImageView";
|
|
7
7
|
import { ProductVariantDescription } from "../../components/productVariantDescription/ProductVariantDescription";
|
|
8
8
|
import { ProductVariantSlider } from "../../components/productVariantSlider/ProductVariantSlider";
|
|
9
|
-
import { style } from "./ProductVariant.style";
|
|
9
|
+
import { style as productVariantStyle } from "./ProductVariant.style";
|
|
10
10
|
const ProductVariant = ({ country, segment, checkoutId, checkoutItem, currentProductVariant, style: customStyle, children, customerDecissionBanner, }) => {
|
|
11
11
|
const screenSize = useScreenSize();
|
|
12
12
|
const isDesktopScreen = screenSize !== "S";
|
|
13
|
+
const style = useMemo(() => productVariantStyle(), []);
|
|
13
14
|
const trackImageView = useTrackImageView({
|
|
14
15
|
page: TrackingPage.ITEM,
|
|
15
16
|
country,
|
|
@@ -1,18 +1,20 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { space6, space12, colorBgBase, borderRadius4 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
backgroundColor: colorBgBase,
|
|
8
|
+
},
|
|
9
|
+
content: {
|
|
10
|
+
paddingVertical: space6,
|
|
11
|
+
},
|
|
12
|
+
largeContainer: {
|
|
13
|
+
borderRadius: borderRadius4,
|
|
14
|
+
marginTop: space12,
|
|
15
|
+
padding: space12,
|
|
16
|
+
paddingBottom: 0,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
};
|
|
18
20
|
export { style };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
5
5
|
import { DOMAIN } from "../../../../i18n/i18n";
|
|
6
|
-
import { style } from "./Price.style";
|
|
6
|
+
import { style as priceStyle } from "./Price.style";
|
|
7
7
|
const Price = ({ price, withPercentage = false }) => {
|
|
8
8
|
const isDiscounted = price.discountedPrice && price.discountedPrice.percentage > 0;
|
|
9
9
|
const productPrice = useI18nNumber({
|
|
@@ -19,6 +19,7 @@ const Price = ({ price, withPercentage = false }) => {
|
|
|
19
19
|
currency: price.currency,
|
|
20
20
|
});
|
|
21
21
|
const priceValue = isDiscounted ? productDiscountedPrice : productPrice;
|
|
22
|
+
const style = useMemo(() => priceStyle(), []);
|
|
22
23
|
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
23
24
|
isDiscounted && (React.createElement(Text, { level: 1, style: style.discountedPriceText, testID: "discounted-price-text", detail: true, lineThrough: true }, productPrice)),
|
|
24
25
|
React.createElement(View, { style: style.discountedPriceInfo },
|
|
@@ -1,19 +1,21 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorTextError, colorTextMedium, space2 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
discountedPercentage: {
|
|
7
|
+
color: colorTextError,
|
|
8
|
+
},
|
|
9
|
+
discountedPriceInfo: {
|
|
10
|
+
alignItems: "flex-end",
|
|
11
|
+
marginLeft: space2,
|
|
12
|
+
},
|
|
13
|
+
discountedPriceText: {
|
|
14
|
+
color: colorTextMedium,
|
|
15
|
+
},
|
|
16
|
+
price: {
|
|
17
|
+
flexDirection: "row",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
};
|
|
19
21
|
export { style };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Image } from "react-native";
|
|
3
|
-
import {
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Image, View } from "react-native";
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import { Column, Row } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { Column, Row, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
8
8
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
9
|
import { Price } from "../price/Price";
|
|
10
|
-
import { IMAGE_SIZE, style } from "./ProductVariantPreview.style";
|
|
10
|
+
import { IMAGE_SIZE, style as productVariantPreviewStyle } from "./ProductVariantPreview.style";
|
|
11
11
|
const ProductVariantPreview = ({ item, country }) => {
|
|
12
12
|
const cdnImageUrl = useMediaImage();
|
|
13
|
-
const
|
|
13
|
+
const screenSize = useScreenSize();
|
|
14
14
|
const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
|
|
15
15
|
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
16
16
|
const { productVariant: { media, brand, name, size: sizeProjection }, price, } = item;
|
|
17
17
|
const mainImage = media.find((mediaElement) => mediaElement.perspective === "MAIN");
|
|
18
|
-
|
|
18
|
+
const style = useMemo(() => productVariantPreviewStyle(), []);
|
|
19
|
+
return (React.createElement(View, { style: [style.wrapper, screenSize === "S" && style.mobileWrapper], testID: "product-variant-preview" },
|
|
19
20
|
React.createElement(Row, { style: style.row },
|
|
20
21
|
React.createElement(Column, { size: { M: "2/3", L: "2/3" }, style: style.content },
|
|
21
22
|
mainImage && (React.createElement(Image, { resizeMode: "stretch", style: style.image, testID: "product-variant-image", source: {
|
|
@@ -25,9 +26,9 @@ const ProductVariantPreview = ({ item, country }) => {
|
|
|
25
26
|
}),
|
|
26
27
|
} })),
|
|
27
28
|
React.createElement(View, { style: style.info },
|
|
28
|
-
React.createElement(Text, {
|
|
29
|
+
React.createElement(Text, { level: 2, style: style.text, detail: true }, brand),
|
|
29
30
|
React.createElement(Text, { level: 2, detail: true }, name),
|
|
30
|
-
React.createElement(Text, {
|
|
31
|
+
React.createElement(Text, { level: 2, style: style.text, detail: true }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)),
|
|
31
32
|
React.createElement(View, { style: style.price },
|
|
32
33
|
React.createElement(Price, { price: price, withPercentage: true }))))));
|
|
33
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const IMAGE_SIZE = 35;
|
|
2
|
-
declare const style: {
|
|
2
|
+
declare const style: () => {
|
|
3
3
|
content: {
|
|
4
4
|
flexDirection: "row";
|
|
5
5
|
};
|
|
@@ -22,6 +22,9 @@ declare const style: {
|
|
|
22
22
|
flex: number;
|
|
23
23
|
justifyContent: "center";
|
|
24
24
|
};
|
|
25
|
+
text: {
|
|
26
|
+
color: string;
|
|
27
|
+
};
|
|
25
28
|
wrapper: {
|
|
26
29
|
backgroundColor: string;
|
|
27
30
|
flexDirection: "row";
|
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { borderRadius2, borderWidth1, colorBgBase, colorBorderInput, space2, space4 } = theme();
|
|
4
3
|
const IMAGE_SIZE = 35;
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
4
|
+
const style = () => {
|
|
5
|
+
const { borderRadius2, borderWidth1, colorBgBase, colorBorderInput, colorTextMedium, space2, space4 } = theme();
|
|
6
|
+
return StyleSheet.create({
|
|
7
|
+
content: {
|
|
8
|
+
flexDirection: "row",
|
|
9
|
+
},
|
|
10
|
+
image: {
|
|
11
|
+
borderRadius: borderRadius2,
|
|
12
|
+
width: IMAGE_SIZE,
|
|
13
|
+
},
|
|
14
|
+
info: {
|
|
15
|
+
flex: 1,
|
|
16
|
+
marginLeft: space2,
|
|
17
|
+
},
|
|
18
|
+
mobileWrapper: {
|
|
19
|
+
borderBottomWidth: borderWidth1,
|
|
20
|
+
borderColor: colorBorderInput,
|
|
21
|
+
},
|
|
22
|
+
price: {
|
|
23
|
+
justifyContent: "flex-end",
|
|
24
|
+
},
|
|
25
|
+
row: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
justifyContent: "center",
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
color: colorTextMedium,
|
|
31
|
+
},
|
|
32
|
+
wrapper: {
|
|
33
|
+
backgroundColor: colorBgBase,
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
padding: space4,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
};
|
|
34
39
|
export { style, IMAGE_SIZE };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
|
-
import { Platform } from "react-native";
|
|
3
|
+
import { Platform, View } from "react-native";
|
|
4
4
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
5
5
|
import { generatePath, useNavigate } from "react-router-native";
|
|
6
|
-
import { Box, Button, Layout as AuroraLayout, Spinner, Text
|
|
6
|
+
import { Box, Button, Layout as AuroraLayout, Spinner, Text } from "@lookiero/aurora";
|
|
7
7
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
8
8
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
9
9
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
10
|
+
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
10
11
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
11
12
|
import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
|
|
12
13
|
import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
|
|
@@ -28,7 +29,7 @@ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
|
28
29
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
29
30
|
import { Routes } from "../../../../routing/routes";
|
|
30
31
|
import { ProductVariantPreview } from "../productVariantPreview/ProductVariantPreview";
|
|
31
|
-
import { style } from "./ReturnQuestionsForm.style";
|
|
32
|
+
import { style as returnQuestionsFormStyle } from "./ReturnQuestionsForm.style";
|
|
32
33
|
const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
|
|
33
34
|
const returnQuestionItems = {
|
|
34
35
|
[ReturnQuestionType.HOST_DEFAULT]: HostDefaultReturnQuestionItem,
|
|
@@ -42,7 +43,10 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
42
43
|
const navigate = useNavigate();
|
|
43
44
|
const { basePath } = useStaticInfo();
|
|
44
45
|
const logger = useLogger();
|
|
45
|
-
const
|
|
46
|
+
const screenSize = useScreenSize();
|
|
47
|
+
const isDektopScreen = screenSize === "L";
|
|
48
|
+
const isMobileScreen = screenSize === "S";
|
|
49
|
+
const style = useMemo(() => returnQuestionsFormStyle(), []);
|
|
46
50
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
47
51
|
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
48
52
|
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
@@ -88,7 +92,7 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
88
92
|
navigate(generatePath(`${basePath}/${Routes.ITEM}`, { id: nextItem.id }));
|
|
89
93
|
}, [basePath, checkout.items, checkoutItem, feedback, navigate, returnCheckoutItem, trackPressNext, trackReturnItem]);
|
|
90
94
|
const header = useMemo(() => (React.createElement(Box, { style: style.headerWrapper },
|
|
91
|
-
React.createElement(ItemDetailHeader, { onBack: handleOnBack }))), [handleOnBack]);
|
|
95
|
+
React.createElement(ItemDetailHeader, { onBack: handleOnBack }))), [handleOnBack, style.headerWrapper]);
|
|
92
96
|
const dependenciesLoaded = checkoutItem && returnQuestions && returnCheckoutItemStatus !== CommandStatus.LOADING;
|
|
93
97
|
if (!dependenciesLoaded) {
|
|
94
98
|
return React.createElement(Spinner, null);
|
|
@@ -103,13 +107,13 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
103
107
|
React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
|
|
104
108
|
React.createElement(KeyboardAwareScrollView, { extraScrollHeight: Platform.OS === "android" ? 10 : 120, keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, testID: "return-questions-form" },
|
|
105
109
|
React.createElement(View, { style: style.background },
|
|
106
|
-
React.createElement(AuroraLayout, { fullWidth: !
|
|
110
|
+
React.createElement(AuroraLayout, { fullWidth: !isDektopScreen, style: [style.layout, isDektopScreen ? style.desktopLayoutSpacing : undefined] },
|
|
107
111
|
React.createElement(Box, { size: { L: "2/3" } },
|
|
108
|
-
React.createElement(View, { style: [style.info, !
|
|
112
|
+
React.createElement(View, { style: [style.info, !isMobileScreen && style.desktopInfo] },
|
|
109
113
|
React.createElement(Text, { level: 3, heading: true }, titleText),
|
|
110
114
|
React.createElement(Text, { level: 1, style: style.description, detail: true }, descriptionText)),
|
|
111
115
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
112
|
-
React.createElement(View, { style: [style.submit, !
|
|
116
|
+
React.createElement(View, { style: [style.submit, !isMobileScreen && style.submitDesktop] },
|
|
113
117
|
React.createElement(Button, { testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText)))))))));
|
|
114
118
|
};
|
|
115
119
|
export { ReturnQuestionsForm };
|