@mohasinac/appkit 2.8.10 → 3.0.1

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 (339) hide show
  1. package/dist/_internal/client/features/layout/SidebarCollapseToggle.js +1 -5
  2. package/dist/_internal/server/features/auctions/actions.js +0 -1
  3. package/dist/_internal/server/features/auctions/og.js +0 -1
  4. package/dist/_internal/server/features/auctions/service.js +0 -4
  5. package/dist/_internal/server/features/auth/capabilities.js +0 -1
  6. package/dist/_internal/server/features/blog/actions.js +0 -2
  7. package/dist/_internal/server/features/brands/actions.js +0 -2
  8. package/dist/_internal/server/features/cart/actions.js +0 -3
  9. package/dist/_internal/server/features/checkout/actions.js +11 -20
  10. package/dist/_internal/server/features/events/actions.js +0 -3
  11. package/dist/_internal/server/features/events/og.js +0 -1
  12. package/dist/_internal/server/features/events/service.js +0 -2
  13. package/dist/_internal/server/features/grouped/data.js +0 -2
  14. package/dist/_internal/server/features/orders/actions.js +0 -4
  15. package/dist/_internal/server/features/pre-orders/actions.js +0 -1
  16. package/dist/_internal/server/features/pre-orders/og.js +0 -1
  17. package/dist/_internal/server/features/pre-orders/service.js +0 -1
  18. package/dist/_internal/server/features/products/actions.js +0 -6
  19. package/dist/_internal/server/features/products/service.js +0 -1
  20. package/dist/_internal/server/features/promotions/actions.js +0 -3
  21. package/dist/_internal/server/features/reviews/actions.js +0 -3
  22. package/dist/_internal/server/functions/https.js +0 -6
  23. package/dist/_internal/server/functions/manifest.js +0 -1
  24. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
  25. package/dist/_internal/server/jobs/core/wrapJobHandler.js +0 -1
  26. package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
  27. package/dist/_internal/shared/serialization/index.js +0 -4
  28. package/dist/_internal/shared/styles/themed.js +0 -3
  29. package/dist/client/api/ApiError.js +1 -4
  30. package/dist/client/api/surface-error.js +0 -1
  31. package/dist/client/api/useApiQuery.js +0 -1
  32. package/dist/configs/next.js +0 -1
  33. package/dist/configs/tailwind.js +0 -1
  34. package/dist/contracts/field-ops.js +0 -2
  35. package/dist/core/EventBus.js +0 -2
  36. package/dist/core/Logger.js +0 -6
  37. package/dist/core/Queue.js +0 -2
  38. package/dist/core/hooks/useSyncManager.js +4 -4
  39. package/dist/core/mutation-events.js +0 -1
  40. package/dist/core/newsletter.repository.js +2 -6
  41. package/dist/errors/api-error.js +0 -1
  42. package/dist/errors/authentication-error.js +0 -1
  43. package/dist/errors/authorization-error.js +0 -1
  44. package/dist/errors/base-error.js +1 -3
  45. package/dist/errors/database-error.js +0 -1
  46. package/dist/errors/error-handler.js +1 -5
  47. package/dist/errors/error-mapping.js +1 -6
  48. package/dist/errors/normalize.js +0 -4
  49. package/dist/errors/not-found-error.js +0 -1
  50. package/dist/errors/razorpay-unreachable.js +0 -1
  51. package/dist/errors/validation-error.js +0 -1
  52. package/dist/features/about/components/FAQPageView.js +1 -3
  53. package/dist/features/about/components/FeesView.js +1 -3
  54. package/dist/features/about/components/HelpPageView.js +1 -3
  55. package/dist/features/about/components/PublicProfileView.js +4 -4
  56. package/dist/features/account/components/AddressBook.js +1 -3
  57. package/dist/features/account/components/AddressForm.js +0 -1
  58. package/dist/features/account/components/AddressesIndexListing.js +0 -1
  59. package/dist/features/account/components/MessagesView.js +1 -3
  60. package/dist/features/account/components/NotificationBell.js +3 -14
  61. package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
  62. package/dist/features/account/components/UserOffersPanel.js +0 -2
  63. package/dist/features/account/components/UserSidebar.js +1 -3
  64. package/dist/features/admin/components/AdminBlogEditorView.js +0 -1
  65. package/dist/features/admin/components/AdminBundleEditorView.js +0 -1
  66. package/dist/features/admin/components/AdminBundlesView.js +0 -1
  67. package/dist/features/admin/components/AdminCarouselEditorView.js +1 -5
  68. package/dist/features/admin/components/AdminCarouselView.js +1 -4
  69. package/dist/features/admin/components/AdminCartsView.js +0 -1
  70. package/dist/features/admin/components/AdminMediaView.js +1 -3
  71. package/dist/features/admin/components/AdminPayoutsView.js +0 -1
  72. package/dist/features/admin/components/AdminProductsView.js +1 -3
  73. package/dist/features/admin/components/AdminSidebar.js +1 -3
  74. package/dist/features/admin/components/AdminSiteSettingsView.js +1 -5
  75. package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -13
  76. package/dist/features/admin/components/DashboardStats.js +1 -7
  77. package/dist/features/admin/components/DataListingView.js +1 -5
  78. package/dist/features/admin/components/DataTable.js +1 -3
  79. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +1 -3
  80. package/dist/features/admin/components/analytics/AdminStatCard.js +1 -7
  81. package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -3
  82. package/dist/features/admin/components/sections/adminSectionsBuildParse.js +0 -5
  83. package/dist/features/admin/hooks/useAdminListingData.js +0 -5
  84. package/dist/features/admin/hooks/useChat.js +0 -3
  85. package/dist/features/admin/repository/chat.repository.js +0 -1
  86. package/dist/features/admin/repository/notification.repository.js +1 -4
  87. package/dist/features/auctions/components/AuctionBidsTable.js +1 -7
  88. package/dist/features/auctions/components/AuctionDetailPageView.js +1 -6
  89. package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -15
  90. package/dist/features/auctions/components/PlaceBidFormClient.js +0 -3
  91. package/dist/features/auctions/repository/bid.repository.js +0 -1
  92. package/dist/features/auth/components/ForgotPasswordView.js +0 -1
  93. package/dist/features/auth/components/LoginForm.js +0 -1
  94. package/dist/features/auth/components/RegisterForm.js +0 -1
  95. package/dist/features/auth/components/ResetPasswordView.js +0 -1
  96. package/dist/features/auth/hooks/useAuth.js +0 -1
  97. package/dist/features/auth/repository/session.repository.js +0 -1
  98. package/dist/features/auth/repository/token.repository.js +0 -2
  99. package/dist/features/auth/repository/user.repository.js +0 -1
  100. package/dist/features/blog/api/[slug]/route.js +1 -1
  101. package/dist/features/blog/components/BlogFeaturedCard.js +1 -5
  102. package/dist/features/blog/components/BlogIndexListing.js +0 -1
  103. package/dist/features/blog/components/BlogListView.js +1 -5
  104. package/dist/features/blog/components/BlogPostView.js +1 -3
  105. package/dist/features/cart/components/CartDrawer.js +2 -6
  106. package/dist/features/cart/repository/cart.repository.js +0 -1
  107. package/dist/features/categories/api/route.js +0 -1
  108. package/dist/features/categories/components/BrandDetailPageView.js +1 -13
  109. package/dist/features/categories/components/BundleDetailView.js +1 -5
  110. package/dist/features/categories/components/BundleItemsPicker.js +1 -5
  111. package/dist/features/categories/components/CategoriesIndexListing.js +0 -1
  112. package/dist/features/categories/components/CategoriesIndexPageView.js +0 -1
  113. package/dist/features/categories/components/CategoryBundlesListing.js +1 -3
  114. package/dist/features/categories/components/CategoryDetailPageView.js +1 -16
  115. package/dist/features/categories/components/CategoryGrid.js +1 -5
  116. package/dist/features/categories/components/CategorySelectorCreate.js +0 -1
  117. package/dist/features/categories/components/CategoryTableColumns.js +2 -6
  118. package/dist/features/categories/components/CategoryTree.js +1 -3
  119. package/dist/features/categories/components/ConcernCard.js +1 -3
  120. package/dist/features/collections/components/CollectionCard.js +1 -5
  121. package/dist/features/contact/email.js +0 -1
  122. package/dist/features/events/actions/event-actions.js +0 -1
  123. package/dist/features/events/api/[id]/route.js +0 -1
  124. package/dist/features/events/components/AdminEventEditorView.js +1 -2
  125. package/dist/features/events/components/EventCard.js +2 -8
  126. package/dist/features/events/components/EventRaffleEntryForm.js +1 -3
  127. package/dist/features/events/components/EventRaffleWinnerView.js +1 -3
  128. package/dist/features/events/components/EventRafflesSection.js +0 -1
  129. package/dist/features/events/components/EventsIndexListing.js +0 -1
  130. package/dist/features/events/hooks/useBulkEvent.js +0 -1
  131. package/dist/features/events/repository/event-entry.repository.js +0 -1
  132. package/dist/features/faq/components/ContactCTA.js +1 -3
  133. package/dist/features/faq/components/FAQAccordion.js +1 -3
  134. package/dist/features/faq/components/FAQCategorySidebar.js +1 -3
  135. package/dist/features/faq/components/RelatedFAQs.js +1 -5
  136. package/dist/features/filters/AsyncFacetSection.js +1 -3
  137. package/dist/features/filters/FilterFacetSection.js +4 -14
  138. package/dist/features/forms/Checkbox.js +1 -3
  139. package/dist/features/forms/Slider.js +1 -3
  140. package/dist/features/history/hooks/useHistory.js +0 -1
  141. package/dist/features/history/repository/user-history.repository.js +0 -2
  142. package/dist/features/homepage/actions/carousel-actions.js +0 -1
  143. package/dist/features/homepage/actions/homepage-section-actions.js +1 -3
  144. package/dist/features/homepage/api/carousel/route.js +0 -1
  145. package/dist/features/homepage/api/route.js +0 -1
  146. package/dist/features/homepage/components/AdSlot.js +3 -9
  147. package/dist/features/homepage/components/AdvertisementBanner.js +2 -12
  148. package/dist/features/homepage/components/BeforeAfterCard.js +1 -5
  149. package/dist/features/homepage/components/CharacterHotspotForm.js +2 -10
  150. package/dist/features/homepage/components/CollectionCardsSection.js +1 -3
  151. package/dist/features/homepage/components/CustomCardsSection.js +1 -5
  152. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -3
  153. package/dist/features/homepage/components/GoogleReviewsSection.js +1 -3
  154. package/dist/features/homepage/components/HeroCarousel.js +5 -26
  155. package/dist/features/homepage/components/HeroSection.js +2 -6
  156. package/dist/features/homepage/components/HowItWorksSection.js +2 -8
  157. package/dist/features/homepage/components/MarketplaceHomepageView.js +0 -8
  158. package/dist/features/homepage/components/NewsletterBanner.js +2 -10
  159. package/dist/features/homepage/components/PromoGrid.js +1 -3
  160. package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -6
  161. package/dist/features/homepage/components/ShopByCategorySection.js +2 -6
  162. package/dist/features/homepage/components/SocialPostCard.js +1 -3
  163. package/dist/features/homepage/components/StatsCounterSection.js +1 -5
  164. package/dist/features/homepage/components/TrustBadges.js +1 -3
  165. package/dist/features/homepage/components/TrustFeaturesSection.js +1 -3
  166. package/dist/features/homepage/components/WelcomeSection.js +2 -16
  167. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -5
  168. package/dist/features/homepage/lib/social-feed-fetcher.js +0 -8
  169. package/dist/features/layout/AppLayoutShell.js +1 -3
  170. package/dist/features/layout/BottomNavbar.js +1 -11
  171. package/dist/features/media/MediaAudio.js +2 -6
  172. package/dist/features/media/MediaImage.js +0 -1
  173. package/dist/features/media/MediaLightbox.js +3 -9
  174. package/dist/features/media/MediaVideo.js +2 -8
  175. package/dist/features/media/upload/MediaUploadField.js +1 -3
  176. package/dist/features/messages/hooks/useConversation.js +0 -2
  177. package/dist/features/messages/hooks/useConversations.js +0 -1
  178. package/dist/features/messages/repository/conversations.repository.js +0 -1
  179. package/dist/features/orders/api/track/[trackingId]/route.js +0 -1
  180. package/dist/features/orders/components/OrdersList.js +1 -3
  181. package/dist/features/orders/components/RefundHistoryTable.js +1 -3
  182. package/dist/features/orders/repository/orders.repository.js +0 -2
  183. package/dist/features/payments/repository/payout.repository.js +0 -1
  184. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -6
  185. package/dist/features/pre-orders/components/PreOrderActionsClient.js +0 -1
  186. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -3
  187. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -5
  188. package/dist/features/products/api/route.js +1 -3
  189. package/dist/features/products/components/CompareOverlay.js +1 -6
  190. package/dist/features/products/components/FeatureBadge.js +1 -3
  191. package/dist/features/products/components/MakeOfferButton.js +0 -2
  192. package/dist/features/products/components/MarketplaceBundleCard.js +1 -3
  193. package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -3
  194. package/dist/features/products/components/PrizeDrawDetailPageView.js +0 -2
  195. package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -3
  196. package/dist/features/products/components/PrizeDrawsSection.js +1 -3
  197. package/dist/features/products/components/ProductDetailPageView.js +0 -6
  198. package/dist/features/products/components/ProductFeatureBadges.js +1 -3
  199. package/dist/features/products/components/ProductFeaturesSelector.js +0 -1
  200. package/dist/features/products/components/ProductGrid.js +5 -15
  201. package/dist/features/products/components/ShareButton.js +1 -1
  202. package/dist/features/products/components/ShowGroupSection.js +3 -7
  203. package/dist/features/products/components/SublistingCarouselSection.js +2 -4
  204. package/dist/features/products/repository/product-features.repository.js +0 -1
  205. package/dist/features/products/repository/products.repository.js +0 -1
  206. package/dist/features/promotions/components/CouponCard.js +2 -5
  207. package/dist/features/promotions/repository/coupons.repository.js +0 -1
  208. package/dist/features/reviews/api/route.js +0 -1
  209. package/dist/features/reviews/components/ReviewDetailShell.js +3 -13
  210. package/dist/features/reviews/components/ReviewModal.js +1 -5
  211. package/dist/features/reviews/components/ReviewSummary.js +2 -6
  212. package/dist/features/reviews/components/ReviewsIndexListing.js +0 -1
  213. package/dist/features/reviews/components/ReviewsList.js +1 -7
  214. package/dist/features/reviews/repository/reviews.repository.js +0 -3
  215. package/dist/features/scams/actions/scam-actions.js +1 -1
  216. package/dist/features/scams/components/ScamProfileView.js +1 -3
  217. package/dist/features/search/components/Search.js +2 -8
  218. package/dist/features/search/components/SearchFiltersRow.js +1 -3
  219. package/dist/features/seller/components/PhysicalLocationModal.js +1 -5
  220. package/dist/features/seller/components/SellerAddressesView.js +1 -6
  221. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -4
  222. package/dist/features/seller/components/SellerBidsView.js +1 -3
  223. package/dist/features/seller/components/SellerBundlesView.js +0 -1
  224. package/dist/features/seller/components/SellerCouponEditorView.js +1 -3
  225. package/dist/features/seller/components/SellerFeaturesView.js +0 -1
  226. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  227. package/dist/features/seller/components/SellerLiveView.js +1 -3
  228. package/dist/features/seller/components/SellerOffersPanel.js +0 -2
  229. package/dist/features/seller/components/SellerOrdersView.js +1 -6
  230. package/dist/features/seller/components/SellerPayoutMethodsView.js +0 -1
  231. package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
  232. package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
  233. package/dist/features/seller/components/SellerProductShell.js +2 -4
  234. package/dist/features/seller/components/SellerProductsCards.js +1 -3
  235. package/dist/features/seller/components/SellerProductsView.js +1 -7
  236. package/dist/features/seller/components/SellerReviewsView.js +1 -4
  237. package/dist/features/seller/components/SellerShippingConfigsView.js +1 -4
  238. package/dist/features/seller/components/SellerShippingView.js +1 -1
  239. package/dist/features/seller/components/SellerSidebar.js +4 -12
  240. package/dist/features/seller/components/SellerStoreCategoriesView.js +0 -2
  241. package/dist/features/seller/components/SellerTemplatesView.js +0 -1
  242. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -3
  243. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -3
  244. package/dist/features/seller/hooks/useSellerListingData.js +0 -5
  245. package/dist/features/seller/repository/offer.repository.js +0 -1
  246. package/dist/features/server-errors/repository/server-errors.repository.js +0 -2
  247. package/dist/features/shell/FormShell.js +2 -15
  248. package/dist/features/shell/QuickFormDrawer.js +1 -5
  249. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -3
  250. package/dist/features/site-settings/components/ThemeManagerView.js +0 -1
  251. package/dist/features/stores/api/[storeSlug]/reviews/route.js +0 -1
  252. package/dist/features/stores/components/StoreGuideHubView.js +1 -1
  253. package/dist/features/stores/components/StoreHeader.js +1 -7
  254. package/dist/features/stores/components/StoreReviewsListing.js +0 -1
  255. package/dist/features/stores/components/StoresIndexListing.js +0 -1
  256. package/dist/features/stores/repository/store.repository.js +0 -2
  257. package/dist/features/support/repository/support.repository.js +0 -1
  258. package/dist/features/wishlist/components/WishlistPage.js +1 -3
  259. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
  260. package/dist/features/wishlist/repository/user-wishlist.repository.js +0 -2
  261. package/dist/http/ApiClient.js +4 -12
  262. package/dist/index.js +0 -1
  263. package/dist/monitoring/client-logger.js +7 -22
  264. package/dist/monitoring/error-tracking.js +0 -1
  265. package/dist/monitoring/performance.js +0 -1
  266. package/dist/monitoring/server-logger.js +11 -33
  267. package/dist/next/api/api-response.js +1 -4
  268. package/dist/next/api/apiHandler.js +1 -5
  269. package/dist/next/api/errorHandler.js +0 -3
  270. package/dist/next/api/parseJsonBody.js +0 -1
  271. package/dist/next/api/routeHandler.js +1 -8
  272. package/dist/next/cache-middleware.js +1 -3
  273. package/dist/next/middleware/chain.js +0 -1
  274. package/dist/next/middleware/pii-scrubber.js +0 -2
  275. package/dist/providers/auth-firebase/provider.js +0 -1
  276. package/dist/providers/db-firebase/admin.js +0 -1
  277. package/dist/providers/db-firebase/base.js +0 -4
  278. package/dist/providers/db-firebase/base.repository.js +0 -3
  279. package/dist/providers/db-firebase/field-ops.js +0 -2
  280. package/dist/providers/db-firebase/helpers.js +0 -4
  281. package/dist/providers/db-firebase/realtime.js +3 -15
  282. package/dist/providers/db-firebase/sieve.js +2 -8
  283. package/dist/providers/payment-razorpay/index.js +0 -3
  284. package/dist/providers/shipping-shiprocket/index.js +0 -1
  285. package/dist/providers/storage-firebase/client.js +0 -4
  286. package/dist/react/contexts/SessionContext.js +0 -1
  287. package/dist/react/hooks/useCountdown.js +0 -1
  288. package/dist/security/authorization.js +0 -1
  289. package/dist/security/pii-encrypt.js +0 -4
  290. package/dist/security/pii-redact.js +0 -3
  291. package/dist/seed/manifest.js +1 -6
  292. package/dist/seed/runner.js +0 -2
  293. package/dist/styles.css +1 -1
  294. package/dist/tailwind-utilities.css +1 -1
  295. package/dist/ui/DataTable.js +2 -6
  296. package/dist/ui/components/Anchor.js +0 -1
  297. package/dist/ui/components/AvatarDisplay.js +1 -3
  298. package/dist/ui/components/BackgroundRenderer.js +2 -6
  299. package/dist/ui/components/BaseListingCard.js +0 -1
  300. package/dist/ui/components/Button.js +0 -4
  301. package/dist/ui/components/Card.js +2 -6
  302. package/dist/ui/components/Details.js +2 -8
  303. package/dist/ui/components/Dialog.js +0 -1
  304. package/dist/ui/components/FallbackShell.js +5 -17
  305. package/dist/ui/components/Fieldset.js +2 -6
  306. package/dist/ui/components/HorizontalRule.js +0 -1
  307. package/dist/ui/components/HotspotMarker.js +1 -3
  308. package/dist/ui/components/IconBox.js +0 -1
  309. package/dist/ui/components/Iframe.js +0 -1
  310. package/dist/ui/components/ImageGallery.js +1 -3
  311. package/dist/ui/components/ImageLightbox.js +1 -5
  312. package/dist/ui/components/Kbd.js +0 -1
  313. package/dist/ui/components/Motion.js +1 -3
  314. package/dist/ui/components/NavbarChevron.js +0 -1
  315. package/dist/ui/components/PasswordStrengthIndicator.js +1 -3
  316. package/dist/ui/components/Progress.js +2 -6
  317. package/dist/ui/components/Quote.js +1 -4
  318. package/dist/ui/components/Responsive.js +0 -4
  319. package/dist/ui/components/RowActionMenu.js +1 -3
  320. package/dist/ui/components/Scrim.js +0 -1
  321. package/dist/ui/components/SiteLogo.js +1 -9
  322. package/dist/ui/components/Skeleton.js +1 -3
  323. package/dist/ui/components/Slider.js +1 -3
  324. package/dist/ui/components/StickyToolbar.js +0 -1
  325. package/dist/ui/components/TabStrip.js +1 -3
  326. package/dist/ui/components/Toast.js +1 -3
  327. package/dist/ui/components/Tooltip.js +1 -4
  328. package/dist/ui/components/UnsavedChangesModal.js +1 -3
  329. package/dist/ui/rich-text/RichText.js +1 -1
  330. package/dist/utils/action-response.js +0 -1
  331. package/dist/utils/date.formatter.js +0 -1
  332. package/dist/utils/object.helper.js +0 -2
  333. package/dist/utils/schema-ui.js +1 -3
  334. package/dist/validation/input.validator.js +0 -1
  335. package/dist/validation/schemas.js +1 -3
  336. package/package.json +5 -2
  337. package/scripts/bundle-css.mjs +47 -0
  338. package/scripts/copy-assets.mjs +34 -0
  339. package/scripts/dedupe-peer-deps.mjs +81 -0
