@mohasinac/appkit 2.8.2 → 2.8.3

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 (430) hide show
  1. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +7 -1
  2. package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +4 -1
  3. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +7 -1
  4. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +3 -2
  5. package/dist/_internal/client/features/live/LiveItemDetailView.js +11 -2
  6. package/dist/_internal/client/scaffolds/AppShell.js +2 -1
  7. package/dist/_internal/client/scaffolds/DashboardScaffold.js +2 -1
  8. package/dist/_internal/server/features/checkout/actions.js +40 -39
  9. package/dist/_internal/shared/actions/action-registry.js +6 -0
  10. package/dist/_internal/shared/config/index.d.ts +1 -1
  11. package/dist/_internal/shared/config/schema.d.ts +0 -8
  12. package/dist/client-entry.d.ts +1 -1
  13. package/dist/client.d.ts +1 -1
  14. package/dist/client.js +1 -1
  15. package/dist/configs/next.js +12 -22
  16. package/dist/constants/api-endpoints.d.ts +6 -0
  17. package/dist/constants/api-endpoints.js +2 -0
  18. package/dist/core/hooks/useSiteSettings.d.ts +1 -1
  19. package/dist/features/about/components/AboutView.js +5 -2
  20. package/dist/features/about/components/FAQPageView.js +3 -3
  21. package/dist/features/about/components/FeesView.js +13 -5
  22. package/dist/features/about/components/HelpPageView.js +9 -5
  23. package/dist/features/about/components/HowAuctionsWorkView.js +9 -5
  24. package/dist/features/about/components/HowCheckoutWorksView.js +9 -5
  25. package/dist/features/about/components/HowOffersWorkView.js +10 -5
  26. package/dist/features/about/components/HowOrdersWorkView.js +10 -5
  27. package/dist/features/about/components/HowPayoutsWorkView.js +9 -5
  28. package/dist/features/about/components/HowPreOrdersWorkView.js +9 -5
  29. package/dist/features/about/components/HowReviewsWorkView.js +9 -5
  30. package/dist/features/about/components/PolicyPageView.js +3 -3
  31. package/dist/features/about/components/PublicProfileView.js +11 -4
  32. package/dist/features/about/components/SecurityPrivacyView.js +8 -4
  33. package/dist/features/about/components/ShippingPolicyView.js +3 -2
  34. package/dist/features/about/components/TrackOrderView.js +2 -2
  35. package/dist/features/about/components/UnauthorizedView.js +3 -3
  36. package/dist/features/account/components/AddressBook.js +1 -1
  37. package/dist/features/account/components/AddressForm.js +2 -2
  38. package/dist/features/account/components/AddressInlineSelect.d.ts +24 -0
  39. package/dist/features/account/components/AddressInlineSelect.js +78 -0
  40. package/dist/features/account/components/AddressSelectorCreate.d.ts +2 -1
  41. package/dist/features/account/components/AddressSelectorCreate.js +5 -32
  42. package/dist/features/account/components/AddressesIndexListing.js +3 -3
  43. package/dist/features/account/components/ChatWindow.js +2 -1
  44. package/dist/features/account/components/NotificationBell.js +13 -7
  45. package/dist/features/account/components/NotificationPreferencesPanel.js +4 -1
  46. package/dist/features/account/components/UserOffersPanel.js +2 -1
  47. package/dist/features/account/components/UserSidebar.js +11 -7
  48. package/dist/features/account/components/UserSupportView.js +13 -4
  49. package/dist/features/account/components/index.d.ts +2 -0
  50. package/dist/features/account/components/index.js +1 -0
  51. package/dist/features/account/hooks/useAccount.d.ts +2 -2
  52. package/dist/features/account/hooks/useAddressSelector.d.ts +1 -1
  53. package/dist/features/account/hooks/useAddresses.d.ts +2 -2
  54. package/dist/features/account/hooks/useNotifications.d.ts +1 -1
  55. package/dist/features/account/hooks/useProfile.d.ts +1 -1
  56. package/dist/features/account/hooks/usePublicProfile.d.ts +2 -2
  57. package/dist/features/addresses/repository/addresses.repository.d.ts +1 -0
  58. package/dist/features/addresses/repository/addresses.repository.js +13 -0
  59. package/dist/features/admin/components/AdminAdEditorView.js +8 -5
  60. package/dist/features/admin/components/AdminAddressEditorView.js +5 -5
  61. package/dist/features/admin/components/AdminAdsView.js +10 -7
  62. package/dist/features/admin/components/AdminBlogEditorView.js +15 -9
  63. package/dist/features/admin/components/AdminBrandEditorView.js +10 -4
  64. package/dist/features/admin/components/AdminBrandsView.js +4 -4
  65. package/dist/features/admin/components/AdminBundleEditorView.js +4 -5
  66. package/dist/features/admin/components/AdminBundlesView.js +3 -3
  67. package/dist/features/admin/components/AdminCarouselEditorView.js +6 -3
  68. package/dist/features/admin/components/AdminCarouselView.js +6 -6
  69. package/dist/features/admin/components/AdminCatalogGuideView.js +2 -1
  70. package/dist/features/admin/components/AdminCategoriesView.js +5 -5
  71. package/dist/features/admin/components/AdminCategoryEditorView.js +11 -5
  72. package/dist/features/admin/components/AdminContactEditorView.js +8 -1
  73. package/dist/features/admin/components/AdminCouponEditorView.js +23 -5
  74. package/dist/features/admin/components/AdminEmployeeEditorView.js +7 -4
  75. package/dist/features/admin/components/AdminFaqEditorView.js +9 -3
  76. package/dist/features/admin/components/AdminFaqsView.js +4 -4
  77. package/dist/features/admin/components/AdminFeatureEditorView.js +7 -1
  78. package/dist/features/admin/components/AdminFeatureFlagsView.js +4 -1
  79. package/dist/features/admin/components/AdminFilterBar.js +4 -4
  80. package/dist/features/admin/components/AdminGroupedListingsView.js +65 -30
  81. package/dist/features/admin/components/AdminGuideHubView.js +4 -1
  82. package/dist/features/admin/components/AdminMediaView.js +4 -1
  83. package/dist/features/admin/components/AdminNavigationView.js +7 -4
  84. package/dist/features/admin/components/AdminNotificationsView.js +2 -2
  85. package/dist/features/admin/components/AdminOrderEditorView.js +2 -2
  86. package/dist/features/admin/components/AdminPageHeader.js +5 -2
  87. package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -5
  88. package/dist/features/admin/components/AdminProductEditorView.js +12 -5
  89. package/dist/features/admin/components/AdminProductsView.js +4 -4
  90. package/dist/features/admin/components/AdminReviewsView.js +2 -2
  91. package/dist/features/admin/components/AdminScammerEditorView.js +6 -2
  92. package/dist/features/admin/components/AdminScammersView.js +3 -3
  93. package/dist/features/admin/components/AdminSectionsView.js +20 -22
  94. package/dist/features/admin/components/AdminSessionsManager.js +2 -1
  95. package/dist/features/admin/components/AdminSessionsView.js +2 -2
  96. package/dist/features/admin/components/AdminSidebar.js +11 -7
  97. package/dist/features/admin/components/AdminSiteConfigGuideView.js +2 -1
  98. package/dist/features/admin/components/AdminSiteSettingsView.js +5 -1
  99. package/dist/features/admin/components/AdminStoreAddressesView.js +2 -2
  100. package/dist/features/admin/components/AdminStoreEditorView.js +5 -5
  101. package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +3 -3
  102. package/dist/features/admin/components/AdminSupportTicketDetailView.js +10 -3
  103. package/dist/features/admin/components/AdminSupportTicketsView.js +3 -3
  104. package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
  105. package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
  106. package/dist/features/admin/components/AdminViewCards.js +12 -6
  107. package/dist/features/admin/components/BrandQuickCreateForm.js +2 -2
  108. package/dist/features/admin/components/CategoryQuickCreateForm.js +2 -2
  109. package/dist/features/admin/components/DashboardStats.js +9 -3
  110. package/dist/features/admin/components/DataListingView.js +3 -3
  111. package/dist/features/admin/components/DataTable.js +11 -7
  112. package/dist/features/admin/components/DrawerFormFooter.js +2 -2
  113. package/dist/features/admin/components/QuickEditMenu.js +2 -1
  114. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +5 -1
  115. package/dist/features/admin/hooks/useAdmin.d.ts +1 -1
  116. package/dist/features/admin/hooks/useAdminSectionsListing.d.ts +1 -1
  117. package/dist/features/admin/hooks/useChat.d.ts +1 -1
  118. package/dist/features/auctions/components/AuctionBidsTable.js +4 -1
  119. package/dist/features/auctions/components/AuctionDetailPageView.js +14 -6
  120. package/dist/features/auctions/components/CollapsibleBidHistory.js +5 -1
  121. package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -3
  122. package/dist/features/auctions/components/MarketplaceAuctionGrid.js +8 -2
  123. package/dist/features/auctions/components/PlaceBidFormClient.js +4 -1
  124. package/dist/features/auctions/hooks/useAuctions.d.ts +8 -8
  125. package/dist/features/auth/components/RegisterForm.js +2 -2
  126. package/dist/features/auth/components/VerifyEmailView.js +5 -2
  127. package/dist/features/auth/hooks/useAuth.d.ts +2 -2
  128. package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
  129. package/dist/features/blog/components/BlogFeaturedCard.js +8 -1
  130. package/dist/features/blog/components/BlogIndexListing.js +11 -5
  131. package/dist/features/blog/components/BlogListView.js +11 -3
  132. package/dist/features/blog/components/BlogPostView.js +10 -3
  133. package/dist/features/cart/components/CartDrawer.js +11 -3
  134. package/dist/features/cart/components/CartSummary.js +2 -2
  135. package/dist/features/cart/components/CheckoutOtpModal.js +2 -1
  136. package/dist/features/cart/hooks/useCart.d.ts +1 -1
  137. package/dist/features/cart/hooks/useCartQuery.d.ts +1 -1
  138. package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +2 -2
  139. package/dist/features/cart/hooks/useOrder.d.ts +2 -2
  140. package/dist/features/categories/components/BrandDetailPageView.js +5 -2
  141. package/dist/features/categories/components/BrandDetailTabs.js +5 -1
  142. package/dist/features/categories/components/BundleDetailView.js +6 -3
  143. package/dist/features/categories/components/BundleDynamicRuleEditor.js +3 -1
  144. package/dist/features/categories/components/BundleItemsPicker.js +10 -3
  145. package/dist/features/categories/components/CategoriesIndexListing.js +12 -6
  146. package/dist/features/categories/components/CategoryBundlesListing.js +5 -2
  147. package/dist/features/categories/components/CategoryDetailPageView.js +6 -2
  148. package/dist/features/categories/components/CategoryDetailTabs.js +5 -1
  149. package/dist/features/categories/components/CategoryForm.js +6 -3
  150. package/dist/features/categories/components/CategoryGrid.js +9 -2
  151. package/dist/features/categories/components/CategoryProductsListing.js +10 -4
  152. package/dist/features/categories/components/CategorySelectorCreate.js +3 -3
  153. package/dist/features/categories/components/CategorySortSelect.js +1 -1
  154. package/dist/features/categories/components/CategoryStoresListing.js +3 -3
  155. package/dist/features/categories/components/CategoryTableColumns.js +10 -6
  156. package/dist/features/categories/components/CategoryTree.js +1 -1
  157. package/dist/features/categories/hooks/useCategories.d.ts +3 -3
  158. package/dist/features/categories/hooks/useCategorySelector.d.ts +3 -3
  159. package/dist/features/categories/hooks/useCategoryTree.d.ts +1 -1
  160. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +2 -2
  161. package/dist/features/classified/components/ClassifiedFilters.js +2 -2
  162. package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
  163. package/dist/features/collections/components/CollectionCard.js +2 -1
  164. package/dist/features/collections/hooks/useCollections.d.ts +2 -2
  165. package/dist/features/contact/components/ContactForm.js +4 -2
  166. package/dist/features/contact/components/ContactInfoSidebar.js +4 -1
  167. package/dist/features/copilot/components/AdminCopilotView.js +13 -5
  168. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +9 -3
  169. package/dist/features/events/components/AdminEventEditorView.js +62 -40
  170. package/dist/features/events/components/AdminEventEntriesView.js +9 -6
  171. package/dist/features/events/components/EventCard.js +7 -1
  172. package/dist/features/events/components/EventFormDrawer.js +2 -1
  173. package/dist/features/events/components/EventLeaderboard.js +4 -4
  174. package/dist/features/events/components/EventOfferCard.js +4 -1
  175. package/dist/features/events/components/EventParticipateView.js +3 -2
  176. package/dist/features/events/components/EventPollWidget.js +6 -5
  177. package/dist/features/events/components/EventRaffleEntryForm.js +5 -2
  178. package/dist/features/events/components/EventRaffleWinnerView.js +7 -1
  179. package/dist/features/events/components/EventRafflesSection.js +2 -2
  180. package/dist/features/events/components/EventSaleBanner.js +5 -2
  181. package/dist/features/events/components/EventsIndexListing.js +8 -2
  182. package/dist/features/events/components/EventsListView.js +4 -1
  183. package/dist/features/events/components/SpinWheelView.js +7 -2
  184. package/dist/features/events/hooks/useEvent.d.ts +3 -3
  185. package/dist/features/events/hooks/useEvents.d.ts +1 -1
  186. package/dist/features/events/schemas/firestore.d.ts +1 -0
  187. package/dist/features/events/types/index.d.ts +1 -0
  188. package/dist/features/faq/components/ContactCTA.js +4 -1
  189. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  190. package/dist/features/faq/components/FAQHelpfulButtons.js +8 -5
  191. package/dist/features/faq/components/FAQPageContent.js +5 -5
  192. package/dist/features/faq/components/FAQSortDropdown.js +2 -2
  193. package/dist/features/faq/hooks/useFAQs.d.ts +1 -1
  194. package/dist/features/faq/hooks/useFaqList.d.ts +15 -15
  195. package/dist/features/filters/AsyncFacetSection.js +4 -2
  196. package/dist/features/filters/FilterFacetSection.js +14 -6
  197. package/dist/features/filters/RangeFilter.js +4 -2
  198. package/dist/features/filters/SwitchFilter.js +2 -1
  199. package/dist/features/forms/Checkbox.js +1 -1
  200. package/dist/features/forms/Radio.js +1 -1
  201. package/dist/features/forms/Slider.js +1 -1
  202. package/dist/features/homepage/components/AdSlot.js +4 -4
  203. package/dist/features/homepage/components/AdvertisementBanner.js +13 -4
  204. package/dist/features/homepage/components/AnnouncementBar.js +2 -1
  205. package/dist/features/homepage/components/BeforeAfterCard.js +8 -2
  206. package/dist/features/homepage/components/BrandsSection.js +6 -3
  207. package/dist/features/homepage/components/CTABannerSection.js +2 -2
  208. package/dist/features/homepage/components/CharacterHotspot.js +5 -2
  209. package/dist/features/homepage/components/CharacterHotspotForm.js +8 -4
  210. package/dist/features/homepage/components/CustomCardsSection.js +13 -7
  211. package/dist/features/homepage/components/CustomerReviewsSection.js +9 -3
  212. package/dist/features/homepage/components/FAQSection.js +7 -4
  213. package/dist/features/homepage/components/FeaturedBundlesSection.js +8 -2
  214. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  215. package/dist/features/homepage/components/GoogleReviewsSection.js +14 -8
  216. package/dist/features/homepage/components/HeroCarousel.js +1 -1
  217. package/dist/features/homepage/components/HomepageSkeleton.js +7 -1
  218. package/dist/features/homepage/components/HowItWorksInfoView.js +2 -2
  219. package/dist/features/homepage/components/HowItWorksSection.js +2 -2
  220. package/dist/features/homepage/components/NewsletterBanner.js +3 -2
  221. package/dist/features/homepage/components/NewsletterSection.js +5 -2
  222. package/dist/features/homepage/components/PromoGrid.js +4 -1
  223. package/dist/features/homepage/components/SectionCarousel.js +7 -4
  224. package/dist/features/homepage/components/SecurityHighlightsSection.js +3 -3
  225. package/dist/features/homepage/components/ShopByCategorySection.js +10 -4
  226. package/dist/features/homepage/components/SiteFeaturesSection.js +5 -2
  227. package/dist/features/homepage/components/SocialFeedSection.js +4 -4
  228. package/dist/features/homepage/components/SocialPostCard.js +6 -3
  229. package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
  230. package/dist/features/homepage/components/TrustIndicatorsSection.js +5 -2
  231. package/dist/features/homepage/components/WelcomeSection.js +1 -1
  232. package/dist/features/homepage/components/WhatsAppCommunitySection.js +3 -3
  233. package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -1
  234. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +1 -1
  235. package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +1 -1
  236. package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -1
  237. package/dist/features/homepage/hooks/useFeaturedStores.d.ts +1 -1
  238. package/dist/features/homepage/hooks/useHeroCarousel.d.ts +1 -1
  239. package/dist/features/homepage/hooks/useHomepageEvents.d.ts +1 -1
  240. package/dist/features/homepage/hooks/useHomepageReviews.d.ts +1 -1
  241. package/dist/features/homepage/hooks/useHomepageSections.d.ts +1 -1
  242. package/dist/features/homepage/hooks/useTopBrands.d.ts +1 -1
  243. package/dist/features/homepage/hooks/useTopCategories.d.ts +1 -1
  244. package/dist/features/layout/AppLayoutShell.js +2 -1
  245. package/dist/features/layout/BackToTop.js +1 -1
  246. package/dist/features/layout/BottomActions.js +4 -3
  247. package/dist/features/layout/BottomNavItem.js +1 -1
  248. package/dist/features/layout/BottomSheet.js +4 -1
  249. package/dist/features/layout/FooterLayout.js +1 -1
  250. package/dist/features/layout/NavbarLayout.js +4 -1
  251. package/dist/features/layout/SidebarLayout.js +5 -2
  252. package/dist/features/live/components/LiveItemFilters.js +2 -2
  253. package/dist/features/live/components/LiveItemsIndexListing.js +9 -3
  254. package/dist/features/loyalty/components/CoinsDisplay.js +4 -2
  255. package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +1 -1
  256. package/dist/features/media/AvatarUpload.js +2 -2
  257. package/dist/features/media/MediaLightbox.js +3 -2
  258. package/dist/features/media/modals/VideoThumbnailSelector.js +4 -1
  259. package/dist/features/media/modals/VideoTrimModal.js +1 -1
  260. package/dist/features/media/upload/CameraCapture.js +1 -1
  261. package/dist/features/media/upload/ImageUpload.js +4 -1
  262. package/dist/features/media/upload/MediaUploadField.js +11 -2
  263. package/dist/features/media/upload/MediaUploadList.js +5 -1
  264. package/dist/features/orders/components/MarketplaceOrderCard.js +2 -2
  265. package/dist/features/orders/components/OrdersList.js +2 -1
  266. package/dist/features/orders/components/RefundHistoryTable.js +4 -1
  267. package/dist/features/orders/components/RefundRequestView.js +2 -1
  268. package/dist/features/orders/hooks/useOrders.d.ts +2 -2
  269. package/dist/features/payments/hooks/usePayments.d.ts +1 -1
  270. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -1
  271. package/dist/features/pre-orders/components/PreOrderActionsClient.js +3 -3
  272. package/dist/features/pre-orders/components/PreOrderBadge.js +2 -1
  273. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +16 -7
  274. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +32 -24
  275. package/dist/features/pre-orders/hooks/usePreOrders.d.ts +2 -2
  276. package/dist/features/products/columns/productTableColumns.js +9 -4
  277. package/dist/features/products/components/AuctionsIndexListing.js +9 -3
  278. package/dist/features/products/components/BidHistory.js +4 -4
  279. package/dist/features/products/components/CompareOverlay.js +10 -2
  280. package/dist/features/products/components/CustomFieldsEditor.js +2 -1
  281. package/dist/features/products/components/CustomSectionTabContent.js +2 -2
  282. package/dist/features/products/components/CustomSectionsEditor.js +3 -2
  283. package/dist/features/products/components/GroupSettingsPanel.js +34 -26
  284. package/dist/features/products/components/MakeOfferButton.js +6 -2
  285. package/dist/features/products/components/MakeOfferForm.js +2 -1
  286. package/dist/features/products/components/MarketplaceBundleCard.js +6 -3
  287. package/dist/features/products/components/MarketplacePrizeDrawCard.js +3 -2
  288. package/dist/features/products/components/PlaceBidForm.js +2 -1
  289. package/dist/features/products/components/PrizeDrawCollage.js +6 -2
  290. package/dist/features/products/components/PrizeDrawDetailPageView.js +6 -1
  291. package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -2
  292. package/dist/features/products/components/PrizeDrawsIndexListing.js +6 -3
  293. package/dist/features/products/components/PrizeDrawsSection.js +2 -2
  294. package/dist/features/products/components/PrizeRevealModal.js +5 -1
  295. package/dist/features/products/components/ProductDetailPageView.js +32 -16
  296. package/dist/features/products/components/ProductFeatureBadges.js +9 -9
  297. package/dist/features/products/components/ProductForm.d.ts +11 -1
  298. package/dist/features/products/components/ProductForm.js +10 -5
  299. package/dist/features/products/components/ProductGalleryClient.js +8 -4
  300. package/dist/features/products/components/ProductGradingTab.js +4 -1
  301. package/dist/features/products/components/ProductGrid.js +35 -14
  302. package/dist/features/products/components/ProductInfo.js +2 -1
  303. package/dist/features/products/components/ProductTabs.js +2 -1
  304. package/dist/features/products/components/ProductTabsShell.js +5 -1
  305. package/dist/features/products/components/ProductsIndexListing.js +32 -24
  306. package/dist/features/products/components/ProductsIndexPageView.js +2 -2
  307. package/dist/features/products/components/RelatedProducts.js +3 -3
  308. package/dist/features/products/components/ShowGroupSection.js +10 -6
  309. package/dist/features/products/components/SublistingCarouselSection.js +7 -3
  310. package/dist/features/products/components/SublistingCategorySelect.d.ts +3 -1
  311. package/dist/features/products/components/SublistingCategorySelect.js +4 -37
  312. package/dist/features/products/constants/action-defs.js +3 -3
  313. package/dist/features/products/hooks/useProductDetail.d.ts +1 -1
  314. package/dist/features/products/hooks/useRelatedProducts.d.ts +1 -1
  315. package/dist/features/promotions/components/CouponCard.js +5 -3
  316. package/dist/features/promotions/components/CouponsIndexListing.js +7 -3
  317. package/dist/features/promotions/hooks/usePromotions.d.ts +2 -2
  318. package/dist/features/promotions/repository/coupons.repository.d.ts +8 -0
  319. package/dist/features/promotions/repository/coupons.repository.js +2 -0
  320. package/dist/features/reviews/components/ReviewDetailPageView.js +3 -3
  321. package/dist/features/reviews/components/ReviewDetailShell.js +15 -3
  322. package/dist/features/reviews/components/ReviewSummary.js +4 -2
  323. package/dist/features/reviews/components/ReviewsIndexListing.js +8 -2
  324. package/dist/features/reviews/components/ReviewsList.js +1 -1
  325. package/dist/features/reviews/hooks/useReviews.d.ts +2 -2
  326. package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
  327. package/dist/features/scams/components/ScamProfileView.js +3 -3
  328. package/dist/features/scams/components/ScamRegistryView.js +6 -4
  329. package/dist/features/search/components/Search.js +9 -6
  330. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  331. package/dist/features/search/components/SearchResultsSection.js +1 -1
  332. package/dist/features/search/hooks/useSearch.d.ts +2 -2
  333. package/dist/features/seller/components/CouponInlineSelect.d.ts +22 -0
  334. package/dist/features/seller/components/CouponInlineSelect.js +103 -0
  335. package/dist/features/seller/components/GroupInlineSelect.d.ts +23 -0
  336. package/dist/features/seller/components/GroupInlineSelect.js +80 -0
  337. package/dist/features/seller/components/PhysicalLocationModal.js +2 -1
  338. package/dist/features/seller/components/PrintCenterView.js +2 -1
  339. package/dist/features/seller/components/ProductInlineSelect.d.ts +24 -0
  340. package/dist/features/seller/components/ProductInlineSelect.js +42 -0
  341. package/dist/features/seller/components/QuickProductForm.js +4 -1
  342. package/dist/features/seller/components/SellerAddressesView.js +8 -3
  343. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +6 -3
  344. package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
  345. package/dist/features/seller/components/SellerBidsView.js +7 -7
  346. package/dist/features/seller/components/SellerBundlesView.js +2 -1
  347. package/dist/features/seller/components/SellerCouponEditorView.d.ts +2 -0
  348. package/dist/features/seller/components/SellerCouponEditorView.js +15 -3
  349. package/dist/features/seller/components/SellerCouponsView.js +1 -1
  350. package/dist/features/seller/components/SellerDashboardView.js +2 -2
  351. package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
  352. package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -2
  353. package/dist/features/seller/components/SellerGroupedListingsView.js +5 -5
  354. package/dist/features/seller/components/SellerOrdersView.js +13 -10
  355. package/dist/features/seller/components/SellerPayoutMethodsView.js +5 -4
  356. package/dist/features/seller/components/SellerPayoutRequestView.js +5 -1
  357. package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -2
  358. package/dist/features/seller/components/SellerPreOrdersView.js +6 -6
  359. package/dist/features/seller/components/SellerPrizeDrawsView.js +6 -6
  360. package/dist/features/seller/components/SellerProductShell.js +1 -1
  361. package/dist/features/seller/components/SellerProductsCards.js +4 -1
  362. package/dist/features/seller/components/SellerProductsView.js +5 -5
  363. package/dist/features/seller/components/SellerReviewsView.js +7 -3
  364. package/dist/features/seller/components/SellerShippingConfigsView.js +4 -4
  365. package/dist/features/seller/components/SellerShippingView.js +1 -1
  366. package/dist/features/seller/components/SellerSidebar.js +15 -8
  367. package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
  368. package/dist/features/seller/components/SellerStorefrontView.js +2 -2
  369. package/dist/features/seller/components/SellerTemplatesView.js +7 -4
  370. package/dist/features/seller/components/SublistingInlineSelect.d.ts +19 -0
  371. package/dist/features/seller/components/SublistingInlineSelect.js +83 -0
  372. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  373. package/dist/features/seller/components/index.d.ts +8 -0
  374. package/dist/features/seller/components/index.js +4 -0
  375. package/dist/features/seller/hooks/useSellerPayouts.d.ts +3 -3
  376. package/dist/features/seller/hooks/useSellerStore.d.ts +6 -6
  377. package/dist/features/seller/hooks/useSellerStorefront.d.ts +2 -2
  378. package/dist/features/shell/FormShell.js +10 -2
  379. package/dist/features/shell/QuickFormDrawer.js +5 -5
  380. package/dist/features/shell/StepForm.js +6 -6
  381. package/dist/features/site-settings/components/ActionPermissionsManager.js +8 -4
  382. package/dist/features/site-settings/components/NavPermissionsManager.js +7 -4
  383. package/dist/features/stores/components/InteractiveStoreCard.js +5 -1
  384. package/dist/features/stores/components/StoreAboutView.js +4 -1
  385. package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +2 -1
  386. package/dist/features/stores/components/StoreAddressSelectorCreate.js +5 -31
  387. package/dist/features/stores/components/StoreAuctionsListing.js +6 -3
  388. package/dist/features/stores/components/StoreGuideHubView.js +5 -2
  389. package/dist/features/stores/components/StoreHeader.js +8 -1
  390. package/dist/features/stores/components/StorePreOrdersListing.js +6 -3
  391. package/dist/features/stores/components/StoreProductsListing.js +6 -3
  392. package/dist/features/stores/components/StoreReviewsListing.js +8 -2
  393. package/dist/features/stores/components/StoresIndexListing.js +12 -6
  394. package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +1 -1
  395. package/dist/features/stores/hooks/useStores.d.ts +6 -6
  396. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +7 -1
  397. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +2 -1
  398. package/dist/features/wishlist/components/WishlistPage.js +2 -1
  399. package/dist/features/wishlist/hooks/useUserWishlist.d.ts +15 -15
  400. package/dist/features/wishlist/hooks/useWishlist.d.ts +1 -1
  401. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  402. package/dist/index.d.ts +10 -0
  403. package/dist/index.js +13 -1
  404. package/dist/next/components/GlobalError.js +2 -2
  405. package/dist/next/routing/route-map.d.ts +2 -0
  406. package/dist/next/routing/route-map.js +1 -0
  407. package/dist/react/ErrorBoundary.js +2 -2
  408. package/dist/styles.css +2 -1
  409. package/dist/tailwind-utilities.css +1 -1
  410. package/dist/ui/DataTable.js +17 -16
  411. package/dist/ui/components/DateInput.js +2 -2
  412. package/dist/ui/components/DetailPageGallery.js +4 -1
  413. package/dist/ui/components/DetailPageTabs.js +6 -2
  414. package/dist/ui/components/ImageLightbox.js +5 -3
  415. package/dist/ui/components/Input.js +6 -3
  416. package/dist/ui/components/Layout.d.ts +4 -0
  417. package/dist/ui/components/Layout.js +1 -1
  418. package/dist/ui/components/Layout.style.css +1 -0
  419. package/dist/ui/components/ListingFilterDrawer.js +4 -1
  420. package/dist/ui/components/ListingLayout.js +9 -8
  421. package/dist/ui/components/ListingToolbar.js +5 -1
  422. package/dist/ui/components/PaginatedSelect.d.ts +1 -2
  423. package/dist/ui/components/PaginatedSelect.js +1 -2
  424. package/dist/ui/components/Radio.js +1 -1
  425. package/dist/ui/components/Select.js +2 -1
  426. package/dist/ui/components/Slider.js +1 -1
  427. package/dist/ui/components/VacationBanner.js +2 -1
  428. package/dist/ui/components/surface-tokens.d.ts +1 -0
  429. package/dist/ui/components/surface-tokens.js +1 -0
  430. package/package.json +11 -2
