@doswiftly/cli 0.1.18 → 0.1.20

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 (277) hide show
  1. package/README.md +23 -323
  2. package/dist/commands/check.js +1 -1
  3. package/dist/commands/check.js.map +1 -1
  4. package/dist/commands/deploy.d.ts +20 -0
  5. package/dist/commands/deploy.d.ts.map +1 -1
  6. package/dist/commands/deploy.js +249 -17
  7. package/dist/commands/deploy.js.map +1 -1
  8. package/dist/commands/doctor.js +3 -3
  9. package/dist/commands/doctor.js.map +1 -1
  10. package/dist/commands/init.js +4 -4
  11. package/dist/commands/sdk.js +5 -5
  12. package/dist/commands/sdk.js.map +1 -1
  13. package/dist/commands/template.js +4 -4
  14. package/dist/commands/template.js.map +1 -1
  15. package/dist/commands/types.js +5 -5
  16. package/dist/commands/types.js.map +1 -1
  17. package/dist/commands/verify.js +2 -2
  18. package/dist/commands/verify.js.map +1 -1
  19. package/dist/lib/package-manager.d.ts +1 -1
  20. package/dist/lib/package-manager.js +1 -1
  21. package/package.json +4 -4
  22. package/templates/storefront-minimal/.github/workflows/build-template.yml +10 -0
  23. package/templates/storefront-minimal/wrangler.toml +11 -0
  24. package/templates/storefront-nextjs/.github/workflows/build-template.yml +10 -0
  25. package/templates/storefront-nextjs/README.md +16 -12
  26. package/templates/storefront-nextjs/app/account/orders/page.tsx +2 -2
  27. package/templates/storefront-nextjs/app/account/page.tsx +2 -2
  28. package/templates/storefront-nextjs/app/auth/login/page.tsx +1 -1
  29. package/templates/storefront-nextjs/app/auth/register/page.tsx +1 -1
  30. package/templates/storefront-nextjs/app/cart/page.tsx +1 -1
  31. package/templates/storefront-nextjs/app/categories/[slug]/page.tsx +2 -2
  32. package/templates/storefront-nextjs/app/categories/page.tsx +1 -1
  33. package/templates/storefront-nextjs/app/collections/[slug]/page.tsx +1 -1
  34. package/templates/storefront-nextjs/app/collections/page.tsx +1 -1
  35. package/templates/storefront-nextjs/app/page.tsx +1 -1
  36. package/templates/storefront-nextjs/app/products/[slug]/page.tsx +1 -1
  37. package/templates/storefront-nextjs/app/products/page.tsx +2 -2
  38. package/templates/storefront-nextjs/app/search/page.tsx +1 -1
  39. package/templates/storefront-nextjs/components/auth/auth-guard.tsx +1 -1
  40. package/templates/storefront-nextjs/components/commerce/add-to-cart-button.tsx +1 -1
  41. package/templates/storefront-nextjs/components/commerce/cart-icon.tsx +1 -1
  42. package/templates/storefront-nextjs/components/commerce/currency-selector.tsx +2 -2
  43. package/templates/storefront-nextjs/components/commerce/product-filters.tsx +1 -1
  44. package/templates/storefront-nextjs/components/commerce/product-price.tsx +1 -1
  45. package/templates/storefront-nextjs/components/commerce/search-input.tsx +1 -1
  46. package/templates/storefront-nextjs/components/commerce/sort-select.tsx +1 -1
  47. package/templates/storefront-nextjs/components/providers.tsx +1 -1
  48. package/templates/storefront-nextjs/lib/currency.tsx +3 -3
  49. package/templates/storefront-nextjs/lib/format.ts +1 -1
  50. package/templates/storefront-nextjs/lib/graphql-queries.ts +3 -3
  51. package/templates/storefront-nextjs/package.dev.json +1 -1
  52. package/templates/storefront-nextjs/package.json +1 -1
  53. package/templates/storefront-nextjs/package.json.template +1 -1
  54. package/templates/storefront-nextjs/wrangler.toml +11 -0
  55. package/templates/storefront-nextjs-shadcn/.github/workflows/build-template.yml +10 -0
  56. package/templates/storefront-nextjs-shadcn/.github/workflows/deploy.yml +47 -0
  57. package/templates/storefront-nextjs-shadcn/.github/workflows/preview.yml +47 -0
  58. package/templates/storefront-nextjs-shadcn/CLAUDE.md +172 -35
  59. package/templates/storefront-nextjs-shadcn/README.md +29 -162
  60. package/templates/storefront-nextjs-shadcn/app/{about → [locale]/about}/page.tsx +17 -14
  61. package/templates/storefront-nextjs-shadcn/app/[locale]/account/addresses/page.tsx +226 -0
  62. package/templates/storefront-nextjs-shadcn/app/[locale]/account/error.tsx +46 -0
  63. package/templates/storefront-nextjs-shadcn/app/[locale]/account/loading.tsx +19 -0
  64. package/templates/storefront-nextjs-shadcn/app/{account → [locale]/account}/loyalty/page.tsx +89 -193
  65. package/templates/storefront-nextjs-shadcn/app/[locale]/account/orders/[id]/loading.tsx +60 -0
  66. package/templates/storefront-nextjs-shadcn/app/[locale]/account/orders/[id]/page.tsx +119 -0
  67. package/templates/storefront-nextjs-shadcn/app/{account → [locale]/account}/orders/[id]/tracking/page.tsx +27 -25
  68. package/templates/storefront-nextjs-shadcn/app/[locale]/account/orders/page.tsx +101 -0
  69. package/templates/storefront-nextjs-shadcn/app/{account → [locale]/account}/page.tsx +9 -7
  70. package/templates/storefront-nextjs-shadcn/app/[locale]/account/settings/page.tsx +208 -0
  71. package/templates/storefront-nextjs-shadcn/app/{auth → [locale]/auth}/forgot-password/page.tsx +24 -17
  72. package/templates/storefront-nextjs-shadcn/app/{auth → [locale]/auth}/login/page.tsx +5 -2
  73. package/templates/storefront-nextjs-shadcn/app/{auth → [locale]/auth}/register/page.tsx +5 -2
  74. package/templates/storefront-nextjs-shadcn/app/[locale]/blog/[slug]/loading.tsx +17 -0
  75. package/templates/storefront-nextjs-shadcn/app/{blog → [locale]/blog}/[slug]/page.tsx +44 -3
  76. package/templates/storefront-nextjs-shadcn/app/[locale]/blog/loading.tsx +19 -0
  77. package/templates/storefront-nextjs-shadcn/app/{brands → [locale]/brands}/page.tsx +2 -1
  78. package/templates/storefront-nextjs-shadcn/app/[locale]/cart/loading.tsx +26 -0
  79. package/templates/storefront-nextjs-shadcn/app/{cart → [locale]/cart}/page.tsx +20 -13
  80. package/templates/storefront-nextjs-shadcn/app/[locale]/categories/[slug]/category-products-client.tsx +58 -0
  81. package/templates/storefront-nextjs-shadcn/app/[locale]/categories/[slug]/loading.tsx +32 -0
  82. package/templates/storefront-nextjs-shadcn/app/[locale]/categories/[slug]/page.tsx +95 -0
  83. package/templates/storefront-nextjs-shadcn/app/{categories → [locale]/categories}/page.tsx +21 -12
  84. package/templates/storefront-nextjs-shadcn/app/[locale]/checkout/error.tsx +43 -0
  85. package/templates/storefront-nextjs-shadcn/app/[locale]/checkout/loading.tsx +31 -0
  86. package/templates/storefront-nextjs-shadcn/app/{checkout → [locale]/checkout}/page.tsx +334 -253
  87. package/templates/storefront-nextjs-shadcn/app/{checkout → [locale]/checkout}/success/[orderId]/page.tsx +36 -34
  88. package/templates/storefront-nextjs-shadcn/app/[locale]/collections/[handle]/loading.tsx +19 -0
  89. package/templates/storefront-nextjs-shadcn/app/{collections → [locale]/collections}/[handle]/page.tsx +6 -4
  90. package/templates/storefront-nextjs-shadcn/app/[locale]/collections/loading.tsx +18 -0
  91. package/templates/storefront-nextjs-shadcn/app/{collections → [locale]/collections}/page.tsx +20 -12
  92. package/templates/storefront-nextjs-shadcn/app/{contact → [locale]/contact}/page.tsx +24 -21
  93. package/templates/storefront-nextjs-shadcn/app/{error.tsx → [locale]/error.tsx} +13 -8
  94. package/templates/storefront-nextjs-shadcn/app/[locale]/layout.tsx +92 -0
  95. package/templates/storefront-nextjs-shadcn/app/{not-found.tsx → [locale]/not-found.tsx} +13 -18
  96. package/templates/storefront-nextjs-shadcn/app/{page.tsx → [locale]/page.tsx} +8 -4
  97. package/templates/storefront-nextjs-shadcn/app/[locale]/products/[slug]/error.tsx +43 -0
  98. package/templates/storefront-nextjs-shadcn/app/[locale]/products/[slug]/loading.tsx +29 -0
  99. package/templates/storefront-nextjs-shadcn/app/{products → [locale]/products}/[slug]/page.tsx +17 -14
  100. package/templates/storefront-nextjs-shadcn/app/{products → [locale]/products}/[slug]/product-client.tsx +18 -62
  101. package/templates/storefront-nextjs-shadcn/app/[locale]/products/loading.tsx +32 -0
  102. package/templates/storefront-nextjs-shadcn/app/{products → [locale]/products}/page.tsx +6 -3
  103. package/templates/storefront-nextjs-shadcn/app/[locale]/products/products-client.tsx +450 -0
  104. package/templates/storefront-nextjs-shadcn/app/[locale]/search/loading.tsx +18 -0
  105. package/templates/storefront-nextjs-shadcn/app/{wishlist → [locale]/wishlist}/page.tsx +27 -28
  106. package/templates/storefront-nextjs-shadcn/app/api/auth/clear-token/route.ts +2 -86
  107. package/templates/storefront-nextjs-shadcn/app/api/auth/set-token/route.ts +2 -124
  108. package/templates/storefront-nextjs-shadcn/app/global-error.tsx +117 -0
  109. package/templates/storefront-nextjs-shadcn/app/globals.css +8 -0
  110. package/templates/storefront-nextjs-shadcn/app/layout.tsx +8 -35
  111. package/templates/storefront-nextjs-shadcn/codegen.ts +48 -31
  112. package/templates/storefront-nextjs-shadcn/components/account/address-form.tsx +25 -20
  113. package/templates/storefront-nextjs-shadcn/components/account/address-list.tsx +11 -10
  114. package/templates/storefront-nextjs-shadcn/components/account/customer-info.fragment.graphql +36 -0
  115. package/templates/storefront-nextjs-shadcn/components/account/order-details.tsx +17 -13
  116. package/templates/storefront-nextjs-shadcn/components/account/order-history.tsx +42 -30
  117. package/templates/storefront-nextjs-shadcn/components/account/order-summary.fragment.graphql +36 -0
  118. package/templates/storefront-nextjs-shadcn/components/auth/account-menu.tsx +18 -16
  119. package/templates/storefront-nextjs-shadcn/components/auth/login-form.tsx +37 -58
  120. package/templates/storefront-nextjs-shadcn/components/auth/register-form.tsx +85 -66
  121. package/templates/storefront-nextjs-shadcn/components/blog/blog-card.tsx +1 -1
  122. package/templates/storefront-nextjs-shadcn/components/blog/blog-sidebar.tsx +1 -1
  123. package/templates/storefront-nextjs-shadcn/components/brand/brand-card.tsx +1 -1
  124. package/templates/storefront-nextjs-shadcn/components/cart/cart-drawer.tsx +10 -6
  125. package/templates/storefront-nextjs-shadcn/components/cart/cart-icon.tsx +9 -6
  126. package/templates/storefront-nextjs-shadcn/components/cart/cart-item.tsx +8 -6
  127. package/templates/storefront-nextjs-shadcn/components/cart/cart-line.fragment.graphql +53 -0
  128. package/templates/storefront-nextjs-shadcn/components/cart/cart-summary.tsx +10 -8
  129. package/templates/storefront-nextjs-shadcn/components/cart/promo-code-input.tsx +8 -5
  130. package/templates/storefront-nextjs-shadcn/components/cart/shipping-estimator.tsx +38 -20
  131. package/templates/storefront-nextjs-shadcn/components/checkout/payment-method-card.tsx +15 -25
  132. package/templates/storefront-nextjs-shadcn/components/checkout/payment-step.tsx +10 -8
  133. package/templates/storefront-nextjs-shadcn/components/checkout/tax-breakdown.tsx +9 -6
  134. package/templates/storefront-nextjs-shadcn/components/commerce/currency-selector.tsx +7 -5
  135. package/templates/storefront-nextjs-shadcn/components/commerce/pagination.tsx +8 -5
  136. package/templates/storefront-nextjs-shadcn/components/commerce/product-actions.tsx +6 -4
  137. package/templates/storefront-nextjs-shadcn/components/commerce/search-input.tsx +10 -9
  138. package/templates/storefront-nextjs-shadcn/components/common/category-card.tsx +1 -1
  139. package/templates/storefront-nextjs-shadcn/components/common/collection-card.tsx +1 -1
  140. package/templates/storefront-nextjs-shadcn/components/common/price-display.tsx +35 -11
  141. package/templates/storefront-nextjs-shadcn/components/common/social-share.tsx +9 -6
  142. package/templates/storefront-nextjs-shadcn/components/discount/discount-breakdown.tsx +22 -12
  143. package/templates/storefront-nextjs-shadcn/components/discount/discount-code-input.tsx +18 -15
  144. package/templates/storefront-nextjs-shadcn/components/error/error-boundary.tsx +53 -28
  145. package/templates/storefront-nextjs-shadcn/components/filters/dynamic-attribute-filters.tsx +7 -5
  146. package/templates/storefront-nextjs-shadcn/components/filters/range-slider-filter.tsx +5 -5
  147. package/templates/storefront-nextjs-shadcn/components/gift-card/gift-card-balance.tsx +19 -15
  148. package/templates/storefront-nextjs-shadcn/components/gift-card/gift-card-input.tsx +13 -10
  149. package/templates/storefront-nextjs-shadcn/components/home/category-grid.tsx +10 -6
  150. package/templates/storefront-nextjs-shadcn/components/home/collection-card.fragment.graphql +21 -0
  151. package/templates/storefront-nextjs-shadcn/components/home/featured-collections.tsx +3 -13
  152. package/templates/storefront-nextjs-shadcn/components/home/featured-products.tsx +12 -8
  153. package/templates/storefront-nextjs-shadcn/components/home/hero-section.tsx +13 -8
  154. package/templates/storefront-nextjs-shadcn/components/home/index.ts +0 -1
  155. package/templates/storefront-nextjs-shadcn/components/home/newsletter-signup.tsx +10 -8
  156. package/templates/storefront-nextjs-shadcn/components/hydrated.tsx +24 -0
  157. package/templates/storefront-nextjs-shadcn/components/layout/breadcrumbs.tsx +41 -16
  158. package/templates/storefront-nextjs-shadcn/components/layout/category-node.fragment.graphql +22 -0
  159. package/templates/storefront-nextjs-shadcn/components/layout/currency-selector.tsx +7 -4
  160. package/templates/storefront-nextjs-shadcn/components/layout/footer.tsx +24 -23
  161. package/templates/storefront-nextjs-shadcn/components/layout/header.tsx +52 -34
  162. package/templates/storefront-nextjs-shadcn/components/layout/language-switcher.tsx +54 -0
  163. package/templates/storefront-nextjs-shadcn/components/layout/mobile-menu.tsx +33 -30
  164. package/templates/storefront-nextjs-shadcn/components/layout/navigation.tsx +27 -24
  165. package/templates/storefront-nextjs-shadcn/components/loyalty/points-balance.tsx +2 -11
  166. package/templates/storefront-nextjs-shadcn/components/loyalty/points-history.tsx +8 -25
  167. package/templates/storefront-nextjs-shadcn/components/loyalty/referral-section.tsx +32 -42
  168. package/templates/storefront-nextjs-shadcn/components/loyalty/rewards-catalog.tsx +17 -41
  169. package/templates/storefront-nextjs-shadcn/components/loyalty/tier-progress.tsx +2 -29
  170. package/templates/storefront-nextjs-shadcn/components/order/index.ts +6 -1
  171. package/templates/storefront-nextjs-shadcn/components/product/add-to-cart-button.tsx +6 -14
  172. package/templates/storefront-nextjs-shadcn/components/product/b2b-price-display.tsx +4 -2
  173. package/templates/storefront-nextjs-shadcn/components/product/filter-active-pills.tsx +72 -0
  174. package/templates/storefront-nextjs-shadcn/components/product/filter-mobile-sheet.tsx +87 -0
  175. package/templates/storefront-nextjs-shadcn/components/product/filter-price-range.tsx +140 -0
  176. package/templates/storefront-nextjs-shadcn/components/product/index.ts +9 -2
  177. package/templates/storefront-nextjs-shadcn/components/product/product-card.fragment.graphql +49 -0
  178. package/templates/storefront-nextjs-shadcn/components/product/product-card.tsx +11 -37
  179. package/templates/storefront-nextjs-shadcn/components/product/product-detail.fragment.graphql +52 -0
  180. package/templates/storefront-nextjs-shadcn/components/product/product-filters.tsx +179 -124
  181. package/templates/storefront-nextjs-shadcn/components/product/product-grid.tsx +3 -5
  182. package/templates/storefront-nextjs-shadcn/components/product/product-image.tsx +3 -7
  183. package/templates/storefront-nextjs-shadcn/components/product/product-price.tsx +2 -2
  184. package/templates/storefront-nextjs-shadcn/components/product/product-reviews.tsx +5 -4
  185. package/templates/storefront-nextjs-shadcn/components/product/product-sort.tsx +44 -19
  186. package/templates/storefront-nextjs-shadcn/components/product/product-variant-selector.tsx +8 -23
  187. package/templates/storefront-nextjs-shadcn/components/product/product-variant.fragment.graphql +51 -0
  188. package/templates/storefront-nextjs-shadcn/components/product/review-card.tsx +1 -1
  189. package/templates/storefront-nextjs-shadcn/components/product/review-form.tsx +26 -34
  190. package/templates/storefront-nextjs-shadcn/components/product/savings-display.tsx +17 -2
  191. package/templates/storefront-nextjs-shadcn/components/product/similar-products.tsx +3 -2
  192. package/templates/storefront-nextjs-shadcn/components/providers/index.ts +1 -1
  193. package/templates/storefront-nextjs-shadcn/components/providers/language-sync-provider.tsx +27 -0
  194. package/templates/storefront-nextjs-shadcn/components/providers/stores-provider.tsx +63 -0
  195. package/templates/storefront-nextjs-shadcn/components/providers/theme-provider.tsx +1 -1
  196. package/templates/storefront-nextjs-shadcn/components/returns/index.ts +2 -2
  197. package/templates/storefront-nextjs-shadcn/components/returns/return-request-form.tsx +59 -72
  198. package/templates/storefront-nextjs-shadcn/components/search/search-bar.tsx +7 -4
  199. package/templates/storefront-nextjs-shadcn/components/search/search-results.tsx +3 -2
  200. package/templates/storefront-nextjs-shadcn/components/shipping/shipping-method-selector.tsx +12 -9
  201. package/templates/storefront-nextjs-shadcn/components/ui/empty-state.tsx +23 -12
  202. package/templates/storefront-nextjs-shadcn/components/ui/form.tsx +174 -0
  203. package/templates/storefront-nextjs-shadcn/components/ui/index.ts +30 -2
  204. package/templates/storefront-nextjs-shadcn/components/ui/progress.tsx +40 -0
  205. package/templates/storefront-nextjs-shadcn/components/ui/sheet.tsx +107 -0
  206. package/templates/storefront-nextjs-shadcn/components/ui/slider.tsx +33 -0
  207. package/templates/storefront-nextjs-shadcn/components/ui/textarea.tsx +24 -0
  208. package/templates/storefront-nextjs-shadcn/components/wishlist/wishlist-button.tsx +7 -4
  209. package/templates/storefront-nextjs-shadcn/components/wishlist/wishlist-icon.tsx +4 -2
  210. package/templates/storefront-nextjs-shadcn/components/wishlist/wishlist-item.tsx +2 -10
  211. package/templates/storefront-nextjs-shadcn/generated/graphql.ts +13387 -0
  212. package/templates/storefront-nextjs-shadcn/graphql/custom.example.graphql +159 -0
  213. package/templates/storefront-nextjs-shadcn/hooks/index.ts +3 -0
  214. package/templates/storefront-nextjs-shadcn/hooks/use-auth-sync.ts +42 -0
  215. package/templates/storefront-nextjs-shadcn/hooks/use-auth.ts +17 -295
  216. package/templates/storefront-nextjs-shadcn/hooks/use-cart-actions.ts +34 -229
  217. package/templates/storefront-nextjs-shadcn/hooks/use-cart-di.ts +67 -0
  218. package/templates/storefront-nextjs-shadcn/hooks/use-cart-sync.ts +16 -12
  219. package/templates/storefront-nextjs-shadcn/i18n/navigation.ts +12 -0
  220. package/templates/storefront-nextjs-shadcn/i18n/request.ts +17 -0
  221. package/templates/storefront-nextjs-shadcn/i18n/routing.ts +17 -0
  222. package/templates/storefront-nextjs-shadcn/lib/auth/routes.ts +4 -17
  223. package/templates/storefront-nextjs-shadcn/lib/graphql/client.ts +22 -99
  224. package/templates/storefront-nextjs-shadcn/lib/graphql/config.ts +33 -0
  225. package/templates/storefront-nextjs-shadcn/lib/graphql/fragments.ts +34 -0
  226. package/templates/storefront-nextjs-shadcn/lib/graphql/hooks.ts +720 -632
  227. package/templates/storefront-nextjs-shadcn/lib/graphql/query-keys.ts +88 -0
  228. package/templates/storefront-nextjs-shadcn/lib/graphql/server.ts +132 -182
  229. package/templates/storefront-nextjs-shadcn/lib/graphql/types.ts +62 -0
  230. package/templates/storefront-nextjs-shadcn/lib/theme/theme-config.ts +0 -17
  231. package/templates/storefront-nextjs-shadcn/messages/en.json +869 -0
  232. package/templates/storefront-nextjs-shadcn/messages/pl.json +869 -0
  233. package/templates/storefront-nextjs-shadcn/next-env.d.ts +6 -0
  234. package/templates/storefront-nextjs-shadcn/next.config.ts +6 -5
  235. package/templates/storefront-nextjs-shadcn/package.dev.json +1 -3
  236. package/templates/storefront-nextjs-shadcn/package.json +14 -14
  237. package/templates/storefront-nextjs-shadcn/package.json.template +6 -7
  238. package/templates/storefront-nextjs-shadcn/proxy.ts +115 -47
  239. package/templates/storefront-nextjs-shadcn/stores/cart-store.ts +24 -56
  240. package/templates/storefront-nextjs-shadcn/stores/checkout-store.ts +64 -75
  241. package/templates/storefront-nextjs-shadcn/stores/wishlist-store.ts +178 -177
  242. package/templates/storefront-nextjs-shadcn/tsconfig.json +23 -5
  243. package/templates/storefront-nextjs-shadcn/wrangler.toml +11 -0
  244. package/templates/storefront-nextjs-shadcn/CART_INTEGRATION.md +0 -282
  245. package/templates/storefront-nextjs-shadcn/GRAPHQL_DOCUMENT_NAMES.md +0 -190
  246. package/templates/storefront-nextjs-shadcn/GRAPHQL_ERROR_HANDLING.md +0 -263
  247. package/templates/storefront-nextjs-shadcn/GRAPHQL_FIXES_SUMMARY.md +0 -135
  248. package/templates/storefront-nextjs-shadcn/GRAPHQL_INTEGRATION_COMPLETE.md +0 -142
  249. package/templates/storefront-nextjs-shadcn/INTEGRATION_CHECKLIST.md +0 -448
  250. package/templates/storefront-nextjs-shadcn/PRODUCT_DETAIL_PAGE_IMPLEMENTATION.md +0 -307
  251. package/templates/storefront-nextjs-shadcn/THEME_CUSTOMIZATION.md +0 -245
  252. package/templates/storefront-nextjs-shadcn/app/account/addresses/page.tsx +0 -215
  253. package/templates/storefront-nextjs-shadcn/app/account/orders/[id]/page.tsx +0 -128
  254. package/templates/storefront-nextjs-shadcn/app/account/orders/page.tsx +0 -80
  255. package/templates/storefront-nextjs-shadcn/app/account/settings/page.tsx +0 -171
  256. package/templates/storefront-nextjs-shadcn/app/categories/[slug]/page.tsx +0 -78
  257. package/templates/storefront-nextjs-shadcn/app/products/products-client.tsx +0 -192
  258. package/templates/storefront-nextjs-shadcn/components/providers/currency-provider.tsx +0 -103
  259. package/templates/storefront-nextjs-shadcn/graphql/collections.example.ts +0 -168
  260. package/templates/storefront-nextjs-shadcn/graphql/products.example.ts +0 -160
  261. package/templates/storefront-nextjs-shadcn/lib/auth/cookies.ts +0 -220
  262. package/templates/storefront-nextjs-shadcn/lib/config.ts +0 -46
  263. package/templates/storefront-nextjs-shadcn/lib/currency/IMPLEMENTATION_SUMMARY.md +0 -254
  264. package/templates/storefront-nextjs-shadcn/lib/currency/README.md +0 -464
  265. package/templates/storefront-nextjs-shadcn/lib/currency/cookie-manager.test.ts +0 -328
  266. package/templates/storefront-nextjs-shadcn/lib/currency/cookie-manager.ts +0 -295
  267. package/templates/storefront-nextjs-shadcn/lib/currency/index.ts +0 -27
  268. package/templates/storefront-nextjs-shadcn/lib/format.ts +0 -226
  269. package/templates/storefront-nextjs-shadcn/lib/hooks.ts +0 -30
  270. package/templates/storefront-nextjs-shadcn/stores/auth-store.ts +0 -66
  271. package/templates/storefront-nextjs-shadcn/stores/currency-store.ts +0 -103
  272. /package/templates/storefront-nextjs-shadcn/app/{blog → [locale]/blog}/page.tsx +0 -0
  273. /package/templates/storefront-nextjs-shadcn/app/{brands → [locale]/brands}/[slug]/page.tsx +0 -0
  274. /package/templates/storefront-nextjs-shadcn/app/{returns → [locale]/returns}/page.tsx +0 -0
  275. /package/templates/storefront-nextjs-shadcn/app/{search → [locale]/search}/page.tsx +0 -0
  276. /package/templates/storefront-nextjs-shadcn/app/{search → [locale]/search}/search-client.tsx +0 -0
  277. /package/templates/storefront-nextjs-shadcn/app/{shipping → [locale]/shipping}/page.tsx +0 -0
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useState } from "react";
4
+ import { useTranslations } from "next-intl";
4
5
  import { useForm } from "react-hook-form";
