@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
package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
2
|
import React, { FC, 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 { Country } from "@lookiero/sty-psp-locale";
|
|
10
10
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
11
11
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
12
|
-
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
12
|
+
import { Layout as UiLayout, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
13
13
|
import { CheckoutProjection } from "../../../../../../projection/checkout/checkout";
|
|
14
14
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
15
15
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
@@ -36,7 +36,7 @@ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
|
36
36
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
37
37
|
import { Routes } from "../../../../routing/routes";
|
|
38
38
|
import { ProductVariantPreview } from "../productVariantPreview/ProductVariantPreview";
|
|
39
|
-
import { style } from "./ReturnQuestionsForm.style";
|
|
39
|
+
import { style as returnQuestionsFormStyle } from "./ReturnQuestionsForm.style";
|
|
40
40
|
|
|
41
41
|
const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
|
|
42
42
|
|
|
@@ -67,8 +67,11 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
67
67
|
const navigate = useNavigate();
|
|
68
68
|
const { basePath } = useStaticInfo();
|
|
69
69
|
const logger = useLogger();
|
|
70
|
+
const screenSize = useScreenSize();
|
|
71
|
+
const isDektopScreen = screenSize === "L";
|
|
72
|
+
const isMobileScreen = screenSize === "S";
|
|
70
73
|
|
|
71
|
-
const
|
|
74
|
+
const style = useMemo(() => returnQuestionsFormStyle(), []);
|
|
72
75
|
|
|
73
76
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
74
77
|
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
@@ -129,7 +132,7 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
129
132
|
<ItemDetailHeader onBack={handleOnBack} />
|
|
130
133
|
</Box>
|
|
131
134
|
),
|
|
132
|
-
[handleOnBack],
|
|
135
|
+
[handleOnBack, style.headerWrapper],
|
|
133
136
|
);
|
|
134
137
|
|
|
135
138
|
const dependenciesLoaded = checkoutItem && returnQuestions && returnCheckoutItemStatus !== CommandStatus.LOADING;
|
|
@@ -162,11 +165,11 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
162
165
|
>
|
|
163
166
|
<View style={style.background}>
|
|
164
167
|
<AuroraLayout
|
|
165
|
-
fullWidth={!
|
|
166
|
-
style={[style.layout,
|
|
168
|
+
fullWidth={!isDektopScreen}
|
|
169
|
+
style={[style.layout, isDektopScreen ? style.desktopLayoutSpacing : undefined]}
|
|
167
170
|
>
|
|
168
171
|
<Box size={{ L: "2/3" }}>
|
|
169
|
-
<View style={[style.info, !
|
|
172
|
+
<View style={[style.info, !isMobileScreen && style.desktopInfo]}>
|
|
170
173
|
<Text level={3} heading>
|
|
171
174
|
{titleText}
|
|
172
175
|
</Text>
|
|
@@ -180,7 +183,7 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
180
183
|
returnQuestions={returnQuestions}
|
|
181
184
|
/>
|
|
182
185
|
|
|
183
|
-
<View style={[style.submit, !
|
|
186
|
+
<View style={[style.submit, !isMobileScreen && style.submitDesktop]}>
|
|
184
187
|
<Button testID="return-questions-button" onPress={handleOnSubmit}>
|
|
185
188
|
{submitButtonText}
|
|
186
189
|
</Button>
|
package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts
CHANGED
|
@@ -1,58 +1,64 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
|
|
4
|
-
const {
|
|
5
|
-
colorBgSurface,
|
|
6
|
-
borderRadius3,
|
|
7
|
-
borderRadiusFull,
|
|
8
|
-
borderWidth2,
|
|
9
|
-
colorBorderInput,
|
|
10
|
-
colorBgPrimaryLight,
|
|
11
|
-
space05,
|
|
12
|
-
space1,
|
|
13
|
-
space2,
|
|
14
|
-
space4,
|
|
15
|
-
} = theme();
|
|
16
|
-
|
|
17
4
|
const IMAGE_WIDTH = 104;
|
|
18
5
|
const IMAGE_HEIGHT = 132;
|
|
19
6
|
|
|
20
|
-
const style =
|
|
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
|
-
|
|
7
|
+
const style = () => {
|
|
8
|
+
const {
|
|
9
|
+
borderRadius3,
|
|
10
|
+
borderRadiusFull,
|
|
11
|
+
borderWidth2,
|
|
12
|
+
colorBgPrimaryLight,
|
|
13
|
+
colorBgSurface,
|
|
14
|
+
colorBorderInput,
|
|
15
|
+
colorTextMedium,
|
|
16
|
+
space05,
|
|
17
|
+
space1,
|
|
18
|
+
space2,
|
|
19
|
+
space4,
|
|
20
|
+
} = theme();
|
|
21
|
+
|
|
22
|
+
return StyleSheet.create({
|
|
23
|
+
container: {
|
|
24
|
+
alignItems: "flex-end",
|
|
25
|
+
borderBottomColor: colorBgPrimaryLight,
|
|
26
|
+
borderBottomWidth: 1,
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
justifyContent: "space-between",
|
|
29
|
+
paddingVertical: space4,
|
|
30
|
+
},
|
|
31
|
+
descriptionContainer: {
|
|
32
|
+
alignSelf: "stretch",
|
|
33
|
+
justifyContent: "space-between",
|
|
34
|
+
marginLeft: space2,
|
|
35
|
+
},
|
|
36
|
+
infoProductVariant: {
|
|
37
|
+
alignItems: "flex-start",
|
|
38
|
+
},
|
|
39
|
+
media: {
|
|
40
|
+
borderColor: colorBorderInput,
|
|
41
|
+
borderRadius: borderRadius3,
|
|
42
|
+
borderWidth: borderWidth2,
|
|
43
|
+
height: IMAGE_HEIGHT,
|
|
44
|
+
width: IMAGE_WIDTH,
|
|
45
|
+
},
|
|
46
|
+
row: {
|
|
47
|
+
alignItems: "flex-end",
|
|
48
|
+
flexDirection: "row",
|
|
49
|
+
},
|
|
50
|
+
sizeChange: {
|
|
51
|
+
backgroundColor: colorBgSurface,
|
|
52
|
+
borderRadius: borderRadiusFull,
|
|
53
|
+
marginTop: space4,
|
|
54
|
+
paddingBottom: space05,
|
|
55
|
+
paddingHorizontal: space2,
|
|
56
|
+
paddingTop: space1,
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
color: colorTextMedium,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
};
|
|
57
63
|
|
|
58
64
|
export { style, IMAGE_WIDTH };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { FC } from "react";
|
|
1
|
+
import React, { FC, useMemo } from "react";
|
|
2
2
|
import { ImageStyle, Pressable, StyleProp, View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
6
|
-
import { LazyImage } from "@lookiero/sty-psp-ui";
|
|
6
|
+
import { Icon, LazyImage } from "@lookiero/sty-psp-ui";
|
|
7
7
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
8
8
|
import { ColorProjection, MediaProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
9
9
|
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
@@ -11,7 +11,7 @@ import { size, SizeProjection } from "../../../../../../projection/size/size";
|
|
|
11
11
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
12
12
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
13
13
|
import { COLOR_I18N_PREFIX, DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
14
|
-
import { IMAGE_WIDTH, style } from "./ProductVariant.style";
|
|
14
|
+
import { IMAGE_WIDTH, style as productVariantStyle } from "./ProductVariant.style";
|
|
15
15
|
|
|
16
16
|
interface ProductVariantStyle {
|
|
17
17
|
readonly image: StyleProp<ImageStyle>;
|
|
@@ -47,6 +47,8 @@ const ProductVariant: FC<ProductVariantProps> = ({
|
|
|
47
47
|
|
|
48
48
|
const cdnImageUrl = useMediaImage();
|
|
49
49
|
|
|
50
|
+
const style = useMemo(() => productVariantStyle(), []);
|
|
51
|
+
|
|
50
52
|
return (
|
|
51
53
|
<Pressable
|
|
52
54
|
pointerEvents={onPress ? "auto" : "none"}
|
|
@@ -67,13 +69,13 @@ const ProductVariant: FC<ProductVariantProps> = ({
|
|
|
67
69
|
|
|
68
70
|
<View style={style.descriptionContainer}>
|
|
69
71
|
<View style={style.infoProductVariant}>
|
|
70
|
-
<Text
|
|
72
|
+
<Text level={2} style={style.text} detail>
|
|
71
73
|
{brand}
|
|
72
74
|
</Text>
|
|
73
75
|
<Text level={2} detail>
|
|
74
76
|
{name}
|
|
75
77
|
</Text>
|
|
76
|
-
<Text
|
|
78
|
+
<Text level={2} style={style.text} detail>
|
|
77
79
|
{sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })} / {colorLabel}
|
|
78
80
|
</Text>
|
|
79
81
|
|
|
@@ -339,10 +339,19 @@ exports[`ProductVariant component matches the snapshot for a non-unique size: no
|
|
|
339
339
|
"fontStyle": "normal",
|
|
340
340
|
"fontWeight": "normal",
|
|
341
341
|
"height": 24,
|
|
342
|
+
"letterSpacing": -0.2,
|
|
343
|
+
"lineHeight": 24,
|
|
344
|
+
"minHeight": 24,
|
|
345
|
+
"minWidth": 24,
|
|
346
|
+
"paddingBottom": 0,
|
|
347
|
+
"paddingLeft": 0,
|
|
348
|
+
"paddingRight": 0,
|
|
349
|
+
"paddingTop": 0,
|
|
342
350
|
"width": 24,
|
|
343
351
|
},
|
|
344
352
|
]
|
|
345
353
|
}
|
|
354
|
+
testID="icon"
|
|
346
355
|
>
|
|
347
356
|
|
|
348
357
|
</Text>
|
|
@@ -689,10 +698,19 @@ exports[`ProductVariant component matches the snapshot for an unique size: uniqu
|
|
|
689
698
|
"fontStyle": "normal",
|
|
690
699
|
"fontWeight": "normal",
|
|
691
700
|
"height": 24,
|
|
701
|
+
"letterSpacing": -0.2,
|
|
702
|
+
"lineHeight": 24,
|
|
703
|
+
"minHeight": 24,
|
|
704
|
+
"minWidth": 24,
|
|
705
|
+
"paddingBottom": 0,
|
|
706
|
+
"paddingLeft": 0,
|
|
707
|
+
"paddingRight": 0,
|
|
708
|
+
"paddingTop": 0,
|
|
692
709
|
"width": 24,
|
|
693
710
|
},
|
|
694
711
|
]
|
|
695
712
|
}
|
|
713
|
+
testID="icon"
|
|
696
714
|
>
|
|
697
715
|
|
|
698
716
|
</Text>
|
|
@@ -2,88 +2,90 @@ import { Platform, StyleSheet } from "react-native";
|
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
4
|
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
const style = () => {
|
|
6
|
+
const {
|
|
7
|
+
colorTextMedium,
|
|
8
|
+
colorText,
|
|
9
|
+
colorBgPrimaryLight,
|
|
10
|
+
space2,
|
|
11
|
+
space3,
|
|
12
|
+
space4,
|
|
13
|
+
space6,
|
|
14
|
+
space12,
|
|
15
|
+
space16,
|
|
16
|
+
borderRadius4,
|
|
17
|
+
colorBgBase,
|
|
18
|
+
} = theme();
|
|
18
19
|
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
});
|
|
20
|
+
return StyleSheet.create({
|
|
21
|
+
contentWrapper: {
|
|
22
|
+
backgroundColor: colorBgBase,
|
|
23
|
+
flexGrow: 0,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
color: colorTextMedium,
|
|
27
|
+
marginBottom: space6,
|
|
28
|
+
},
|
|
29
|
+
desktopContentWrapper: {
|
|
30
|
+
borderRadius: borderRadius4,
|
|
31
|
+
paddingHorizontal: space6,
|
|
32
|
+
paddingVertical: space12,
|
|
33
|
+
},
|
|
34
|
+
desktopLayoutSpacing: {
|
|
35
|
+
paddingVertical: space12,
|
|
36
|
+
},
|
|
37
|
+
desktopListSpacing: {
|
|
38
|
+
paddingRight: space16,
|
|
39
|
+
},
|
|
40
|
+
desktopResume: {
|
|
41
|
+
borderRadius: borderRadius4,
|
|
42
|
+
},
|
|
43
|
+
header: {
|
|
44
|
+
height: HEADER_HEIGHT,
|
|
45
|
+
},
|
|
46
|
+
mobileInfo: {
|
|
47
|
+
paddingHorizontal: space6,
|
|
48
|
+
paddingTop: space6,
|
|
49
|
+
},
|
|
50
|
+
mobileResume: {
|
|
51
|
+
shadowColor: colorText,
|
|
52
|
+
shadowOpacity: 0.15,
|
|
53
|
+
...Platform.select({
|
|
54
|
+
web: {
|
|
55
|
+
shadowOffset: { width: 0, height: 8 },
|
|
56
|
+
shadowRadius: 18,
|
|
57
|
+
elevation: 0.5,
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
|
+
} as any,
|
|
62
|
+
princingWrapper: {
|
|
63
|
+
padding: space6,
|
|
64
|
+
},
|
|
65
|
+
resume: {
|
|
66
|
+
overflow: "hidden",
|
|
67
|
+
backgroundColor: colorBgBase,
|
|
68
|
+
...Platform.select({
|
|
69
|
+
web: {
|
|
70
|
+
position: "sticky",
|
|
71
|
+
top: space12,
|
|
72
|
+
alignSelf: "flex-start",
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
|
+
} as any,
|
|
77
|
+
scrollView: {
|
|
78
|
+
backgroundColor: colorBgPrimaryLight,
|
|
79
|
+
flex: 1,
|
|
80
|
+
},
|
|
81
|
+
sticky: {
|
|
82
|
+
paddingBottom: space4,
|
|
83
|
+
paddingTop: space3,
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
marginBottom: space2,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
};
|
|
88
90
|
|
|
89
91
|
export { style };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { FC, ReactNode, useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
import { LayoutRectangle, Platform, ScrollView, View } from "react-native";
|
|
3
3
|
import { generatePath, useMatch, useNavigate } from "react-router-native";
|
|
4
|
-
import { Box, Text, Layout as AuroraLayout,
|
|
4
|
+
import { Box, Text, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
7
|
+
import { Layout as UiLayout, Sticky, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
@@ -18,7 +18,7 @@ import { Body } from "../../components/layouts/body/Body";
|
|
|
18
18
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
19
19
|
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
20
20
|
import { Routes } from "../../routing/routes";
|
|
21
|
-
import { style } from "./Summary.style";
|
|
21
|
+
import { style as summaryStyle } from "./Summary.style";
|
|
22
22
|
import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
|
|
23
23
|
|
|
24
24
|
interface SummaryProps {
|
|
@@ -31,19 +31,23 @@ const Summary: FC<SummaryProps> = ({ layout: Layout, children }) => {
|
|
|
31
31
|
customer: { customerId, country, segment },
|
|
32
32
|
basePath,
|
|
33
33
|
} = useStaticInfo();
|
|
34
|
+
const screenSize = useScreenSize();
|
|
35
|
+
const isDesktopScreen = screenSize === "L";
|
|
36
|
+
|
|
37
|
+
const style = useMemo(() => summaryStyle(), []);
|
|
38
|
+
|
|
34
39
|
const [pricingCollapsed, setPricingCollapsed] = useState(true);
|
|
35
40
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
41
|
+
|
|
36
42
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TITLE });
|
|
37
43
|
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_DESCRIPTION });
|
|
38
44
|
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_SUBMIT_BUTTON });
|
|
39
|
-
const { screen } = useDevice();
|
|
40
45
|
|
|
41
46
|
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
42
47
|
const [pricing, pricingStatus] = useViewPricingByCheckoutId({ checkoutId: checkout?.id as string });
|
|
43
48
|
const [fiveItemsDiscount = 0, fiveItemsDiscountStatus] = useViewFiveItemsDiscountByCustomerId({ customerId });
|
|
44
49
|
|
|
45
50
|
const navigate = useNavigate();
|
|
46
|
-
|
|
47
51
|
const match = useMatch(`${basePath}/${Routes.SUMMARY}/${Routes.SUMMARY_TABS}`);
|
|
48
52
|
const tab = match?.params.tab;
|
|
49
53
|
|
|
@@ -120,12 +124,12 @@ const Summary: FC<SummaryProps> = ({ layout: Layout, children }) => {
|
|
|
120
124
|
{fiveItemsDiscount !== 0 && <FiveItemsDiscountBanner fiveItemsDiscount={fiveItemsDiscount} />}
|
|
121
125
|
|
|
122
126
|
<AuroraLayout
|
|
123
|
-
fullWidth={!
|
|
124
|
-
style={[
|
|
127
|
+
fullWidth={!isDesktopScreen}
|
|
128
|
+
style={[isDesktopScreen && style.desktopLayoutSpacing, !isDesktopScreen && { paddingBottom: pricingHeight }]}
|
|
125
129
|
>
|
|
126
|
-
<Box size={{ L: "2/3" }} style={
|
|
127
|
-
<View style={[style.contentWrapper,
|
|
128
|
-
<View style={!
|
|
130
|
+
<Box size={{ L: "2/3" }} style={isDesktopScreen && style.desktopListSpacing}>
|
|
131
|
+
<View style={[style.contentWrapper, isDesktopScreen && style.desktopContentWrapper]}>
|
|
132
|
+
<View style={!isDesktopScreen && style.mobileInfo}>
|
|
129
133
|
<Text level={3} style={style.title} heading>
|
|
130
134
|
{titleText}
|
|
131
135
|
</Text>
|
|
@@ -138,8 +142,8 @@ const Summary: FC<SummaryProps> = ({ layout: Layout, children }) => {
|
|
|
138
142
|
</View>
|
|
139
143
|
</Box>
|
|
140
144
|
|
|
141
|
-
{pricing &&
|
|
142
|
-
<Box size={{ L: "1/3" }} style={[style.resume,
|
|
145
|
+
{pricing && isDesktopScreen ? (
|
|
146
|
+
<Box size={{ L: "1/3" }} style={[style.resume, isDesktopScreen ? style.desktopResume : style.mobileResume]}>
|
|
143
147
|
<View style={style.princingWrapper}>
|
|
144
148
|
<CollapsiblePricing
|
|
145
149
|
collapsed={false}
|
|
@@ -155,7 +159,7 @@ const Summary: FC<SummaryProps> = ({ layout: Layout, children }) => {
|
|
|
155
159
|
</AuroraLayout>
|
|
156
160
|
</ScrollView>
|
|
157
161
|
|
|
158
|
-
{pricing && !
|
|
162
|
+
{pricing && !isDesktopScreen ? (
|
|
159
163
|
<Sticky style={style.sticky} onLayout={Platform.OS !== "web" ? handleOnPricingLayout : undefined}>
|
|
160
164
|
<Body>
|
|
161
165
|
<CollapsiblePricing
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const style = () => {
|
|
5
|
+
const { space1, space3 } = theme();
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
7
|
+
return StyleSheet.create({
|
|
8
|
+
collapsed: {
|
|
9
|
+
flexDirection: "row",
|
|
10
|
+
justifyContent: "space-between",
|
|
11
|
+
},
|
|
12
|
+
collapsedContent: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
marginBottom: space1,
|
|
15
|
+
},
|
|
16
|
+
iconContainer: {
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
marginBottom: space3,
|
|
19
|
+
},
|
|
20
|
+
totalCollapsed: {
|
|
21
|
+
marginBottom: space1,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
};
|
|
23
25
|
|
|
24
26
|
export { style };
|
package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React, { FC } from "react";
|
|
1
|
+
import React, { FC, useMemo } from "react";
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
3
|
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
4
|
-
import { Button,
|
|
4
|
+
import { Button, Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
|
+
import { Icon } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { PricingProjection } from "../../../../../../projection/pricing/pricing";
|
|
7
8
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
8
9
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
10
|
import { Pricing } from "../pricing/Pricing";
|
|
10
|
-
import { style } from "./CollapsiblePricing.style";
|
|
11
|
+
import { style as collapsiblePricingStyle } from "./CollapsiblePricing.style";
|
|
11
12
|
|
|
12
13
|
interface CollapsiblePricingProps {
|
|
13
14
|
readonly pricing: PricingProjection;
|
|
@@ -49,6 +50,8 @@ const CollapsiblePricing: FC<CollapsiblePricingProps> = ({
|
|
|
49
50
|
[notCollapsedOpacity.value],
|
|
50
51
|
);
|
|
51
52
|
|
|
53
|
+
const style = useMemo(() => collapsiblePricingStyle(), []);
|
|
54
|
+
|
|
52
55
|
return (
|
|
53
56
|
<>
|
|
54
57
|
{collapsible && (
|
|
@@ -77,11 +77,19 @@ exports[`Pricing component matches the snapshot for collaped pricing: collapsed
|
|
|
77
77
|
{
|
|
78
78
|
"color": "#0C0A0A",
|
|
79
79
|
"fontFamily": "auroraicons",
|
|
80
|
-
"fontSize":
|
|
80
|
+
"fontSize": 24,
|
|
81
81
|
"fontStyle": "normal",
|
|
82
82
|
"fontWeight": "normal",
|
|
83
|
-
"height":
|
|
84
|
-
"
|
|
83
|
+
"height": 24,
|
|
84
|
+
"letterSpacing": -0.2,
|
|
85
|
+
"lineHeight": 24,
|
|
86
|
+
"minHeight": 24,
|
|
87
|
+
"minWidth": 24,
|
|
88
|
+
"paddingBottom": 0,
|
|
89
|
+
"paddingLeft": 0,
|
|
90
|
+
"paddingRight": 0,
|
|
91
|
+
"paddingTop": 0,
|
|
92
|
+
"width": 24,
|
|
85
93
|
},
|
|
86
94
|
]
|
|
87
95
|
}
|
|
@@ -421,11 +429,19 @@ exports[`Pricing component matches the snapshot for non-collaped pricing: non-co
|
|
|
421
429
|
{
|
|
422
430
|
"color": "#0C0A0A",
|
|
423
431
|
"fontFamily": "auroraicons",
|
|
424
|
-
"fontSize":
|
|
432
|
+
"fontSize": 24,
|
|
425
433
|
"fontStyle": "normal",
|
|
426
434
|
"fontWeight": "normal",
|
|
427
|
-
"height":
|
|
428
|
-
"
|
|
435
|
+
"height": 24,
|
|
436
|
+
"letterSpacing": -0.2,
|
|
437
|
+
"lineHeight": 24,
|
|
438
|
+
"minHeight": 24,
|
|
439
|
+
"minWidth": 24,
|
|
440
|
+
"paddingBottom": 0,
|
|
441
|
+
"paddingLeft": 0,
|
|
442
|
+
"paddingRight": 0,
|
|
443
|
+
"paddingTop": 0,
|
|
444
|
+
"width": 24,
|
|
429
445
|
},
|
|
430
446
|
]
|
|
431
447
|
}
|