@@ -3,14 +3,22 @@ import { Aside, Button, Div, Heading, Row, Span, Text } from "../../../ui";
3
3
  import { formatCurrency } from "../../../utils/number.formatter";
4
4
  import { THEME_CONSTANTS } from "../../../tokens";
5
5
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
6
+ const __P = {
7
+ p4: "p-4",
8
+ };
9
+ const __O = {
10
+ hidden: "overflow-hidden",
11
+ yAuto: "overflow-y-auto",
12
+ };
13
+ const CLS_REMOVE_BTN = "self-start text-zinc-400 dark:text-zinc-400 transition hover:text-red-500";
6
14
  export function CartItemRow({ item, onQtyChange, onRemove, href, isOutOfStock = false }) {
7
- return (_jsxs(Div, { surface: "card", padding: "sm", className: `flex gap-4 transition-opacity ${isOutOfStock ? "opacity-60" : ""}`, children: [_jsx(Div, { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-neutral-100 dark:bg-slate-800", children: item.meta.image && (_jsx(Div, { role: "img", "aria-label": item.meta.title, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${item.meta.image})` } })) }), _jsxs(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsxs(Div, { className: "flex items-start gap-1.5", children: [href ? (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", className: `font-medium text-neutral-900 dark:text-zinc-100 hover:underline underline-offset-2 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.meta.title })) : (_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.meta.title })), isOutOfStock && (_jsx(Span, { className: "flex-shrink-0 rounded bg-error-surface px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-error", children: "Out of Stock" }))] }), item.meta.attributes &&
15
+ return (_jsxs(Div, { surface: "card", padding: "sm", className: `flex gap-4 transition-opacity ${isOutOfStock ? "opacity-60" : ""}`, children: [_jsx(Div, { className: `h-20 w-20 flex-shrink-0 ${__O.hidden} rounded-lg bg-neutral-100 dark:bg-slate-800`, children: item.meta.image && (_jsx(Div, { role: "img", "aria-label": item.meta.title, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${item.meta.image})` } })) }), _jsxs(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsxs(Div, { className: "flex items-start gap-1.5", children: [href ? (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", className: `font-medium text-neutral-900 dark:text-zinc-100 hover:underline underline-offset-2 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.meta.title })) : (_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.meta.title })), isOutOfStock && (_jsx(Span, { weight: "semibold", className: "flex-shrink-0 rounded bg-error-surface px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-error", children: "Out of Stock" }))] }), item.meta.attributes &&
8
16
  Object.keys(item.meta.attributes).length > 0 && (_jsx(Text, { className: "text-xs text-neutral-500 dark:text-zinc-400", children: Object.entries(item.meta.attributes)
9
17
  .map(([k, v]) => `${k}: ${v}`)
10
- .join(", ") })), _jsxs(Row, { justify: "between", children: [_jsx(Text, { className: "font-semibold text-neutral-900 dark:text-zinc-100", children: formatCurrency(item.meta.price * item.quantity, item.meta.currency) }), onQtyChange && !isOutOfStock && (_jsxs(Row, { className: "gap-2", children: [_jsx(Button, { onClick: () => onQtyChange(item.id, item.quantity - 1), disabled: item.quantity <= 1, variant: "outline", size: "sm", className: "flex h-7 w-7 items-center justify-center rounded-full border border-neutral-200 dark:border-slate-600 text-sm disabled:opacity-40", children: "\u2212" }), _jsx(Span, { className: "min-w-[1.5rem] text-center text-sm", children: item.quantity }), _jsx(Button, { onClick: () => onQtyChange(item.id, item.quantity + 1), variant: "outline", size: "sm", className: "flex h-7 w-7 items-center justify-center rounded-full border border-neutral-200 dark:border-slate-600 text-sm", children: "+" })] })), isOutOfStock && (_jsxs(Span, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: ["Qty: ", item.quantity] }))] })] }), onRemove && (_jsx(Button, { onClick: () => onRemove(item.id), variant: "ghost", size: "sm", "aria-label": ACTIONS.CART["remove-item"].ariaLabel, className: "self-start text-zinc-400 dark:text-zinc-400 transition hover:text-red-500", children: "\u2715" }))] }));
18
+ .join(", ") })), _jsxs(Row, { justify: "between", children: [_jsx(Text, { className: "font-semibold text-neutral-900 dark:text-zinc-100", children: formatCurrency(item.meta.price * item.quantity, item.meta.currency) }), onQtyChange && !isOutOfStock && (_jsxs(Row, { className: "gap-2", children: [_jsx(Button, { onClick: () => onQtyChange(item.id, item.quantity - 1), disabled: item.quantity <= 1, variant: "outline", size: "sm", className: "flex h-7 w-7 items-center justify-center rounded-full border border-neutral-200 dark:border-slate-600 text-sm disabled:opacity-40", children: "\u2212" }), _jsx(Span, { size: "sm", className: "min-w-[1.5rem] text-center", children: item.quantity }), _jsx(Button, { onClick: () => onQtyChange(item.id, item.quantity + 1), variant: "outline", size: "sm", className: "flex h-7 w-7 items-center justify-center rounded-full border border-neutral-200 dark:border-slate-600 text-sm", children: "+" })] })), isOutOfStock && (_jsxs(Span, { size: "xs", className: "text-zinc-400 dark:text-zinc-400", children: ["Qty: ", item.quantity] }))] })] }), onRemove && (_jsx(Button, { onClick: () => onRemove(item.id), variant: "ghost", size: "sm", "aria-label": ACTIONS.CART["remove-item"].ariaLabel, className: CLS_REMOVE_BTN, children: "\u2715" }))] }));
11
19
  }