5
6
  import { zodResolver } from "@hookform/resolvers/zod";
6
7
  import * as z from "zod";
@@ -104,46 +105,28 @@ export interface ReturnFormData {
104
105
  }[];
105
106
  }
106
107
 
107
- const defaultReasons: ReturnReasonOption[] = [
108
- {
109
- value: "DEFECTIVE",
110
- label: "Defective Product",
111
- description: "The product has a manufacturing defect",
112
- },
113
- {
114
- value: "NOT_AS_DESCRIBED",
115
- label: "Not as Described",
116
- description: "The product does not match the description",
117
- },
118
- {
119
- value: "WRONG_ITEM",
120
- label: "Wrong Item Received",
121
- description: "You received a different item",
122
- },
123
- {
124
- value: "CHANGED_MIND",
125
- label: "Changed My Mind",
126
- description: "You no longer want the product",
127
- },
128
- {
129
- value: "BETTER_PRICE",
130
- label: "Found Better Price",
131
- description: "Found the same product cheaper elsewhere",
132
- },
133
- {
134
- value: "DAMAGED_SHIPPING",
135
- label: "Damaged in Shipping",
136
- description: "The product was damaged during delivery",
137
- },
138
- { value: "OTHER", label: "Other", description: "Another reason" },
139
- ];
140
-
141
- const itemConditions = [
142
- { value: "NEW", label: "New (unused, in original packaging)" },
143
- { value: "OPENED", label: "Opened (packaging opened but unused)" },
144
- { value: "USED", label: "Used" },
145
- { value: "DAMAGED", label: "Damaged" },
146
- ];
108
+ function useDefaultReasons(): ReturnReasonOption[] {
109
+ const t = useTranslations("returns");
110
+ return [
111
+ { value: "DEFECTIVE", label: t("reasonDefective"), description: t("reasonDefectiveDesc") },
112
+ { value: "NOT_AS_DESCRIBED", label: t("reasonNotAsDescribed"), description: t("reasonNotAsDescribedDesc") },
113
+ { value: "WRONG_ITEM", label: t("reasonWrongItem"), description: t("reasonWrongItemDesc") },
114
+ { value: "CHANGED_MIND", label: t("reasonChangedMind"), description: t("reasonChangedMindDesc") },
115
+ { value: "BETTER_PRICE", label: t("reasonBetterPrice"), description: t("reasonBetterPriceDesc") },
116
+ { value: "DAMAGED_SHIPPING", label: t("reasonDamagedShipping"), description: t("reasonDamagedShippingDesc") },
117
+ { value: "OTHER", label: t("reasonOther"), description: t("reasonOtherDesc") },
118
+ ];
119
+ }
120
+
121
+ function useItemConditions() {
122
+ const t = useTranslations("returns");
123
+ return [
124
+ { value: "NEW", label: t("conditionNew") },
125
+ { value: "OPENED", label: t("conditionOpened") },
126
+ { value: "USED", label: t("conditionUsed") },
127
+ { value: "DAMAGED", label: t("conditionDamaged") },
128
+ ];
129
+ }
147
130
 
