@mohasinac/appkit 2.8.1 → 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 (434) 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/consent-otp.d.ts +2 -2
  128. package/dist/features/auth/hooks/useAuth.d.ts +2 -2
  129. package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
  130. package/dist/features/blog/components/BlogFeaturedCard.js +8 -1
  131. package/dist/features/blog/components/BlogIndexListing.js +11 -5
  132. package/dist/features/blog/components/BlogListView.js +11 -3
  133. package/dist/features/blog/components/BlogPostView.js +10 -3
  134. package/dist/features/cart/components/CartDrawer.js +11 -3
  135. package/dist/features/cart/components/CartSummary.js +2 -2
  136. package/dist/features/cart/components/CheckoutOtpModal.js +2 -1
  137. package/dist/features/cart/hooks/useCart.d.ts +1 -1
  138. package/dist/features/cart/hooks/useCartQuery.d.ts +1 -1
  139. package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +2 -2
  140. package/dist/features/cart/hooks/useOrder.d.ts +2 -2
  141. package/dist/features/categories/components/BrandDetailPageView.js +5 -2
  142. package/dist/features/categories/components/BrandDetailTabs.js +5 -1
  143. package/dist/features/categories/components/BundleDetailView.js +6 -3
  144. package/dist/features/categories/components/BundleDynamicRuleEditor.js +3 -1
  145. package/dist/features/categories/components/BundleItemsPicker.js +10 -3
  146. package/dist/features/categories/components/CategoriesIndexListing.js +12 -6
  147. package/dist/features/categories/components/CategoryBundlesListing.js +5 -2
  148. package/dist/features/categories/components/CategoryDetailPageView.js +6 -2
  149. package/dist/features/categories/components/CategoryDetailTabs.js +5 -1
  150. package/dist/features/categories/components/CategoryForm.js +6 -3
  151. package/dist/features/categories/components/CategoryGrid.js +9 -2
  152. package/dist/features/categories/components/CategoryProductsListing.js +10 -4
  153. package/dist/features/categories/components/CategorySelectorCreate.js +3 -3
  154. package/dist/features/categories/components/CategorySortSelect.js +1 -1
  155. package/dist/features/categories/components/CategoryStoresListing.js +3 -3
  156. package/dist/features/categories/components/CategoryTableColumns.js +10 -6
  157. package/dist/features/categories/components/CategoryTree.js +1 -1
  158. package/dist/features/categories/hooks/useCategories.d.ts +3 -3
  159. package/dist/features/categories/hooks/useCategorySelector.d.ts +3 -3
  160. package/dist/features/categories/hooks/useCategoryTree.d.ts +1 -1
  161. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +2 -2
  162. package/dist/features/classified/components/ClassifiedFilters.js +2 -2
  163. package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
  164. package/dist/features/collections/components/CollectionCard.js +2 -1
  165. package/dist/features/collections/hooks/useCollections.d.ts +2 -2
  166. package/dist/features/contact/components/ContactForm.js +4 -2
  167. package/dist/features/contact/components/ContactInfoSidebar.js +4 -1
  168. package/dist/features/copilot/components/AdminCopilotView.js +13 -5
  169. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +9 -3
  170. package/dist/features/events/components/AdminEventEditorView.js +62 -40
  171. package/dist/features/events/components/AdminEventEntriesView.js +9 -6
  172. package/dist/features/events/components/EventCard.js +7 -1
  173. package/dist/features/events/components/EventFormDrawer.js +2 -1
  174. package/dist/features/events/components/EventLeaderboard.js +4 -4
  175. package/dist/features/events/components/EventOfferCard.js +4 -1
  176. package/dist/features/events/components/EventParticipateView.js +3 -2
  177. package/dist/features/events/components/EventPollWidget.js +6 -5
  178. package/dist/features/events/components/EventRaffleEntryForm.js +5 -2
  179. package/dist/features/events/components/EventRaffleWinnerView.js +7 -1
  180. package/dist/features/events/components/EventRafflesSection.js +2 -2
  181. package/dist/features/events/components/EventSaleBanner.js +5 -2
  182. package/dist/features/events/components/EventsIndexListing.js +8 -2
  183. package/dist/features/events/components/EventsListView.js +4 -1
  184. package/dist/features/events/components/SpinWheelView.js +7 -2
  185. package/dist/features/events/hooks/useEvent.d.ts +3 -3
  186. package/dist/features/events/hooks/useEvents.d.ts +1 -1
  187. package/dist/features/events/schemas/firestore.d.ts +1 -0
  188. package/dist/features/events/types/index.d.ts +1 -0
  189. package/dist/features/faq/components/ContactCTA.js +4 -1
  190. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  191. package/dist/features/faq/components/FAQHelpfulButtons.js +8 -5
  192. package/dist/features/faq/components/FAQPageContent.js +5 -5
  193. package/dist/features/faq/components/FAQSortDropdown.js +2 -2
  194. package/dist/features/faq/hooks/useFAQs.d.ts +1 -1
  195. package/dist/features/faq/hooks/useFaqList.d.ts +15 -15
  196. package/dist/features/filters/AsyncFacetSection.js +4 -2
  197. package/dist/features/filters/FilterFacetSection.js +14 -6
  198. package/dist/features/filters/RangeFilter.js +4 -2
  199. package/dist/features/filters/SwitchFilter.js +2 -1
  200. package/dist/features/forms/Checkbox.js +1 -1
  201. package/dist/features/forms/Radio.js +1 -1
  202. package/dist/features/forms/Slider.js +1 -1
  203. package/dist/features/homepage/components/AdSlot.js +4 -4
  204. package/dist/features/homepage/components/AdvertisementBanner.js +13 -4
  205. package/dist/features/homepage/components/AnnouncementBar.js +2 -1
  206. package/dist/features/homepage/components/BeforeAfterCard.js +8 -2
  207. package/dist/features/homepage/components/BrandsSection.js +6 -3
  208. package/dist/features/homepage/components/CTABannerSection.js +2 -2
  209. package/dist/features/homepage/components/CharacterHotspot.js +5 -2
  210. package/dist/features/homepage/components/CharacterHotspotForm.js +8 -4
  211. package/dist/features/homepage/components/CustomCardsSection.js +13 -7
  212. package/dist/features/homepage/components/CustomerReviewsSection.js +9 -3
  213. package/dist/features/homepage/components/FAQSection.js +7 -4
  214. package/dist/features/homepage/components/FeaturedBundlesSection.js +8 -2
  215. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  216. package/dist/features/homepage/components/GoogleReviewsSection.js +14 -8
  217. package/dist/features/homepage/components/HeroCarousel.js +1 -1
  218. package/dist/features/homepage/components/HomepageSkeleton.js +7 -1
  219. package/dist/features/homepage/components/HowItWorksInfoView.js +2 -2
  220. package/dist/features/homepage/components/HowItWorksSection.js +2 -2
  221. package/dist/features/homepage/components/NewsletterBanner.js +3 -2
  222. package/dist/features/homepage/components/NewsletterSection.js +5 -2
  223. package/dist/features/homepage/components/PromoGrid.js +4 -1
  224. package/dist/features/homepage/components/SectionCarousel.js +7 -4
  225. package/dist/features/homepage/components/SecurityHighlightsSection.js +3 -3
  226. package/dist/features/homepage/components/ShopByCategorySection.js +10 -4
  227. package/dist/features/homepage/components/SiteFeaturesSection.js +5 -2
  228. package/dist/features/homepage/components/SocialFeedSection.js +4 -4
  229. package/dist/features/homepage/components/SocialPostCard.js +6 -3
  230. package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
  231. package/dist/features/homepage/components/TrustIndicatorsSection.js +5 -2
  232. package/dist/features/homepage/components/WelcomeSection.js +1 -1
  233. package/dist/features/homepage/components/WhatsAppCommunitySection.js +3 -3
  234. package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -1
  235. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +1 -1
  236. package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +1 -1
  237. package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -1
  238. package/dist/features/homepage/hooks/useFeaturedStores.d.ts +1 -1
  239. package/dist/features/homepage/hooks/useHeroCarousel.d.ts +1 -1
  240. package/dist/features/homepage/hooks/useHomepageEvents.d.ts +1 -1
  241. package/dist/features/homepage/hooks/useHomepageReviews.d.ts +1 -1
  242. package/dist/features/homepage/hooks/useHomepageSections.d.ts +1 -1
  243. package/dist/features/homepage/hooks/useTopBrands.d.ts +1 -1
  244. package/dist/features/homepage/hooks/useTopCategories.d.ts +1 -1
  245. package/dist/features/layout/AppLayoutShell.js +2 -1
  246. package/dist/features/layout/BackToTop.js +1 -1
  247. package/dist/features/layout/BottomActions.js +4 -3
  248. package/dist/features/layout/BottomNavItem.js +1 -1
  249. package/dist/features/layout/BottomSheet.js +4 -1
  250. package/dist/features/layout/FooterLayout.js +1 -1
  251. package/dist/features/layout/NavbarLayout.js +4 -1
  252. package/dist/features/layout/SidebarLayout.js +5 -2
  253. package/dist/features/live/components/LiveItemFilters.js +2 -2
  254. package/dist/features/live/components/LiveItemsIndexListing.js +9 -3
  255. package/dist/features/loyalty/components/CoinsDisplay.js +4 -2
  256. package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +1 -1
  257. package/dist/features/media/AvatarUpload.js +2 -2
  258. package/dist/features/media/MediaLightbox.js +3 -2
  259. package/dist/features/media/modals/VideoThumbnailSelector.js +4 -1
  260. package/dist/features/media/modals/VideoTrimModal.js +1 -1
  261. package/dist/features/media/upload/CameraCapture.js +1 -1
  262. package/dist/features/media/upload/ImageUpload.js +4 -1
  263. package/dist/features/media/upload/MediaUploadField.js +11 -2
  264. package/dist/features/media/upload/MediaUploadList.js +5 -1
  265. package/dist/features/orders/components/MarketplaceOrderCard.js +2 -2
  266. package/dist/features/orders/components/OrdersList.js +2 -1
  267. package/dist/features/orders/components/RefundHistoryTable.js +4 -1
  268. package/dist/features/orders/components/RefundRequestView.js +2 -1
  269. package/dist/features/orders/hooks/useOrders.d.ts +2 -2
  270. package/dist/features/payments/hooks/usePayments.d.ts +1 -1
  271. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -1
  272. package/dist/features/pre-orders/components/PreOrderActionsClient.js +3 -3
  273. package/dist/features/pre-orders/components/PreOrderBadge.js +2 -1
  274. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +16 -7
  275. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +32 -24
  276. package/dist/features/pre-orders/hooks/usePreOrders.d.ts +2 -2
  277. package/dist/features/products/columns/productTableColumns.js +9 -4
  278. package/dist/features/products/components/AuctionsIndexListing.js +9 -3
  279. package/dist/features/products/components/BidHistory.js +4 -4
  280. package/dist/features/products/components/CompareOverlay.js +10 -2
  281. package/dist/features/products/components/CustomFieldsEditor.js +2 -1
  282. package/dist/features/products/components/CustomSectionTabContent.js +2 -2
  283. package/dist/features/products/components/CustomSectionsEditor.js +3 -2
  284. package/dist/features/products/components/GroupSettingsPanel.js +34 -26
  285. package/dist/features/products/components/MakeOfferButton.js +6 -2
  286. package/dist/features/products/components/MakeOfferForm.js +2 -1
  287. package/dist/features/products/components/MarketplaceBundleCard.js +6 -3
  288. package/dist/features/products/components/MarketplacePrizeDrawCard.js +3 -2
  289. package/dist/features/products/components/PlaceBidForm.js +2 -1
  290. package/dist/features/products/components/PrizeDrawCollage.js +6 -2
  291. package/dist/features/products/components/PrizeDrawDetailPageView.js +6 -1
  292. package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -2
  293. package/dist/features/products/components/PrizeDrawsIndexListing.js +6 -3
  294. package/dist/features/products/components/PrizeDrawsSection.js +2 -2
  295. package/dist/features/products/components/PrizeRevealModal.js +5 -1
  296. package/dist/features/products/components/ProductDetailPageView.js +32 -16
  297. package/dist/features/products/components/ProductFeatureBadges.js +9 -9
  298. package/dist/features/products/components/ProductForm.d.ts +11 -1
  299. package/dist/features/products/components/ProductForm.js +10 -5
  300. package/dist/features/products/components/ProductGalleryClient.js +8 -4
  301. package/dist/features/products/components/ProductGradingTab.js +4 -1
  302. package/dist/features/products/components/ProductGrid.js +35 -14
  303. package/dist/features/products/components/ProductInfo.js +2 -1
  304. package/dist/features/products/components/ProductTabs.js +2 -1
  305. package/dist/features/products/components/ProductTabsShell.js +5 -1
  306. package/dist/features/products/components/ProductsIndexListing.js +32 -24
  307. package/dist/features/products/components/ProductsIndexPageView.js +2 -2
  308. package/dist/features/products/components/RelatedProducts.js +3 -3
  309. package/dist/features/products/components/ShowGroupSection.js +10 -6
  310. package/dist/features/products/components/SublistingCarouselSection.js +7 -3
  311. package/dist/features/products/components/SublistingCategorySelect.d.ts +3 -1
  312. package/dist/features/products/components/SublistingCategorySelect.js +4 -37
  313. package/dist/features/products/constants/action-defs.js +3 -3
  314. package/dist/features/products/hooks/useProductDetail.d.ts +1 -1
  315. package/dist/features/products/hooks/useRelatedProducts.d.ts +1 -1
  316. package/dist/features/promotions/components/CouponCard.js +5 -3
  317. package/dist/features/promotions/components/CouponsIndexListing.js +7 -3
  318. package/dist/features/promotions/hooks/usePromotions.d.ts +2 -2
  319. package/dist/features/promotions/repository/coupons.repository.d.ts +8 -0
  320. package/dist/features/promotions/repository/coupons.repository.js +2 -0
  321. package/dist/features/reviews/components/ReviewDetailPageView.js +3 -3
  322. package/dist/features/reviews/components/ReviewDetailShell.js +15 -3
  323. package/dist/features/reviews/components/ReviewSummary.js +4 -2
  324. package/dist/features/reviews/components/ReviewsIndexListing.js +8 -2
  325. package/dist/features/reviews/components/ReviewsList.js +1 -1
  326. package/dist/features/reviews/hooks/useReviews.d.ts +2 -2
  327. package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
  328. package/dist/features/scams/components/ScamProfileView.js +3 -3
  329. package/dist/features/scams/components/ScamRegistryView.js +6 -4
  330. package/dist/features/search/components/Search.js +9 -6
  331. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  332. package/dist/features/search/components/SearchResultsSection.js +1 -1
  333. package/dist/features/search/hooks/useSearch.d.ts +2 -2
  334. package/dist/features/seller/components/CouponInlineSelect.d.ts +22 -0
  335. package/dist/features/seller/components/CouponInlineSelect.js +103 -0
  336. package/dist/features/seller/components/GroupInlineSelect.d.ts +23 -0
  337. package/dist/features/seller/components/GroupInlineSelect.js +80 -0
  338. package/dist/features/seller/components/PhysicalLocationModal.js +2 -1
  339. package/dist/features/seller/components/PrintCenterView.js +2 -1
  340. package/dist/features/seller/components/ProductInlineSelect.d.ts +24 -0
  341. package/dist/features/seller/components/ProductInlineSelect.js +42 -0
  342. package/dist/features/seller/components/QuickProductForm.js +4 -1
  343. package/dist/features/seller/components/SellerAddressesView.js +8 -3
  344. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +6 -3
  345. package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
  346. package/dist/features/seller/components/SellerBidsView.js +7 -7
  347. package/dist/features/seller/components/SellerBundlesView.js +2 -1
  348. package/dist/features/seller/components/SellerCouponEditorView.d.ts +2 -0
  349. package/dist/features/seller/components/SellerCouponEditorView.js +15 -3
  350. package/dist/features/seller/components/SellerCouponsView.js +1 -1
  351. package/dist/features/seller/components/SellerDashboardView.js +2 -2
  352. package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
  353. package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -2
  354. package/dist/features/seller/components/SellerGroupedListingsView.js +5 -5
  355. package/dist/features/seller/components/SellerOrdersView.js +13 -10
  356. package/dist/features/seller/components/SellerPayoutMethodsView.js +5 -4
  357. package/dist/features/seller/components/SellerPayoutRequestView.js +5 -1
  358. package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -2
  359. package/dist/features/seller/components/SellerPreOrdersView.js +6 -6
  360. package/dist/features/seller/components/SellerPrizeDrawsView.js +6 -6
  361. package/dist/features/seller/components/SellerProductShell.js +1 -1
  362. package/dist/features/seller/components/SellerProductsCards.js +4 -1
  363. package/dist/features/seller/components/SellerProductsView.js +5 -5
  364. package/dist/features/seller/components/SellerReviewsView.js +7 -3
  365. package/dist/features/seller/components/SellerShippingConfigsView.js +4 -4
  366. package/dist/features/seller/components/SellerShippingView.js +1 -1
  367. package/dist/features/seller/components/SellerSidebar.js +15 -8
  368. package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
  369. package/dist/features/seller/components/SellerStorefrontView.js +2 -2
  370. package/dist/features/seller/components/SellerTemplatesView.js +7 -4
  371. package/dist/features/seller/components/SublistingInlineSelect.d.ts +19 -0
  372. package/dist/features/seller/components/SublistingInlineSelect.js +83 -0
  373. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  374. package/dist/features/seller/components/index.d.ts +8 -0
  375. package/dist/features/seller/components/index.js +4 -0
  376. package/dist/features/seller/hooks/useSellerPayouts.d.ts +3 -3
  377. package/dist/features/seller/hooks/useSellerStore.d.ts +6 -6
  378. package/dist/features/seller/hooks/useSellerStorefront.d.ts +2 -2
  379. package/dist/features/shell/FormShell.js +10 -2
  380. package/dist/features/shell/QuickFormDrawer.js +5 -5
  381. package/dist/features/shell/StepForm.js +6 -6
  382. package/dist/features/site-settings/components/ActionPermissionsManager.js +8 -4
  383. package/dist/features/site-settings/components/NavPermissionsManager.js +7 -4
  384. package/dist/features/stores/components/InteractiveStoreCard.js +5 -1
  385. package/dist/features/stores/components/StoreAboutView.js +4 -1
  386. package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +2 -1
  387. package/dist/features/stores/components/StoreAddressSelectorCreate.js +5 -31
  388. package/dist/features/stores/components/StoreAuctionsListing.js +6 -3
  389. package/dist/features/stores/components/StoreGuideHubView.js +5 -2
  390. package/dist/features/stores/components/StoreHeader.js +8 -1
  391. package/dist/features/stores/components/StorePreOrdersListing.js +6 -3
  392. package/dist/features/stores/components/StoreProductsListing.js +6 -3
  393. package/dist/features/stores/components/StoreReviewsListing.js +8 -2
  394. package/dist/features/stores/components/StoresIndexListing.js +12 -6
  395. package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +1 -1
  396. package/dist/features/stores/hooks/useStores.d.ts +6 -6
  397. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +7 -1
  398. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +2 -1
  399. package/dist/features/wishlist/components/WishlistPage.js +2 -1
  400. package/dist/features/wishlist/hooks/useUserWishlist.d.ts +15 -15
  401. package/dist/features/wishlist/hooks/useWishlist.d.ts +1 -1
  402. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  403. package/dist/index.d.ts +10 -0
  404. package/dist/index.js +13 -1
  405. package/dist/next/components/GlobalError.js +2 -2
  406. package/dist/next/routing/route-map.d.ts +2 -0
  407. package/dist/next/routing/route-map.js +1 -0
  408. package/dist/providers/db-firebase/base.repository.d.ts +1 -1
  409. package/dist/react/ErrorBoundary.js +2 -2
  410. package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
  411. package/dist/seed/manifest.js +10 -0
  412. package/dist/styles.css +2 -1
  413. package/dist/tailwind-utilities.css +1 -1
  414. package/dist/ui/DataTable.js +17 -16
  415. package/dist/ui/components/DateInput.js +2 -2
  416. package/dist/ui/components/DetailPageGallery.js +4 -1
  417. package/dist/ui/components/DetailPageTabs.js +6 -2
  418. package/dist/ui/components/ImageLightbox.js +5 -3
  419. package/dist/ui/components/Input.js +6 -3
  420. package/dist/ui/components/Layout.d.ts +4 -0
  421. package/dist/ui/components/Layout.js +1 -1
  422. package/dist/ui/components/Layout.style.css +1 -0
  423. package/dist/ui/components/ListingFilterDrawer.js +4 -1
  424. package/dist/ui/components/ListingLayout.js +9 -8
  425. package/dist/ui/components/ListingToolbar.js +5 -1
  426. package/dist/ui/components/PaginatedSelect.d.ts +1 -2
  427. package/dist/ui/components/PaginatedSelect.js +1 -2
  428. package/dist/ui/components/Radio.js +1 -1
  429. package/dist/ui/components/Select.js +2 -1
  430. package/dist/ui/components/Slider.js +1 -1
  431. package/dist/ui/components/VacationBanner.js +2 -1
  432. package/dist/ui/components/surface-tokens.d.ts +1 -0
  433. package/dist/ui/components/surface-tokens.js +1 -0
  434. package/package.json +22 -4
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback } from "react";
4
4
  import { Package } from "lucide-react";
