@ikas/component-cli 0.101.0 → 0.103.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 (387) hide show
  1. package/dist/commands/config.d.ts.map +1 -1
  2. package/dist/commands/config.js +1 -357
  3. package/dist/commands/config.js.map +1 -1
  4. package/dist/commands/create.d.ts.map +1 -1
  5. package/dist/commands/create.js +43 -118
  6. package/dist/commands/create.js.map +1 -1
  7. package/dist/commands/dev.d.ts.map +1 -1
  8. package/dist/commands/dev.js +5 -118
  9. package/dist/commands/dev.js.map +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +0 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/utils/component-helpers.d.ts +0 -5
  14. package/dist/utils/component-helpers.d.ts.map +1 -1
  15. package/dist/utils/component-helpers.js +1 -14
  16. package/dist/utils/component-helpers.js.map +1 -1
  17. package/dist/utils/template.d.ts +0 -12
  18. package/dist/utils/template.d.ts.map +1 -1
  19. package/dist/utils/template.js +0 -44
  20. package/dist/utils/template.js.map +1 -1
  21. package/dist/utils/websocket-server.d.ts +0 -26
  22. package/dist/utils/websocket-server.d.ts.map +1 -1
  23. package/dist/utils/websocket-server.js +0 -42
  24. package/dist/utils/websocket-server.js.map +1 -1
  25. package/package.json +2 -3
  26. package/templates/create/claude-md +1 -2
  27. package/templates/create/cursorrules +1 -1
  28. package/templates/create/package.json +0 -1
  29. package/templates/create/src/components/ExampleComponent/types.ts +1 -1
  30. package/templates/create/src/components/ExampleSection/types.ts +1 -1
  31. package/templates/create-full/README.md +0 -78
  32. package/templates/create-full/claude-md +0 -721
  33. package/templates/create-full/cursorrules +0 -103
  34. package/templates/create-full/gitignore +0 -4
  35. package/templates/create-full/ikas.config.json +0 -5007
  36. package/templates/create-full/mcp.json +0 -10
  37. package/templates/create-full/package.json +0 -22
  38. package/templates/create-full/src/components/AccountAddresses/components/AddressCard/index.tsx +0 -55
  39. package/templates/create-full/src/components/AccountAddresses/components/AddressCard/styles.css +0 -46
  40. package/templates/create-full/src/components/AccountAddresses/components/AddressModal/index.tsx +0 -301
  41. package/templates/create-full/src/components/AccountAddresses/components/AddressModal/styles.css +0 -22
  42. package/templates/create-full/src/components/AccountAddresses/index.tsx +0 -127
  43. package/templates/create-full/src/components/AccountAddresses/styles.css +0 -41
  44. package/templates/create-full/src/components/AccountAddresses/types.ts +0 -15
  45. package/templates/create-full/src/components/AccountFavorites/index.tsx +0 -82
  46. package/templates/create-full/src/components/AccountFavorites/styles.css +0 -52
  47. package/templates/create-full/src/components/AccountFavorites/types.ts +0 -7
  48. package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/index.tsx +0 -171
  49. package/templates/create-full/src/components/AccountInfo/components/AccountSidebar/styles.css +0 -144
  50. package/templates/create-full/src/components/AccountInfo/index.tsx +0 -91
  51. package/templates/create-full/src/components/AccountInfo/styles.css +0 -35
  52. package/templates/create-full/src/components/AccountInfo/types.ts +0 -9
  53. package/templates/create-full/src/components/AccountInfoContent/index.tsx +0 -134
  54. package/templates/create-full/src/components/AccountInfoContent/styles.css +0 -57
  55. package/templates/create-full/src/components/AccountInfoContent/types.ts +0 -8
  56. package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/index.tsx +0 -78
  57. package/templates/create-full/src/components/AccountOrderDetail/components/OrderHeader/styles.css +0 -46
  58. package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/index.tsx +0 -20
  59. package/templates/create-full/src/components/AccountOrderDetail/components/OrderItemRow/styles.css +0 -16
  60. package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +0 -112
  61. package/templates/create-full/src/components/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +0 -86
  62. package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/index.tsx +0 -195
  63. package/templates/create-full/src/components/AccountOrderDetail/components/OrderSidebar/styles.css +0 -93
  64. package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/index.tsx +0 -156
  65. package/templates/create-full/src/components/AccountOrderDetail/components/PackageGroup/styles.css +0 -100
  66. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/index.tsx +0 -56
  67. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnItemRow/styles.css +0 -57
  68. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/index.tsx +0 -159
  69. package/templates/create-full/src/components/AccountOrderDetail/components/ReturnView/styles.css +0 -29
  70. package/templates/create-full/src/components/AccountOrderDetail/index.tsx +0 -244
  71. package/templates/create-full/src/components/AccountOrderDetail/styles.css +0 -125
  72. package/templates/create-full/src/components/AccountOrderDetail/types.ts +0 -32
  73. package/templates/create-full/src/components/AccountOrders/components/OrderCard/index.tsx +0 -122
  74. package/templates/create-full/src/components/AccountOrders/components/OrderCard/styles.css +0 -114
  75. package/templates/create-full/src/components/AccountOrders/index.tsx +0 -105
  76. package/templates/create-full/src/components/AccountOrders/styles.css +0 -36
  77. package/templates/create-full/src/components/AccountOrders/types.ts +0 -11
  78. package/templates/create-full/src/components/Announcement/index.tsx +0 -11
  79. package/templates/create-full/src/components/Announcement/styles.css +0 -4
  80. package/templates/create-full/src/components/Announcement/types.ts +0 -4
  81. package/templates/create-full/src/components/Announcements/index.tsx +0 -91
  82. package/templates/create-full/src/components/Announcements/styles.css +0 -45
  83. package/templates/create-full/src/components/Announcements/types.ts +0 -8
  84. package/templates/create-full/src/components/BlogHome/components/BlogCard/index.tsx +0 -89
  85. package/templates/create-full/src/components/BlogHome/components/BlogCard/styles.css +0 -121
  86. package/templates/create-full/src/components/BlogHome/index.tsx +0 -124
  87. package/templates/create-full/src/components/BlogHome/styles.css +0 -118
  88. package/templates/create-full/src/components/BlogHome/types.ts +0 -15
  89. package/templates/create-full/src/components/BlogPost/index.tsx +0 -128
  90. package/templates/create-full/src/components/BlogPost/styles.css +0 -120
  91. package/templates/create-full/src/components/BlogPost/types.ts +0 -12
  92. package/templates/create-full/src/components/CardProductName/index.tsx +0 -25
  93. package/templates/create-full/src/components/CardProductName/styles.css +0 -22
  94. package/templates/create-full/src/components/CardProductName/types.ts +0 -7
  95. package/templates/create-full/src/components/CardProductPrice/index.tsx +0 -30
  96. package/templates/create-full/src/components/CardProductPrice/styles.css +0 -13
  97. package/templates/create-full/src/components/CardProductPrice/types.ts +0 -6
  98. package/templates/create-full/src/components/CardProductVariants/index.tsx +0 -10
  99. package/templates/create-full/src/components/CardProductVariants/styles.css +0 -1
  100. package/templates/create-full/src/components/CardProductVariants/types.ts +0 -6
  101. package/templates/create-full/src/components/CartPage/components/CouponCode/index.tsx +0 -108
  102. package/templates/create-full/src/components/CartPage/components/CouponCode/styles.css +0 -68
  103. package/templates/create-full/src/components/CartPage/components/EmptyState/index.tsx +0 -31
  104. package/templates/create-full/src/components/CartPage/components/EmptyState/styles.css +0 -18
  105. package/templates/create-full/src/components/CartPage/components/OrderSummary/index.tsx +0 -106
  106. package/templates/create-full/src/components/CartPage/components/OrderSummary/styles.css +0 -70
  107. package/templates/create-full/src/components/CartPage/index.tsx +0 -107
  108. package/templates/create-full/src/components/CartPage/styles.css +0 -54
  109. package/templates/create-full/src/components/CartPage/types.ts +0 -16
  110. package/templates/create-full/src/components/CategoryImageItem/components/Card/index.tsx +0 -64
  111. package/templates/create-full/src/components/CategoryImageItem/components/Card/styles.css +0 -56
  112. package/templates/create-full/src/components/CategoryImageItem/index.tsx +0 -64
  113. package/templates/create-full/src/components/CategoryImageItem/styles.css +0 -10
  114. package/templates/create-full/src/components/CategoryImageItem/types.ts +0 -16
  115. package/templates/create-full/src/components/CategoryImages/index.tsx +0 -62
  116. package/templates/create-full/src/components/CategoryImages/styles.css +0 -38
  117. package/templates/create-full/src/components/CategoryImages/types.ts +0 -11
  118. package/templates/create-full/src/components/CategoryList/components/CategoryListControls/index.tsx +0 -129
  119. package/templates/create-full/src/components/CategoryList/components/CategoryListControls/styles.css +0 -99
  120. package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/index.tsx +0 -42
  121. package/templates/create-full/src/components/CategoryList/components/FilterBoxValues/styles.css +0 -27
  122. package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/index.tsx +0 -43
  123. package/templates/create-full/src/components/CategoryList/components/FilterCategoryList/styles.css +0 -20
  124. package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/index.tsx +0 -114
  125. package/templates/create-full/src/components/CategoryList/components/FilterGroupValues/styles.css +0 -1
  126. package/templates/create-full/src/components/CategoryList/components/FilterListValues/index.tsx +0 -54
  127. package/templates/create-full/src/components/CategoryList/components/FilterListValues/styles.css +0 -22
  128. package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/index.tsx +0 -50
  129. package/templates/create-full/src/components/CategoryList/components/FilterRangeListValues/styles.css +0 -25
  130. package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/index.tsx +0 -189
  131. package/templates/create-full/src/components/CategoryList/components/FilterRangeValues/styles.css +0 -89
  132. package/templates/create-full/src/components/CategoryList/components/FilterSidebar/index.tsx +0 -92
  133. package/templates/create-full/src/components/CategoryList/components/FilterSidebar/styles.css +0 -27
  134. package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/index.tsx +0 -63
  135. package/templates/create-full/src/components/CategoryList/components/FilterSwatchValues/styles.css +0 -48
  136. package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/index.tsx +0 -146
  137. package/templates/create-full/src/components/CategoryList/components/MobileFilterModal/styles.css +0 -133
  138. package/templates/create-full/src/components/CategoryList/index.tsx +0 -333
  139. package/templates/create-full/src/components/CategoryList/styles.css +0 -110
  140. package/templates/create-full/src/components/CategoryList/types.ts +0 -30
  141. package/templates/create-full/src/components/CollapsibleContent/index.tsx +0 -23
  142. package/templates/create-full/src/components/CollapsibleContent/styles.css +0 -11
  143. package/templates/create-full/src/components/CollapsibleContent/types.ts +0 -6
  144. package/templates/create-full/src/components/CookieBar/index.tsx +0 -78
  145. package/templates/create-full/src/components/CookieBar/styles.css +0 -111
  146. package/templates/create-full/src/components/CookieBar/types.ts +0 -10
  147. package/templates/create-full/src/components/CustomerEmailVerification/index.tsx +0 -168
  148. package/templates/create-full/src/components/CustomerEmailVerification/styles.css +0 -118
  149. package/templates/create-full/src/components/CustomerEmailVerification/types.ts +0 -17
  150. package/templates/create-full/src/components/FeatureItem/index.tsx +0 -27
  151. package/templates/create-full/src/components/FeatureItem/styles.css +0 -19
  152. package/templates/create-full/src/components/FeatureItem/types.ts +0 -7
  153. package/templates/create-full/src/components/Features/index.tsx +0 -25
  154. package/templates/create-full/src/components/Features/styles.css +0 -39
  155. package/templates/create-full/src/components/Features/types.ts +0 -5
  156. package/templates/create-full/src/components/Footer/index.tsx +0 -154
  157. package/templates/create-full/src/components/Footer/styles.css +0 -175
  158. package/templates/create-full/src/components/Footer/types.ts +0 -15
  159. package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/index.tsx +0 -129
  160. package/templates/create-full/src/components/ForgotPassword/components/ForgotPasswordForm/styles.css +0 -0
  161. package/templates/create-full/src/components/ForgotPassword/index.tsx +0 -30
  162. package/templates/create-full/src/components/ForgotPassword/styles.css +0 -85
  163. package/templates/create-full/src/components/ForgotPassword/types.ts +0 -13
  164. package/templates/create-full/src/components/Header/index.tsx +0 -53
  165. package/templates/create-full/src/components/Header/styles.css +0 -6
  166. package/templates/create-full/src/components/Header/types.ts +0 -6
  167. package/templates/create-full/src/components/HeroSlider/index.tsx +0 -110
  168. package/templates/create-full/src/components/HeroSlider/styles.css +0 -129
  169. package/templates/create-full/src/components/HeroSlider/types.ts +0 -9
  170. package/templates/create-full/src/components/HeroSliderItem/index.tsx +0 -231
  171. package/templates/create-full/src/components/HeroSliderItem/styles.css +0 -152
  172. package/templates/create-full/src/components/HeroSliderItem/types.ts +0 -34
  173. package/templates/create-full/src/components/Login/components/LoginForm/index.tsx +0 -181
  174. package/templates/create-full/src/components/Login/components/LoginForm/styles.css +0 -0
  175. package/templates/create-full/src/components/Login/index.tsx +0 -37
  176. package/templates/create-full/src/components/Login/styles.css +0 -129
  177. package/templates/create-full/src/components/Login/types.ts +0 -18
  178. package/templates/create-full/src/components/Navbar/components/CartSidebar/index.tsx +0 -203
  179. package/templates/create-full/src/components/Navbar/components/CartSidebar/styles.css +0 -175
  180. package/templates/create-full/src/components/Navbar/components/MobileMenu/index.tsx +0 -198
  181. package/templates/create-full/src/components/Navbar/components/MobileMenu/styles.css +0 -122
  182. package/templates/create-full/src/components/Navbar/components/NavItem/index.tsx +0 -65
  183. package/templates/create-full/src/components/Navbar/components/SearchModal/index.tsx +0 -267
  184. package/templates/create-full/src/components/Navbar/components/SearchModal/styles.css +0 -182
  185. package/templates/create-full/src/components/Navbar/index.tsx +0 -250
  186. package/templates/create-full/src/components/Navbar/styles.css +0 -243
  187. package/templates/create-full/src/components/Navbar/types.ts +0 -37
  188. package/templates/create-full/src/components/NotFound/index.tsx +0 -39
  189. package/templates/create-full/src/components/NotFound/styles.css +0 -46
  190. package/templates/create-full/src/components/NotFound/types.ts +0 -8
  191. package/templates/create-full/src/components/ProductDetail/components/ProductGallery/index.tsx +0 -316
  192. package/templates/create-full/src/components/ProductDetail/components/ProductGallery/styles.css +0 -213
  193. package/templates/create-full/src/components/ProductDetail/index.tsx +0 -92
  194. package/templates/create-full/src/components/ProductDetail/styles.css +0 -58
  195. package/templates/create-full/src/components/ProductDetail/types.ts +0 -12
  196. package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/index.tsx +0 -34
  197. package/templates/create-full/src/components/ProductDetailAddToCart/components/PayWithIkas/styles.css +0 -4
  198. package/templates/create-full/src/components/ProductDetailAddToCart/index.tsx +0 -146
  199. package/templates/create-full/src/components/ProductDetailAddToCart/styles.css +0 -27
  200. package/templates/create-full/src/components/ProductDetailAddToCart/types.ts +0 -18
  201. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +0 -164
  202. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +0 -134
  203. package/templates/create-full/src/components/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +0 -188
  204. package/templates/create-full/src/components/ProductDetailBundleFurniture/index.tsx +0 -61
  205. package/templates/create-full/src/components/ProductDetailBundleFurniture/styles.css +0 -12
  206. package/templates/create-full/src/components/ProductDetailBundleFurniture/types.ts +0 -21
  207. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +0 -169
  208. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleProductItem/styles.css +0 -141
  209. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +0 -35
  210. package/templates/create-full/src/components/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +0 -85
  211. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +0 -51
  212. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureRow/styles.css +0 -30
  213. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/index.tsx +0 -54
  214. package/templates/create-full/src/components/ProductDetailBundleProduct/components/FurnitureView/styles.css +0 -22
  215. package/templates/create-full/src/components/ProductDetailBundleProduct/index.tsx +0 -101
  216. package/templates/create-full/src/components/ProductDetailBundleProduct/styles.css +0 -20
  217. package/templates/create-full/src/components/ProductDetailBundleProduct/types.ts +0 -18
  218. package/templates/create-full/src/components/ProductDetailDescription/index.tsx +0 -56
  219. package/templates/create-full/src/components/ProductDetailDescription/styles.css +0 -21
  220. package/templates/create-full/src/components/ProductDetailDescription/types.ts +0 -13
  221. package/templates/create-full/src/components/ProductDetailFeatureItem/index.tsx +0 -28
  222. package/templates/create-full/src/components/ProductDetailFeatureItem/styles.css +0 -22
  223. package/templates/create-full/src/components/ProductDetailFeatureItem/types.ts +0 -7
  224. package/templates/create-full/src/components/ProductDetailFeatures/index.tsx +0 -40
  225. package/templates/create-full/src/components/ProductDetailFeatures/styles.css +0 -17
  226. package/templates/create-full/src/components/ProductDetailFeatures/types.ts +0 -10
  227. package/templates/create-full/src/components/ProductDetailNameFavorite/index.tsx +0 -66
  228. package/templates/create-full/src/components/ProductDetailNameFavorite/styles.css +0 -45
  229. package/templates/create-full/src/components/ProductDetailNameFavorite/types.ts +0 -11
  230. package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/index.tsx +0 -209
  231. package/templates/create-full/src/components/ProductDetailOffer/components/OfferCard/styles.css +0 -146
  232. package/templates/create-full/src/components/ProductDetailOffer/components/OfferSummary/index.tsx +0 -175
  233. package/templates/create-full/src/components/ProductDetailOffer/index.tsx +0 -199
  234. package/templates/create-full/src/components/ProductDetailOffer/styles.css +0 -211
  235. package/templates/create-full/src/components/ProductDetailOffer/types.ts +0 -24
  236. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +0 -52
  237. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionCheckbox/styles.css +0 -19
  238. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +0 -60
  239. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +0 -38
  240. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +0 -102
  241. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +0 -34
  242. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +0 -121
  243. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +0 -87
  244. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionChoice/index.tsx +0 -57
  245. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +0 -54
  246. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
  247. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +0 -124
  248. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionDatePicker/styles.css +0 -1
  249. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/index.tsx +0 -217
  250. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionFile/styles.css +0 -87
  251. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionRenderer/index.tsx +0 -133
  252. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/index.tsx +0 -60
  253. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionText/styles.css +0 -1
  254. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/index.tsx +0 -74
  255. package/templates/create-full/src/components/ProductDetailOptionSet/components/OptionTextarea/styles.css +0 -10
  256. package/templates/create-full/src/components/ProductDetailOptionSet/index.tsx +0 -99
  257. package/templates/create-full/src/components/ProductDetailOptionSet/styles.css +0 -30
  258. package/templates/create-full/src/components/ProductDetailOptionSet/types.ts +0 -21
  259. package/templates/create-full/src/components/ProductDetailPrices/index.tsx +0 -62
  260. package/templates/create-full/src/components/ProductDetailPrices/styles.css +0 -32
  261. package/templates/create-full/src/components/ProductDetailPrices/types.ts +0 -10
  262. package/templates/create-full/src/components/ProductDetailProductGroup/index.tsx +0 -74
  263. package/templates/create-full/src/components/ProductDetailProductGroup/styles.css +0 -33
  264. package/templates/create-full/src/components/ProductDetailProductGroup/types.ts +0 -10
  265. package/templates/create-full/src/components/ProductDetailReviews/index.tsx +0 -205
  266. package/templates/create-full/src/components/ProductDetailReviews/styles.css +0 -43
  267. package/templates/create-full/src/components/ProductDetailReviews/types.ts +0 -19
  268. package/templates/create-full/src/components/ProductDetailSku/index.tsx +0 -38
  269. package/templates/create-full/src/components/ProductDetailSku/styles.css +0 -16
  270. package/templates/create-full/src/components/ProductDetailSku/types.ts +0 -11
  271. package/templates/create-full/src/components/ProductDetailVariant/index.tsx +0 -38
  272. package/templates/create-full/src/components/ProductDetailVariant/styles.css +0 -14
  273. package/templates/create-full/src/components/ProductDetailVariant/types.ts +0 -12
  274. package/templates/create-full/src/components/ProductSlider/index.tsx +0 -151
  275. package/templates/create-full/src/components/ProductSlider/styles.css +0 -105
  276. package/templates/create-full/src/components/ProductSlider/types.ts +0 -17
  277. package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/index.tsx +0 -133
  278. package/templates/create-full/src/components/RecoverPassword/components/RecoverPasswordForm/styles.css +0 -0
  279. package/templates/create-full/src/components/RecoverPassword/index.tsx +0 -30
  280. package/templates/create-full/src/components/RecoverPassword/styles.css +0 -93
  281. package/templates/create-full/src/components/RecoverPassword/types.ts +0 -13
  282. package/templates/create-full/src/components/Register/components/RegisterForm/index.tsx +0 -326
  283. package/templates/create-full/src/components/Register/components/RegisterForm/styles.css +0 -0
  284. package/templates/create-full/src/components/Register/index.tsx +0 -30
  285. package/templates/create-full/src/components/Register/styles.css +0 -152
  286. package/templates/create-full/src/components/Register/types.ts +0 -27
  287. package/templates/create-full/src/components/RichText/index.tsx +0 -25
  288. package/templates/create-full/src/components/RichText/styles.css +0 -51
  289. package/templates/create-full/src/components/RichText/types.ts +0 -5
  290. package/templates/create-full/src/components/SocialMediaIcon/index.tsx +0 -26
  291. package/templates/create-full/src/components/SocialMediaIcon/styles.css +0 -17
  292. package/templates/create-full/src/components/SocialMediaIcon/types.ts +0 -7
  293. package/templates/create-full/src/components/index.ts +0 -50
  294. package/templates/create-full/src/global-types.ts +0 -13
  295. package/templates/create-full/src/global.css +0 -582
  296. package/templates/create-full/src/hooks/useBundleProducts.ts +0 -75
  297. package/templates/create-full/src/hooks/useColumnPreference.ts +0 -26
  298. package/templates/create-full/src/hooks/useInfiniteScroll.ts +0 -49
  299. package/templates/create-full/src/hooks/usePageTracking.ts +0 -56
  300. package/templates/create-full/src/hooks/usePayWithIkas.ts +0 -114
  301. package/templates/create-full/src/hooks/useRedirectIfLoggedIn.ts +0 -35
  302. package/templates/create-full/src/hooks/useScrollLock.ts +0 -20
  303. package/templates/create-full/src/hooks/useToast.ts +0 -27
  304. package/templates/create-full/src/ikas-component-utils.d.ts +0 -3
  305. package/templates/create-full/src/sub-components/Badge/index.tsx +0 -208
  306. package/templates/create-full/src/sub-components/Badge/styles.css +0 -129
  307. package/templates/create-full/src/sub-components/Breadcrumb/index.tsx +0 -57
  308. package/templates/create-full/src/sub-components/Breadcrumb/styles.css +0 -49
  309. package/templates/create-full/src/sub-components/BundleMedia/index.tsx +0 -72
  310. package/templates/create-full/src/sub-components/BundleQuantityBox/index.tsx +0 -73
  311. package/templates/create-full/src/sub-components/BundleQuantityBox/styles.css +0 -43
  312. package/templates/create-full/src/sub-components/Button/index.tsx +0 -52
  313. package/templates/create-full/src/sub-components/Button/styles.css +0 -114
  314. package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/index.tsx +0 -59
  315. package/templates/create-full/src/sub-components/CartItem/components/BundleProductItem/styles.css +0 -24
  316. package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/index.tsx +0 -55
  317. package/templates/create-full/src/sub-components/CartItem/components/BundleProducts/styles.css +0 -30
  318. package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/index.tsx +0 -31
  319. package/templates/create-full/src/sub-components/CartItem/components/ItemOptions/styles.css +0 -6
  320. package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/index.tsx +0 -79
  321. package/templates/create-full/src/sub-components/CartItem/components/OptionValueDisplay/styles.css +0 -28
  322. package/templates/create-full/src/sub-components/CartItem/index.tsx +0 -216
  323. package/templates/create-full/src/sub-components/CartItem/styles.css +0 -170
  324. package/templates/create-full/src/sub-components/Checkbox/index.tsx +0 -42
  325. package/templates/create-full/src/sub-components/Checkbox/styles.css +0 -65
  326. package/templates/create-full/src/sub-components/CollapsibleGroup/index.tsx +0 -52
  327. package/templates/create-full/src/sub-components/CollapsibleGroup/styles.css +0 -51
  328. package/templates/create-full/src/sub-components/ColorInput/index.tsx +0 -33
  329. package/templates/create-full/src/sub-components/ColorInput/styles.css +0 -53
  330. package/templates/create-full/src/sub-components/ConfirmModal/index.tsx +0 -60
  331. package/templates/create-full/src/sub-components/ConfirmModal/styles.css +0 -20
  332. package/templates/create-full/src/sub-components/FormItem/index.tsx +0 -66
  333. package/templates/create-full/src/sub-components/FormItem/styles.css +0 -38
  334. package/templates/create-full/src/sub-components/ImagePreviewModal/index.tsx +0 -55
  335. package/templates/create-full/src/sub-components/ImagePreviewModal/styles.css +0 -50
  336. package/templates/create-full/src/sub-components/Input/index.tsx +0 -69
  337. package/templates/create-full/src/sub-components/Input/styles.css +0 -162
  338. package/templates/create-full/src/sub-components/Modal/index.tsx +0 -118
  339. package/templates/create-full/src/sub-components/Modal/styles.css +0 -70
  340. package/templates/create-full/src/sub-components/PageLoader/index.tsx +0 -14
  341. package/templates/create-full/src/sub-components/PageLoader/styles.css +0 -12
  342. package/templates/create-full/src/sub-components/Pagination/index.tsx +0 -107
  343. package/templates/create-full/src/sub-components/Pagination/styles.css +0 -88
  344. package/templates/create-full/src/sub-components/ProductCard/index.tsx +0 -276
  345. package/templates/create-full/src/sub-components/ProductCard/styles.css +0 -99
  346. package/templates/create-full/src/sub-components/QuantitySelector/index.tsx +0 -41
  347. package/templates/create-full/src/sub-components/QuantitySelector/styles.css +0 -51
  348. package/templates/create-full/src/sub-components/ReviewCard/index.tsx +0 -103
  349. package/templates/create-full/src/sub-components/ReviewCard/styles.css +0 -95
  350. package/templates/create-full/src/sub-components/ReviewForm/index.tsx +0 -115
  351. package/templates/create-full/src/sub-components/ReviewForm/styles.css +0 -11
  352. package/templates/create-full/src/sub-components/ReviewSummary/index.tsx +0 -65
  353. package/templates/create-full/src/sub-components/ReviewSummary/styles.css +0 -86
  354. package/templates/create-full/src/sub-components/Select/index.tsx +0 -86
  355. package/templates/create-full/src/sub-components/Select/styles.css +0 -110
  356. package/templates/create-full/src/sub-components/SkeletonField/index.tsx +0 -12
  357. package/templates/create-full/src/sub-components/SkeletonField/styles.css +0 -29
  358. package/templates/create-full/src/sub-components/SliderArrow/index.tsx +0 -26
  359. package/templates/create-full/src/sub-components/SliderArrow/styles.css +0 -24
  360. package/templates/create-full/src/sub-components/SocialLoginButton/index.tsx +0 -24
  361. package/templates/create-full/src/sub-components/SocialLoginButton/styles.css +0 -19
  362. package/templates/create-full/src/sub-components/SpinnerIcon/index.tsx +0 -10
  363. package/templates/create-full/src/sub-components/SpinnerIcon/styles.css +0 -8
  364. package/templates/create-full/src/sub-components/StarRating/index.tsx +0 -76
  365. package/templates/create-full/src/sub-components/StarRating/styles.css +0 -40
  366. package/templates/create-full/src/sub-components/Tag/index.tsx +0 -21
  367. package/templates/create-full/src/sub-components/Tag/styles.css +0 -30
  368. package/templates/create-full/src/sub-components/Textarea/index.tsx +0 -45
  369. package/templates/create-full/src/sub-components/Textarea/styles.css +0 -82
  370. package/templates/create-full/src/sub-components/Toast/index.tsx +0 -257
  371. package/templates/create-full/src/sub-components/Toast/styles.css +0 -3
  372. package/templates/create-full/src/sub-components/Toggle/index.tsx +0 -46
  373. package/templates/create-full/src/sub-components/Toggle/styles.css +0 -86
  374. package/templates/create-full/src/sub-components/VariantBadge/index.tsx +0 -153
  375. package/templates/create-full/src/sub-components/VariantBadge/styles.css +0 -47
  376. package/templates/create-full/src/sub-components/icons/index.tsx +0 -981
  377. package/templates/create-full/src/utils/bundle.ts +0 -70
  378. package/templates/create-full/src/utils/cx.ts +0 -4
  379. package/templates/create-full/src/utils/fullName.ts +0 -6
  380. package/templates/create-full/src/utils/media.ts +0 -36
  381. package/templates/create-full/src/utils/optionPrice.ts +0 -19
  382. package/templates/create-full/src/utils/optionSet.ts +0 -17
  383. package/templates/create-full/src/utils/orderStatus.ts +0 -28
  384. package/templates/create-full/src/utils/pagination.ts +0 -29
  385. package/templates/create-full/src/utils/toast.ts +0 -5
  386. package/templates/create-full/tsconfig.json +0 -30
  387. package/templates/create-full/vite.config.ts +0 -15