148
131
  const formSchema = z.object({
149
132
  reason: z.enum([
@@ -197,11 +180,16 @@ export function ReturnRequestForm({
197
180
  orderId,
198
181
  orderNumber,
199
182
  items,
200
- reasons = defaultReasons,
183
+ reasons,
201
184
  onSubmit,
202
185
  onCancel,
203
186
  className = "",
204
187
  }: ReturnRequestFormProps) {
188
+ const t = useTranslations("returns");
189
+ const tc = useTranslations("common");
190
+ const defaultReasons = useDefaultReasons();
191
+ const itemConditions = useItemConditions();
192
+ const resolvedReasons = reasons ?? defaultReasons;
205
193
  const [isSubmitting, setIsSubmitting] = useState(false);
206
194
  const [submitError, setSubmitError] = useState<string | null>(null);
207
195
  const [submitSuccess, setSubmitSuccess] = useState(false);
@@ -248,8 +236,9 @@ export function ReturnRequestForm({
248
236
  });
249
237
 
250
238
  setSubmitSuccess(true);
251
- } catch (error: any) {
252
- setSubmitError(error.message || "Failed to create return request");
239
+ } catch (error: unknown) {
240
+ const message = error instanceof Error ? error.message : "Failed to create return request";
241
+ setSubmitError(message);
253
242
  } finally {
254
243
  setIsSubmitting(false);
255
244
  }
@@ -263,14 +252,13 @@ export function ReturnRequestForm({
263
252
  <div className="text-center py-8">
264
253
  <CheckCircle className="mx-auto h-16 w-16 text-green-600 mb-4" />
265
254
  <h3 className="text-xl font-semibold mb-2">
266
- Return Request Submitted
255
+ {t("submitted")}
267
256
  </h3>
268
257
  <p className="text-muted-foreground mb-6">
269
- Your return request has been submitted successfully. You will
270
- receive an email with further instructions.
258
+ {t("submittedDesc")}
271
259
  </p>
272
260
  <Button variant="outline" onClick={onCancel}>
273
- Back to Order
261
+ {t("backToOrder")}
274
262
  </Button>
275
263
  </div>
276
264
  </CardContent>
@@ -283,7 +271,7 @@ export function ReturnRequestForm({
283
271
  <CardHeader>
284
272
  <CardTitle className="flex items-center gap-2">
285
273
  <Package className="h-5 w-5" />
286
- Return Request for Order #{orderNumber}
274
+ {t("title", { orderNumber })}
287
275
  </CardTitle>
288
276
  </CardHeader>
289
277
 
@@ -295,14 +283,14 @@ export function ReturnRequestForm({
295
283
  >
296
284
  {/* Step 1: Select Items */}
297
285
  <div className="space-y-4">
298
- <h3 className="font-medium">1. Select Items to Return</h3>
286
+ <h3 className="font-medium">{t("selectItems")}</h3>
299
287
 
300
288
  {items.length === 0 ? (
301
289
  <Alert>
302
290
  <AlertCircle className="h-4 w-4" />
303
- <AlertTitle>No Returnable Items</AlertTitle>
291
+ <AlertTitle>{t("noReturnableItems")}</AlertTitle>
304
292
  <AlertDescription>
305
- There are no items eligible for return in this order.
293
+ {t("noReturnableItemsDesc")}
306
294
  </AlertDescription>
307
295
  </Alert>
308
296
  ) : (
@@ -360,7 +348,7 @@ export function ReturnRequestForm({
360
348
  </p>
361
349
  )}
362
350
  <p className="text-sm mt-1">
363
- Ordered: {item.quantity} | Returnable:{" "}
351
+ {t("ordered")} {item.quantity} | {t("returnable")}{" "}
364
352
  {item.returnableQuantity}
365
353
  </p>
366
354
  </div>
@@ -383,7 +371,7 @@ export function ReturnRequestForm({
383
371
  name={`items.${index}.quantity`}
384
372
  render={({ field }) => (
385
373
  <FormItem>
386
- <FormLabel>Quantity to Return</FormLabel>
374
+ <FormLabel>{t("quantityToReturn")}</FormLabel>
387
375
  <FormControl>
388
376
  <div className="flex items-center gap-2">
389
377
  <Button
@@ -431,14 +419,14 @@ export function ReturnRequestForm({
431
419
  name={`items.${index}.condition`}
432
420
  render={({ field }) => (
433
421
  <FormItem>
434
- <FormLabel>Item Condition</FormLabel>
422
+ <FormLabel>{t("itemCondition")}</FormLabel>
435
423
  <Select
436
424
  onValueChange={field.onChange}
437
425
  defaultValue={field.value}
438
426
  >
439
427
  <FormControl>
440
428
  <SelectTrigger>
441
- <SelectValue placeholder="Select condition" />
429
+ <SelectValue placeholder={t("selectCondition")} />
442
430
  </SelectTrigger>
443
431
  </FormControl>
444
432
  <SelectContent>
@@ -465,32 +453,32 @@ export function ReturnRequestForm({
465
453
 
466
454
  {selectedCount > 0 && (
467
455
  <Badge variant="secondary">
468
- {selectedCount} item{selectedCount > 1 ? "s" : ""} selected
456
+ {selectedCount} {t("itemsSelected")}
469
457
  </Badge>
470
458
  )}
471
459
  </div>
472
460
 
473
461
  {/* Step 2: Return Reason */}
474
462
  <div className="space-y-4">
475
- <h3 className="font-medium">2. Reason for Return</h3>
463
+ <h3 className="font-medium">{t("returnReason")}</h3>
476
464
 
477
465
  <FormField
478
466
  control={form.control}
479
467
  name="reason"
480
468
  render={({ field }) => (
481
469
  <FormItem>
482
- <FormLabel>Primary Reason</FormLabel>
470
+ <FormLabel>{t("primaryReason")}</FormLabel>
483
471
  <Select
484
472
  onValueChange={field.onChange}
485
473
  defaultValue={field.value}
486
474
  >
487
475
  <FormControl>
488
476
  <SelectTrigger>
489
- <SelectValue placeholder="Select a reason" />
477
+ <SelectValue placeholder={t("selectReason")} />
490
478
  </SelectTrigger>
491
479
  </FormControl>
492
480
  <SelectContent>
493
- {reasons.map((reason) => (
481
+ {resolvedReasons.map((reason) => (
494
482
  <SelectItem key={reason.value} value={reason.value}>
495
483
  {reason.label}
496
484
  </SelectItem>
@@ -507,16 +495,16 @@ export function ReturnRequestForm({
507
495
  name="customerNote"
508
496
  render={({ field }) => (
509
497
  <FormItem>
510
- <FormLabel>Additional Details (Optional)</FormLabel>
498
+ <FormLabel>{t("additionalDetails")}</FormLabel>
511
499
  <FormControl>
512
500
  <Textarea
513
- placeholder="Please provide any additional details about your return..."
501
+ placeholder={t("additionalDetailsPlaceholder")}
514
502
  className="resize-none"
515
503
  {...field}
516
504
  />
517
505
  </FormControl>
518
506
  <FormDescription>
519
- Help us process your return faster by providing details.
507
+ {t("additionalDetailsHint")}
520
508
  </FormDescription>
521
509
  <FormMessage />
522
510
  </FormItem>
@@ -526,7 +514,7 @@ export function ReturnRequestForm({
526
514
 
527
515
  {/* Step 3: Compensation Type */}
528
516
  <div className="space-y-4">
529
- <h3 className="font-medium">3. Compensation Preference</h3>
517
+ <h3 className="font-medium">{t("compensationPreference")}</h3>
530
518
 
531
519
  <FormField
532
520
  control={form.control}
@@ -545,11 +533,10 @@ export function ReturnRequestForm({
545
533
  </FormControl>
546
534
  <FormLabel className="font-normal cursor-pointer">
547
535
  <span className="font-medium">
548
- Refund to Original Payment
536
+ {t("refundOriginal")}
549
537
  </span>
550
538
  <p className="text-sm text-muted-foreground">
551
- Refund will be processed to your original payment
552
- method
539
+ {t("refundOriginalDesc")}
553
540
  </p>
554
541
  </FormLabel>
555
542
  </FormItem>
@@ -558,9 +545,9 @@ export function ReturnRequestForm({
558
545
  <RadioGroupItem value="STORE_CREDIT" />
559
546
  </FormControl>
560
547
  <FormLabel className="font-normal cursor-pointer">
561
- <span className="font-medium">Store Credit</span>
548
+ <span className="font-medium">{t("storeCredit")}</span>
562
549
  <p className="text-sm text-muted-foreground">
563
- Receive store credit for future purchases
550
+ {t("storeCreditDesc")}
564
551
  </p>
565
552
  </FormLabel>
566
553
  </FormItem>
@@ -576,7 +563,7 @@ export function ReturnRequestForm({
576
563
  {submitError && (
577
564
  <Alert variant="destructive">
578
565
  <AlertCircle className="h-4 w-4" />
579
- <AlertTitle>Error</AlertTitle>
566
+ <AlertTitle>{t("error")}</AlertTitle>
580
567
  <AlertDescription>{submitError}</AlertDescription>
581
568
  </Alert>
582
569
  )}
@@ -590,14 +577,14 @@ export function ReturnRequestForm({
590
577
  onClick={onCancel}
591
578
  disabled={isSubmitting}
592
579
  >
593
- Cancel
580
+ {tc("cancel")}
594
581
  </Button>
595
582
  )}
596
583
  <Button type="submit" disabled={isSubmitting || selectedCount === 0}>
597
584
  {isSubmitting && (
598
585
  <Loader2 className="mr-2 h-4 w-4 animate-spin" />
599
586
  )}
600
- Submit Return Request
587
+ {t("submitReturn")}
601
588
  </Button>
602
589
  </div>
603
590
  </form>
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
 
3
3
  import { useState, useEffect, useRef, useCallback } from "react";
4
- import { useRouter } from "next/navigation";
4
+ import { useTranslations } from "next-intl";
5
+ import { useRouter } from "@/i18n/navigation";
5
6
  import { Search, X } from "lucide-react";
6
7
  import { Input } from "@/components/ui/input";
7
8
  import { SearchSuggestions } from "./search-suggestions";
@@ -19,10 +20,12 @@ export interface SearchBarProps {
19
20
  */
20
21
  export function SearchBar({
21
22
  defaultValue = "",
22
- placeholder = "Search products...",
23
+ placeholder,
23
24
  className,
24
25
  showSuggestions = true,
25
26
  }: SearchBarProps) {
27
+ const t = useTranslations("search");
28
+ const resolvedPlaceholder = placeholder ?? t("placeholder");
26
29
  const router = useRouter();
27
30
  const [query, setQuery] = useState(defaultValue);
28
31
  const [isOpen, setIsOpen] = useState(false);
@@ -104,7 +107,7 @@ export function SearchBar({
104
107
  <Input
105
108
  ref={inputRef}
106
109
  type="search"
107
- placeholder={placeholder}
110
+ placeholder={resolvedPlaceholder}
108
111
  value={query}
109
112
  onChange={(e) => setQuery(e.target.value)}
110
113
  onFocus={() => setIsOpen(true)}
@@ -120,7 +123,7 @@ export function SearchBar({
120
123
  type="button"
121
124
  onClick={handleClear}
122
125
  className="absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"
123
- aria-label="Clear search"
126
+ aria-label={t("clearSearch")}
124
127
  >
125
128
  <X className="h-5 w-5" />
126
129
  </button>
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
 
3
- import { ProductGrid, type ProductCardProduct } from "@/components/product/product-grid";
3
+ import { ProductGrid } from "@/components/product/product-grid";
4
4
  import { EmptyProducts } from "@/components/ui/empty-state";
5
+ import type { ProductCardFields } from "@/lib/graphql/fragments";
5
6
 
6
7
  export interface SearchResultsProps {
7
8
  query: string;
8
- results: ProductCardProduct[];
9
+ results: ProductCardFields[];
9
10
  }
10
11
 
11
12
  /**
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useState, useEffect } from "react";
4
+ import { useTranslations } from "next-intl";
4
5
  import { Truck, Package, Clock, Check, AlertCircle } from "lucide-react";
5
6
  import { cn } from "@/lib/utils";
6
7
  import { Spinner } from "@/components/ui/spinner";
@@ -77,6 +78,7 @@ export function ShippingMethodSelector({
77
78
  currencyCode = "PLN",
78
79
  className,
79
80
  }: ShippingMethodSelectorProps) {
81
+ const t = useTranslations("checkout.delivery");
80
82
  const formatPrice = (money: Money) => {
81
83
  const amount = parseFloat(money.amount);
82
84
  return new Intl.NumberFormat("pl-PL", {
@@ -90,12 +92,12 @@ export function ShippingMethodSelector({
90
92
  <div className={cn("space-y-4", className)}>
91
93
  <div className="flex items-center gap-2">
92
94
  <Truck className="h-5 w-5 text-muted-foreground" />
93
- <h3 className="text-sm font-medium text-foreground">Shipping Method</h3>
95
+ <h3 className="text-sm font-medium text-foreground">{t("title")}</h3>
94
96
  </div>
95
97
  <div className="flex items-center justify-center py-8">
96
98
  <Spinner className="h-6 w-6" />
97
99
  <span className="ml-2 text-sm text-muted-foreground">
98
- Loading shipping options...
100
+ {t("loading")}
99
101
  </span>
100
102
  </div>
101
103
  </div>
@@ -107,7 +109,7 @@ export function ShippingMethodSelector({
107
109
  <div className={cn("space-y-4", className)}>
108
110
  <div className="flex items-center gap-2">
109
111
  <Truck className="h-5 w-5 text-muted-foreground" />
110
- <h3 className="text-sm font-medium text-foreground">Shipping Method</h3>
112
+ <h3 className="text-sm font-medium text-foreground">{t("title")}</h3>
111
113
  </div>
112
114
  <div className="rounded-lg border border-destructive/50 bg-destructive/10 p-4">
113
115
  <div className="flex items-center gap-2">
@@ -124,11 +126,11 @@ export function ShippingMethodSelector({
124
126
  <div className={cn("space-y-4", className)}>
125
127
  <div className="flex items-center gap-2">
126
128
  <Truck className="h-5 w-5 text-muted-foreground" />
127
- <h3 className="text-sm font-medium text-foreground">Shipping Method</h3>
129
+ <h3 className="text-sm font-medium text-foreground">{t("title")}</h3>
128
130
  </div>
129
131
  <div className="rounded-lg border border-border bg-muted/50 p-4">
130
132
  <p className="text-sm text-muted-foreground text-center">
131
- No shipping methods available for this address
133
+ {t("noMethodsAvailable")}
132
134
  </p>
133
135
  </div>
134
136
  </div>
@@ -140,7 +142,7 @@ export function ShippingMethodSelector({
140
142
  {/* Header */}
141
143
  <div className="flex items-center gap-2">
142
144
  <Truck className="h-5 w-5 text-muted-foreground" />
143
- <h3 className="text-sm font-medium text-foreground">Shipping Method</h3>
145
+ <h3 className="text-sm font-medium text-foreground">{t("title")}</h3>
144
146
  </div>
145
147
 
146
148
  {/* Free Shipping Progress Banner */}
@@ -167,7 +169,7 @@ export function ShippingMethodSelector({
167
169
  <div className="flex items-center gap-2">
168
170
  <Check className="h-4 w-4 text-green-600" />
169
171
  <p className="text-sm font-medium text-green-700">
170
- {freeShippingProgress.message || "You qualify for free shipping!"}
172
+ {freeShippingProgress.message || t("freeShippingQualified")}
171
173
  </p>
172
174
  </div>
173
175
  </div>
@@ -190,6 +192,7 @@ function ShippingMethodCard({
190
192
  onSelect: () => void;
191
193
  formatPrice: (money: Money) => string;
192
194
  }) {
195
+ const t = useTranslations("checkout.delivery");
193
196
  return (
194
197
  <button
195
198
  type="button"
@@ -225,7 +228,7 @@ function ShippingMethodCard({
225
228
  </p>
226
229
  {method.isFree && (
227
230
  <span className="rounded bg-green-500/10 px-1.5 py-0.5 text-xs font-medium text-green-700">
228
- FREE
231
+ {t("free")}
229
232
  </span>
230
233
  )}
231
234
  </div>
@@ -264,7 +267,7 @@ function ShippingMethodCard({
264
267
  method.isFree ? "text-green-600" : "text-foreground"
265
268
  )}
266
269
  >
267
- {method.isFree ? "FREE" : formatPrice(method.price)}
270
+ {method.isFree ? t("free") : formatPrice(method.price)}
268
271
  </p>
269
272
 
270
273
  {/* Selection Indicator */}
@@ -1,4 +1,7 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
4
+ import { useTranslations } from 'next-intl';
2
5
  import { cn } from '@/lib/utils';
3
6
 
4
7
  export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -44,6 +47,8 @@ EmptyState.displayName = 'EmptyState';
44
47
  export const EmptyCart: React.FC<{ onContinueShopping?: () => void }> = ({
45
48
  onContinueShopping,
46
49
  }) => {
50
+ const t = useTranslations('emptyState');
51
+
47
52
  return (
48
53
  <EmptyState
49
54
  icon={
@@ -62,15 +67,15 @@ export const EmptyCart: React.FC<{ onContinueShopping?: () => void }> = ({
62
67
  />
63
68
  </svg>
64
69
  }
65
- title="Your cart is empty"
66
- description="Add some products to your cart to get started."
70
+ title={t('cartEmpty')}
71
+ description={t('cartEmptyDescription')}
67
72
  action={
68
73
  onContinueShopping && (
69
74
  <button
70
75
  onClick={onContinueShopping}
71
76
  className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
72
77
  >
73
- Continue Shopping
78
+ {t('continueShopping')}
74
79
  </button>
75
80
  )
76
81
  }
@@ -84,6 +89,8 @@ EmptyCart.displayName = 'EmptyCart';
84
89
  * EmptyProducts - Pre-configured empty state for product listings
85
90
  */
86
91
  export const EmptyProducts: React.FC<{ onReset?: () => void }> = ({ onReset }) => {
92
+ const t = useTranslations('emptyState');
93
+
87
94
  return (
88
95
  <EmptyState
89
96
  icon={
@@ -102,15 +109,15 @@ export const EmptyProducts: React.FC<{ onReset?: () => void }> = ({ onReset }) =
102
109
  />
103
110
  </svg>
104
111
  }
105
- title="No products found"
106
- description="Try adjusting your search or filter criteria to find what you're looking for."
112
+ title={t('noProducts')}
113
+ description={t('noProductsDescription')}
107
114
  action={
108
115
  onReset && (
109
116
  <button
110
117
  onClick={onReset}
111
118
  className="rounded-md border border-border bg-background px-4 py-2 text-sm font-medium text-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
112
119
  >
113
- Clear Filters
120
+ {t('clearFilters')}
114
121
  </button>
115
122
  )
116
123
  }
@@ -126,6 +133,8 @@ EmptyProducts.displayName = 'EmptyProducts';
126
133
  export const EmptyOrders: React.FC<{ onStartShopping?: () => void }> = ({
127
134
  onStartShopping,
128
135
  }) => {
136
+ const t = useTranslations('emptyState');
137
+
129
138
  return (
130
139
  <EmptyState
131
140
  icon={
@@ -144,15 +153,15 @@ export const EmptyOrders: React.FC<{ onStartShopping?: () => void }> = ({
144
153
  />
145
154
  </svg>
146
155
  }
147
- title="No orders yet"
148
- description="You haven't placed any orders yet. Start shopping to see your order history here."
156
+ title={t('noOrders')}
157
+ description={t('noOrdersDescription')}
149
158
  action={
150
159
  onStartShopping && (
151
160
  <button
152
161
  onClick={onStartShopping}
153
162
  className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
154
163
  >
155
- Start Shopping
164
+ {t('startShopping')}
156
165
  </button>
157
166
  )
158
167
  }
@@ -168,6 +177,8 @@ EmptyOrders.displayName = 'EmptyOrders';
168
177
  export const EmptyWishlist: React.FC<{ onBrowseProducts?: () => void }> = ({
169
178
  onBrowseProducts,
170
179
  }) => {
180
+ const t = useTranslations('emptyState');
181
+
171
182
  return (
172
183
  <EmptyState
173
184
  icon={
@@ -186,15 +197,15 @@ export const EmptyWishlist: React.FC<{ onBrowseProducts?: () => void }> = ({
186
197
  />
187
198
  </svg>
188
199
  }
189
- title="Your wishlist is empty"
190
- description="Save your favorite products to your wishlist for easy access later."
200
+ title={t('wishlistEmpty')}
201
+ description={t('wishlistEmptyDescription')}
191
202
  action={
192
203
  onBrowseProducts && (
193
204
  <button
194
205
  onClick={onBrowseProducts}
195
206
  className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
196
207
  >
197
- Browse Products
208
+ {t('browseProducts')}
198
209
  </button>
199
210
  )
200
211
  }