5
- import { BaseListingCard, Caption, Span, StatusBadge, Text, TextLink, Button, } from "../../../ui";
5
+ import { BaseListingCard, Caption, Div, Span, StatusBadge, Text, TextLink, Button, } from "../../../ui";
6
6
  import { formatCurrency, formatDate } from "../../../utils";
7
7
  import { OrderStatusValues } from "../schemas";
8
8
  import { useLongPress } from "../../../react/hooks/useLongPress";
@@ -48,7 +48,7 @@ export function MarketplaceOrderCard({ order, links, labels, className = "", var
48
48
  const longPress = useLongPress(() => onSelect?.(orderId, !isSelected));
49
49
  const isListVariant = variant === "list";
50
50
  const itemCount = order.items?.length ?? 0;
51
- return (_jsxs("div", { className: `group relative overflow-hidden rounded-xl border border-zinc-200 bg-white transition-all duration-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 ${isSelected ? "ring-2 ring-primary-500 dark:ring-primary-400" : ""} ${className}`, onMouseDown: onSelect && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: onSelect && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: onSelect && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: onSelect && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: onSelect && !isSelected ? longPress.onTouchEnd : undefined, "data-section": "marketplaceordercard-div-411", children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: handleSelect, label: isSelected ? "Deselect order" : "Select order", position: "top-2 left-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), _jsxs("div", { className: `flex gap-4 p-4 ${isListVariant ? "flex-row items-center justify-between" : "flex-col"}`, "data-section": "marketplaceordercard-div-412", children: [_jsxs("div", { className: `flex items-start gap-3 ${selectable ? "pl-8" : ""} ${isListVariant ? "min-w-0 flex-1" : ""}`, "data-section": "marketplaceordercard-div-413", children: [_jsx("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-zinc-100 dark:bg-slate-800", "data-section": "marketplaceordercard-div-414", children: _jsx(Package, { className: "h-5 w-5 text-zinc-500 dark:text-slate-400" }) }), _jsxs("div", { className: "min-w-0 space-y-1", "data-section": "marketplaceordercard-div-415", children: [_jsx(TextLink, { href: detailHref, className: "leading-tight", children: _jsx(Text, { weight: "semibold", className: "truncate", children: order.productTitle ?? shortId }) }), _jsxs(Caption, { className: "font-mono text-xs", children: [mergedLabels.orderNumber, " ", shortId] }), _jsxs(Caption, { className: "text-xs", children: [mergedLabels.placedOn, " ", formatDate(order.orderDate)] }), itemCount > 1 && (_jsxs(Caption, { className: "text-xs", children: [mergedLabels.items, ": ", _jsx(Span, { weight: "medium", children: itemCount })] }))] })] }), _jsxs("div", { className: `flex ${isListVariant ? "flex-shrink-0 items-center gap-4" : "flex-col gap-3"}`, "data-section": "marketplaceordercard-div-416", children: [_jsxs("div", { className: `flex ${isListVariant ? "items-center gap-4" : "flex-wrap items-center justify-between gap-3"}`, "data-section": "marketplaceordercard-div-417", children: [_jsx(StatusBadge, { status: status, label: statusLabel }), _jsx(Text, { weight: "semibold", className: "tabular-nums", children: formatCurrency(order.totalPrice, order.currency) })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-section": "marketplaceordercard-div-418", children: [(isShipped || isDelivered) &&
51
+ return (_jsxs("div", { className: `group relative overflow-hidden rounded-xl border border-zinc-200 bg-white transition-all duration-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 ${isSelected ? "ring-2 ring-primary-500 dark:ring-primary-400" : ""} ${className}`, onMouseDown: onSelect && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: onSelect && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: onSelect && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: onSelect && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: onSelect && !isSelected ? longPress.onTouchEnd : undefined, "data-section": "marketplaceordercard-div-411", children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: handleSelect, label: isSelected ? "Deselect order" : "Select order", position: "top-2 left-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), _jsxs("div", { className: `flex gap-4 p-4 ${isListVariant ? "flex-row items-center justify-between" : "flex-col"}`, "data-section": "marketplaceordercard-div-412", children: [_jsxs("div", { className: `flex items-start gap-3 ${selectable ? "pl-8" : ""} ${isListVariant ? "min-w-0 flex-1" : ""}`, "data-section": "marketplaceordercard-div-413", children: [_jsx(Div, { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-zinc-100 dark:bg-slate-800", children: _jsx(Package, { className: "h-5 w-5 text-zinc-500 dark:text-slate-400" }) }), _jsxs(Div, { className: "min-w-0 space-y-1", children: [_jsx(TextLink, { href: detailHref, className: "leading-tight", children: _jsx(Text, { weight: "semibold", className: "truncate", children: order.productTitle ?? shortId }) }), _jsxs(Caption, { className: "font-mono text-xs", children: [mergedLabels.orderNumber, " ", shortId] }), _jsxs(Caption, { className: "text-xs", children: [mergedLabels.placedOn, " ", formatDate(order.orderDate)] }), itemCount > 1 && (_jsxs(Caption, { className: "text-xs", children: [mergedLabels.items, ": ", _jsx(Span, { weight: "medium", children: itemCount })] }))] })] }), _jsxs("div", { className: `flex ${isListVariant ? "flex-shrink-0 items-center gap-4" : "flex-col gap-3"}`, "data-section": "marketplaceordercard-div-416", children: [_jsxs("div", { className: `flex ${isListVariant ? "items-center gap-4" : "flex-wrap items-center justify-between gap-3"}`, "data-section": "marketplaceordercard-div-417", children: [_jsx(StatusBadge, { status: status, label: statusLabel }), _jsx(Text, { weight: "semibold", className: "tabular-nums", children: formatCurrency(order.totalPrice, order.currency) })] }), _jsxs(Div, { className: "flex flex-wrap items-center gap-2", children: [(isShipped || isDelivered) &&
52
52
  trackHref &&
53
53
  order.trackingNumber && (_jsx(Button, { variant: "ghost", size: "sm", className: CLS_ACTION_BUTTON, onClick: () => navigate(trackHref), children: mergedLabels.trackOrder })), isDelivered && reviewHref && (_jsx(Button, { variant: "outline", size: "sm", className: CLS_ACTION_BUTTON, onClick: () => navigate(reviewHref), children: mergedLabels.writeReview })), _jsx(Button, { variant: "secondary", size: "sm", className: CLS_ACTION_BUTTON, onClick: () => navigate(detailHref), children: mergedLabels.viewOrder })] })] })] })] }));