12
20
  export function CartDrawer({ isOpen, onClose, items, subtotal = 0, currency, isLoading, onQtyChange, onRemove, onCheckout, labels = {}, }) {
13
21
  if (!isOpen)
14
22
  return null;
15
- return (_jsxs(_Fragment, { children: [_jsx(Div, { role: "presentation", className: "fixed inset-0 z-40 bg-black/40", onClick: onClose }), _jsxs(Aside, { className: "fixed inset-y-0 right-0 z-50 flex w-full max-w-sm flex-col bg-white dark:bg-slate-900 shadow-xl", children: [_jsxs(Row, { justify: "between", className: "border-b border-neutral-200 dark:border-slate-700 p-4", children: [_jsx(Heading, { level: 2, className: "text-lg font-semibold", children: labels.title ?? "Cart" }), _jsx(Button, { onClick: onClose, variant: "ghost", size: "sm", "aria-label": "Close cart", className: "text-neutral-500 dark:text-zinc-400 hover:text-neutral-900 dark:hover:text-zinc-100", children: "\u2715" })] }), _jsx(Div, { className: "flex-1 overflow-y-auto p-4 space-y-3", children: isLoading ? (_jsx(Div, { className: "flex justify-center py-12", children: _jsx(Div, { className: "h-8 w-8 animate-spin rounded-full border-2 border-neutral-300 dark:border-slate-600 border-t-neutral-800 dark:border-t-zinc-200" }) })) : items.length === 0 ? (_jsx(Text, { className: "py-12 text-center text-sm text-neutral-500 dark:text-zinc-400", children: labels.empty ?? "Your cart is empty" })) : (items.map((item) => (_jsx(CartItemRow, { item: item, onQtyChange: onQtyChange, onRemove: onRemove }, item.id)))) }), items.length > 0 && (_jsxs(Div, { className: "border-t border-neutral-200 dark:border-slate-700 p-4 space-y-4", children: [_jsxs(Row, { justify: "between", className: "text-sm", children: [_jsx(Span, { className: "text-neutral-600 dark:text-zinc-300", children: labels.subtotal ?? "Subtotal" }), _jsx(Span, { className: "font-semibold", children: formatCurrency(subtotal, currency) })] }), onCheckout && (_jsx(Button, { onClick: onCheckout, variant: "primary", className: "w-full rounded-xl bg-neutral-900 py-3 text-sm font-semibold text-white transition hover:bg-neutral-800", children: labels.checkout ?? ACTIONS.CART["checkout"].label }))] }))] })] }));
23
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { role: "presentation", className: "fixed inset-0 z-40 bg-black/40", onClick: onClose }), _jsxs(Aside, { className: "fixed inset-y-0 right-0 z-50 flex w-full max-w-sm flex-col bg-white dark:bg-slate-900 shadow-xl", children: [_jsxs(Row, { justify: "between", className: `border-b border-neutral-200 dark:border-slate-700 ${__P.p4}`, children: [_jsx(Heading, { level: 2, className: "text-lg font-semibold", children: labels.title ?? "Cart" }), _jsx(Button, { onClick: onClose, variant: "ghost", size: "sm", "aria-label": "Close cart", className: "text-neutral-500 dark:text-zinc-400 hover:text-neutral-900 dark:hover:text-zinc-100", children: "\u2715" })] }), _jsx(Div, { className: `flex-1 ${__O.yAuto} ${__P.p4} space-y-3`, children: isLoading ? (_jsx(Div, { className: "flex justify-center py-12", children: _jsx(Div, { className: "h-8 w-8 animate-spin rounded-full border-2 border-neutral-300 dark:border-slate-600 border-t-neutral-800 dark:border-t-zinc-200" }) })) : items.length === 0 ? (_jsx(Text, { className: "py-12 text-center text-sm text-neutral-500 dark:text-zinc-400", children: labels.empty ?? "Your cart is empty" })) : (items.map((item) => (_jsx(CartItemRow, { item: item, onQtyChange: onQtyChange, onRemove: onRemove }, item.id)))) }), items.length > 0 && (_jsxs(Div, { className: `border-t border-neutral-200 dark:border-slate-700 ${__P.p4} space-y-4`, children: [_jsxs(Row, { justify: "between", className: "text-sm", children: [_jsx(Span, { className: "text-neutral-600 dark:text-zinc-300", children: labels.subtotal ?? "Subtotal" }), _jsx(Span, { weight: "semibold", children: formatCurrency(subtotal, currency) })] }), onCheckout && (_jsx(Button, { onClick: onCheckout, variant: "primary", className: "w-full rounded-xl bg-neutral-900 py-3 text-sm font-semibold text-white transition hover:bg-neutral-800", children: labels.checkout ?? ACTIONS.CART["checkout"].label }))] }))] })] }));
16
24
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Heading } from "../../../ui";
2
+ import { Div, Heading } from "../../../ui";
3
3
  export function CartSummary({ renderBreakdown, renderTotal, renderCheckoutAction, renderPromoCode, renderContinueShopping, labels = {}, className = "", }) {
4
- return (_jsxs("div", { className: `space-y-4 ${className}`, "data-section": "cartsummary-div-260", children: [labels.title && (_jsx(Heading, { level: 2, className: "text-base font-bold", variant: "none", children: labels.title })), renderBreakdown?.(), renderPromoCode?.(), renderTotal?.(), renderCheckoutAction?.(), renderContinueShopping?.()] }));
4
+ return (_jsxs(Div, { className: `space-y-4 ${className}`, children: [labels.title && (_jsx(Heading, { level: 2, className: "text-base font-bold", variant: "none", children: labels.title })), renderBreakdown?.(), renderPromoCode?.(), renderTotal?.(), renderCheckoutAction?.(), renderContinueShopping?.()] }));
5
5
  }
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Div } from "../../../ui";
2
3
  export function CheckoutOtpModal({ isOpen, title, onClose, renderContainer, renderBody, className = "", }) {
3
4
  if (!isOpen)
4
5
  return null;
@@ -6,6 +7,6 @@ export function CheckoutOtpModal({ isOpen, title, onClose, renderContainer, rend
6
7
  isOpen,
7
8
  title,
8
9
  onClose,
9
- children: _jsx("div", { className: className, "data-section": "checkoutotpmodal-div-261", children: renderBody() }),
10
+ children: _jsx(Div, { className: className, children: renderBody() }),
10
11
  }) }));
