@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
@@ -21,7 +21,7 @@ import useCart, {
21
21
  } from "@evenicanpm/storefront-core/src/hooks/use-cart";
22
22
  import useCurrencyFormatter from "@/lib/currency-formatter";
23
23
  import ProductDimensions from "@evenicanpm/storefront-core/src/components-v2/product-dimensions";
24
- import QuantityButtons from "@evenicanpm/storefront-core/src/components-v2/product-quantity-buttons/product-quantity-buttons";
24
+ import QuantityButtons from "@evenicanpm/storefront-core/src/components-v2/product-quantity-buttons";
25
25
  import useVariants from "@evenicanpm/storefront-core/src/hooks/use-variants";
26
26
  import {
27
27
  InventorySearchCriteriaInput,
@@ -49,11 +49,11 @@ export default function QuickViewContent({
49
49
  }: Props) {
50
50
  const [showDimensionError, setShowDimensionError] = useState(false);
51
51
  const {
52
- selectVariantId,
52
+ selectedVariant,
53
53
  selectDimensions,
54
54
  handleChangeVariant,
55
55
  allDimensionsSelected,
56
- } = useVariants({ product: productDetails });
56
+ } = useVariants(productDetails);
57
57
  const t = useTranslations("ProductList.QuickView");
58
58
  const { formatCurrency } = useCurrencyFormatter();
59
59
  const { handleCartAmountChange, handleAddToCart, loading } = useCart(
@@ -61,35 +61,42 @@ export default function QuickViewContent({
61
61
  ? {
62
62
  cart,
63
63
  recordId: product.RecordId,
64
- selectVariantId: selectVariantId,
64
+ selectVariantId: selectedVariant?.RecordId,
65
65
  }
66
66
  : {
67
67
  cart: { Id: "", CartLines: [] },
68
68
  recordId: product.RecordId,
69
- selectVariantId: selectVariantId,
69
+ selectVariantId: selectedVariant?.RecordId,
70
70
  },
71
71
  );
72
72
 
73
73
  const searchCriteria = useMemo<InventorySearchCriteriaInput>(
74
74
  () => ({
75
- allDimensionsSelected: allDimensionsSelected(selectDimensions),
76
75
  searchCriteria: {
77
76
  defaultWarehouseOnly: true,
78
- productIds: [selectVariantId || product.RecordId],
77
+ productIds: [selectedVariant?.RecordId || product.RecordId],
79
78
  },
80
79
  }),
81
- [allDimensionsSelected, selectDimensions, product, selectVariantId],
80
+ [
81
+ allDimensionsSelected,
82
+ selectDimensions,
83
+ product,
84
+ selectedVariant?.RecordId,
85
+ ],
82
86
  );
83
87
 
84
88
  const { data: shippingInventoryData, isLoading: inventoryLoading } =
85
89
  getProductAvailability.useData(searchCriteria);
86
90
 
87
91
  const currentCartLine = cart?.CartLines?.find((item) => {
88
- return item?.ProductId === (Number(selectVariantId) || product.RecordId);
92
+ return (
93
+ item?.ProductId ===
94
+ (Number(selectedVariant?.RecordId) || product.RecordId)
95
+ );
89
96
  });
90
97
 
91
98
  const onAddToCart = (bopisInput?: AddToCartBopisInput) => {
92
- if (!allDimensionsSelected(selectDimensions)) {
99
+ if (!allDimensionsSelected) {
93
100
  setShowDimensionError(true);
94
101
  return;
95
102
  }
package/typedoc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- entryPoints: ["./src/components/product-dimensions/components/*.tsx"],
2
+ entryPoints: ["./src/components-v2/**/compound/*.tsx"],
3
3
  out: "docs",
4
4
  theme: "default",
5
5
  name: "e4 ui",
@@ -7,4 +7,6 @@ module.exports = {
7
7
  mergeModulesRenameDefaults: true, // NEW option of TypeDoc added by this plugin
8
8
  mergeModulesMergeMode: "module", // NEW option of TypeDoc added by this plugin
9
9
  excludeInternal: true,
10
+ skipErrorChecking: true,
11
+ tsconfig: "docs.tsconfig.json",
10
12
  };
@@ -1,65 +0,0 @@
1
- "use client";
2
- // DUPLICATE - Remove storefront/app version
3
- import React, { useState } from "react";
4
- import { MdOutlineShoppingBag as ShoppingBagOutlined } from "react-icons/md";
5
- import MobileCartBag from "@evenicanpm/storefront-core/src/components-v2/icons/cart-bag";
6
- import { Badge, Drawer, IconButton } from "@mui/material";
7
- import { Cart } from "@/schemas/cart.schema";
8
- import { useNotification } from "@evenicanpm/storefront-core/src/providers/notifications/use-notification";
9
- import { MiniCart } from "@evenicanpm/storefront-core/src/components-v2/mini-cart/index";
10
-
11
- const BADGE_STYLES = {
12
- "& .MuiBadge-badge": {
13
- fontSize: { xs: "0.625rem", md: "0.75rem" }, // ~10px, 12px
14
- minWidth: { xs: "1rem", md: "1.25rem" }, // ~16px, 20px
15
- height: { xs: "1rem", md: "1.25rem" }, // ~16px, 20px
16
- },
17
- };
18
-
19
- const ICON_BUTTON_STYLES = {
20
- minWidth: { xs: "2.25rem", md: "2.5rem" }, // 36px, 40px
21
- minHeight: { xs: "2.25rem", md: "2.5rem" },
22
- };
23
-
24
- interface MiniCartClientProps {
25
- cart: Cart;
26
- mobile?: boolean;
27
- }
28
-
29
- const MiniCartClient: React.FC<MiniCartClientProps> = ({
30
- cart,
31
- mobile = false,
32
- }) => {
33
- const SHOULD_OPEN_MINICART_ON_ADD = true; // Move to config
34
- const [open, setOpen] = useState(false); // Client state for toggling the drawer
35
- const { alert } = useNotification();
36
- React.useEffect(() => {
37
- if (alert?.type === "cart" && SHOULD_OPEN_MINICART_ON_ADD) {
38
- setOpen(true);
39
- }
40
- }, [alert, SHOULD_OPEN_MINICART_ON_ADD]);
41
- const handleCloseDrawer = () => setOpen(false);
42
- return (
43
- <Badge
44
- badgeContent={cart?.TotalItems || 0}
45
- color="primary"
46
- sx={BADGE_STYLES}
47
- >
48
- {/* Drawer Toggle Button */}
49
- <IconButton sx={ICON_BUTTON_STYLES} onClick={() => setOpen(true)}>
50
- {mobile ? (
51
- <MobileCartBag style={{ fontSize: "1.25rem" }} />
52
- ) : (
53
- <ShoppingBagOutlined />
54
- )}
55
- </IconButton>
56
-
57
- {/* Drawer */}
58
- <Drawer anchor="right" open={open} onClose={() => setOpen(false)}>
59
- <MiniCart cart={cart} closeDrawer={handleCloseDrawer} />
60
- </Drawer>
61
- </Badge>
62
- );
63
- };
64
-
65
- export default MiniCartClient;
@@ -1,78 +0,0 @@
1
- import Grid from "@mui/material/Grid2";
2
- import Button from "@mui/material/Button";
3
- // MUI ICON COMPONENT
4
- import Favorite from "@mui/icons-material/Favorite";
5
- // GLOBAL CUSTOM COMPONENTS
6
- import BazaarImage from "@evenicanpm/storefront-core/src/components-v2/BazaarImage";
7
- import { Countdown } from "@evenicanpm/storefront-core/src/components-v2/countdown/index";
8
- import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
9
- import {
10
- H2,
11
- H3,
12
- H4,
13
- Paragraph,
14
- } from "@evenicanpm/storefront-core/src/components-v2/Typography";
15
- // STYLED COMPONENT
16
- import { ContentWrapper, FavoriteButton } from "./styles";
17
-
18
- // ================================================================
19
- interface Props {
20
- imgUrl: string;
21
- expireDate: number;
22
- productName: string;
23
- }
24
- // ================================================================
25
-
26
- export default function CarouselCard2({
27
- imgUrl,
28
- productName,
29
- expireDate,
30
- }: Props) {
31
- return (
32
- <Grid container alignItems="center">
33
- <Grid size={{ lg: 6, md: 5, sm: 12, xs: 12 }}>
34
- <BazaarImage
35
- src={imgUrl}
36
- alt="xiaomi-watch-1"
37
- sx={{ display: "block", mx: "auto", maxWidth: "100%", p: 5 }}
38
- />
39
- </Grid>
40
-
41
- <Grid size={{ lg: 4, md: 5, sm: 12, xs: 12 }}>
42
- <ContentWrapper>
43
- <H3 color="primary.500" mb="0.2rem">
44
- Deal Of The Day
45
- </H3>
46
- <H2>{productName}</H2>
47
-
48
- <Paragraph mt="0.3rem">
49
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quis
50
- lobortis consequat eu, quam etiam at quis ut convallis.
51
- </Paragraph>
52
-
53
- <H4 mt="1.5rem" mb="0.3rem">
54
- Fresh Deal Everyday, Get It Now!
55
- </H4>
56
-
57
- {/* countdown time */}
58
- <Countdown expireDate={expireDate} />
59
-
60
- <FlexBox gap={2} mt={3}>
61
- <Button
62
- color="primary"
63
- disableElevation
64
- variant="contained"
65
- sx={{ px: 4, borderRadius: 2 }}
66
- >
67
- BUY NOW
68
- </Button>
69
-
70
- <FavoriteButton>
71
- <Favorite />
72
- </FavoriteButton>
73
- </FlexBox>
74
- </ContentWrapper>
75
- </Grid>
76
- </Grid>
77
- );
78
- }
@@ -1 +0,0 @@
1
- export { default } from "./carousel-card-2";
@@ -1,26 +0,0 @@
1
- "use client";
2
-
3
- import Button from "@mui/material/Button";
4
- import styled from "@mui/material/styles/styled";
5
-
6
- // STYLED COMPONENT
7
- export const ContentWrapper = styled("div")(({ theme }) => ({
8
- [theme.breakpoints.down("sm")]: {
9
- padding: "2rem",
10
- width: "100%",
11
- },
12
- [theme.breakpoints.between("sm", "md")]: {
13
- padding: "0 3rem",
14
- paddingBottom: "2rem",
15
- width: "80%",
16
- },
17
- }));
18
-
19
- export const FavoriteButton = styled(Button)(({ theme }) => ({
20
- color: "white",
21
- height: "44px",
22
- borderRadius: "8px",
23
- paddingInline: "1rem",
24
- backgroundColor: theme.palette.grey[500],
25
- ":hover": { backgroundColor: theme.palette.grey[500] },
26
- }));
@@ -1,37 +0,0 @@
1
- import Link from "next/link";
2
- // GLOBAL CUSTOM COMPONENTS
3
- import BazaarImage from "@evenicanpm/storefront-core/src/components-v2/BazaarImage";
4
- import {
5
- H2,
6
- Paragraph,
7
- } from "@evenicanpm/storefront-core/src/components-v2/Typography";
8
- // STYLED COMPONENTS
9
- import { ContentWrapper, LinkText, RootStyled } from "./styles";
10
- // CUSTOM DATA MODEL
11
- import { Product } from "@evenicanpm/storefront-core/src/components-v2/bazaar-types";
12
-
13
- // ==========================================================
14
- type Props = { product: Product };
15
- // ==========================================================
16
-
17
- export default function CarouselCard3({ product }: Props) {
18
- return (
19
- <RootStyled>
20
- <ContentWrapper>
21
- <H2 mb="0.5rem" textAlign="center" lineHeight={1.2}>
22
- {product.title}
23
- </H2>
24
-
25
- <Paragraph color="grey.600" textAlign="center" mb="1.5rem">
26
- Starting at ${product.price} & save upto {product.discount}%
27
- </Paragraph>
28
-
29
- <Link href={`/products/${product.slug}`}>
30
- <LinkText>SHOP NOW</LinkText>
31
- </Link>
32
- </ContentWrapper>
33
-
34
- <BazaarImage width="100%" src={product.thumbnail} alt="shoes" />
35
- </RootStyled>
36
- );
37
- }
@@ -1 +0,0 @@
1
- export { default } from "./carousel-card-3";
@@ -1,28 +0,0 @@
1
- "use client";
2
-
3
- import Card from "@mui/material/Card";
4
- import styled from "@mui/material/styles/styled";
5
-
6
- // STYLED COMPONENTS
7
- export const RootStyled = styled(Card)(({ theme }) => ({
8
- height: "100%",
9
- overflow: "unset",
10
- borderRadius: "2px",
11
- boxShadow: theme.shadows[4],
12
- transition: "all 250ms ease-in-out",
13
- }));
14
-
15
- export const ContentWrapper = styled("div")({
16
- display: "flex",
17
- padding: "1rem",
18
- paddingTop: "3rem",
19
- alignItems: "center",
20
- flexDirection: "column",
21
- });
22
-
23
- export const LinkText = styled("small")(({ theme }) => ({
24
- fontSize: 12,
25
- fontWeight: 900,
26
- lineHeight: 1.6,
27
- borderBottom: `2px solid ${theme.palette.primary.main}`,
28
- }));
@@ -1,81 +0,0 @@
1
- import Link from "next/link";
2
- import Button from "@mui/material/Button";
3
- // GLOBAL CUSTOM COMPONENTS
4
- import {
5
- H1,
6
- H4,
7
- Paragraph,
8
- Span,
9
- } from "@evenicanpm/storefront-core/src/components-v2/Typography";
10
- // STYLED COMPONENT
11
- import { CardWrapper } from "./styles";
12
-
13
- // ===============================================================
14
- interface Props {
15
- title?: string;
16
- bgImage?: string;
17
- category?: string;
18
- discount?: number;
19
- buttonLink?: string;
20
- buttonText?: string;
21
- description?: string;
22
- mode?: "dark" | "light";
23
- }
24
- // ===============================================================
25
-
26
- export default function CarouselCard4({
27
- title,
28
- bgImage,
29
- category,
30
- discount,
31
- buttonLink,
32
- buttonText,
33
- description,
34
- mode = "dark",
35
- }: Props) {
36
- return (
37
- <CardWrapper img={bgImage ?? ""} mode={mode}>
38
- <div className="content">
39
- <H4
40
- mb={1}
41
- lineHeight={1}
42
- fontWeight={400}
43
- textTransform="uppercase"
44
- fontSize={{ sm: 30, xs: 24 }}
45
- >
46
- {title}
47
- </H4>
48
-
49
- <H1
50
- fontSize={{ sm: 60, xs: 44 }}
51
- lineHeight={1}
52
- textTransform="uppercase"
53
- >
54
- {category}
55
- </H1>
56
-
57
- <H4
58
- fontSize={{ sm: 30, xs: 24 }}
59
- lineHeight={1}
60
- mt={1.5}
61
- textTransform="uppercase"
62
- >
63
- SALE UP TO <Span color="primary.main">{discount}% OFF</Span>
64
- </H4>
65
-
66
- <Paragraph fontSize={{ sm: 18, xs: 14 }} mb={4}>
67
- {description}
68
- </Paragraph>
69
-
70
- <Button
71
- size="large"
72
- href={buttonLink}
73
- variant="contained"
74
- LinkComponent={Link}
75
- >
76
- {buttonText}
77
- </Button>
78
- </div>
79
- </CardWrapper>
80
- );
81
- }
@@ -1 +0,0 @@
1
- export { default } from "./carousel-card-4";
@@ -1,27 +0,0 @@
1
- "use client";
2
-
3
- import styled from "@mui/material/styles/styled";
4
-
5
- // STYLED COMPONENT
6
- export const CardWrapper = styled("div", {
7
- shouldForwardProp: (prop) => prop !== "img" && prop !== "mode",
8
- })<{ img: string; mode: string }>(({ theme, img, mode }) => ({
9
- minHeight: 500,
10
- display: "flex",
11
- alignItems: "center",
12
- backgroundSize: "cover",
13
- backgroundRepeat: "no-repeat",
14
- backgroundImage: `url(${img})`,
15
- backgroundColor: mode === "dark" ? "#000" : "#fff",
16
- color: mode === "light" ? theme.palette.primary.dark : "#fff",
17
- ".content":
18
- theme.direction === "rtl" ? { paddingRight: 80 } : { paddingLeft: 80 },
19
- [theme.breakpoints.down("md")]: {
20
- padding: 24,
21
- textAlign: "center",
22
- backgroundImage: "none",
23
- justifyContent: "center",
24
- ".content":
25
- theme.direction === "rtl" ? { paddingRight: 0 } : { paddingLeft: 0 },
26
- },
27
- }));
@@ -1,21 +0,0 @@
1
- // GLOBAL CUSTOM COMPONENTS
2
- import { H4 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
3
- import LazyImage from "@evenicanpm/storefront-core/src/components-v2/LazyImage";
4
- // STYLED COMPONENTS
5
- import { CategoryTitle, Wrapper } from "./styles";
6
-
7
- // ============================================================
8
- type Props = { image: string; title: string };
9
- // ============================================================
10
-
11
- export default function CategoryCard1({ image, title }: Props) {
12
- return (
13
- <Wrapper>
14
- <LazyImage src={image} width={213} height={213} alt="category" />
15
-
16
- <CategoryTitle className="category-title">
17
- <H4>{title}</H4>
18
- </CategoryTitle>
19
- </Wrapper>
20
- );
21
- }
@@ -1 +0,0 @@
1
- export { default } from "./category-card-1";
@@ -1,37 +0,0 @@
1
- "use client";
2
-
3
- import styled from "@mui/material/styles/styled";
4
-
5
- // STYLED COMPONENTS
6
- export const Wrapper = styled("div")(({ theme }) => ({
7
- height: "100%",
8
- cursor: "pointer",
9
- overflow: "hidden",
10
- borderRadius: "4px",
11
- position: "relative",
12
- img: {
13
- height: "100%",
14
- objectFit: "cover",
15
- transition: "all 0.3s",
16
- objectPosition: "center center",
17
- },
18
- ":hover": {
19
- img: { transform: "scale(1.1)" },
20
- ".category-title": {
21
- color: theme.palette.common.white,
22
- backgroundColor: theme.palette.primary.dark,
23
- },
24
- },
25
- }));
26
-
27
- export const CategoryTitle = styled("div")({
28
- left: 10,
29
- right: 10,
30
- bottom: 10,
31
- padding: 8,
32
- textAlign: "center",
33
- borderRadius: "2px",
34
- position: "absolute",
35
- transition: "all 0.3s",
36
- backgroundColor: "rgba(255,255,255, .67)",
37
- });
@@ -1,19 +0,0 @@
1
- import {
2
- H3,
3
- Span,
4
- } from "@evenicanpm/storefront-core/src/components-v2/Typography";
5
-
6
- // ==============================================================
7
- type Props = { digit: number; title: string };
8
- // ==============================================================
9
-
10
- export default function CountBox({ digit = 365, title = "DAYS" }: Props) {
11
- return (
12
- <H3>
13
- {digit}{" "}
14
- <Span color="grey.600" fontSize={14} fontWeight={600}>
15
- {title}
16
- </Span>
17
- </H3>
18
- );
19
- }
@@ -1,24 +0,0 @@
1
- "use client";
2
-
3
- // GLOBAL CUSTOM COMPONENT
4
- import FlexBetween from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-between";
5
- // Local CUSTOM COMPONENT
6
- import CountBox from "./count-box";
7
- import useCountDown from "./useCountDown";
8
-
9
- // ==============================================================
10
- type Props = { expireDate: number };
11
- // ==============================================================
12
-
13
- export default function Countdown({ expireDate }: Props) {
14
- const { timeLeft } = useCountDown({ expireDate });
15
-
16
- return (
17
- <FlexBetween width="90%" height="auto">
18
- <CountBox digit={timeLeft.days} title="DAYS" />
19
- <CountBox digit={timeLeft.hours} title="HOURS" />
20
- <CountBox digit={timeLeft.minutes} title="MINS" />
21
- <CountBox digit={timeLeft.seconds} title="SECS" />
22
- </FlexBetween>
23
- );
24
- }
@@ -1,2 +0,0 @@
1
- export { default as Countdown } from "./count-down";
2
- export { default as useCountDown } from "./useCountDown";
@@ -1,41 +0,0 @@
1
- "use client";
2
-
3
- import { useCallback, useEffect, useState } from "react";
4
-
5
- const initialState = {
6
- days: 0,
7
- hours: 0,
8
- minutes: 0,
9
- seconds: 0,
10
- };
11
-
12
- // ==============================================================
13
- type Props = { expireDate: number };
14
- // ==============================================================
15
-
16
- export default function useCountDown({ expireDate }: Props) {
17
- const [timeLeft, setTimeLeft] = useState(initialState);
18
-
19
- const calculateTimeLeft = useCallback(() => {
20
- const distance = expireDate - new Date().getTime();
21
- // if date expire
22
- if (distance < 0) return initialState;
23
-
24
- return {
25
- days: Math.floor(distance / (1000 * 60 * 60 * 24)),
26
- hours: Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)),
27
- minutes: Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)),
28
- seconds: Math.floor((distance % (1000 * 60)) / 1000),
29
- };
30
- }, [expireDate]);
31
-
32
- useEffect(() => {
33
- const timer = setInterval(() => {
34
- setTimeLeft(calculateTimeLeft());
35
- }, 1000);
36
-
37
- return () => clearInterval(timer);
38
- }, [calculateTimeLeft]);
39
-
40
- return { timeLeft };
41
- }
@@ -1,2 +0,0 @@
1
- export { default as TableHeader } from "./table-header";
2
- export { default as TablePagination } from "./table-pagination";