54
54
  }
@@ -3,6 +3,7 @@ import { Div, Pagination, Row, Span, Stack, Text } from "../../../ui";
3
3
  import { formatCurrency } from "../../../utils/number.formatter";
4
4
  import { getDefaultLocale } from "../../../core/baseline-resolver";
5
5
  import { THEME_CONSTANTS } from "../../../tokens";
6
+ const CLS_PRIZE_BADGE = "inline-flex items-center rounded-full bg-fuchsia-100 dark:bg-fuchsia-900/30 px-2.5 py-0.5 text-fuchsia-700 dark:text-fuchsia-300";
6
7
  const STATUS_COLORS = {
7
8
  pending: "bg-warning-surface text-warning",
8
9
  confirmed: "bg-info-surface text-info",
@@ -34,7 +35,7 @@ export function OrderCard({ order, onClick, labels = {} }) {
34
35
  .sort()[0];
35
36
  return (_jsxs(Div, { role: onClick ? "button" : undefined, tabIndex: onClick ? 0 : undefined, onKeyDown: onClick
36
37
  ? (e) => (e.key === "Enter" || e.key === " ") && onClick(order)
37
- : undefined, onClick: onClick ? () => onClick(order) : undefined, className: `rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-5 ${onClick ? "cursor-pointer transition hover:shadow-md" : ""}`, children: [_jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { children: [_jsxs(Text, { className: "text-xs text-neutral-500 dark:text-zinc-400", children: ["Order #", order.id.slice(-8).toUpperCase()] }), date && (_jsx(Text, { className: "mt-0.5 text-xs text-zinc-400 dark:text-zinc-400", children: date }))] }), _jsx(Span, { className: `rounded-full px-3 py-1 text-xs font-semibold capitalize ${statusColor}`, children: labels[order.orderStatus] ?? order.orderStatus.replace(/_/g, " ") })] }), revealsRemaining > 0 && (_jsxs(Row, { gap: "sm", className: "mt-2", children: [_jsxs(Span, { className: "inline-flex items-center rounded-full bg-fuchsia-100 dark:bg-fuchsia-900/30 px-2.5 py-0.5 text-xs font-semibold text-fuchsia-700 dark:text-fuchsia-300", children: [revealsRemaining, " ", revealsRemaining === 1 ? "reveal" : "reveals", " pending"] }), earliestDeadline && (_jsxs(Span, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: ["before ", new Date(earliestDeadline).toLocaleDateString(getDefaultLocale(), { month: "short", day: "numeric" })] }))] })), _jsxs(Row, { wrap: true, gap: "3", className: "mt-4", children: [order.items.slice(0, 3).map((item, i) => (_jsxs(Row, { className: "gap-2", children: [item.image && (_jsx(Div, { role: "img", "aria-label": item.title, className: "h-10 w-10 rounded-lg bg-center bg-cover", style: { backgroundImage: `url(${item.image})` } })), _jsxs(Div, { children: [_jsx(Text, { className: `text-sm font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp1}`, children: item.title }), _jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: ["\u00D7", item.quantity] })] })] }, i))), order.items.length > 3 && (_jsxs(Span, { className: "self-center text-xs text-zinc-400 dark:text-zinc-400", children: ["+", order.items.length - 3, " more"] }))] }), _jsxs(Row, { justify: "between", className: "mt-4 border-t border-neutral-100 dark:border-slate-700 pt-3", children: [_jsxs(Span, { className: "text-sm text-neutral-500 dark:text-zinc-400", children: [order.currency ?? "", " Total"] }), _jsx(Span, { className: "font-semibold text-neutral-900 dark:text-zinc-100", children: formatCurrency(order.total, order.currency) })] })] }));
38
+ : undefined, onClick: onClick ? () => onClick(order) : undefined, className: `rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-5 ${onClick ? "cursor-pointer transition hover:shadow-md" : ""}`, children: [_jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { children: [_jsxs(Text, { className: "text-xs text-neutral-500 dark:text-zinc-400", children: ["Order #", order.id.slice(-8).toUpperCase()] }), date && (_jsx(Text, { className: "mt-0.5 text-xs text-zinc-400 dark:text-zinc-400", children: date }))] }), _jsx(Span, { size: "xs", weight: "semibold", className: `rounded-full px-3 py-1 capitalize ${statusColor}`, children: labels[order.orderStatus] ?? order.orderStatus.replace(/_/g, " ") })] }), revealsRemaining > 0 && (_jsxs(Row, { gap: "sm", className: "mt-2", children: [_jsxs(Span, { size: "xs", weight: "semibold", className: CLS_PRIZE_BADGE, children: [revealsRemaining, " ", revealsRemaining === 1 ? "reveal" : "reveals", " pending"] }), earliestDeadline && (_jsxs(Span, { size: "xs", className: "text-zinc-500 dark:text-zinc-400", children: ["before ", new Date(earliestDeadline).toLocaleDateString(getDefaultLocale(), { month: "short", day: "numeric" })] }))] })), _jsxs(Row, { wrap: true, gap: "3", className: "mt-4", children: [order.items.slice(0, 3).map((item, i) => (_jsxs(Row, { className: "gap-2", children: [item.image && (_jsx(Div, { role: "img", "aria-label": item.title, className: "h-10 w-10 rounded-lg bg-center bg-cover", style: { backgroundImage: `url(${item.image})` } })), _jsxs(Div, { children: [_jsx(Text, { className: `text-sm font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp1}`, children: item.title }), _jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: ["\u00D7", item.quantity] })] })] }, i))), order.items.length > 3 && (_jsxs(Span, { size: "xs", className: "self-center text-zinc-400 dark:text-zinc-400", children: ["+", order.items.length - 3, " more"] }))] }), _jsxs(Row, { justify: "between", className: "mt-4 border-t border-neutral-100 dark:border-slate-700 pt-3", children: [_jsxs(Span, { size: "sm", className: "text-neutral-500 dark:text-zinc-400", children: [order.currency ?? "", " Total"] }), _jsx(Span, { weight: "semibold", className: "text-neutral-900 dark:text-zinc-100", children: formatCurrency(order.total, order.currency) })] })] }));
38
39
  }
