@evenicanpm/storefront-core 1.0.3 → 1.0.4

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 (319) hide show
  1. package/docs.tsconfig.json +35 -0
  2. package/package.json +6 -3
  3. package/src/api-manager/schemas/product.schema.ts +0 -1
  4. package/src/api-manager/services/create-query.ts +10 -0
  5. package/src/api-manager/services/product/queries/get-product-availability.ts +1 -1
  6. package/src/api-manager/services/user/mutations/add-to-wishlist.ts +23 -3
  7. package/src/api-manager/services/user/mutations/remove-from-wishlist.ts +23 -0
  8. package/src/cms/blocks/Components/CategoryCarousel/index.tsx +6 -7
  9. package/src/cms/blocks/Components/HeroCarousel/index.tsx +25 -19
  10. package/src/cms/blocks/Components/ProductCarousel/index.tsx +44 -38
  11. package/src/cms/blocks/Components/ProductSectionFullWidth/index.tsx +7 -3
  12. package/src/cms/blocks/Components/shared/product-grid.tsx +38 -23
  13. package/src/components/_components/wishlist/add-to-wishlist-dialog.tsx +1 -1
  14. package/src/components/_components/wishlist/remove-from-wishlist-dialog.tsx +1 -1
  15. package/src/components/_components/wishlist-modal/add-to-wishlist-dialog.tsx +1 -1
  16. package/src/components/_components/wishlist-modal/remove-from-wishlist-dialog.tsx +1 -1
  17. package/src/components-v2/carousel/carousel.tsx +69 -35
  18. package/src/components-v2/carousel/components/carousel-arrows.tsx +40 -46
  19. package/src/components-v2/carousel/components/carousel-dots.tsx +10 -13
  20. package/src/components-v2/carousel/index.ts +0 -2
  21. package/src/components-v2/carousel-cards/carousel-card-1/carousel-card-1.tsx +68 -49
  22. package/src/components-v2/categories/category-list/category-list.tsx +83 -41
  23. package/src/components-v2/categories/category-list/styles.ts +7 -1
  24. package/src/components-v2/categories/category-menu.tsx +2 -0
  25. package/src/components-v2/categories/mega-menu/banner.tsx +68 -37
  26. package/src/components-v2/categories/mega-menu/column-list.tsx +59 -52
  27. package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +19 -1
  28. package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +32 -2
  29. package/src/components-v2/header/components/mobile-header.tsx +119 -46
  30. package/src/components-v2/header/components/user.tsx +163 -117
  31. package/src/components-v2/header/header.tsx +62 -42
  32. package/src/components-v2/header/sticky-header.tsx +34 -2
  33. package/src/components-v2/mini-cart/components/bottom-actions.tsx +71 -17
  34. package/src/components-v2/mini-cart/components/cart-item.tsx +159 -101
  35. package/src/components-v2/mini-cart/components/empty-view.tsx +59 -19
  36. package/src/components-v2/mini-cart/components/top-header.tsx +61 -22
  37. package/src/components-v2/mini-cart/mini-cart-trigger.tsx +99 -0
  38. package/src/components-v2/mini-cart/mini-cart.tsx +111 -43
  39. package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +93 -48
  40. package/src/components-v2/navbar/categories.tsx +70 -16
  41. package/src/components-v2/navbar/category-based-menu/category-based-menu.tsx +135 -41
  42. package/src/components-v2/navbar/mega-menu/mega-menu.tsx +115 -48
  43. package/src/components-v2/navbar/mobile-menu/mobile-menu.test.tsx +111 -0
  44. package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +127 -56
  45. package/src/components-v2/navbar/nav-list/nav-list.tsx +125 -103
  46. package/src/components-v2/navbar/navbar.tsx +72 -20
  47. package/src/components-v2/product-cards/{product-card-1 → product-card}/components/quantity-buttons.tsx +1 -1
  48. package/src/components-v2/product-cards/product-card/product-card.tsx +410 -0
  49. package/src/components-v2/product-cards/{product-card-1 → product-card}/styles/index.ts +6 -0
  50. package/src/components-v2/product-cards/product-card-plp/product-card.tsx +161 -0
  51. package/src/components-v2/product-cards/product-card-plp-list/index.ts +1 -0
  52. package/src/components-v2/product-cards/product-card-plp-list/product-card.tsx +219 -0
  53. package/src/components-v2/product-cards/product-card-search/product-card.tsx +166 -0
  54. package/src/components-v2/product-dialog/compound/product-dialog.tsx +225 -0
  55. package/src/components-v2/product-dialog/index.tsx +29 -0
  56. package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-error.tsx +1 -1
  57. package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-label.tsx +1 -1
  58. package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list-chip.tsx +1 -1
  59. package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list.tsx +1 -1
  60. package/src/components-v2/product-dimensions/{components → compound}/dimensions-group.tsx +1 -1
  61. package/src/components-v2/product-dimensions/{components → compound}/dimensions.tsx +0 -3
  62. package/src/components-v2/product-dimensions/index.tsx +1 -1
  63. package/src/components-v2/product-quantity-buttons/compound/quantity-buttons-root.tsx +181 -0
  64. package/src/components-v2/product-quantity-buttons/index.tsx +22 -0
  65. package/src/components-v2/product-quantity-variants/index.tsx +90 -0
  66. package/src/components-v2/products-view/compound/context.ts +25 -0
  67. package/src/components-v2/products-view/compound/products-grid-view.tsx +109 -0
  68. package/src/components-v2/products-view/compound/products-list-view.tsx +98 -0
  69. package/src/components-v2/products-view/compound/types.ts +12 -0
  70. package/src/components-v2/products-view/index.tsx +45 -0
  71. package/src/components-v2/products-view/products-grid-view.tsx +24 -11
  72. package/src/components-v2/products-view/products-list-view.tsx +29 -12
  73. package/src/components-v2/search-bar/compound/context.ts +31 -0
  74. package/src/components-v2/search-bar/compound/results-item-lg.tsx +43 -0
  75. package/src/components-v2/search-bar/compound/results-item-sm.tsx +48 -0
  76. package/src/components-v2/search-bar/compound/results-suspense.tsx +49 -0
  77. package/src/components-v2/search-bar/compound/results.tsx +42 -0
  78. package/src/components-v2/search-bar/compound/search-bar-root.tsx +64 -0
  79. package/src/components-v2/search-bar/compound/textfield-adornment-button.tsx +22 -0
  80. package/src/components-v2/{search-box/components/category-dropdown.tsx → search-bar/compound/textfield-adornment-category.tsx} +29 -7
  81. package/src/components-v2/search-bar/compound/textfield-adornment-search-icon.tsx +34 -0
  82. package/src/components-v2/search-bar/compound/textfield.tsx +58 -0
  83. package/src/components-v2/search-bar/hooks/use-click-outside.ts +20 -0
  84. package/src/components-v2/search-bar/hooks/use-search.ts +63 -0
  85. package/src/components-v2/search-bar/index.tsx +36 -0
  86. package/src/components-v2/{search-box → search-bar}/styles/index.ts +5 -3
  87. package/src/components-v2/search-bar/utils/findCategoryNameById.ts +18 -0
  88. package/src/components-v2/section/compound/section-header.tsx +63 -0
  89. package/src/components-v2/section/compound/section.tsx +26 -0
  90. package/src/components-v2/section/index.ts +1 -0
  91. package/src/components-v2/side-nav/side-nav.tsx +4 -5
  92. package/src/components-v2/sticky/index.ts +1 -1
  93. package/src/components-v2/{wishlist-modal → wishlist-dialogs/add-to-wishlist}/add-to-wishlist-button.tsx +1 -1
  94. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-bottom-ui.tsx +35 -0
  95. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-dialog.tsx +79 -0
  96. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-list.tsx +41 -0
  97. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/context.ts +29 -0
  98. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-header.tsx +74 -0
  99. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-item.tsx +82 -0
  100. package/src/components-v2/wishlist-dialogs/add-to-wishlist/hooks/use-add-to-wishlist.ts +152 -0
  101. package/src/components-v2/wishlist-dialogs/add-to-wishlist/index.tsx +39 -0
  102. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/context.ts +2 -0
  103. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-bottom-ui.tsx +42 -0
  104. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-dialog.tsx +92 -0
  105. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-form.tsx +96 -0
  106. package/src/components-v2/{wishlist/components → wishlist-dialogs/create-wishlist}/create-wishlist-button.tsx +5 -3
  107. package/src/components-v2/wishlist-dialogs/create-wishlist/index.tsx +22 -0
  108. package/src/hooks/use-cart.ts +29 -23
  109. package/src/hooks/use-variants.ts +106 -53
  110. package/src/lib/build-detail-url.ts +2 -1
  111. package/src/pages/product-details/product-intro/product-intro.tsx +26 -23
  112. package/src/pages/product-list/quick-view-dialog-content.tsx +18 -9
  113. package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +9 -8
  114. package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +2 -2
  115. package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/shop-card.tsx +17 -48
  116. package/src/pages-v2/product-details/bopis/store-card/utils/convertSecondsToTime.ts +8 -0
  117. package/src/pages-v2/product-details/bopis/store-card/utils/getDaysResources.ts +25 -0
  118. package/src/pages-v2/product-details/product-intro/compound/context.ts +52 -0
  119. package/src/pages-v2/product-details/product-intro/compound/product-info.tsx +231 -0
  120. package/src/pages-v2/product-details/product-intro/compound/product-intro-images.tsx +124 -0
  121. package/src/pages-v2/product-details/product-intro/compound/product-intro.tsx +49 -0
  122. package/src/pages-v2/product-details/product-intro/compound/thumbnail-with-skeleton.tsx +28 -0
  123. package/src/pages-v2/product-details/product-intro/utils.ts +42 -0
  124. package/src/pages-v2/product-details/product-tabs.tsx +87 -21
  125. package/src/pages-v2/product-details/related-products.tsx +26 -12
  126. package/src/pages-v2/product-list/quick-view-dialog-content.tsx +17 -10
  127. package/typedoc.js +3 -1
  128. package/src/components-v2/MiniCartClient.tsx +0 -65
  129. package/src/components-v2/carousel-cards/carousel-card-2/carousel-card-2.tsx +0 -78
  130. package/src/components-v2/carousel-cards/carousel-card-2/index.ts +0 -1
  131. package/src/components-v2/carousel-cards/carousel-card-2/styles.ts +0 -26
  132. package/src/components-v2/carousel-cards/carousel-card-3/carousel-card-3.tsx +0 -37
  133. package/src/components-v2/carousel-cards/carousel-card-3/index.ts +0 -1
  134. package/src/components-v2/carousel-cards/carousel-card-3/styles.ts +0 -28
  135. package/src/components-v2/carousel-cards/carousel-card-4/carousel-card-4.tsx +0 -81
  136. package/src/components-v2/carousel-cards/carousel-card-4/index.ts +0 -1
  137. package/src/components-v2/carousel-cards/carousel-card-4/styles.ts +0 -27
  138. package/src/components-v2/category-cards/category-card-1/category-card-1.tsx +0 -21
  139. package/src/components-v2/category-cards/category-card-1/index.ts +0 -1
  140. package/src/components-v2/category-cards/category-card-1/styles.ts +0 -37
  141. package/src/components-v2/countdown/count-box.tsx +0 -19
  142. package/src/components-v2/countdown/count-down.tsx +0 -24
  143. package/src/components-v2/countdown/index.tsx +0 -2
  144. package/src/components-v2/countdown/useCountDown.ts +0 -41
  145. package/src/components-v2/data-table/index.ts +0 -2
  146. package/src/components-v2/data-table/table-header.tsx +0 -91
  147. package/src/components-v2/data-table/table-pagination.tsx +0 -36
  148. package/src/components-v2/footer/components/about-links.tsx +0 -23
  149. package/src/components-v2/footer/components/app-store.tsx +0 -38
  150. package/src/components-v2/footer/components/customer-care-links.tsx +0 -21
  151. package/src/components-v2/footer/components/logo.tsx +0 -23
  152. package/src/components-v2/footer/components/social-links.tsx +0 -43
  153. package/src/components-v2/footer/data/index.ts +0 -54
  154. package/src/components-v2/footer/footer-1.tsx +0 -62
  155. package/src/components-v2/footer/footer-2.tsx +0 -57
  156. package/src/components-v2/footer/footer-3.tsx +0 -53
  157. package/src/components-v2/footer/footer-4.tsx +0 -71
  158. package/src/components-v2/footer/index.ts +0 -4
  159. package/src/components-v2/footer/styles/index.ts +0 -42
  160. package/src/components-v2/navbar/category-based-menu/components/categories.tsx +0 -44
  161. package/src/components-v2/navbar/category-based-menu/components/category-item.tsx +0 -31
  162. package/src/components-v2/navbar/category-based-menu/components/child-categories.tsx +0 -38
  163. package/src/components-v2/navbar/mega-menu/category-list.tsx +0 -29
  164. package/src/components-v2/navbar/mobile-menu/render-levels.test.tsx +0 -71
  165. package/src/components-v2/navbar/mobile-menu/render-levels.tsx +0 -62
  166. package/src/components-v2/newsletter/index.ts +0 -1
  167. package/src/components-v2/newsletter/newsletter.tsx +0 -112
  168. package/src/components-v2/newsletter/social-icons.tsx +0 -35
  169. package/src/components-v2/newsletter/styles.ts +0 -65
  170. package/src/components-v2/page-sidenav/grocery-side-nav/components/link-item.tsx +0 -21
  171. package/src/components-v2/page-sidenav/grocery-side-nav/components/list-item.tsx +0 -27
  172. package/src/components-v2/page-sidenav/grocery-side-nav/components/nav-accordion.tsx +0 -36
  173. package/src/components-v2/page-sidenav/grocery-side-nav/components/render-child.tsx +0 -26
  174. package/src/components-v2/page-sidenav/grocery-side-nav/grocery-side-nav.tsx +0 -32
  175. package/src/components-v2/page-sidenav/grocery-side-nav/index.ts +0 -1
  176. package/src/components-v2/page-sidenav/grocery-side-nav/styles/index.ts +0 -11
  177. package/src/components-v2/page-sidenav/health-beauty-side-nav/components/list-item.tsx +0 -27
  178. package/src/components-v2/page-sidenav/health-beauty-side-nav/components/nav-accordion.tsx +0 -44
  179. package/src/components-v2/page-sidenav/health-beauty-side-nav/components/render-child.tsx +0 -20
  180. package/src/components-v2/page-sidenav/health-beauty-side-nav/health-beauty-side-nav.tsx +0 -43
  181. package/src/components-v2/page-sidenav/health-beauty-side-nav/index.ts +0 -1
  182. package/src/components-v2/page-sidenav/health-beauty-side-nav/styles/index.ts +0 -27
  183. package/src/components-v2/page-sidenav/side-navbar/components/list-item.tsx +0 -25
  184. package/src/components-v2/page-sidenav/side-navbar/components/nav-accordion.tsx +0 -46
  185. package/src/components-v2/page-sidenav/side-navbar/components/render-child.tsx +0 -20
  186. package/src/components-v2/page-sidenav/side-navbar/index.ts +0 -1
  187. package/src/components-v2/page-sidenav/side-navbar/side-nav-bar.tsx +0 -77
  188. package/src/components-v2/page-sidenav/side-navbar/styles/index.ts +0 -73
  189. package/src/components-v2/page-sidenav/side-navbar-2/components/button-content.tsx +0 -32
  190. package/src/components-v2/page-sidenav/side-navbar-2/components/sidebar-accordion.tsx +0 -66
  191. package/src/components-v2/page-sidenav/side-navbar-2/index.ts +0 -1
  192. package/src/components-v2/page-sidenav/side-navbar-2/side-navbar-2.tsx +0 -63
  193. package/src/components-v2/page-sidenav/side-navbar-2/styles/index.ts +0 -68
  194. package/src/components-v2/product-cards/product-card-1/index.ts +0 -1
  195. package/src/components-v2/product-cards/product-card-1/product-card-1-wrapper.tsx +0 -304
  196. package/src/components-v2/product-cards/product-card-1/product-card.tsx +0 -107
  197. package/src/components-v2/product-cards/product-card-10/index.ts +0 -1
  198. package/src/components-v2/product-cards/product-card-10/product-card.tsx +0 -128
  199. package/src/components-v2/product-cards/product-card-10/styles/index.ts +0 -38
  200. package/src/components-v2/product-cards/product-card-11/index.ts +0 -1
  201. package/src/components-v2/product-cards/product-card-11/product-card.tsx +0 -66
  202. package/src/components-v2/product-cards/product-card-11/styles/index.ts +0 -16
  203. package/src/components-v2/product-cards/product-card-12/index.ts +0 -1
  204. package/src/components-v2/product-cards/product-card-12/product-card.tsx +0 -42
  205. package/src/components-v2/product-cards/product-card-12/styles/index.ts +0 -16
  206. package/src/components-v2/product-cards/product-card-13/index.ts +0 -1
  207. package/src/components-v2/product-cards/product-card-13/product-card.tsx +0 -48
  208. package/src/components-v2/product-cards/product-card-13/styles/index.ts +0 -25
  209. package/src/components-v2/product-cards/product-card-14/index.ts +0 -1
  210. package/src/components-v2/product-cards/product-card-14/product-card.tsx +0 -125
  211. package/src/components-v2/product-cards/product-card-14/styles/index.ts +0 -40
  212. package/src/components-v2/product-cards/product-card-15/index.ts +0 -1
  213. package/src/components-v2/product-cards/product-card-15/product-card.tsx +0 -121
  214. package/src/components-v2/product-cards/product-card-15/styles/index.ts +0 -57
  215. package/src/components-v2/product-cards/product-card-16/product-card.tsx +0 -116
  216. package/src/components-v2/product-cards/product-card-2/components/favorite-button.tsx +0 -29
  217. package/src/components-v2/product-cards/product-card-2/components/product-price.tsx +0 -26
  218. package/src/components-v2/product-cards/product-card-2/index.ts +0 -1
  219. package/src/components-v2/product-cards/product-card-2/product-card.tsx +0 -70
  220. package/src/components-v2/product-cards/product-card-3/components/hover-actions.tsx +0 -83
  221. package/src/components-v2/product-cards/product-card-3/index.ts +0 -1
  222. package/src/components-v2/product-cards/product-card-3/product-card.tsx +0 -110
  223. package/src/components-v2/product-cards/product-card-3/styles/index.ts +0 -89
  224. package/src/components-v2/product-cards/product-card-4/components/hover-actions.tsx +0 -50
  225. package/src/components-v2/product-cards/product-card-4/index.ts +0 -1
  226. package/src/components-v2/product-cards/product-card-4/product-card.tsx +0 -128
  227. package/src/components-v2/product-cards/product-card-4/styles/index.ts +0 -66
  228. package/src/components-v2/product-cards/product-card-5/components/button-actions.tsx +0 -49
  229. package/src/components-v2/product-cards/product-card-5/components/hover-actions.tsx +0 -50
  230. package/src/components-v2/product-cards/product-card-5/index.ts +0 -1
  231. package/src/components-v2/product-cards/product-card-5/product-card.tsx +0 -137
  232. package/src/components-v2/product-cards/product-card-5/styles/index.ts +0 -94
  233. package/src/components-v2/product-cards/product-card-6/components/hover-actions.tsx +0 -50
  234. package/src/components-v2/product-cards/product-card-6/index.ts +0 -1
  235. package/src/components-v2/product-cards/product-card-6/product-card.tsx +0 -121
  236. package/src/components-v2/product-cards/product-card-6/styles/index.ts +0 -63
  237. package/src/components-v2/product-cards/product-card-7/components/product-status.tsx +0 -18
  238. package/src/components-v2/product-cards/product-card-7/components/quantity-buttons.tsx +0 -47
  239. package/src/components-v2/product-cards/product-card-7/index.ts +0 -1
  240. package/src/components-v2/product-cards/product-card-7/product-card.tsx +0 -139
  241. package/src/components-v2/product-cards/product-card-7/styles/index.ts +0 -98
  242. package/src/components-v2/product-cards/product-card-8/product-card.tsx +0 -151
  243. package/src/components-v2/product-cards/product-card-9/index.ts +0 -1
  244. package/src/components-v2/product-cards/product-card-9/product-card.tsx +0 -169
  245. package/src/components-v2/product-cards/product-card-wishlist/components/hover-actions.tsx +0 -37
  246. package/src/components-v2/product-cards/product-card-wishlist/product-card.tsx +0 -118
  247. package/src/components-v2/product-cards/product-card-wishlist/styles/index.ts +0 -53
  248. package/src/components-v2/product-quantity-buttons/product-quantity-buttons.tsx +0 -88
  249. package/src/components-v2/products-view/product-view-dialog.tsx +0 -218
  250. package/src/components-v2/search-box/__test__/search-input-category.test.tsx +0 -110
  251. package/src/components-v2/search-box/__test__/search-input.test.tsx +0 -137
  252. package/src/components-v2/search-box/__test__/search-results.json +0 -165
  253. package/src/components-v2/search-box/components/search-result.tsx +0 -86
  254. package/src/components-v2/search-box/hooks/use-search.ts +0 -63
  255. package/src/components-v2/search-box/index.ts +0 -2
  256. package/src/components-v2/search-box/search-input-category.test.tsx +0 -110
  257. package/src/components-v2/search-box/search-input-category.tsx +0 -203
  258. package/src/components-v2/search-box/search-input.test.tsx +0 -41
  259. package/src/components-v2/search-box/search-input.tsx +0 -66
  260. package/src/components-v2/section-header/index.ts +0 -2
  261. package/src/components-v2/section-header/section-creator.tsx +0 -29
  262. package/src/components-v2/section-header/section-header.tsx +0 -44
  263. package/src/components-v2/service-cards/icon-component.tsx +0 -18
  264. package/src/components-v2/service-cards/service-card-1/index.ts +0 -1
  265. package/src/components-v2/service-cards/service-card-1/service-card-1.tsx +0 -42
  266. package/src/components-v2/service-cards/service-card-2/index.ts +0 -1
  267. package/src/components-v2/service-cards/service-card-2/service-card-2.tsx +0 -37
  268. package/src/components-v2/service-cards/service-card-3/index.ts +0 -1
  269. package/src/components-v2/service-cards/service-card-3/service-card-3.tsx +0 -28
  270. package/src/components-v2/service-cards/service-card-3/styles.ts +0 -23
  271. package/src/components-v2/settings/index.ts +0 -1
  272. package/src/components-v2/settings/setting.tsx +0 -141
  273. package/src/components-v2/settings/styles.ts +0 -57
  274. package/src/components-v2/sticky-wrapper/index.ts +0 -1
  275. package/src/components-v2/sticky-wrapper/sticky-wrapper.tsx +0 -21
  276. package/src/components-v2/sticky-wrapper/styles.ts +0 -25
  277. package/src/components-v2/stories/story-content/index.ts +0 -1
  278. package/src/components-v2/stories/story-content/story-content.tsx +0 -28
  279. package/src/components-v2/stories/story-content/styles.ts +0 -22
  280. package/src/components-v2/stories/story-item/index.ts +0 -1
  281. package/src/components-v2/stories/story-item/story-item.tsx +0 -24
  282. package/src/components-v2/stories/story-item/styles.ts +0 -11
  283. package/src/components-v2/stories/story-viewer/index.ts +0 -1
  284. package/src/components-v2/stories/story-viewer/story-viewer.tsx +0 -44
  285. package/src/components-v2/stories/story-viewer/styles.ts +0 -15
  286. package/src/components-v2/subscribe-input/index.ts +0 -1
  287. package/src/components-v2/subscribe-input/styles.ts +0 -14
  288. package/src/components-v2/subscribe-input/subscribe-input.tsx +0 -43
  289. package/src/components-v2/topbar/index.ts +0 -1
  290. package/src/components-v2/topbar/styles.ts +0 -55
  291. package/src/components-v2/topbar/top-bar.tsx +0 -115
  292. package/src/components-v2/wishlist/add-to-wishlist-dialog.tsx +0 -161
  293. package/src/components-v2/wishlist/components/create-new-list.tsx +0 -167
  294. package/src/components-v2/wishlist/components/dashboard-header.tsx +0 -123
  295. package/src/components-v2/wishlist/components/navigation.tsx +0 -87
  296. package/src/components-v2/wishlist/components/no-records.tsx +0 -20
  297. package/src/components-v2/wishlist/components/wishlist-modal-item.tsx +0 -66
  298. package/src/components-v2/wishlist/remove-from-wishlist-dialog.tsx +0 -175
  299. package/src/components-v2/wishlist-modal/TODO.md +0 -10
  300. package/src/components-v2/wishlist-modal/add-to-wishlist-dialog.tsx +0 -161
  301. package/src/components-v2/wishlist-modal/remove-from-wishlist-dialog.tsx +0 -174
  302. package/src/components-v2/wishlist-modal/wishlist-modal-item.tsx +0 -65
  303. package/src/pages-v2/product-details/product-intro/product-intro-images.tsx +0 -90
  304. package/src/pages-v2/product-details/product-intro/product-intro.tsx +0 -256
  305. /package/src/{pages-v2/account → components-v2}/no-records.tsx +0 -0
  306. /package/src/components-v2/product-cards/{product-card-1 → product-card}/components/hover-actions.tsx +0 -0
  307. /package/src/components-v2/product-cards/{product-card-16 → product-card}/index.ts +0 -0
  308. /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/components/quantity-buttons.tsx +0 -0
  309. /package/src/components-v2/product-cards/{product-card-wishlist → product-card-plp}/index.ts +0 -0
  310. /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/styles/index.ts +0 -0
  311. /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/add-to-cart.tsx +0 -0
  312. /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/favorite-button.tsx +0 -0
  313. /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/tags.tsx +0 -0
  314. /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/index.ts +0 -0
  315. /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/styles/index.ts +0 -0
  316. /package/src/components-v2/sticky/{Sticky.tsx → sticky.tsx} +0 -0
  317. /package/src/components-v2/{wishlist → wishlist-dialogs}/styles.ts +0 -0
  318. /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/index.ts +0 -0
  319. /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/styles.ts +0 -0
