@lookiero/checkout 10.0.0-beta.1 → 10.0.0-beta.3

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.
Files changed (229) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/src/ExpoRoot.js +3 -2
  3. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +2 -1
  4. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +3 -2
  5. package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -0
  6. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +7 -3
  7. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +18 -2
  8. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +14 -2
  9. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +2 -1
  10. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +2 -1
  11. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +4 -3
  12. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +0 -1
  13. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +0 -1
  14. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +3 -3
  15. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +3 -2
  16. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +3 -2
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -2
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +5 -4
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +6 -6
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +4 -3
  23. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +0 -1
  24. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +0 -1
  25. package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
  26. package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
  27. package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +2 -2
  28. package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +10 -18
  29. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
  30. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +55 -22
  31. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -1
  32. package/dist/src/infrastructure/ui/i18n/i18n.js +2 -1
  33. package/dist/src/infrastructure/ui/test/render.js +4 -2
  34. package/dist/src/infrastructure/ui/views/App.js +2 -1
  35. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +3 -3
  36. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +16 -16
  37. package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +2 -2
  38. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -2
  39. package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -3
  40. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +11 -5
  41. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -4
  42. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
  43. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +1 -0
  44. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +2 -1
  45. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  46. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -4
  47. package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -0
  48. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
  49. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -4
  50. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -0
  51. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -1
  52. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
  53. package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -4
  54. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +3 -2
  55. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -6
  56. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
  57. package/dist/src/version.d.ts +1 -1
  58. package/dist/src/version.js +1 -1
  59. package/index.ts +2 -1
  60. package/jest.config.js +2 -2
  61. package/package.json +7 -8
  62. package/src/ExpoRoot.tsx +3 -2
  63. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +3 -2
  64. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
  65. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/__snapshots__/FiveItemsDiscountBanner.test.tsx.snap +1 -1
  66. package/src/infrastructure/ui/components/atoms/price/Price.tsx +3 -0
  67. package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +3 -3
  68. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +25 -4
  69. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +13 -7
  70. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +2 -1
  71. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +2 -1
  72. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +0 -1
  73. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +4 -2
  74. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +3 -3
  75. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +3 -2
  76. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +5 -5
  77. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +3 -2
  78. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +3 -2
  79. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +2 -1
  80. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -5
  81. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +7 -7
  82. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +0 -1
  83. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +4 -2
  84. package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
  85. package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +1 -1
  86. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
  87. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +1 -1
  88. package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +2 -2
  89. package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +1 -1
  90. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +302 -0
  91. package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +11 -20
  92. package/src/infrastructure/ui/i18n/i18n.ts +3 -1
  93. package/src/infrastructure/ui/test/render.tsx +6 -3
  94. package/src/infrastructure/ui/views/App.tsx +2 -1
  95. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +51 -40
  96. package/src/infrastructure/ui/views/checkout/Checkout.tsx +3 -3
  97. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +2 -2
  98. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/__snapshots__/DeliveryBanner.test.tsx.snap +1 -1
  99. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +2 -2
  100. package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +3 -3
  101. package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +3 -3
  102. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +11 -5
  103. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +160 -88
  104. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +4 -4
  105. package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +244 -128
  106. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +2 -1
  107. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
  108. package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +10 -8
  109. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +30 -30
  110. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -2
  111. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +1 -1
  112. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -4
  113. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +75 -41
  114. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +105 -102
  115. package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -0
  116. package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +3 -3
  117. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
  118. package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +1 -1
  119. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -1
  120. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +4 -4
  121. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
  122. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +30 -30
  123. package/src/infrastructure/ui/views/summary/Summary.tsx +4 -4
  124. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -2
  125. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +154 -82
  126. package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +8 -6
  127. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +5 -5
  128. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +62 -62
  129. package/dist/pact.config.d.ts +0 -21
  130. package/dist/pact.config.js +0 -16
  131. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  132. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -55
  133. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  134. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -116
  135. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  136. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -56
  137. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  138. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -51
  139. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  140. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -51
  141. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  142. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -51
  143. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
  144. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
  145. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  146. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -56
  147. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  148. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -57
  149. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  150. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -55
  151. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  152. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -120
  153. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  154. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -55
  155. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  156. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -55
  157. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
  158. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  159. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
  160. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
  161. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
  162. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
  163. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  164. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
  165. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
  166. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
  167. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  168. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -14
  169. package/dist/src/infrastructure/ui/components/templates/footer/Footer.d.ts +0 -3
  170. package/dist/src/infrastructure/ui/components/templates/footer/Footer.js +0 -13
  171. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
  172. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
  173. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  174. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
  175. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
  176. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
  177. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
  178. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
  179. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
  180. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
  181. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
  182. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
  183. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  184. package/dist/src/infrastructure/ui/views/App.style.js +0 -8
  185. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  186. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
  187. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
  188. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
  189. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  190. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
  191. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  192. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
  193. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
  194. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
  195. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  196. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
  197. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
  198. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
  199. package/dist/src/projection/shared/country.d.ts +0 -14
  200. package/dist/src/projection/shared/country.js +0 -15
  201. package/dist/src/projection/shared/customer.d.ts +0 -9
  202. package/dist/src/projection/shared/customer.js +0 -1
  203. package/dist/src/projection/shared/locale.d.ts +0 -12
  204. package/dist/src/projection/shared/locale.js +0 -13
  205. package/dist/src/projection/shared/order.d.ts +0 -6
  206. package/dist/src/projection/shared/order.js +0 -1
  207. package/dist/src/projection/shared/price.d.ts +0 -11
  208. package/dist/src/projection/shared/price.js +0 -1
  209. package/dist/src/projection/shared/size.d.ts +0 -21
  210. package/dist/src/projection/shared/size.js +0 -4
  211. package/dist/src/projection/shared/subscription.d.ts +0 -2
  212. package/dist/src/projection/shared/subscription.js +0 -1
  213. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +0 -15
  214. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +0 -16
  215. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
  216. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
  217. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +0 -14
  218. package/dist/src/shared/ui/components/atoms/field/Field.js +0 -29
  219. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +0 -16
  220. package/dist/src/shared/ui/components/atoms/field/Field.style.js +0 -19
  221. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +0 -24
  222. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +0 -28
  223. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +0 -29
  224. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +0 -37
  225. package/src/infrastructure/ui/components/templates/footer/Footer.test.tsx +0 -15
  226. package/src/infrastructure/ui/components/templates/footer/Footer.tsx +0 -19
  227. package/src/infrastructure/ui/components/templates/footer/__snapshots__/Footer.test.tsx.snap +0 -1127
  228. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.ts +0 -297
  229. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +0 -126