39
40
  export function OrdersList({ orders, isLoading, onOrderClick, totalPages = 1, currentPage = 1, onPageChange, emptyLabel = "No orders found", }) {
40
41
  if (isLoading) {
@@ -3,6 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Badge, Div, Heading, Row, Stack, Text } from "../../../ui";
4
4
  import { formatCurrency } from "../../../utils/number.formatter";
5
5
  import { REFUND_COPY } from "../../../_internal/shared/features/orders/refund-copy";
6
+ const __P = {
7
+ p4: "p-4",
8
+ };
6
9
  function formatDate(d) {
7
10
  const dt = d instanceof Date ? d : new Date(d);
8
11
  return dt.toLocaleDateString("en-IN", { day: "numeric", month: "short", year: "numeric" });
@@ -19,5 +22,5 @@ export function RefundHistoryTable({ order, className = "" }) {
19
22
  const currency = order.currency ?? "INR";
20
23
  if (events.length === 0 && order.contestable !== false)
21
24
  return null;
22
- return (_jsxs(Div, { className: `rounded-xl border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900 ${className}`, children: [order.contestable === false && (_jsx(Div, { className: "rounded-t-xl bg-warning-surface px-4 py-3", children: _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(WarningIcon, {}), _jsx(Text, { size: "sm", weight: "semibold", className: "text-warning", children: REFUND_COPY.history.nonContestableBanner })] }) })), events.length > 0 && (_jsxs(Div, { className: "p-4", children: [_jsx(Heading, { level: 4, className: "mb-3 text-sm font-semibold text-zinc-700 dark:text-zinc-300", children: REFUND_COPY.history.heading }), _jsx(Stack, { gap: "none", children: events.map((e) => (_jsx(RefundRow, { event: e, currency: currency }, e.refundId))) })] }))] }));
25
+ return (_jsxs(Div, { className: `rounded-xl border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900 ${className}`, children: [order.contestable === false && (_jsx(Div, { className: "rounded-t-xl bg-warning-surface px-4 py-3", children: _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(WarningIcon, {}), _jsx(Text, { size: "sm", weight: "semibold", className: "text-warning", children: REFUND_COPY.history.nonContestableBanner })] }) })), events.length > 0 && (_jsxs(Div, { className: `${__P.p4}`, children: [_jsx(Heading, { level: 4, className: "mb-3 text-sm font-semibold text-zinc-700 dark:text-zinc-300", children: REFUND_COPY.history.heading }), _jsx(Stack, { gap: "none", children: events.map((e) => (_jsx(RefundRow, { event: e, currency: currency }, e.refundId))) })] }))] }));
23
26
  }
@@ -16,6 +16,7 @@ import { Button, Checkbox, Div, Span, Stack, Text, Textarea } from "../../../ui"
16
16
  import { REFUND_COPY } from "../../../_internal/shared/features/orders/refund-copy";
17
17
  import { formatCurrency } from "../../../utils/number.formatter";
18
18
  const ACK_COUNT = REFUND_COPY.request.acknowledgments.length;