11
12
  }
@@ -12,6 +12,6 @@ export declare function useCart(userIdOrSession: string, opts?: UseCartOptions):
12
12
  itemCount: number;
13
13
  isLoading: boolean;
14
14
  error: Error | null;
15
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<CartData, Error>>;
15
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<CartData>, Error>>;
16
16
  };
17
17
  export {};
@@ -4,5 +4,5 @@ interface UseCartQueryOptions<TData> {
4
4
  enabled?: boolean;
5
5
  initialData?: TData;
6
6
  }
7
- export declare function useCartQuery<TData = unknown>(options: UseCartQueryOptions<TData>): import("@tanstack/react-query").UseQueryResult<import("@tanstack/query-core").NoInfer<TData>, Error>;
7
+ export declare function useCartQuery<TData = unknown>(options: UseCartQueryOptions<TData>): import("@tanstack/react-query").UseQueryResult<NoInfer<TData>, Error>;
8
8
  export {};
@@ -8,7 +8,7 @@ interface UseCheckoutReadQueriesOptions<TAddress, TCart> {
8
8
  initialCart?: TCart;
9
9
  }
10
10
  export declare function useCheckoutReadQueries<TAddress = unknown, TCart = unknown>(options: UseCheckoutReadQueriesOptions<TAddress, TCart>): {
11
- addressQuery: import("@tanstack/react-query").UseQueryResult<TAddress[], Error>;
12
- cartQuery: import("@tanstack/react-query").UseQueryResult<import("@tanstack/query-core").NoInfer<TCart>, Error>;
11
+ addressQuery: import("@tanstack/react-query").UseQueryResult<NoInfer<TAddress[]>, Error>;
12
+ cartQuery: import("@tanstack/react-query").UseQueryResult<NoInfer<TCart>, Error>;
13
13
  };
14
14
  export {};
@@ -5,9 +5,9 @@ interface UseOrderOptions<TOrder> {
5
5
  initialData?: TOrder | null;
6
6
  }
7
7
  export declare function useOrder<TOrder = unknown>(orderId: string | null, options?: UseOrderOptions<TOrder>): {
8
- order: NonNullable<import("@tanstack/query-core").NoInfer<TOrder | null>> | null;
8
+ order: NonNullable<NoInfer<TOrder | null>> | null;
9
9
  isLoading: boolean;
10
10
  error: Error | null;
11
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").NoInfer<TOrder | null>, Error>>;
11
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<TOrder | null>, Error>>;
12
12
  };
13
13
  export {};
@@ -2,8 +2,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import Link from "next/link";
3
3
  import { categoriesRepository, productRepository, } from "../../../repositories";
4
4
  import { ROUTES } from "../../../next";
5
- import { Container, Heading, Main, Section, Text } from "../../../ui";
5
+ import { Container, Div, Heading, Main, Nav, Section, Span, Text } from "../../../ui";
6
6
  import { BrandDetailTabs } from "./BrandDetailTabs";
7
+ const __O = {
8
+ hidden: "overflow-hidden",
9
+ };
7
10
  export async function BrandDetailPageView({ slug, initialBrand }) {
8
11
  const brand = (initialBrand ?? (await categoriesRepository
9
12
  .getCategoryBySlug(slug)
@@ -81,5 +84,5 @@ export async function BrandDetailPageView({ slug, initialBrand }) {
81
84
  counts.preOrders +
82
85
  counts.prizeDraws +
83
86
  counts.bundles;
84
- return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative overflow-hidden ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover", style: { backgroundImage: `url(${coverImage})` } }), _jsx("div", { className: "absolute inset-0 bg-black/55" })] })), !hasCover && (_jsx("div", { className: "absolute inset-0 opacity-10", style: { backgroundColor: brandColor } })), _jsxs("div", { className: `relative z-10 max-w-7xl mx-auto px-4 ${hasCover ? "py-12" : "py-8"}`, children: [_jsxs("nav", { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx("span", { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.BRANDS ?? "/brands"), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Brands" }), _jsx("span", { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx("span", { className: hasCover ? "text-white font-medium" : "text-zinc-900 dark:text-zinc-100 font-medium", children: brand?.name ?? slug })] }), _jsxs("div", { className: "flex items-center gap-4 mb-3", children: [brand?.display?.icon && (_jsx("span", { className: `text-5xl leading-none ${!hasCover ? "" : ""}`, children: brand.display.icon })), _jsxs(_Fragment, { children: [_jsx(Heading, { level: 1, className: `text-3xl md:text-4xl font-bold ${hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-50"}`, children: brand?.name ?? slug }), brand?.description && typeof brand.description === "string" && !brand.description.startsWith("{") && (_jsx(Text, { className: `text-base max-w-2xl mt-1 ${hasCover ? "text-white/80" : "text-zinc-600 dark:text-zinc-400"}`, children: brand.description }))] })] }), _jsxs("div", { className: "flex flex-wrap gap-2 mt-3", children: [counts.products > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, children: [counts.products.toLocaleString(), " ", counts.products === 1 ? "product" : "products"] })), counts.auctions > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}`, children: [counts.auctions.toLocaleString(), " ", counts.auctions === 1 ? "auction" : "auctions"] })), counts.preOrders > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"}`, children: [counts.preOrders.toLocaleString(), " ", counts.preOrders === 1 ? "pre-order" : "pre-orders"] })), totalItems === 0 && (_jsx("span", { className: `text-sm ${hasCover ? "text-white/60" : "text-zinc-400"}`, children: "No items listed yet" }))] })] })] }), _jsx(Section, { className: "py-6", children: _jsx(Container, { size: "xl", children: brandName ? (_jsx(BrandDetailTabs, { brandName: brandName, initialProductsData: productsResult ?? undefined, initialBundles: brandBundles, counts: counts })) : (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "Brand not found." })) }) })] }));
87
+ return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative ${__O.hidden} ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover", style: { backgroundImage: `url(${coverImage})` } }), _jsx(Div, { className: "absolute inset-0 bg-black/55" })] })), !hasCover && (_jsx("div", { className: "absolute inset-0 opacity-10", style: { backgroundColor: brandColor } })), _jsxs(Div, { className: `relative z-10 max-w-7xl mx-auto px-4 ${hasCover ? "py-12" : "py-8"}`, children: [_jsxs(Nav, { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.BRANDS ?? "/brands"), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Brands" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Span, { weight: "medium", className: hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-100", children: brand?.name ?? slug })] }), _jsxs(Div, { className: "flex items-center gap-4 mb-3", children: [brand?.display?.icon && (_jsx(Span, { className: "text-5xl leading-none", children: brand.display.icon })), _jsxs(_Fragment, { children: [_jsx(Heading, { level: 1, className: `text-3xl md:text-4xl font-bold ${hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-50"}`, children: brand?.name ?? slug }), brand?.description && typeof brand.description === "string" && !brand.description.startsWith("{") && (_jsx(Text, { className: `text-base max-w-2xl mt-1 ${hasCover ? "text-white/80" : "text-zinc-600 dark:text-zinc-400"}`, children: brand.description }))] })] }), _jsxs(Div, { className: "flex flex-wrap gap-2 mt-3", children: [counts.products > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, children: [counts.products.toLocaleString(), " ", counts.products === 1 ? "product" : "products"] })), counts.auctions > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}`, children: [counts.auctions.toLocaleString(), " ", counts.auctions === 1 ? "auction" : "auctions"] })), counts.preOrders > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"}`, children: [counts.preOrders.toLocaleString(), " ", counts.preOrders === 1 ? "pre-order" : "pre-orders"] })), totalItems === 0 && (_jsx(Span, { size: "sm", className: hasCover ? "text-white/60" : "text-zinc-400", children: "No items listed yet" }))] })] })] }), _jsx(Section, { className: "py-6", children: _jsx(Container, { size: "xl", children: brandName ? (_jsx(BrandDetailTabs, { brandName: brandName, initialProductsData: productsResult ?? undefined, initialBundles: brandBundles, counts: counts })) : (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "Brand not found." })) }) })] }));
85
88
  }
@@ -1,12 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
+ import { Div } from "../../../ui";
4
5
  import { CategoryProductsListing } from "./CategoryProductsListing";
5
6
  import { AuctionsIndexListing } from "../../products/components/AuctionsIndexListing";
6
7
  import { PreOrdersIndexListing } from "../../pre-orders/components/PreOrdersIndexListing";
7
8
  import { PrizeDrawsIndexListing } from "../../products/components/PrizeDrawsIndexListing";
8
9
  import { CategoryBundlesListing } from "./CategoryBundlesListing";
9
10
  import { CATEGORY_PAGE_TABS } from "../../products/constants/listing-tabs";
