@ikas/component-cli 0.93.0 → 0.94.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.
Files changed (374) hide show
  1. package/dist/commands/create.d.ts.map +1 -1
  2. package/dist/commands/create.js +108 -42
  3. package/dist/commands/create.js.map +1 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/utils/component-helpers.js +1 -1
  8. package/dist/utils/component-helpers.js.map +1 -1
  9. package/dist/utils/template.d.ts +12 -0
  10. package/dist/utils/template.d.ts.map +1 -1
  11. package/dist/utils/template.js +44 -0
  12. package/dist/utils/template.js.map +1 -1
  13. package/package.json +3 -2
  14. package/templates/create/claude-md +1 -1
  15. package/templates/create/cursorrules +1 -1
  16. package/templates/create/src/components/ExampleComponent/types.ts +1 -1
  17. package/templates/create/src/components/ExampleSection/types.ts +1 -1
  18. package/templates/create-full/README.md +78 -0
  19. package/templates/create-full/claude-md +721 -0
  20. package/templates/create-full/cursorrules +103 -0
  21. package/templates/create-full/gitignore +4 -0
  22. package/templates/create-full/ikas.config.json +5007 -0
  23. package/templates/create-full/mcp.json +10 -0
  24. package/templates/create-full/package.json +17 -0
  25. package/templates/create-full/src/components/AccountAddresses/components/AddressCard/index.tsx +55 -0
  26. package/templates/create-full/src/components/AccountAddresses/components/AddressCard/styles.css +46 -0
  27. package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +301 -0
  28. package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +22 -0
  29. package/templates/create-full/src/components/AccountAddresses/index.tsx +127 -0
  30. package/templates/create-full/src/components/AccountAddresses/styles.css +41 -0
  31. package/templates/create-full/src/components/AccountAddresses/types.ts +15 -0
  32. package/templates/create-full/src/components/AccountFavorites/index.tsx +82 -0
  33. package/templates/create-full/src/components/AccountFavorites/styles.css +52 -0
  34. package/templates/create-full/src/components/AccountFavorites/types.ts +7 -0
  35. package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/index.tsx +171 -0
  36. package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/styles.css +144 -0
  37. package/templates/create-full/src/components/AccountInfo/index.tsx +91 -0
  38. package/templates/create-full/src/components/AccountInfo/styles.css +35 -0
  39. package/templates/create-full/src/components/AccountInfo/types.ts +9 -0
  40. package/templates/create-full/src/components/AccountInfoContent/index.tsx +134 -0
  41. package/templates/create-full/src/components/AccountInfoContent/styles.css +57 -0
  42. package/templates/create-full/src/components/AccountInfoContent/types.ts +8 -0
  43. package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/index.tsx +78 -0
  44. package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/styles.css +46 -0
  45. package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/index.tsx +20 -0
  46. package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/styles.css +16 -0
  47. package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +112 -0
  48. package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +86 -0
  49. package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/index.tsx +195 -0
  50. package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/styles.css +93 -0
  51. package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/index.tsx +156 -0
  52. package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/styles.css +100 -0
  53. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/index.tsx +56 -0
  54. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/styles.css +57 -0
  55. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx +159 -0
  56. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css +29 -0
  57. package/templates/create-full/src/components/AccountOrderDetail/index.tsx +244 -0
  58. package/templates/create-full/src/components/AccountOrderDetail/styles.css +125 -0
  59. package/templates/create-full/src/components/AccountOrderDetail/types.ts +32 -0
  60. package/templates/create-full/src/components/AccountOrders/components/OrderCard/index.tsx +122 -0
  61. package/templates/create-full/src/components/AccountOrders/components/OrderCard/styles.css +114 -0
  62. package/templates/create-full/src/components/AccountOrders/index.tsx +105 -0
  63. package/templates/create-full/src/components/AccountOrders/styles.css +36 -0
  64. package/templates/create-full/src/components/AccountOrders/types.ts +11 -0
  65. package/templates/create-full/src/components/Announcement/index.tsx +11 -0
  66. package/templates/create-full/src/components/Announcement/styles.css +4 -0
  67. package/templates/create-full/src/components/Announcement/types.ts +4 -0
  68. package/templates/create-full/src/components/Announcements/index.tsx +91 -0
  69. package/templates/create-full/src/components/Announcements/styles.css +45 -0
  70. package/templates/create-full/src/components/Announcements/types.ts +8 -0
  71. package/templates/create-full/src/components/BlogHome/components/BlogCard/index.tsx +89 -0
  72. package/templates/create-full/src/components/BlogHome/components/BlogCard/styles.css +121 -0
  73. package/templates/create-full/src/components/BlogHome/index.tsx +124 -0
  74. package/templates/create-full/src/components/BlogHome/styles.css +118 -0
  75. package/templates/create-full/src/components/BlogHome/types.ts +15 -0
  76. package/templates/create-full/src/components/BlogPost/index.tsx +128 -0
  77. package/templates/create-full/src/components/BlogPost/styles.css +120 -0
  78. package/templates/create-full/src/components/BlogPost/types.ts +12 -0
  79. package/templates/create-full/src/components/CardProductName/index.tsx +25 -0
  80. package/templates/create-full/src/components/CardProductName/styles.css +22 -0
  81. package/templates/create-full/src/components/CardProductName/types.ts +7 -0
  82. package/templates/create-full/src/components/CardProductPrice/index.tsx +30 -0
  83. package/templates/create-full/src/components/CardProductPrice/styles.css +13 -0
  84. package/templates/create-full/src/components/CardProductPrice/types.ts +6 -0
  85. package/templates/create-full/src/components/CardProductVariants/index.tsx +10 -0
  86. package/templates/create-full/src/components/CardProductVariants/styles.css +1 -0
  87. package/templates/create-full/src/components/CardProductVariants/types.ts +6 -0
  88. package/templates/create-full/src/components/CartPage/components/CouponCode/index.tsx +108 -0
  89. package/templates/create-full/src/components/CartPage/components/CouponCode/styles.css +68 -0
  90. package/templates/create-full/src/components/CartPage/components/EmptyState/index.tsx +31 -0
  91. package/templates/create-full/src/components/CartPage/components/EmptyState/styles.css +18 -0
  92. package/templates/create-full/src/components/CartPage/components/OrderSummary/index.tsx +106 -0
  93. package/templates/create-full/src/components/CartPage/components/OrderSummary/styles.css +70 -0
  94. package/templates/create-full/src/components/CartPage/index.tsx +107 -0
  95. package/templates/create-full/src/components/CartPage/styles.css +54 -0
  96. package/templates/create-full/src/components/CartPage/types.ts +16 -0
  97. package/templates/create-full/src/components/CategoryImageItem/components/Card/index.tsx +64 -0
  98. package/templates/create-full/src/components/CategoryImageItem/components/Card/styles.css +56 -0
  99. package/templates/create-full/src/components/CategoryImageItem/index.tsx +64 -0
  100. package/templates/create-full/src/components/CategoryImageItem/styles.css +10 -0
  101. package/templates/create-full/src/components/CategoryImageItem/types.ts +16 -0
  102. package/templates/create-full/src/components/CategoryImages/index.tsx +62 -0
  103. package/templates/create-full/src/components/CategoryImages/styles.css +38 -0
  104. package/templates/create-full/src/components/CategoryImages/types.ts +11 -0
  105. package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +129 -0
  106. package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css +99 -0
  107. package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx +42 -0
  108. package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css +27 -0
  109. package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx +43 -0
  110. package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css +20 -0
  111. package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/index.tsx +114 -0
  112. package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/styles.css +1 -0
  113. package/templates/create-full/src/components/CategoryList/components/FilterListValues/index.tsx +54 -0
  114. package/templates/create-full/src/components/CategoryList/components/FilterListValues/styles.css +22 -0
  115. package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/index.tsx +50 -0
  116. package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/styles.css +25 -0
  117. package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/index.tsx +189 -0
  118. package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/styles.css +89 -0
  119. package/templates/create-full/src/components/CategoryList/components/FilterSidebar/index.tsx +92 -0
  120. package/templates/create-full/src/components/CategoryList/components/FilterSidebar/styles.css +27 -0
  121. package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/index.tsx +63 -0
  122. package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/styles.css +48 -0
  123. package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/index.tsx +146 -0
  124. package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/styles.css +133 -0
  125. package/templates/create-full/src/components/CategoryList/index.tsx +333 -0
  126. package/templates/create-full/src/components/CategoryList/styles.css +110 -0
  127. package/templates/create-full/src/components/CategoryList/types.ts +30 -0
  128. package/templates/create-full/src/components/CollapsibleContent/index.tsx +23 -0
  129. package/templates/create-full/src/components/CollapsibleContent/styles.css +11 -0
  130. package/templates/create-full/src/components/CollapsibleContent/types.ts +6 -0
  131. package/templates/create-full/src/components/CookieBar/index.tsx +78 -0
  132. package/templates/create-full/src/components/CookieBar/styles.css +111 -0
  133. package/templates/create-full/src/components/CookieBar/types.ts +10 -0
  134. package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +168 -0
  135. package/templates/create-full/src/components/CustomerEmailVerification/styles.css +118 -0
  136. package/templates/create-full/src/components/CustomerEmailVerification/types.ts +17 -0
  137. package/templates/create-full/src/components/FeatureItem/index.tsx +27 -0
  138. package/templates/create-full/src/components/FeatureItem/styles.css +19 -0
  139. package/templates/create-full/src/components/FeatureItem/types.ts +7 -0
  140. package/templates/create-full/src/components/Features/index.tsx +25 -0
  141. package/templates/create-full/src/components/Features/styles.css +39 -0
  142. package/templates/create-full/src/components/Features/types.ts +5 -0
  143. package/templates/create-full/src/components/Footer/index.tsx +154 -0
  144. package/templates/create-full/src/components/Footer/styles.css +175 -0
  145. package/templates/create-full/src/components/Footer/types.ts +15 -0
  146. package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +129 -0
  147. package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/styles.css +0 -0
  148. package/templates/create-full/src/components/ForgotPassword/index.tsx +30 -0
  149. package/templates/create-full/src/components/ForgotPassword/styles.css +85 -0
  150. package/templates/create-full/src/components/ForgotPassword/types.ts +13 -0
  151. package/templates/create-full/src/components/Header/index.tsx +53 -0
  152. package/templates/create-full/src/components/Header/styles.css +6 -0
  153. package/templates/create-full/src/components/Header/types.ts +6 -0
  154. package/templates/create-full/src/components/HeroSlider/index.tsx +110 -0
  155. package/templates/create-full/src/components/HeroSlider/styles.css +129 -0
  156. package/templates/create-full/src/components/HeroSlider/types.ts +9 -0
  157. package/templates/create-full/src/components/HeroSliderItem/index.tsx +231 -0
  158. package/templates/create-full/src/components/HeroSliderItem/styles.css +152 -0
  159. package/templates/create-full/src/components/HeroSliderItem/types.ts +34 -0
  160. package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +181 -0
  161. package/templates/create-full/src/components/Login/components/LoginForm/styles.css +0 -0
  162. package/templates/create-full/src/components/Login/index.tsx +37 -0
  163. package/templates/create-full/src/components/Login/styles.css +129 -0
  164. package/templates/create-full/src/components/Login/types.ts +18 -0
  165. package/templates/create-full/src/components/Navbar/components/CartSidebar/index.tsx +203 -0
  166. package/templates/create-full/src/components/Navbar/components/CartSidebar/styles.css +175 -0
  167. package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +198 -0
  168. package/templates/create-full/src/components/Navbar/components/MobileMenu/styles.css +122 -0
  169. package/templates/create-full/src/components/Navbar/components/NavItem/index.tsx +65 -0
  170. package/templates/create-full/src/components/Navbar/components/SearchModal/index.tsx +267 -0
  171. package/templates/create-full/src/components/Navbar/components/SearchModal/styles.css +182 -0
  172. package/templates/create-full/src/components/Navbar/index.tsx +250 -0
  173. package/templates/create-full/src/components/Navbar/styles.css +243 -0
  174. package/templates/create-full/src/components/Navbar/types.ts +37 -0
  175. package/templates/create-full/src/components/NotFound/index.tsx +39 -0
  176. package/templates/create-full/src/components/NotFound/styles.css +46 -0
  177. package/templates/create-full/src/components/NotFound/types.ts +8 -0
  178. package/templates/create-full/src/components/ProductDetail/components/ProductGallery/index.tsx +316 -0
  179. package/templates/create-full/src/components/ProductDetail/components/ProductGallery/styles.css +213 -0
  180. package/templates/create-full/src/components/ProductDetail/index.tsx +92 -0
  181. package/templates/create-full/src/components/ProductDetail/styles.css +58 -0
  182. package/templates/create-full/src/components/ProductDetail/types.ts +12 -0
  183. package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/index.tsx +34 -0
  184. package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/styles.css +4 -0
  185. package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +146 -0
  186. package/templates/create-full/src/components/ProductDetailAddToCart/styles.css +27 -0
  187. package/templates/create-full/src/components/ProductDetailAddToCart/types.ts +18 -0
  188. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +164 -0
  189. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +134 -0
  190. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +188 -0
  191. package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +61 -0
  192. package/templates/create-full/src/components/ProductDetailBundleFurniture/styles.css +12 -0
  193. package/templates/create-full/src/components/ProductDetailBundleFurniture/types.ts +21 -0
  194. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +169 -0
  195. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/styles.css +141 -0
  196. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +35 -0
  197. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +85 -0
  198. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +51 -0
  199. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/styles.css +30 -0
  200. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/index.tsx +54 -0
  201. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/styles.css +22 -0
  202. package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +101 -0
  203. package/templates/create-full/src/components/ProductDetailBundleProduct/styles.css +20 -0
  204. package/templates/create-full/src/components/ProductDetailBundleProduct/types.ts +18 -0
  205. package/templates/create-full/src/components/ProductDetailDescription/index.tsx +56 -0
  206. package/templates/create-full/src/components/ProductDetailDescription/styles.css +21 -0
  207. package/templates/create-full/src/components/ProductDetailDescription/types.ts +13 -0
  208. package/templates/create-full/src/components/ProductDetailFeatureItem/index.tsx +28 -0
  209. package/templates/create-full/src/components/ProductDetailFeatureItem/styles.css +22 -0
  210. package/templates/create-full/src/components/ProductDetailFeatureItem/types.ts +7 -0
  211. package/templates/create-full/src/components/ProductDetailFeatures/index.tsx +40 -0
  212. package/templates/create-full/src/components/ProductDetailFeatures/styles.css +17 -0
  213. package/templates/create-full/src/components/ProductDetailFeatures/types.ts +10 -0
  214. package/templates/create-full/src/components/ProductDetailNameFavorite/index.tsx +66 -0
  215. package/templates/create-full/src/components/ProductDetailNameFavorite/styles.css +45 -0
  216. package/templates/create-full/src/components/ProductDetailNameFavorite/types.ts +11 -0
  217. package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +209 -0
  218. package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/styles.css +146 -0
  219. package/templates/create-full/src/components/ProductDetailOffer/components/OfferSummary/index.tsx +175 -0
  220. package/templates/create-full/src/components/ProductDetailOffer/index.tsx +199 -0
  221. package/templates/create-full/src/components/ProductDetailOffer/styles.css +211 -0
  222. package/templates/create-full/src/components/ProductDetailOffer/types.ts +24 -0
  223. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +52 -0
  224. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/styles.css +19 -0
  225. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +60 -0
  226. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +38 -0
  227. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +102 -0
  228. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +34 -0
  229. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +121 -0
  230. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +87 -0
  231. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/index.tsx +57 -0
  232. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +54 -0
  233. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
  234. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +124 -0
  235. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/styles.css +1 -0
  236. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/index.tsx +217 -0
  237. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/styles.css +87 -0
  238. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionRenderer/index.tsx +133 -0
  239. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/index.tsx +60 -0
  240. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/styles.css +1 -0
  241. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/index.tsx +74 -0
  242. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/styles.css +10 -0
  243. package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +99 -0
  244. package/templates/create-full/src/components/ProductDetailOptionSet/styles.css +30 -0
  245. package/templates/create-full/src/components/ProductDetailOptionSet/types.ts +21 -0
  246. package/templates/create-full/src/components/ProductDetailPrices/index.tsx +62 -0
  247. package/templates/create-full/src/components/ProductDetailPrices/styles.css +32 -0
  248. package/templates/create-full/src/components/ProductDetailPrices/types.ts +10 -0
  249. package/templates/create-full/src/components/ProductDetailProductGroup/index.tsx +74 -0
  250. package/templates/create-full/src/components/ProductDetailProductGroup/styles.css +33 -0
  251. package/templates/create-full/src/components/ProductDetailProductGroup/types.ts +10 -0
  252. package/templates/create-full/src/components/ProductDetailReviews/index.tsx +205 -0
  253. package/templates/create-full/src/components/ProductDetailReviews/styles.css +43 -0
  254. package/templates/create-full/src/components/ProductDetailReviews/types.ts +19 -0
  255. package/templates/create-full/src/components/ProductDetailSku/index.tsx +38 -0
  256. package/templates/create-full/src/components/ProductDetailSku/styles.css +16 -0
  257. package/templates/create-full/src/components/ProductDetailSku/types.ts +11 -0
  258. package/templates/create-full/src/components/ProductDetailVariant/index.tsx +38 -0
  259. package/templates/create-full/src/components/ProductDetailVariant/styles.css +14 -0
  260. package/templates/create-full/src/components/ProductDetailVariant/types.ts +12 -0
  261. package/templates/create-full/src/components/ProductSlider/index.tsx +151 -0
  262. package/templates/create-full/src/components/ProductSlider/styles.css +105 -0
  263. package/templates/create-full/src/components/ProductSlider/types.ts +17 -0
  264. package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +133 -0
  265. package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/styles.css +0 -0
  266. package/templates/create-full/src/components/RecoverPassword/index.tsx +30 -0
  267. package/templates/create-full/src/components/RecoverPassword/styles.css +93 -0
  268. package/templates/create-full/src/components/RecoverPassword/types.ts +13 -0
  269. package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +326 -0
  270. package/templates/create-full/src/components/Register/components/RegisterForm/styles.css +0 -0
  271. package/templates/create-full/src/components/Register/index.tsx +30 -0
  272. package/templates/create-full/src/components/Register/styles.css +152 -0
  273. package/templates/create-full/src/components/Register/types.ts +27 -0
  274. package/templates/create-full/src/components/RichText/index.tsx +25 -0
  275. package/templates/create-full/src/components/RichText/styles.css +51 -0
  276. package/templates/create-full/src/components/RichText/types.ts +5 -0
  277. package/templates/create-full/src/components/SocialMediaIcon/index.tsx +26 -0
  278. package/templates/create-full/src/components/SocialMediaIcon/styles.css +17 -0
  279. package/templates/create-full/src/components/SocialMediaIcon/types.ts +7 -0
  280. package/templates/create-full/src/components/index.ts +50 -0
  281. package/templates/create-full/src/global-types.ts +13 -0
  282. package/templates/create-full/src/global.css +582 -0
  283. package/templates/create-full/src/hooks/useBundleProducts.ts +75 -0
  284. package/templates/create-full/src/hooks/useColumnPreference.ts +26 -0
  285. package/templates/create-full/src/hooks/useInfiniteScroll.ts +49 -0
  286. package/templates/create-full/src/hooks/usePageTracking.ts +56 -0
  287. package/templates/create-full/src/hooks/usePayWithIkas.ts +114 -0
  288. package/templates/create-full/src/hooks/useRedirectIfLoggedIn.ts +35 -0
  289. package/templates/create-full/src/hooks/useScrollLock.ts +20 -0
  290. package/templates/create-full/src/hooks/useToast.ts +27 -0
  291. package/templates/create-full/src/ikas-component-utils.d.ts +3 -0
  292. package/templates/create-full/src/sub-components/Badge/index.tsx +208 -0
  293. package/templates/create-full/src/sub-components/Badge/styles.css +129 -0
  294. package/templates/create-full/src/sub-components/Breadcrumb/index.tsx +57 -0
  295. package/templates/create-full/src/sub-components/Breadcrumb/styles.css +49 -0
  296. package/templates/create-full/src/sub-components/BundleMedia/index.tsx +72 -0
  297. package/templates/create-full/src/sub-components/BundleQuantityBox/index.tsx +73 -0
  298. package/templates/create-full/src/sub-components/BundleQuantityBox/styles.css +43 -0
  299. package/templates/create-full/src/sub-components/Button/index.tsx +52 -0
  300. package/templates/create-full/src/sub-components/Button/styles.css +114 -0
  301. package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/index.tsx +59 -0
  302. package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/styles.css +24 -0
  303. package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +55 -0
  304. package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/styles.css +30 -0
  305. package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/index.tsx +31 -0
  306. package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/styles.css +6 -0
  307. package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/index.tsx +79 -0
  308. package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/styles.css +28 -0
  309. package/templates/create-full/src/sub-components/CartItem/index.tsx +216 -0
  310. package/templates/create-full/src/sub-components/CartItem/styles.css +170 -0
  311. package/templates/create-full/src/sub-components/Checkbox/index.tsx +42 -0
  312. package/templates/create-full/src/sub-components/Checkbox/styles.css +65 -0
  313. package/templates/create-full/src/sub-components/CollapsibleGroup/index.tsx +52 -0
  314. package/templates/create-full/src/sub-components/CollapsibleGroup/styles.css +51 -0
  315. package/templates/create-full/src/sub-components/ColorInput/index.tsx +33 -0
  316. package/templates/create-full/src/sub-components/ColorInput/styles.css +53 -0
  317. package/templates/create-full/src/sub-components/ConfirmModal/index.tsx +60 -0
  318. package/templates/create-full/src/sub-components/ConfirmModal/styles.css +20 -0
  319. package/templates/create-full/src/sub-components/FormItem/index.tsx +66 -0
  320. package/templates/create-full/src/sub-components/FormItem/styles.css +38 -0
  321. package/templates/create-full/src/sub-components/ImagePreviewModal/index.tsx +55 -0
  322. package/templates/create-full/src/sub-components/ImagePreviewModal/styles.css +50 -0
  323. package/templates/create-full/src/sub-components/Input/index.tsx +69 -0
  324. package/templates/create-full/src/sub-components/Input/styles.css +162 -0
  325. package/templates/create-full/src/sub-components/Modal/index.tsx +118 -0
  326. package/templates/create-full/src/sub-components/Modal/styles.css +70 -0
  327. package/templates/create-full/src/sub-components/PageLoader/index.tsx +14 -0
  328. package/templates/create-full/src/sub-components/PageLoader/styles.css +12 -0
  329. package/templates/create-full/src/sub-components/Pagination/index.tsx +107 -0
  330. package/templates/create-full/src/sub-components/Pagination/styles.css +88 -0
  331. package/templates/create-full/src/sub-components/ProductCard/index.tsx +276 -0
  332. package/templates/create-full/src/sub-components/ProductCard/styles.css +99 -0
  333. package/templates/create-full/src/sub-components/QuantitySelector/index.tsx +41 -0
  334. package/templates/create-full/src/sub-components/QuantitySelector/styles.css +51 -0
  335. package/templates/create-full/src/sub-components/ReviewCard/index.tsx +103 -0
  336. package/templates/create-full/src/sub-components/ReviewCard/styles.css +95 -0
  337. package/templates/create-full/src/sub-components/ReviewForm/index.tsx +115 -0
  338. package/templates/create-full/src/sub-components/ReviewForm/styles.css +11 -0
  339. package/templates/create-full/src/sub-components/ReviewSummary/index.tsx +65 -0
  340. package/templates/create-full/src/sub-components/ReviewSummary/styles.css +86 -0
  341. package/templates/create-full/src/sub-components/Select/index.tsx +86 -0
  342. package/templates/create-full/src/sub-components/Select/styles.css +110 -0
  343. package/templates/create-full/src/sub-components/SkeletonField/index.tsx +12 -0
  344. package/templates/create-full/src/sub-components/SkeletonField/styles.css +29 -0
  345. package/templates/create-full/src/sub-components/SliderArrow/index.tsx +26 -0
  346. package/templates/create-full/src/sub-components/SliderArrow/styles.css +24 -0
  347. package/templates/create-full/src/sub-components/SocialLoginButton/index.tsx +24 -0
  348. package/templates/create-full/src/sub-components/SocialLoginButton/styles.css +19 -0
  349. package/templates/create-full/src/sub-components/SpinnerIcon/index.tsx +10 -0
  350. package/templates/create-full/src/sub-components/SpinnerIcon/styles.css +8 -0
  351. package/templates/create-full/src/sub-components/StarRating/index.tsx +76 -0
  352. package/templates/create-full/src/sub-components/StarRating/styles.css +40 -0
  353. package/templates/create-full/src/sub-components/Tag/index.tsx +21 -0
  354. package/templates/create-full/src/sub-components/Tag/styles.css +30 -0
  355. package/templates/create-full/src/sub-components/Textarea/index.tsx +45 -0
  356. package/templates/create-full/src/sub-components/Textarea/styles.css +82 -0
  357. package/templates/create-full/src/sub-components/Toast/index.tsx +257 -0
  358. package/templates/create-full/src/sub-components/Toast/styles.css +3 -0
  359. package/templates/create-full/src/sub-components/Toggle/index.tsx +46 -0
  360. package/templates/create-full/src/sub-components/Toggle/styles.css +86 -0
  361. package/templates/create-full/src/sub-components/VariantBadge/index.tsx +153 -0
  362. package/templates/create-full/src/sub-components/VariantBadge/styles.css +47 -0
  363. package/templates/create-full/src/sub-components/icons/index.tsx +981 -0
  364. package/templates/create-full/src/utils/bundle.ts +70 -0
  365. package/templates/create-full/src/utils/cx.ts +4 -0
  366. package/templates/create-full/src/utils/fullName.ts +6 -0
  367. package/templates/create-full/src/utils/media.ts +36 -0
  368. package/templates/create-full/src/utils/optionPrice.ts +19 -0
  369. package/templates/create-full/src/utils/optionSet.ts +17 -0
  370. package/templates/create-full/src/utils/orderStatus.ts +28 -0
  371. package/templates/create-full/src/utils/pagination.ts +29 -0
  372. package/templates/create-full/src/utils/toast.ts +5 -0
  373. package/templates/create-full/tsconfig.json +30 -0
  374. package/templates/create-full/vite.config.ts +15 -0