19
+ const CLS_WARN_PANEL = "rounded-xl border border-amber-200 bg-warning-surface p-4 dark:border-amber-800";
19
20
  export function RefundRequestView({ order, onSubmitRequest, isLoading = false, className = "", }) {
20
21
  const [acknowledged, setAcknowledged] = useState(Array(ACK_COUNT).fill(false));
21
22
  const [reason, setReason] = useState("");
@@ -26,7 +27,7 @@ export function RefundRequestView({ order, onSubmitRequest, isLoading = false, c
26
27
  return (_jsx(Div, { className: `rounded-xl border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-800 dark:bg-zinc-900 ${className}`, children: _jsx(Text, { size: "sm", color: "muted", children: REFUND_COPY.request.nonRefundableMessage }) }));
27
28
  }
28
29
  if (order.contestable === false) {
29
- return (_jsx(Div, { className: `rounded-xl border border-amber-200 bg-warning-surface p-4 dark:border-amber-800 ${className}`, children: _jsx(Text, { size: "sm", className: "text-warning", children: REFUND_COPY.request.alreadyRefundedMessage }) }));
30
+ return (_jsx(Div, { className: `${CLS_WARN_PANEL} ${className}`, children: _jsx(Text, { size: "sm", className: "text-warning", children: REFUND_COPY.request.alreadyRefundedMessage }) }));
30
31
  }
31
32
  const handleToggle = (i) => setAcknowledged((prev) => prev.map((v, idx) => (idx === i ? !v : v)));
32
33
  const handleSubmit = async () => {
@@ -17,7 +17,7 @@ export declare function useOrder(id: string, opts?: {
17
17
  enabled?: boolean;
18
18
  endpoint?: string;
19
19
  }): {
20
- order: Order | undefined;
20
+ order: NoInfer<Order> | undefined;
21
21
  isLoading: boolean;
22
22
  error: Error | null;
23
23
  };
@@ -25,7 +25,7 @@ export declare function useTrackOrder(trackingId: string | null | undefined, opt
25
25
  enabled?: boolean;
26
26
  endpoint?: string;
27
27
  }): {
28
- trackingInfo: TrackingInfo | null;
28
+ trackingInfo: NonNullable<NoInfer<TrackingInfo | null>> | null;
29
29
  isLoading: boolean;
30
30
  error: Error | null;
31
31
  };
@@ -4,7 +4,7 @@ export declare function usePaymentSettings(opts?: {
4
4
  enabled?: boolean;
5
5
  endpoint?: string;
6
6
  }): {
7
- settings: PaymentSettings | undefined;
7
+ settings: NoInfer<PaymentSettings> | undefined;
8
8
  isLoading: boolean;
9
9
  error: Error | null;
10
10
  };
@@ -9,6 +9,10 @@ import { ROUTES } from "../../../next";
9
9
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
10
10
  import { formatCurrency } from "../../../utils";
11
11
  import { getDefaultCurrency } from "../../../core/baseline-resolver";
12
+ const CLS_PREORDER_BADGE = "inline-flex items-center rounded-full bg-amber-500 px-2 py-0.5 text-white";
13
+ const CLS_SALE_BADGE = "rounded-full bg-teal-600 px-2 py-0.5 text-xs font-bold text-white";
14
+ const CLS_TRENDING_BADGE = "rounded-full bg-indigo-600 px-2 py-0.5 text-xs font-bold text-white";
15
+ const CLS_LIMITED_BADGE = "rounded-full bg-sky-600 px-2 py-0.5 text-xs font-bold text-white";
12
16
  import { BaseListingCard, Button, Div, RichText, Row, Span, Text, TextLink, } from "../../../ui";
13
17
  import { normalizeRichTextHtml } from "../../../utils/string.formatter";
14
18
  import { THEME_CONSTANTS } from "../../../tokens";
@@ -52,7 +56,7 @@ export function MarketplacePreorderCard({ product, className = "", variant = "gr
52
56
  // The hook rolls back optimistic state when the mutation fails.
53
57
  }
54
58
  }, [toggle]);
55
- return (_jsxs(BaseListingCard, { isSelected: isSelected, variant: variant, className: className, onMouseDown: !isSelected ? longPress.onMouseDown : undefined, onMouseUp: !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: !isSelected ? longPress.onTouchEnd : undefined, children: [_jsxs(BaseListingCard.Hero, { aspect: "square", variant: variant, children: [_jsx(TextLink, { href: detailHref, className: "absolute inset-0 block", children: _jsx(MediaImage, { src: product.mainImage, alt: product.title, size: "card", fallback: "Product image" }) }), _jsxs(Div, { className: "absolute right-2 top-2 flex flex-col items-end gap-1", children: [_jsx(Span, { className: "inline-flex items-center rounded-full bg-cobalt px-2 py-0.5 text-xs font-medium text-white", children: mergedLabels.preOrderBadge }), product.featured && (_jsx(Span, { className: "inline-flex items-center rounded-full bg-amber-500 px-2 py-0.5 text-xs font-medium text-white", children: mergedLabels.featuredBadge }))] }), _jsxs(Div, { className: "absolute left-2 top-2 flex flex-col gap-1 pointer-events-none", children: [product.partOfBundleIds && product.partOfBundleIds.length > 0 && (_jsx(Span, { className: "rounded-full bg-teal-600 px-2 py-0.5 text-xs font-bold text-white", title: product.partOfBundleTitles?.[0] ? `In bundle: ${product.partOfBundleTitles[0]}` : "In a bundle", children: "Bundled" })), product.groupId && (_jsx(Span, { className: "rounded-full bg-indigo-600 px-2 py-0.5 text-xs font-bold text-white", title: product.groupTitle ? `Part of set: ${product.groupTitle}` : "Part of a set", children: product.isGroupParent ? "Set Parent" : "In Set" })), product.sublistingCategoryId && (_jsx(Span, { className: "rounded-full bg-sky-600 px-2 py-0.5 text-xs font-bold text-white", title: "Has variants or sub-listings", children: "Has Variants" }))] }), onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (event) => {
59
+ return (_jsxs(BaseListingCard, { isSelected: isSelected, variant: variant, className: className, onMouseDown: !isSelected ? longPress.onMouseDown : undefined, onMouseUp: !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: !isSelected ? longPress.onTouchEnd : undefined, children: [_jsxs(BaseListingCard.Hero, { aspect: "square", variant: variant, children: [_jsx(TextLink, { href: detailHref, className: "absolute inset-0 block", children: _jsx(MediaImage, { src: product.mainImage, alt: product.title, size: "card", fallback: "Product image" }) }), _jsxs(Div, { className: "absolute right-2 top-2 flex flex-col items-end gap-1", children: [_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex items-center rounded-full bg-cobalt px-2 py-0.5 text-white", children: mergedLabels.preOrderBadge }), product.featured && (_jsx(Span, { size: "xs", weight: "medium", className: CLS_PREORDER_BADGE, children: mergedLabels.featuredBadge }))] }), _jsxs(Div, { className: "absolute left-2 top-2 flex flex-col gap-1 pointer-events-none", children: [product.partOfBundleIds && product.partOfBundleIds.length > 0 && (_jsx(Span, { className: CLS_SALE_BADGE, title: product.partOfBundleTitles?.[0] ? `In bundle: ${product.partOfBundleTitles[0]}` : "In a bundle", children: "Bundled" })), product.groupId && (_jsx(Span, { className: CLS_TRENDING_BADGE, title: product.groupTitle ? `Part of set: ${product.groupTitle}` : "Part of a set", children: product.isGroupParent ? "Set Parent" : "In Set" })), product.sublistingCategoryId && (_jsx(Span, { className: CLS_LIMITED_BADGE, title: "Has variants or sub-listings", children: "Has Variants" }))] }), onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (event) => {
56
60
  event.stopPropagation();
57
61
  onSelect(product.id, !isSelected);
58
62
  }, className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" }))] }), _jsx(BaseListingCard.Info, { variant: variant, children: variant === "list" ? (
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useTransition } from "react";
4
- import { Button, Div, LoginRequiredModal, Stack, Text } from "../../../ui";
4
+ import { Button, Div, LoginRequiredModal, Span, Stack, Text } from "../../../ui";
5
5
  import { isAuthError } from "../../../utils/auth-error";
6
6
  import { formatCurrency } from "../../../utils/number.formatter";
7
7
  export function PreOrderActionsClient({ productId, price, currency, depositAmount, depositPercent, isCancellable, tags = [], onReserveNow, }) {
@@ -27,9 +27,9 @@ export function PreOrderActionsClient({ productId, price, currency, depositAmoun
27
27
  }
28
28
  });
29
29
  }
30
- return (_jsxs(Div, { className: "space-y-4", children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), error && (_jsx(Text, { className: "text-xs text-error", children: error })), success && (_jsx(Text, { className: "text-xs text-success", children: "\u2713 Reserved! Redirecting to checkout\u2026" })), _jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to reserve this pre-order. Please log in or create an account to continue." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: isPending, onClick: handleReserve, children: isPending ? "Processing…" : "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx("div", { className: "flex flex-wrap gap-1.5", children: tags.map((tag) => (_jsx("span", { className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-xs text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx("div", { className: "flex flex-wrap gap-4 justify-center text-center", children: [
30
+ return (_jsxs(Div, { className: "space-y-4", children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), error && (_jsx(Text, { className: "text-xs text-error", children: error })), success && (_jsx(Text, { className: "text-xs text-success", children: "\u2713 Reserved! Redirecting to checkout\u2026" })), _jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to reserve this pre-order. Please log in or create an account to continue." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: isPending, onClick: handleReserve, children: isPending ? "Processing…" : "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Div, { className: "flex flex-wrap gap-1.5", children: tags.map((tag) => (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Div, { className: "flex flex-wrap gap-4 justify-center text-center", children: [
31
31
  { icon: "🔒", label: "Secure\nPayment" },
32
32
  { icon: "📅", label: "Guaranteed\nDelivery" },
33
33
  { icon: "↩", label: "Free\nCancellation" },
34
- ].map(({ icon, label }) => (_jsxs("div", { className: "flex flex-col items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400 min-w-[60px]", children: [_jsx("span", { className: "text-base", children: icon }), _jsx("span", { className: "whitespace-pre-line leading-tight", children: label })] }, label))) }) })] }));
34
+ ].map(({ icon, label }) => (_jsxs(Div, { className: "flex flex-col items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400 min-w-[60px]", children: [_jsx(Span, { size: "base", children: icon }), _jsx(Span, { className: "whitespace-pre-line leading-tight", children: label })] }, label))) }) })] }));
35
35
  }
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Span } from "../../../ui";
3
+ const CLS_NEW_BADGE = "rounded-full bg-indigo-600 px-2.5 py-0.5 text-white";
3
4
  const STATUS_MAP = {
4
5
  pending: { label: "Pending", color: "bg-warning-surface text-warning" },
5
6
  confirmed: { label: "Confirmed", color: "bg-info-surface text-info" },
@@ -13,5 +14,5 @@ export function PreOrderBadge({ status, className = "" }) {
13
14
  }
14
15
  /** Small inline tag shown on a product that is available for pre-order */
15
16
  export function PreOrderTag({ label = "Pre-order", estimatedDate, className = "", }) {
16
- return (_jsxs(Div, { className: `inline-flex flex-col ${className}`, children: [_jsx(Span, { className: "rounded-full bg-indigo-600 px-2.5 py-0.5 text-xs font-bold text-white", children: label }), estimatedDate && (_jsxs(Span, { className: "mt-0.5 text-[10px] text-gray-400", children: ["Ships ", estimatedDate] }))] }));
17
+ return (_jsxs(Div, { className: `inline-flex flex-col ${className}`, children: [_jsx(Span, { size: "xs", weight: "bold", className: CLS_NEW_BADGE, children: label }), estimatedDate && (_jsxs(Span, { className: "mt-0.5 text-[10px] text-gray-400", children: ["Ships ", estimatedDate] }))] }));
17
18
  }
@@ -1,13 +1,22 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import Link from "next/link";
3
3
  import { productRepository } from "../../../repositories";
4
+ const __P = {
5
+ p3: "p-3",
6
+ p5: "p-5",
7
+ };
8
+ const __O = {
9
+ hidden: "overflow-hidden",
10
+ };
4
11
  const CLS_BREADCRUMB_LINK = "hover:text-primary-600 transition-colors";
12
+ const CLS_PREORDER_BADGE = "inline-block rounded-full bg-indigo-100 dark:bg-indigo-900/30 px-2.5 py-0.5 text-indigo-700 dark:text-indigo-300";
13
+ const CLS_STATUS_BADGE = "inline-block rounded-full bg-amber-100 dark:bg-amber-900/30 px-2.5 py-0.5 text-amber-800 dark:text-amber-200";
5
14
  import { ROUTES } from "../../../next";
6
15
  import { getDefaultCurrency } from "../../../core/baseline-resolver";
7
16
  import { formatCurrency } from "../../../utils/number.formatter";
8
17
  import { normalizeRichTextHtml } from "../../../utils/string.formatter";
9
18
  import { safeDisplayName } from "../../../security";
10
- import { Button, Container, Div, Heading, Main, RichText, Row, Section, Span, Stack, Text, } from "../../../ui";
19
+ import { Button, Container, Div, Heading, Main, Nav, RichText, Row, Section, Span, Stack, Text, Ul, Li, Dl, Dt, Dd, } from "../../../ui";
11
20
  import { PreOrderDetailView } from "../../products/components/PreOrderDetailView";
12
21
  import { PreOrderBottomActions } from "./PreOrderBottomActions";
13
22
  import { ProductTabsShell } from "../../products/components/ProductTabsShell";
@@ -32,7 +41,7 @@ const PRODUCTION_STATUS_LABELS = {
32
41
  ready_to_ship: "Ready to Ship",
33
42
  };
34
43
  function PreOrderInfoSection({ title, productionStatus, maxPerUser, deliveryDate, featured, freeShipping, condition, isCancellable, category, categoryName, brand, brandSlug, productFeatures, features, descriptionHtml, safeSeller, storeHref, }) {
35
- return (_jsxs(Stack, { gap: "md", children: [_jsxs(Div, { children: [_jsxs(Row, { gap: "xs", className: "mb-2 flex-wrap", children: [_jsx(Span, { className: "inline-block rounded-full bg-indigo-100 dark:bg-indigo-900/30 px-2.5 py-0.5 text-xs font-semibold text-indigo-700 dark:text-indigo-300", children: "Pre-Order" }), productionStatus && (_jsx(Span, { className: "inline-block rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-0.5 text-xs font-medium text-zinc-600 dark:text-zinc-300", children: PRODUCTION_STATUS_LABELS[productionStatus] ?? productionStatus })), maxPerUser !== null && (_jsxs(Span, { className: "inline-block rounded-full bg-amber-100 dark:bg-amber-900/30 px-2.5 py-0.5 text-xs font-medium text-amber-800 dark:text-amber-200", children: ["Limit: ", maxPerUser, " per customer"] }))] }), _jsx(Heading, { level: 1, className: "text-xl font-bold leading-snug text-zinc-900 dark:text-zinc-50 sm:text-2xl", children: title })] }), deliveryDate && (_jsxs(Row, { align: "center", gap: "xs", className: "text-sm text-zinc-600 dark:text-zinc-400", children: [_jsx(Span, { children: "\uD83D\uDCC5" }), _jsx(Span, { children: "Estimated delivery:" }), _jsx(Span, { className: "font-medium", children: deliveryDate.toLocaleDateString(undefined, { year: "numeric", month: "long" }) })] })), _jsx(ProductFeatureBadges, { featured: featured, freeShipping: freeShipping, condition: condition ?? undefined, returnable: isCancellable, labels: {
44
+ return (_jsxs(Stack, { gap: "md", children: [_jsxs(Div, { children: [_jsxs(Row, { gap: "xs", className: "mb-2 flex-wrap", children: [_jsx(Span, { size: "xs", weight: "semibold", className: CLS_PREORDER_BADGE, children: "Pre-Order" }), productionStatus && (_jsx(Span, { size: "xs", weight: "medium", className: "inline-block rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-0.5 text-zinc-600 dark:text-zinc-300", children: PRODUCTION_STATUS_LABELS[productionStatus] ?? productionStatus })), maxPerUser !== null && (_jsxs(Span, { size: "xs", weight: "medium", className: CLS_STATUS_BADGE, children: ["Limit: ", maxPerUser, " per customer"] }))] }), _jsx(Heading, { level: 1, className: "text-xl font-bold leading-snug text-zinc-900 dark:text-zinc-50 sm:text-2xl", children: title })] }), deliveryDate && (_jsxs(Row, { align: "center", gap: "xs", className: "text-sm text-zinc-600 dark:text-zinc-400", children: [_jsx(Span, { children: "\uD83D\uDCC5" }), _jsx(Span, { children: "Estimated delivery:" }), _jsx(Span, { weight: "medium", children: deliveryDate.toLocaleDateString(undefined, { year: "numeric", month: "long" }) })] })), _jsx(ProductFeatureBadges, { featured: featured, freeShipping: freeShipping, condition: condition ?? undefined, returnable: isCancellable, labels: {
36
45
  featured: "Featured",
37
46
  fasterDelivery: "Faster Delivery",
38
47
  ratedSeller: "Rated Seller",
@@ -46,14 +55,14 @@ function PreOrderInfoSection({ title, productionStatus, maxPerUser, deliveryDate
46
55
  codAvailable: "Cash on Delivery",
47
56
  wishlistCount: (n) => `${n} wishlisted`,
48
57
  categoryProductCount: (n, cat) => `${n} in ${cat}`,
49
- } }), (categoryName || category || brand) && (_jsxs(Row, { gap: "sm", wrap: true, children: [category && (_jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: categoryName || category })), !category && categoryName && (_jsx(Span, { className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-500 dark:text-zinc-400", children: categoryName })), brand && brandSlug && (_jsx(Link, { href: String(ROUTES.PUBLIC.BRAND_DETAIL(brandSlug)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: brand })), brand && !brandSlug && (_jsx(Span, { className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-500 dark:text-zinc-400", children: brand }))] })), productFeatures && features.length > 0 && (_jsx(FeatureBadgeList, { productFeatureIds: features, features: productFeatures })), !productFeatures && features.length > 0 && (_jsxs(Div, { className: "rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 px-4 py-3", children: [_jsx(Text, { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "About this product" }), _jsx("ul", { className: "space-y-1.5", children: features.map((f, i) => (_jsxs("li", { className: "flex items-start gap-2 text-sm text-zinc-700 dark:text-zinc-300", children: [_jsx(Span, { className: "mt-0.5 flex-shrink-0 text-primary-500", children: "\u2022" }), f] }, i))) })] })), descriptionHtml && (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "text-sm leading-relaxed text-zinc-600 dark:text-zinc-400 line-clamp-4" })), safeSeller && (_jsx(Div, { className: "rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 p-3", children: _jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-[10px] uppercase tracking-wide text-zinc-400 dark:text-zinc-400 mb-0.5", children: "Sold by" }), _jsx(Text, { className: "text-sm font-semibold text-zinc-800 dark:text-zinc-200", children: safeSeller })] }), storeHref && (_jsx(Link, { href: storeHref, className: "shrink-0 rounded-lg bg-primary/10 dark:bg-primary/20 px-3 py-1.5 text-xs font-semibold text-primary-700 dark:text-primary-300 hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors", children: "Visit Store \u2192" }))] }) }))] }));
58
+ } }), (categoryName || category || brand) && (_jsxs(Row, { gap: "sm", wrap: true, children: [category && (_jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: categoryName || category })), !category && categoryName && (_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-zinc-500 dark:text-zinc-400", children: categoryName })), brand && brandSlug && (_jsx(Link, { href: String(ROUTES.PUBLIC.BRAND_DETAIL(brandSlug)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: brand })), brand && !brandSlug && (_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-zinc-500 dark:text-zinc-400", children: brand }))] })), productFeatures && features.length > 0 && (_jsx(FeatureBadgeList, { productFeatureIds: features, features: productFeatures })), !productFeatures && features.length > 0 && (_jsxs(Div, { className: "rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 px-4 py-3", children: [_jsx(Text, { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "About this product" }), _jsx(Ul, { className: "space-y-1.5", children: features.map((f, i) => (_jsxs(Li, { className: "flex items-start gap-2 text-sm text-zinc-700 dark:text-zinc-300", children: [_jsx(Span, { className: "mt-0.5 flex-shrink-0 text-primary-500", children: "\u2022" }), f] }, i))) })] })), descriptionHtml && (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "text-sm leading-relaxed text-zinc-600 dark:text-zinc-400 line-clamp-4" })), safeSeller && (_jsx(Div, { className: `rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 ${__P.p3}`, children: _jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-[10px] uppercase tracking-wide text-zinc-400 dark:text-zinc-400 mb-0.5", children: "Sold by" }), _jsx(Text, { className: "text-sm font-semibold text-zinc-800 dark:text-zinc-200", children: safeSeller })] }), storeHref && (_jsx(Link, { href: storeHref, className: "shrink-0 rounded-lg bg-primary/10 dark:bg-primary/20 px-3 py-1.5 text-xs font-semibold text-primary-700 dark:text-primary-300 hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors", children: "Visit Store \u2192" }))] }) }))] }));
50
59
  }
51
60
  function PreOrderBuyBarPanel({ reserveTarget, reservedCount, progressPct, productId, price, currency, depositAmount, depositPercent, isCancellable, tags, onReserveNow, }) {
52
- return (_jsxs(Div, { id: "pre-order-buy-bar", className: "rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 p-5 space-y-4", children: [reserveTarget > 0 && (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: [reservedCount, " of ", reserveTarget, " reserved"] }), _jsxs(Span, { className: "text-xs font-semibold text-primary-600 dark:text-primary-400", children: [progressPct, "%"] })] }), _jsx(Div, { className: "h-2 w-full overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-700", children: _jsx(Div, { className: "h-full rounded-full bg-primary transition-all", style: { width: `${progressPct}%` } }) })] })), onReserveNow ? (_jsx(PreOrderActionsClient, { productId: productId, price: price, currency: currency, depositAmount: depositAmount, depositPercent: depositPercent, isCancellable: isCancellable, tags: tags, onReserveNow: onReserveNow })) : (_jsxs(_Fragment, { children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", children: "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-xs text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "sm", justify: "center", className: "text-center", children: [
61
+ return (_jsxs(Div, { id: "pre-order-buy-bar", className: `rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 ${__P.p5} space-y-4`, children: [reserveTarget > 0 && (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: [reservedCount, " of ", reserveTarget, " reserved"] }), _jsxs(Span, { size: "xs", weight: "semibold", className: "text-primary-600 dark:text-primary-400", children: [progressPct, "%"] })] }), _jsx(Div, { className: `h-2 w-full ${__O.hidden} rounded-full bg-zinc-200 dark:bg-zinc-700`, children: _jsx(Div, { className: "h-full rounded-full bg-primary transition-all", style: { width: `${progressPct}%` } }) })] })), onReserveNow ? (_jsx(PreOrderActionsClient, { productId: productId, price: price, currency: currency, depositAmount: depositAmount, depositPercent: depositPercent, isCancellable: isCancellable, tags: tags, onReserveNow: onReserveNow })) : (_jsxs(_Fragment, { children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", children: "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "sm", justify: "center", className: "text-center", children: [
53
62
  { icon: "🔒", label: "Secure\nPayment" },
54
63
  { icon: "📅", label: "Guaranteed\nDelivery" },
55
64
  { icon: "↩", label: "Free\nCancellation" },
56
- ].map(({ icon, label }) => (_jsxs(Div, { className: "flex flex-col items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400 min-w-[60px]", children: [_jsx(Span, { className: "text-base", children: icon }), _jsx(Span, { className: "whitespace-pre-line leading-tight", children: label })] }, label))) }) })] }))] }));
65
+ ].map(({ icon, label }) => (_jsxs(Div, { className: "flex flex-col items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400 min-w-[60px]", children: [_jsx(Span, { size: "base", children: icon }), _jsx(Span, { className: "whitespace-pre-line leading-tight", children: label })] }, label))) }) })] }))] }));
57
66
  }