11
+ const __O = {
12
+ xAuto: "overflow-x-auto",
13
+ };
10
14
  function tabLabel(label, count) {
11
15
  if (!count)
12
16
  return label;
@@ -44,7 +48,7 @@ export function BrandDetailTabs({ brandName, initialProductsData, initialBundles
44
48
  default: return undefined;
45
49
  }
46
50
  };
47
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "flex border-b border-zinc-200 dark:border-slate-700 mb-6 overflow-x-auto", children: visibleTabs.map((t) => (_jsx("button", { type: "button", onClick: () => setActiveTab(t.id), className: `px-5 py-2.5 text-sm font-medium whitespace-nowrap transition-colors -mb-px border-b-2 ${activeTab === t.id
51
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { className: `flex border-b border-zinc-200 dark:border-slate-700 mb-6 ${__O.xAuto}`, children: visibleTabs.map((t) => (_jsx("button", { type: "button", onClick: () => setActiveTab(t.id), className: `px-5 py-2.5 text-sm font-medium whitespace-nowrap transition-colors -mb-px border-b-2 ${activeTab === t.id
48
52
  ? "border-primary text-primary"
49
53
  : "border-transparent text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100"}`, children: tabLabel(t.label, countFor(t.id)) }, t.id))) }), activeTab === "products" && (_jsx(CategoryProductsListing, { categorySlug: "", brandName: brandName, initialData: initialProductsData })), activeTab === "auctions" && (_jsx(AuctionsIndexListing, { brandName: brandName })), activeTab === "pre-orders" && (_jsx(PreOrdersIndexListing, { brandName: brandName })), activeTab === "prize-draws" && (_jsx(PrizeDrawsIndexListing, { brandName: brandName })), activeTab === "bundles" && (_jsx(CategoryBundlesListing, { initialBundles: initialBundles, brandName: brandName }))] }));
50
54
  }
@@ -1,11 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Badge, Container, Div, Heading, Main, Row, Section, Stack, Text, } from "../../../ui";
2
+ import { Badge, Container, Div, Heading, Li, Main, Row, Section, Span, Stack, Text, Ul, } from "../../../ui";
3
3
  import { formatCurrency } from "../../../utils/number.formatter";
4
4
  import Link from "next/link";
5
5
  import { BUNDLE_COPY, BUNDLE_STOCK_VARIANT, } from "../../../_internal/shared/features/categories/bundle-copy";
6
6
  import { BundleBuyNowCta } from "./BundleBuyNowCta";
7
7
  import { BundleCollage } from "./BundleCollage";
8
8
  import { ROUTES } from "../../../next/routing/route-map";
9
+ const __O = {
10
+ hidden: "overflow-hidden",
11
+ };
9
12
  const STOCK_BADGE_TEXT = {
10
13
  in_stock: BUNDLE_COPY.stockBadge.in_stock,
11
14
  out_of_stock: BUNDLE_COPY.stockBadge.out_of_stock,
@@ -18,7 +21,7 @@ export function BundleDetailView({ bundle, members = [], onBuyNow, }) {
18
21
  const priceLabel = bundle.bundlePriceInPaise
19
22
  ? formatCurrency(bundle.bundlePriceInPaise / 100, "INR")
20
23
  : BUNDLE_COPY.detail.priceFallback;
21
- return (_jsx(Main, { children: _jsx(Section, { className: "py-10", children: _jsx(Container, { size: "xl", children: _jsxs(Stack, { gap: "lg", children: [_jsxs(Row, { gap: "lg", align: "start", className: "flex-col md:flex-row", children: [_jsx(Div, { className: "w-full md:w-2/5", children: members.length > 0 ? (_jsx(BundleCollage, { members: members })) : (_jsx(Div, { className: "aspect-video w-full overflow-hidden rounded-2xl bg-zinc-100 dark:bg-zinc-800", children: cover ? (
24
+ return (_jsx(Main, { children: _jsx(Section, { className: "py-10", children: _jsx(Container, { size: "xl", children: _jsxs(Stack, { gap: "lg", children: [_jsxs(Row, { gap: "lg", align: "start", className: "flex-col md:flex-row", children: [_jsx(Div, { className: "w-full md:w-2/5", children: members.length > 0 ? (_jsx(BundleCollage, { members: members })) : (_jsx(Div, { className: `aspect-video w-full ${__O.hidden} rounded-2xl bg-zinc-100 dark:bg-zinc-800`, children: cover ? (
22
25
  // eslint-disable-next-line @next/next/no-img-element, lir/no-raw-media-elements
23
- _jsx("img", { src: cover, alt: bundle.name, className: "h-full w-full object-cover" })) : (_jsx(Div, { className: "flex h-full w-full items-center justify-center text-6xl", children: PLACEHOLDER_EMOJI })) })) }), _jsxs(Stack, { gap: "md", className: "flex-1", children: [_jsx(Heading, { level: 1, className: "text-3xl font-semibold text-zinc-900 dark:text-zinc-100", children: bundle.name }), _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Text, { size: "lg", weight: "bold", children: priceLabel }), _jsxs(Text, { size: "sm", color: "muted", children: ["\u00B7 ", BUNDLE_COPY.detail.itemCount(memberCount)] }), _jsx(Badge, { variant: BUNDLE_STOCK_VARIANT[stock], children: STOCK_BADGE_TEXT[stock] })] }), bundle.description && (_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-[var(--appkit-color-text-muted)]", children: BUNDLE_COPY.detailDescriptionHeading }), _jsx(Text, { className: "whitespace-pre-line", children: bundle.description })] })), onBuyNow ? (_jsx(BundleBuyNowCta, { bundleSlug: bundle.slug, outOfStock: stock === "out_of_stock", onBuyNow: onBuyNow })) : (_jsxs(Div, { className: "rounded-xl border border-dashed border-zinc-300 bg-zinc-50 p-4 text-sm dark:border-zinc-700 dark:bg-zinc-900", "aria-live": "polite", children: [_jsx(Text, { weight: "semibold", className: "mb-1 block", children: BUNDLE_COPY.detail.ctaDisabled }), _jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.detail.ctaHint })] }))] })] }), _jsxs(Stack, { gap: "md", children: [_jsx(Heading, { level: 2, className: "text-xl font-semibold text-zinc-900 dark:text-zinc-100", children: BUNDLE_COPY.detailItemsHeading }), members.length === 0 ? (_jsx(Text, { color: "muted", children: BUNDLE_COPY.detail.emptyMembers })) : (_jsx("ul", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: members.map((p, i) => (_jsxs("li", { className: "flex items-center gap-2 rounded-lg border border-zinc-100 dark:border-zinc-800 px-3 py-2 text-sm", children: [_jsxs("span", { className: "text-xs font-semibold text-zinc-400 w-5", children: ["#", i + 1] }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRODUCT_DETAIL?.(p.slug ?? p.id) ?? "#"), className: "flex-1 truncate font-medium hover:underline hover:text-primary", children: p.title })] }, p.id))) }))] })] }) }) }) }));
26
+ _jsx("img", { src: cover, alt: bundle.name, className: "h-full w-full object-cover" })) : (_jsx(Div, { className: "flex h-full w-full items-center justify-center text-6xl", children: PLACEHOLDER_EMOJI })) })) }), _jsxs(Stack, { gap: "md", className: "flex-1", children: [_jsx(Heading, { level: 1, className: "text-3xl font-semibold text-zinc-900 dark:text-zinc-100", children: bundle.name }), _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Text, { size: "lg", weight: "bold", children: priceLabel }), _jsxs(Text, { size: "sm", color: "muted", children: ["\u00B7 ", BUNDLE_COPY.detail.itemCount(memberCount)] }), _jsx(Badge, { variant: BUNDLE_STOCK_VARIANT[stock], children: STOCK_BADGE_TEXT[stock] })] }), bundle.description && (_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-[var(--appkit-color-text-muted)]", children: BUNDLE_COPY.detailDescriptionHeading }), _jsx(Text, { className: "whitespace-pre-line", children: bundle.description })] })), onBuyNow ? (_jsx(BundleBuyNowCta, { bundleSlug: bundle.slug, outOfStock: stock === "out_of_stock", onBuyNow: onBuyNow })) : (_jsxs(Div, { className: "rounded-xl border border-dashed border-zinc-300 bg-zinc-50 p-4 text-sm dark:border-zinc-700 dark:bg-zinc-900", "aria-live": "polite", children: [_jsx(Text, { weight: "semibold", className: "mb-1 block", children: BUNDLE_COPY.detail.ctaDisabled }), _jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.detail.ctaHint })] }))] })] }), _jsxs(Stack, { gap: "md", children: [_jsx(Heading, { level: 2, className: "text-xl font-semibold text-zinc-900 dark:text-zinc-100", children: BUNDLE_COPY.detailItemsHeading }), members.length === 0 ? (_jsx(Text, { color: "muted", children: BUNDLE_COPY.detail.emptyMembers })) : (_jsx(Ul, { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: members.map((p, i) => (_jsxs(Li, { className: "flex items-center gap-2 rounded-lg border border-zinc-100 dark:border-zinc-800 px-3 py-2 text-sm", children: [_jsxs(Span, { size: "xs", weight: "semibold", className: "text-zinc-400 w-5", children: ["#", i + 1] }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRODUCT_DETAIL?.(p.slug ?? p.id) ?? "#"), className: "flex-1 truncate font-medium hover:underline hover:text-primary", children: p.title })] }, p.id))) }))] })] }) }) }) }));
24
27
  }
@@ -15,6 +15,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  */
16
16
  import { useCallback } from "react";
17
17
  import { Div, Input, Row, Select, Stack, Text } from "../../../ui";
18
+ import { CategoryInlineSelect } from "../../seller/components/CategoryInlineSelect";
19
+ import { BrandInlineSelect } from "../../seller/components/BrandInlineSelect";
18
20
  import { BUNDLE_MAX_ITEMS } from "../../../_internal/shared/features/categories/bundle-config";
19
21
  import { BUNDLE_COPY } from "../../../_internal/shared/features/categories/bundle-copy";
20
22
  const DEFAULT_DYNAMIC_RULE = {
@@ -39,7 +41,7 @@ export function BundleDynamicRuleEditor({ value, onChange, disabled = false, })
39
41
  const patch = useCallback((next) => onChange({ ...rule, ...next }), [rule, onChange]);
40
42
  const patchFilter = useCallback((next) => onChange({ ...rule, filter: { ...rule.filter, ...next } }), [rule, onChange]);
41
43
  const tagsValue = (rule.filter.tags ?? []).join(", ");
42
- return (_jsxs(Stack, { gap: "md", children: [_jsxs(Row, { gap: "sm", align: "center", justify: "between", className: "flex-wrap", children: [_jsx(Text, { size: "sm", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.title }), _jsx(Text, { size: "xs", color: "muted", children: BUNDLE_COPY.adminEditor.dynamic.hint })] }), _jsxs(Div, { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.categorySlug }), _jsx(Input, { type: "text", value: rule.filter.categorySlug ?? "", onChange: (e) => patchFilter({ categorySlug: e.target.value.trim() || undefined }), placeholder: "category-action-figures", disabled: disabled })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.brandSlug }), _jsx(Input, { type: "text", value: rule.filter.brandSlug ?? "", onChange: (e) => patchFilter({ brandSlug: e.target.value.trim() || undefined }), placeholder: "brand-bandai", disabled: disabled })] })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.tags }), _jsx(Input, { type: "text", value: tagsValue, onChange: (e) => {
44
+ return (_jsxs(Stack, { gap: "md", children: [_jsxs(Row, { gap: "sm", align: "center", justify: "between", className: "flex-wrap", children: [_jsx(Text, { size: "sm", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.title }), _jsx(Text, { size: "xs", color: "muted", children: BUNDLE_COPY.adminEditor.dynamic.hint })] }), _jsxs(Div, { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.categorySlug }), _jsx(CategoryInlineSelect, { value: rule.filter.categorySlug ?? "", onChange: (id) => patchFilter({ categorySlug: id || undefined }), disabled: disabled, placeholder: "Filter by category\u2026" })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.brandSlug }), _jsx(BrandInlineSelect, { value: rule.filter.brandSlug ?? "", onChange: (id) => patchFilter({ brandSlug: id || undefined }), disabled: disabled, placeholder: "Filter by brand\u2026" })] })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "semibold", children: BUNDLE_COPY.adminEditor.dynamic.fields.tags }), _jsx(Input, { type: "text", value: tagsValue, onChange: (e) => {
43
45
  const parsed = e.target.value
44
46
  .split(",")
45
47
  .map((t) => t.trim())
@@ -17,12 +17,19 @@ import { useCallback, useEffect, useMemo, useState } from "react";
17
17
  import { Badge, Button, Checkbox, Div, Input, Row, Stack, Text } from "../../../ui";
18
18
  import { BUNDLE_MAX_ITEMS, BUNDLE_MIN_ITEMS, } from "../../../_internal/shared/features/categories/bundle-config";
19
19
  import { BUNDLE_COPY } from "../../../_internal/shared/features/categories/bundle-copy";
20
+ const __P = {
21
+ p3: "p-3",
22
+ };
23
+ const __O = {
24
+ yAuto: "overflow-y-auto",
25
+ };
20
26
  const SEARCH_DEBOUNCE_MS = 250;
27
+ const CLS_ROW_SELECTED = "bg-blue-50 dark:bg-blue-950";
21
28
  function renderBundleSelectedChips(props) {
22
29
  const { value, metadata, remove } = props;
23
30
  if (value.length === 0)
24
31
  return null;
25
- return (_jsx(Div, { className: "flex flex-wrap gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-900", children: value.map((id) => {
32
+ return (_jsx(Div, { className: `flex flex-wrap gap-2 rounded-lg border border-zinc-200 bg-zinc-50 ${__P.p3} dark:border-zinc-700 dark:bg-zinc-900`, children: value.map((id) => {
26
33
  const meta = metadata[id];
27
34
  const label = meta?.title ?? id;
28
35
  return (_jsxs(Row, { gap: "xs", align: "center", className: "rounded-full border border-zinc-300 bg-white px-3 py-1 text-xs dark:border-zinc-600 dark:bg-zinc-800", children: [_jsx(Text, { size: "xs", className: "max-w-[200px] truncate", children: label }), _jsx(Button, { variant: "ghost", size: "sm", "aria-label": BUNDLE_COPY.picker.removeAria(label), onClick: () => remove(id), children: "\u00D7" })] }, id));
@@ -30,10 +37,10 @@ function renderBundleSelectedChips(props) {
30
37
  }
31
38
  function renderBundleSearchResults(props) {
32
39
  const { results, selectedSet, value, maxItems, toggle, isSearching, searchError, debouncedQuery } = props;
33
- return (_jsxs(_Fragment, { children: [searchError && _jsx(Text, { size: "sm", color: "danger", children: searchError }), isSearching && _jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.picker.searchingHint }), !isSearching && debouncedQuery.length >= 2 && results.length === 0 && !searchError && (_jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.picker.noMatches(debouncedQuery) })), results.length > 0 && (_jsx(Div, { className: "max-h-72 overflow-y-auto rounded-lg border border-zinc-200 dark:border-zinc-700", children: results.map((r) => {
40
+ return (_jsxs(_Fragment, { children: [searchError && _jsx(Text, { size: "sm", color: "danger", children: searchError }), isSearching && _jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.picker.searchingHint }), !isSearching && debouncedQuery.length >= 2 && results.length === 0 && !searchError && (_jsx(Text, { size: "sm", color: "muted", children: BUNDLE_COPY.picker.noMatches(debouncedQuery) })), results.length > 0 && (_jsx(Div, { className: `max-h-72 ${__O.yAuto} rounded-lg border border-zinc-200 dark:border-zinc-700`, children: results.map((r) => {
34
41
  const isSelected = selectedSet.has(r.id);
35
42
  const atCap = !isSelected && value.length >= maxItems;
36
- return (_jsxs(Row, { gap: "sm", align: "center", className: `border-b border-zinc-100 px-3 py-2 last:border-b-0 dark:border-zinc-800 ${isSelected ? "bg-blue-50 dark:bg-blue-950" : ""} ${atCap ? "opacity-50" : ""}`, children: [_jsx(Checkbox, { checked: isSelected, disabled: atCap, onChange: () => toggle(r.id), "aria-label": BUNDLE_COPY.picker.toggleAria(r.title) }), _jsxs(Stack, { gap: "xs", className: "flex-1", children: [_jsx(Text, { size: "sm", weight: "medium", children: r.title }), _jsxs(Row, { gap: "sm", children: [_jsx(Text, { size: "xs", color: "muted", children: r.id }), typeof r.priceInPaise === "number" && _jsxs(Text, { size: "xs", color: "muted", children: ["\u00B7 \u20B9", Math.round(r.priceInPaise / 100).toLocaleString("en-IN")] })] })] })] }, r.id));
43
+ return (_jsxs(Row, { gap: "sm", align: "center", className: `border-b border-zinc-100 px-3 py-2 last:border-b-0 dark:border-zinc-800 ${isSelected ? CLS_ROW_SELECTED : ""} ${atCap ? "opacity-50" : ""}`, children: [_jsx(Checkbox, { checked: isSelected, disabled: atCap, onChange: () => toggle(r.id), "aria-label": BUNDLE_COPY.picker.toggleAria(r.title) }), _jsxs(Stack, { gap: "xs", className: "flex-1", children: [_jsx(Text, { size: "sm", weight: "medium", children: r.title }), _jsxs(Row, { gap: "sm", children: [_jsx(Text, { size: "xs", color: "muted", children: r.id }), typeof r.priceInPaise === "number" && _jsxs(Text, { size: "xs", color: "muted", children: ["\u00B7 \u20B9", Math.round(r.priceInPaise / 100).toLocaleString("en-IN")] })] })] })] }, r.id));
37
44
  }) }))] }));
38
45
  }
39
46
  export function BundleItemsPicker({ value, onChange, fetchProducts, minItems = BUNDLE_MIN_ITEMS, maxItems = BUNDLE_MAX_ITEMS, initialMetadata = {}, }) {
@@ -3,27 +3,33 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useCallback, useMemo } from "react";
4
4
  import { useCategoriesFiltered } from "../hooks/useCategories";
5
5
  import { ROUTES } from "../../../next";
6
- import { ListingFilterDrawer, ListingToolbar, Pagination, Text } from "../../../ui";
6
+ import { Div, ListingFilterDrawer, ListingToolbar, Pagination, Text } from "../../../ui";
7
7
  import { CategoryCard } from "./CategoryGrid";
8
8
  import { CategoryFilters } from "./CategoryFilters";
9
9
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
10
10
  import { TABLE_KEYS, VIEW_MODE } from "../../../constants/table-keys";
11
11
  import { sortBy } from "../../../constants/sort";
12
12
  import { CATEGORY_FIELDS } from "../../../constants/field-names";
13
+ const __P = {
14
+ p3: "p-3",
15
+ };
16
+ const __O = {
17
+ hidden: "overflow-hidden",
18
+ };
13
19
  const PAGE_SIZE = 24;
14
20
  function renderCategoryGrid(props) {
15
21
  const { isLoading, categories, view, activeSearch, activeTab, brandsOnly } = props;
16
22
  const isBrandView = activeTab === "brands" || brandsOnly;
17
23
  if (isLoading) {
18
- return (_jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4", children: Array.from({ length: 10 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: [_jsx("div", { className: "aspect-[4/3] bg-zinc-200 dark:bg-slate-700" }), _jsxs("div", { className: "p-3.5 space-y-2", children: [_jsx("div", { className: "h-3.5 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" })] })] }, i))) }));
24
+ return (_jsx(Div, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4", children: Array.from({ length: 10 }).map((_, i) => (_jsxs(Div, { className: `rounded-xl border border-zinc-100 dark:border-slate-700 ${__O.hidden} animate-pulse`, children: [_jsx(Div, { className: "aspect-[4/3] bg-zinc-200 dark:bg-slate-700" }), _jsxs(Div, { className: `${__P.p3}.5 space-y-2`, children: [_jsx(Div, { className: "h-3.5 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx(Div, { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" })] })] }, i))) }));
19
25
  }
20
26
  if (categories.length === 0) {
21
27
  return (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: activeSearch ? `No ${isBrandView ? "brands" : "categories"} matching "${activeSearch}"` : isBrandView ? "No brands found" : "No categories found" }));
22
28
  }
23
29
  if (view === "list") {
24
- return (_jsx("div", { className: "flex flex-col divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800", children: categories.map((category) => _jsx(CategoryCard, { category: category, href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category.slug)) }, category.id)) }));
30
+ return (_jsx(Div, { className: "flex flex-col divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800", children: categories.map((category) => _jsx(CategoryCard, { category: category, href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category.slug)) }, category.id)) }));
25
31
  }
26
- return (_jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4", children: categories.map((category) => _jsx(CategoryCard, { category: category, href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category.slug)) }, category.id)) }));
32
+ return (_jsx(Div, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4", children: categories.map((category) => _jsx(CategoryCard, { category: category, href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category.slug)) }, category.id)) }));
27
33
  }
28
34
  function renderCategoryFilterDrawer(props) {
29
35
  const { filterOpen, setFilterOpen, activeFilterCount, clearFilters, applyFilters, pendingTable } = props;
@@ -138,10 +144,10 @@ export function CategoriesIndexListing({ initialData: _, brandsOnly = false }) {
138
144
  { key: "categories", label: "Categories" },
139
145
  { key: "brands", label: "Brands" },
140
146
  ];
141
- return (_jsxs("div", { className: "min-h-screen", children: [!brandsOnly && (_jsx("div", { className: "flex gap-1 border-b border-zinc-200 dark:border-slate-700 mb-2", children: TABS.map((tab) => (_jsx("button", { type: "button", onClick: () => switchTab(tab.key), className: [
147
+ return (_jsxs(Div, { className: "min-h-screen", children: [!brandsOnly && (_jsx(Div, { className: "flex gap-1 border-b border-zinc-200 dark:border-slate-700 mb-2", children: TABS.map((tab) => (_jsx("button", { type: "button", onClick: () => switchTab(tab.key), className: [
142
148
  "px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px",
143
149
  activeTab === tab.key
144
150
  ? "border-primary text-primary dark:text-primary-400 dark:border-primary-400"
145
151
  : "border-transparent text-zinc-500 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200",
146
- ].join(" "), children: tab.label }, tab.key))) })), _jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: activeTab === "brands" || brandsOnly ? "Search brands..." : "Search categories...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: sort, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: renderCategoryGrid({ isLoading, categories, view, activeSearch, activeTab, brandsOnly }) }), renderCategoryFilterDrawer({ filterOpen, setFilterOpen, activeFilterCount, clearFilters, applyFilters, pendingTable })] }));
152
+ ].join(" "), children: tab.label }, tab.key))) })), _jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: activeTab === "brands" || brandsOnly ? "Search brands..." : "Search categories...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: sort, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx(Div, { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { className: "py-6", children: renderCategoryGrid({ isLoading, categories, view, activeSearch, activeTab, brandsOnly }) }), renderCategoryFilterDrawer({ filterOpen, setFilterOpen, activeFilterCount, clearFilters, applyFilters, pendingTable })] }));
147
153
  }
@@ -9,12 +9,15 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
9
9
  * sort/search/filter/pagination on top of the initial snapshot.
10
10
  */
11
11
  import { useMemo, useCallback, useState } from "react";
12
- import { Div, Text } from "../../../ui";
12
+ import { Div, Span, Text } from "../../../ui";
13
13
  import { ListingToolbar, Pagination, FilterDrawer } from "../../../ui";
14
14
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
15
15
  import { BundleBuyNowCta } from "./BundleBuyNowCta";
16
16
  import { MarketplaceBundleCard } from "../../products/components/MarketplaceBundleCard";
17
17
  import { TABLE_KEYS } from "../../../constants/table-keys";
18
+ const __P = {
19
+ p4: "p-4",
20
+ };
18
21
  const PAGE_SIZE = 12;
19
22
  const FILTER_KEYS = ["showOutOfStock"];
20
23
  const SORT_OPTIONS = [
@@ -83,5 +86,5 @@ export function CategoryBundlesListing({ initialBundles, brandName, onBuyNow, })
83
86
  return (_jsx(Div, { className: "rounded-2xl border border-dashed border-zinc-200 py-16 text-center dark:border-zinc-700", children: _jsxs(Text, { color: "muted", children: ["No bundles available", brandName ? ` for ${brandName}` : "", " yet."] }) }));
84
87
  }
85
88
  return (_jsxs(Div, { className: "min-h-[40vh]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search bundles...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, onSearchKeyDown: (e) => { if (e.key === "Enter")
86
- commitSearch(); }, sortValue: sort, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: safePage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: pageItems.length === 0 ? (_jsxs(Text, { className: "py-16 text-center text-sm text-zinc-500 dark:text-zinc-400", children: ["No bundles match your search", brandName ? ` for ${brandName}` : "", "."] })) : (_jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: pageItems.map((bundle) => (_jsxs("div", { className: "flex flex-col", children: [_jsx(MarketplaceBundleCard, { bundle: bundle }), onBuyNow && (_jsx("div", { className: "border-t border-zinc-100 px-3 pt-2 pb-3 dark:border-zinc-800 -mt-px rounded-b-xl border border-t-0 border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900", children: _jsx(BundleBuyNowCta, { bundleSlug: bundle.slug, outOfStock: bundle.bundleStockStatus === "out_of_stock", onBuyNow: onBuyNow, compact: true }) }))] }, bundle.id))) })) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: () => setPendingShowOutOfStock(false), activeCount: filterActiveCount, hideTrigger: true, children: _jsx("div", { className: "space-y-4 p-4", children: _jsxs("label", { className: "flex items-center justify-between gap-3 cursor-pointer", children: [_jsx("span", { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: "Show out-of-stock bundles" }), _jsx("button", { type: "button", role: "switch", "aria-checked": pendingShowOutOfStock, onClick: () => setPendingShowOutOfStock((v) => !v), className: `relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 ${pendingShowOutOfStock ? "bg-primary" : "bg-zinc-300 dark:bg-slate-600"}`, children: _jsx("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow-sm transition-transform duration-200 ${pendingShowOutOfStock ? "translate-x-[19px]" : "translate-x-[3px]"}` }) })] }) }) })] }));
89
+ commitSearch(); }, sortValue: sort, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx(Div, { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: safePage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { className: "py-6", children: pageItems.length === 0 ? (_jsxs(Text, { className: "py-16 text-center text-sm text-zinc-500 dark:text-zinc-400", children: ["No bundles match your search", brandName ? ` for ${brandName}` : "", "."] })) : (_jsx(Div, { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: pageItems.map((bundle) => (_jsxs(Div, { className: "flex flex-col", children: [_jsx(MarketplaceBundleCard, { bundle: bundle }), onBuyNow && (_jsx(Div, { surface: "default", className: "border-t border-zinc-100 px-3 pt-2 pb-3 dark:border-zinc-800 -mt-px rounded-b-xl border border-t-0 border-zinc-200 dark:border-zinc-800", children: _jsx(BundleBuyNowCta, { bundleSlug: bundle.slug, outOfStock: bundle.bundleStockStatus === "out_of_stock", onBuyNow: onBuyNow, compact: true }) }))] }, bundle.id))) })) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: () => setPendingShowOutOfStock(false), activeCount: filterActiveCount, hideTrigger: true, children: _jsx(Div, { className: `space-y-4 ${__P.p4}`, children: _jsxs("label", { className: "flex items-center justify-between gap-3 cursor-pointer", children: [_jsx(Span, { size: "sm", weight: "medium", className: "text-zinc-700 dark:text-zinc-300", children: "Show out-of-stock bundles" }), _jsx("button", { type: "button", role: "switch", "aria-checked": pendingShowOutOfStock, onClick: () => setPendingShowOutOfStock((v) => !v), className: `relative inline-flex h-5 w-9 flex-shrink-0 items-center rounded-full transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 ${pendingShowOutOfStock ? "bg-primary" : "bg-zinc-300 dark:bg-slate-600"}`, children: _jsx("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow-sm transition-transform duration-200 ${pendingShowOutOfStock ? "translate-x-[19px]" : "translate-x-[3px]"}` }) })] }) }) })] }));
87
90
  }
@@ -2,8 +2,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import Link from "next/link";
3
3
  import { categoriesRepository, productRepository, storeRepository, } from "../../../repositories";
4
4
  import { ROUTES } from "../../../next";
5
- import { Container, Heading, Main, Section, Text } from "../../../ui";
5
+ import { Container, Div, Heading, Main, Nav, Section, Span, Text } from "../../../ui";
6
6
  import { CategoryDetailTabs } from "./CategoryDetailTabs";
7
+ const __O = {
8
+ hidden: "overflow-hidden",
9
+ xAuto: "overflow-x-auto",
10
+ };
7
11
  export async function CategoryDetailPageView({ slug }) {
8
12
  const category = await categoriesRepository
9
13
  .getCategoryBySlug(slug)
@@ -106,7 +110,7 @@ export async function CategoryDetailPageView({ slug }) {
106
110
  const totalCount = productCount + auctionCount + preOrderCount + prizeDrawCount + bundleCount + storeCount;
107
111
  const coverImage = category?.display?.coverImage;
108
112
  const hasCover = Boolean(coverImage);
109
- return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative overflow-hidden ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover", style: { backgroundImage: `url(${coverImage})` } }), _jsx("div", { className: "absolute inset-0 bg-black/55" })] })), _jsxs("div", { className: `relative z-10 max-w-7xl mx-auto px-4 ${hasCover ? "py-12" : "py-8"}`, children: [_jsxs("nav", { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx("span", { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORIES), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Categories" }), _jsx("span", { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx("span", { className: hasCover ? "text-white font-medium" : "text-zinc-900 dark:text-zinc-100 font-medium", children: category?.name ?? slug })] }), _jsx(Heading, { level: 1, className: `text-3xl md:text-4xl font-bold mb-2 ${hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-50"}`, children: category?.name ?? slug }), category?.description && typeof category.description === "string" && !category.description.startsWith("{") && (_jsx(Text, { className: `text-base max-w-2xl mb-4 ${hasCover ? "text-white/80" : "text-zinc-600 dark:text-zinc-400"}`, children: category.description })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [productCount > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, children: [productCount.toLocaleString(), " ", productCount === 1 ? "product" : "products"] })), auctionCount > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}`, children: [auctionCount.toLocaleString(), " ", auctionCount === 1 ? "auction" : "auctions"] })), preOrderCount > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"}`, children: [preOrderCount.toLocaleString(), " ", preOrderCount === 1 ? "pre-order" : "pre-orders"] })), storeCount > 0 && (_jsxs("span", { className: `inline-flex items-center gap-1 text-xs font-medium px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400"}`, children: [storeCount.toLocaleString(), " ", storeCount === 1 ? "store" : "stores"] }))] })] })] }), childCategories.length > 0 && (_jsx(Section, { surface: "default", className: "border-b border-zinc-100 dark:border-zinc-800", children: _jsx("div", { className: "max-w-7xl mx-auto px-4 py-3", children: _jsx("div", { className: "flex gap-2.5 overflow-x-auto pb-1", style: { scrollbarWidth: "none" }, children: childCategories.map((child) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(child.slug)), className: "flex-shrink-0 flex items-center gap-1.5 rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-4 py-1.5 text-sm font-medium text-zinc-700 dark:text-zinc-200 hover:border-primary hover:text-primary transition-colors whitespace-nowrap", children: [child.display?.icon && (_jsx("span", { className: "text-base leading-none", children: child.display.icon })), child.name, (child.metrics?.productCount ?? 0) > 0 && (_jsx("span", { className: "text-xs text-zinc-400 dark:text-zinc-400", children: (child.metrics?.productCount ?? 0).toLocaleString() }))] }, child.id))) }) }) })), _jsx(Section, { className: "py-6", children: _jsx(Container, { size: "xl", children: _jsx(CategoryDetailTabs, { categorySlug: slug, categoryId: category?.id, initialProductsData: productsResult ?? undefined, initialBundles: bundlesResult ?? [], initialStores: categoryStores, counts: {
113
+ return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative ${__O.hidden} ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover", style: { backgroundImage: `url(${coverImage})` } }), _jsx(Div, { className: "absolute inset-0 bg-black/55" })] })), _jsxs(Div, { className: `relative z-10 max-w-7xl mx-auto px-4 ${hasCover ? "py-12" : "py-8"}`, children: [_jsxs(Nav, { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORIES), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Categories" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Span, { weight: "medium", className: hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-100", children: category?.name ?? slug })] }), _jsx(Heading, { level: 1, className: `text-3xl md:text-4xl font-bold mb-2 ${hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-50"}`, children: category?.name ?? slug }), category?.description && typeof category.description === "string" && !category.description.startsWith("{") && (_jsx(Text, { className: `text-base max-w-2xl mb-4 ${hasCover ? "text-white/80" : "text-zinc-600 dark:text-zinc-400"}`, children: category.description })), _jsxs(Div, { className: "flex flex-wrap gap-2", children: [productCount > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, children: [productCount.toLocaleString(), " ", productCount === 1 ? "product" : "products"] })), auctionCount > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}`, children: [auctionCount.toLocaleString(), " ", auctionCount === 1 ? "auction" : "auctions"] })), preOrderCount > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"}`, children: [preOrderCount.toLocaleString(), " ", preOrderCount === 1 ? "pre-order" : "pre-orders"] })), storeCount > 0 && (_jsxs(Span, { size: "xs", weight: "medium", className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-full ${hasCover ? "bg-white/20 text-white backdrop-blur-sm" : "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400"}`, children: [storeCount.toLocaleString(), " ", storeCount === 1 ? "store" : "stores"] }))] })] })] }), childCategories.length > 0 && (_jsx(Section, { surface: "default", className: "border-b border-zinc-100 dark:border-zinc-800", children: _jsx(Div, { className: "max-w-7xl mx-auto px-4 py-3", children: _jsx(Div, { className: `flex gap-2.5 ${__O.xAuto} pb-1`, style: { scrollbarWidth: "none" }, children: childCategories.map((child) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(child.slug)), className: "flex-shrink-0 flex items-center gap-1.5 rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-4 py-1.5 text-sm font-medium text-zinc-700 dark:text-zinc-200 hover:border-primary hover:text-primary transition-colors whitespace-nowrap", children: [child.display?.icon && (_jsx(Span, { className: "leading-none", children: child.display.icon })), child.name, (child.metrics?.productCount ?? 0) > 0 && (_jsx(Span, { size: "xs", className: "text-zinc-400 dark:text-zinc-400", children: (child.metrics?.productCount ?? 0).toLocaleString() }))] }, child.id))) }) }) })), _jsx(Section, { className: "py-6", children: _jsx(Container, { size: "xl", children: _jsx(CategoryDetailTabs, { categorySlug: slug, categoryId: category?.id, initialProductsData: productsResult ?? undefined, initialBundles: bundlesResult ?? [], initialStores: categoryStores, counts: {
110
114
  products: productCount,
111
115
  auctions: auctionCount,
112
116
  preOrders: preOrderCount,
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
+ import { Div } from "../../../ui";
4
5
  import { CategoryProductsListing } from "./CategoryProductsListing";
5
6
  import { AuctionsIndexListing } from "../../products/components/AuctionsIndexListing";
6
7
  import { PreOrdersIndexListing } from "../../pre-orders/components/PreOrdersIndexListing";
@@ -8,6 +9,9 @@ import { PrizeDrawsIndexListing } from "../../products/components/PrizeDrawsInde
8
9
  import { CategoryBundlesListing } from "./CategoryBundlesListing";
9
10
  import { CategoryStoresListing } from "./CategoryStoresListing";
10
11
  import { CATEGORY_PAGE_TABS } from "../../products/constants/listing-tabs";
12
+ const __O = {
13
+ xAuto: "overflow-x-auto",
14
+ };
11
15
  function tabLabel(label, count) {
12
16
  if (!count)
13
17
  return label;
@@ -50,7 +54,7 @@ export function CategoryDetailTabs({ categorySlug, categoryId, initialProductsDa
50
54
  default: return undefined;
51
55
  }
52
56
  };
53
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "flex border-b border-zinc-200 dark:border-slate-700 mb-6 overflow-x-auto", children: visibleTabs.map((t) => (_jsx("button", { type: "button", onClick: () => setActiveTab(t.id), className: `px-5 py-2.5 text-sm font-medium whitespace-nowrap transition-colors -mb-px border-b-2 ${activeTab === t.id
57
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { className: `flex border-b border-zinc-200 dark:border-slate-700 mb-6 ${__O.xAuto}`, children: visibleTabs.map((t) => (_jsx("button", { type: "button", onClick: () => setActiveTab(t.id), className: `px-5 py-2.5 text-sm font-medium whitespace-nowrap transition-colors -mb-px border-b-2 ${activeTab === t.id
54
58
  ? "border-primary text-primary"
55
59
  : "border-transparent text-zinc-500 hover:text-zinc-900 dark:hover:text-zinc-100"}`, children: tabLabel(t.label, countFor(t.id)) }, t.id))) }), activeTab === "products" && (_jsx(CategoryProductsListing, { categorySlug: categorySlug, categoryId: categoryId, initialData: initialProductsData })), activeTab === "auctions" && (_jsx(AuctionsIndexListing, { categorySlug: categorySlug })), activeTab === "pre-orders" && (_jsx(PreOrdersIndexListing, { categorySlug: categorySlug })), activeTab === "prize-draws" && (_jsx(PrizeDrawsIndexListing, { categorySlug: categorySlug })), activeTab === "bundles" && (_jsx(CategoryBundlesListing, { initialBundles: initialBundles })), activeTab === "stores" && (_jsx(CategoryStoresListing, { stores: initialStores }))] }));
56
60
  }
@@ -1,11 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { FormGroup } from "../../../ui";
3
+ import { Div, FormGroup } from "../../../ui";
4
4
  import { Label, Checkbox, RichTextEditor, Text } from "../../../ui";
5
5
  import { ImageUpload, MediaImage, useMediaUpload } from "../../media";
6
6
  import { FormField } from "../../../ui";
7
7
  import { flattenCategories } from "../types";
8
8
  import { normalizeRichTextHtml, slugify } from "../../../utils/string.formatter";
9
+ const __O = {
10
+ hidden: "overflow-hidden",
11
+ };
9
12
  const DEFAULT_LABELS = {
10
13
  name: "Name",
11
14
  slug: "Slug",
@@ -32,10 +35,10 @@ export function CategoryForm({ category, allCategories, onChange, isReadonly = f
32
35
  const handleNameChange = (value) => {
33
36
  update({ name: value, slug: makeSlug(value, category.isBrand ?? false) });
34
37
  };
35
- return (_jsxs("div", { className: stackClassName, "data-section": "categoryform-div-262", children: [_jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "name", label: L.name, type: "text", value: category.name || "", onChange: handleNameChange, disabled: isReadonly }), _jsx(FormField, { name: "slug", label: L.slug, type: "text", value: category.slug || "", onChange: (value) => update({ slug: value }), disabled: isReadonly })] }), _jsxs("div", { className: "appkit-form-field", "data-section": "categoryform-div-263", children: [_jsx(Label, { className: "appkit-form-field__label", children: L.description }), _jsx(RichTextEditor, { value: normalizeRichTextHtml(category.description || ""), onChange: (value) => update({ description: value }), disabled: isReadonly, minHeightClassName: "min-h-[140px]", placeholder: "Enter category description" }), _jsx(Text, { size: "sm", variant: "secondary", className: "appkit-form-field__hint", children: "Rich text is supported for category descriptions." })] }), !isReadonly && (_jsx(ImageUpload, { currentImage: category.display?.coverImage, onUpload: (file) => upload(file, "categories", true, {
38
+ return (_jsxs(Div, { className: stackClassName, children: [_jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "name", label: L.name, type: "text", value: category.name || "", onChange: handleNameChange, disabled: isReadonly }), _jsx(FormField, { name: "slug", label: L.slug, type: "text", value: category.slug || "", onChange: (value) => update({ slug: value }), disabled: isReadonly })] }), _jsxs(Div, { className: "appkit-form-field", children: [_jsx(Label, { className: "appkit-form-field__label", children: L.description }), _jsx(RichTextEditor, { value: normalizeRichTextHtml(category.description || ""), onChange: (value) => update({ description: value }), disabled: isReadonly, minHeightClassName: "min-h-[140px]", placeholder: "Enter category description" }), _jsx(Text, { size: "sm", variant: "secondary", className: "appkit-form-field__hint", children: "Rich text is supported for category descriptions." })] }), !isReadonly && (_jsx(ImageUpload, { currentImage: category.display?.coverImage, onUpload: (file) => upload(file, "categories", true, {
36
39
  type: "category-image",
37
40
  name: category.name || "category",
38
- }), onChange: (url) => update({ display: { ...category.display, coverImage: url } }), label: L.categoryImage, helperText: L.imageRecommended })), category.display?.coverImage && isReadonly && (_jsxs("div", { "data-section": "categoryform-div-264", children: [_jsx(Label, { className: "block text-sm font-medium mb-2", children: L.categoryImage }), _jsx("div", { className: "relative h-32 w-40 overflow-hidden rounded", "data-section": "categoryform-div-265", children: _jsx(MediaImage, { src: category.display.coverImage, alt: category.name || "", size: "card" }) })] })), _jsx(FormField, { name: "parentId", label: L.parentCategory, type: "select", value: category.parentId || "", onChange: (value) => update({ parentId: value || null }), disabled: isReadonly, options: [
41
+ }), onChange: (url) => update({ display: { ...category.display, coverImage: url } }), label: L.categoryImage, helperText: L.imageRecommended })), category.display?.coverImage && isReadonly && (_jsxs(Div, { children: [_jsx(Label, { className: "block text-sm font-medium mb-2", children: L.categoryImage }), _jsx(Div, { className: `relative h-32 w-40 ${__O.hidden} rounded`, children: _jsx(MediaImage, { src: category.display.coverImage, alt: category.name || "", size: "card" }) })] })), _jsx(FormField, { name: "parentId", label: L.parentCategory, type: "select", value: category.parentId || "", onChange: (value) => update({ parentId: value || null }), disabled: isReadonly, options: [
39
42
  { value: "", label: L.noneRoot },
40
43
  ...flattenCategories(allCategories).map((cat) => ({
41
44
  value: cat.id,
@@ -3,9 +3,16 @@ import Link from "next/link";
3
3
  import { ArrowRight } from "lucide-react";
4
4
  import { Div, Span, Text } from "../../../ui";
5
5
  import { THEME_CONSTANTS } from "../../../tokens";
6
+ const __P = {
7
+ p3: "p-3",
8
+ };
9
+ const __O = {
10
+ hidden: "overflow-hidden",
11
+ };
12
+ const CLS_FEATURED_DOT = "absolute left-2 top-2 rounded-full bg-amber-400 p-1 leading-none";
6
13
  export function CategoryCard({ category, href, onClick, className = "", }) {
7
14
  const productCount = category.metrics?.productCount ?? category.productCount ?? 0;
8
- const inner = (_jsxs(Div, { className: "flex h-full flex-col", children: [_jsxs(Div, { className: "relative aspect-[4/3] w-full overflow-hidden bg-gradient-to-br from-neutral-100 to-neutral-200 dark:from-zinc-800 dark:to-zinc-700 flex-shrink-0", children: [category.display?.coverImage ? (_jsx(Div, { role: "img", "aria-label": category.name, className: "h-full w-full bg-center bg-cover transition-transform duration-300 group-hover:scale-105", style: { backgroundImage: `url(${category.display.coverImage})` } })) : category.display?.color ? (_jsx(Div, { className: "h-full w-full opacity-80", style: { backgroundColor: category.display.color } })) : null, category.display?.icon && (_jsx(Div, { className: "absolute inset-0 flex items-center justify-center text-4xl", children: category.display.icon })), category.isFeatured && (_jsx(Span, { className: "absolute left-2 top-2 rounded-full bg-amber-400 p-1 text-xs leading-none", children: "\u2605" }))] }), _jsxs(Div, { className: "flex flex-1 flex-col p-3.5", children: [_jsx(Text, { className: `font-semibold text-sm leading-snug ${THEME_CONSTANTS.utilities.textClamp2} text-neutral-900 dark:text-white`, children: category.name }), category.description && (_jsx(Text, { className: `mt-1 text-xs ${THEME_CONSTANTS.utilities.textClamp2} text-neutral-500 dark:text-zinc-400 flex-1`, children: category.description })), _jsxs(Div, { className: "mt-2 flex items-center justify-between gap-2", children: [_jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: [productCount.toLocaleString(), " ", productCount === 1 ? "item" : "items"] }), _jsxs(Span, { className: "inline-flex items-center gap-1 rounded-md border border-zinc-200 dark:border-zinc-700 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 group-hover:bg-primary group-hover:border-primary group-hover:text-white transition-colors", children: ["Browse ", _jsx(ArrowRight, { className: "h-3 w-3" })] })] })] })] }));
15
+ const inner = (_jsxs(Div, { className: "flex h-full flex-col", children: [_jsxs(Div, { className: `relative aspect-[4/3] w-full ${__O.hidden} bg-gradient-to-br from-neutral-100 to-neutral-200 dark:from-zinc-800 dark:to-zinc-700 flex-shrink-0`, children: [category.display?.coverImage ? (_jsx(Div, { role: "img", "aria-label": category.name, className: "h-full w-full bg-center bg-cover transition-transform duration-300 group-hover:scale-105", style: { backgroundImage: `url(${category.display.coverImage})` } })) : category.display?.color ? (_jsx(Div, { className: "h-full w-full opacity-80", style: { backgroundColor: category.display.color } })) : null, category.display?.icon && (_jsx(Div, { className: "absolute inset-0 flex items-center justify-center text-4xl", children: category.display.icon })), category.isFeatured && (_jsx(Span, { size: "xs", className: CLS_FEATURED_DOT, children: "\u2605" }))] }), _jsxs(Div, { className: `flex flex-1 flex-col ${__P.p3}.5`, children: [_jsx(Text, { className: `font-semibold text-sm leading-snug ${THEME_CONSTANTS.utilities.textClamp2} text-neutral-900 dark:text-white`, children: category.name }), category.description && (_jsx(Text, { className: `mt-1 text-xs ${THEME_CONSTANTS.utilities.textClamp2} text-neutral-500 dark:text-zinc-400 flex-1`, children: category.description })), _jsxs(Div, { className: "mt-2 flex items-center justify-between gap-2", children: [_jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: [productCount.toLocaleString(), " ", productCount === 1 ? "item" : "items"] }), _jsxs(Span, { size: "xs", weight: "medium", className: "inline-flex items-center gap-1 rounded-md border border-zinc-200 dark:border-zinc-700 px-2.5 py-1 text-zinc-600 dark:text-zinc-300 group-hover:bg-primary group-hover:border-primary group-hover:text-white transition-colors", children: ["Browse ", _jsx(ArrowRight, { className: "h-3 w-3" })] })] })] })] }));
9
16
  const cardClass = `group relative flex flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-zinc-700 dark:bg-zinc-900 shadow-sm transition hover:shadow-md h-full ${className}`;
10
17
  if (href) {
11
18
  return (_jsx(Link, { href: href, className: cardClass, children: inner }));
@@ -18,5 +25,5 @@ export function CategoryGrid({ categories, getHref, onCategoryClick, emptyLabel
18
25
  if (categories.length === 0) {
19
26
  return (_jsx(Text, { className: "py-12 text-center text-sm text-neutral-500 dark:text-zinc-500", children: emptyLabel }));
20
27
  }
21
- return (_jsx("div", { className: `grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 ${className}`, children: categories.map((cat) => (_jsx(CategoryCard, { category: cat, href: getHref ? getHref(cat) : undefined, onClick: !getHref ? onCategoryClick : undefined }, cat.id))) }));
28
+ return (_jsx(Div, { className: `grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 ${className}`, children: categories.map((cat) => (_jsx(CategoryCard, { category: cat, href: getHref ? getHref(cat) : undefined, onClick: !getHref ? onCategoryClick : undefined }, cat.id))) }));
22
29
  }
@@ -4,7 +4,7 @@ import { useState, useCallback } from "react";
4
4
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
5
5
  import { usePendingTable } from "../../../react/hooks/usePendingTable";
6
6
  import { useProducts } from "../../products/hooks/useProducts";
7
- import { Pagination, useToast, ListingToolbar, FilterDrawer, LoginRequiredModal, } from "../../../ui";
7
+ import { Div, Pagination, useToast, ListingToolbar, FilterDrawer, LoginRequiredModal, } from "../../../ui";
8
8
  import { useAuthGate } from "../../../react/hooks/useAuthGate";
9
9
  import { ACTION_ID } from "../../products/constants/action-defs";
10
10
  import { ROUTES } from "../../../next";
@@ -13,12 +13,18 @@ import { ProductFilters, PRODUCT_PUBLIC_SORT_OPTIONS } from "../../products/comp
13
13
  import { useGuestCart } from "../../cart/hooks/useGuestCart";
14
14
  import { useGuestWishlist } from "../../wishlist/hooks/useGuestWishlist";
15
15
  import { pushCartOp, pushWishlistOp } from "../../cart/utils/pending-ops";
16
+ const __P = {
17
+ p3: "p-3",
18
+ };
19
+ const __O = {
20
+ hidden: "overflow-hidden",
21
+ };
16
22
  const FILTER_KEYS = ["condition", "brand", "minPrice", "maxPrice"];
17
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
24
  function renderCategoryProductGrid(props) {
19
25
  const { isLoading, products, view, getProductHref, onWishlistToggle, wishlistedIds, onAddToCart } = props;
20
26
  if (isLoading) {
21
- return (_jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-6", children: Array.from({ length: 8 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: [_jsx("div", { className: "aspect-square bg-zinc-200 dark:bg-slate-700" }), _jsxs("div", { className: "p-3 space-y-2", children: [_jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" }), _jsx("div", { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-1/3" })] })] }, i))) }));
27
+ return (_jsx(Div, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-6", children: Array.from({ length: 8 }).map((_, i) => (_jsxs(Div, { className: `rounded-xl border border-zinc-100 dark:border-slate-700 ${__O.hidden} animate-pulse`, children: [_jsx(Div, { className: "aspect-square bg-zinc-200 dark:bg-slate-700" }), _jsxs(Div, { className: `${__P.p3} space-y-2`, children: [_jsx(Div, { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx(Div, { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" }), _jsx(Div, { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-1/3" })] })] }, i))) }));
22
28
  }
23
29
  return (_jsx(ProductGrid, { products: products, getProductHref: getProductHref, view: view, emptyLabel: "No products found in this category.", onWishlistToggle: onWishlistToggle, wishlistedIds: wishlistedIds, onAddToCart: onAddToCart }));
24
30
  }
@@ -96,9 +102,9 @@ export function CategoryProductsListing({ categorySlug, categoryId, brandName, i
96
102
  pushCartOp({ op: "add", productId: product.id, quantity: 1, ...snapshot });
97
103
  showToast("Added to cart", "success");
98
104
  }, [localCart, showToast]);
99
- return (_jsxs("div", { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: `Search in ${categorySlug.replace(/-/g, " ")}...`, onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || "-createdAt", sortOptions: PRODUCT_PUBLIC_SORT_OPTIONS, onSortChange: (v) => {
105
+ return (_jsxs(Div, { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: `Search in ${categorySlug.replace(/-/g, " ")}...`, onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || "-createdAt", sortOptions: PRODUCT_PUBLIC_SORT_OPTIONS, onSortChange: (v) => {
100
106
  table.set("sort", v);
101
- }, view: view === "card" ? "grid" : "list", onViewChange: (v) => handleViewToggle(v === "grid" ? "card" : "list"), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: renderCategoryProductGrid({
107
+ }, view: view === "card" ? "grid" : "list", onViewChange: (v) => handleViewToggle(v === "grid" ? "card" : "list"), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx(Div, { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { className: "py-6", children: renderCategoryProductGrid({
102
108
  isLoading, products: products, view,
103
109
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
110
  getProductHref: (p) => String(ROUTES.PUBLIC.PRODUCT_DETAIL(p.slug || p.id)),