@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,12 +1,14 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorBgBase, space4, space6 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
title: {
|
|
7
|
+
backgroundColor: colorBgBase,
|
|
8
|
+
paddingBottom: space4,
|
|
9
|
+
paddingHorizontal: space6,
|
|
10
|
+
paddingTop: space6,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
};
|
|
12
14
|
export { style };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReturnQuestionType } from "../../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
2
2
|
import { ReturnQuestionItem } from "../ReturnQuestionItem";
|
|
3
|
-
import { style } from "./HostRadioGroupReturnQuestionItem.style";
|
|
4
3
|
declare const HostRadioGroupReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HOST_SELECT>;
|
|
5
|
-
export { HostRadioGroupReturnQuestionItem
|
|
4
|
+
export { HostRadioGroupReturnQuestionItem };
|
|
@@ -4,13 +4,14 @@ import { View } from "react-native";
|
|
|
4
4
|
import { Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
|
-
import { style } from "./HostRadioGroupReturnQuestionItem.style";
|
|
7
|
+
import { style as hostRadioGroupReturnQuestionItemStyle } from "./HostRadioGroupReturnQuestionItem.style";
|
|
8
8
|
const HostRadioGroupReturnQuestionItem = ({ returnQuestion, children, testID, }) => {
|
|
9
9
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
10
10
|
const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
|
|
11
|
+
const style = useMemo(() => hostRadioGroupReturnQuestionItemStyle(), []);
|
|
11
12
|
return (React.createElement(React.Fragment, null,
|
|
12
13
|
React.createElement(View, { style: style.wrapper, testID: testID },
|
|
13
14
|
React.createElement(Text, { level: 3, style: style.title, action: true }, placeholderText),
|
|
14
15
|
children)));
|
|
15
16
|
};
|
|
16
|
-
export { HostRadioGroupReturnQuestionItem
|
|
17
|
+
export { HostRadioGroupReturnQuestionItem };
|
|
@@ -1,14 +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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorBgBase, space2, space6 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
title: {
|
|
7
|
+
marginBottom: space2,
|
|
8
|
+
},
|
|
9
|
+
wrapper: {
|
|
10
|
+
backgroundColor: colorBgBase,
|
|
11
|
+
marginBottom: space2,
|
|
12
|
+
padding: space6,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
};
|
|
14
16
|
export { style };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { TouchableHighlight, View } from "react-native";
|
|
4
|
-
import { ButtonIcon } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
-
import { InputField, Modal, TextInput } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { ButtonIcon, InputField, Modal, TextInput } from "@lookiero/sty-psp-ui";
|
|
7
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
8
7
|
import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
|
|
9
8
|
import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
|
|
10
|
-
import { style
|
|
9
|
+
import { style as hostSelectReturnQuestionItemStyle } from "./HostSelectReturnQuestionItem.style";
|
|
11
10
|
const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, testID, }) => {
|
|
12
11
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
13
12
|
const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
|
|
13
|
+
const style = useMemo(() => hostSelectReturnQuestionItemStyle(), []);
|
|
14
14
|
const [modalVisible, setModalVisible] = useState(false);
|
|
15
15
|
const handleOnPress = useCallback(() => setModalVisible(true), []);
|
|
16
16
|
const handleOnModalClose = useCallback(() => setModalVisible(false), []);
|
|
@@ -31,10 +31,10 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
|
|
|
31
31
|
// deepestReturnQuestionWithFeedback needs to be as a dependency in order to be re-evaluated whenever it changes
|
|
32
32
|
}, [handleOnModalClose, deepestReturnQuestionWithFeedback, isLeaf]);
|
|
33
33
|
return (React.createElement(React.Fragment, null,
|
|
34
|
-
React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: containerUnderlayColor, accessible: true, onPress: handleOnPress },
|
|
34
|
+
React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: style.containerUnderlayColor, accessible: true, onPress: handleOnPress },
|
|
35
35
|
React.createElement(View, { pointerEvents: "none" },
|
|
36
36
|
React.createElement(InputField, { icon: "arrow_down", label: placeholderText, value: inputValue, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { editable: false, placeholder: placeholderText, style: style, value: inputValue, onBlur: onBlur, onChange: () => void 0, onFocus: onFocus })) }))),
|
|
37
|
-
React.createElement(Modal, { portalHostName: portalHostName, style: deepestReturnQuestionWithFeedback && { header: style.header }, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow_left", style: style.backButton, testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
37
|
+
React.createElement(Modal, { portalHostName: portalHostName, style: deepestReturnQuestionWithFeedback && { header: style.header }, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.backButton }, testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
38
38
|
React.createElement(View, { style: style.modalContent }, children))));
|
|
39
39
|
};
|
|
40
40
|
export { HostSelectReturnQuestionItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
1
|
+
declare const style: () => {
|
|
2
|
+
containerUnderlayColor: string;
|
|
3
3
|
backButton: {
|
|
4
4
|
padding: number;
|
|
5
5
|
};
|
|
@@ -14,4 +14,4 @@ declare const style: {
|
|
|
14
14
|
paddingHorizontal: number;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
export { style
|
|
17
|
+
export { style };
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorBgPrimaryLight, space4, space6 } = theme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
backButton: {
|
|
7
|
+
padding: 0,
|
|
8
|
+
},
|
|
9
|
+
container: {
|
|
10
|
+
marginBottom: space4,
|
|
11
|
+
},
|
|
12
|
+
header: {
|
|
13
|
+
justifyContent: "space-between",
|
|
14
|
+
},
|
|
15
|
+
modalContent: {
|
|
16
|
+
paddingBottom: space6,
|
|
17
|
+
paddingHorizontal: space6,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
...styles,
|
|
22
|
+
containerUnderlayColor: colorBgPrimaryLight,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { style };
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
5
|
-
import {
|
|
5
|
+
import { Text } from "@lookiero/aurora";
|
|
6
6
|
import { useI18n } from "@lookiero/i18n-react";
|
|
7
7
|
import { returnQuestionHasChildren } from "../../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
8
8
|
import { DOMAIN } from "../../../../../../i18n/i18n";
|
|
9
9
|
import ReturnQuestion from "../../../ReturnQuestion";
|
|
10
10
|
import { useReturnQuestionFeedbackForReturnQuestion } from "../../../behaviors/useReturnQuestionFeedback";
|
|
11
|
-
import { style } from "./HostStackReturnQuestionItem.style";
|
|
11
|
+
import { style as hostStackReturnQuestionItemStyle } from "./HostStackReturnQuestionItem.style";
|
|
12
12
|
const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
|
|
13
13
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
14
14
|
const { feedback } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion });
|
|
@@ -22,11 +22,12 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName,
|
|
|
22
22
|
stackHeight.value = height;
|
|
23
23
|
}, [stackHeight]);
|
|
24
24
|
const stackAnimatedStyle = useAnimatedStyle(() => ({ height: withTiming(stackHeight.value) }), [stackHeight]);
|
|
25
|
+
const style = useMemo(() => hostStackReturnQuestionItemStyle(), []);
|
|
25
26
|
return (React.createElement(Animated.View, { style: stackAnimatedStyle },
|
|
26
27
|
React.createElement(View, { onLayout: handleOnLayout },
|
|
27
28
|
titleText && (React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText)),
|
|
28
29
|
feedbackReturnQuestion && returnQuestionHasChildren(feedbackReturnQuestion) ? (React.createElement(React.Fragment, null,
|
|
29
|
-
React.createElement(Text, {
|
|
30
|
+
React.createElement(Text, { level: 3, style: style.text }, feedbackText),
|
|
30
31
|
feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: feedbackReturnQuestion }))))) : (children))));
|
|
31
32
|
};
|
|
32
33
|
export { HostStackReturnQuestionItem };
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorTextMedium, space1 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
text: {
|
|
7
|
+
color: colorTextMedium,
|
|
8
|
+
},
|
|
9
|
+
title: {
|
|
10
|
+
marginBottom: space1,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
};
|
|
9
14
|
export { style };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
import { ReturnQuestionProjection } from "../../../../../../../projection/returnQuestion/returnQuestion";
|
|
3
3
|
interface ModalOptionReturnQuestionItemsProps {
|
|
4
4
|
readonly portalHostName?: string;
|
|
@@ -7,5 +7,5 @@ interface ModalOptionReturnQuestionItemsProps {
|
|
|
7
7
|
readonly visible: boolean;
|
|
8
8
|
readonly onClose: () => void;
|
|
9
9
|
}
|
|
10
|
-
declare const ModalOptionReturnQuestionItems:
|
|
10
|
+
declare const ModalOptionReturnQuestionItems: FC<ModalOptionReturnQuestionItemsProps>;
|
|
11
11
|
export { ModalOptionReturnQuestionItems };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { returnQuestionHasChildren } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
7
7
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
8
8
|
import ReturnQuestion from "../../ReturnQuestion";
|
|
9
|
-
import { style } from "./ModalOptionReturnQuestionItems.style";
|
|
9
|
+
import { style as modalOptionReturnQuestionItemsStyle } from "./ModalOptionReturnQuestionItems.style";
|
|
10
10
|
const ModalOptionReturnQuestionItems = ({ portalHostName, returnQuestion, visible, onClose, }) => {
|
|
11
11
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
12
12
|
const title = formatMessage({ id: returnQuestion.translationKey });
|
|
13
|
+
const style = useMemo(() => modalOptionReturnQuestionItemsStyle(), []);
|
|
13
14
|
return (React.createElement(Modal, { portalHostName: portalHostName, visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
14
15
|
React.createElement(View, { style: style.modalContent },
|
|
15
|
-
React.createElement(Text, {
|
|
16
|
+
React.createElement(Text, { level: 2, style: style.optionText }, title),
|
|
16
17
|
React.createElement(React.Fragment, null, returnQuestionHasChildren(returnQuestion) &&
|
|
17
18
|
returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: "", returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion })))))));
|
|
18
19
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
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
|
-
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorTextMedium, space2, space6 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
modalContent: {
|
|
7
|
+
paddingHorizontal: space6,
|
|
8
|
+
},
|
|
9
|
+
optionText: {
|
|
10
|
+
color: colorTextMedium,
|
|
11
|
+
marginBottom: space6,
|
|
12
|
+
},
|
|
13
|
+
wrapper: {
|
|
14
|
+
marginBottom: space2,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
};
|
|
15
18
|
export { style };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
-
import React, { useCallback } from "react";
|
|
2
|
+
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { TouchableHighlight } from "react-native";
|
|
4
4
|
import { Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
|
-
import {
|
|
8
|
+
import { style as optionReturnQuestionItemStyle } from "./OptionReturnQuestionItem.style";
|
|
9
9
|
const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, }) => {
|
|
10
10
|
const { onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
|
|
11
11
|
const optionText = useI18nMessage({ domain: DOMAIN, id: returnQuestion.translationKey });
|
|
12
12
|
const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParent.id, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParent.id]);
|
|
13
|
-
|
|
13
|
+
const style = useMemo(() => optionReturnQuestionItemStyle(), []);
|
|
14
|
+
return (React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: style.containerUnderlayColor, onPress: handleOnPress },
|
|
14
15
|
React.createElement(Text, { level: 3, style: style.text }, optionText)));
|
|
15
16
|
};
|
|
16
17
|
export { OptionReturnQuestionItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
1
|
+
declare const style: () => {
|
|
2
|
+
containerUnderlayColor: string;
|
|
3
3
|
container: {
|
|
4
4
|
borderBottomColor: string;
|
|
5
5
|
borderBottomWidth: number;
|
|
@@ -9,4 +9,4 @@ declare const style: {
|
|
|
9
9
|
lineHeight: number;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export { style
|
|
12
|
+
export { style };
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorBgPrimaryLight, colorBorderInteractive, space4, space6 } = theme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
borderBottomColor: colorBorderInteractive,
|
|
8
|
+
borderBottomWidth: 1,
|
|
9
|
+
paddingVertical: space4,
|
|
10
|
+
},
|
|
11
|
+
text: {
|
|
12
|
+
lineHeight: space6,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
...styles,
|
|
17
|
+
containerUnderlayColor: colorBgPrimaryLight,
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export { style };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
-
import React, { useCallback, useEffect, useState } from "react";
|
|
3
|
-
import {
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { Pressable } from "react-native";
|
|
4
|
+
import { Text } from "@lookiero/aurora";
|
|
4
5
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
+
import { Checkbox } from "@lookiero/sty-psp-ui";
|
|
5
7
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
6
8
|
import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
|
|
7
9
|
import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
|
|
8
10
|
import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
|
|
9
|
-
import { style } from "./RadioReturnQuestionItem.style";
|
|
11
|
+
import { style as radioReturnQuestionItemStyle } from "./RadioReturnQuestionItem.style";
|
|
10
12
|
const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
|
|
13
|
+
const style = useMemo(() => radioReturnQuestionItemStyle(), []);
|
|
11
14
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
12
15
|
const [modalVisible, setModalVisible] = useState(false);
|
|
13
16
|
const { feedback: feedbackId, onChange, clear, } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
|
|
@@ -43,9 +46,11 @@ const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID,
|
|
|
43
46
|
/**
|
|
44
47
|
* This logic is for closing the Modal when its children has been answered.
|
|
45
48
|
*/
|
|
49
|
+
const checked = returnQuestion.id === feedbackId;
|
|
46
50
|
return (React.createElement(React.Fragment, null,
|
|
47
|
-
React.createElement(
|
|
48
|
-
React.createElement(
|
|
51
|
+
React.createElement(Pressable, { accessibilityLabel: "radio-return-question-item", accessibilityState: { checked }, style: style.wrapper, testID: testID, accessible: true, onPress: handleOnPress },
|
|
52
|
+
React.createElement(Checkbox, { checked: checked }),
|
|
53
|
+
React.createElement(Text, { level: 3, style: style.text }, inputValue ? `${optionText} / ${inputValue}` : `${optionText}`)),
|
|
49
54
|
hasChildren ? (React.createElement(ModalOptionReturnQuestionItems, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestion, visible: modalVisible, onClose: handleOnModalClose })) : null));
|
|
50
55
|
};
|
|
51
56
|
export { RadioReturnQuestionItem };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
declare const style: {
|
|
1
|
+
declare const style: () => {
|
|
2
|
+
text: {
|
|
3
|
+
color: string;
|
|
4
|
+
flex: number;
|
|
5
|
+
marginLeft: number;
|
|
6
|
+
};
|
|
2
7
|
wrapper: {
|
|
3
|
-
|
|
8
|
+
alignItems: "center";
|
|
9
|
+
flex: number;
|
|
10
|
+
flexDirection: "row";
|
|
11
|
+
marginVertical: number;
|
|
4
12
|
};
|
|
5
13
|
};
|
|
6
14
|
export { style };
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorText, space3, space4 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
text: {
|
|
7
|
+
color: colorText,
|
|
8
|
+
flex: 1,
|
|
9
|
+
marginLeft: space4,
|
|
10
|
+
},
|
|
11
|
+
wrapper: {
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
flex: 1,
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
marginVertical: space3,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
};
|
|
7
19
|
export { style };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
-
import React, { useCallback } from "react";
|
|
2
|
+
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import { Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage, useI18n } from "@lookiero/i18n-react";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
8
|
import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
|
|
9
|
-
import { style } from "./ReturnQuestionFeedbackItem.style";
|
|
9
|
+
import { style as returnQuestionFeedbackItemStyle } from "./ReturnQuestionFeedbackItem.style";
|
|
10
10
|
const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
|
|
11
11
|
const titleText = useI18nMessage({ domain: DOMAIN, id: returnQuestion.translationKey });
|
|
12
12
|
const unansweredText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_UNANSWERED });
|
|
@@ -14,6 +14,7 @@ const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
|
|
|
14
14
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
15
15
|
const translate = useCallback((returnQuestionName) => formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }), [formatMessage]);
|
|
16
16
|
const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(" / ");
|
|
17
|
+
const style = useMemo(() => returnQuestionFeedbackItemStyle(), []);
|
|
17
18
|
return (React.createElement(View, { style: style.container },
|
|
18
19
|
React.createElement(Text, { level: 2, style: style.title, detailBold: true }, titleText),
|
|
19
20
|
React.createElement(Text, { level: 1, detail: true }, feedback || unansweredText)));
|
|
@@ -1,13 +1,15 @@
|
|
|
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
|
-
}
|
|
3
|
+
const style = () => {
|
|
4
|
+
const { colorTextMedium, space1, space4 } = theme();
|
|
5
|
+
return StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
marginBottom: space4,
|
|
8
|
+
},
|
|
9
|
+
title: {
|
|
10
|
+
color: colorTextMedium,
|
|
11
|
+
marginBottom: space1,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
};
|
|
13
15
|
export { style };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
|
-
import { View } from "
|
|
3
|
+
import { View } from "react-native";
|
|
4
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { InputField, TextInput } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
|
-
import { style } from "./TextareaReturnQuestionItem.style";
|
|
8
|
+
import { style as textareaReturnQuestionItemStyle } from "./TextareaReturnQuestionItem.style";
|
|
9
9
|
const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, }) => {
|
|
10
10
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
11
11
|
const placeholderText = useMemo(() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""), [formatMessage, returnQuestion.metadata.placeholder]);
|
|
12
12
|
const { feedback, onChange } = useReturnQuestionFeedbackForReturnQuestion({ returnQuestion: returnQuestionParent });
|
|
13
13
|
const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParent.id, returnQuestionFeedback: value }), [onChange, returnQuestionParent.id]);
|
|
14
|
+
const style = useMemo(() => textareaReturnQuestionItemStyle(), []);
|
|
14
15
|
return (React.createElement(View, { style: style.wrapper, testID: "textarea-return-question-item" },
|
|
15
16
|
React.createElement(InputField, { label: placeholderText, value: feedback, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { placeholder: placeholderText, style: style, testID: testID, textAlignVertical: "top", value: feedback, multiline: true, onBlur: onBlur, onChange: handleOnChange, onFocus: onFocus })), style: {
|
|
16
17
|
inputField: style.inputField,
|