58
67
  export async function PreOrderDetailPageView({ id, initialPreOrder, onReserveNow, productFeatures }) {
59
68
  const product = initialPreOrder !== undefined
@@ -139,11 +148,11 @@ export async function PreOrderDetailPageView({ id, initialPreOrder, onReserveNow
139
148
  price: typeof p.price === "number" ? p.price : undefined,
140
149
  storeId: typeof p.storeId === "string" ? p.storeId : undefined,
141
150
  storeName: typeof p.storeName === "string" ? p.storeName : undefined,
142
- } }), _jsxs(Container, { size: "xl", className: "px-4 py-6", children: [_jsxs("div", { className: "mb-4 flex items-center justify-between flex-wrap gap-2", children: [_jsxs("nav", { "aria-label": "Breadcrumb", className: "flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400 flex-wrap", children: [_jsx(Link, { href: String(ROUTES.HOME), className: CLS_BREADCRUMB_LINK, children: "Home" }), _jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRE_ORDERS), className: CLS_BREADCRUMB_LINK, children: "Pre-Orders" }), category && (_jsxs(_Fragment, { children: [_jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category)), className: CLS_BREADCRUMB_LINK, children: categoryName || category })] })), _jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Span, { className: "text-zinc-700 dark:text-zinc-300 truncate max-w-[200px]", children: title })] }), _jsx(ShareButton, { title: title })] }), _jsx(PreOrderDetailView, { renderGallery: () => (_jsx(ProductGalleryClient, { images: images, productName: title })), renderInfo: () => (_jsx(PreOrderInfoSection, { title: title, productionStatus: productionStatus, maxPerUser: maxPerUser, deliveryDate: deliveryDate, featured: featured, freeShipping: freeShipping, condition: condition, isCancellable: isCancellable, category: category, categoryName: categoryName, brand: brand, brandSlug: brandSlug, productFeatures: productFeatures, features: features, descriptionHtml: descriptionHtml, safeSeller: safeSeller, storeHref: storeHref })), renderSublistingSection: sublistingCategoryId
151
+ } }), _jsxs(Container, { size: "xl", className: "px-4 py-6", children: [_jsxs(Div, { className: "mb-4 flex items-center justify-between flex-wrap gap-2", children: [_jsxs(Nav, { "aria-label": "Breadcrumb", className: "flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400 flex-wrap", children: [_jsx(Link, { href: String(ROUTES.HOME), className: CLS_BREADCRUMB_LINK, children: "Home" }), _jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRE_ORDERS), className: CLS_BREADCRUMB_LINK, children: "Pre-Orders" }), category && (_jsxs(_Fragment, { children: [_jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category)), className: CLS_BREADCRUMB_LINK, children: categoryName || category })] })), _jsx(Span, { "aria-hidden": true, children: "/" }), _jsx(Span, { className: "text-zinc-700 dark:text-zinc-300 truncate max-w-[200px]", children: title })] }), _jsx(ShareButton, { title: title })] }), _jsx(PreOrderDetailView, { renderGallery: () => (_jsx(ProductGalleryClient, { images: images, productName: title })), renderInfo: () => (_jsx(PreOrderInfoSection, { title: title, productionStatus: productionStatus, maxPerUser: maxPerUser, deliveryDate: deliveryDate, featured: featured, freeShipping: freeShipping, condition: condition, isCancellable: isCancellable, category: category, categoryName: categoryName, brand: brand, brandSlug: brandSlug, productFeatures: productFeatures, features: features, descriptionHtml: descriptionHtml, safeSeller: safeSeller, storeHref: storeHref })), renderSublistingSection: sublistingCategoryId
143
152
  ? () => (_jsx(SublistingCarouselSection, { sublistingCategoryId: sublistingCategoryId, currentListingId: String(product.id) }))
144
153
  : undefined, renderGroupSection: groupId
145
154
  ? () => (_jsx(ShowGroupSection, { groupId: groupId, currentSlug: String(p.slug ?? product.id), isParent: isGroupParent, groupTitle: groupTitle }))
146
- : undefined, renderTabs: () => (_jsx(ProductTabsShell, { descriptionContent: descriptionHtml ? (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm sm:prose max-w-none dark:prose-invert", className: "text-zinc-700 dark:text-zinc-300" })) : undefined, specsContent: specs.length > 0 ? (_jsx("dl", { className: "divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800 overflow-hidden text-sm", children: specs.map((s, i) => (_jsxs("div", { className: "flex gap-4 px-4 py-3 bg-white dark:bg-zinc-900 even:bg-zinc-50 dark:even:bg-zinc-800/50", children: [_jsx("dt", { className: "w-36 flex-shrink-0 font-medium text-zinc-700 dark:text-zinc-300", children: s.name }), _jsxs("dd", { className: "flex-1 text-zinc-600 dark:text-zinc-400", children: [s.value, s.unit ? ` ${s.unit}` : ""] })] }, i))) })) : undefined, customTabs: customSections.map((s) => ({
155
+ : undefined, renderTabs: () => (_jsx(ProductTabsShell, { descriptionContent: descriptionHtml ? (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm sm:prose max-w-none dark:prose-invert", className: "text-zinc-700 dark:text-zinc-300" })) : undefined, specsContent: specs.length > 0 ? (_jsx(Dl, { className: "divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800 overflow-hidden text-sm", children: specs.map((s, i) => (_jsxs(Div, { className: "flex gap-4 px-4 py-3 bg-white dark:bg-zinc-900 even:bg-zinc-50 dark:even:bg-zinc-800/50", children: [_jsx(Dt, { className: "w-36 flex-shrink-0 font-medium text-zinc-700 dark:text-zinc-300", children: s.name }), _jsxs(Dd, { className: "flex-1 text-zinc-600 dark:text-zinc-400", children: [s.value, s.unit ? ` ${s.unit}` : ""] })] }, i))) })) : undefined, customTabs: customSections.map((s) => ({
147
156
  id: s.id,
148
157
  label: s.title,
149
158
  content: _jsx(CustomSectionTabContent, { section: s }),
@@ -4,7 +4,7 @@ import { useState, useCallback } from "react";
4
4
  import { Columns, Heart, ShoppingCart } from "lucide-react";
5
5
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
6
6
  import { useProducts } from "../../products/hooks/useProducts";
7
- import { BulkActionBar, FilterDrawer, ListingToolbar, LoginRequiredModal, Pagination, Text, useToast } from "../../../ui";
7
+ import { BulkActionBar, Div, FilterDrawer, ListingToolbar, LoginRequiredModal, Pagination, Text, useToast } from "../../../ui";
8
8
  import { usePendingTable } from "../../../react/hooks/usePendingTable";
9
9
  import { useAuthGate } from "../../../react/hooks/useAuthGate";
10
10
  import { ACTION_ID, ACTION_META, COMPARE_MAX_ITEMS } from "../../products/constants/action-defs";
@@ -21,6 +21,12 @@ import { useBulkSelection } from "../../../react/hooks/useBulkSelection";
21
21
  import { TABLE_KEYS, VIEW_MODE } from "../../../constants/table-keys";
22
22
  import { PREORDER_SORT_OPTIONS } from "../../products/constants/sieve";
23
23
  import { useBottomActions } from "../../layout";
24
+ const __P = {
25
+ p3: "p-3",
26
+ };
27
+ const __O = {
28
+ hidden: "overflow-hidden",
29
+ };
24
30
  const DEFAULT_SORT = PREORDER_SORT_OPTIONS[2].value;
25
31
  const FILTER_KEYS = [TABLE_KEYS.CATEGORY, TABLE_KEYS.BRAND, TABLE_KEYS.MIN_PRICE, TABLE_KEYS.MAX_PRICE, TABLE_KEYS.STORE_ID, TABLE_KEYS.PREORDER_STATUS, TABLE_KEYS.DATE_FROM, TABLE_KEYS.DATE_TO];
26
32
  export function PreOrdersIndexListing({ initialData, categorySlug, brandName }) {
@@ -121,39 +127,41 @@ export function PreOrdersIndexListing({ initialData, categorySlug, brandName })
121
127
  }, [localCart, showToast]);
122
128
  const selection = useBulkSelection({ items: preOrders, keyExtractor: (p) => p.id });
123
129
  const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4";
130
+ const handleBulkAddToCart = useCallback(() => {
131
+ const selected = preOrders.filter((p) => selection.selectedIdSet.has(p.id));
132
+ selected.forEach((p) => {
133
+ const snapshot = { productTitle: p.title, productImage: p.mainImage, price: p.price, storeId: p.storeId, storeName: p.storeName };
134
+ localCart.add(p.id, 1, snapshot);
135
+ pushCartOp({ op: "add", productId: p.id, quantity: 1, ...snapshot });
136
+ });
137
+ showToast(`${selected.length} items added to cart`, "success");
138
+ selection.clearSelection();
139
+ }, [preOrders, selection, localCart, showToast]);
140
+ const handleBulkAddToWishlist = useCallback(() => {
141
+ requireAuth(ACTION_ID.ADD_TO_WISHLIST, () => {
142
+ const selected = preOrders.filter((p) => selection.selectedIdSet.has(p.id));
143
+ selected.forEach((p) => {
144
+ localWishlist.add(p.id, "preorder");
145
+ pushWishlistOp({ op: "add", itemId: p.id, type: "preorder" });
146
+ });
147
+ showToast(`${selected.length} items added to wishlist`, "success");
148
+ selection.clearSelection();
149
+ });
150
+ }, [preOrders, selection, localWishlist, showToast, requireAuth]);
124
151
  useBottomActions(selection.selectedCount > 0 ? { bulk: { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
125
152
  {
126
153
  id: ACTION_ID.ADD_TO_CART,
127
154
  label: ACTION_META[ACTION_ID.ADD_TO_CART].label,
128
155
  icon: _jsx(ShoppingCart, { className: "h-3.5 w-3.5" }),
129
156
  variant: "primary",
130
- onClick: () => {
131
- const selected = preOrders.filter((p) => selection.selectedIdSet.has(p.id));
132
- selected.forEach((p) => {
133
- const snapshot = { productTitle: p.title, productImage: p.mainImage, price: p.price, storeId: p.storeId, storeName: p.storeName };
134
- localCart.add(p.id, 1, snapshot);
135
- pushCartOp({ op: "add", productId: p.id, quantity: 1, ...snapshot });
136
- });
137
- showToast(`${selected.length} items added to cart`, "success");
138
- selection.clearSelection();
139
- },
157
+ onClick: handleBulkAddToCart,
140
158
  },
141
159
  {
142
160
  id: ACTION_ID.ADD_TO_WISHLIST,
143
161
  label: ACTION_META[ACTION_ID.ADD_TO_WISHLIST].label,
144
162
  icon: _jsx(Heart, { className: "h-3.5 w-3.5" }),
145
163
  variant: "secondary",
146
- onClick: () => {
147
- requireAuth(ACTION_ID.ADD_TO_WISHLIST, () => {
148
- const selected = preOrders.filter((p) => selection.selectedIdSet.has(p.id));
149
- selected.forEach((p) => {
150
- localWishlist.add(p.id, "preorder");
151
- pushWishlistOp({ op: "add", itemId: p.id, type: "preorder" });
152
- });
153
- showToast(`${selected.length} items added to wishlist`, "success");
154
- selection.clearSelection();
155
- });
156
- },
164
+ onClick: handleBulkAddToWishlist,
157
165
  },
158
166
  {
159
167
  id: ACTION_ID.COMPARE,
@@ -167,7 +175,7 @@ export function PreOrdersIndexListing({ initialData, categorySlug, brandName })
167
175
  },
168
176
  },
169
177
  ] } } : {});
170
- return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search pre-orders...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, onSearchKeyDown: handleSearchKeyDown, sortValue: table.get(TABLE_KEYS.SORT) || DEFAULT_SORT, sortOptions: PREORDER_SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState, bulkMode: selection.isSelecting, bulkSelectedCount: selection.selectedCount, bulkTotalCount: preOrders.length, onBulkSelectAll: selection.toggleAll, onBulkClear: selection.clearSelection, toggles: [
178
+ return (_jsxs(Div, { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search pre-orders...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, onSearchKeyDown: handleSearchKeyDown, sortValue: table.get(TABLE_KEYS.SORT) || DEFAULT_SORT, sortOptions: PREORDER_SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState, bulkMode: selection.isSelecting, bulkSelectedCount: selection.selectedCount, bulkTotalCount: preOrders.length, onBulkSelectAll: selection.toggleAll, onBulkClear: selection.clearSelection, toggles: [
171
179
  { label: "Show closed", active: showClosed, onChange: (next) => table.set(TABLE_KEYS.SHOW_CLOSED, next ? "true" : "") },
172
180
  ] }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
173
181
  {
@@ -214,7 +222,7 @@ export function PreOrdersIndexListing({ initialData, categorySlug, brandName })
214
222
  setCompareIds(ids);
215
223
  },
216
224
  },
217
- ] }), 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: isLoading ? (_jsx("div", { className: gridClass, 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-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" }), _jsx("div", { className: "h-8 bg-zinc-200 dark:bg-slate-700 rounded" })] })] }, i))) })) : preOrders.length === 0 ? (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "No pre-orders found." })) : view === "list" ? (_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: preOrders.map((product) => (_jsx(MarketplacePreorderCard, { product: product, variant: "list", hrefBuilder: (p) => String(ROUTES.PUBLIC.PRE_ORDER_DETAIL(p.id)), onAddToCart: handleAddToCart, wishlistActions: wishlistActions, selectable: selection.isSelecting, isSelected: selection.isSelected(product.id), onSelect: (id) => selection.toggle(id) }, product.id))) })) : (_jsx("div", { className: gridClass, children: preOrders.map((product) => (_jsx(MarketplacePreorderCard, { product: product, variant: "grid", hrefBuilder: (p) => String(ROUTES.PUBLIC.PRE_ORDER_DETAIL(p.id)), onAddToCart: handleAddToCart, wishlistActions: wishlistActions, selectable: selection.isSelecting, isSelected: selection.isSelected(product.id), onSelect: (id) => selection.toggle(id) }, product.id))) })) }), _jsx(CompareOverlay, { isOpen: compareIds.length > 0, productIds: compareIds, productType: "preorder", onClose: () => {
225
+ ] }), 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: isLoading ? (_jsx(Div, { className: gridClass, 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-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" }), _jsx(Div, { className: "h-8 bg-zinc-200 dark:bg-slate-700 rounded" })] })] }, i))) })) : preOrders.length === 0 ? (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "No pre-orders found." })) : view === "list" ? (_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: preOrders.map((product) => (_jsx(MarketplacePreorderCard, { product: product, variant: "list", hrefBuilder: (p) => String(ROUTES.PUBLIC.PRE_ORDER_DETAIL(p.id)), onAddToCart: handleAddToCart, wishlistActions: wishlistActions, selectable: selection.isSelecting, isSelected: selection.isSelected(product.id), onSelect: (id) => selection.toggle(id) }, product.id))) })) : (_jsx(Div, { className: gridClass, children: preOrders.map((product) => (_jsx(MarketplacePreorderCard, { product: product, variant: "grid", hrefBuilder: (p) => String(ROUTES.PUBLIC.PRE_ORDER_DETAIL(p.id)), onAddToCart: handleAddToCart, wishlistActions: wishlistActions, selectable: selection.isSelecting, isSelected: selection.isSelected(product.id), onSelect: (id) => selection.toggle(id) }, product.id))) })) }), _jsx(CompareOverlay, { isOpen: compareIds.length > 0, productIds: compareIds, productType: "preorder", onClose: () => {
218
226
  setCompareIds([]);
219
227
  selection.clearSelection();
220
228
  }, onRemove: (id) => setCompareIds((ids) => ids.filter((i) => i !== id)) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(PreOrderFilters, { table: pendingTable, currencyPrefix: "\u20B9", categoryOptions: categoryOptions, brandOptions: brandOptions }) }), _jsx(LoginRequiredModal, { isOpen: modalOpen, onClose: closeModal, message: modalMessage })] }));
@@ -1,7 +1,7 @@
1
1
  import type { PreorderItem } from "../types";
2
2
  export declare function usePreorders(opts?: {
3
3
  endpoint?: string;
4
- }): import("@tanstack/react-query").UseQueryResult<PreorderItem[], Error>;
4
+ }): import("@tanstack/react-query").UseQueryResult<NoInfer<PreorderItem[]>, Error>;
5
5
  export declare function usePreorder(slug: string | undefined, opts?: {
6
6
  endpoint?: string;
7
- }): import("@tanstack/react-query").UseQueryResult<PreorderItem | null, Error>;
7
+ }): import("@tanstack/react-query").UseQueryResult<NoInfer<PreorderItem | null>, Error>;
@@ -2,6 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Div, Row, Span } from "../../../ui";
3
3
  import { MediaImage } from "../../media/MediaImage";