@@ -101,7 +101,6 @@ export async function CategoryDetailPageView({ slug }) {
101
101
  itemsSold: s.stats?.itemsSold,
102
102
  totalReviews: s.stats?.totalReviews,
103
103
  averageRating: s.stats?.averageRating,
104
- // audit-unknown-ok: TS structural escape — primitive cast
105
104
  createdAt: s.createdAt,
106
105
  }));
107
106
  const productCount = productsResult?.total ?? category?.metrics?.productCount ?? 0;
@@ -113,21 +112,7 @@ export async function CategoryDetailPageView({ slug }) {
113
112
  const totalCount = productCount + auctionCount + preOrderCount + prizeDrawCount + bundleCount + storeCount;
114
113
  const coverImage = category?.display?.coverImage;
115
114
  const hasCover = Boolean(coverImage);
116
- return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative ${__O.hidden} ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover",
117
- // audit-inline-style-ok: dynamic image URL
118
- style: { backgroundImage: `url(${coverImage})` } }), _jsx(Div, { surface: "overlay-md", className: "absolute inset-0" })] })), _jsxs(Div, { className: `relative z-10 max-w-7xl mx-auto ${hasCover ? "py-12" : "py-8"}`, padding: "x-md", children: [_jsxs(Nav, { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORIES), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Categories" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Span, { weight: "medium", className: hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-100", children: category?.name ?? slug })] }), _jsx(Heading, { color: "inverse", level: 1, className: `mb-2 ${hasCover ? "" : "text-zinc-900 dark:text-zinc-50"}`, size: "3xl", mdSize: "4xl", weight: "bold", children: category?.name ?? slug }), category?.description && typeof category.description === "string" && !category.description.startsWith("{") && (
119
- // audit-variant-ok: category description — conditional muted-zinc fallback when no cover; inverse default keeps over-image legibility
120
- _jsx(Text, { color: "inverse", className: `max-w-2xl mb-4 ${hasCover ? "/80" : "text-zinc-600 dark:text-zinc-400"}`, size: "base", children: category.description })), _jsxs(Row, { wrap: true, gap: "sm", children: [productCount > 0 && (
121
- // audit-variant-ok: count chip — conditional translucent-white (cover) OR tinted primary (no cover); no white-overlay surface variant
122
- _jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, rounded: "full", padding: "pill-sm-tall", children: [productCount.toLocaleString(), " ", productCount === 1 ? "product" : "products"] })), auctionCount > 0 && (
123
- // audit-variant-ok: count chip — conditional translucent-white (cover) OR warning surface (no cover); compound bg cannot use Span.surface
124
- _jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-warning-surface text-warning dark:bg-warning-surface dark:text-warning"}`, rounded: "full", padding: "pill-sm-tall", children: [auctionCount.toLocaleString(), " ", auctionCount === 1 ? "auction" : "auctions"] })), preOrderCount > 0 && (
125
- // audit-variant-ok: count chip — conditional translucent-white (cover) OR info surface (no cover); compound bg cannot use Span.surface
126
- _jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-info-surface text-info dark:bg-info-surface dark:text-info"}`, rounded: "full", padding: "pill-sm-tall", children: [preOrderCount.toLocaleString(), " ", preOrderCount === 1 ? "pre-order" : "pre-orders"] })), storeCount > 0 && (
127
- // audit-variant-ok: count chip — conditional translucent-white (cover) OR success surface (no cover); compound bg cannot use Span.surface
128
- _jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-success-surface text-success dark:bg-success-surface dark:text-success"}`, rounded: "full", padding: "pill-sm-tall", children: [storeCount.toLocaleString(), " ", storeCount === 1 ? "store" : "stores"] }))] })] })] }), childCategories.length > 0 && (_jsx(Section, { border: "subtle", surface: "default", className: "border-b", children: _jsx(Div, { className: "max-w-7xl mx-auto", padding: "inline", children: _jsx(Div, { layout: "flex", gap: "2", className: `.5 ${__O.xAuto}`, padding: "b-2xs",
129
- // audit-inline-style-ok: dynamic CSS
130
- style: { scrollbarWidth: "none" }, children: childCategories.map((child) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(child.slug)), className: "flex-shrink-0 flex items-center gap-1.5 rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-4 py-1.5 text-sm font-medium text-zinc-700 dark:text-zinc-200 hover:border-primary hover:text-primary transition-colors whitespace-nowrap", children: [child.display?.icon && (_jsx(Span, { className: "leading-none", children: child.display.icon })), child.name, (child.metrics?.productCount ?? 0) > 0 && (_jsx(Span, { size: "xs", color: "muted", children: (child.metrics?.productCount ?? 0).toLocaleString() }))] }, child.id))) }) }) })), _jsx(Section, { padding: "y-lg", children: _jsx(Container, { size: "xl", children: _jsx(CategoryDetailTabs, { categorySlug: slug, categoryId: category?.id, initialProductsData: productsResult ?? undefined, initialBundles: bundlesResult ?? [], initialStores: categoryStores, counts: {
115
+ return (_jsxs(Main, { children: [_jsxs(Section, { className: `relative ${__O.hidden} ${hasCover ? "min-h-[220px] md:min-h-[280px]" : "bg-zinc-50 dark:bg-zinc-900"}`, children: [hasCover && (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute inset-0 bg-center bg-cover", style: { backgroundImage: `url(${coverImage})` } }), _jsx(Div, { surface: "overlay-md", className: "absolute inset-0" })] })), _jsxs(Div, { className: `relative z-10 max-w-7xl mx-auto ${hasCover ? "py-12" : "py-8"}`, padding: "x-md", children: [_jsxs(Nav, { className: "flex items-center gap-1.5 text-sm mb-4", "aria-label": "Breadcrumb", children: [_jsx(Link, { href: String(ROUTES.HOME), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Home" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORIES), className: hasCover ? "text-white/70 hover:text-white transition-colors" : "text-zinc-500 dark:text-zinc-400 hover:text-primary-600 transition-colors", children: "Categories" }), _jsx(Span, { className: hasCover ? "text-white/40" : "text-zinc-400", children: "/" }), _jsx(Span, { weight: "medium", className: hasCover ? "text-white" : "text-zinc-900 dark:text-zinc-100", children: category?.name ?? slug })] }), _jsx(Heading, { color: "inverse", level: 1, className: `mb-2 ${hasCover ? "" : "text-zinc-900 dark:text-zinc-50"}`, size: "3xl", mdSize: "4xl", weight: "bold", children: category?.name ?? slug }), category?.description && typeof category.description === "string" && !category.description.startsWith("{") && (_jsx(Text, { color: "inverse", className: `max-w-2xl mb-4 ${hasCover ? "/80" : "text-zinc-600 dark:text-zinc-400"}`, size: "base", children: category.description })), _jsxs(Row, { wrap: true, gap: "sm", children: [productCount > 0 && (_jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-primary/10 text-primary-700 dark:text-primary-400"}`, rounded: "full", padding: "pill-sm-tall", children: [productCount.toLocaleString(), " ", productCount === 1 ? "product" : "products"] })), auctionCount > 0 && (_jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-warning-surface text-warning dark:bg-warning-surface dark:text-warning"}`, rounded: "full", padding: "pill-sm-tall", children: [auctionCount.toLocaleString(), " ", auctionCount === 1 ? "auction" : "auctions"] })), preOrderCount > 0 && (_jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-info-surface text-info dark:bg-info-surface dark:text-info"}`, rounded: "full", padding: "pill-sm-tall", children: [preOrderCount.toLocaleString(), " ", preOrderCount === 1 ? "pre-order" : "pre-orders"] })), storeCount > 0 && (_jsxs(Span, { layout: "inline-flex", gap: "xs", color: "inverse", size: "xs", weight: "medium", className: `${hasCover ? "bg-white/20 backdrop-blur-sm" : "bg-success-surface text-success dark:bg-success-surface dark:text-success"}`, rounded: "full", padding: "pill-sm-tall", children: [storeCount.toLocaleString(), " ", storeCount === 1 ? "store" : "stores"] }))] })] })] }), childCategories.length > 0 && (_jsx(Section, { border: "subtle", surface: "default", className: "border-b", children: _jsx(Div, { className: "max-w-7xl mx-auto", padding: "inline", children: _jsx(Div, { layout: "flex", gap: "2", className: `.5 ${__O.xAuto}`, padding: "b-2xs", style: { scrollbarWidth: "none" }, children: childCategories.map((child) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(child.slug)), className: "flex-shrink-0 flex items-center gap-1.5 rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-4 py-1.5 text-sm font-medium text-zinc-700 dark:text-zinc-200 hover:border-primary hover:text-primary transition-colors whitespace-nowrap", children: [child.display?.icon && (_jsx(Span, { className: "leading-none", children: child.display.icon })), child.name, (child.metrics?.productCount ?? 0) > 0 && (_jsx(Span, { size: "xs", color: "muted", children: (child.metrics?.productCount ?? 0).toLocaleString() }))] }, child.id))) }) }) })), _jsx(Section, { padding: "y-lg", children: _jsx(Container, { size: "xl", children: _jsx(CategoryDetailTabs, { categorySlug: slug, categoryId: category?.id, initialProductsData: productsResult ?? undefined, initialBundles: bundlesResult ?? [], initialStores: categoryStores, counts: {
131
116
  products: productCount,
132
117
  auctions: auctionCount,
133
118
  preOrders: preOrderCount,
@@ -11,11 +11,7 @@ const __O = {
11
11
  const CLS_FEATURED_DOT = "absolute left-2 top-2 rounded-full bg-warning-surface p-1 leading-none";
12
12
  export function CategoryCard({ category, href, onClick, className = "", }) {
13
13
  const productCount = category.metrics?.productCount ?? category.productCount ?? 0;
14
- const inner = (_jsxs(Stack, { className: "h-full", children: [_jsxs(Div, { surface: "muted", className: `relative aspect-[4/3] w-full ${__O.hidden} flex-shrink-0`, children: [category.display?.coverImage ? (_jsx(Div, { role: "img", "aria-label": category.name, className: "h-full w-full bg-center bg-cover transition-transform duration-300 group-hover:scale-105",
15
- // audit-inline-style-ok: dynamic image URL
16
- style: { backgroundImage: `url(${category.display.coverImage})` } })) : category.display?.color ? (_jsx(Div, { className: "h-full w-full opacity-80",
17
- // audit-inline-style-ok: runtime theme color
18
- style: { backgroundColor: category.display.color } })) : null, category.display?.icon && (_jsx(Row, { textSize: "4xl", className: "absolute inset-0", align: "center", justify: "center", children: category.display.icon })), category.isFeatured && (_jsx(Span, { size: "xs", className: CLS_FEATURED_DOT, children: "\u2605" }))] }), _jsxs(Stack, { className: `flex-1 ${__P.p3}.5`, children: [_jsx(Text, { color: "inverse", className: `leading-snug text-neutral-900 dark:text-neutral-100 dark:`, truncate: 2, size: "sm", weight: "semibold", children: category.name }), category.description && (_jsx(Text, { className: `mt-1 flex-1`, color: "muted", truncate: 2, size: "xs", children: category.description })), _jsxs(Row, { className: "mt-2", align: "center", justify: "between", gap: "sm", children: [_jsxs(Text, { size: "xs", color: "faint", children: [productCount.toLocaleString(), " ", productCount === 1 ? "item" : "items"] }), _jsxs(Span, { layout: "inline-flex", gap: "xs", size: "xs", weight: "medium", border: "default", className: "group-hover:bg-primary group-hover:border-primary group-hover:text-white transition-colors", rounded: "md", padding: "pill-sm-tall", color: "muted", children: ["Browse ", _jsx(ArrowRight, { className: "h-3 w-3" })] })] })] })] }));
14
+ const inner = (_jsxs(Stack, { className: "h-full", children: [_jsxs(Div, { surface: "muted", className: `relative aspect-[4/3] w-full ${__O.hidden} flex-shrink-0`, children: [category.display?.coverImage ? (_jsx(Div, { role: "img", "aria-label": category.name, className: "h-full w-full bg-center bg-cover transition-transform duration-300 group-hover:scale-105", style: { backgroundImage: `url(${category.display.coverImage})` } })) : category.display?.color ? (_jsx(Div, { className: "h-full w-full opacity-80", style: { backgroundColor: category.display.color } })) : null, category.display?.icon && (_jsx(Row, { textSize: "4xl", className: "absolute inset-0", align: "center", justify: "center", children: category.display.icon })), category.isFeatured && (_jsx(Span, { size: "xs", className: CLS_FEATURED_DOT, children: "\u2605" }))] }), _jsxs(Stack, { className: `flex-1 ${__P.p3}.5`, children: [_jsx(Text, { color: "inverse", className: `leading-snug text-neutral-900 dark:text-neutral-100 dark:`, truncate: 2, size: "sm", weight: "semibold", children: category.name }), category.description && (_jsx(Text, { className: `mt-1 flex-1`, color: "muted", truncate: 2, size: "xs", children: category.description })), _jsxs(Row, { className: "mt-2", align: "center", justify: "between", gap: "sm", children: [_jsxs(Text, { size: "xs", color: "faint", children: [productCount.toLocaleString(), " ", productCount === 1 ? "item" : "items"] }), _jsxs(Span, { layout: "inline-flex", gap: "xs", size: "xs", weight: "medium", border: "default", className: "group-hover:bg-primary group-hover:border-primary group-hover:text-white transition-colors", rounded: "md", padding: "pill-sm-tall", color: "muted", children: ["Browse ", _jsx(ArrowRight, { className: "h-3 w-3" })] })] })] })] }));
19
15
  const cardClass = `group relative flex flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-zinc-700 dark:bg-zinc-900 shadow-sm transition hover:shadow-md h-full ${className}`;
20
16
  if (href) {
21
17
  return (_jsx(Link, { href: href, className: cardClass, children: inner }));
@@ -39,7 +39,6 @@ export function CategorySelectorCreate({ value, onChange, disabled = false, labe
39
39
  const [drawerOpen, setDrawerOpen] = useState(false);
40
40
  const L = { ...DEFAULT_LABELS, ...labels };
41
41
  const { categories: rawCategories, isLoading, refetch } = useCategories();
42
- // audit-unknown-ok: TS structural escape — Category
43
42
  const categories = rawCategories;
44
43
  const flat = flattenCategories(categories);
45
44
  const handleSuccess = useCallback((newId) => {
@@ -22,17 +22,13 @@ export function getCategoryTableColumns(onEdit, onDelete, labels = {}) {
22
22
  {
23
23
  key: "image",
24
24
  header: "",
25
- render: (cat) => (_jsx(Div, { className: `relative w-9 h-9 ${__O.hidden} flex-shrink-0`, rounded: "default", children: cat.display?.coverImage ? (_jsx(MediaImage, { src: cat.display.coverImage, alt: "", size: "thumbnail", className: "w-full h-full object-cover" })) : (_jsx(Row, { textSize: "base", className: "w-full h-full", align: "center", justify: "center",
26
- // audit-inline-style-ok: runtime theme color
27
- style: { backgroundColor: cat.display?.color ?? "var(--appkit-color-text-faint)", color: "var(--appkit-color-text-on-primary)" }, children: cat.display?.icon ?? "🗂️" })) })),
25
+ render: (cat) => (_jsx(Div, { className: `relative w-9 h-9 ${__O.hidden} flex-shrink-0`, rounded: "default", children: cat.display?.coverImage ? (_jsx(MediaImage, { src: cat.display.coverImage, alt: "", size: "thumbnail", className: "w-full h-full object-cover" })) : (_jsx(Row, { textSize: "base", className: "w-full h-full", align: "center", justify: "center", style: { backgroundColor: cat.display?.color ?? "var(--appkit-color-text-faint)", color: "var(--appkit-color-text-on-primary)" }, children: cat.display?.icon ?? "🗂️" })) })),
28
26
  },
29
27
  {
30
28
  key: "name",
31
29
  header: L.colName,
32
30
  sortable: true,
33
- render: (cat) => (
34
- // audit-inline-style-ok: computed pixel offset
35
- _jsxs(Div, { style: { paddingLeft: `${cat.tier * 20}px` }, children: [cat.name, cat.tier > 0 && (_jsxs(Span, { size: "xs", className: "ml-2", color: "faint", children: ["(Tier ", cat.tier, ")"] }))] })),
31
+ render: (cat) => (_jsxs(Div, { style: { paddingLeft: `${cat.tier * 20}px` }, children: [cat.name, cat.tier > 0 && (_jsxs(Span, { size: "xs", className: "ml-2", color: "faint", children: ["(Tier ", cat.tier, ")"] }))] })),
36
32
  },
37
33
  {
38
34
  key: "slug",
@@ -19,9 +19,7 @@ function CategoryTreeNode({ item, children = [], activeId, onSelect, depth = 0,
19
19
  if (hasChildren)
20
20
  setExpanded((p) => !p);
21
21
  onSelect?.(item);
22
- }, className: `cursor-pointer py-1.5 transition select-none ${isActive ? "bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400" : "text-neutral-700 hover:bg-neutral-50 dark:text-zinc-300 dark:hover:bg-zinc-800"}`, align: "center", gap: "xs", padding: "x-xs", rounded: "md",
23
- // audit-inline-style-ok: computed pixel offset
24
- style: { paddingLeft: `${8 + indent}px` }, children: [hasChildren && (_jsx(Span, { size: "xs", "aria-hidden": "true", className: `transition-transform duration-150 ${expanded ? "rotate-90" : ""}`, color: "faint", children: "\u25B6" })), !hasChildren && _jsx(Span, { className: "w-3" }), item.display?.icon && (_jsx(Span, { size: "base", "aria-hidden": "true", className: "flex-shrink-0", children: item.display.icon })), _jsx(Text, { className: "flex-1 truncate", children: item.name }), item.metrics && (_jsx(Span, { size: "xs", className: "ml-auto flex-shrink-0 tabular-nums", color: "faint", children: item.metrics.productCount }))] }), hasChildren && expanded && (_jsx(Div, { role: "group", children: children.map((child) => (_jsx(CategoryTreeNode, { item: child, activeId: activeId, onSelect: onSelect, depth: depth + 1 }, child.id))) }))] }));
22
+ }, className: `cursor-pointer py-1.5 transition select-none ${isActive ? "bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400" : "text-neutral-700 hover:bg-neutral-50 dark:text-zinc-300 dark:hover:bg-zinc-800"}`, align: "center", gap: "xs", padding: "x-xs", rounded: "md", style: { paddingLeft: `${8 + indent}px` }, children: [hasChildren && (_jsx(Span, { size: "xs", "aria-hidden": "true", className: `transition-transform duration-150 ${expanded ? "rotate-90" : ""}`, color: "faint", children: "\u25B6" })), !hasChildren && _jsx(Span, { className: "w-3" }), item.display?.icon && (_jsx(Span, { size: "base", "aria-hidden": "true", className: "flex-shrink-0", children: item.display.icon })), _jsx(Text, { className: "flex-1 truncate", children: item.name }), item.metrics && (_jsx(Span, { size: "xs", className: "ml-auto flex-shrink-0 tabular-nums", color: "faint", children: item.metrics.productCount }))] }), hasChildren && expanded && (_jsx(Div, { role: "group", children: children.map((child) => (_jsx(CategoryTreeNode, { item: child, activeId: activeId, onSelect: onSelect, depth: depth + 1 }, child.id))) }))] }));
25
23
  }
26
24
  /**
27
25
  * CategoryTree — hierarchical expandable navigation for categories.
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Div, Heading, Text } from "../../../ui";
3
3
  export function ConcernCard({ concern, onClick, className = "", }) {
4
- return (_jsxs(Button, { type: "button", variant: "outline", onClick: () => onClick?.(concern), className: `group flex flex-col items-center gap-3 rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-4 text-center shadow-sm transition hover:border-primary dark:hover:border-primary-400 hover:shadow-md ${className}`, children: [concern.display?.coverImage && (_jsx(Div, { role: "img", "aria-label": concern.name, className: "h-16 w-16 bg-center bg-cover", rounded: "full",
5
- // audit-inline-style-ok: dynamic image URL
6
- style: { backgroundImage: `url(${concern.display.coverImage})` } })), _jsxs(Div, { children: [_jsx(Heading, { level: 3, className: "text-neutral-900 dark:text-neutral-100 group-hover:text-primary dark:group-hover:text-primary-400", size: "sm", weight: "semibold", children: concern.name }), concern.description && (_jsx(Text, { className: `mt-1`, color: "muted", truncate: 2, size: "xs", children: concern.description }))] })] }));
4
+ return (_jsxs(Button, { type: "button", variant: "outline", onClick: () => onClick?.(concern), className: `group flex flex-col items-center gap-3 rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-4 text-center shadow-sm transition hover:border-primary dark:hover:border-primary-400 hover:shadow-md ${className}`, children: [concern.display?.coverImage && (_jsx(Div, { role: "img", "aria-label": concern.name, className: "h-16 w-16 bg-center bg-cover", rounded: "full", style: { backgroundImage: `url(${concern.display.coverImage})` } })), _jsxs(Div, { children: [_jsx(Heading, { level: 3, className: "text-neutral-900 dark:text-neutral-100 group-hover:text-primary dark:group-hover:text-primary-400", size: "sm", weight: "semibold", children: concern.name }), concern.description && (_jsx(Text, { className: `mt-1`, color: "muted", truncate: 2, size: "xs", children: concern.description }))] })] }));
7
5
  }
@@ -3,11 +3,7 @@ import { Div, Heading, Text, TextLink } from "../../../ui";
3
3
  import { LAYOUT } from "../../../tokens";
4
4
  const CLS_PLACEHOLDER = "w-full";
5
5
  export function CollectionCard({ collection, href }) {
6
- return (
7
- // audit-variant-ok: collection card TextLink — bg-gray-100 placeholder + hover:shadow-lg card composition
8
- _jsxs(TextLink, { rounded: "xl", href: href, className: "group relative block overflow-hidden bg-gray-100 dark:bg-slate-800 transition-shadow hover:shadow-lg", children: [collection.image ? (_jsx(Div, { role: "img", "aria-label": collection.title, className: `${LAYOUT.cardHeight.md} w-full bg-cover bg-center transition-transform duration-300 group-hover:scale-105`,
9
- // audit-inline-style-ok: dynamic image URL
10
- style: { backgroundImage: `url(${collection.image})` } })) : (_jsx(Div, { surface: "muted", className: `${LAYOUT.cardHeight.md} ${CLS_PLACEHOLDER}` })), _jsxs(Div, { surface: "default", padding: "sm", children: [_jsx(Heading, { level: 3, className: "text-gray-900", weight: "semibold", children: collection.title }), collection.subtitle && (_jsx(Text, { className: "mt-1 text-gray-500", size: "sm", children: collection.subtitle })), collection.productCount !== undefined && (_jsxs(Text, { className: "mt-2 text-gray-400", size: "xs", children: [collection.productCount, " ", collection.productCount === 1 ? "item" : "items"] }))] })] }));
6
+ return (_jsxs(TextLink, { rounded: "xl", href: href, className: "group relative block overflow-hidden bg-gray-100 dark:bg-slate-800 transition-shadow hover:shadow-lg", children: [collection.image ? (_jsx(Div, { role: "img", "aria-label": collection.title, className: `${LAYOUT.cardHeight.md} w-full bg-cover bg-center transition-transform duration-300 group-hover:scale-105`, style: { backgroundImage: `url(${collection.image})` } })) : (_jsx(Div, { surface: "muted", className: `${LAYOUT.cardHeight.md} ${CLS_PLACEHOLDER}` })), _jsxs(Div, { surface: "default", padding: "sm", children: [_jsx(Heading, { level: 3, className: "text-gray-900", weight: "semibold", children: collection.title }), collection.subtitle && (_jsx(Text, { className: "mt-1 text-gray-500", size: "sm", children: collection.subtitle })), collection.productCount !== undefined && (_jsxs(Text, { className: "mt-2 text-gray-400", size: "xs", children: [collection.productCount, " ", collection.productCount === 1 ? "item" : "items"] }))] })] }));
11
7
  }
12
8
  export function CollectionGrid({ collections, getHref }) {
13
9
  return (_jsx(Div, { layout: "grid", gap: "6", className: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", children: collections.map((c) => (_jsx(CollectionCard, { collection: c, href: getHref(c.slug) }, c.slug))) }));
@@ -27,7 +27,6 @@ export async function sendEmail(opts) {
27
27
  ? opts.headers
28
28
  : undefined,
29
29
  });
30
- // audit-unknown-ok: TS structural escape — JsonValue
31
30
  return { data: data, error: null };
32
31
  }
33
32
  catch (error) {
@@ -30,7 +30,6 @@ export async function createEvent(adminId, input) {
30
30
  winnerImages: finalizedWinnerImages,
31
31
  additionalImages: finalizedAdditionalImages,
32
32
  createdBy: adminId,
33
- // audit-unknown-ok: TS structural escape — EventCreateInput
34
33
  });
35
34
  serverLogger.info("createEvent", { adminId, eventId: event.id });
36
35
  return event;
@@ -59,7 +59,6 @@ export async function GET(_request, context) {
59
59
  }));
60
60
  }
61
61
  // For survey events with leaderboard: top-10 approved entries, PII stripped
62
- // audit-unknown-ok: event leaderboard cache items
63
62
  let leaderboard = [];
64
63
  if (event.type === "survey" && event.surveyConfig?.hasLeaderboard) {
65
64
  const leaderboardResult = await entriesRepo.findAll({
@@ -53,7 +53,7 @@ const FORM_FIELD_TYPE_OPTIONS = [
53
53
  { label: "Checkbox", value: "checkbox" },
54
54
  { label: "Radio", value: "radio" },
55
55
  { label: "Date", value: "date" },
56
- { label: "Rating (1–5)", value: "rating" }, // audit-sieve-views-ok — form field type, not sort key
56
+ { label: "Rating (1–5)", value: "rating" },
57
57
  { label: "File upload", value: "file" },
58
58
  ];
59
59
  const FIELD_TYPES_WITH_OPTIONS = ["select", "multiselect", "radio", "checkbox"];
@@ -171,7 +171,6 @@ function buildEventRaffleFields(draft) {
171
171
  if (draft.rafflePrizeProductIds.length > 0)
172
172
  fields.rafflePrizeProductIds = draft.rafflePrizeProductIds;
173
173
  if (draft.raffleType === "spin_wheel" || draft.type === "spin_wheel") {
174
- // audit-unknown-ok: TS structural escape — JsonObjectWithUndefined
175
174
  fields.spinPrizes = draft.spinPrizes;
176
175
  if (Number(draft.spinMaxPerUser) > 0)
177
176
  fields.spinMaxPerUser = Number(draft.spinMaxPerUser);
@@ -31,12 +31,6 @@ export function EventCard({ event, labels = {}, onParticipate, className = "", s
31
31
  const msLeft = endsAt.getTime() - now.getTime();
32
32
  const daysLeft = Math.max(0, Math.ceil(msLeft / (1000 * 60 * 60 * 24)));
33
33
  const detailHref = String(ROUTES.PUBLIC.EVENT_DETAIL(event.slug ?? event.id));
34
- return (
35
- // audit-variant-ok: event card Article flex-col + hover-shadow transition + conditional selected outline
36
- _jsxs(Article, { border: "default", className: `group relative flex h-full ${LAYOUT.cardHeight.event} flex-col overflow-hidden rounded-xl bg-white shadow-sm transition-shadow hover:shadow-md dark:bg-slate-900 ${isSelected ? "border-primary outline outline-2 outline-primary" : " "} ${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, children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (e) => { e.preventDefault(); onSelect(event.id, !isSelected); }, label: isSelected ? "Deselect event" : "Select event", position: "top-2 left-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), _jsx(Link, { href: detailHref, className: "block flex-shrink-0", children: event.coverImageUrl ? (_jsx(Div, { className: `aspect-video ${__O.hidden}`, children: _jsx(Div, { role: "img", "aria-label": safeTitle, className: "h-full w-full bg-cover bg-center transition-transform duration-300 group-hover:scale-105",
37
- // audit-inline-style-ok: dynamic image URL
38
- style: { backgroundImage: `url(${event.coverImageUrl})` } }) })) : (_jsx(Row, { surface: "muted", className: "aspect-video", align: "center", justify: "center", children: _jsx(Span, { className: "opacity-40", size: "5xl", "aria-hidden": "true", children: TYPE_ICONS[event.type] }) })) }), _jsxs(Stack, { className: `flex-1 ${__P.p4}`, children: [_jsxs(Row, { className: "mb-2", align: "start", justify: "between", gap: "sm", children: [_jsx(Span, { size: "lg", "aria-hidden": "true", children: TYPE_ICONS[event.type] }), _jsx(EventStatusBadge, { status: event.status })] }), _jsx(Link, { href: detailHref, className: "block", children: _jsx(Heading, { level: 3, className: "text-gray-900 leading-snug mb-1 group-hover:text-primary transition-colors", size: "base", weight: "semibold", children: safeTitle }) }), _jsx(RichText, { html: normalizeRichTextHtml(event.description ?? ""), proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "mb-3 line-clamp-3 text-sm text-zinc-600 dark:text-zinc-400" }), _jsxs(Row, { color: "muted", textSize: "xs", className: "mb-3 mt-auto", align: "center", justify: "between", children: [event.status === EVENT_FIELDS.STATUS_VALUES.ACTIVE &&
39
- daysLeft > 0 && _jsxs(Span, { children: ["\u23F1 ", daysLeft, "d remaining"] }), _jsxs(Span, { children: ["\uD83D\uDC65 ", event.stats.totalEntries, " ", labels.entries ?? "entries"] })] }), event.status === EVENT_FIELDS.STATUS_VALUES.ACTIVE && onParticipate ? (_jsx(Button, { rounded: "lg", type: "button", onClick: () => onParticipate(event), className: "w-full bg-primary py-2 text-sm font-medium text-white transition-colors hover:bg-primary-600", children: labels.participate ?? "Participate" })) : (
40
- // audit-variant-ok: details TextLink — border+hover bg-zinc-100 transition + inline-flex full-width centered CTA
41
- _jsxs(TextLink, { rounded: "lg", paddingX: "sm", paddingY: "xs", href: detailHref, className: "inline-flex w-full items-center justify-center gap-1.5 border border-zinc-300 transition-colors hover:bg-zinc-100 dark:border-slate-600 dark:hover:bg-slate-800", color: "primary", size: "sm", weight: "medium", children: [labels.viewDetails ?? "View details", " \u2192"] }))] })] }));
34
+ return (_jsxs(Article, { border: "default", className: `group relative flex h-full ${LAYOUT.cardHeight.event} flex-col overflow-hidden rounded-xl bg-white shadow-sm transition-shadow hover:shadow-md dark:bg-slate-900 ${isSelected ? "border-primary outline outline-2 outline-primary" : " "} ${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, children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (e) => { e.preventDefault(); onSelect(event.id, !isSelected); }, label: isSelected ? "Deselect event" : "Select event", position: "top-2 left-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), _jsx(Link, { href: detailHref, className: "block flex-shrink-0", children: event.coverImageUrl ? (_jsx(Div, { className: `aspect-video ${__O.hidden}`, children: _jsx(Div, { role: "img", "aria-label": safeTitle, className: "h-full w-full bg-cover bg-center transition-transform duration-300 group-hover:scale-105", style: { backgroundImage: `url(${event.coverImageUrl})` } }) })) : (_jsx(Row, { surface: "muted", className: "aspect-video", align: "center", justify: "center", children: _jsx(Span, { className: "opacity-40", size: "5xl", "aria-hidden": "true", children: TYPE_ICONS[event.type] }) })) }), _jsxs(Stack, { className: `flex-1 ${__P.p4}`, children: [_jsxs(Row, { className: "mb-2", align: "start", justify: "between", gap: "sm", children: [_jsx(Span, { size: "lg", "aria-hidden": "true", children: TYPE_ICONS[event.type] }), _jsx(EventStatusBadge, { status: event.status })] }), _jsx(Link, { href: detailHref, className: "block", children: _jsx(Heading, { level: 3, className: "text-gray-900 leading-snug mb-1 group-hover:text-primary transition-colors", size: "base", weight: "semibold", children: safeTitle }) }), _jsx(RichText, { html: normalizeRichTextHtml(event.description ?? ""), proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "mb-3 line-clamp-3 text-sm text-zinc-600 dark:text-zinc-400" }), _jsxs(Row, { color: "muted", textSize: "xs", className: "mb-3 mt-auto", align: "center", justify: "between", children: [event.status === EVENT_FIELDS.STATUS_VALUES.ACTIVE &&
35
+ daysLeft > 0 && _jsxs(Span, { children: ["\u23F1 ", daysLeft, "d remaining"] }), _jsxs(Span, { children: ["\uD83D\uDC65 ", event.stats.totalEntries, " ", labels.entries ?? "entries"] })] }), event.status === EVENT_FIELDS.STATUS_VALUES.ACTIVE && onParticipate ? (_jsx(Button, { rounded: "lg", type: "button", onClick: () => onParticipate(event), className: "w-full bg-primary py-2 text-sm font-medium text-white transition-colors hover:bg-primary-600", children: labels.participate ?? "Participate" })) : (_jsxs(TextLink, { rounded: "lg", paddingX: "sm", paddingY: "xs", href: detailHref, className: "inline-flex w-full items-center justify-center gap-1.5 border border-zinc-300 transition-colors hover:bg-zinc-100 dark:border-slate-600 dark:hover:bg-slate-800", color: "primary", size: "sm", weight: "medium", children: [labels.viewDetails ?? "View details", " \u2192"] }))] })] }));
42
36
  }
@@ -38,7 +38,5 @@ export function EventRaffleEntryForm({ eventId: _eventId, prizeLabel, raffleType
38
38
  : raffleType === "top_n_participants"
39
39
  ? `Earliest ${topN ?? "N"} entries qualify.`
40
40
  : "Spin the wheel to claim your prize.";
41
- return (_jsxs(Stack, { className: `${__P.p6}`, gap: "md", rounded: "2xl", border: "default", children: [prizeLabel ? (_jsxs(Stack, { gap: "xs", children: [_jsx(Badge, { variant: "warning", children: "Prize" }), _jsx(Heading, { level: 2, weight: "bold", size: "2xl", children: prizeLabel })] })) : null, _jsx(Text, { size: "sm", color: "muted", children: eligibilityCopy }), submitted ? (_jsx(Div, { textSize: "sm", color: "success", surface: "success-surface", padding: "inline", rounded: "lg", children: "You're in. Check the leaderboard for results." })) : overLimit ? (_jsxs(Div, { textSize: "sm", color: "warning", surface: "warning-surface", padding: "inline", rounded: "lg", children: ["You've used all ", maxEntriesPerUser, " entry slot", maxEntriesPerUser === 1 ? "" : "s", " for this raffle."] })) : (
42
- // audit-variant-ok: entry Form — space-y-3 vertical rhythm; Form lacks spacing variant
43
- _jsxs(Form, { onSubmit: handleSubmit, className: "space-y-3", children: [_jsx(FieldTextarea, { name: "message", label: "Message", hint: "optional \u2014 share why you'd like to win", value: message, onChange: setMessage, rows: 3, maxLength: 500, placeholder: "Share why you'd like to win", disabled: busy }), _jsx(Button, { type: "submit", variant: "primary", disabled: busy, children: busy ? "Submitting…" : "Enter raffle" })] }))] }));
41
+ return (_jsxs(Stack, { className: `${__P.p6}`, gap: "md", rounded: "2xl", border: "default", children: [prizeLabel ? (_jsxs(Stack, { gap: "xs", children: [_jsx(Badge, { variant: "warning", children: "Prize" }), _jsx(Heading, { level: 2, weight: "bold", size: "2xl", children: prizeLabel })] })) : null, _jsx(Text, { size: "sm", color: "muted", children: eligibilityCopy }), submitted ? (_jsx(Div, { textSize: "sm", color: "success", surface: "success-surface", padding: "inline", rounded: "lg", children: "You're in. Check the leaderboard for results." })) : overLimit ? (_jsxs(Div, { textSize: "sm", color: "warning", surface: "warning-surface", padding: "inline", rounded: "lg", children: ["You've used all ", maxEntriesPerUser, " entry slot", maxEntriesPerUser === 1 ? "" : "s", " for this raffle."] })) : (_jsxs(Form, { onSubmit: handleSubmit, className: "space-y-3", children: [_jsx(FieldTextarea, { name: "message", label: "Message", hint: "optional \u2014 share why you'd like to win", value: message, onChange: setMessage, rows: 3, maxLength: 500, placeholder: "Share why you'd like to win", disabled: busy }), _jsx(Button, { type: "submit", variant: "primary", disabled: busy, children: busy ? "Submitting…" : "Enter raffle" })] }))] }));
44
42
  }
@@ -20,7 +20,5 @@ export function EventRaffleWinnerView({ event, currentUserIsWinner, labels }) {
20
20
  if (!event.raffleWinnerUserId) {
21
21
  return (_jsx(Div, { className: "border-dashed text-center", border: "strong", paddingY: "y-2xl", paddingX: "x-lg", rounded: "xl", children: _jsx(Text, { color: "muted", children: l.notDrawnYet }) }));
22
22
  }
23
- return (
24
- // audit-variant-ok: raffle winner Article — space-y-4 vertical rhythm between children; Article lacks spacing variant
25
- _jsxs(Article, { className: "space-y-4", children: [_jsxs(Heading, { level: 2, size: "xl", weight: "semibold", color: "primary", children: ["\uD83C\uDF9F\uFE0F ", l.heading] }), _jsxs(Div, { className: CLS_PANEL, children: [_jsxs(Div, { children: [_jsx(Text, { className: CLS_LABEL, children: l.winnerLabel }), _jsx(Text, { className: CLS_WINNER_NAME, children: event.raffleWinnerDisplayName?.trim() || l.anonymous })] }), event.rafflePrize ? (_jsxs(Div, { children: [_jsx(Text, { className: CLS_LABEL, children: l.prizeLabel }), _jsx(Text, { className: "mt-1", color: "primary", size: "base", children: event.rafflePrize })] })) : null, currentUserIsWinner && event.rafflePrizeCouponCode ? (_jsx(Div, { padding: "t-xs", children: _jsx(ClaimCouponButton, { couponCode: event.rafflePrizeCouponCode, source: "raffle", size: "sm" }) })) : null, _jsxs(Div, { layout: "flex", textSize: "sm", className: "flex-wrap gap-x-6 gap-y-2", color: "muted", padding: "t-xs", children: [typeof event.raffleEntryCount === "number" ? (_jsxs(Span, { children: [l.poolLabel, ":", " ", _jsx(Span, { weight: "medium", color: "primary", children: event.raffleEntryCount })] })) : null, event.raffleTriggeredAt ? (_jsx(Span, { children: new Date(event.raffleTriggeredAt).toLocaleString() })) : null] })] }), event.raffleGithubFunctionUrl ? (_jsxs(Div, { textSize: "sm", className: `${__P.p4}`, rounded: "lg", border: "default", children: [_jsx(Text, { weight: "medium", color: "primary", children: l.fairnessLabel }), _jsx(TextLink, { href: event.raffleGithubFunctionUrl, className: "mt-1 block break-all text-primary-600 dark:text-primary-400 hover:underline", children: event.raffleGithubFunctionUrl })] })) : null] }));
23
+ return (_jsxs(Article, { className: "space-y-4", children: [_jsxs(Heading, { level: 2, size: "xl", weight: "semibold", color: "primary", children: ["\uD83C\uDF9F\uFE0F ", l.heading] }), _jsxs(Div, { className: CLS_PANEL, children: [_jsxs(Div, { children: [_jsx(Text, { className: CLS_LABEL, children: l.winnerLabel }), _jsx(Text, { className: CLS_WINNER_NAME, children: event.raffleWinnerDisplayName?.trim() || l.anonymous })] }), event.rafflePrize ? (_jsxs(Div, { children: [_jsx(Text, { className: CLS_LABEL, children: l.prizeLabel }), _jsx(Text, { className: "mt-1", color: "primary", size: "base", children: event.rafflePrize })] })) : null, currentUserIsWinner && event.rafflePrizeCouponCode ? (_jsx(Div, { padding: "t-xs", children: _jsx(ClaimCouponButton, { couponCode: event.rafflePrizeCouponCode, source: "raffle", size: "sm" }) })) : null, _jsxs(Div, { layout: "flex", textSize: "sm", className: "flex-wrap gap-x-6 gap-y-2", color: "muted", padding: "t-xs", children: [typeof event.raffleEntryCount === "number" ? (_jsxs(Span, { children: [l.poolLabel, ":", " ", _jsx(Span, { weight: "medium", color: "primary", children: event.raffleEntryCount })] })) : null, event.raffleTriggeredAt ? (_jsx(Span, { children: new Date(event.raffleTriggeredAt).toLocaleString() })) : null] })] }), event.raffleGithubFunctionUrl ? (_jsxs(Div, { textSize: "sm", className: `${__P.p4}`, rounded: "lg", border: "default", children: [_jsx(Text, { weight: "medium", color: "primary", children: l.fairnessLabel }), _jsx(TextLink, { href: event.raffleGithubFunctionUrl, className: "mt-1 block break-all text-primary-600 dark:text-primary-400 hover:underline", children: event.raffleGithubFunctionUrl })] })) : null] }));
26
24
  }
@@ -21,7 +21,6 @@ export async function EventRafflesSection({ config, }) {
21
21
  sorts: sortBy("startsAt", "DESC"),
22
22
  pageSize: limit,
23
23
  });
24
- // audit-unknown-ok: TS structural escape — EventItem
25
24
  events = (result.items ?? []);
26
25
  }
27
26
  catch {
@@ -55,7 +55,6 @@ export function EventsIndexListing({ initialData }) {
55
55
  buildSieveParams: () => "",
56
56
  buildSearchParams: () => "",
57
57
  params: new URLSearchParams(),
58
- // audit-unknown-ok: TS structural escape — table-state type
59
58
  }), [pendingFilters]);
60
59
  const openFilters = useCallback(() => {
61
60
  setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, table.get(k)])));
@@ -5,7 +5,6 @@ function extractBulkResult(raw) {
5
5
  return null;
6
6
  const result = {
7
7
  action: raw.action,
8
- // audit-unknown-ok: TS structural escape — BulkActionSummary
9
8
  summary: raw.summary,
10
9
  succeeded: raw.succeeded ?? [],
11
10
  skipped: raw.skipped ?? [],
@@ -12,7 +12,6 @@ class EventEntryRepository extends BaseRepository {
12
12
  const raw = super.mapDoc(snap);
13
13
  return decryptPiiFields(raw, [
14
14
  ...EVENT_ENTRY_PII_FIELDS,
15
- // audit-unknown-ok: TS structural escape — generic param
16
15
  ]);
17
16
  }
18
17
  async listForEvent(eventId, model) {
@@ -6,7 +6,5 @@ const __P = {
6
6
  const CLS_CONTACT_CARD = "flex items-center gap-3 rounded-lg border border-zinc-100 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 px-4 py-3 hover:border-primary/40 transition-colors";
7
7
  const CLS_CONTACT_LABEL = "text-xs text-zinc-500 dark:text-zinc-400";
8
8
  export function ContactCTA({ email, phone, contactHref, labels, }) {
9
- return (
10
- // audit-variant-ok: contact CTA Card — text-center + dark:bg-slate-800/60 explicit dark tint over Card.variant outlined
11
- _jsxs(Card, { variant: "outlined", padding: "lg", className: "text-center dark:bg-slate-800/60", children: [_jsx(Row, { className: "mb-6", justify: "center", children: _jsx(Div, { className: `bg-primary/10 ${__P.p8}`, rounded: "full", children: _jsx("svg", { className: "h-12 w-12 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }) }), _jsx(Heading, { level: 2, className: "mb-3", size: "2xl", weight: "semibold", children: labels?.title ?? "Need More Help?" }), _jsx(Text, { className: "mx-auto mb-6 max-w-2xl", color: "muted", children: labels?.description ?? "Our support team is here to help you." }), _jsxs(Div, { layout: "grid", gap: "4", className: "mb-8 grid-cols-1 md:grid-cols-3", children: [_jsxs(TextLink, { href: `mailto:${email}`, variant: "none", className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.emailUs ?? "Email Us" }), _jsx(Text, { size: "xs", color: "muted", children: email })] }), _jsxs(TextLink, { href: `tel:${phone}`, variant: "none", className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.callUs ?? "Call Us" }), _jsx(Text, { size: "xs", color: "muted", children: phone })] }), _jsxs(TextLink, { href: contactHref, className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.contactForm ?? "Contact Form" }), _jsx(Text, { size: "xs", color: "muted", children: labels?.submitRequest ?? "Submit a request" })] })] }), _jsxs(TextLink, { rounded: "xl", href: contactHref, className: "inline-flex items-center gap-2 bg-primary p-6 text-white transition-colors hover:bg-primary/90", weight: "medium", children: [_jsx(Span, { children: labels?.contactTeam ?? "Contact Team" }), _jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] })] }));
9
+ return (_jsxs(Card, { variant: "outlined", padding: "lg", className: "text-center dark:bg-slate-800/60", children: [_jsx(Row, { className: "mb-6", justify: "center", children: _jsx(Div, { className: `bg-primary/10 ${__P.p8}`, rounded: "full", children: _jsx("svg", { className: "h-12 w-12 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }) }) }), _jsx(Heading, { level: 2, className: "mb-3", size: "2xl", weight: "semibold", children: labels?.title ?? "Need More Help?" }), _jsx(Text, { className: "mx-auto mb-6 max-w-2xl", color: "muted", children: labels?.description ?? "Our support team is here to help you." }), _jsxs(Div, { layout: "grid", gap: "4", className: "mb-8 grid-cols-1 md:grid-cols-3", children: [_jsxs(TextLink, { href: `mailto:${email}`, variant: "none", className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.emailUs ?? "Email Us" }), _jsx(Text, { size: "xs", color: "muted", children: email })] }), _jsxs(TextLink, { href: `tel:${phone}`, variant: "none", className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.callUs ?? "Call Us" }), _jsx(Text, { size: "xs", color: "muted", children: phone })] }), _jsxs(TextLink, { href: contactHref, className: CLS_CONTACT_CARD, children: [_jsx(Text, { className: CLS_CONTACT_LABEL, children: labels?.contactForm ?? "Contact Form" }), _jsx(Text, { size: "xs", color: "muted", children: labels?.submitRequest ?? "Submit a request" })] })] }), _jsxs(TextLink, { rounded: "xl", href: contactHref, className: "inline-flex items-center gap-2 bg-primary p-6 text-white transition-colors hover:bg-primary/90", weight: "medium", children: [_jsx(Span, { children: labels?.contactTeam ?? "Contact Team" }), _jsx("svg", { className: "h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] })] }));
12
10
  }
@@ -3,9 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { Button, Div, RichText, Row, Span, Text } from "../../../ui";
5
5
  function FAQAccordionItem({ faq, isOpen, onToggle, renderExpandedFooter, }) {
6
- return (_jsxs(Div, { className: "border-b border-neutral-200 last:border-0", children: [_jsxs(Button, { variant: "ghost", onClick: onToggle, "aria-expanded": isOpen, className: "w-full justify-between gap-4 py-4 text-left text-sm font-medium text-neutral-900 dark:text-zinc-100 transition hover:text-primary", children: [_jsx(Span, { children: faq.question }), _jsx(Span, { className: `flex-shrink-0 transition-transform ${isOpen ? "rotate-180" : ""}`, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), isOpen && (_jsxs(Div, { textSize: "sm", className: "text-neutral-600 dark:text-neutral-400", padding: "b-md", children: [faq.tags && faq.tags.length > 0 && (_jsx(Row, { wrap: true, gap: "sm", className: "mb-3", children: faq.tags.map((tag) => (
7
- // audit-variant-ok: tag chip — bg-neutral-100/800 + py-1 (between Span padding map keys)
8
- _jsx(Span, { className: "bg-neutral-100 dark:bg-neutral-800 py-1 text-neutral-600 dark:text-neutral-400", rounded: "md", padding: "x-xs", size: "xs", children: tag }, tag))) })), faq.answer.format === "html" ? (_jsx(RichText, { html: faq.answer.text, className: "prose-sm" })) : (_jsx(Text, { className: "whitespace-pre-line", children: faq.answer.text })), renderExpandedFooter?.(faq)] }))] }));
6
+ return (_jsxs(Div, { className: "border-b border-neutral-200 last:border-0", children: [_jsxs(Button, { variant: "ghost", onClick: onToggle, "aria-expanded": isOpen, className: "w-full justify-between gap-4 py-4 text-left text-sm font-medium text-neutral-900 dark:text-zinc-100 transition hover:text-primary", children: [_jsx(Span, { children: faq.question }), _jsx(Span, { className: `flex-shrink-0 transition-transform ${isOpen ? "rotate-180" : ""}`, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }), isOpen && (_jsxs(Div, { textSize: "sm", className: "text-neutral-600 dark:text-neutral-400", padding: "b-md", children: [faq.tags && faq.tags.length > 0 && (_jsx(Row, { wrap: true, gap: "sm", className: "mb-3", children: faq.tags.map((tag) => (_jsx(Span, { className: "bg-neutral-100 dark:bg-neutral-800 py-1 text-neutral-600 dark:text-neutral-400", rounded: "md", padding: "x-xs", size: "xs", children: tag }, tag))) })), faq.answer.format === "html" ? (_jsx(RichText, { html: faq.answer.text, className: "prose-sm" })) : (_jsx(Text, { className: "whitespace-pre-line", children: faq.answer.text })), renderExpandedFooter?.(faq)] }))] }));
9
7
  }
10
8
  export function FAQAccordion({ faqs, className = "", renderExpandedFooter, labels, }) {
11
9
  const [openId, setOpenId] = useState(null);
@@ -2,9 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Card, Div, Heading, Row, Span, Text, TextLink } from "../../../ui";
3
3
  export function FAQCategorySidebar({ selectedCategory, onCategorySelect, categoryCounts, categories, allFaqsHref = "/faqs", categoryHref, contactHref, labels, }) {
4
4
  const totalCount = Object.values(categoryCounts).reduce((sum, count) => sum + count, 0);
5
- return (
6
- // audit-variant-ok: sidebar Card — dark:bg-slate-800/60 explicit dark tint over Card.variant outlined
7
- _jsxs(Card, { variant: "outlined", padding: "lg", className: "dark:bg-slate-800/60", children: [_jsx(Heading, { level: 2, className: "mb-6", size: "lg", weight: "semibold", children: labels?.title ?? "Categories" }), _jsx(TextLink, { rounded: "lg", href: allFaqsHref, onClick: () => onCategorySelect?.("all"), className: `mb-3 block w-full p-4 text-left transition-colors ${selectedCategory === "all" ? "bg-primary/10 text-zinc-900 dark:text-zinc-100" : "text-zinc-600 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-slate-700"}`, children: _jsxs(Row, { justify: "between", children: [_jsxs(Row, { gap: "3", children: [_jsx(Span, { size: "2xl", children: "FAQ" }), _jsx(Span, { size: "sm", weight: "medium", children: labels?.allFaqs ?? "All FAQs" })] }), _jsx(Span, { size: "xs", color: "muted", children: totalCount })] }) }), _jsx(Div, { border: "default", className: "mt-4 border-t", padding: "t-md", children: categories.map((category) => {
5
+ return (_jsxs(Card, { variant: "outlined", padding: "lg", className: "dark:bg-slate-800/60", children: [_jsx(Heading, { level: 2, className: "mb-6", size: "lg", weight: "semibold", children: labels?.title ?? "Categories" }), _jsx(TextLink, { rounded: "lg", href: allFaqsHref, onClick: () => onCategorySelect?.("all"), className: `mb-3 block w-full p-4 text-left transition-colors ${selectedCategory === "all" ? "bg-primary/10 text-zinc-900 dark:text-zinc-100" : "text-zinc-600 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-slate-700"}`, children: _jsxs(Row, { justify: "between", children: [_jsxs(Row, { gap: "3", children: [_jsx(Span, { size: "2xl", children: "FAQ" }), _jsx(Span, { size: "sm", weight: "medium", children: labels?.allFaqs ?? "All FAQs" })] }), _jsx(Span, { size: "xs", color: "muted", children: totalCount })] }) }), _jsx(Div, { border: "default", className: "mt-4 border-t", padding: "t-md", children: categories.map((category) => {
8
6
  const isSelected = selectedCategory === category.key;
9
7
  const count = categoryCounts[category.key] || 0;
10
8
  return (_jsxs(TextLink, { rounded: "lg", href: categoryHref(category.key), onClick: () => onCategorySelect?.(category.key), className: `mb-3 block w-full p-4 text-left transition-colors ${isSelected ? "bg-primary/10 text-zinc-900 dark:text-zinc-100" : "text-zinc-600 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-slate-700"}`, children: [_jsxs(Row, { justify: "between", className: "mb-1", children: [_jsxs(Row, { gap: "3", children: [category.icon ? (_jsx(Span, { size: "2xl", children: category.icon })) : null, _jsx(Span, { size: "sm", children: category.label })] }), _jsx(Span, { size: "xs", color: "muted", children: count })] }), isSelected && category.description ? (_jsx(Text, { className: "ml-11", color: "muted", size: "xs", children: category.description })) : null] }, category.key));
@@ -4,9 +4,5 @@ export function RelatedFAQs({ relatedFAQs, hrefForFaq, labels, }) {
4
4
  if (!relatedFAQs || relatedFAQs.length === 0) {
5
5
  return null;
6
6
  }
7
- return (
8
- // audit-variant-ok: related FAQs Card — dark:bg-slate-800/60 explicit dark tint over Card.variant outlined
9
- _jsxs(Card, { variant: "outlined", padding: "lg", className: "dark:bg-slate-800/60", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "lg", weight: "semibold", children: labels?.title ?? "Related Questions" }), _jsx(Stack, { gap: "3", children: relatedFAQs.map((faq) => (
10
- // audit-variant-ok: related FAQ TextLink — block + bg-zinc-100 + p-4 + hover-bg-zinc-200
11
- _jsx(TextLink, { rounded: "lg", href: hrefForFaq ? hrefForFaq(faq) : `/faqs#${faq.id}`, className: "group block bg-zinc-100 p-4 transition-colors hover:bg-zinc-200 dark:bg-slate-700 dark:hover:bg-slate-600", children: _jsxs(Row, { align: "start", gap: "3", children: [_jsx("svg", { className: "mt-0.5 h-5 w-5 flex-shrink-0 text-zinc-500 dark:text-zinc-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), _jsx(Text, { className: "transition-colors group-hover:text-primary", color: "primary", size: "sm", children: faq.question }), _jsx("svg", { className: "ml-auto mt-0.5 h-4 w-4 flex-shrink-0 text-zinc-500 opacity-0 transition-opacity group-hover:opacity-100 dark:text-zinc-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }) }, faq.id))) })] }));
7
+ return (_jsxs(Card, { variant: "outlined", padding: "lg", className: "dark:bg-slate-800/60", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "lg", weight: "semibold", children: labels?.title ?? "Related Questions" }), _jsx(Stack, { gap: "3", children: relatedFAQs.map((faq) => (_jsx(TextLink, { rounded: "lg", href: hrefForFaq ? hrefForFaq(faq) : `/faqs#${faq.id}`, className: "group block bg-zinc-100 p-4 transition-colors hover:bg-zinc-200 dark:bg-slate-700 dark:hover:bg-slate-600", children: _jsxs(Row, { align: "start", gap: "3", children: [_jsx("svg", { className: "mt-0.5 h-5 w-5 flex-shrink-0 text-zinc-500 dark:text-zinc-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), _jsx(Text, { className: "transition-colors group-hover:text-primary", color: "primary", size: "sm", children: faq.question }), _jsx("svg", { className: "ml-auto mt-0.5 h-4 w-4 flex-shrink-0 text-zinc-500 opacity-0 transition-opacity group-hover:opacity-100 dark:text-zinc-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }) }, faq.id))) })] }));
12
8
  }
@@ -63,7 +63,5 @@ export function AsyncFacetSection({ title, selected, onChange, loadOptions, sele
63
63
  return (_jsxs(Div, { className: cn("p-4 border-b border-zinc-200 dark:border-slate-700 last:border-b-0", className), children: [_jsxs(Row, { gap: "xs", children: [_jsxs(Button, { type: "button", onClick: () => setCollapsed((c) => !c), variant: "ghost", size: "sm", className: "flex-1 justify-between text-sm font-semibold text-zinc-900 dark:text-zinc-50 py-1 hover:opacity-80 transition-opacity", "aria-expanded": !collapsed, children: [_jsxs(Row, { as: Span, gap: "xs", children: [title, hasValue && (_jsx(Span, { size: "xs", className: CLS_BADGE_COUNT, children: selected.length }))] }), _jsx("svg", { className: cn("w-4 h-4 text-zinc-500 dark:text-zinc-400 transition-transform duration-200", collapsed ? "" : "rotate-180"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })] }), onClear && hasValue && (_jsx(Button, { type: "button", onClick: onClear, variant: "ghost", size: "sm", className: CLS_CLEAR_ICON, "aria-label": "Clear filter", children: _jsx("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }))] }), collapsed && hasValue && (_jsxs(Row, { wrap: true, gap: "xs", className: "mt-2", children: [selectedLabels.map((label) => (_jsx(Span, { layout: "inline-flex", size: "xs", border: "default", rounded: "full", padding: "pill-xs", surface: "subtle", color: "muted", children: label }, label))), selected.length > 3 && (_jsxs(Span, { layout: "inline-flex", size: "xs", rounded: "full", padding: "pill-xs", color: "faint", children: ["+", selected.length - 3, " more"] }))] })), _jsx(Div, { className: "mt-2", children: _jsx(Input, { type: "search", placeholder: "Search\u2026", value: query, onChange: (e) => handleQueryChange(e.target.value), className: "w-full rounded-md border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-2.5 py-1.5 text-xs text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-primary-500/20" }) }), !collapsed && (_jsxs(Stack, { className: "mt-3", gap: "xs", children: [options.map((opt) => {
64
64
  const isSelected = selected.includes(opt.value);
65
65
  return (_jsxs(Row, { gap: "2.5", className: "cursor-pointer group", padding: "y-2xs", children: [_jsx("input", { type: selectionMode === "single" ? "radio" : "checkbox", checked: isSelected, onChange: () => toggle(opt.value), "aria-label": opt.label, className: "flex-shrink-0 w-4 h-4 rounded border-zinc-300 dark:border-slate-600 cursor-pointer text-primary-600 dark:text-secondary-500" }), _jsx(Span, { size: "sm", className: "flex-1 group-hover:text-zinc-900 dark:group-hover:text-zinc-100 transition-colors truncate", color: "muted", children: opt.label }), opt.count !== undefined && (_jsx(Span, { size: "xs", className: "tabular-nums flex-shrink-0", color: "faint", children: opt.count }))] }, opt.value));
66
- }), options.length === 0 && !loading && (_jsx(Text, { paddingY: "2xs", color: "faint", size: "xs", children: "No results" })), loading && (_jsx(Text, { paddingY: "2xs", className: "animate-pulse", color: "faint", size: "xs", children: "Loading\u2026" })), hasMore && !loading && (
67
- // audit-variant-ok: facet load-more button — text-left + group-hover state override; Button lacks text-left / hover-shade variants
68
- _jsx(Button, { type: "button", variant: "ghost", size: "sm", textSize: "xs", textColor: "faint", className: "w-full text-left hover:text-zinc-600 dark:hover:text-zinc-300 py-1", onClick: () => void load(query, page + 1), children: "Load more\u2026" }))] }))] }));
66
+ }), options.length === 0 && !loading && (_jsx(Text, { paddingY: "2xs", color: "faint", size: "xs", children: "No results" })), loading && (_jsx(Text, { paddingY: "2xs", className: "animate-pulse", color: "faint", size: "xs", children: "Loading\u2026" })), hasMore && !loading && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", textSize: "xs", textColor: "faint", className: "w-full text-left hover:text-zinc-600 dark:hover:text-zinc-300 py-1", onClick: () => void load(query, page + 1), children: "Load more\u2026" }))] }))] }));
69
67
  }
@@ -71,22 +71,12 @@ export function FilterFacetSection({ title, options, selected, onChange, selecti
71
71
  ? CLS_OPTION_SELECTED
72
72
  : "border-zinc-200 bg-white text-zinc-700 hover:border-zinc-400 dark:border-slate-700 dark:bg-slate-900 dark:text-zinc-200 dark:hover:border-slate-500"), children: [title, hasValue && (_jsx(Span, { weight: "bold", className: CLS_OPTION_DOT, children: selected.length })), _jsx("svg", { className: cn("h-3.5 w-3.5 text-zinc-400 transition-transform", dropdownOpen ? "rotate-180" : ""), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })] }), dropdownOpen && (_jsxs(Div, { className: "absolute left-0 top-full z-[var(--appkit-z-dropdown,50)] mt-1 min-w-[180px] max-w-[260px]", surface: "default", rounded: "xl", shadow: "lg", border: "default", children: [searchable && (_jsx(Div, { border: "subtle", className: "border-b", padding: "xs", children: _jsx(Input, { type: "search", placeholder: "Search\u2026", value: search, onChange: (e) => handleSearch(e.target.value), className: "w-full rounded-md border border-zinc-200 bg-white px-2 py-1 text-xs text-zinc-900 focus:outline-none dark:border-slate-700 dark:bg-slate-800/60 dark:text-zinc-100" }) })), _jsxs(Div, { className: `max-h-56 ${__O.yAuto}`, padding: "y-2xs", children: [filtered.map((option) => {
73
73
  const isSelected = selected.includes(option.value);
74
- return (
75
- // audit-variant-ok: option row py-1.5 below PADDING_MAP scale + hover zinc-50/slate-800 + mx-1 negative offset
76
- _jsxs(Row, { gap: "xs", className: "cursor-pointer py-1.5 hover:bg-zinc-50 dark:hover:bg-slate-800 mx-1", padding: "x-sm", rounded: "lg", onClick: () => toggle(option.value), children: [_jsx("input", { type: selectionMode === "single" ? "radio" : "checkbox", checked: isSelected, onChange: () => toggle(option.value), "aria-label": option.label, className: "h-3.5 w-3.5 flex-shrink-0 cursor-pointer rounded border-zinc-300 text-primary-600 dark:border-slate-600 dark:text-secondary-500" }), _jsx(Span, { size: "xs", className: "flex-1 truncate", color: "muted", children: option.label }), option.count !== undefined && (_jsx(Span, { className: "flex-shrink-0 text-[10px] tabular-nums", color: "faint", children: option.count }))] }, option.value));
77
- }), filtered.length === 0 && (
78
- // audit-variant-ok: empty-state Text — px-3 to mirror dropdown content padding
79
- _jsx(Text, { paddingY: "xs", className: "px-3", color: "faint", size: "xs", children: "No results" }))] }), hasValue && (
80
- // audit-variant-ok: dropdown footer — top divider + tight p-1 padding below PADDING_MAP scale
81
- _jsx(Div, { border: "subtle", className: "border-t p-1", children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: CLS_CLEAR_BTN, onClick: () => { onChange([]); onClear?.(); setDropdownOpen(false); }, children: "Clear" }) }))] }))] }));
74
+ return (_jsxs(Row, { gap: "xs", className: "cursor-pointer py-1.5 hover:bg-zinc-50 dark:hover:bg-slate-800 mx-1", padding: "x-sm", rounded: "lg", onClick: () => toggle(option.value), children: [_jsx("input", { type: selectionMode === "single" ? "radio" : "checkbox", checked: isSelected, onChange: () => toggle(option.value), "aria-label": option.label, className: "h-3.5 w-3.5 flex-shrink-0 cursor-pointer rounded border-zinc-300 text-primary-600 dark:border-slate-600 dark:text-secondary-500" }), _jsx(Span, { size: "xs", className: "flex-1 truncate", color: "muted", children: option.label }), option.count !== undefined && (_jsx(Span, { className: "flex-shrink-0 text-[10px] tabular-nums", color: "faint", children: option.count }))] }, option.value));
75
+ }), filtered.length === 0 && (_jsx(Text, { paddingY: "xs", className: "px-3", color: "faint", size: "xs", children: "No results" }))] }), hasValue && (_jsx(Div, { border: "subtle", className: "border-t p-1", children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: CLS_CLEAR_BTN, onClick: () => { onChange([]); onClear?.(); setDropdownOpen(false); }, children: "Clear" }) }))] }))] }));
82
76
  }
83
77
  // ── Accordion variant (default) ─────────────────────────────────────────
84
- return (_jsxs(Div, { className: cn("p-4 border-b border-zinc-200 dark:border-slate-700 last:border-b-0", className), children: [_jsxs(Row, { gap: "xs", children: [_jsxs(Button, { type: "button", onClick: handleToggle, variant: "ghost", size: "sm", className: "flex-1 justify-between text-sm font-semibold text-zinc-900 dark:text-zinc-50 py-1 hover:opacity-80 transition-opacity", "aria-expanded": !isCollapsed, children: [_jsxs(Row, { as: Span, gap: "xs", children: [title, hasValue && (_jsx(Span, { size: "xs", className: CLS_BADGE_COUNT, children: selected.length }))] }), _jsx("svg", { className: cn("w-4 h-4 text-zinc-500 dark:text-zinc-400 transition-transform duration-200", isCollapsed ? "" : "rotate-180"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })] }), onClear && hasValue && (_jsx(Button, { type: "button", onClick: onClear, variant: "ghost", size: "sm", className: CLS_CLEAR_ICON, "aria-label": "Clear filter", children: _jsx("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }))] }), isCollapsed && hasValue && (_jsxs(Row, { wrap: true, gap: "xs", className: "mt-2", children: [selectedLabels.map((label) => (
85
- // audit-variant-ok: selected chip — explicit zinc/slate border tokens for theme contrast against surface=subtle
86
- _jsx(Span, { layout: "inline-flex", size: "xs", className: "border border-zinc-200 dark:border-slate-600", rounded: "full", padding: "pill-xs", surface: "subtle", color: "muted", children: label }, label))), selected.length > 3 && (_jsxs(Span, { layout: "inline-flex", size: "xs", rounded: "full", padding: "pill-xs", color: "faint", children: ["+", selected.length - 3, " more"] }))] })), searchable && (_jsx(Div, { className: "mt-2", children: _jsx(Input, { type: "search", placeholder: "Search\u2026", value: search, onChange: (e) => handleSearch(e.target.value), className: "w-full rounded-md border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-2.5 py-1.5 text-xs text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-primary-500/20 dark:focus:ring-secondary-400/20" }) })), !isCollapsed && (_jsxs(Stack, { className: "mt-3", gap: "xs", children: [filtered.map((option) => {
78
+ return (_jsxs(Div, { className: cn("p-4 border-b border-zinc-200 dark:border-slate-700 last:border-b-0", className), children: [_jsxs(Row, { gap: "xs", children: [_jsxs(Button, { type: "button", onClick: handleToggle, variant: "ghost", size: "sm", className: "flex-1 justify-between text-sm font-semibold text-zinc-900 dark:text-zinc-50 py-1 hover:opacity-80 transition-opacity", "aria-expanded": !isCollapsed, children: [_jsxs(Row, { as: Span, gap: "xs", children: [title, hasValue && (_jsx(Span, { size: "xs", className: CLS_BADGE_COUNT, children: selected.length }))] }), _jsx("svg", { className: cn("w-4 h-4 text-zinc-500 dark:text-zinc-400 transition-transform duration-200", isCollapsed ? "" : "rotate-180"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) })] }), onClear && hasValue && (_jsx(Button, { type: "button", onClick: onClear, variant: "ghost", size: "sm", className: CLS_CLEAR_ICON, "aria-label": "Clear filter", children: _jsx("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) }) }))] }), isCollapsed && hasValue && (_jsxs(Row, { wrap: true, gap: "xs", className: "mt-2", children: [selectedLabels.map((label) => (_jsx(Span, { layout: "inline-flex", size: "xs", className: "border border-zinc-200 dark:border-slate-600", rounded: "full", padding: "pill-xs", surface: "subtle", color: "muted", children: label }, label))), selected.length > 3 && (_jsxs(Span, { layout: "inline-flex", size: "xs", rounded: "full", padding: "pill-xs", color: "faint", children: ["+", selected.length - 3, " more"] }))] })), searchable && (_jsx(Div, { className: "mt-2", children: _jsx(Input, { type: "search", placeholder: "Search\u2026", value: search, onChange: (e) => handleSearch(e.target.value), className: "w-full rounded-md border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-2.5 py-1.5 text-xs text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-primary-500/20 dark:focus:ring-secondary-400/20" }) })), !isCollapsed && (_jsxs(Stack, { className: "mt-3", gap: "xs", children: [filtered.map((option) => {
87
79
  const isSelected = selected.includes(option.value);
88
80
  return (_jsxs(Row, { gap: "2.5", className: "cursor-pointer group", padding: "y-2xs", children: [selectionMode === "single" ? (_jsx("input", { type: "radio", checked: isSelected, onChange: () => toggle(option.value), "aria-label": option.label, className: cn("flex-shrink-0 border-zinc-300 dark:border-slate-600 cursor-pointer", "w-4 h-4 rounded-full text-primary-600 dark:text-secondary-500", "focus:ring-primary-500/30 dark:focus:ring-secondary-400/30") })) : (_jsx("input", { type: "checkbox", checked: isSelected, onChange: () => toggle(option.value), "aria-label": option.label, className: cn("flex-shrink-0 border-zinc-300 dark:border-slate-600 cursor-pointer", "w-4 h-4 rounded text-primary-600 dark:text-secondary-500 checked:bg-primary-600 dark:checked:bg-secondary-500", "focus:ring-primary-500/30 dark:focus:ring-secondary-400/30") })), _jsx(Span, { size: "sm", className: "flex-1 group-hover:text-zinc-900 dark:group-hover:text-zinc-100 transition-colors truncate", color: "muted", children: option.label }), option.count !== undefined && (_jsx(Span, { size: "xs", className: "tabular-nums flex-shrink-0", color: "faint", children: option.count }))] }, option.value));
89
- }), filtered.length === 0 && (
90
- // audit-variant-ok: accordion empty-state Text — py-1 below PADDING_MAP scale
91
- _jsx(Text, { className: "py-1", color: "faint", size: "xs", children: "No results" }))] }))] }));
81
+ }), filtered.length === 0 && (_jsx(Text, { className: "py-1", color: "faint", size: "xs", children: "No results" }))] }))] }));
92
82
  }
@@ -12,7 +12,5 @@ export function Checkbox({ label, suffix, error, indeterminate, className = "",
12
12
  }, [indeterminate]);
13
13
  return (_jsxs(Div, { className: "w-full", children: [_jsxs("label", { className: "flex flex-row items-center gap-3 cursor-pointer group", children: [_jsxs(Row, { className: "relative flex-shrink-0", align: "center", justify: "center", children: [_jsx("input", { ref: inputRef, type: "checkbox", checked: checked, className: cn("peer w-5 h-5 rounded-md border-2 cursor-pointer", "transition-all duration-200 appearance-none", error
14
14
  ? "border-error dark:border-error"
15
- : "border-zinc-300 dark:border-slate-600", "checked:bg-primary-600 checked:border-primary-600", "dark:checked:bg-secondary-500 dark:checked:border-secondary-500", "hover:border-primary-400 dark:hover:border-secondary-400", "focus:outline-none focus:ring-2 focus:ring-primary-500/30 focus:ring-offset-1", "dark:focus:ring-secondary-400/30 dark:focus:ring-offset-slate-900", "disabled:opacity-50 disabled:cursor-not-allowed", className), ...props }), _jsx("svg", { className: "absolute w-3 h-3 text-white pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity duration-150", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: indeterminate ? (_jsx("line", { x1: "2", y1: "6", x2: "10", y2: "6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })) : (_jsx("path", { d: "M2 6L5 9L10 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })) })] }), (label || suffix) && (
16
- // audit-variant-ok: checkbox label Span — group-hover state override; Span lacks group-hover variant
17
- _jsxs(Span, { layout: "flex", gap: "md", size: "sm", className: "group-hover:text-zinc-900 dark:group-hover:text-zinc-100 transition-colors", color: "muted", children: [label, suffix] }))] }), error && (_jsx(Text, { className: cn(ERROR_BASE, "mt-1.5"), role: "alert", children: error }))] }));
15
+ : "border-zinc-300 dark:border-slate-600", "checked:bg-primary-600 checked:border-primary-600", "dark:checked:bg-secondary-500 dark:checked:border-secondary-500", "hover:border-primary-400 dark:hover:border-secondary-400", "focus:outline-none focus:ring-2 focus:ring-primary-500/30 focus:ring-offset-1", "dark:focus:ring-secondary-400/30 dark:focus:ring-offset-slate-900", "disabled:opacity-50 disabled:cursor-not-allowed", className), ...props }), _jsx("svg", { className: "absolute w-3 h-3 text-white pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity duration-150", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: indeterminate ? (_jsx("line", { x1: "2", y1: "6", x2: "10", y2: "6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })) : (_jsx("path", { d: "M2 6L5 9L10 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })) })] }), (label || suffix) && (_jsxs(Span, { layout: "flex", gap: "md", size: "sm", className: "group-hover:text-zinc-900 dark:group-hover:text-zinc-100 transition-colors", color: "muted", children: [label, suffix] }))] }), error && (_jsx(Text, { className: cn(ERROR_BASE, "mt-1.5"), role: "alert", children: error }))] }));
18
16
  }
@@ -18,7 +18,5 @@ export function Slider({ value: controlledValue, defaultValue = 0, min = 0, max
18
18
  onChange?.(newVal);
19
19
  };
20
20
  const displayValue = formatValue ? formatValue(value) : String(value);
21
- return (_jsxs(Div, { className: cn("w-full space-y-2", className), children: [(label || showValue) && (_jsxs(Row, { justify: "between", children: [label && (_jsx("label", { htmlFor: sliderId, className: LABEL_BASE, children: label })), showValue && (_jsx(Span, { size: "sm", weight: "semibold", className: "tabular-nums", color: "primary", children: displayValue }))] })), _jsxs(Row, { className: "relative h-5", children: [_jsx(Row, { className: "absolute inset-y-0 w-full", align: "center", children: _jsx(Div, { className: "w-full h-1.5", surface: "subtle", rounded: "full", children: _jsx(Div, { className: "h-full bg-primary-500 dark:bg-secondary-500 transition-all", rounded: "full",
22
- // audit-inline-style-ok: computed percentage
23
- style: { width: `${pct}%` } }) }) }), _jsx("input", { type: "range", id: sliderId, min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, className: cn("relative w-full appearance-none bg-transparent cursor-pointer", "focus:outline-none", "[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4", "[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", "[&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary-500 dark:[&::-webkit-slider-thumb]:border-secondary-500", "[&::-webkit-slider-thumb]:shadow-sm", "[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4", "[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-white", "[&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary-500 dark:[&::-moz-range-thumb]:border-secondary-500", disabled && "opacity-50 cursor-not-allowed") })] }), _jsxs(Row, { color: "muted", textSize: "xs", justify: "between", children: [_jsx(Span, { children: formatValue ? formatValue(min) : min }), _jsx(Span, { children: formatValue ? formatValue(max) : max })] }), error && (_jsx(Text, { className: ERROR_BASE, role: "alert", children: error }))] }));
21
+ return (_jsxs(Div, { className: cn("w-full space-y-2", className), children: [(label || showValue) && (_jsxs(Row, { justify: "between", children: [label && (_jsx("label", { htmlFor: sliderId, className: LABEL_BASE, children: label })), showValue && (_jsx(Span, { size: "sm", weight: "semibold", className: "tabular-nums", color: "primary", children: displayValue }))] })), _jsxs(Row, { className: "relative h-5", children: [_jsx(Row, { className: "absolute inset-y-0 w-full", align: "center", children: _jsx(Div, { className: "w-full h-1.5", surface: "subtle", rounded: "full", children: _jsx(Div, { className: "h-full bg-primary-500 dark:bg-secondary-500 transition-all", rounded: "full", style: { width: `${pct}%` } }) }) }), _jsx("input", { type: "range", id: sliderId, min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, className: cn("relative w-full appearance-none bg-transparent cursor-pointer", "focus:outline-none", "[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4", "[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", "[&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary-500 dark:[&::-webkit-slider-thumb]:border-secondary-500", "[&::-webkit-slider-thumb]:shadow-sm", "[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4", "[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-white", "[&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary-500 dark:[&::-moz-range-thumb]:border-secondary-500", disabled && "opacity-50 cursor-not-allowed") })] }), _jsxs(Row, { color: "muted", textSize: "xs", justify: "between", children: [_jsx(Span, { children: formatValue ? formatValue(min) : min }), _jsx(Span, { children: formatValue ? formatValue(max) : max })] }), error && (_jsx(Text, { className: ERROR_BASE, role: "alert", children: error }))] }));
24
22
  }
@@ -69,7 +69,6 @@ export function useHistory(userId) {
69
69
  const [items, setItems] = useState([]);
70
70
  const trackTimers = useRef(new Map());
71
71
  const loadItems = useCallback(async () => {
72
- // toast-intentionally-silent — silent fallback to empty list on error
73
72
  try {
74
73
  if (isAuth) {
75
74
  setItems(await fetchAuthHistory());
@@ -12,7 +12,6 @@
12
12
  import { getAdminDb } from "../../../providers/db-firebase";
13
13
  import { serverLogger } from "../../../monitoring";
14
14
  import { HISTORY_COLLECTION, HISTORY_DOC_ID, HISTORY_MAX, } from "../../../constants/limits";
15
- // audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof/Array.isArray
16
15
  function toDate(raw) {
17
16
  if (raw instanceof Date)
18
17
  return raw;
@@ -23,7 +22,6 @@ function toDate(raw) {
23
22
  return new Date(raw);
24
23
  return new Date();
25
24
  }
26
- // audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof/Array.isArray
27
25
  function normaliseItems(raw) {
28
26
  if (!Array.isArray(raw))
29
27
  return [];
@@ -11,7 +11,6 @@ export async function createCarouselSlide(adminId, input) {
11
11
  const slide = await carouselRepository.create({
12
12
  ...input,
13
13
  createdBy: adminId,
14
- // audit-unknown-ok: TS structural escape — CarouselSlideCreateInput
15
14
  });
16
15
  serverLogger.info("createCarouselSlide", { adminId, slideId: slide.id });
17
16
  return slide;
@@ -15,9 +15,7 @@ export const updateSectionSchema = z.object({
15
15
  });
16
16
  // --- Actions --------------------------------------------------------------
17
17
  export async function createHomepageSection(input, createdBy) {
18
- const section = await homepageSectionsRepository.create(
19
- // audit-unknown-ok: TS structural escape — HomepageSectionCreateInput
20
- input);
18
+ const section = await homepageSectionsRepository.create(input);
21
19
  serverLogger.info("createHomepageSection", {
22
20
  createdBy,
23
21
  sectionId: section.id,
@@ -150,7 +150,6 @@ export const carouselPOST = createRouteHandler({
150
150
  cards: body.cards ?? [],
151
151
  createdAt: now,
152
152
  updatedAt: now,
153
- // audit-unknown-ok: TS structural escape — CarouselSlide
154
153
  });
155
154
  return NextResponse.json({ success: true, data: created }, { status: 201 });
156
155
  },
@@ -132,7 +132,6 @@ export const POST = createRouteHandler({
132
132
  enabled: body.enabled ?? true,
133
133
  createdAt: now,
134
134
  updatedAt: now,
135
- // audit-unknown-ok: TS structural escape — HomepageSection
136
135
  });
137
136
  return NextResponse.json({ success: true, data: created }, { status: 201 });
138
137
  },