@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
+ getDisplayedChildOptions,
3
+ isTextOption,
4
+ isTextAreaOption,
5
+ isCheckboxOption,
6
+ isChoiceOption,
7
+ isColorPickerOption,
8
+ isDatePickerOption,
9
+ isFileOption,
10
+ IkasProductOption,
11
+ } from "@ikas/bp-storefront";
12
+ import { observer } from "@ikas/component-utils";
13
+
14
+ import OptionText from "../OptionText";
15
+ import OptionTextarea from "../OptionTextarea";
16
+ import OptionCheckbox from "../OptionCheckbox";
17
+ import OptionChoice from "../OptionChoice";
18
+ import OptionColorPicker from "../OptionColorPicker";
19
+ import OptionDatePicker from "../OptionDatePicker";
20
+ import OptionFile from "../OptionFile";
21
+
22
+ export interface TextProps {
23
+ requiredErrorText: string;
24
+ selectPlaceholderText: string;
25
+ fileDropText: string;
26
+ uploadingText: string;
27
+ uploadFailedText: string;
28
+ fileSizeErrorText: string;
29
+ fileTypeErrorText: string;
30
+ maxFilesErrorText: string;
31
+ minLabelText: string;
32
+ maxLabelText: string;
33
+ fileFallbackNameText: string;
34
+ }
35
+
36
+ interface Props {
37
+ option: IkasProductOption;
38
+ showError: boolean;
39
+ texts: TextProps;
40
+ }
41
+
42
+ function renderOption(
43
+ option: IkasProductOption,
44
+ showError: boolean,
45
+ texts: TextProps,
46
+ ) {
47
+ const commonProps = {
48
+ option,
49
+ showError,
50
+ requiredErrorText: texts.requiredErrorText,
51
+ };
52
+
53
+ const minMaxProps = {
54
+ minLabelText: texts.minLabelText,
55
+ maxLabelText: texts.maxLabelText,
56
+ };
57
+
58
+ if (isTextOption(option)) {
59
+ return <OptionText {...commonProps} {...minMaxProps} />;
60
+ }
61
+
62
+ if (isTextAreaOption(option)) {
63
+ return <OptionTextarea {...commonProps} {...minMaxProps} />;
64
+ }
65
+
66
+ if (isCheckboxOption(option)) {
67
+ return <OptionCheckbox {...commonProps} />;
68
+ }
69
+
70
+ if (isChoiceOption(option)) {
71
+ return (
72
+ <OptionChoice
73
+ {...commonProps}
74
+ {...minMaxProps}
75
+ placeholderText={texts.selectPlaceholderText}
76
+ />
77
+ );
78
+ }
79
+
80
+ if (isColorPickerOption(option)) {
81
+ return <OptionColorPicker {...commonProps} />;
82
+ }
83
+
84
+ if (isDatePickerOption(option)) {
85
+ return <OptionDatePicker {...commonProps} {...minMaxProps} />;
86
+ }
87
+
88
+ if (isFileOption(option)) {
89
+ return (
90
+ <OptionFile
91
+ {...commonProps}
92
+ {...minMaxProps}
93
+ fileFallbackNameText={texts.fileFallbackNameText}
94
+ fileDropText={texts.fileDropText}
95
+ uploadingText={texts.uploadingText}
96
+ uploadFailedText={texts.uploadFailedText}
97
+ fileSizeErrorText={texts.fileSizeErrorText}
98
+ fileTypeErrorText={texts.fileTypeErrorText}
99
+ maxFilesErrorText={texts.maxFilesErrorText}
100
+ />
101
+ );
102
+ }
103
+
104
+ return null;
105
+ }
106
+
107
+ const OptionRenderer = observer(function OptionRenderer({
108
+ option,
109
+ showError,
110
+ texts,
111
+ }: Props) {
112
+ const childOptions = getDisplayedChildOptions(option) as IkasProductOption[];
113
+
114
+ return (
115
+ <div key={option.id} className="kombos-pd-optset__option">
116
+ {renderOption(option, showError, texts)}
117
+ {childOptions.length > 0 && (
118
+ <div className="kombos-pd-optset__children">
119
+ {childOptions.map((child) => (
120
+ <OptionRenderer
121
+ key={child.id}
122
+ option={child}
123
+ showError={showError}
124
+ texts={texts}
125
+ />
126
+ ))}
127
+ </div>
128
+ )}
129
+ </div>
130
+ );
131
+ });
132
+
133
+ export default OptionRenderer;
@@ -0,0 +1,60 @@
1
+ import {
2
+ IkasProductOption,
3
+ getTextValue,
4
+ setTextValue,
5
+ hasError as hasOptionError,
6
+ getProductOptionFormattedLabel,
7
+ } from "@ikas/bp-storefront";
8
+ import { observer } from "@ikas/component-utils";
9
+ import Input from "../../../../sub-components/Input";
10
+ import FormItem from "../../../../sub-components/FormItem";
11
+
12
+ interface Props {
13
+ option: IkasProductOption;
14
+ showError: boolean;
15
+ requiredErrorText: string;
16
+ minLabelText: string;
17
+ maxLabelText: string;
18
+ }
19
+
20
+ const OptionText = observer(function OptionText({
21
+ option,
22
+ showError,
23
+ requiredErrorText,
24
+ minLabelText,
25
+ maxLabelText,
26
+ }: Props) {
27
+ const value = getTextValue(option);
28
+ const errored = showError && hasOptionError(option);
29
+ const settings = option.textSettings;
30
+
31
+ const helperParts: string[] = [];
32
+ if (settings?.min != null) helperParts.push(`${minLabelText}${settings.min}`);
33
+ if (settings?.max != null) helperParts.push(`${maxLabelText}${settings.max}`);
34
+ const helperText =
35
+ helperParts.length > 0 ? helperParts.join(" / ") : undefined;
36
+
37
+ const inputId = `option-text-${option.id}`;
38
+
39
+ return (
40
+ <FormItem
41
+ label={getProductOptionFormattedLabel(option)}
42
+ htmlFor={inputId}
43
+ status={errored ? "error" : "default"}
44
+ description={option.optionalText}
45
+ helper={errored ? requiredErrorText : helperText}
46
+ >
47
+ <Input
48
+ id={inputId}
49
+ value={value}
50
+ onInput={(e: Event) =>
51
+ setTextValue(option, (e.target as HTMLInputElement).value)
52
+ }
53
+ maxLength={settings?.max ?? undefined}
54
+ size="xs"
55
+ />
56
+ </FormItem>
57
+ );
58
+ });
59
+
60
+ export default OptionText;
@@ -0,0 +1 @@
1
+ /* FormItem handles all layout and styling */
@@ -0,0 +1,74 @@
1
+ import {
2
+ IkasProductOption,
3
+ getTextValue,
4
+ setTextValue,
5
+ hasError as hasOptionError,
6
+ getProductOptionFormattedLabel,
7
+ } from "@ikas/bp-storefront";
8
+ import { observer } from "@ikas/component-utils";
9
+ import Textarea from "../../../../sub-components/Textarea";
10
+ import FormItem from "../../../../sub-components/FormItem";
11
+
12
+ interface Props {
13
+ option: IkasProductOption;
14
+ showError: boolean;
15
+ requiredErrorText: string;
16
+ minLabelText: string;
17
+ maxLabelText: string;
18
+ }
19
+
20
+ const OptionTextarea = observer(function OptionTextarea({
21
+ option,
22
+ showError,
23
+ requiredErrorText,
24
+ minLabelText,
25
+ maxLabelText,
26
+ }: Props) {
27
+ const value = getTextValue(option);
28
+ const errored = showError && hasOptionError(option);
29
+ const settings = option.textSettings;
30
+
31
+ const helperParts: string[] = [];
32
+ if (settings?.min != null) helperParts.push(`${minLabelText}${settings.min}`);
33
+ if (settings?.max != null) helperParts.push(`${maxLabelText}${settings.max}`);
34
+ const helperText =
35
+ helperParts.length > 0 ? helperParts.join(" / ") : undefined;
36
+
37
+ const textareaId = `option-textarea-${option.id}`;
38
+
39
+ return (
40
+ <FormItem
41
+ label={getProductOptionFormattedLabel(option)}
42
+ htmlFor={textareaId}
43
+ status={errored ? "error" : "default"}
44
+ helper={
45
+ errored ? (
46
+ requiredErrorText
47
+ ) : (
48
+ <div className="kombos-option-textarea__footer">
49
+ {helperText ? helperText : <span />}
50
+ {settings?.max != null && (
51
+ <span className="kombos-option-textarea__counter">
52
+ {(value ?? "").length} / {settings.max}
53
+ </span>
54
+ )}
55
+ </div>
56
+ )
57
+ }
58
+ description={option.optionalText}
59
+ >
60
+ <Textarea
61
+ id={textareaId}
62
+ value={value}
63
+ onInput={(e: Event) =>
64
+ setTextValue(option, (e.target as HTMLTextAreaElement).value)
65
+ }
66
+ maxLength={settings?.max ?? undefined}
67
+ rows={4}
68
+ size="xs"
69
+ />
70
+ </FormItem>
71
+ );
72
+ });
73
+
74
+ export default OptionTextarea;
@@ -0,0 +1,10 @@
1
+ .kombos-option-textarea__footer {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: baseline;
5
+ }
6
+
7
+ .kombos-option-textarea__counter {
8
+ color: var(--kombos-gray-400);
9
+ margin-left: auto;
10
+ }
@@ -0,0 +1,99 @@
1
+ import {
2
+ getProductOptionSet,
3
+ getDisplayedOptions,
4
+ getFormattedMarginTopSize,
5
+ getFormattedMarginBottomSize,
6
+ IkasProductOption,
7
+ } from "@ikas/bp-storefront";
8
+ import { useEffect, useState } from "preact/hooks";
9
+ import { Props } from "./types";
10
+
11
+ import OptionRenderer from "./components/OptionRenderer";
12
+ import type { TextProps } from "./components/OptionRenderer";
13
+
14
+ export function ProductDetailOptionSet({
15
+ product,
16
+ requiredFieldErrorText = "Bu alan zorunludur",
17
+ selectPlaceholderText = "Seçiniz",
18
+ fileDropText = "Dosya seçin veya sürükleyin",
19
+ uploadingText = "Yükleniyor...",
20
+ uploadFailedText = "Yükleme başarısız",
21
+ fileSizeErrorText = "{fileName}: max {maxSize}MB",
22
+ fileTypeErrorText = "{fileName}: {ext} uzantısına izin verilmiyor",
23
+ maxFilesErrorText = "En fazla {max} dosya yüklenebilir",
24
+ minLabelText = "Min: ",
25
+ maxLabelText = "Max: ",
26
+ fileFallbackNameText = "File",
27
+ mobileMarginTop,
28
+ mobileMarginBottom,
29
+ desktopMarginTop,
30
+ desktopMarginBottom,
31
+ }: Props) {
32
+ const [loaded, setLoaded] = useState(false);
33
+ const [showError, setShowError] = useState(false);
34
+
35
+ useEffect(() => {
36
+ if (!product) return;
37
+ getProductOptionSet(product).then(() => setLoaded(true));
38
+ }, [product]);
39
+
40
+ useEffect(() => {
41
+ const showHandler = () => setShowError(true);
42
+ const resetHandler = () => setShowError(false);
43
+ window.addEventListener("ikas:show-option-errors", showHandler);
44
+ window.addEventListener("ikas:reset-option-state", resetHandler);
45
+ return () => {
46
+ window.removeEventListener("ikas:show-option-errors", showHandler);
47
+ window.removeEventListener("ikas:reset-option-state", resetHandler);
48
+ };
49
+ }, []);
50
+
51
+ if (!product || !loaded) return null;
52
+
53
+ const optionSet = product.productOptionSet;
54
+ if (!optionSet) return null;
55
+
56
+ const displayedOptions = getDisplayedOptions(
57
+ optionSet,
58
+ ) as IkasProductOption[];
59
+ if (!displayedOptions.length) return null;
60
+
61
+ const texts: TextProps = {
62
+ requiredErrorText: requiredFieldErrorText,
63
+ selectPlaceholderText,
64
+ fileDropText,
65
+ uploadingText,
66
+ uploadFailedText,
67
+ fileSizeErrorText,
68
+ fileTypeErrorText,
69
+ maxFilesErrorText,
70
+ minLabelText,
71
+ maxLabelText,
72
+ fileFallbackNameText,
73
+ };
74
+
75
+ return (
76
+ <div
77
+ className="kombos-pd-optset"
78
+ style={{
79
+ "--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
80
+ "--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
81
+ "--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
82
+ "--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
83
+ }}
84
+ >
85
+ <div className="kombos-pd-optset__list">
86
+ {displayedOptions.map((option) => (
87
+ <OptionRenderer
88
+ key={option.id}
89
+ option={option as unknown as IkasProductOption}
90
+ showError={showError}
91
+ texts={texts}
92
+ />
93
+ ))}
94
+ </div>
95
+ </div>
96
+ );
97
+ }
98
+
99
+ export default ProductDetailOptionSet;
@@ -0,0 +1,30 @@
1
+ .kombos-pd-optset {
2
+ margin-top: var(--mobile-mt);
3
+ margin-bottom: var(--mobile-mb);
4
+ }
5
+
6
+ @media (min-width: 1024px) {
7
+ .kombos-pd-optset {
8
+ margin-top: var(--desktop-mt, var(--mobile-mt));
9
+ margin-bottom: var(--desktop-mb, var(--mobile-mb));
10
+ }
11
+ }
12
+
13
+ .kombos-pd-optset__list {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 1rem;
17
+ }
18
+
19
+ .kombos-pd-optset__option {
20
+ display: flex;
21
+ flex-direction: column;
22
+ }
23
+
24
+ .kombos-pd-optset__children {
25
+ display: flex;
26
+ flex-direction: column;
27
+ gap: 1rem;
28
+ margin-top: 0.5rem;
29
+ padding-left: 0.5rem;
30
+ }
@@ -0,0 +1,21 @@
1
+ // This file is auto-generated — do not edit manually.
2
+ import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
3
+
4
+ export interface Props {
5
+ product?: IkasProduct | null;
6
+ selectPlaceholderText?: string;
7
+ fileDropText?: string;
8
+ uploadingText?: string;
9
+ uploadFailedText?: string;
10
+ fileSizeErrorText?: string;
11
+ fileTypeErrorText?: string;
12
+ maxFilesErrorText?: string;
13
+ requiredFieldErrorText?: string;
14
+ mobileMarginTop?: MarginTopStyleType;
15
+ mobileMarginBottom?: MarginBottomStyleType;
16
+ desktopMarginTop?: MarginTopStyleType;
17
+ desktopMarginBottom?: MarginBottomStyleType;
18
+ minLabelText?: string;
19
+ maxLabelText?: string;
20
+ fileFallbackNameText?: string;
21
+ }
@@ -0,0 +1,62 @@
1
+ import {
2
+ getFormattedMarginTopSize,
3
+ getFormattedMarginBottomSize,
4
+ getProductVariantDiscountPercentage,
5
+ getProductVariantFormattedFinalPrice,
6
+ getProductVariantFormattedSellPrice,
7
+ getSelectedProductVariant,
8
+ hasProductVariantDiscount,
9
+ } from "@ikas/bp-storefront";
10
+ import { Props } from "./types";
11
+ import Tag from "../../sub-components/Tag";
12
+
13
+ export function ProductDetailPrices({
14
+ product,
15
+ mobileMarginTop,
16
+ mobileMarginBottom,
17
+ desktopMarginTop,
18
+ desktopMarginBottom,
19
+ }: Props) {
20
+ if (!product) return null;
21
+
22
+ const selectedVariant = getSelectedProductVariant(product);
23
+
24
+ const hasDiscount = hasProductVariantDiscount(selectedVariant);
25
+ const finalPrice = getProductVariantFormattedFinalPrice(selectedVariant);
26
+ const originalPrice = hasDiscount
27
+ ? getProductVariantFormattedSellPrice(selectedVariant)
28
+ : null;
29
+ const discountPercentage = hasDiscount
30
+ ? getProductVariantDiscountPercentage(selectedVariant)
31
+ : null;
32
+
33
+ return (
34
+ <div
35
+ className="kombos-pd-prices"
36
+ style={{
37
+ "--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
38
+ "--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
39
+ "--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
40
+ "--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
41
+ }}
42
+ >
43
+ <div className="kombos-pd-prices__prices">
44
+ <span className="kombos-pd-prices__final text-xl-medium md:display-xs-medium">
45
+ {finalPrice}
46
+ </span>
47
+ {originalPrice && (
48
+ <span className="kombos-pd-prices__original text-lg-medium-strike md:text-xl-medium-strike">
49
+ {originalPrice}
50
+ </span>
51
+ )}
52
+ </div>
53
+ {discountPercentage != null && Number(discountPercentage) > 0 && (
54
+ <Tag type="discounted" size="m">
55
+ %{Math.round(Number(discountPercentage))}
56
+ </Tag>
57
+ )}
58
+ </div>
59
+ );
60
+ }
61
+
62
+ export default ProductDetailPrices;
@@ -0,0 +1,32 @@
1
+ /* ===== ProductDetailPrices ===== */
2
+
3
+ .kombos-pd-prices {
4
+ display: flex;
5
+ align-items: center;
6
+ gap: 0.75rem;
7
+ flex-wrap: wrap;
8
+ margin-top: var(--mobile-mt);
9
+ margin-bottom: var(--mobile-mb);
10
+ }
11
+
12
+ .kombos-pd-prices__prices {
13
+ display: flex;
14
+ align-items: baseline;
15
+ gap: 0.5rem;
16
+ }
17
+
18
+ .kombos-pd-prices__final {
19
+ color: var(--kombos-gray-900);
20
+ }
21
+
22
+ .kombos-pd-prices__original {
23
+ color: var(--kombos-gray-500);
24
+ }
25
+
26
+ /* ===== Desktop (>=1024px) ===== */
27
+ @media (min-width: 1024px) {
28
+ .kombos-pd-prices {
29
+ margin-top: var(--desktop-mt, var(--mobile-mt));
30
+ margin-bottom: var(--desktop-mb, var(--mobile-mb));
31
+ }
32
+ }
@@ -0,0 +1,10 @@
1
+ // This file is auto-generated — do not edit manually.
2
+ import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
3
+
4
+ export interface Props {
5
+ product?: IkasProduct | null;
6
+ mobileMarginTop?: MarginTopStyleType;
7
+ mobileMarginBottom?: MarginBottomStyleType;
8
+ desktopMarginTop?: MarginTopStyleType;
9
+ desktopMarginBottom?: MarginBottomStyleType;
10
+ }
@@ -0,0 +1,74 @@
1
+ import {
2
+ getDisplayedProductGroups,
3
+ getFormattedMarginTopSize,
4
+ getFormattedMarginBottomSize,
5
+ } from "@ikas/bp-storefront";
6
+ import { Props } from "./types";
7
+ import { BadgeImage, BadgeText } from "../../sub-components/Badge";
8
+
9
+ export function ProductDetailProductGroup({
10
+ product,
11
+ mobileMarginTop,
12
+ mobileMarginBottom,
13
+ desktopMarginTop,
14
+ desktopMarginBottom,
15
+ }: Props) {
16
+ if (!product) return null;
17
+
18
+ const groups = getDisplayedProductGroups(product);
19
+ if (!groups.length) return null;
20
+
21
+ return (
22
+ <div
23
+ className="kombos-pd-product-group"
24
+ style={{
25
+ "--mobile-mt": getFormattedMarginTopSize(mobileMarginTop),
26
+ "--mobile-mb": getFormattedMarginBottomSize(mobileMarginBottom),
27
+ "--desktop-mt": getFormattedMarginTopSize(desktopMarginTop),
28
+ "--desktop-mb": getFormattedMarginBottomSize(desktopMarginBottom),
29
+ }}
30
+ >
31
+ {groups.map((group) => {
32
+ const selected = group.items.find((i) => i.isSelected);
33
+
34
+ return (
35
+ <div key={group.name} className="kombos-pd-product-group__group">
36
+ <span className="kombos-pd-product-group__label text-sm-medium">
37
+ {group.name}
38
+ {selected && <span> - {selected.value}</span>}
39
+ </span>
40
+ <div className="kombos-pd-product-group__row">
41
+ {group.items.map((item) =>
42
+ item.image ? (
43
+ <BadgeImage
44
+ key={item.value}
45
+ image={item.image}
46
+ alt={item.value}
47
+ sizes="64px"
48
+ variantImg
49
+ size="l"
50
+ selected={item.isSelected}
51
+ href={item.href}
52
+ title={item.value}
53
+ />
54
+ ) : (
55
+ <BadgeText
56
+ key={item.value}
57
+ size="l"
58
+ selected={item.isSelected}
59
+ href={item.href}
60
+ title={item.value}
61
+ >
62
+ {item.value}
63
+ </BadgeText>
64
+ ),
65
+ )}
66
+ </div>
67
+ </div>
68
+ );
69
+ })}
70
+ </div>
71
+ );
72
+ }
73
+
74
+ export default ProductDetailProductGroup;
@@ -0,0 +1,33 @@
1
+ /* ===== ProductDetailProductGroup ===== */
2
+
3
+ .kombos-pd-product-group {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 1.5rem;
7
+ margin-top: var(--mobile-mt);
8
+ margin-bottom: var(--mobile-mb);
9
+ }
10
+
11
+ .kombos-pd-product-group__group {
12
+ display: flex;
13
+ flex-direction: column;
14
+ }
15
+
16
+ .kombos-pd-product-group__label {
17
+ color: var(--kombos-gray-900);
18
+ margin-bottom: 0.375rem;
19
+ }
20
+
21
+ .kombos-pd-product-group__row {
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ gap: 0.5rem;
25
+ }
26
+
27
+ /* ===== Desktop (>=1024px) ===== */
28
+ @media (min-width: 1024px) {
29
+ .kombos-pd-product-group {
30
+ margin-top: var(--desktop-mt, var(--mobile-mt));
31
+ margin-bottom: var(--desktop-mb, var(--mobile-mb));
32
+ }
33
+ }
@@ -0,0 +1,10 @@
1
+ // This file is auto-generated — do not edit manually.
2
+ import type { IkasProduct, MarginTopStyleType, MarginBottomStyleType } from "@ikas/bp-storefront";
3
+
4
+ export interface Props {
5
+ product?: IkasProduct | null;
6
+ mobileMarginTop?: MarginTopStyleType;
7
+ mobileMarginBottom?: MarginBottomStyleType;
8
+ desktopMarginTop?: MarginTopStyleType;
9
+ desktopMarginBottom?: MarginBottomStyleType;
10
+ }