4
4
  import { formatCurrency as defaultFormatCurrency } from "../../../utils/number.formatter";
5
+ const __O = {
6
+ hidden: "overflow-hidden",
7
+ };
5
8
  const STATUS_STYLES = {
6
9
  published: "bg-green-100 text-green-800 dark:bg-green-900/40 dark:text-green-300",
7
10
  draft: "bg-zinc-100 text-zinc-700 dark:bg-slate-700 dark:text-zinc-300",
@@ -9,6 +12,8 @@ const STATUS_STYLES = {
9
12
  discontinued: "bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300",
10
13
  sold: "bg-primary/10 dark:bg-primary/20 text-primary",
11
14
  };
15
+ const CLS_LOW_STOCK = "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200";
16
+ const CLS_DELETE = "text-red-600 hover:text-red-800 dark:text-red-400";
12
17
  export function getProductTableColumns({ labels, onEdit, onDelete, currencyCode, locale, formatCurrency = defaultFormatCurrency, }) {
13
18
  const columns = [
14
19
  {
@@ -16,7 +21,7 @@ export function getProductTableColumns({ labels, onEdit, onDelete, currencyCode,
16
21
  header: labels.title,
17
22
  sortable: true,
18
23
  width: "25%",
19
- render: (product) => (_jsxs(Row, { gap: "sm", children: [product.mainImage ? (_jsx(Div, { className: "relative h-8 w-8 flex-shrink-0 overflow-hidden rounded", children: _jsx(MediaImage, { src: product.mainImage, alt: product.title, size: "thumbnail" }) })) : (_jsx(Div, { className: "h-8 w-8 flex-shrink-0 rounded bg-zinc-200 dark:bg-slate-700" })), _jsx(Span, { className: "max-w-[180px] truncate font-medium", children: product.title })] })),
24
+ render: (product) => (_jsxs(Row, { gap: "sm", children: [product.mainImage ? (_jsx(Div, { className: `relative h-8 w-8 flex-shrink-0 ${__O.hidden} rounded`, children: _jsx(MediaImage, { src: product.mainImage, alt: product.title, size: "thumbnail" }) })) : (_jsx(Div, { className: "h-8 w-8 flex-shrink-0 rounded bg-zinc-200 dark:bg-slate-700" })), _jsx(Span, { weight: "medium", className: "max-w-[180px] truncate", children: product.title })] })),
20
25
  },
21
26
  {
22
27
  key: "category",
@@ -58,7 +63,7 @@ export function getProductTableColumns({ labels, onEdit, onDelete, currencyCode,
58
63
  header: labels.seller,
59
64
  sortable: true,
60
65
  width: "15%",
61
- render: (product) => (_jsx(Span, { className: "block max-w-[120px] truncate text-sm", children: product.storeName ?? "-" })),
66
+ render: (product) => (_jsx(Span, { size: "sm", className: "block max-w-[120px] truncate", children: product.storeName ?? "-" })),
62
67
  },
63
68
  {
64
69
  key: "featured",
@@ -70,7 +75,7 @@ export function getProductTableColumns({ labels, onEdit, onDelete, currencyCode,
70
75
  return (_jsx(Span, { className: [
71
76
  "rounded px-2 py-1 text-xs font-medium",
72
77
  featured
73
- ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200"
78
+ ? CLS_LOW_STOCK
74
79
  : "bg-zinc-100 text-zinc-700 dark:bg-slate-700 dark:text-zinc-300",
75
80
  ].join(" "), children: featured ? labels.yes : labels.no }));
76
81
  },
@@ -82,6 +87,6 @@ export function getProductTableColumns({ labels, onEdit, onDelete, currencyCode,
82
87
  }, className: "text-primary hover:text-primary/80", children: labels.edit }), _jsx(Button, { variant: "ghost", type: "button", onClick: (e) => {
83
88
  e.stopPropagation();
84
89
  onDelete(product);
85
- }, className: "text-red-600 hover:text-red-800 dark:text-red-400", children: labels.delete })] }));
90
+ }, className: CLS_DELETE, children: labels.delete })] }));
86
91
  return { columns, actions };