@@ -1,721 +0,0 @@
1
- Do not hesitate to ask me any questions. ASK ME ANYTHING YOU NEED! Use the AskUserQuestion tool to ask as many follow ups as you need to reach clarity.
2
-
3
- # ikas Code Components Project
4
-
5
- You are building **Preact + TypeScript components for an e-commerce storefront**.
6
- This project uses the ikas Code Components framework with an MCP server for API documentation.
7
-
8
- **ALWAYS query MCP tools before writing code that uses storefront APIs.**
9
- Never guess function signatures or type shapes — the MCP server is the source of truth.
10
-
11
- ## CRITICAL: Auto-Generated Files
12
-
13
- **NEVER manually create or edit `types.ts`** — it is auto-generated by CLI commands.
14
- Use `npx ikas-component config add-component --props '[...]'` or `npx ikas-component config add-prop` to manage props.
15
- These commands update BOTH `ikas.config.json` AND `types.ts` automatically.
16
-
17
- ## MCP Tools (12 tools)
18
-
19
- ### Starting a New Section
20
-
21
- | Tool | Purpose |
22
- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
- | `get_section_template(sectionType)` | **Start here** — production-ready starter template (index.tsx + types.ts + styles.css + config) for common sections: header, footer, product-detail, product-list, cart, login, register, hero-banner, blog-post, faq, etc. |
24
- | `get_framework_guide(topic)` | Framework docs — "ai-workflow", "common-pitfalls", "prop-types", "css-scoping", "form-handling", "imports", "sections-vs-components" |
25
- | `get_code_example(task)` | Code examples — "add to cart", "variant selection", "image-handling", "product-detail-section", "cart-section" |
26
-
27
- ### Looking Up APIs
28
-
29
- | Tool | Purpose |
30
- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
- | `search_docs(query)` | Search across all storefront API docs and framework guides |
32
- | `get_function_doc(name)` | Full docs for a specific function (e.g. "addItemToCart", "Router.navigate") |
33
- | `list_functions(category?)` | List functions by category: ProductDetail, Cart, ProductList, Navigation, Customer, Order, Image, Blog, Brand, Category, Pricing, Form, Validation, Pagination, Filtering |
34
- | `get_prop_types()` | All available ikas.config.json prop types with TS types and examples |
35
-
36
- ### Exploring Types
37
-
38
- | Tool | Purpose |
39
- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
40
- | `get_model_guide(model)` | **One-stop-shop** — type definition + all utility functions + examples + related types for a model (e.g. "IkasProduct", "IkasOrder") |
41
- | `get_type_definition(name)` | Full definition of a type or enum (e.g. "IkasProduct", "IkasOrderStatus") |
42
- | `get_functions_for_type(typeName)` | All utility functions for a type (e.g. "IkasImage") |
43
- | `search_types(query)` | Search types/enums by keyword (e.g. "price", "address", "status") |
44
- | `list_types(domain?, kind?)` | List all types, optionally filtered by domain ("product", "cart", "order") or kind ("type", "enum") |
45
-
46
- ## CLI Commands
47
-
48
- **Never edit ikas.config.json or types.ts manually** — use the CLI commands:
49
-
50
- | Command | Purpose |
51
- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
52
- | `npx ikas-component config add-component --name "Name" --type section --props '[...]'` | **Primary** — create component with all props in one command |
53
- | `npx ikas-component config add-component --name "Name" --type section` | Create component with no props (add later) |
54
- | `npx ikas-component config add-prop --component "Name" --name title --displayName "Title" --type TEXT --required [--group content]` | Add a single prop incrementally |
55
- | `npx ikas-component config update-prop --component "Name" --prop title --type RICH_TEXT [--group colors]` | Update a prop's type or group |
56
- | `npx ikas-component config remove-prop --component "Name" --prop title` | Remove a prop |
57
- | `npx ikas-component config remove-component --name "Name"` | Remove a component |
58
- | `npx ikas-component config add-prop-group --component "Name" --id colors --name "Colors" [--description "..."] [--parent style]` | Create a prop group |
59
- | `npx ikas-component config update-prop-group --component "Name" --id colors [--name "..."] [--description "..."]` | Update a prop group |
60
- | `npx ikas-component config remove-prop-group --component "Name" --id colors` | Remove a prop group |
61
- | `npx ikas-component config list` | List all components and their props |
62
- | `npx ikas-component check --json` | Type-check all components, output errors as JSON |
63
- | `npx ikas-component build` | Compile server.js + client.js + styles.css per component |
64
- | `npx ikas-component dev` | Start dev server (Vite 5200 + WebSocket 5201) |
65
-
66
- ## Workflow: Building a New Section
67
-
68
- 1. `get_section_template("product-detail")` → get starter files + CLI command with --props
69
- 2. Run the CLI command (creates component + props + types.ts in one step)
70
- 3. Write `index.tsx` and `styles.css` using the template (do NOT edit types.ts — it's already generated)
71
- 4. Look up APIs → `get_model_guide("IkasProduct")`, `get_function_doc("addItemToCart")`
72
- 5. `npx ikas-component check --json` → fix type errors
73
- 6. `npx ikas-component build` → verify clean build
74
-
75
- ## Sub-Component Structure
76
-
77
- **ALWAYS create sub-components in `src/sub-components/` with their own folder containing `index.tsx` and `styles.css`. NEVER create flat .tsx files inside a component folder.**
78
-
79
- ```
80
- src/
81
- ├── components/
82
- │ ├── ProductList/
83
- │ │ ├── index.tsx # imports from ../../sub-components/...
84
- │ │ ├── types.ts # auto-generated (CLI-managed)
85
- │ │ └── styles.css # @import "../../sub-components/.../styles.css"
86
- │ └── index.ts
87
- └── sub-components/
88
- ├── ProductCard/
89
- │ ├── index.tsx # sub-component with inline Props
90
- │ └── styles.css
91
- └── FilterSidebar/
92
- ├── index.tsx
93
- └── styles.css
94
- ```
95
-
96
- **Key rules:**
97
-
98
- - `src/components/` = registered in ikas.config.json. `src/sub-components/` = internal helpers (NOT in ikas.config.json)
99
- - Sub-components do NOT have `types.ts` — define `Props` inline in `index.tsx`
100
- - CSS: use `@import "../../sub-components/ProductCard/styles.css";` in parent styles.css
101
- - TSX: use `import ProductCard from "../../sub-components/ProductCard";`
102
- - Sub-components that read MobX stores need `observer()`, others don't
103
- - Sub-components can be shared across multiple parent sections
104
-
105
- ```tsx
106
- // src/sub-components/ProductCard/index.tsx — inline Props, no types.ts
107
- import { IkasProduct, getSelectedProductVariant } from "@ikas/bp-storefront";
108
-
109
- interface Props { product: IkasProduct; }
110
-
111
- export default function ProductCard({ product }: Props) { ... }
112
- ```
113
-
114
- ## SVG Icons
115
-
116
- **CRITICAL: Never write inline `<svg>` in components or sub-components.**
117
- All icons live in `src/sub-components/icons/index.tsx` as named exports.
118
-
119
- ```tsx
120
- // Adding a new icon — IconProps extends SVGAttributes<SVGSVGElement>
121
- export function HeartSVG({ className, ...props }: IconProps) {
122
- return (
123
- <svg
124
- xmlns="http://www.w3.org/2000/svg"
125
- viewBox="0 0 24 24"
126
- fill="none"
127
- className={`kombos-icon ${className}`}
128
- {...props}
129
- >
130
- <path d="M20.84 4.61..." fill="currentColor" />
131
- </svg>
132
- );
133
- }
134
-
135
- // Using it
136
- import { HeartSVG } from "../../sub-components/icons";
137
- <HeartSVG />;
138
- ```
139
-
140
- ### Rules
141
-
142
- - One file (`index.tsx`) holds all icons — no separate files per icon
143
- - `IconProps` extends `SVGAttributes<SVGSVGElement>` from Preact — accepts all standard SVG attributes
144
- - Pattern: `{ className, ...props }` with `className={`kombos-icon ${className}`}` and `{...props}` spread
145
- - Icons use `fill="currentColor"` — they inherit color from the parent element's CSS `color` property
146
- - Before adding a new icon, check if it already exists in the file
147
-
148
- ### Sizing Icons
149
-
150
- **CRITICAL: Never pass `width`/`height` props to size icons.** Icon sizing is controlled via CSS `font-size` on the parent element or a wrapping class.
151
-
152
- The `.kombos-icon` base class uses `width: 1em; height: 1em` so icons scale with `font-size`.
153
-
154
- ```css
155
- /* Size an icon via font-size on the parent or the icon itself */
156
- .my-section__icon-btn {
157
- font-size: 1.5rem;
158
- } /* icon inside will be 24x24 */
159
- .my-section__small-icon {
160
- font-size: 1rem;
161
- } /* icon will be 16x16 */
162
- ```
163
-
164
- ```tsx
165
- /* In JSX — no width/height props needed */
166
- <button className="my-section__icon-btn"><HeartSVG /></button>
167
- <span className="my-section__small-icon"><PackageSVG /></span>
168
- ```
169
-
170
- ## Button Sub-Component
171
-
172
- **CRITICAL: Never write custom button styles in components.** All buttons MUST use `src/sub-components/Button`.
173
- Import: `import Button from "../../sub-components/Button";`
174
- CSS import: `@import "../../sub-components/Button/styles.css";` in parent styles.css
175
-
176
- ### Variants
177
-
178
- | Prop | Values | Default |
179
- | --------- | ---------------------------- | ----------- |
180
- | `variant` | `"primary"` \| `"secondary"` | `"primary"` |
181
- | `size` | `"xs"` \| `"s"` \| `"m"` | `"s"` |
182
-
183
- ### Size Specs (from Figma)
184
-
185
- | Size | Padding | Typography class |
186
- | ---- | --------- | ------------------ |
187
- | `xs` | 8px 16px | `text-sm-semibold` |
188
- | `s` | 10px 20px | `text-md-semibold` |
189
- | `m` | 12px 24px | `text-lg-semibold` |
190
-
191
- ### Variant Styles
192
-
193
- - **Primary:** bg gray-900, text white. Hover: bg gray-800. Disabled: bg gray-300, text gray-50.
194
- - **Secondary:** bg white, border gray-200, text gray-900. Hover: border gray-300. Disabled: bg gray-50, text gray-300.
195
-
196
- All: `border-radius: 6px`, typography class auto-applied by size.
197
-
198
- ### Usage
199
-
200
- ```tsx
201
- import Button from "../../sub-components/Button";
202
-
203
- <Button variant="primary" size="s">{buttonText}</Button>
204
- <Button variant="secondary" size="m" disabled>{disabledText}</Button>
205
- <Button variant="primary" size="xs" onClick={handleClick}>{label}</Button>
206
- ```
207
-
208
- Extends `JSX.HTMLAttributes<HTMLButtonElement>` — accepts all standard button props (`onClick`, `disabled`, `className`, `aria-label`, etc.).
209
- When placed in flex containers, add a layout class (e.g. `className="my-section__footer-btn"`) with `flex: 1` for full-width behavior.
210
-
211
- ## Input Sub-Component
212
-
213
- **CRITICAL: Never write custom input styles in components.** All text inputs MUST use `src/sub-components/Input`.
214
- Import: `import Input from "../../sub-components/Input";`
215
- CSS import: `@import "../../sub-components/Input/styles.css";` in parent styles.css
216
-
217
- Input is a pure input field — no label, no helper text. Wrap with `FormItem` for labels and validation messages.
218
-
219
- ### Props
220
-
221
- | Prop | Type | Default | Description |
222
- | ---------- | ----------------------- | ------- | -------------------------------------------------------------------- |
223
- | `password` | `boolean` | `false` | Shows eye toggle icon for password visibility |
224
- | `disabled` | `boolean` | `false` | Disabled state |
225
- | `leftIcon` | `ComponentChildren` | — | Icon rendered on the left (activates search-style border `gray-500`) |
226
- | `inputRef` | `Ref<HTMLInputElement>` | — | Ref forwarded to the native `<input>` element |
227
-
228
- Also extends `InputHTMLAttributes<HTMLInputElement>` — accepts `placeholder`, `value`, `onInput`, `name`, etc.
229
-
230
- ### Design Specs (from Figma)
231
-
232
- - Input field: padding `10px 14px`, border-radius `6px`, border `1px solid gray-200`
233
- - Input text: `text-md-regular`, color `gray-900`
234
- - Placeholder: color `gray-400`
235
- - Hover: border `gray-300`
236
- - With `leftIcon`: border `gray-500`, padding `10px 12px`, gap `12px`
237
- - Disabled: bg `gray-50`, text `gray-300`
238
-
239
- ### Usage
240
-
241
- ```tsx
242
- import Input from "../../sub-components/Input";
243
-
244
- <Input placeholder="you@example.com" />
245
- <Input password placeholder="Enter password" />
246
- <Input disabled placeholder="Disabled" />
247
- <Input leftIcon={<MagnifyingGlass1SVG />} placeholder="Search..." />
248
- ```
249
-
250
- **Remember:** Use `onInput` instead of `onChange` for text inputs (Preact behavior).
251
-
252
- ## FormItem Sub-Component
253
-
254
- Wraps form controls (Input, select, etc.) with a label and helper/error text.
255
- Import: `import FormItem from "../../sub-components/FormItem";`
256
- CSS import: `@import "../../sub-components/FormItem/styles.css";` in parent styles.css
257
-
258
- ### Props
259
-
260
- | Prop | Type | Default | Description |
261
- | ------------ | --------------------------------------- | ----------- | ---------------------------------------------------------- |
262
- | `label` | `string` | — | Label text above the input |
263
- | `status` | `"default"` \| `"error"` \| `"success"` | `"default"` | Controls border color of child Input and helper text color |
264
- | `helperText` | `string` | — | Helper/error/success message below the input |
265
- | `children` | `ComponentChildren` | — | The form control (e.g. `<Input />`) |
266
-
267
- ### Design Specs (from Figma)
268
-
269
- - Label: `text-xs-medium`, color `gray-700`
270
- - Helper text: `text-xs-regular`, default `gray-500`
271
- - Error: border & helper `--kombos-error` (#FF3C48)
272
- - Success: border & helper `--kombos-success` (#12B76A)
273
- - Gap between label / input / helper: `4px`
274
-
275
- ### Usage
276
-
277
- ```tsx
278
- import FormItem from "../../sub-components/FormItem";
279
- import Input from "../../sub-components/Input";
280
-
281
- <FormItem label="Email">
282
- <Input placeholder="you@example.com" />
283
- </FormItem>
284
-
285
- <FormItem label="Password">
286
- <Input password placeholder="Enter password" />
287
- </FormItem>
288
-
289
- <FormItem label="Email" status="error" helperText="Invalid email">
290
- <Input value="bad@" />
291
- </FormItem>
292
-
293
- <FormItem label="Email" status="success" helperText="Looks good!">
294
- <Input value="ok@ikas.com" />
295
- </FormItem>
296
- ```
297
-
298
- ## Media Utilities (`src/utils/media.ts`)
299
-
300
- **CRITICAL: Never define local `ASPECT_RATIO_MAP`, `OBJECT_FIT_MAP`, or `ALIGNMENT_MAP` in components.**
301
- All aspect ratio, object fit, and vertical alignment resolution MUST use the shared helpers from `src/utils/media.ts`.
302
-
303
- ```tsx
304
- import {
305
- resolveAspectRatio,
306
- resolveObjectFit,
307
- resolveVerticalAlignment,
308
- } from "../../utils/media";
309
-
310
- // Each function accepts an optional value and returns the CSS string.
311
- // When undefined is passed, defaults are applied: "Square" → "1 / 1", "Cover" → "cover", "Middle" → "center"
312
- const ar = resolveAspectRatio(aspectRatio); // e.g. "1 / 1"
313
- const of = resolveObjectFit(objectFit); // e.g. "cover"
314
- const va = resolveVerticalAlignment(align); // e.g. "center"
315
- ```
316
-
317
- - No need to set defaults in destructuring (`aspectRatio = "Square"`) — the functions handle it
318
- - Components that only pass these values through to children (e.g. `ProductDetailBundleFurniture`) don't need to import the utils
319
-
320
- ## Hooks (`src/hooks/`)
321
-
322
- ### `useScrollLock` — overlay/modal scroll lock (`src/hooks/useScrollLock.ts`)
323
-
324
- **CRITICAL: Never write inline `document.body.style.overflow = "hidden"` in components.** All overlay/modal scroll locking MUST use `useScrollLock`.
325
-
326
- ```tsx
327
- import { useScrollLock } from "../../hooks/useScrollLock";
328
-
329
- // Always-on (mount-triggered overlays: CartSidebar, AddressModal, ImagePreviewModal, SearchModal)
330
- useScrollLock();
331
-
332
- // Conditional (prop-triggered overlays: MobileFilterModal)
333
- useScrollLock(isOpen);
334
-
335
- // With skip-cleanup (overlay handoff: MobileMenu → CartSidebar)
336
- const skipCleanupRef = useRef(false);
337
- useScrollLock(true, skipCleanupRef);
338
- // Set skipCleanupRef.current = true before closing to keep scroll locked for the next overlay
339
- ```
340
-
341
- **Parameters:**
342
-
343
- - `enabled` (default `true`) — lock when true, unlock cleanup when false or unmount
344
- - `skipCleanupRef` (optional `RefObject<boolean>`) — when `.current` is true, cleanup skips restoring scroll (for seamless overlay transitions)
345
-
346
- **What it does:** calculates scrollbar width, sets `overflow: hidden` + `paddingRight` on body, restores on cleanup.
347
-
348
- **Exception:** `Header/index.tsx` uses a raw reset (`overflow = ""`) as a safety cleanup on mount — this is intentionally NOT using the hook.
349
-
350
- ### `useRedirectIfLoggedIn` — auth page guard (`src/hooks/useRedirectIfLoggedIn.ts`)
351
-
352
- Redirects logged-in users away from auth pages (Login, Register, ForgotPassword, RecoverPassword).
353
- Returns `isChecking: boolean` — render `null` while checking to avoid flash.
354
-
355
- ```tsx
356
- import { useRedirectIfLoggedIn } from "../../hooks/useRedirectIfLoggedIn";
357
-
358
- const isChecking = useRedirectIfLoggedIn(() => {
359
- initLoginForm(loginForm);
360
- });
361
- if (isChecking) return null;
362
- ```
363
-
364
- ## Utility Modules (`src/utils/`)
365
-
366
- ### `cx()` — className joiner (`src/utils/cx.ts`)
367
-
368
- **CRITICAL: Use `cx()` for conditional className assembly.** Never use template literal ternaries for conditional classes.
369
-
370
- Wrong: `className={\`base ${cond ? "modifier" : ""}\`}`Correct:`className={cx("base", cond && "modifier")}`
371
-
372
- Import: `import { cx } from "../../utils/cx";`
373
-
374
- ### `getSelectValuePrice()` — option price formatter (`src/utils/optionPrice.ts`)
375
-
376
- Formats price for product option select values. Used by ChoiceBox, ChoiceSelect, ChoiceSwatch.
377
-
378
- ### `isBundleOutOfStock()` — bundle helpers (`src/utils/bundle.ts`)
379
-
380
- Bundle validation logic shared across ProductDetailAddToCart and ProductDetailPrices.
381
-
382
- ## Key Patterns
383
-
384
- ### Component Exports & Reactivity
385
-
386
- ```tsx
387
- // Root components are automatically reactive — the ikas runtime wraps them in autorun().
388
- // Do NOT import or use observer() on root exports.
389
- import { Props } from "./types";
390
-
391
- export function MySection({ product }: Props) { ... }
392
- export default MySection;
393
- ```
394
-
395
- ```tsx
396
- // Only use observer() on extracted SUB-COMPONENTS that independently read MobX stores:
397
- import { observer } from "@ikas/component-utils";
398
-
399
- const CartBadge = observer(function CartBadge() {
400
- const count = cartStore.order?.orderLineItems?.length ?? 0;
401
- return <span>{count}</span>;
402
- });
403
- ```
404
-
405
- ### Null Safety
406
-
407
- ```tsx
408
- // Storefront models can be null — always check before accessing
409
- if (!product) return null;
410
- const price = product.selectedVariant?.price?.formattedPrice ?? "";
411
- ```
412
-
413
- ### Mutations
414
-
415
- ```tsx
416
- // Functions like addItemToCart() mutate the model in-place (MobX observable)
417
- // No need to capture return value — root components re-render automatically via autorun()
418
- await addItemToCart({ product });
419
- ```
420
-
421
- ### CSS Scoping
422
-
423
- All CSS is auto-scoped with `.cc_{componentId}` prefix. Write plain class names — they are scoped at build time.
424
-
425
- ### Preact Event Handling
426
-
427
- Use `onInput` instead of `onChange` for text inputs (Preact behavior).
428
-
429
- ### Import Source
430
-
431
- ```tsx
432
- import { addItemToCart, IkasProduct, IkasImage } from "@ikas/bp-storefront";
433
- ```
434
-
435
- ## No Static Text Rule
436
-
437
- **CRITICAL: Never hardcode user-visible text in JSX.** All text strings (headings, button labels,
438
- empty states, loading messages, form labels) MUST be TEXT props with defaultValues.
439
-
440
- Wrong: `<h1>Sign In</h1>`
441
- Correct: `<h1>{title}</h1>` with `title` as TEXT prop (defaultValue: "Sign In")
442
-
443
- For button loading states, use two separate props:
444
-
445
- - `submitButtonText` (default: "Sign In")
446
- - `submittingButtonText` (default: "Signing in...")
447
-
448
- Group text props under a "Texts" propGroup when the component has 5+ props.
449
-
450
- ## Sections vs Components
451
-
452
- - **Sections** = page-level, full-width containers (Header, Hero, Product Grid, Footer).
453
- Set `"type": "section"` via CLI. Use `<section>` root element. Props interface: `Props`.
454
- **Sections MUST use `kombos-container` for max-width.** The `<section>` root stays full-width (for background color),
455
- but all inner content MUST be wrapped in a `<div className="kombos-container">` (or added to an existing inner div).
456
- This limits content to `var(--kombos-max-width)` (1500px) and centers it with `margin: auto`.
457
- Padding/layout styles go on the container wrapper, NOT on the `<section>` root.
458
- **Exceptions:** Header (sticky, renders child components via IkasComponentRenderer) and HeroSlider (full-width by design) do NOT use the container.
459
- - **Components** = child elements placed inside sections (buttons, cards, badges).
460
- Defaults to `"component"`. Use `<div>` root element. Props interface: `Props`.
461
-
462
- ## Prop Groups
463
-
464
- Organize props into collapsible groups in the editor sidebar. Use prop groups when a component has 5+ props to improve UX.
465
-
466
- ### Config Format
467
-
468
- - Define groups in `propGroups` array on the component in `ikas.config.json`
469
- - Assign props to groups via `groupId` on each prop
470
- - Groups can nest 1 level deep via `children`
471
- - Props without `groupId` appear ungrouped at root level
472
- - Group IDs must be unique within a component
473
- - **NEVER assign `COMPONENT` or `COMPONENT_LIST` props to a prop group** — they don't render in the editor sidebar, so grouping them is meaningless. Leave them ungrouped at root level.
474
-
475
- ### CLI Commands
476
-
477
- - `config add-prop-group --component "Name" --id content --name "Content"` — create group
478
- - `config add-prop-group --component "Name" --id colors --name "Colors" --parent style` — create nested group
479
- - `config add-prop --component "Name" --name title --displayName "Title" --type TEXT --group content` — add prop to group
480
- - `config update-prop --component "Name" --prop title --group colors` — move prop to different group
481
- - `config remove-prop-group --component "Name" --id content` — remove group (props become ungrouped)
482
-
483
- ### When to Use
484
-
485
- - 5+ props → group related props
486
- - Sections with content + style props → separate "Content" and "Appearance" groups
487
- - Complex sections → use nested groups (e.g., "Style" → "Colors", "Typography")
488
-
489
- ## Workflow Addition
490
-
491
- When building a section with 5+ props, organize into prop groups after defining props:
492
-
493
- ```bash
494
- npx ikas-component config add-prop-group --component "Name" --id content --name "Content"
495
- npx ikas-component config update-prop --component "Name" --prop title --group content
496
- ```
497
-
498
- ## Global Z-Index (Kombos Design System)
499
-
500
- **CRITICAL: Never hardcode `z-index` values in component CSS.**
501
- All z-index levels are defined as CSS custom properties in `src/global.css` under `:root`.
502
-
503
- | Variable | Value | Usage |
504
- | --------------------- | ----- | -------------------------------------------- |
505
- | `--kombos-z-dropdown` | 50 | Dropdown menus |
506
- | `--kombos-z-header` | 100 | Sticky header |
507
- | `--kombos-z-overlay` | 200 | Overlays (cart sidebar, mobile menu, modals) |
508
-
509
- ```css
510
- .my-dropdown {
511
- z-index: var(--kombos-z-dropdown);
512
- }
513
- .my-header {
514
- z-index: var(--kombos-z-header);
515
- }
516
- .my-overlay {
517
- z-index: var(--kombos-z-overlay);
518
- }
519
- ```
520
-
521
- ## Global Colors (Kombos Design System)
522
-
523
- **CRITICAL: Never hardcode hex color values in component CSS.**
524
- All colors are defined as CSS custom properties in `src/global.css` under `:root`.
525
- Use `var(--kombos-*)` in component CSS. Only `rgba()` values for overlays/shadows are exempt.
526
-
527
- ### Available Variables
528
-
529
- | Variable | Hex | Usage |
530
- | ------------------- | ------- | ----------------------------------- |
531
- | `--kombos-white` | #ffffff | Backgrounds, text on dark |
532
- | `--kombos-gray-50` | #fafafa | Hover backgrounds |
533
- | `--kombos-gray-100` | #f6f6f6 | Light borders, image placeholders |
534
- | `--kombos-gray-200` | #ececed | Separator borders |
535
- | `--kombos-gray-300` | #c4c4c6 | Disabled/muted borders, muted icons |
536
- | `--kombos-gray-400` | #9c9c9f | Placeholder/empty state text |
537
- | `--kombos-gray-500` | #727276 | Secondary text (sublinks, captions) |
538
- | `--kombos-gray-600` | #4a4a4f | — |
539
- | `--kombos-gray-700` | #2e2e33 | Primary text, icons |
540
- | `--kombos-gray-800` | #202025 | — |
541
- | `--kombos-gray-900` | #14141a | Headings, buttons, badges |
542
- | `--kombos-badge-bg` | #ff0000 | Cart badge background |
543
-
544
- ### Usage in CSS
545
-
546
- ```css
547
- .my-section__title {
548
- color: var(--kombos-gray-900);
549
- }
550
- .my-section__border {
551
- border: 1px solid var(--kombos-gray-100);
552
- }
553
- .my-section__btn {
554
- background: var(--kombos-gray-900);
555
- color: var(--kombos-white);
556
- }
557
- .my-section__btn:hover {
558
- background: var(--kombos-gray-700);
559
- }
560
- ```
561
-
562
- ### Rules
563
-
564
- - Every color in component CSS MUST use a `var(--kombos-*)` variable
565
- - Only exception: `rgba()` for overlays (`rgba(0,0,0,0.35)`) and box-shadows
566
- - When props provide dynamic colors (e.g., `backgroundColor`, `textColor`), apply via inline `style` in JSX — CSS variables are for static/design-system colors only
567
-
568
- ## Global Typography (Kombos Design System)
569
-
570
- **CRITICAL: Never write `font-family`, `font-weight`, `font-size`, or `line-height` in component CSS.**
571
- All typography is defined as utility classes in `src/global.css`. Apply them via `className` in JSX.
572
-
573
- **`font-family` is NOT set by typography classes.** The storefront injects a global `* { font-family: ... }` rule
574
- which acts as the base font. Our typography classes only control `font-weight`, `font-size`, and `line-height`.
575
- Never add `font-family` in component CSS or global typography classes — let the storefront's global font cascade through.
576
-
577
- Font: **Montserrat** | Weights: Regular 400, Medium 500, Semibold 600
578
-
579
- ### Class Naming Convention
580
-
581
- ```
582
- {scale}-{size}-{weight}
583
- ```
584
-
585
- - **Scale:** `display` (large headings) or `text` (body/UI text)
586
- - **Size:** `xxl`, `xl`, `lg`, `md`, `sm`, `xs`
587
- - **Weight:** `regular`, `medium`, `semibold`
588
- - **Special variants:** append `-strike` (line-through) or `-underline`
589
-
590
- ### Available Classes & Sizes
591
-
592
- | Class prefix | Font size | Line height |
593
- | --------------- | --------- | ----------- |
594
- | `display-xxl-*` | 72px | 90px |
595
- | `display-xl-*` | 60px | 72px |
596
- | `display-lg-*` | 48px | 60px |
597
- | `display-md-*` | 36px | 44px |
598
- | `display-sm-*` | 30px | 38px |
599
- | `display-xs-*` | 24px | 32px |
600
- | `text-xl-*` | 20px | 30px |
601
- | `text-lg-*` | 18px | 28px |
602
- | `text-md-*` | 16px | 24px |
603
- | `text-sm-*` | 14px | 20px |
604
- | `text-xs-*` | 12px | 18px |
605
-
606
- ### Usage in JSX
607
-
608
- ```tsx
609
- // Combine component class with typography class
610
- <h1 className="my-section__title display-sm-semibold">{title}</h1>
611
- <p className="my-section__desc text-md-regular">{description}</p>
612
- <a className="my-section__link text-sm-medium">{label}</a>
613
- <button className="my-section__btn text-md-semibold">{buttonText}</button>
614
- ```
615
-
616
- ### Responsive Prefixes (Tailwind-style)
617
-
618
- - No prefix = mobile/base (all breakpoints)
619
- - `sm:` = 640px+
620
- - `md:` = 768px+
621
- - `lg:` = 1024px+
622
-
623
- Usage: `className="text-sm-medium md:text-md-medium lg:text-lg-medium"`
624
- This renders `text-sm` on mobile, `text-md` on 768px+, `text-lg` on 1024px+.
625
-
626
- ### Rules
627
-
628
- - Every visible text element MUST have a typography class in its `className`
629
- - Component CSS handles layout, spacing, color, decoration — NOT font properties
630
- - Only exception: elements with non-standard sizes not in the scale (e.g., 10px badge, 22px logo text) can use inline font properties in component CSS
631
- - Use responsive prefixes (`sm:`, `md:`, `lg:`) instead of writing font-size media queries in component CSS
632
-
633
- ## Responsive Breakpoints
634
-
635
- All components use a **mobile-first** approach with three breakpoints: **640px**, **768px**, and **1024px**.
636
-
637
- - Base styles → Small mobile (< 640px: tightest padding, minimal layout)
638
- - `≥ 640px` → Small tablet (slightly wider padding)
639
- - `≥ 768px` → Tablet (hamburger menu, mobile logo size, medium padding)
640
- - `≥ 1024px` → Desktop (full nav, desktop logo size, wider padding)
641
-
642
- ```css
643
- /* Mobile-first: base styles are small mobile, then scale up */
644
- .my-section__element {
645
- padding: 0.625rem 1rem;
646
- }
647
-
648
- @media (min-width: 768px) {
649
- .my-section__element {
650
- padding: 0.75rem 2rem;
651
- }
652
- /* tablet adjustments */
653
- }
654
-
655
- @media (min-width: 1024px) {
656
- .my-section__element {
657
- padding: 0.75rem 4.5rem;
658
- }
659
- /* full nav visible, desktop logo size, wider padding */
660
- }
661
- ```
662
-
663
- ## CSS Units — rem Convention
664
-
665
- **CRITICAL: Use `rem` for all spacing and sizing values. Keep `px` only for borders, border-radius, box-shadow, and outlines.**
666
-
667
- Base: `16px = 1rem`. Figma gives pixel values — convert with `value / 16`.
668
-
669
- ### Convert to rem
670
-
671
- - `font-size`, `line-height`
672
- - `padding`, `margin` (all sides)
673
- - `gap`, `row-gap`, `column-gap`
674
- - `width`, `height`, `max-width`, `max-height`, `min-width`, `min-height`
675
- - `top`, `right`, `bottom`, `left`
676
- - CSS custom properties for spacing/sizing
677
-
678
- ### Keep as px
679
-
680
- - `border`, `border-width` (1px, 2px borders)
681
- - `border-radius`
682
- - `box-shadow`
683
- - `outline`
684
- - `@media` breakpoints (640px, 768px, 1024px)
685
-
686
- ### Common Conversions (Figma px → CSS rem)
687
-
688
- | px | rem | | px | rem |
689
- | --- | ----- | --- | --- | ----- |
690
- | 4 | 0.25 | | 24 | 1.5 |
691
- | 6 | 0.375 | | 28 | 1.75 |
692
- | 8 | 0.5 | | 30 | 1.875 |
693
- | 10 | 0.625 | | 32 | 2 |
694
- | 12 | 0.75 | | 36 | 2.25 |
695
- | 14 | 0.875 | | 40 | 2.5 |
696
- | 16 | 1 | | 48 | 3 |
697
- | 18 | 1.125 | | 60 | 3.75 |
698
- | 20 | 1.25 | | 72 | 4.5 |
699
-
700
- ```css
701
- /* Correct */
702
- .my-section {
703
- padding: 1rem 1.5rem;
704
- gap: 0.75rem;
705
- }
706
- .my-section {
707
- border: 1px solid var(--kombos-gray-200);
708
- border-radius: 6px;
709
- }
710
-
711
- /* Wrong */
712
- .my-section {
713
- padding: 16px 24px;
714
- gap: 12px;
715
- }
716
- ```
717
-
718
- ## Build Verification
719
-
720
- IMPORTANT: After completing any task, always run `npx ikas-component build` (or `npm run build`) to check for
721
- TypeScript and build errors. Fix any errors before considering the task done.