@@ -1,27 +0,0 @@
1
- import React, { useEffect, useRef } from "react";
2
- import { Spinner } from "@lookiero/aurora";
3
- import { QueryStatus } from "@lookiero/messaging-react";
4
- import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId";
5
-
6
- const CheckoutAccessibilityMiddleware = ({
7
- customerId,
8
- onNotAccessible,
9
- loader = React.createElement(Spinner, null),
10
- children,
11
- }) => {
12
- const [accessible, status] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
13
- const onNotAccessibleRef = useRef(onNotAccessible);
14
- onNotAccessibleRef.current = onNotAccessible;
15
- const notAccessible = accessible === false || status === QueryStatus.ERROR;
16
- useEffect(() => {
17
- if (notAccessible) {
18
- onNotAccessibleRef.current();
19
- }
20
- }, [notAccessible]);
21
- return accessible === undefined && [QueryStatus.IDLE, QueryStatus.LOADING].includes(status)
22
- ? loader
23
- : accessible
24
- ? children
25
- : null;
26
- };
27
- export { CheckoutAccessibilityMiddleware };
@@ -1,6 +0,0 @@
1
- declare const style: {
2
- container: {
3
- flex: number;
4
- };
5
- };
6
- export { style };
@@ -1,8 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
-
3
- const style = StyleSheet.create({
4
- container: {
5
- flex: 1,
6
- },
7
- });
8
- export { style };
@@ -1,7 +0,0 @@
1
- declare const style: {
2
- buttonContainer: {
3
- paddingHorizontal: number;
4
- paddingVertical: number;
5
- };
6
- };
7
- export { style };
@@ -1,11 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
-
4
- const { space6, space8 } = theme();
5
- const style = StyleSheet.create({
6
- buttonContainer: {
7
- paddingHorizontal: space6,
8
- paddingVertical: space8,
9
- },
10
- });
11
- export { style };
@@ -1,12 +0,0 @@
1
- import { FC } from "react";
2
- import { FeedbackProjection } from "../../../../../../projection/feedback/feedback";
3
- import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
4
-
5
- interface ReturnQuestionsFormProps {
6
- readonly visible: boolean;
7
- readonly returnQuestions: ReturnQuestionProjection[];
8
- readonly onSubmit: (feedback: FeedbackProjection) => void;
9
- readonly onClose: () => void;
10
- }
11
- declare const ReturnQuestionsForm: FC<ReturnQuestionsFormProps>;
12
- export { ReturnQuestionsForm };
@@ -1,64 +0,0 @@
1
- import { PortalHost } from "@gorhom/portal";
2
- import React, { useCallback } from "react";
3
- import { View } from "react-native";
4
- import { Button, Text } from "@lookiero/aurora";
5
- import { useI18nMessage } from "@lookiero/i18n-react";
6
- import { Modal } from "@lookiero/sty-psp-ui";
7
- import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
8
- import { ReturnQuestions } from "../../../../components/organisms/returnQuestions/ReturnQuestions";
9
- import { useReturnQuestionFeedback } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback";
10
- import { ReturnQuestionItemProvider } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionItem";
11
- import { HostDefaultReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem";
12
- import { HostSelectReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem";
13
- import { HostStackReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem";
14
- import { OptionReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem";
15
- import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
16
- import { I18nMessages } from "../../../../i18n/i18n";
17
- import { style } from "./ReturnQuestionsForm.style";
18
-
19
- const RETURN_QUESTION_FORM_PORTAL_HOST_NAME = "return-question-form-portal";
20
- const returnQuestionItems = {
21
- [ReturnQuestionType.HOST_DEFAULT]: HostDefaultReturnQuestionItem,
22
- [ReturnQuestionType.HOST_TEXTAREA]: HostDefaultReturnQuestionItem,
23
- [ReturnQuestionType.HOST_SELECT]: HostSelectReturnQuestionItem,
24
- [ReturnQuestionType.HOST_STACK]: HostStackReturnQuestionItem,
25
- [ReturnQuestionType.TEXTAREA]: TextareaReturnQuestionItem,
26
- [ReturnQuestionType.OPTION]: OptionReturnQuestionItem,
27
- };
28
- const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) => {
29
- const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
30
- const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
31
- const feedback = useReturnQuestionFeedback();
32
- const handleOnSubmit = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
33
- return React.createElement(
34
- ReturnQuestionItemProvider,
35
- { returnQuestionItems: returnQuestionItems },
36
- React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
37
- React.createElement(
38
- Modal,
39
- {
40
- portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME,
41
- testID: "return-questions-form-modal",
42
- visible: visible,
43
- scroll: true,
44
- showCloseButton: true,
45
- onClose: onClose,
46
- },
47
- React.createElement(
48
- View,
49
- { style: style.modalContent },
50
- React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
51
- React.createElement(ReturnQuestions, {
52
- portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME,
53
- returnQuestions: returnQuestions,
54
- }),
55
- React.createElement(
56
- Button,
57
- { style: style.submit, testID: "return-questions-button", onPress: handleOnSubmit },
58
- submitButtonText,
59
- ),
60
- ),
61
- ),
62
- );
63
- };
64
- export { ReturnQuestionsForm };
@@ -1,12 +0,0 @@
1
- declare const style: {
2
- modalContent: {
3
- paddingHorizontal: number;
4
- };
5
- submit: {
6
- marginTop: number;
7
- };
8
- title: {
9
- marginBottom: number;
10
- };
11
- };
12
- export { style };
@@ -1,16 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
-
4
- const { space6, space8 } = theme();
5
- const style = StyleSheet.create({
6
- modalContent: {
7
- paddingHorizontal: space6,
8
- },
9
- submit: {
10
- marginTop: space8,
11
- },
12
- title: {
13
- marginBottom: space6,
14
- },
15
- });
16
- export { style };
@@ -1,40 +0,0 @@
1
- declare const style: {
2
- description: {
3
- color: string;
4
- };
5
- desktopInfo: {
6
- borderTopLeftRadius: number;
7
- borderTopRightRadius: number;
8
- };
9
- desktopLayoutSpacing: {
10
- paddingVertical: number;
11
- };
12
- headerWrapper: {
13
- display: "flex";
14
- flexDirection: "column";
15
- };
16
- info: {
17
- backgroundColor: string;
18
- paddingBottom: number;
19
- paddingHorizontal: number;
20
- paddingTop: number;
21
- };
22
- layout: {
23
- flex: number;
24
- justifyContent: "center";
25
- };
26
- safeAreaView: {
27
- backgroundColor: string;
28
- flex: number;
29
- };
30
- scrollView: {
31
- flex: number;
32
- };
33
- submit: {
34
- backgroundColor: string;
35
- borderBottomLeftRadius: number;
36
- borderBottomRightRadius: number;
37
- padding: number;
38
- };
39
- };
40
- export { style };
@@ -1,44 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
-
4
- const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space4, space6, space8 } = theme();
5
- const style = StyleSheet.create({
6
- description: {
7
- color: colorTextMedium,
8
- },
9
- desktopInfo: {
10
- borderTopLeftRadius: borderRadius5,
11
- borderTopRightRadius: borderRadius5,
12
- },
13
- desktopLayoutSpacing: {
14
- paddingVertical: space8,
15
- },
16
- headerWrapper: {
17
- display: "flex",
18
- flexDirection: "column",
19
- },
20
- info: {
21
- backgroundColor: colorBgBase,
22
- paddingBottom: space4,
23
- paddingHorizontal: space6,
24
- paddingTop: space8,
25
- },
26
- layout: {
27
- flex: 1,
28
- justifyContent: "center",
29
- },
30
- safeAreaView: {
31
- backgroundColor: colorBgPrimaryLight,
32
- flex: 1,
33
- },
34
- scrollView: {
35
- flex: 1,
36
- },
37
- submit: {
38
- backgroundColor: colorBgBase,
39
- borderBottomLeftRadius: borderRadius5,
40
- borderBottomRightRadius: borderRadius5,
41
- padding: space6,
42
- },
43
- });
44
- export { style };
@@ -1,14 +0,0 @@
1
- import { FC } from "react";
2
- import { LayoutRectangle } from "react-native";
3
- import { PricingProjection } from "../../../../../../projection/pricing/pricing";
4
-
5
- interface StickyPricingProps {
6
- readonly pricing: PricingProjection;
7
- readonly totalCheckoutItemsKept: number;
8
- readonly collapsed: boolean;
9
- readonly onPress: () => void;
10
- readonly onSubmit: () => void;
11
- readonly onLayout?: ({ width, height }: LayoutRectangle) => void;
12
- }
13
- declare const StickyPricing: FC<StickyPricingProps>;
14
- export { StickyPricing };
@@ -1,28 +0,0 @@
1
- import React from "react";
2
- import { Sticky } from "@lookiero/sty-psp-ui";
3
- import { Body } from "../../../../components/layouts/body/Body";
4
- import { Pricing } from "../pricing/Pricing";
5
- import { style } from "./StickyPricing.style";
6
-
7
- const StickyPricing = ({ pricing, totalCheckoutItemsKept, collapsed, onPress, onSubmit, onLayout }) =>
8
- React.createElement(
9
- Sticky,
10
- { style: style.sticky, onLayout: onLayout },
11
- React.createElement(
12
- Body,
13
- null,
14
- React.createElement(Pricing, {
15
- balanceDiscount: pricing.balanceDiscount,
16
- collapsed: collapsed,
17
- discount: pricing.discount,
18
- discountPercentage: pricing.discountPercentage,
19
- pendingToPay: pricing.pendingToPay,
20
- service: pricing.service,
21
- subtotal: pricing.subtotal,
22
- totalCheckoutItemsKept: totalCheckoutItemsKept,
23
- onPress: onPress,
24
- onSubmit: onSubmit,
25
- }),
26
- ),
27
- );
28
- export { StickyPricing };
@@ -1,7 +0,0 @@
1
- declare const style: {
2
- sticky: {
3
- paddingBottom: number;
4
- paddingTop: number;
5
- };
6
- };
7
- export { style };
@@ -1,11 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
-
4
- const { space3, space4 } = theme();
5
- const style = StyleSheet.create({
6
- sticky: {
7
- paddingBottom: space4,
8
- paddingTop: space3,
9
- },
10
- });
11
- export { style };
@@ -1,26 +0,0 @@
1
- import { Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
2
-
3
- type IsCheckoutAccessibleByCustomerIdProjection = boolean;
4
- declare const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
5
- interface ViewIsCheckoutAccessibleByCustomerIdPayload {
6
- readonly customerId: string | undefined;
7
- }
8
- interface ViewIsCheckoutAccessibleByCustomerId
9
- extends Query<typeof VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID>,
10
- ViewIsCheckoutAccessibleByCustomerIdPayload {}
11
- interface ViewIsCheckoutAccessibleByCustomerIdFunction {
12
- (payload: ViewIsCheckoutAccessibleByCustomerIdPayload): ViewIsCheckoutAccessibleByCustomerId;
13
- }
14
- declare const viewIsCheckoutAccessibleByCustomerId: ViewIsCheckoutAccessibleByCustomerIdFunction;
15
- interface ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs extends QueryHandlerFunctionArgs {}
16
- declare const viewIsCheckoutAccessibleByCustomerIdHandler: QueryHandlerFunction<
17
- ViewIsCheckoutAccessibleByCustomerId,
18
- IsCheckoutAccessibleByCustomerIdProjection,
19
- ViewIsCheckoutAccessibleByCustomerIdHandlerFunctionArgs
20
- >;
21
- export type { IsCheckoutAccessibleByCustomerIdProjection };
22
- export {
23
- VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID,
24
- viewIsCheckoutAccessibleByCustomerId,
25
- viewIsCheckoutAccessibleByCustomerIdHandler,
26
- };
@@ -1,21 +0,0 @@
1
- import { query } from "@lookiero/messaging";
2
- import { viewFirstAvailableCheckoutByCustomerId } from "./viewFirstAvailableCheckoutByCustomerId";
3
- import { viewIsCheckoutEnabledByCustomerId } from "./viewIsCheckoutEnabledByCustomerId";
4
-
5
- const VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID = "view_is_checkout_accessible_by_customer_id";
6
- const viewIsCheckoutAccessibleByCustomerId = (payload) => ({
7
- ...query({ name: VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID }),
8
- ...payload,
9
- });
10
- const isNonEmptyCustomerId = (customerId) => Boolean(customerId);
11
- const viewIsCheckoutAccessibleByCustomerIdHandler =
12
- ({ queryBus }) =>
13
- async ({ customerId }) =>
14
- isNonEmptyCustomerId(customerId) &&
15
- Boolean(await queryBus(viewFirstAvailableCheckoutByCustomerId({ customerId }))) &&
16
- Boolean(await queryBus(viewIsCheckoutEnabledByCustomerId({ customerId })));
17
- export {
18
- VIEW_IS_CHECKOUT_ACCESSIBLE_BY_CUSTOMER_ID,
19
- viewIsCheckoutAccessibleByCustomerId,
20
- viewIsCheckoutAccessibleByCustomerIdHandler,
21
- };
@@ -1,14 +0,0 @@
1
- declare enum Country {
2
- ES = "ES",
3
- FR = "FR",
4
- GB = "GB",
5
- BE = "BE",
6
- LU = "LU",
7
- IT = "IT",
8
- PT = "PT",
9
- DE = "DE",
10
- AT = "AT",
11
- NL = "NL",
12
- SE = "SE",
13
- }
14
- export { Country };
@@ -1,15 +0,0 @@
1
- var Country;
2
- (function (Country) {
3
- Country["ES"] = "ES";
4
- Country["FR"] = "FR";
5
- Country["GB"] = "GB";
6
- Country["BE"] = "BE";
7
- Country["LU"] = "LU";
8
- Country["IT"] = "IT";
9
- Country["PT"] = "PT";
10
- Country["DE"] = "DE";
11
- Country["AT"] = "AT";
12
- Country["NL"] = "NL";
13
- Country["SE"] = "SE";
14
- })(Country || (Country = {}));
15
- export { Country };
@@ -1,9 +0,0 @@
1
- import { Country } from "@lookiero/sty-psp-locale";
2
- import { Segment } from "@lookiero/sty-psp-segment";
3
-
4
- interface Customer {
5
- readonly customerId: string;
6
- readonly country: Country;
7
- readonly segment: Segment;
8
- }
9
- export type { Customer };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- declare enum Locale {
2
- ES = "es",
3
- FR = "fr",
4
- EN = "en",
5
- IT = "it",
6
- PT = "pt",
7
- DE = "de",
8
- AT = "at",
9
- NL = "nl",
10
- SE = "sv",
11
- }
12
- export { Locale };
@@ -1,13 +0,0 @@
1
- var Locale;
2
- (function (Locale) {
3
- Locale["ES"] = "es";
4
- Locale["FR"] = "fr";
5
- Locale["EN"] = "en";
6
- Locale["IT"] = "it";
7
- Locale["PT"] = "pt";
8
- Locale["DE"] = "de";
9
- Locale["AT"] = "at";
10
- Locale["NL"] = "nl";
11
- Locale["SE"] = "sv";
12
- })(Locale || (Locale = {}));
13
- export { Locale };
@@ -1,6 +0,0 @@
1
- interface Order {
2
- readonly orderNumber: number;
3
- readonly isFirstOrder: boolean;
4
- readonly coupon: string | null;
5
- }
6
- export type { Order };
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { Currency } from "../../domain/checkoutItem/model/currency";
2
-
3
- interface PriceProjection {
4
- readonly amount: number;
5
- readonly currency: Currency;
6
- readonly discountedPrice?: {
7
- readonly amount: number;
8
- readonly percentage: number;
9
- };
10
- }
11
- export type { PriceProjection };
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- import { Country } from "./country";
2
-
3
- interface SizeProjection {
4
- readonly id: string;
5
- readonly lookiero: string;
6
- readonly uk: string;
7
- readonly it: string;
8
- readonly europe: string;
9
- readonly unique: boolean;
10
- readonly visualOrder?: number;
11
- }
12
- interface SizeFunctionArgs {
13
- readonly size: SizeProjection;
14
- readonly country: Country;
15
- }
16
- interface SizeFunction {
17
- (args: SizeFunctionArgs): string;
18
- }
19
- declare const size: SizeFunction;
20
- export type { SizeProjection };
21
- export { size };
@@ -1,4 +0,0 @@
1
- import { Country } from "./country";
2
-
3
- const size = ({ size, country }) => (country === Country.GB ? size.uk : size.lookiero);
4
- export { size };
@@ -1,2 +0,0 @@
1
- type Subscription = "o" | "m" | "b" | "q";
2
- export type { Subscription };
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
- declare enum AspectRatioViewResizeDirection {
4
- VERTICAL = "VERTICAL",
5
- HORIZONTAL = "HORIZONTAL"
6
- }
7
- interface AspectRatioViewProps {
8
- readonly aspectRatio?: number;
9
- readonly resizeDirection?: AspectRatioViewResizeDirection;
10
- readonly multiplier?: number;
11
- readonly children: ReactNode;
12
- readonly style?: StyleProp<ViewStyle>;
13
- }
14
- declare const AspectRatioView: FC<AspectRatioViewProps>;
15
- export { AspectRatioView, AspectRatioViewResizeDirection };
@@ -1,16 +0,0 @@
1
- import React, { useCallback, useState } from "react";
2
- import { View } from "react-native";
3
- var AspectRatioViewResizeDirection;
4
- (function (AspectRatioViewResizeDirection) {
5
- AspectRatioViewResizeDirection["VERTICAL"] = "VERTICAL";
6
- AspectRatioViewResizeDirection["HORIZONTAL"] = "HORIZONTAL";
7
- })(AspectRatioViewResizeDirection || (AspectRatioViewResizeDirection = {}));
8
- const AspectRatioView = ({ aspectRatio = 1, resizeDirection = AspectRatioViewResizeDirection.HORIZONTAL, multiplier = 1, style: customStyle = {}, children, }) => {
9
- const [{ width, height }, setDimension] = useState({});
10
- const handleOnLayout = useCallback(({ nativeEvent: { layout } }) => setDimension(resizeDirection === AspectRatioViewResizeDirection.HORIZONTAL
11
- ? { width: layout.width * multiplier, height: layout.width * aspectRatio }
12
- : { width: layout.height * aspectRatio, height: layout.height }), [aspectRatio, multiplier, resizeDirection]);
13
- return (React.createElement(View, { onLayout: handleOnLayout },
14
- React.createElement(View, { style: [{ width, height }, customStyle] }, children)));
15
- };
16
- export { AspectRatioView, AspectRatioViewResizeDirection };
@@ -1,11 +0,0 @@
1
- import { FC } from "react";
2
- import { StyleProp, TextStyle } from "react-native";
3
-
4
- type ErrorStyle = StyleProp<TextStyle>;
5
- interface ErrorProps {
6
- readonly error?: string | null;
7
- readonly style?: ErrorStyle;
8
- }
9
- declare const Error: FC<ErrorProps>;
10
- export type { ErrorStyle };
11
- export { Error };
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { COLOR, Text } from "@lookiero/aurora";
3
-
4
- const Error = ({ error, style: customStyle }) =>
5
- React.createElement(Text, { color: COLOR.TEXT_ERROR, level: 2, style: customStyle, detail: true }, error);
6
- export { Error };
@@ -1,14 +0,0 @@
1
- import { FC } from "react";
2
- import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
- type FieldStyle = {
4
- readonly field: StyleProp<ViewStyle>;
5
- readonly fieldText: StyleProp<TextStyle>;
6
- };
7
- interface FieldProps {
8
- readonly label: string;
9
- readonly isFocused?: boolean;
10
- readonly style?: FieldStyle;
11
- }
12
- declare const Field: FC<FieldProps>;
13
- export type { FieldStyle };
14
- export { Field };
@@ -1,29 +0,0 @@
1
- import React, { useCallback, useState } from "react";
2
- import { View } from "react-native";
3
- import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
4
- import { Text } from "@lookiero/aurora";
5
- import { theme } from "@lookiero/sty-psp-ui";
6
- import { style } from "./Field.style";
7
- const SCALE = 0.75;
8
- const { space1, space4 } = theme();
9
- const Field = ({ label, isFocused = false, style: customStyle }) => {
10
- const [width, setWidth] = useState(0);
11
- const handleOnLayout = useCallback(({ nativeEvent: { layout } }) => setWidth(layout.width), []);
12
- const scale = useSharedValue(isFocused ? SCALE : 1);
13
- scale.value = isFocused ? SCALE : 1;
14
- const translateY = useSharedValue(isFocused ? -14 : space4);
15
- translateY.value = isFocused ? -14 : space4;
16
- const translateX = useSharedValue(isFocused ? -(((1 - SCALE) * width) / 2 + space1) : 0);
17
- translateX.value = isFocused ? -(((1 - SCALE) * width) / 2 + space1) : 0;
18
- const animatedStyle = useAnimatedStyle(() => ({
19
- transform: [
20
- { scale: withTiming(scale.value) },
21
- { translateY: withTiming(translateY.value) },
22
- { translateX: withTiming(translateX.value) },
23
- ],
24
- }), [scale.value, translateX.value, translateY.value]);
25
- return (React.createElement(Animated.View, { pointerEvents: "none", style: [customStyle?.field, animatedStyle], onLayout: handleOnLayout },
26
- React.createElement(Text, { level: 1, numberOfLines: 1, style: [style.fieldText, customStyle?.fieldText], detail: true }, label),
27
- React.createElement(View, { style: [style.fieldBackground, { opacity: isFocused ? 1 : 0 }] })));
28
- };
29
- export { Field };
@@ -1,16 +0,0 @@
1
- declare const style: {
2
- fieldBackground: {
3
- backgroundColor: string;
4
- height: "100%";
5
- position: "absolute";
6
- width: "100%";
7
- zIndex: number;
8
- };
9
- fieldText: {
10
- flexWrap: "nowrap";
11
- overflow: "hidden";
12
- paddingHorizontal: number;
13
- zIndex: number;
14
- };
15
- };
16
- export { style };
@@ -1,19 +0,0 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "@lookiero/sty-psp-ui";
3
- const { colorBgBase, space1 } = theme();
4
- const style = StyleSheet.create({
5
- fieldBackground: {
6
- backgroundColor: colorBgBase,
7
- height: "100%",
8
- position: "absolute",
9
- width: "100%",
10
- zIndex: 0,
11
- },
12
- fieldText: {
13
- flexWrap: "nowrap",
14
- overflow: "hidden",
15
- paddingHorizontal: space1,
16
- zIndex: 1,
17
- },
18
- });
19
- export { style };