@@ -1,18 +1,24 @@
1
+ "use client";
2
+
3
+ import { ReactNode } from "react";
1
4
  import Link from "next/link";
2
5
  import Box from "@mui/material/Box";
3
6
  import Grid from "@mui/material/Grid2";
4
- // GLOBAL CUSTOM COMPONENTS
7
+ import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
5
8
  import LazyImage from "@evenicanpm/storefront-core/src/components-v2/LazyImage";
6
9
  import {
7
10
  H3,
8
11
  Paragraph,
9
12
  Small,
10
13
  } from "@evenicanpm/storefront-core/src/components-v2/Typography";
11
- import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
12
14
 
13
- export default function OfferBanner() {
15
+ interface RootProps {
16
+ href: string;
17
+ children?: ReactNode;
18
+ }
19
+ const OfferBanner = ({ href, children }: RootProps) => {
14
20
  return (
15
- <Link href="/sale-page-2">
21
+ <Link href={href}>
16
22
  <Grid
17
23
  className="h-full"
18
24
  container
@@ -21,40 +27,65 @@ export default function OfferBanner() {
21
27
  alignItems="center"
22
28
  mb={-1}
23
29
  >
24
- <Grid size={{ sm: 6, xs: 12 }}>
25
- <Box px={2.5}>
26
- <H3 mb={1}>Big Sale Upto 60% Off</H3>
27
-
28
- <Paragraph color="grey.600" mb={1}>
29
- Handcrafted from genuine Italian Leather
30
- </Paragraph>
31
-
32
- <Small
33
- fontWeight="700"
34
- borderBottom="2px solid"
35
- borderColor="primary.main"
36
- >
37
- SHOP NOW
38
- </Small>
39
- </Box>
40
- </Grid>
41
-
42
- <Grid size={{ sm: 6, xs: 12 }}>
43
- <FlexBox
44
- height="160px"
45
- position="relative"
46
- flexDirection="column"
47
- justifyContent="flex-end"
48
- >
49
- <LazyImage
50
- alt="model"
51
- width={292}
52
- height={195}
53
- src="/assets/images/models/model-1.png"
54
- />
55
- </FlexBox>
56
- </Grid>
30
+ {children}
57
31
  </Grid>
58
32
  </Link>
59
33
  );
34
+ };
35
+
36
+ interface TextProps {
37
+ title: string;
38
+ subtitle?: string;
39
+ ctaText?: string;
40
+ }
41
+ OfferBanner.Text = ({ title, subtitle, ctaText }: TextProps) => {
42
+ return (
43
+ <Grid size={{ sm: 6, xs: 12 }}>
44
+ <Box px={2.5}>
45
+ <H3 mb={1}>{title}</H3>
46
+ {subtitle && (
47
+ <Paragraph color="grey.600" mb={1}>
48
+ {subtitle}
49
+ </Paragraph>
50
+ )}
51
+ {ctaText && (
52
+ <Small
53
+ fontWeight="700"
54
+ borderBottom="2px solid"
55
+ borderColor="primary.main"
56
+ >
57
+ {ctaText}
58
+ </Small>
59
+ )}
60
+ </Box>
61
+ </Grid>
62
+ );
63
+ };
64
+
65
+ interface ImageProps {
66
+ src: string;
67
+ alt?: string;
68
+ width?: number;
69
+ height?: number;
60
70
  }
71
+ OfferBanner.Image = ({
72
+ src,
73
+ alt = "",
74
+ width = 292,
75
+ height = 195,
76
+ }: ImageProps) => {
77
+ return (
78
+ <Grid size={{ sm: 6, xs: 12 }}>
79
+ <FlexBox
80
+ height="160px"
81
+ position="relative"
82
+ flexDirection="column"
83
+ justifyContent="flex-end"
84
+ >
85
+ <LazyImage alt={alt} width={width} height={height} src={src} />
86
+ </FlexBox>
87
+ </Grid>
88
+ );
89
+ };
90
+
91
+ export default OfferBanner;
@@ -1,70 +1,77 @@
1
- import { PropsWithChildren } from "react";
1
+ "use client";
2
+
3
+ import { PropsWithChildren, ReactNode, createContext, useContext } from "react";
2
4
  import Link from "next/link";
3
- // MUI
4
5
  import Box from "@mui/material/Box";
5
6
  import Grid from "@mui/material/Grid2";
6
- // GLOBAL CUSTOM COMPONENTS
7
7
  import LazyImage from "@evenicanpm/storefront-core/src/components-v2/LazyImage";
8
8
  import { FlexBox } from "@evenicanpm/storefront-core/src/components-v2/flex-box/index";
9
9
  import { NavLink } from "@evenicanpm/storefront-core/src/components-v2/nav-link/index";
10
- // STYLED COMPONENTS
11
10
  import { StyledRoot } from "./styles";
12
- // DATA TYPES
13
- import { CategoryItemOffer } from "../types";
14
- import { CategoryHierarchy } from "@/lib/category-helpers";
15
11
 
16
- // ==============================================================
17
- interface Props extends PropsWithChildren {
12
+ interface RootProps extends PropsWithChildren {
18
13
  minWidth?: number;
19
- list: CategoryHierarchy[];
20
- banner?: CategoryItemOffer;
21
14
  }
22
- // ==============================================================
23
-
24
- export default function ColumnList({
25
- list,
26
- children,
27
- banner,
28
- minWidth = 760,
29
- }: Props) {
15
+ const ColumnList = ({ minWidth = 760, children }: RootProps) => {
30
16
  return (
31
17
  <StyledRoot elevation={2} sx={{ minWidth }}>
32
- <FlexBox px={2.5}>
33
- <Box flex="1 1 0">
34
- <Grid container spacing={4}>
35
- {list.map((item, ind) => (
36
- <Grid size={3} key={ind}>
37
- <div className="title-link">{item.Name}</div>
18
+ <FlexBox px={2.5}>{children}</FlexBox>
19
+ </StyledRoot>
20
+ );
21
+ };
38
22
 
39
- {item.Children?.map((sub, ind) => (
40
- <NavLink
41
- className="child-link"
42
- href={`/products/${sub.Url}`}
43
- key={ind}
44
- >
45
- {sub.Name}
46
- </NavLink>
47
- ))}
48
- </Grid>
49
- ))}
50
- </Grid>
51
- </Box>
23
+ interface WrapperProps {
24
+ children: ReactNode;
25
+ }
26
+ ColumnList.Wrapper = ({ children }: WrapperProps) => {
27
+ return (
28
+ <Box flex="1 1 0">
29
+ <Grid container spacing={4}>
30
+ {children}
31
+ </Grid>
32
+ </Box>
33
+ );
34
+ };
52
35
 
53
- {banner?.position === "right" ? (
54
- <Box mt={1.5}>
55
- <Link href={banner.href}>
56
- <LazyImage
57
- src={banner.url}
58
- width={137}
59
- height={318}
60
- alt="banner"
61
- />
62
- </Link>
63
- </Box>
64
- ) : null}
65
- </FlexBox>
36
+ interface ColumnProps {
37
+ title: string;
38
+ children?: ReactNode;
39
+ }
40
+ ColumnList.Column = ({ title, children }: ColumnProps) => {
41
+ return (
42
+ <Grid size={3}>
43
+ <div className="title-link">{title}</div>
44
+ {children}
45
+ </Grid>
46
+ );
47
+ };
66
48
 
49
+ interface LinkProps {
50
+ href: string;
51
+ children: ReactNode;
52
+ }
53
+ ColumnList.Link = ({ href, children }: LinkProps) => {
54
+ return (
55
+ <NavLink className="child-link" href={href}>
67
56
  {children}
68
- </StyledRoot>
57
+ </NavLink>
69
58
  );
59
+ };
60
+
61
+ interface BannerProps {
62
+ href: string;
63
+ url: string;
64
+ width?: number;
65
+ height?: number;
70
66
  }
67
+ ColumnList.Banner = ({ href, url, width = 137, height = 318 }: BannerProps) => {
68
+ return (
69
+ <Box mt={1.5}>
70
+ <Link href={href}>
71
+ <LazyImage src={url} width={width} height={height} alt="banner" />
72
+ </Link>
73
+ </Box>
74
+ );
75
+ };
76
+
77
+ export default ColumnList;
@@ -17,9 +17,27 @@ interface Props {
17
17
  }
18
18
  // =========================================================
19
19
 
20
+ // MegaMenu1 is acting purely as a configuration/wiring component,
21
+ // not as a reusable UI element that needs further extensibility.
20
22
  export default function MegaMenu1({ banner, data }: Props) {
21
23
  return (
22
- <ColumnList list={data} banner={banner}>
24
+ <ColumnList>
25
+ <ColumnList.Wrapper>
26
+ {data.map((item) => (
27
+ <ColumnList.Column key={item.RecordId} title={item.Name}>
28
+ {item.Children?.map((sub) => (
29
+ <ColumnList.Link key={sub.RecordId} href={`/products/${sub.Url}`}>
30
+ {sub.Name}
31
+ </ColumnList.Link>
32
+ ))}
33
+ </ColumnList.Column>
34
+ ))}
35
+ </ColumnList.Wrapper>
36
+
37
+ {banner?.position === "right" && (
38
+ <ColumnList.Banner href={banner.href} url={banner.url} />
39
+ )}
40
+
23
41
  {banner?.position === "bottom" ? (
24
42
  <Link href={banner.href}>
25
43
  <Box position="relative" height={150} width="100%">
@@ -13,6 +13,8 @@ interface Props {
13
13
  }
14
14
  // =======================================================================
15
15
 
16
+ // MegaMenu2 is acting purely as a configuration/wiring component,
17
+ // not as a reusable UI element that needs further extensibility.
16
18
  export default function MegaMenu2({ data }: Props) {
17
19
  return (
18
20
  <StyledRoot elevation={2}>
@@ -25,8 +27,36 @@ export default function MegaMenu2({ data }: Props) {
25
27
  caret={!!(item.Children && item.Children.length)}
26
28
  render={
27
29
  item.Children?.length ? (
28
- <ColumnList minWidth={550} list={item.Children}>
29
- <OfferBanner />
30
+ <ColumnList minWidth={550}>
31
+ <ColumnList.Wrapper>
32
+ {item.Children.map((childItem) => (
33
+ <ColumnList.Column
34
+ key={childItem.RecordId}
35
+ title={childItem.Name}
36
+ >
37
+ {childItem.Children?.map((sub) => (
38
+ <ColumnList.Link
39
+ key={sub.RecordId}
40
+ href={`/products/${sub.Url}`}
41
+ >
42
+ {sub.Name}
43
+ </ColumnList.Link>
44
+ ))}
45
+ </ColumnList.Column>
46
+ ))}
47
+ </ColumnList.Wrapper>
48
+ {/* Sample offer banner */}
49
+ <OfferBanner href="/sale-page-2">
50
+ <OfferBanner.Text
51
+ title="Big Sale Upto 60% Off"
52
+ subtitle="Handcrafted from genuine Italian Leather"
53
+ ctaText="SHOP NOW"
54
+ />
55
+ <OfferBanner.Image
56
+ src="/assets/images/models/model-1.png"
57
+ alt="model"
58
+ />
59
+ </OfferBanner>
30
60
  </ColumnList>
31
61
  ) : null
32
62
  }
@@ -1,75 +1,148 @@
1
- import { Fragment } from "react";
1
+ import { useContext, ReactNode, createContext } from "react";
2
2
  import Box from "@mui/material/Box";
3
3
  import Drawer from "@mui/material/Drawer";
4
4
  import IconButton from "@mui/material/IconButton";
5
5
  import { useTranslations } from "next-intl";
6
6
  // CUSTOM COMPONENTS
7
7
  import { Paragraph } from "@evenicanpm/storefront-core/src/components-v2/Typography";
8
- import { SearchInput } from "@evenicanpm/storefront-core/src/components-v2/search-box/index";
9
8
  import { MobileMenu } from "@evenicanpm/storefront-core/src/components-v2/navbar/mobile-menu/index";
10
9
  import {
11
10
  FlexBetween,
12
11
  FlexBox,
13
12
  } from "@evenicanpm/storefront-core/src/components-v2/flex-box/index";
14
13
  import SiteLogo from "@evenicanpm/storefront-core/src/components-v2/site-logo";
15
- import MiniCartClient from "../../MiniCartClient";
14
+ import MiniCartTrigger from "../../mini-cart/mini-cart-trigger";
16
15
  import User from "./user";
17
16
  // ICONS
18
17
  import { MdClear as Clear } from "react-icons/md";
19
18
  import Search from "@evenicanpm/storefront-core/src/components-v2/icons/search";
19
+ import MobileCartBag from "@evenicanpm/storefront-core/src/components-v2/icons/cart-bag";
20
20
  // API
21
- import { Cart } from "@/schemas/cart.schema";
21
+ import getCart from "@/api-manager/services/cart/queries/get-cart";
22
22
 
23
23
  import useHeader from "../hooks/use-header";
24
+ import { SearchBarViewSm as SearchBar } from "@evenicanpm/storefront-core/src/components-v2/search-bar";
25
+ import {
26
+ transformCategoryNav,
27
+ transformCmsNav,
28
+ } from "@evenicanpm/storefront-core/src/components-v2/navbar/utils/transform-nav";
29
+ import { NavContext } from "@evenicanpm/storefront-core/src/providers/nav-provider";
24
30
 
25
- interface Props {
26
- cart: Cart;
27
- }
31
+ type MobileHeaderRootProps = {
32
+ children: ReactNode;
33
+ };
28
34
 
29
- export default function MobileHeader({ cart }: Props) {
30
- const { searchBarOpen, toggleSearchBar } = useHeader();
35
+ const MobileHeaderContext = createContext<ReturnType<typeof useHeader> | null>(
36
+ null,
37
+ );
31
38
 
32
- const t = useTranslations("Search");
39
+ const MobileHeaderProvider = ({ children }: { children: React.ReactNode }) => {
40
+ const headerState = useHeader();
41
+ return (
42
+ <MobileHeaderContext.Provider value={headerState}>
43
+ {children}
44
+ </MobileHeaderContext.Provider>
45
+ );
46
+ };
33
47
 
48
+ const useMobileHeader = () => {
49
+ const ctx = useContext(MobileHeaderContext);
50
+ if (!ctx)
51
+ throw new Error("useMobileHeader must be used within MobileHeaderProvider");
52
+ return ctx;
53
+ };
54
+
55
+ const MobileHeader = ({ children }: MobileHeaderRootProps) => {
34
56
  return (
35
- <Fragment>
36
- <FlexBetween width="100%">
37
- {/* Left content - navigation icon */}
38
- <Box flex={1}>
39
- <MobileMenu />
40
- </Box>
57
+ <MobileHeaderProvider>
58
+ <FlexBetween width="100%">{children}</FlexBetween>
59
+ </MobileHeaderProvider>
60
+ );
61
+ };
41
62
 
42
- {/* Middle content - logo */}
43
- <SiteLogo height="2.125rem" />
63
+ MobileHeader.Menu = () => {
64
+ const { categories, cmsNav } = useContext(NavContext);
65
+ const categoriesNavItems = transformCategoryNav(categories ?? []);
66
+ const cmsNavItems = transformCmsNav(cmsNav ?? []);
67
+ return (
68
+ <Box flex={1}>
69
+ <MobileMenu>
70
+ <MobileMenu.Trigger />
71
+ <MobileMenu.Drawer>
72
+ <MobileMenu.List data={categoriesNavItems} />
73
+ <MobileMenu.Divider />
74
+ <MobileMenu.List data={cmsNavItems} />
75
+ </MobileMenu.Drawer>
76
+ </MobileMenu>
77
+ </Box>
78
+ );
79
+ };
44
80
 
45
- {/* Right content - search, account, cart icons */}
46
- <FlexBox justifyContent="end" flex={1}>
47
- <IconButton onClick={toggleSearchBar}>
48
- <Search style={{ fontSize: "1.25rem" }} />
49
- </IconButton>
50
- <User mobile={true} />
51
- {cart && <MiniCartClient cart={cart} mobile={true} />}
52
- </FlexBox>
53
- </FlexBetween>
81
+ MobileHeader.Logo = () => {
82
+ return <SiteLogo height="2.125rem" />;
83
+ };
54
84
 
55
- {/* Search form drawer */}
56
- <Drawer
57
- open={searchBarOpen}
58
- anchor="top"
59
- onClose={toggleSearchBar}
60
- sx={{ zIndex: 9999 }}
61
- >
62
- <Box width="auto" padding={2} height="100vh">
63
- <FlexBetween mb={1}>
64
- <Paragraph>{t("searchHeading")}</Paragraph>
65
- <IconButton onClick={toggleSearchBar}>
66
- <Clear />
67
- </IconButton>
68
- </FlexBetween>
85
+ MobileHeader.Icons = ({ children }: { children: ReactNode }) => {
86
+ return (
87
+ <FlexBox justifyContent="end" flex={1}>
88
+ {children}
89
+ </FlexBox>
90
+ );
91
+ };
69
92
 
70
- <SearchInput handleCloseDrawer={toggleSearchBar} />
71
- </Box>
72
- </Drawer>
73
- </Fragment>
93
+ MobileHeader.User = () => {
94
+ return (
95
+ <User>
96
+ <User.MobileTrigger />
97
+ </User>
74
98
  );
75
- }
99
+ };
100
+
101
+ MobileHeader.Search = () => {
102
+ const { toggleSearchBar } = useMobileHeader();
103
+ return (
104
+ <IconButton onClick={toggleSearchBar}>
105
+ <Search style={{ fontSize: "1.25rem" }} />
106
+ </IconButton>
107
+ );
108
+ };
109
+
110
+ MobileHeader.Cart = () => {
111
+ const { data: cart } = getCart.useData();
112
+ return cart ? (
113
+ <MiniCartTrigger cart={cart}>
114
+ <MiniCartTrigger.Badge>
115
+ <MiniCartTrigger.Button>
116
+ <MobileCartBag style={{ fontSize: "1.25rem" }} />
117
+ </MiniCartTrigger.Button>
118
+ </MiniCartTrigger.Badge>
119
+ <MiniCartTrigger.Drawer />
120
+ </MiniCartTrigger>
121
+ ) : null;
122
+ };
123
+
124
+ MobileHeader.SearchDrawer = () => {
125
+ const { searchBarOpen, toggleSearchBar } = useMobileHeader();
126
+ const t = useTranslations("Search");
127
+
128
+ return (
129
+ <Drawer
130
+ open={searchBarOpen}
131
+ anchor="top"
132
+ onClose={toggleSearchBar}
133
+ sx={{ zIndex: 9999 }}
134
+ >
135
+ <Box width="auto" padding={2} height="100vh">
136
+ <FlexBetween mb={1}>
137
+ <Paragraph>{t("searchHeading")}</Paragraph>
138
+ <IconButton onClick={toggleSearchBar}>
139
+ <Clear />
140
+ </IconButton>
141
+ </FlexBetween>
142
+ <SearchBar handleCloseDrawer={toggleSearchBar} />
143
+ </Box>
144
+ </Drawer>
145
+ );
146
+ };
147
+
148
+ export default MobileHeader;