@@ -0,0 +1,133 @@
1
+ import {
2
+ getRecoverPasswordForm,
3
+ setRecoverPasswordFormPassword,
4
+ setRecoverPasswordFormPasswordAgain,
5
+ submitRecoverPasswordForm,
6
+ Router,
7
+ } from "@ikas/bp-storefront";
8
+ import { observer } from "@ikas/component-utils";
9
+
10
+ import { Props } from "../../types";
11
+ import Button from "../../../../sub-components/Button";
12
+ import Input from "../../../../sub-components/Input";
13
+ import FormItem from "../../../../sub-components/FormItem";
14
+
15
+ interface RecoverPasswordFormProps extends Omit<Props, "backgroundColor"> {
16
+ recoverForm: ReturnType<typeof getRecoverPasswordForm>;
17
+ }
18
+
19
+ const RecoverPasswordForm = observer(function RecoverPasswordForm({
20
+ recoverForm,
21
+ title = "Parola Değiştirme",
22
+ subtitle = "Lütfen yeni parolanızı belirleyiniz.",
23
+ passwordLabel = "Yeni Şifre",
24
+ passwordPlaceholder = "Parola",
25
+ passwordAgainLabel = "Yeni Şifre Tekrar",
26
+ passwordAgainPlaceholder = "Parola",
27
+ submitButtonText = "Değiştir",
28
+ submittingButtonText = "Değiştiriliyor...",
29
+ successMessage = "Parolanız başarıyla değiştirildi.",
30
+ loginLinkText = "Giriş Yap",
31
+ }: RecoverPasswordFormProps) {
32
+ const handleSubmit = async (e: Event) => {
33
+ e.preventDefault();
34
+ const success = await submitRecoverPasswordForm(recoverForm);
35
+ if (success) {
36
+ Router.navigateToPage("LOGIN");
37
+ }
38
+ };
39
+
40
+ return (
41
+ <div className="recover-password__container">
42
+ <div className="recover-password__header">
43
+ <h1 className="recover-password__title text-xl-medium md:display-xs-medium">{title}</h1>
44
+ <p className="recover-password__subtitle text-sm-regular">{subtitle}</p>
45
+ </div>
46
+
47
+ {recoverForm.isSuccess && (
48
+ <div className="recover-password__success-banner text-sm-regular">
49
+ {successMessage}
50
+ </div>
51
+ )}
52
+
53
+ {recoverForm.isFailure && recoverForm.responseMessage && (
54
+ <div className="recover-password__error-banner text-sm-regular">
55
+ {recoverForm.responseMessage}
56
+ </div>
57
+ )}
58
+
59
+ {!recoverForm.isSuccess && (
60
+ <form className="recover-password__form" onSubmit={handleSubmit}>
61
+ <FormItem
62
+ label={passwordLabel}
63
+ htmlFor="recover-password"
64
+ status={recoverForm.password?.hasError ? "error" : "default"}
65
+ helper={
66
+ recoverForm.password?.hasError
67
+ ? recoverForm.password.message
68
+ : undefined
69
+ }
70
+ >
71
+ <Input
72
+ id="recover-password"
73
+ password
74
+ placeholder={passwordPlaceholder}
75
+ value={recoverForm.password?.value ?? ""}
76
+ onInput={(e: Event) =>
77
+ setRecoverPasswordFormPassword(
78
+ recoverForm,
79
+ (e.target as HTMLInputElement).value,
80
+ )
81
+ }
82
+ />
83
+ </FormItem>
84
+
85
+ <FormItem
86
+ label={passwordAgainLabel}
87
+ htmlFor="recover-password-again"
88
+ status={recoverForm.passwordAgain?.hasError ? "error" : "default"}
89
+ helper={
90
+ recoverForm.passwordAgain?.hasError
91
+ ? recoverForm.passwordAgain.message
92
+ : undefined
93
+ }
94
+ >
95
+ <Input
96
+ id="recover-password-again"
97
+ password
98
+ placeholder={passwordAgainPlaceholder}
99
+ value={recoverForm.passwordAgain?.value ?? ""}
100
+ onInput={(e: Event) =>
101
+ setRecoverPasswordFormPasswordAgain(
102
+ recoverForm,
103
+ (e.target as HTMLInputElement).value,
104
+ )
105
+ }
106
+ />
107
+ </FormItem>
108
+
109
+ <Button
110
+ variant="primary"
111
+ size="s"
112
+ className="recover-password__submit-btn"
113
+ disabled={recoverForm.isSubmitting}
114
+ >
115
+ {recoverForm.isSubmitting ? submittingButtonText : submitButtonText}
116
+ </Button>
117
+ </form>
118
+ )}
119
+
120
+ <div className="recover-password__footer">
121
+ <button
122
+ type="button"
123
+ className="recover-password__login-link text-sm-medium"
124
+ onClick={() => Router.navigateToPage("LOGIN")}
125
+ >
126
+ {loginLinkText}
127
+ </button>
128
+ </div>
129
+ </div>
130
+ );
131
+ });
132
+
133
+ export default RecoverPasswordForm;
@@ -0,0 +1,30 @@
1
+ import {
2
+ customerStore,
3
+ getRecoverPasswordForm,
4
+ initRecoverPasswordForm,
5
+ } from "@ikas/bp-storefront";
6
+ import { useRedirectIfLoggedIn } from "../../hooks/useRedirectIfLoggedIn";
7
+
8
+ import { Props } from "./types";
9
+ import RecoverPasswordForm from "./components/RecoverPasswordForm";
10
+ import PageLoader from "../../sub-components/PageLoader";
11
+
12
+ export function RecoverPassword(props: Props) {
13
+ const recoverForm = getRecoverPasswordForm(customerStore);
14
+
15
+ const isChecking = useRedirectIfLoggedIn(() => {
16
+ initRecoverPasswordForm(recoverForm);
17
+ });
18
+
19
+ if (isChecking) return <PageLoader />;
20
+
21
+ return (
22
+ <section className="recover-password">
23
+ <div className="recover-password__wrapper kombos-container">
24
+ <RecoverPasswordForm recoverForm={recoverForm} {...props} />
25
+ </div>
26
+ </section>
27
+ );
28
+ }
29
+
30
+ export default RecoverPassword;
@@ -0,0 +1,93 @@
1
+ .recover-password {
2
+ width: 100%;
3
+ }
4
+
5
+ .recover-password__wrapper {
6
+ display: flex;
7
+ justify-content: center;
8
+ align-items: flex-start;
9
+ padding-top: 1rem;
10
+ padding-bottom: 1rem;
11
+ }
12
+
13
+ .recover-password__container {
14
+ width: 100%;
15
+ max-width: 29rem;
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 2rem;
19
+ }
20
+
21
+ .recover-password__header {
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: 1rem;
25
+ text-align: center;
26
+ }
27
+
28
+ .recover-password__title {
29
+ color: var(--kombos-gray-900);
30
+ margin: 0;
31
+ }
32
+
33
+ .recover-password__subtitle {
34
+ color: var(--kombos-gray-700);
35
+ margin: 0;
36
+ }
37
+
38
+ .recover-password__success-banner {
39
+ padding: 0.75rem 1rem;
40
+ background: rgba(18, 183, 106, 0.08);
41
+ border: 1px solid var(--kombos-success);
42
+ border-radius: 6px;
43
+ color: var(--kombos-success);
44
+ }
45
+
46
+ .recover-password__error-banner {
47
+ padding: 0.75rem 1rem;
48
+ background: rgba(255, 60, 72, 0.08);
49
+ border: 1px solid var(--kombos-error);
50
+ border-radius: 6px;
51
+ color: var(--kombos-error);
52
+ }
53
+
54
+ .recover-password__form {
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: 1.5rem;
58
+ }
59
+
60
+ .recover-password__submit-btn {
61
+ width: 100%;
62
+ }
63
+
64
+ .recover-password__footer {
65
+ text-align: center;
66
+ }
67
+
68
+ .recover-password__login-link {
69
+ background: none;
70
+ border: none;
71
+ padding: 0;
72
+ color: var(--kombos-gray-700);
73
+ cursor: pointer;
74
+ text-decoration: underline;
75
+ }
76
+
77
+ .recover-password__login-link:hover {
78
+ color: var(--kombos-gray-900);
79
+ }
80
+
81
+ @media (min-width: 768px) {
82
+ .recover-password__wrapper {
83
+ padding-top: 1.5rem;
84
+ padding-bottom: 1.5rem;
85
+ }
86
+ }
87
+
88
+ @media (min-width: 1024px) {
89
+ .recover-password__wrapper {
90
+ padding-top: 2rem;
91
+ padding-bottom: 2rem;
92
+ }
93
+ }
@@ -0,0 +1,13 @@
1
+ // This file is auto-generated — do not edit manually.
2
+ export interface Props {
3
+ title?: string;
4
+ subtitle?: string;
5
+ passwordLabel?: string;
6
+ passwordPlaceholder?: string;
7
+ passwordAgainLabel?: string;
8
+ passwordAgainPlaceholder?: string;
9
+ submitButtonText?: string;
10
+ submittingButtonText?: string;
11
+ successMessage?: string;
12
+ loginLinkText?: string;
13
+ }
@@ -0,0 +1,326 @@
1
+ import {
2
+ customerStore,
3
+ getRegisterForm,
4
+ setRegisterFormFirstName,
5
+ setRegisterFormLastName,
6
+ setRegisterFormEmail,
7
+ setRegisterFormPassword,
8
+ setRegisterFormIsMarketingAccepted,
9
+ setRegisterFormIsMembershipAgreementAccepted,
10
+ submitRegisterForm,
11
+ socialLogin,
12
+ Router,
13
+ } from "@ikas/bp-storefront";
14
+ import { observer } from "@ikas/component-utils";
15
+
16
+ import { Props } from "../../types";
17
+ import Button from "../../../../sub-components/Button";
18
+ import Input from "../../../../sub-components/Input";
19
+ import FormItem from "../../../../sub-components/FormItem";
20
+ import Checkbox from "../../../../sub-components/Checkbox";
21
+ import SocialLoginButton from "../../../../sub-components/SocialLoginButton";
22
+ import { GoogleSVG, FacebookSVG } from "../../../../sub-components/icons";
23
+
24
+ interface RegisterFormProps extends Props {
25
+ registerForm: ReturnType<typeof getRegisterForm>;
26
+ }
27
+
28
+ const RegisterForm = observer(function RegisterForm({
29
+ registerForm,
30
+ title = "Hesap Oluştur",
31
+ subtitle = "Hemen ücretsiz hesap oluşturun ve alışverişe başlayın.",
32
+ firstNameLabel = "İsim",
33
+ lastNameLabel = "Soyisim",
34
+ emailLabel = "E-posta",
35
+ passwordLabel = "Şifre",
36
+ firstNamePlaceholder,
37
+ lastNamePlaceholder,
38
+ emailPlaceholder,
39
+ passwordPlaceholder = "Şifrenizi girin",
40
+ submitButtonText = "Kayıt Ol",
41
+ submittingButtonText = "Kayıt yapılıyor...",
42
+ loginLinkText = "Zaten hesabınız var mı? Giriş yapın",
43
+ marketingConsentText = "Kampanya ve promosyonlardan e-posta ile haberdar olmak istiyorum",
44
+ agreementConsentText = "Üyelik sözleşmesini kabul ediyorum",
45
+ googleButtonText = "Google ile kayıt ol",
46
+ facebookButtonText = "Facebook ile kayıt ol",
47
+ dividerText = "veya",
48
+ showGoogleLogin = false,
49
+ showFacebookLogin = false,
50
+ marketingConsentLink,
51
+ agreementConsentLink,
52
+ }: RegisterFormProps) {
53
+ const resolvedFirstNamePlaceholder = firstNamePlaceholder || firstNameLabel;
54
+ const resolvedLastNamePlaceholder = lastNamePlaceholder || lastNameLabel;
55
+ const resolvedEmailPlaceholder = emailPlaceholder || emailLabel;
56
+
57
+ const showSocialLogin = showGoogleLogin || showFacebookLogin;
58
+
59
+ const handleSubmit = async (e: Event) => {
60
+ e.preventDefault();
61
+ const success = await submitRegisterForm(registerForm);
62
+ if (success) {
63
+ Router.navigateToPage("ACCOUNT");
64
+ }
65
+ };
66
+
67
+ return (
68
+ <div className="register__container">
69
+ <div className="register__header">
70
+ <h1 className="register__title text-xl-medium md:display-xs-medium">
71
+ {title}
72
+ </h1>
73
+ <div
74
+ className="register__subtitle text-sm-regular"
75
+ dangerouslySetInnerHTML={{ __html: subtitle }}
76
+ />
77
+ </div>
78
+
79
+ {registerForm.isFailure && registerForm.responseMessage && (
80
+ <div className="register__error-banner text-sm-regular">
81
+ {registerForm.responseMessage}
82
+ </div>
83
+ )}
84
+
85
+ {showSocialLogin && (
86
+ <div className="register__social">
87
+ {showGoogleLogin && (
88
+ <SocialLoginButton
89
+ icon={<GoogleSVG />}
90
+ onClick={() => socialLogin(customerStore, "google")}
91
+ >
92
+ {googleButtonText}
93
+ </SocialLoginButton>
94
+ )}
95
+ {showFacebookLogin && (
96
+ <SocialLoginButton
97
+ icon={<FacebookSVG />}
98
+ onClick={() => socialLogin(customerStore, "facebook")}
99
+ >
100
+ {facebookButtonText}
101
+ </SocialLoginButton>
102
+ )}
103
+ </div>
104
+ )}
105
+
106
+ {showSocialLogin && (
107
+ <div className="register__divider">
108
+ <span className="register__divider-line" />
109
+ <span className="register__divider-text text-xs-regular">
110
+ {dividerText}
111
+ </span>
112
+ <span className="register__divider-line" />
113
+ </div>
114
+ )}
115
+
116
+ <form className="register__form" onSubmit={handleSubmit}>
117
+ <FormItem
118
+ label={firstNameLabel}
119
+ htmlFor="register-first-name"
120
+ status={registerForm.firstName?.hasError ? "error" : "default"}
121
+ helper={
122
+ registerForm.firstName?.hasError
123
+ ? registerForm.firstName.message
124
+ : undefined
125
+ }
126
+ >
127
+ <Input
128
+ id="register-first-name"
129
+ name="given-name"
130
+ autoComplete="given-name"
131
+ placeholder={resolvedFirstNamePlaceholder}
132
+ value={registerForm.firstName?.value ?? ""}
133
+ onInput={(e: Event) =>
134
+ setRegisterFormFirstName(
135
+ registerForm,
136
+ (e.target as HTMLInputElement).value,
137
+ )
138
+ }
139
+ />
140
+ </FormItem>
141
+
142
+ <FormItem
143
+ label={lastNameLabel}
144
+ htmlFor="register-last-name"
145
+ status={registerForm.lastName?.hasError ? "error" : "default"}
146
+ helper={
147
+ registerForm.lastName?.hasError
148
+ ? registerForm.lastName.message
149
+ : undefined
150
+ }
151
+ >
152
+ <Input
153
+ id="register-last-name"
154
+ name="family-name"
155
+ autoComplete="family-name"
156
+ placeholder={resolvedLastNamePlaceholder}
157
+ value={registerForm.lastName?.value ?? ""}
158
+ onInput={(e: Event) =>
159
+ setRegisterFormLastName(
160
+ registerForm,
161
+ (e.target as HTMLInputElement).value,
162
+ )
163
+ }
164
+ />
165
+ </FormItem>
166
+
167
+ <FormItem
168
+ label={emailLabel}
169
+ htmlFor="register-email"
170
+ status={registerForm.email?.hasError ? "error" : "default"}
171
+ helper={
172
+ registerForm.email?.hasError
173
+ ? registerForm.email.message
174
+ : undefined
175
+ }
176
+ >
177
+ <Input
178
+ id="register-email"
179
+ type="email"
180
+ name="email"
181
+ autoComplete="email"
182
+ placeholder={resolvedEmailPlaceholder}
183
+ value={registerForm.email?.value ?? ""}
184
+ onInput={(e: Event) =>
185
+ setRegisterFormEmail(
186
+ registerForm,
187
+ (e.target as HTMLInputElement).value,
188
+ )
189
+ }
190
+ />
191
+ </FormItem>
192
+
193
+ <FormItem
194
+ label={passwordLabel}
195
+ htmlFor="register-password"
196
+ status={registerForm.password?.hasError ? "error" : "default"}
197
+ helper={
198
+ registerForm.password?.hasError
199
+ ? registerForm.password.message
200
+ : undefined
201
+ }
202
+ >
203
+ <Input
204
+ id="register-password"
205
+ password
206
+ name="new-password"
207
+ autoComplete="new-password"
208
+ placeholder={passwordPlaceholder}
209
+ value={registerForm.password?.value ?? ""}
210
+ onInput={(e: Event) =>
211
+ setRegisterFormPassword(
212
+ registerForm,
213
+ (e.target as HTMLInputElement).value,
214
+ )
215
+ }
216
+ />
217
+ </FormItem>
218
+
219
+ <div className="register__consents">
220
+ <div className="register__consent-field">
221
+ <div className="register__consent-row">
222
+ <Checkbox
223
+ checked={registerForm.isMarketingAccepted?.value ?? false}
224
+ onChange={(checked) =>
225
+ setRegisterFormIsMarketingAccepted(registerForm, checked)
226
+ }
227
+ />
228
+ {marketingConsentLink?.href ? (
229
+ <a
230
+ className="register__consent-label text-sm-regular"
231
+ href={marketingConsentLink.href}
232
+ target={
233
+ marketingConsentLink.openInNewTab ? "_blank" : undefined
234
+ }
235
+ rel={
236
+ marketingConsentLink.openInNewTab
237
+ ? "noopener noreferrer"
238
+ : undefined
239
+ }
240
+ dangerouslySetInnerHTML={{ __html: marketingConsentText }}
241
+ />
242
+ ) : (
243
+ <span
244
+ className="register__consent-label text-sm-regular"
245
+ dangerouslySetInnerHTML={{ __html: marketingConsentText }}
246
+ />
247
+ )}
248
+ </div>
249
+ {registerForm.isMarketingAccepted?.hasError && (
250
+ <span className="register__consent-error text-xs-regular">
251
+ {registerForm.isMarketingAccepted.message}
252
+ </span>
253
+ )}
254
+ </div>
255
+
256
+ <div className="register__consent-field">
257
+ <div className="register__consent-row">
258
+ <Checkbox
259
+ checked={
260
+ registerForm.isMembershipAgreementAccepted?.value ?? false
261
+ }
262
+ onChange={(checked) =>
263
+ setRegisterFormIsMembershipAgreementAccepted(
264
+ registerForm,
265
+ checked,
266
+ )
267
+ }
268
+ status={
269
+ registerForm.isMembershipAgreementAccepted?.hasError
270
+ ? "error"
271
+ : "default"
272
+ }
273
+ />
274
+ {agreementConsentLink?.href ? (
275
+ <a
276
+ className="register__consent-label text-sm-regular"
277
+ href={agreementConsentLink.href}
278
+ target={
279
+ agreementConsentLink.openInNewTab ? "_blank" : undefined
280
+ }
281
+ rel={
282
+ agreementConsentLink.openInNewTab
283
+ ? "noopener noreferrer"
284
+ : undefined
285
+ }
286
+ dangerouslySetInnerHTML={{ __html: agreementConsentText }}
287
+ />
288
+ ) : (
289
+ <span
290
+ className="register__consent-label text-sm-regular"
291
+ dangerouslySetInnerHTML={{ __html: agreementConsentText }}
292
+ />
293
+ )}
294
+ </div>
295
+ {registerForm.isMembershipAgreementAccepted?.hasError && (
296
+ <span className="register__consent-error text-xs-regular">
297
+ {registerForm.isMembershipAgreementAccepted.message}
298
+ </span>
299
+ )}
300
+ </div>
301
+ </div>
302
+
303
+ <Button
304
+ variant="primary"
305
+ size="s"
306
+ className="register__submit-btn"
307
+ disabled={registerForm.isSubmitting}
308
+ >
309
+ {registerForm.isSubmitting ? submittingButtonText : submitButtonText}
310
+ </Button>
311
+ </form>
312
+
313
+ <div className="register__footer">
314
+ <button
315
+ type="button"
316
+ className="register__login-link text-sm-medium"
317
+ onClick={() => Router.navigateToPage("LOGIN")}
318
+ >
319
+ {loginLinkText}
320
+ </button>
321
+ </div>
322
+ </div>
323
+ );
324
+ });
325
+
326
+ export default RegisterForm;
@@ -0,0 +1,30 @@
1
+ import {
2
+ customerStore,
3
+ getRegisterForm,
4
+ initRegisterForm,
5
+ } from "@ikas/bp-storefront";
6
+ import { useRedirectIfLoggedIn } from "../../hooks/useRedirectIfLoggedIn";
7
+
8
+ import { Props } from "./types";
9
+ import RegisterForm from "./components/RegisterForm";
10
+ import PageLoader from "../../sub-components/PageLoader";
11
+
12
+ export function Register(props: Props) {
13
+ const registerForm = getRegisterForm(customerStore);
14
+
15
+ const isChecking = useRedirectIfLoggedIn(() => {
16
+ initRegisterForm(registerForm);
17
+ });
18
+
19
+ if (isChecking) return <PageLoader />;
20
+
21
+ return (
22
+ <section className="register">
23
+ <div className="register__wrapper kombos-container">
24
+ <RegisterForm registerForm={registerForm} {...props} />
25
+ </div>
26
+ </section>
27
+ );
28
+ }
29
+
30
+ export default Register;