87
92
  }
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useCallback } from "react";
4
4
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
5
5
  import { useProducts } from "../hooks/useProducts";
6
- import { Pagination, useToast, ListingToolbar, BulkActionBar, LoginRequiredModal, FilterDrawer } from "../../../ui";
6
+ import { Div, Pagination, useToast, ListingToolbar, BulkActionBar, LoginRequiredModal, FilterDrawer } from "../../../ui";
7
7
  import { usePendingTable } from "../../../react/hooks/usePendingTable";
8
8
  import { useBulkSelection } from "../../../react/hooks/useBulkSelection";
9
9
  import { MarketplaceAuctionGrid } from "../../auctions/components/MarketplaceAuctionGrid";
@@ -17,6 +17,12 @@ import { useAuthGate } from "../../../react/hooks/useAuthGate";
17
17
  import { ACTION_ID } from "../constants/action-defs";
18
18
  import { AUCTION_PUBLIC_SORT_OPTIONS } from "../constants/sieve";
19
19
  import { useBottomActions } from "../../layout";
20
+ const __P = {
21
+ p3: "p-3",
22
+ };
23
+ const __O = {
24
+ hidden: "overflow-hidden",
25
+ };
20
26
  const DEFAULT_SORT = AUCTION_PUBLIC_SORT_OPTIONS[0].value;
21
27
  const AUCTION_SORT_OPTIONS = AUCTION_PUBLIC_SORT_OPTIONS;
22
28
  const FILTER_KEYS = [TABLE_KEYS.CATEGORY, TABLE_KEYS.BRAND, TABLE_KEYS.MIN_BID, TABLE_KEYS.MAX_BID, TABLE_KEYS.STORE_ID, TABLE_KEYS.DATE_FROM, TABLE_KEYS.DATE_TO];
@@ -126,7 +132,7 @@ export function AuctionsIndexListing({ initialData, categorySlug, brandName }) {
126
132
  },
127
133
  },
128
134
  ] } } : {});
129
- return (_jsxs("div", { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search auctions...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, onSearchKeyDown: handleSearchKeyDown, sortValue: table.get(TABLE_KEYS.SORT) || DEFAULT_SORT, sortOptions: AUCTION_SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState, bulkMode: selection.isSelecting, bulkSelectedCount: selection.selectedCount, bulkTotalCount: auctions.length, onBulkSelectAll: selection.toggleAll, onBulkClear: selection.clearSelection, toggles: [
135
+ return (_jsxs(Div, { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search auctions...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, onSearchKeyDown: handleSearchKeyDown, sortValue: table.get(TABLE_KEYS.SORT) || DEFAULT_SORT, sortOptions: AUCTION_SORT_OPTIONS, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState, bulkMode: selection.isSelecting, bulkSelectedCount: selection.selectedCount, bulkTotalCount: auctions.length, onBulkSelectAll: selection.toggleAll, onBulkClear: selection.clearSelection, toggles: [
130
136
  { label: "Show ended", active: showEnded, onChange: (next) => table.set(TABLE_KEYS.SHOW_ENDED, next ? "true" : "") },
131
137
  ] }), _jsx(BulkActionBar, { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
132
138
  {
@@ -149,5 +155,5 @@ export function AuctionsIndexListing({ initialData, categorySlug, brandName }) {
149
155
  selection.clearSelection();
150
156
  },
151
157
  },
152
- ] }), 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: isLoading ? (_jsx("div", { className: gridClass, 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-4 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" }), _jsx("div", { className: "h-8 bg-zinc-200 dark:bg-slate-700 rounded" })] })] }, i))) })) : (_jsx(MarketplaceAuctionGrid, { auctions: auctions, variant: view === "list" ? "list" : "grid", gridClassName: view === "list" ? "flex flex-col gap-4" : gridClass, wishlistActions: wishlistActions })) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(AuctionFilters, { table: pendingTable, currencyPrefix: "\u20B9", categoryOptions: categoryOptions, brandOptions: brandOptions }) }), _jsx(LoginRequiredModal, { isOpen: modalOpen, onClose: closeModal, message: modalMessage })] }));
158
+ ] }), 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: isLoading ? (_jsx(Div, { className: gridClass, 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-4 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" }), _jsx(Div, { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" }), _jsx(Div, { className: "h-8 bg-zinc-200 dark:bg-slate-700 rounded" })] })] }, i))) })) : (_jsx(MarketplaceAuctionGrid, { auctions: auctions, variant: view === "list" ? "list" : "grid", gridClassName: view === "list" ? "flex flex-col gap-4" : gridClass, wishlistActions: wishlistActions })) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(AuctionFilters, { table: pendingTable, currencyPrefix: "\u20B9", categoryOptions: categoryOptions, brandOptions: brandOptions }) }), _jsx(LoginRequiredModal, { isOpen: modalOpen, onClose: closeModal, message: modalMessage })] }));
153
159
  }
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
- import { Heading, Span, Text } from "../../../ui";
3
+ import { Div, Heading, Span, Text } from "../../../ui";
4
4
  import { formatCurrency } from "../../../utils/number.formatter";
5
5
  function formatBidDate(raw) {
6
6
  if (!raw)
@@ -21,7 +21,7 @@ export function BidHistory({ isLoading = false, isEmpty = false, renderList, ren
21
21
  if (isLoading) {
22
22
  if (renderSkeleton)
23
23
  return _jsx(_Fragment, { children: renderSkeleton() });
24
- return (_jsx("div", { className: "animate-pulse space-y-2", "data-section": "bidhistory-div-419", children: Array.from({ length: 3 }).map((_, i) => (_jsx("div", { className: "h-10 rounded-lg bg-zinc-100 dark:bg-zinc-800" }, i))) }));
24
+ return (_jsx(Div, { className: "animate-pulse space-y-2", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-10 rounded-lg bg-zinc-100 dark:bg-zinc-800" }, i))) }));
25
25
  }
26
26
  if (isEmpty) {
27
27
  if (renderEmpty)
@@ -29,6 +29,6 @@ export function BidHistory({ isLoading = false, isEmpty = false, renderList, ren
29
29
  return (_jsx(Text, { variant: "secondary", size: "sm", className: "py-4", children: labels.noHistory ?? "No bids yet." }));
30
30
  }
31
31
  if (renderList)
32
- return _jsx("div", { className: className, "data-section": "bidhistory-div-420", children: renderList() });
33
- return (_jsxs("div", { className: className, "data-section": "bidhistory-div-421", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-3 text-sm font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: labels.title })), _jsx("div", { className: "space-y-2", children: bids.map((bid, i) => renderBid ? (_jsx(React.Fragment, { children: renderBid(bid, i) }, bid.id)) : (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-zinc-100 dark:border-zinc-800 bg-white dark:bg-zinc-900 p-3 text-sm", "data-section": "bidhistory-div-422", children: [_jsx(Span, { className: "font-bold text-primary-600 dark:text-primary-400", children: currency ? formatCurrency(bid.amount, currency) : bid.amount.toLocaleString() }), _jsx(Span, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: formatBidDate(bid.placedAt) })] }, bid.id))) })] }));
32
+ return _jsx(Div, { className: className, children: renderList() });
33
+ return (_jsxs(Div, { className: className, children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-3 text-sm font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: labels.title })), _jsx(Div, { className: "space-y-2", children: bids.map((bid, i) => renderBid ? (_jsx(React.Fragment, { children: renderBid(bid, i) }, bid.id)) : (_jsxs("div", { className: "flex items-center justify-between rounded-lg border border-zinc-100 dark:border-zinc-800 bg-white dark:bg-zinc-900 p-3 text-sm", "data-section": "bidhistory-div-422", children: [_jsx(Span, { weight: "bold", className: "text-primary-600 dark:text-primary-400", children: currency ? formatCurrency(bid.amount, currency) : bid.amount.toLocaleString() }), _jsx(Span, { size: "xs", className: "text-zinc-400 dark:text-zinc-400", children: formatBidDate(bid.placedAt) })] }, bid.id))) })] }));
34
34
  }