@mohasinac/appkit 3.4.7 → 3.5.0
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.
- package/dist/_internal/client/features/classified/ClassifiedDetailView.js +1 -1
- package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +1 -1
- package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +1 -1
- package/dist/_internal/client/features/filters/filter-load-options.js +10 -9
- package/dist/_internal/client/features/layout/DashboardLayoutClient.d.ts +6 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +11 -4
- package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
- package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +10 -3
- package/dist/_internal/client/features/maintenance/views/ServerErrorsListView.js +2 -2
- package/dist/_internal/client/scaffolds/DashboardScaffold.js +3 -1
- package/dist/_internal/server/features/checkout/actions.d.ts +16 -0
- package/dist/_internal/server/features/checkout/actions.js +149 -35
- package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +31 -0
- package/dist/_internal/server/features/checkout/bundle-expansion.js +41 -0
- package/dist/_internal/server/features/lottery/actions.js +14 -4
- package/dist/_internal/server/features/maintenance/analyze.js +4 -2
- package/dist/_internal/server/features/orders/actions.js +9 -0
- package/dist/_internal/server/features/orders/adapters.js +19 -0
- package/dist/_internal/server/features/seo/robots.js +1 -1
- package/dist/_internal/server/functions/firestore.d.ts +47 -1
- package/dist/_internal/server/functions/firestore.js +56 -1
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +9 -1
- package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.d.ts +10 -0
- package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.js +49 -0
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +32 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +26 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.js +179 -0
- package/dist/_internal/server/jobs/core/index.d.ts +4 -1
- package/dist/_internal/server/jobs/core/index.js +4 -1
- package/dist/_internal/server/jobs/core/jobRunners.d.ts +28 -0
- package/dist/_internal/server/jobs/core/jobRunners.js +37 -0
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +15 -0
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +38 -0
- package/dist/_internal/server/jobs/core/onJobCreated.d.ts +22 -0
- package/dist/_internal/server/jobs/core/onJobCreated.js +59 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +6 -1
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +5 -2
- package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.js +2 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +6 -0
- package/dist/_internal/server/jobs/handlers/index.js +8 -0
- package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.d.ts +12 -0
- package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.js +20 -0
- package/dist/_internal/server/jobs/handlers/onJobCreated.d.ts +3 -0
- package/dist/_internal/server/jobs/handlers/onJobCreated.js +9 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +25 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +71 -0
- package/dist/_internal/server/jobs/handlers/onShipmentDeleted.d.ts +14 -0
- package/dist/_internal/server/jobs/handlers/onShipmentDeleted.js +23 -0
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +17 -0
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +26 -0
- package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.js +3 -1
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +136 -0
- package/dist/_internal/shared/features/blog/schema.d.ts +8 -8
- package/dist/_internal/shared/features/brands/schema.d.ts +4 -4
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +8 -8
- package/dist/_internal/shared/features/events/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +8 -8
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +4 -4
- package/dist/client/api/useFeatureFlags.d.ts +22 -0
- package/dist/client/api/useFeatureFlags.js +27 -0
- package/dist/client/observability/reportClientError.js +3 -2
- package/dist/client.d.ts +4 -2
- package/dist/client.js +2 -1
- package/dist/configs/next.js +1 -0
- package/dist/constants/api-endpoints.d.ts +279 -3
- package/dist/constants/api-endpoints.js +130 -2
- package/dist/core/hooks/useSyncManager.js +5 -4
- package/dist/errors/conflict-error.d.ts +4 -0
- package/dist/errors/conflict-error.js +6 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/features/about/components/FeesView.js +2 -2
- package/dist/features/about/components/HelpPageView.js +2 -2
- package/dist/features/about/components/HowAuctionsWorkView.js +2 -2
- package/dist/features/about/components/HowCheckoutWorksView.js +2 -2
- package/dist/features/about/components/HowEmiWorksView.js +2 -2
- package/dist/features/about/components/HowOffersWorkView.js +3 -3
- package/dist/features/about/components/HowOrdersWorkView.js +3 -3
- package/dist/features/about/components/HowPayoutsWorkView.js +2 -2
- package/dist/features/about/components/HowPreOrdersWorkView.js +2 -2
- package/dist/features/about/components/HowReviewsWorkView.js +2 -2
- package/dist/features/about/components/PublicProfileView.d.ts +8 -1
- package/dist/features/about/components/PublicProfileView.js +11 -9
- package/dist/features/about/components/SecurityPrivacyView.js +2 -2
- package/dist/features/about/components/UnauthorizedView.js +2 -2
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/NotificationBell.js +5 -5
- package/dist/features/account/components/NotificationPreferencesPanel.js +5 -2
- package/dist/features/account/components/UserOffersPanel.js +5 -4
- package/dist/features/account/components/UserSidebar.js +2 -2
- package/dist/features/account/components/UserSupportView.js +3 -3
- package/dist/features/account/schemas/index.d.ts +12 -12
- package/dist/features/addresses/schemas/index.d.ts +6 -6
- package/dist/features/admin/components/AdminAdEditorView.js +3 -3
- package/dist/features/admin/components/AdminAddressEditorView.js +3 -3
- package/dist/features/admin/components/AdminAdsView.js +3 -3
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminBlogView.js +12 -15
- package/dist/features/admin/components/AdminBrandEditorView.js +1 -1
- package/dist/features/admin/components/AdminBrandsView.js +12 -13
- package/dist/features/admin/components/AdminBundleEditorView.js +5 -4
- package/dist/features/admin/components/AdminBundlesView.js +32 -23
- package/dist/features/admin/components/AdminCarouselEditorView.js +5 -5
- package/dist/features/admin/components/AdminCarouselView.js +2 -2
- package/dist/features/admin/components/AdminCatalogGuideView.js +1 -1
- package/dist/features/admin/components/AdminCategoriesView.js +12 -13
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminCouponEditorView.d.ts +10 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +7 -2
- package/dist/features/admin/components/AdminCouponsView.js +32 -27
- package/dist/features/admin/components/AdminEmployeeEditorView.js +3 -3
- package/dist/features/admin/components/AdminFaqEditorView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +20 -20
- package/dist/features/admin/components/AdminFeatureEditorView.js +5 -5
- package/dist/features/admin/components/AdminFeaturesView.js +9 -10
- package/dist/features/admin/components/AdminFilterBar.js +1 -1
- package/dist/features/admin/components/AdminFulfillmentView.js +4 -4
- package/dist/features/admin/components/AdminGuideHubView.js +2 -2
- package/dist/features/admin/components/AdminMediaView.js +3 -2
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +3 -3
- package/dist/features/admin/components/AdminOrdersView.js +21 -30
- package/dist/features/admin/components/AdminPageHeader.js +3 -3
- package/dist/features/admin/components/AdminPayoutsView.js +8 -8
- package/dist/features/admin/components/AdminPrizeDrawsView.js +8 -9
- package/dist/features/admin/components/AdminProductEditorView.d.ts +9 -1
- package/dist/features/admin/components/AdminProductEditorView.js +7 -4
- package/dist/features/admin/components/AdminProductsView.js +30 -41
- package/dist/features/admin/components/AdminReviewsView.js +14 -17
- package/dist/features/admin/components/AdminScammerEditorView.js +5 -5
- package/dist/features/admin/components/AdminSectionsView.js +3 -3
- package/dist/features/admin/components/AdminSessionsView.js +8 -10
- package/dist/features/admin/components/AdminSidebar.js +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +10 -3
- package/dist/features/admin/components/AdminStoreEditorView.js +4 -5
- package/dist/features/admin/components/AdminStoresView.js +18 -13
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
- package/dist/features/admin/components/AdminTeamView.js +9 -5
- package/dist/features/admin/components/AdminUsersView.js +19 -15
- package/dist/features/admin/components/AdminViewCards.js +5 -5
- package/dist/features/admin/components/DashboardStats.js +1 -1
- package/dist/features/admin/components/DataListingView.js +2 -2
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/DrawerFormFooter.js +1 -1
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +2 -2
- package/dist/features/admin/components/analytics/AdminStatCard.js +1 -1
- package/dist/features/admin/hooks/useAdminListing.d.ts +3 -2
- package/dist/features/admin/hooks/useAdminListing.js +8 -2
- package/dist/features/admin/permission-map.js +2 -0
- package/dist/features/admin/schemas/firestore.d.ts +7 -0
- package/dist/features/admin/schemas/firestore.js +4 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +7 -7
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +4 -4
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auctions/schemas/index.d.ts +16 -16
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +2 -0
- package/dist/features/auth/schemas/index.d.ts +6 -6
- package/dist/features/before-after/schemas/index.d.ts +3 -3
- package/dist/features/blog/actions/blog-actions.d.ts +32 -32
- package/dist/features/blog/components/BlogFeaturedCard.js +2 -2
- package/dist/features/blog/components/BlogIndexListing.js +2 -2
- package/dist/features/blog/components/BlogListView.js +4 -4
- package/dist/features/blog/components/BlogPostView.js +4 -4
- package/dist/features/blog/schemas/index.d.ts +77 -77
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/catalogue/actions/approve-catalogue-listing.d.ts +12 -0
- package/dist/features/catalogue/actions/approve-catalogue-listing.js +50 -0
- package/dist/features/catalogue/actions/list-from-catalogue.d.ts +17 -0
- package/dist/features/catalogue/actions/list-from-catalogue.js +50 -0
- package/dist/features/catalogue/actions/submit-for-approval.d.ts +8 -0
- package/dist/features/catalogue/actions/submit-for-approval.js +30 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.d.ts +2 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +53 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.d.ts +7 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +79 -0
- package/dist/features/catalogue/components/PublicCatalogueView.d.ts +5 -0
- package/dist/features/catalogue/components/PublicCatalogueView.js +22 -0
- package/dist/features/catalogue/components/UserCatalogueView.d.ts +12 -0
- package/dist/features/catalogue/components/UserCatalogueView.js +51 -0
- package/dist/features/catalogue/index.d.ts +12 -0
- package/dist/features/catalogue/index.js +9 -0
- package/dist/features/catalogue/repository/catalogue.repository.d.ts +39 -0
- package/dist/features/catalogue/repository/catalogue.repository.js +68 -0
- package/dist/features/catalogue/schemas/firestore.d.ts +47 -0
- package/dist/features/catalogue/schemas/firestore.js +22 -0
- package/dist/features/catalogue/schemas/index.d.ts +2 -0
- package/dist/features/catalogue/schemas/index.js +2 -0
- package/dist/features/catalogue/schemas/validation.d.ts +71 -0
- package/dist/features/catalogue/schemas/validation.js +25 -0
- package/dist/features/catalogue/utils/freshness.d.ts +10 -0
- package/dist/features/catalogue/utils/freshness.js +15 -0
- package/dist/features/catalogue/utils/product-from-item.d.ts +15 -0
- package/dist/features/catalogue/utils/product-from-item.js +34 -0
- package/dist/features/categories/components/BrandDetailPageView.js +1 -1
- package/dist/features/categories/components/BrandDetailTabs.js +2 -2
- package/dist/features/categories/components/BundleCollage.js +2 -2
- package/dist/features/categories/components/BundleItemsPicker.js +3 -2
- package/dist/features/categories/components/CategoriesIndexListing.js +8 -6
- package/dist/features/categories/components/CategoryBundlesListing.js +10 -4
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +2 -2
- package/dist/features/categories/components/CategoryGrid.js +3 -3
- package/dist/features/categories/components/CategoryProductsListing.js +1 -1
- package/dist/features/categories/components/CategorySortSelect.js +1 -1
- package/dist/features/categories/components/CategoryStoresListing.js +1 -1
- package/dist/features/categories/components/CategoryTableColumns.js +1 -1
- package/dist/features/categories/components/CategoryTree.js +2 -2
- package/dist/features/categories/components/ConcernCard.js +1 -1
- package/dist/features/categories/hooks/useCategories.js +1 -1
- package/dist/features/categories/schemas/index.d.ts +32 -32
- package/dist/features/classified/components/ClassifiedFilters.js +2 -2
- package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
- package/dist/features/collections/schemas/index.d.ts +2 -2
- package/dist/features/consultation/components/ConsultationForm.js +1 -1
- package/dist/features/consultation/schemas/index.d.ts +10 -10
- package/dist/features/contact/components/ContactForm.js +4 -4
- package/dist/features/contact/components/ContactInfoSidebar.js +1 -1
- package/dist/features/contact/components/ContactPageView.js +2 -1
- package/dist/features/copilot/components/AdminCopilotView.js +5 -4
- package/dist/features/corporate/schemas/index.d.ts +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +3 -3
- package/dist/features/events/components/AdminEventEditorView.js +4 -4
- package/dist/features/events/components/AdminEventEntriesView.js +2 -2
- package/dist/features/events/components/AdminEventsView.js +8 -8
- package/dist/features/events/components/EventBanner.js +1 -1
- package/dist/features/events/components/EventCard.js +3 -3
- package/dist/features/events/components/EventLeaderboard.js +1 -1
- package/dist/features/events/components/EventOfferCard.js +1 -1
- package/dist/features/events/components/EventPollWidget.js +6 -5
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
- package/dist/features/events/components/EventRaffleWinnerView.js +5 -5
- package/dist/features/events/components/EventRafflesSection.js +1 -1
- package/dist/features/events/components/EventSaleBanner.js +1 -1
- package/dist/features/events/components/EventsIndexListing.js +4 -2
- package/dist/features/events/components/EventsListView.js +2 -2
- package/dist/features/events/components/SpinWheelView.js +11 -5
- package/dist/features/events/schemas/index.d.ts +100 -100
- package/dist/features/faq/actions/faq-actions.d.ts +6 -6
- package/dist/features/faq/components/ContactCTA.js +3 -3
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +3 -3
- package/dist/features/faq/schemas/index.d.ts +12 -12
- package/dist/features/filters/AsyncFacetSection.js +4 -4
- package/dist/features/filters/FilterFacetSection.js +8 -8
- package/dist/features/filters/RangeFilter.js +2 -2
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/forms/Checkbox.js +2 -8
- package/dist/features/forms/Input.js +2 -1
- package/dist/features/forms/Radio.js +3 -3
- package/dist/features/forms/Select.d.ts +1 -1
- package/dist/features/forms/Select.js +3 -2
- package/dist/features/forms/Slider.js +5 -11
- package/dist/features/forms/Textarea.js +2 -1
- package/dist/features/grouped/schemas/index.d.ts +6 -6
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +4 -4
- package/dist/features/homepage/components/AdvertisementBanner.js +4 -4
- package/dist/features/homepage/components/AnnouncementBar.js +3 -3
- package/dist/features/homepage/components/BeforeAfterCard.js +1 -1
- package/dist/features/homepage/components/BrandsSection.js +9 -9
- package/dist/features/homepage/components/CTABannerSection.js +1 -1
- package/dist/features/homepage/components/CharacterHotspot.js +4 -4
- package/dist/features/homepage/components/CharacterHotspotForm.js +15 -13
- package/dist/features/homepage/components/CollectionCardsSection.js +1 -1
- package/dist/features/homepage/components/CustomCardsSection.js +6 -6
- package/dist/features/homepage/components/CustomerReviewsSection.js +2 -2
- package/dist/features/homepage/components/FAQSection.js +2 -2
- package/dist/features/homepage/components/FeaturedBundlesSection.js +3 -3
- package/dist/features/homepage/components/FeaturedResultsSection.js +2 -2
- package/dist/features/homepage/components/GoogleReviewsSection.js +6 -6
- package/dist/features/homepage/components/HeroBanner.js +1 -1
- package/dist/features/homepage/components/HeroCarousel.js +5 -4
- package/dist/features/homepage/components/HeroSection.js +1 -7
- package/dist/features/homepage/components/HomepageSkeleton.js +1 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
- package/dist/features/homepage/components/HowItWorksSection.js +2 -2
- package/dist/features/homepage/components/NewsletterBanner.js +2 -2
- package/dist/features/homepage/components/NewsletterSection.js +1 -1
- package/dist/features/homepage/components/PromoGrid.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +6 -6
- package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -2
- package/dist/features/homepage/components/ShopByCategorySection.js +10 -10
- package/dist/features/homepage/components/SiteFeaturesSection.js +2 -2
- package/dist/features/homepage/components/SocialFeedSection.js +5 -5
- package/dist/features/homepage/components/SocialPostCard.js +1 -1
- package/dist/features/homepage/components/StatsCounterSection.js +1 -1
- package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
- package/dist/features/homepage/components/TrustBadges.js +1 -1
- package/dist/features/homepage/components/TrustFeaturesSection.js +2 -2
- package/dist/features/homepage/components/TrustIndicatorsSection.js +2 -2
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/homepage/hooks/useActiveAd.js +2 -1
- package/dist/features/homepage/schemas/firestore.d.ts +10 -0
- package/dist/features/homepage/schemas/index.d.ts +116 -116
- package/dist/features/jobs/actions/enqueue-job.d.ts +24 -0
- package/dist/features/jobs/actions/enqueue-job.js +44 -0
- package/dist/features/jobs/repository/jobs.repository.d.ts +21 -0
- package/dist/features/jobs/repository/jobs.repository.js +48 -0
- package/dist/features/jobs/schemas/firestore.d.ts +54 -0
- package/dist/features/jobs/schemas/firestore.js +24 -0
- package/dist/features/layout/AppLayoutShell.js +17 -11
- package/dist/features/layout/AutoBreadcrumbs.js +1 -1
- package/dist/features/layout/BackToTop.js +2 -2
- package/dist/features/layout/BottomActions.js +7 -7
- package/dist/features/layout/BottomNavItem.js +2 -2
- package/dist/features/layout/BottomNavLayout.js +13 -4
- package/dist/features/layout/BottomNavbar.d.ts +9 -1
- package/dist/features/layout/BottomNavbar.js +12 -5
- package/dist/features/layout/BottomSheet.js +1 -1
- package/dist/features/layout/Breadcrumbs.js +1 -1
- package/dist/features/layout/FooterLayout.js +2 -2
- package/dist/features/layout/NavItem.js +3 -3
- package/dist/features/layout/NavbarLayout.js +6 -6
- package/dist/features/layout/SidebarLayout.d.ts +3 -0
- package/dist/features/layout/SidebarLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +4 -4
- package/dist/features/live/components/LiveItemFilters.js +2 -2
- package/dist/features/live/components/LiveItemsIndexListing.js +3 -3
- package/dist/features/lottery/types/index.d.ts +3 -1
- package/dist/features/lottery/types/index.js +16 -3
- package/dist/features/loyalty/components/CoinsDisplay.js +2 -2
- package/dist/features/media/MediaImage.d.ts +6 -1
- package/dist/features/media/MediaImage.js +10 -4
- package/dist/features/media/MediaLightbox.js +1 -1
- package/dist/features/media/MediaPickerModal.js +4 -3
- package/dist/features/media/MediaVideo.js +1 -1
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.js +1 -1
- package/dist/features/media/repository/media-assets.repository.d.ts +9 -0
- package/dist/features/media/types/index.d.ts +4 -4
- package/dist/features/media/upload/MediaUploadField.js +3 -3
- package/dist/features/media/upload/MediaUploadList.js +1 -1
- package/dist/features/messages/hooks/useConversation.js +4 -3
- package/dist/features/messages/hooks/useConversations.js +2 -1
- package/dist/features/messages/schemas/index.d.ts +6 -6
- package/dist/features/orders/components/MarketplaceOrderCard.js +1 -1
- package/dist/features/orders/components/OrderPaymentSummary.d.ts +16 -0
- package/dist/features/orders/components/OrderPaymentSummary.js +32 -0
- package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
- package/dist/features/orders/components/OrdersList.d.ts +7 -2
- package/dist/features/orders/components/OrdersList.js +5 -5
- package/dist/features/orders/components/RefundHistoryTable.js +1 -1
- package/dist/features/orders/components/RefundRequestView.js +1 -1
- package/dist/features/orders/components/index.d.ts +2 -0
- package/dist/features/orders/components/index.js +1 -0
- package/dist/features/orders/repository/orders.repository.d.ts +8 -0
- package/dist/features/orders/repository/orders.repository.js +24 -0
- package/dist/features/orders/schemas/firestore.d.ts +59 -0
- package/dist/features/orders/schemas/firestore.js +5 -0
- package/dist/features/orders/schemas/index.d.ts +91 -40
- package/dist/features/orders/schemas/index.js +10 -0
- package/dist/features/orders/types/index.d.ts +15 -0
- package/dist/features/payments/schemas/index.d.ts +12 -12
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -5
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +7 -7
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +3 -3
- package/dist/features/pre-orders/schemas/index.d.ts +12 -12
- package/dist/features/products/columns/productTableColumns.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +3 -3
- package/dist/features/products/components/CompareOverlay.js +15 -10
- package/dist/features/products/components/CustomFieldsEditor.js +2 -2
- package/dist/features/products/components/CustomSectionsEditor.js +3 -3
- package/dist/features/products/components/FeatureBadge.js +2 -2
- package/dist/features/products/components/GroupSettingsPanel.js +5 -4
- package/dist/features/products/components/MakeOfferButton.js +4 -4
- package/dist/features/products/components/MarketplaceBundleCard.js +3 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -1
- package/dist/features/products/components/PrizeDrawCollage.js +6 -6
- package/dist/features/products/components/PrizeDrawDetailPageView.js +5 -5
- package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -4
- package/dist/features/products/components/PrizeDrawsIndexListing.js +11 -4
- package/dist/features/products/components/PrizeDrawsSection.js +1 -1
- package/dist/features/products/components/PrizeRevealModal.js +9 -4
- package/dist/features/products/components/ProductDetailActions.js +2 -1
- package/dist/features/products/components/ProductDetailPageView.js +16 -16
- package/dist/features/products/components/ProductFeaturesSelector.js +5 -5
- package/dist/features/products/components/ProductForm.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +5 -3
- package/dist/features/products/components/ProductGrid.js +11 -11
- package/dist/features/products/components/ProductTabs.js +2 -2
- package/dist/features/products/components/ProductTabsShell.js +2 -1
- package/dist/features/products/components/ProductsIndexListing.js +6 -1
- package/dist/features/products/components/ShareButton.js +2 -1
- package/dist/features/products/components/ShowGroupSection.js +9 -5
- package/dist/features/products/components/SublistingCarouselSection.js +8 -4
- package/dist/features/products/constants/action-defs.d.ts +10 -2
- package/dist/features/products/constants/action-defs.js +20 -2
- package/dist/features/products/schemas/firestore.d.ts +5 -0
- package/dist/features/products/schemas/index.d.ts +40 -40
- package/dist/features/products/schemas/product-features.validators.d.ts +14 -14
- package/dist/features/promotions/components/CouponCard.js +13 -7
- package/dist/features/promotions/components/CouponsIndexListing.js +4 -6
- package/dist/features/promotions/components/PromotionsView.js +2 -2
- package/dist/features/promotions/schemas/index.d.ts +26 -26
- package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +11 -11
- package/dist/features/reviews/components/ReviewModal.js +1 -1
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/reviews/components/ReviewsList.js +2 -2
- package/dist/features/reviews/schemas/index.d.ts +22 -22
- package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
- package/dist/features/scams/components/ScamProfileView.js +3 -3
- package/dist/features/scams/components/ScamRegistryView.js +2 -2
- package/dist/features/scams/schemas/index.d.ts +20 -20
- package/dist/features/search/components/Search.js +9 -9
- package/dist/features/search/components/SearchFiltersRow.js +1 -1
- package/dist/features/search/components/SearchResultsSection.js +3 -3
- package/dist/features/search/components/SearchView.js +1 -1
- package/dist/features/search/hooks/useNavSuggestions.js +2 -1
- package/dist/features/search/hooks/useSearch.js +2 -2
- package/dist/features/search/schemas/index.d.ts +3 -3
- package/dist/features/seller/components/BrandInlineSelect.js +2 -2
- package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
- package/dist/features/seller/components/QuickProductForm.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +4 -4
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +3 -3
- package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
- package/dist/features/seller/components/SellerArtView.js +11 -11
- package/dist/features/seller/components/SellerAuctionsView.js +11 -11
- package/dist/features/seller/components/SellerBidsView.js +3 -3
- package/dist/features/seller/components/SellerBundlesView.js +12 -12
- package/dist/features/seller/components/SellerClassifiedView.js +11 -11
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerDigitalCodesView.js +11 -11
- package/dist/features/seller/components/SellerFeaturesView.js +4 -4
- package/dist/features/seller/components/SellerLiveView.js +11 -11
- package/dist/features/seller/components/SellerOffersPanel.js +3 -2
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
- package/dist/features/seller/components/SellerPayoutRequestView.js +6 -5
- package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -4
- package/dist/features/seller/components/SellerPreOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPrizeDrawsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.js +20 -6
- package/dist/features/seller/components/SellerProductsCards.js +3 -3
- package/dist/features/seller/components/SellerProductsView.js +4 -4
- package/dist/features/seller/components/SellerReviewsView.js +7 -6
- package/dist/features/seller/components/SellerShippingView.js +2 -1
- package/dist/features/seller/components/SellerSidebar.js +5 -5
- package/dist/features/seller/components/SellerStickersView.js +11 -11
- package/dist/features/seller/components/SellerTemplatesView.js +1 -1
- package/dist/features/seller/schemas/index.d.ts +20 -20
- package/dist/features/server-errors/schemas/index.d.ts +6 -6
- package/dist/features/shell/CommandPalette.d.ts +27 -0
- package/dist/features/shell/CommandPalette.js +92 -0
- package/dist/features/shell/FormShell.js +4 -3
- package/dist/features/shell/QuickFormDrawer.js +3 -2
- package/dist/features/shell/StepForm.js +2 -2
- package/dist/features/shell/index.d.ts +2 -0
- package/dist/features/shell/index.js +1 -0
- package/dist/features/shipments/components/AdminShipmentEditorView.d.ts +7 -0
- package/dist/features/shipments/components/AdminShipmentEditorView.js +123 -0
- package/dist/features/shipments/components/AdminShipmentLotItemsView.d.ts +6 -0
- package/dist/features/shipments/components/AdminShipmentLotItemsView.js +96 -0
- package/dist/features/shipments/components/AdminShipmentProjectionsView.d.ts +9 -0
- package/dist/features/shipments/components/AdminShipmentProjectionsView.js +44 -0
- package/dist/features/shipments/components/AdminShipmentsView.d.ts +8 -0
- package/dist/features/shipments/components/AdminShipmentsView.js +82 -0
- package/dist/features/shipments/components/ShipmentItemLinkModal.d.ts +15 -0
- package/dist/features/shipments/components/ShipmentItemLinkModal.js +37 -0
- package/dist/features/shipments/hooks/useShipments.d.ts +69 -0
- package/dist/features/shipments/hooks/useShipments.js +96 -0
- package/dist/features/shipments/index.d.ts +10 -0
- package/dist/features/shipments/index.js +7 -0
- package/dist/features/shipments/manifest.d.ts +2 -0
- package/dist/features/shipments/manifest.js +26 -0
- package/dist/features/shipments/repository/shipment-items.repository.d.ts +56 -0
- package/dist/features/shipments/repository/shipment-items.repository.js +78 -0
- package/dist/features/shipments/repository/shipment-lots.repository.d.ts +48 -0
- package/dist/features/shipments/repository/shipment-lots.repository.js +55 -0
- package/dist/features/shipments/repository/shipments.repository.d.ts +50 -0
- package/dist/features/shipments/repository/shipments.repository.js +77 -0
- package/dist/features/shipments/schemas/firestore.d.ts +150 -0
- package/dist/features/shipments/schemas/firestore.js +76 -0
- package/dist/features/shipments/schemas/index.d.ts +2 -0
- package/dist/features/shipments/schemas/index.js +2 -0
- package/dist/features/shipments/schemas/validation.d.ts +350 -0
- package/dist/features/shipments/schemas/validation.js +96 -0
- package/dist/features/shipments/utils/cost-allocation.d.ts +25 -0
- package/dist/features/shipments/utils/cost-allocation.js +83 -0
- package/dist/features/site-settings/components/ActionPermissionsManager.js +2 -2
- package/dist/features/stores/components/InteractiveStoreCard.js +2 -2
- package/dist/features/stores/components/StoreAboutView.js +1 -1
- package/dist/features/stores/components/StoreAuctionsListing.js +3 -3
- package/dist/features/stores/components/StoreAuctionsView.js +1 -1
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
- package/dist/features/stores/components/StoreClassifiedsListing.js +2 -2
- package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
- package/dist/features/stores/components/StoreDigitalCodesListing.js +2 -2
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreGuideHubView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +4 -4
- package/dist/features/stores/components/StoreLiveItemsListing.js +2 -2
- package/dist/features/stores/components/StoreNavTabs.js +2 -2
- package/dist/features/stores/components/StoreOrdersGuideView.js +1 -1
- package/dist/features/stores/components/StorePreOrdersListing.js +3 -3
- package/dist/features/stores/components/StoreProductsListing.js +1 -1
- package/dist/features/stores/components/StoreReviewsListing.js +2 -2
- package/dist/features/stores/components/StoreReviewsView.js +1 -1
- package/dist/features/stores/components/StoreSettingsGuideView.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +9 -3
- package/dist/features/stores/schemas/index.d.ts +10 -10
- package/dist/features/support/schemas/index.d.ts +22 -22
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +3 -3
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +1 -1
- package/dist/features/wishlist/hooks/useWishlistCount.js +1 -2
- package/dist/index.d.ts +44 -1
- package/dist/index.js +37 -1
- package/dist/next/routing/route-map.d.ts +18 -0
- package/dist/next/routing/route-map.js +9 -0
- package/dist/react/hooks/useVisualViewportInset.d.ts +1 -0
- package/dist/react/hooks/useVisualViewportInset.js +59 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/repositories/index.d.ts +5 -0
- package/dist/repositories/index.js +5 -0
- package/dist/schemas/registry.d.ts +398 -364
- package/dist/schemas/sieve.d.ts +2 -2
- package/dist/schemas/webhooks/google-oauth.d.ts +2 -2
- package/dist/schemas/webhooks/razorpay.d.ts +100 -100
- package/dist/seed/_helpers/media.js +1 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
- package/dist/seed/catalogue-seed-data.d.ts +2 -0
- package/dist/seed/catalogue-seed-data.js +112 -0
- package/dist/seed/grouped-listings-seed-data.d.ts +5 -0
- package/dist/seed/homepage-sections-seed-data.js +0 -1
- package/dist/seed/index.d.ts +2 -0
- package/dist/seed/index.js +2 -0
- package/dist/seed/manifest.js +6 -0
- package/dist/seed/products-preorders-seed-data.d.ts +5 -0
- package/dist/seed/shipments-seed-data.d.ts +5 -0
- package/dist/seed/shipments-seed-data.js +185 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +5 -0
- package/dist/styles.css +75 -19
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/index.d.ts +0 -2
- package/dist/tokens/index.js +0 -2
- package/dist/tokens/tokens.css +12 -2
- package/dist/ui/DataTable.js +4 -3
- package/dist/ui/components/Button.d.ts +4 -1
- package/dist/ui/components/Button.js +11 -5
- package/dist/ui/components/Checkbox.d.ts +9 -1
- package/dist/ui/components/Checkbox.js +5 -2
- package/dist/ui/components/ClaimCouponButton.js +2 -1
- package/dist/ui/components/ConfirmDeleteModal.style.css +1 -1
- package/dist/ui/components/Drawer.style.css +13 -1
- package/dist/ui/components/Dropdown.style.css +2 -2
- package/dist/ui/components/FilterDrawer.d.ts +4 -1
- package/dist/ui/components/FilterDrawer.js +8 -2
- package/dist/ui/components/Form.d.ts +1 -1
- package/dist/ui/components/Form.js +2 -2
- package/dist/ui/components/FormActionBar.style.css +6 -1
- package/dist/ui/components/IconButton.d.ts +6 -1
- package/dist/ui/components/IconButton.js +5 -2
- package/dist/ui/components/IconButton.style.css +11 -0
- package/dist/ui/components/ImageGallery.style.css +2 -0
- package/dist/ui/components/ImageLightbox.style.css +1 -0
- package/dist/ui/components/ListingFilterDrawer.d.ts +4 -1
- package/dist/ui/components/ListingFilterDrawer.js +4 -3
- package/dist/ui/components/ListingLayout.style.css +2 -2
- package/dist/ui/components/Modal.style.css +1 -1
- package/dist/ui/components/Pagination.d.ts +5 -1
- package/dist/ui/components/Pagination.js +4 -2
- package/dist/ui/components/RowActionMenu.js +1 -1
- package/dist/ui/components/RowActionMenu.style.css +1 -1
- package/dist/ui/components/Select.d.ts +6 -1
- package/dist/ui/components/Select.js +18 -13
- package/dist/ui/components/Select.style.css +1 -1
- package/dist/ui/components/Semantic.d.ts +13 -0
- package/dist/ui/components/Semantic.js +16 -3
- package/dist/ui/components/SideDrawer.style.css +16 -4
- package/dist/ui/components/SideModal.style.css +1 -1
- package/dist/ui/components/StickyToolbar.d.ts +3 -2
- package/dist/ui/components/StickyToolbar.js +1 -1
- package/dist/ui/components/Textarea.d.ts +5 -0
- package/dist/ui/components/Textarea.js +8 -4
- package/dist/ui/components/Toast.style.css +3 -0
- package/dist/ui/components/Typography.js +69 -8
- package/dist/ui/components/UnsavedChangesModal.style.css +1 -1
- package/dist/ui/components/surface-tokens.d.ts +121 -113
- package/dist/ui/components/surface-tokens.js +110 -104
- package/dist/ui/forms/FormShell.d.ts +8 -27
- package/dist/ui/forms/FormShell.js +1 -194
- package/dist/ui/forms/index.d.ts +2 -2
- package/dist/ui/forms/index.js +1 -1
- package/dist/ui/index.d.ts +8 -4
- package/dist/ui/index.js +4 -2
- package/dist/utils/id-generators.d.ts +27 -0
- package/dist/utils/id-generators.js +45 -0
- package/dist/utils/number.formatter.d.ts +7 -0
- package/dist/utils/number.formatter.js +9 -0
- package/dist/validation/schemas.d.ts +5 -5
- package/package.json +1 -1
package/dist/tokens/index.js
CHANGED
|
@@ -228,8 +228,6 @@ export const LAYOUT = {
|
|
|
228
228
|
firstChild: "mt-0 pt-0",
|
|
229
229
|
/** Kill bottom margin from last element in a zone */
|
|
230
230
|
lastChild: "mb-0 pb-0",
|
|
231
|
-
/** Combined bottom-nav bar (hidden on lg+, iPhone safe-area aware) */
|
|
232
|
-
bottomNav: "fixed bottom-0 inset-x-0 z-50 flex justify-around items-center h-16 bg-[var(--appkit-color-surface)] border-t border-[var(--appkit-color-border-subtle)] lg:hidden pb-[env(safe-area-inset-bottom)]",
|
|
233
231
|
/** Main content bottom padding to clear the bottom nav on mobile */
|
|
234
232
|
mainPadBottomNav: "pb-20 lg:pb-0",
|
|
235
233
|
/** Standard card heights for consistency */
|
package/dist/tokens/tokens.css
CHANGED
|
@@ -588,16 +588,26 @@
|
|
|
588
588
|
--appkit-z-overlay: 45;
|
|
589
589
|
--appkit-z-navbar: 40;
|
|
590
590
|
--appkit-z-bottom-nav: 40;
|
|
591
|
+
--appkit-z-title-bar: 42;
|
|
591
592
|
--appkit-z-sidebar: 50;
|
|
592
|
-
--appkit-z-title-bar: 50;
|
|
593
593
|
--appkit-z-modal: 60;
|
|
594
|
+
/* Transient option menus (Dropdown, Select) — must render above an open
|
|
595
|
+
Modal/Drawer/SideModal/SideDrawer (60) since they're commonly triggered
|
|
596
|
+
from inside one (e.g. a form Select field inside a Drawer), but they're
|
|
597
|
+
non-blocking so sit below toast/tooltip/confirm. */
|
|
598
|
+
--appkit-z-popover: 65;
|
|
594
599
|
--appkit-z-toast: 70;
|
|
595
600
|
--appkit-z-tooltip: 80;
|
|
601
|
+
/* Confirm dialogs / row-action menus — must always win regardless of what
|
|
602
|
+
they were opened from (a QuickFormDrawer panel, a FormShell dialog,
|
|
603
|
+
etc. — the highest of those is 65). Set above tooltip so it's the
|
|
604
|
+
unconditional top of the interactive-overlay stack. */
|
|
605
|
+
--appkit-z-confirm: 90;
|
|
596
606
|
|
|
597
607
|
/* Layout dimensions */
|
|
598
608
|
--appkit-navbar-height: 2.5rem; /* h-10 = 40px (mobile), h-12 = 48px (md) */
|
|
599
609
|
--appkit-sidebar-width: 20rem; /* w-80 = 320px */
|
|
600
|
-
--appkit-bottom-nav-height:
|
|
610
|
+
--appkit-bottom-nav-height: 4rem; /* h-16 = 64px */
|
|
601
611
|
--appkit-title-bar-height: 3rem; /* h-12 = 48px */
|
|
602
612
|
}
|
|
603
613
|
|
package/dist/ui/DataTable.js
CHANGED
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { useState, useMemo } from "react";
|
|
4
4
|
const CLS_CHECKBOX = "rounded border-zinc-300";
|
|
5
5
|
import { Button } from "./components/Button";
|
|
6
|
+
import { Checkbox } from "./components/Checkbox";
|
|
6
7
|
import { Spinner } from "./components/Spinner";
|
|
7
8
|
import { Pagination } from "./components/Pagination";
|
|
8
9
|
import { Span, Text } from "./components/Typography";
|
|
@@ -122,7 +123,7 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
|
|
|
122
123
|
mobileCardRender &&
|
|
123
124
|
renderCardGrid(activeViewMode), activeViewMode === "table" && mobileCardRender && (_jsx(Div, { className: "appkit-data-table__mobile-cards", children: paginatedData.map((item) => (_jsx(SelectableCard, { id: keyExtractor(item), selectable: selectable, selected: selectedIds.includes(keyExtractor(item)), onToggle: (id, checked) => onSelectionChange?.(checked
|
|
124
125
|
? [...selectedIds, id]
|
|
125
|
-
: selectedIds.filter((s) => s !== id)), children: mobileCardRender(item) }, keyExtractor(item)))) })), activeViewMode === "table" && (_jsx(Div, { className: "appkit-data-table__wrapper", children: _jsx(Div, { className: `appkit-data-table__scroll ${stickyHeader ? "appkit-data-table__scroll--sticky" : ""}`, children: _jsxs("table", { className: "appkit-data-table__table", children: [_jsx("thead", { className: `appkit-data-table__thead ${stickyHeader ? "appkit-data-table__thead--sticky" : ""}`, children: _jsxs("tr", { children: [selectable && (_jsx("th", { scope: "col", className: "px-4 py-3 w-8", children: _jsx(
|
|
126
|
+
: selectedIds.filter((s) => s !== id)), children: mobileCardRender(item) }, keyExtractor(item)))) })), activeViewMode === "table" && (_jsx(Div, { className: "appkit-data-table__wrapper", children: _jsx(Div, { className: `appkit-data-table__scroll ${stickyHeader ? "appkit-data-table__scroll--sticky" : ""}`, children: _jsxs("table", { className: "appkit-data-table__table", children: [_jsx("thead", { className: `appkit-data-table__thead ${stickyHeader ? "appkit-data-table__thead--sticky" : ""}`, children: _jsxs("tr", { children: [selectable && (_jsx("th", { scope: "col", className: "px-4 py-3 w-8", children: _jsx(Checkbox, { bare: true, className: CLS_CHECKBOX, "aria-label": "Select all on page", checked: paginatedData.length > 0 &&
|
|
126
127
|
paginatedData.every((item) => selectedIds.includes(keyExtractor(item))), onChange: (e) => {
|
|
127
128
|
const pageIds = paginatedData.map(keyExtractor);
|
|
128
129
|
onSelectionChange?.(e.target.checked
|
|
@@ -140,7 +141,7 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
|
|
|
140
141
|
? "appkit-data-table__row--striped"
|
|
141
142
|
: "",
|
|
142
143
|
onRowClick ? "appkit-data-table__row--clickable" : "",
|
|
143
|
-
].join(" "), onClick: () => onRowClick?.(item), children: [selectable && (_jsx("td", { className: "px-4 py-4 w-8", onClick: (e) => e.stopPropagation(), children: _jsx(
|
|
144
|
+
].join(" "), onClick: () => onRowClick?.(item), children: [selectable && (_jsx("td", { className: "px-4 py-4 w-8", onClick: (e) => e.stopPropagation(), children: _jsx(Checkbox, { bare: true, className: CLS_CHECKBOX, "aria-label": "Select row", checked: selectedIds.includes(keyExtractor(item)), onChange: (e) => handleRowSelectionChange(item, e.target.checked) }) })), columns.map((col) => (_jsx("td", { className: "appkit-data-table__td", children: col.render
|
|
144
145
|
? col.render(item)
|
|
145
146
|
: (item[col.key] ?? "-") }, col.key))), actions && (_jsx("td", { className: "appkit-data-table__td appkit-data-table__td--actions", onClick: (e) => e.stopPropagation(), children: actions(item) }))] }, keyExtractor(item)))) })] }) }) })), !externalPagination && totalPages > 1 && (_jsx(Div, { className: "appkit-data-table__pagination", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, maxVisible: resolvedPag.maxVisible, showFirstLast: resolvedPag.showFirstLast, showPrevNext: resolvedPag.showPrevNext, size: resolvedPag.size }) }))] }));
|
|
146
147
|
}
|
|
@@ -150,7 +151,7 @@ function SelectableCard({ id, selectable, selected, onToggle, children, listMode
|
|
|
150
151
|
return (_jsxs(Div, { className: "relative group h-full", children: [_jsx(Div, { className: [
|
|
151
152
|
"absolute z-10",
|
|
152
153
|
listMode ? "left-2 top-1/2 -translate-y-1/2" : "top-2 left-2",
|
|
153
|
-
].join(" "), onClick: (e) => e.stopPropagation(), children: _jsx(Row, { className: "w-6 h-6", surface: "default", align: "center", justify: "center", rounded: "md", shadow: "md", children: _jsxs(Row, { className: "relative", align: "center", justify: "center", children: [_jsx(
|
|
154
|
+
].join(" "), onClick: (e) => e.stopPropagation(), children: _jsx(Row, { className: "w-6 h-6", surface: "default", align: "center", justify: "center", rounded: "md", shadow: "md", children: _jsxs(Row, { className: "relative", align: "center", justify: "center", children: [_jsx(Checkbox, { bare: true, className: [
|
|
154
155
|
"w-4 h-4 rounded cursor-pointer transition-all appearance-none",
|
|
155
156
|
selected
|
|
156
157
|
? "border-2 border-primary bg-primary"
|
|
@@ -31,6 +31,7 @@ type ButtonTextColor = "default" | "muted" | "faint" | "primary";
|
|
|
31
31
|
type ButtonBorder = "none" | "default" | "subtle" | "strong";
|
|
32
32
|
type ButtonPaddingY = "none" | "xs" | "y-xs-tall" | "sm" | "y-sm-tall" | "md" | "lg";
|
|
33
33
|
type ButtonWeight = "normal" | "medium" | "semibold" | "bold";
|
|
34
|
+
type ButtonJustify = "center" | "start" | "end" | "between";
|
|
34
35
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
35
36
|
variant?: keyof typeof UI_BUTTON.variants;
|
|
36
37
|
size?: keyof typeof UI_BUTTON.sizes;
|
|
@@ -54,6 +55,8 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
54
55
|
rounded?: ButtonRounded;
|
|
55
56
|
/** Box shadow override — replaces raw `className="shadow-*"` tokens. */
|
|
56
57
|
shadow?: ShadowKey;
|
|
58
|
+
/** Main-axis content distribution — for full-width buttons with spread content (e.g. label + chevron). Defaults to the button's own centered layout. */
|
|
59
|
+
justify?: ButtonJustify;
|
|
57
60
|
/** Render as the child element (e.g. next/link) with button styling applied */
|
|
58
61
|
asChild?: boolean;
|
|
59
62
|
/**
|
|
@@ -63,5 +66,5 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
63
66
|
*/
|
|
64
67
|
action?: ActionDef;
|
|
65
68
|
}
|
|
66
|
-
export declare function Button({ variant, size, className, isLoading, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, shadow, asChild, action, ...props }: ButtonProps): React.JSX.Element;
|
|
69
|
+
export declare function Button({ variant, size, className, isLoading, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, shadow, justify, asChild, action, ...props }: ButtonProps): React.JSX.Element;
|
|
67
70
|
export {};
|
|
@@ -65,7 +65,7 @@ const BUTTON_ROUNDED_MAP = {
|
|
|
65
65
|
full: "rounded-full",
|
|
66
66
|
};
|
|
67
67
|
const BUTTON_PADDING_X_MAP = {
|
|
68
|
-
none: "",
|
|
68
|
+
none: "px-0",
|
|
69
69
|
xs: "px-2",
|
|
70
70
|
sm: "px-3",
|
|
71
71
|
md: "px-4",
|
|
@@ -85,7 +85,7 @@ const BUTTON_BORDER_MAP = {
|
|
|
85
85
|
strong: "border border-[var(--appkit-color-border)]",
|
|
86
86
|
};
|
|
87
87
|
const BUTTON_PADDING_Y_MAP = {
|
|
88
|
-
none: "",
|
|
88
|
+
none: "py-0",
|
|
89
89
|
xs: "py-1",
|
|
90
90
|
"y-xs-tall": "py-2.5",
|
|
91
91
|
sm: "py-2",
|
|
@@ -99,6 +99,12 @@ const BUTTON_WEIGHT_MAP = {
|
|
|
99
99
|
semibold: "font-semibold",
|
|
100
100
|
bold: "font-bold",
|
|
101
101
|
};
|
|
102
|
+
const BUTTON_JUSTIFY_MAP = {
|
|
103
|
+
center: "justify-center",
|
|
104
|
+
start: "justify-start",
|
|
105
|
+
end: "justify-end",
|
|
106
|
+
between: "justify-between",
|
|
107
|
+
};
|
|
102
108
|
// Map ActionKind → Button variant (caller can override via explicit variant prop)
|
|
103
109
|
const ACTION_KIND_VARIANT = {
|
|
104
110
|
primary: "primary",
|
|
@@ -108,13 +114,13 @@ const ACTION_KIND_VARIANT = {
|
|
|
108
114
|
link: "ghost",
|
|
109
115
|
chip: "outline",
|
|
110
116
|
};
|
|
111
|
-
export function Button({ variant, size = "md", className = "", isLoading = false, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, shadow, asChild = false, action, ...props }) {
|
|
117
|
+
export function Button({ variant, size = "md", className = "", isLoading = false, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, shadow, justify, asChild = false, action, ...props }) {
|
|
112
118
|
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
113
119
|
// Resolve defaults from action registry
|
|
114
120
|
const resolvedVariant = variant ?? (action ? (ACTION_KIND_VARIANT[action.kind] ?? "primary") : "primary");
|
|
115
121
|
const resolvedChildren = children ?? (action ? action.label : undefined);
|
|
116
122
|
const resolvedAriaLabel = props["aria-label"] ?? (action ? (action.ariaLabel ?? action.label) : undefined);
|
|
117
|
-
const classes = twMerge(UI_BUTTON.base, UI_BUTTON.variants[resolvedVariant], UI_BUTTON.sizes[size], gap ? BUTTON_GAP_MAP[gap] : "", textSize ? BUTTON_TEXT_SIZE_MAP[textSize] : "", paddingX ? BUTTON_PADDING_X_MAP[paddingX] : "", paddingY ? BUTTON_PADDING_Y_MAP[paddingY] : "", weight ? BUTTON_WEIGHT_MAP[weight] : "", textColor ? BUTTON_TEXT_COLOR_MAP[textColor] : "", border ? BUTTON_BORDER_MAP[border] : "", rounded ? BUTTON_ROUNDED_MAP[rounded] : "", shadow ? SHADOW_MAP[shadow] : "", className);
|
|
123
|
+
const classes = twMerge(UI_BUTTON.base, UI_BUTTON.variants[resolvedVariant], UI_BUTTON.sizes[size], gap ? BUTTON_GAP_MAP[gap] : "", textSize ? BUTTON_TEXT_SIZE_MAP[textSize] : "", paddingX ? BUTTON_PADDING_X_MAP[paddingX] : "", paddingY ? BUTTON_PADDING_Y_MAP[paddingY] : "", weight ? BUTTON_WEIGHT_MAP[weight] : "", textColor ? BUTTON_TEXT_COLOR_MAP[textColor] : "", border ? BUTTON_BORDER_MAP[border] : "", rounded ? BUTTON_ROUNDED_MAP[rounded] : "", shadow ? SHADOW_MAP[shadow] : "", justify ? BUTTON_JUSTIFY_MAP[justify] : "", className);
|
|
118
124
|
const userOnClick = props.onClick;
|
|
119
125
|
const toast = useToastSafe();
|
|
120
126
|
// Wrap the user's onClick so async rejections never escape silently. Errors
|
|
@@ -175,7 +181,7 @@ export function Button({ variant, size = "md", className = "", isLoading = false
|
|
|
175
181
|
? (ACTION_KIND_VARIANT[confirmDef.confirmKind] ?? "primary")
|
|
176
182
|
: "primary";
|
|
177
183
|
return (_jsxs(_Fragment, { children: [_jsxs("button", { className: classes, disabled: disabled || isLoading, "aria-busy": isLoading || undefined, ...props, "aria-label": resolvedAriaLabel, onClick: handleClick, children: [isLoading && (_jsx(Loader2, { className: "appkit-button__spinner", "aria-hidden": "true" })), isLoading ? (_jsx("span", { className: "appkit-button__content appkit-button__content--loading", children: resolvedChildren })) : (_jsx("span", { className: "appkit-button__content", children: resolvedChildren }))] }), confirmOpen && confirmDef && typeof document !== "undefined" && createPortal(_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "appkit-action-confirm-title", style: {
|
|
178
|
-
position: "fixed", inset: 0, zIndex: "var(--appkit-z-
|
|
184
|
+
position: "fixed", inset: 0, zIndex: "var(--appkit-z-confirm, 1000)",
|
|
179
185
|
display: "flex", alignItems: "center", justifyContent: "center",
|
|
180
186
|
background: "rgba(0,0,0,0.45)", backdropFilter: "blur(2px)",
|
|
181
187
|
}, onClick: (e) => { if (e.target === e.currentTarget)
|
|
@@ -4,5 +4,13 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
4
4
|
suffix?: React.ReactNode;
|
|
5
5
|
error?: React.ReactNode;
|
|
6
6
|
indeterminate?: boolean;
|
|
7
|
+
/** Override the native input type — for a checkbox-shaped control driven by radio semantics (e.g. a poll option list toggling between multi/single-select). Defaults to `"checkbox"`. */
|
|
8
|
+
type?: "checkbox" | "radio";
|
|
9
|
+
/**
|
|
10
|
+
* Render just the native input with no Label/box/icon chrome — for
|
|
11
|
+
* call sites that already own their own custom option-card markup
|
|
12
|
+
* (border, padding, hover state) and just need the underlying control.
|
|
13
|
+
*/
|
|
14
|
+
bare?: boolean;
|
|
7
15
|
}
|
|
8
|
-
export declare function Checkbox({ label, suffix, error, indeterminate, className, checked, disabled, id, ...props }: CheckboxProps): React.JSX.Element;
|
|
16
|
+
export declare function Checkbox({ label, suffix, error, indeterminate, type, bare, className, checked, disabled, id, ...props }: CheckboxProps): React.JSX.Element;
|
|
@@ -14,7 +14,7 @@ const UI_CHECKBOX = {
|
|
|
14
14
|
text: "appkit-checkbox__text",
|
|
15
15
|
error: "appkit-checkbox__error",
|
|
16
16
|
};
|
|
17
|
-
export function Checkbox({ label, suffix, error, indeterminate = false, className = "", checked, disabled, id, ...props }) {
|
|
17
|
+
export function Checkbox({ label, suffix, error, indeterminate = false, type = "checkbox", bare = false, className = "", checked, disabled, id, ...props }) {
|
|
18
18
|
const generatedId = React.useId();
|
|
19
19
|
const inputId = id ?? generatedId;
|
|
20
20
|
const inputRef = React.useRef(null);
|
|
@@ -23,12 +23,15 @@ export function Checkbox({ label, suffix, error, indeterminate = false, classNam
|
|
|
23
23
|
inputRef.current.indeterminate = indeterminate;
|
|
24
24
|
}
|
|
25
25
|
}, [indeterminate]);
|
|
26
|
+
if (bare) {
|
|
27
|
+
return (_jsx("input", { ...props, ref: inputRef, id: inputId, type: type, checked: checked, disabled: disabled, "aria-invalid": error ? "true" : undefined, className: className }));
|
|
28
|
+
}
|
|
26
29
|
return (_jsxs("div", { className: UI_CHECKBOX.base, "data-section": "checkbox-div-467", children: [_jsxs(Label, { htmlFor: inputId, className: [
|
|
27
30
|
UI_CHECKBOX.label,
|
|
28
31
|
disabled ? UI_CHECKBOX.labelDisabled : "",
|
|
29
32
|
]
|
|
30
33
|
.filter(Boolean)
|
|
31
|
-
.join(" "), children: [_jsxs("span", { className: UI_CHECKBOX.boxWrap, children: [_jsx("input", { ...props, ref: inputRef, id: inputId, type:
|
|
34
|
+
.join(" "), children: [_jsxs("span", { className: UI_CHECKBOX.boxWrap, children: [_jsx("input", { ...props, ref: inputRef, id: inputId, type: type, checked: checked, disabled: disabled, "aria-invalid": error ? "true" : undefined, className: [
|
|
32
35
|
UI_CHECKBOX.input,
|
|
33
36
|
error ? UI_CHECKBOX.inputError : "",
|
|
34
37
|
className,
|
|
@@ -22,11 +22,12 @@ import { Button } from "./Button";
|
|
|
22
22
|
import { LoginRequiredModal } from "./LoginRequiredModal";
|
|
23
23
|
import { useSession } from "../../react/contexts/SessionContext";
|
|
24
24
|
import { useToast } from "./Toast";
|
|
25
|
+
import { ACCOUNT_ENDPOINTS } from "../../constants/api-endpoints";
|
|
25
26
|
async function postClaim(couponCode, source) {
|
|
26
27
|
if (typeof fetch === "undefined")
|
|
27
28
|
return false;
|
|
28
29
|
try {
|
|
29
|
-
const res = await fetch(
|
|
30
|
+
const res = await fetch(ACCOUNT_ENDPOINTS.COUPONS_CLAIM, {
|
|
30
31
|
method: "POST",
|
|
31
32
|
headers: { "Content-Type": "application/json" },
|
|
32
33
|
credentials: "include",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.appkit-drawer {
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
|
-
z-index: var(--appkit-z-
|
|
4
|
+
z-index: var(--appkit-z-modal);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.appkit-drawer--open {
|
|
@@ -150,12 +150,24 @@
|
|
|
150
150
|
flex: 1;
|
|
151
151
|
overflow-y: auto;
|
|
152
152
|
padding: 1rem 1.25rem;
|
|
153
|
+
/* Reserve room to scroll the last inline element fully above the bottom
|
|
154
|
+
nav — same fix as SideDrawer's __content, same root cause. */
|
|
155
|
+
padding-bottom: calc(1rem + var(--bottom-nav-height, 0px));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@media (min-width: 1024px) {
|
|
159
|
+
.appkit-drawer__body { padding-bottom: 1rem; }
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
.appkit-drawer__footer {
|
|
156
163
|
flex-shrink: 0;
|
|
157
164
|
border-top: 1px solid var(--appkit-color-border-subtle);
|
|
158
165
|
padding: 1rem 1.25rem;
|
|
166
|
+
padding-bottom: calc(1rem + var(--bottom-nav-height, 0px));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (min-width: 1024px) {
|
|
170
|
+
.appkit-drawer__footer { padding-bottom: 1rem; }
|
|
159
171
|
}
|
|
160
172
|
|
|
161
173
|
.dark .appkit-drawer__footer {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
.appkit-dropdown__menu {
|
|
9
9
|
position: absolute;
|
|
10
|
-
z-index: var(--appkit-z-
|
|
10
|
+
z-index: var(--appkit-z-popover);
|
|
11
11
|
margin-top: 0.5rem;
|
|
12
12
|
min-width: 180px;
|
|
13
13
|
border-radius: 0.5rem;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
.appkit-dropdown__composed-menu {
|
|
46
46
|
position: absolute;
|
|
47
47
|
right: 0;
|
|
48
|
-
z-index: var(--appkit-z-
|
|
48
|
+
z-index: var(--appkit-z-popover);
|
|
49
49
|
margin-top: 0.25rem;
|
|
50
50
|
min-width: 160px;
|
|
51
51
|
border-radius: 0.5rem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type SectionBackgroundConfig } from "./Semantic";
|
|
2
3
|
export interface FilterDrawerProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
title?: string;
|
|
@@ -16,5 +17,7 @@ export interface FilterDrawerProps {
|
|
|
16
17
|
side?: "left" | "right" | "bottom";
|
|
17
18
|
/** Width for left/right drawers. Default: "md" (responsive: full-width on mobile, 24rem on desktop). */
|
|
18
19
|
size?: "sm" | "md" | "lg" | "full";
|
|
20
|
+
/** Optional color/gradient/image background for the drawer body — same shape as <Section background={…}>. */
|
|
21
|
+
background?: SectionBackgroundConfig;
|
|
19
22
|
}
|
|
20
|
-
export declare function FilterDrawer({ children, title, open, onOpen, onClose, onApply, onReset, activeCount, pendingCount, triggerLabel, triggerClassName, hideTrigger, side, size, }: FilterDrawerProps): React.JSX.Element;
|
|
23
|
+
export declare function FilterDrawer({ children, title, open, onOpen, onClose, onApply, onReset, activeCount, pendingCount, triggerLabel, triggerClassName, hideTrigger, side, size, background, }: FilterDrawerProps): React.JSX.Element;
|
|
@@ -4,7 +4,8 @@ import React from "react";
|
|
|
4
4
|
import { Button } from "./Button";
|
|
5
5
|
import { Drawer } from "./Drawer";
|
|
6
6
|
import { Span } from "./Typography";
|
|
7
|
-
|
|
7
|
+
import { sectionBackgroundStyle } from "./Semantic";
|
|
8
|
+
export function FilterDrawer({ children, title = "Filters", open, onOpen, onClose, onApply, onReset, activeCount = 0, pendingCount, triggerLabel = "Filters", triggerClassName = "", hideTrigger = false, side = "right", size = "md", background, }) {
|
|
8
9
|
const [internalOpen, setInternalOpen] = React.useState(false);
|
|
9
10
|
const isControlled = open !== undefined;
|
|
10
11
|
const isOpen = isControlled ? open : internalOpen;
|
|
@@ -35,5 +36,10 @@ export function FilterDrawer({ children, title = "Filters", open, onOpen, onClos
|
|
|
35
36
|
.filter(Boolean)
|
|
36
37
|
.join(" "), "aria-label": triggerLabel, children: [_jsx(Span, { children: triggerLabel }), activeCount > 0 ? (_jsx(Span, { className: "appkit-filter-drawer__badge", children: activeCount })) : null] })) : null, _jsx(Drawer, { isOpen: isOpen, onClose: handleClose, title: title, side: side, size: size, className: "appkit-drawer__panel--filter", footer: _jsxs("div", { className: "appkit-filter-drawer__footer", "data-section": "filterdrawer-div-494", children: [_jsx(Button, { type: "button", variant: "ghost", onClick: onReset, children: "Reset all" }), _jsx(Button, { type: "button", variant: "primary", onClick: handleApply, children: pendingCount != null && pendingCount > 0
|
|
37
38
|
? `Apply (${pendingCount})`
|
|
38
|
-
: "Apply" })] }), children:
|
|
39
|
+
: "Apply" })] }), children: _jsxs("div", { className: [
|
|
40
|
+
"appkit-filter-drawer__body",
|
|
41
|
+
background?.value ? "relative overflow-hidden" : "",
|
|
42
|
+
]
|
|
43
|
+
.filter(Boolean)
|
|
44
|
+
.join(" "), "data-section": "filterdrawer-div-495", children: [background?.value && (_jsxs(_Fragment, { children: [_jsx(Span, { "aria-hidden": true, className: "absolute inset-0 -z-10", style: sectionBackgroundStyle(background) }), background.overlay?.enabled && (_jsx(Span, { "aria-hidden": true, className: "absolute inset-0 -z-10", style: { backgroundColor: background.overlay.color, opacity: background.overlay.opacity } }))] })), children] }) })] }));
|
|
39
45
|
}
|
|
@@ -25,7 +25,7 @@ export interface FormProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
25
25
|
gap?: GapToken;
|
|
26
26
|
}
|
|
27
27
|
export type GapToken = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
28
|
-
export declare function Form({ children, spacing, schema, align, gap, surface, padding, rounded, border, shadow, className, ...props }: FormProps): React.JSX.Element;
|
|
28
|
+
export declare function Form({ children, spacing, schema, align, gap, surface, padding, paddingX, paddingY, rounded, border, shadow, overflow, className, ...props }: FormProps): React.JSX.Element;
|
|
29
29
|
export interface FormGroupProps {
|
|
30
30
|
children: React.ReactNode;
|
|
31
31
|
columns?: 1 | 2 | 3 | 4;
|
|
@@ -43,7 +43,7 @@ const FORM_ALIGN_MAP = {
|
|
|
43
43
|
end: "items-end",
|
|
44
44
|
stretch: "items-stretch",
|
|
45
45
|
};
|
|
46
|
-
export function Form({ children, spacing, schema, align, gap, surface, padding, rounded, border, shadow, className = "", ...props }) {
|
|
46
|
+
export function Form({ children, spacing, schema, align, gap, surface, padding, paddingX, paddingY, rounded, border, shadow, overflow, className = "", ...props }) {
|
|
47
47
|
const helpers = useFormShellState(schema);
|
|
48
48
|
const content = typeof children === "function"
|
|
49
49
|
? children(helpers)
|
|
@@ -53,7 +53,7 @@ export function Form({ children, spacing, schema, align, gap, surface, padding,
|
|
|
53
53
|
spacing ? FORM_SPACING_MAP[spacing] : "",
|
|
54
54
|
align ? FORM_ALIGN_MAP[align] : "",
|
|
55
55
|
gap ? GAP_MAP[gap] : "",
|
|
56
|
-
buildSurfaceClasses({ surface, padding, rounded, border, shadow }),
|
|
56
|
+
buildSurfaceClasses({ surface, padding, paddingX, paddingY, rounded, border, shadow, overflow }),
|
|
57
57
|
className,
|
|
58
58
|
].filter(Boolean).join(" "), ...props, children: content }) }));
|
|
59
59
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.appkit-form-action-bar {
|
|
4
4
|
position: sticky;
|
|
5
|
-
bottom:
|
|
5
|
+
bottom: var(--bottom-nav-height, 0px);
|
|
6
6
|
z-index: var(--appkit-z-raised);
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
background: var(--appkit-color-surface);
|
|
13
13
|
backdrop-filter: blur(8px);
|
|
14
14
|
padding: 0.75rem 1rem;
|
|
15
|
+
/* Safety net for iOS Safari, which doesn't shrink a 100vh/100dvh ancestor
|
|
16
|
+
when the on-screen keyboard opens — pads the bar's real bottom edge so
|
|
17
|
+
it never renders underneath the keyboard even if the ancestor didn't
|
|
18
|
+
resize. Desktop's `top` flip below resets this via its own shorthand. */
|
|
19
|
+
padding-bottom: calc(0.75rem + var(--keyboard-inset-height, 0px));
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
/* Desktop: flip to sticky top, below the fixed header */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type RoundedKey } from "./surface-tokens";
|
|
2
3
|
declare const SIZES: {
|
|
3
4
|
readonly sm: "appkit-icon-button--sm";
|
|
4
5
|
readonly md: "appkit-icon-button--md";
|
|
@@ -9,6 +10,8 @@ declare const VARIANTS: {
|
|
|
9
10
|
readonly outline: "appkit-icon-button--outline";
|
|
10
11
|
readonly primary: "appkit-icon-button--primary";
|
|
11
12
|
readonly danger: "appkit-icon-button--danger";
|
|
13
|
+
/** Theme-independent white-on-translucent-black — for controls floating over a fixed-dark surface (lightbox, video player). */
|
|
14
|
+
readonly scrim: "appkit-icon-button--scrim";
|
|
12
15
|
};
|
|
13
16
|
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
17
|
/** Required — text alternative for screen readers. Also shown as tooltip. */
|
|
@@ -17,6 +20,8 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
17
20
|
icon?: React.ReactNode;
|
|
18
21
|
size?: keyof typeof SIZES;
|
|
19
22
|
variant?: keyof typeof VARIANTS;
|
|
23
|
+
/** Border radius — replaces consumer `rounded-*` className. */
|
|
24
|
+
rounded?: RoundedKey;
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
22
27
|
* Icon-only button. `aria-label` is required — will throw in development if omitted.
|
|
@@ -28,5 +33,5 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
28
33
|
* </Tooltip>
|
|
29
34
|
* ```
|
|
30
35
|
*/
|
|
31
|
-
export declare function IconButton({ size, variant, className, icon, children, ...props }: IconButtonProps): React.JSX.Element;
|
|
36
|
+
export declare function IconButton({ size, variant, rounded, className, icon, children, ...props }: IconButtonProps): React.JSX.Element;
|
|
32
37
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import { ROUNDED_MAP } from "./surface-tokens";
|
|
3
4
|
const BASE = "appkit-icon-button";
|
|
4
5
|
const SIZES = {
|
|
5
6
|
sm: "appkit-icon-button--sm",
|
|
@@ -11,6 +12,8 @@ const VARIANTS = {
|
|
|
11
12
|
outline: "appkit-icon-button--outline",
|
|
12
13
|
primary: "appkit-icon-button--primary",
|
|
13
14
|
danger: "appkit-icon-button--danger",
|
|
15
|
+
/** Theme-independent white-on-translucent-black — for controls floating over a fixed-dark surface (lightbox, video player). */
|
|
16
|
+
scrim: "appkit-icon-button--scrim",
|
|
14
17
|
};
|
|
15
18
|
/**
|
|
16
19
|
* Icon-only button. `aria-label` is required — will throw in development if omitted.
|
|
@@ -22,10 +25,10 @@ const VARIANTS = {
|
|
|
22
25
|
* </Tooltip>
|
|
23
26
|
* ```
|
|
24
27
|
*/
|
|
25
|
-
export function IconButton({ size = "md", variant = "ghost", className = "", icon, children, ...props }) {
|
|
28
|
+
export function IconButton({ size = "md", variant = "ghost", rounded, className = "", icon, children, ...props }) {
|
|
26
29
|
if (process.env.NODE_ENV !== "production" && !props["aria-label"]) {
|
|
27
30
|
throw new Error('[IconButton] Missing required "aria-label" prop. ' +
|
|
28
31
|
'Add aria-label="..." to the button or wrap with <Tooltip label="...">.');
|
|
29
32
|
}
|
|
30
|
-
return (_jsx("button", { type: "button", className: twMerge(BASE, SIZES[size], VARIANTS[variant], className), ...props, children: icon ?? children }));
|
|
33
|
+
return (_jsx("button", { type: "button", className: twMerge(BASE, SIZES[size], VARIANTS[variant], rounded ? ROUNDED_MAP[rounded] : "", className), ...props, children: icon ?? children }));
|
|
31
34
|
}
|
|
@@ -101,3 +101,14 @@
|
|
|
101
101
|
.dark .appkit-icon-button--danger:hover:not(:disabled) {
|
|
102
102
|
background: rgba(127, 29, 29, 0.35);
|
|
103
103
|
}
|
|
104
|
+
|
|
105
|
+
/* Theme-independent: for controls floating over a fixed-dark surface (lightbox,
|
|
106
|
+
video player, fullscreen overlay) that stays near-black regardless of site theme. */
|
|
107
|
+
.appkit-icon-button--scrim {
|
|
108
|
+
background: rgba(255, 255, 255, 0.1);
|
|
109
|
+
color: #ffffff;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.appkit-icon-button--scrim:hover:not(:disabled) {
|
|
113
|
+
background: rgba(255, 255, 255, 0.2);
|
|
114
|
+
}
|
|
@@ -94,12 +94,14 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.appkit-image-gallery__counter {
|
|
97
|
+
/* audit-bottom-offset-ok: positioned relative to the gallery's own bounding box, not the viewport/bottom-nav */
|
|
97
98
|
bottom: 0.5rem;
|
|
98
99
|
right: 0.5rem;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
@media (min-width: 768px) {
|
|
102
103
|
.appkit-image-gallery__counter {
|
|
104
|
+
/* audit-bottom-offset-ok: positioned relative to the gallery's own bounding box, not the viewport/bottom-nav */
|
|
103
105
|
bottom: 1rem;
|
|
104
106
|
right: 1rem;
|
|
105
107
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type SectionBackgroundConfig } from "./Semantic";
|
|
2
3
|
export interface ListingFilterDrawerProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onClose: () => void;
|
|
@@ -6,5 +7,7 @@ export interface ListingFilterDrawerProps {
|
|
|
6
7
|
onClear: () => void;
|
|
7
8
|
activeCount: number;
|
|
8
9
|
children: React.ReactNode;
|
|
10
|
+
/** Optional color/gradient/image background for the drawer panel — same shape as <Section background={…}>. */
|
|
11
|
+
background?: SectionBackgroundConfig;
|
|
9
12
|
}
|
|
10
|
-
export declare function ListingFilterDrawer({ open, onClose, onApply, onClear, activeCount, children, }: ListingFilterDrawerProps): React.JSX.Element | null;
|
|
13
|
+
export declare function ListingFilterDrawer({ open, onClose, onApply, onClear, activeCount, children, background, }: ListingFilterDrawerProps): React.JSX.Element | null;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { X } from "lucide-react";
|
|
4
4
|
import { Button } from "./Button";
|
|
5
5
|
import { Span } from "./Typography";
|
|
6
|
+
import { sectionBackgroundStyle } from "./Semantic";
|
|
6
7
|
const CLS_CLEAR_BTN = "text-xs text-[var(--appkit-color-text-muted)] hover:text-error text-[var(--appkit-color-text-muted)] transition-colors min-h-0 h-auto p-0";
|
|
7
|
-
export function ListingFilterDrawer({ open, onClose, onApply, onClear, activeCount, children, }) {
|
|
8
|
+
export function ListingFilterDrawer({ open, onClose, onApply, onClear, activeCount, children, background, }) {
|
|
8
9
|
if (!open)
|
|
9
10
|
return null;
|
|
10
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-40 bg-black/40", "aria-hidden": "true", onClick: onClose }), _jsxs("div", { className:
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-40 bg-black/40", "aria-hidden": "true", onClick: onClose }), _jsxs("div", { className: `fixed inset-y-0 left-0 z-50 flex w-80 flex-col bg-[var(--appkit-color-surface)] shadow-2xl${background?.value ? " relative overflow-hidden" : ""}`, children: [background?.value && (_jsxs(_Fragment, { children: [_jsx(Span, { "aria-hidden": true, className: "absolute inset-0 -z-10", style: sectionBackgroundStyle(background) }), background.overlay?.enabled && (_jsx(Span, { "aria-hidden": true, className: "absolute inset-0 -z-10", style: { backgroundColor: background.overlay.color, opacity: background.overlay.opacity } }))] })), _jsxs("div", { className: "flex items-center justify-between border-b border-[var(--appkit-color-border)] px-4 py-3.5", children: [_jsx(Span, { size: "base", weight: "semibold", className: "text-[var(--appkit-color-text)]", children: "Filters" }), _jsxs("div", { className: "flex items-center gap-2", children: [activeCount > 0 && (_jsx(Button, { variant: "ghost", type: "button", onClick: onClear, className: CLS_CLEAR_BTN, children: "Clear all" })), _jsx(Button, { variant: "ghost", type: "button", onClick: onClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-surface-elevated)] transition-colors min-h-0 h-auto", children: _jsx(X, { className: "h-5 w-5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-y-auto px-4 py-4 space-y-5", children: children }), _jsx("div", { className: "border-t border-[var(--appkit-color-border)] px-4 py-3.5", children: _jsxs(Button, { type: "button", onClick: onApply, className: "w-full", children: ["Apply Filters", activeCount > 0 ? ` (${activeCount})` : ""] }) })] })] }));
|
|
11
12
|
}
|
|
@@ -407,8 +407,8 @@
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
.appkit-listing-layout__mobile-pagination--dashboard { bottom: 0; }
|
|
410
|
-
.appkit-listing-layout__mobile-pagination--default { bottom:
|
|
411
|
-
.appkit-listing-layout__mobile-pagination--bulk { bottom:
|
|
410
|
+
.appkit-listing-layout__mobile-pagination--default { bottom: var(--bottom-nav-height, 4rem); }
|
|
411
|
+
.appkit-listing-layout__mobile-pagination--bulk { bottom: calc(var(--bottom-nav-height, 4rem) + 3.5rem); }
|
|
412
412
|
|
|
413
413
|
/* -- Mobile filter overlay --------------------------- */
|
|
414
414
|
|
|
@@ -22,5 +22,9 @@ export interface PaginationProps {
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
size?: "sm" | "md" | "lg";
|
|
24
24
|
className?: string;
|
|
25
|
+
/** Current page size — required to render the selector (paired with `onPageSizeChange`). */
|
|
26
|
+
pageSize?: number;
|
|
27
|
+
/** Called with the newly picked page size. Rendering the selector requires both this and `pageSize`. */
|
|
28
|
+
onPageSizeChange?: (size: number) => void;
|
|
25
29
|
}
|
|
26
|
-
export declare function Pagination({ currentPage, totalPages, onPageChange, paginationConfig, maxVisible: maxVisibleProp, showFirstLast: showFirstLastProp, showPrevNext: showPrevNextProp, disabled, size: sizeProp, className, }: PaginationProps): React.JSX.Element;
|
|
30
|
+
export declare function Pagination({ currentPage, totalPages, onPageChange, paginationConfig, maxVisible: maxVisibleProp, showFirstLast: showFirstLastProp, showPrevNext: showPrevNextProp, disabled, size: sizeProp, className, pageSize, onPageSizeChange, }: PaginationProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DEFAULT_PAGINATION_CONFIG } from "../../contracts";
|
|
3
|
+
import { Select } from "./Select";
|
|
3
4
|
function getPageNumbers(currentPage, totalPages, maxVisible) {
|
|
4
5
|
if (totalPages <= maxVisible) {
|
|
5
6
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
@@ -31,12 +32,13 @@ const SIZE_CLASSES = {
|
|
|
31
32
|
md: "appkit-pagination--md",
|
|
32
33
|
lg: "appkit-pagination--lg",
|
|
33
34
|
};
|
|
34
|
-
export function Pagination({ currentPage, totalPages, onPageChange, paginationConfig, maxVisible: maxVisibleProp, showFirstLast: showFirstLastProp, showPrevNext: showPrevNextProp, disabled = false, size: sizeProp, className = "", }) {
|
|
35
|
+
export function Pagination({ currentPage, totalPages, onPageChange, paginationConfig, maxVisible: maxVisibleProp, showFirstLast: showFirstLastProp, showPrevNext: showPrevNextProp, disabled = false, size: sizeProp, className = "", pageSize, onPageSizeChange, }) {
|
|
35
36
|
const resolved = { ...DEFAULT_PAGINATION_CONFIG, ...paginationConfig };
|
|
36
37
|
const maxVisible = maxVisibleProp ?? resolved.maxVisible;
|
|
37
38
|
const showFirstLast = showFirstLastProp ?? resolved.showFirstLast;
|
|
38
39
|
const showPrevNext = showPrevNextProp ?? resolved.showPrevNext;
|
|
39
40
|
const size = sizeProp ?? resolved.size;
|
|
41
|
+
const showPageSizeSelector = resolved.showPageSizeSelector && pageSize != null && !!onPageSizeChange;
|
|
40
42
|
const handle = (page) => {
|
|
41
43
|
if (disabled || page < 1 || page > totalPages || page === currentPage)
|
|
42
44
|
return;
|
|
@@ -51,5 +53,5 @@ export function Pagination({ currentPage, totalPages, onPageChange, paginationCo
|
|
|
51
53
|
return `${base} appkit-pagination__button--default`;
|
|
52
54
|
};
|
|
53
55
|
const pages = getPageNumbers(currentPage, totalPages, maxVisible);
|
|
54
|
-
return (_jsxs("nav", { className: `appkit-pagination ${className}`, "aria-label": "Pagination", children: [showFirstLast && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === 1), onClick: () => handle(1), disabled: disabled || currentPage === 1, "aria-label": "First page", children: "\u00AB" })), showPrevNext && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === 1), onClick: () => handle(currentPage - 1), disabled: disabled || currentPage === 1, "aria-label": "Previous page", children: "\u2039" })), pages.map((page, i) => page === "..." ? (_jsx("span", { className: `appkit-pagination__ellipsis ${SIZE_CLASSES[size]}`, "aria-hidden": "true", children: "\u2026" }, `ellipsis-${i}`)) : (_jsx("button", { type: "button", className: btnClass(page === currentPage, disabled && page !== currentPage), onClick: () => handle(page), disabled: disabled, "aria-label": `Page ${page}`, "aria-current": page === currentPage ? "page" : undefined, children: page }, page))), showPrevNext && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === totalPages), onClick: () => handle(currentPage + 1), disabled: disabled || currentPage === totalPages, "aria-label": "Next page", children: "\u203A" })), showFirstLast && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === totalPages), onClick: () => handle(totalPages), disabled: disabled || currentPage === totalPages, "aria-label": "Last page", children: "\u00BB" }))] }));
|
|
56
|
+
return (_jsxs("nav", { className: `appkit-pagination ${className}`, "aria-label": "Pagination", children: [showFirstLast && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === 1), onClick: () => handle(1), disabled: disabled || currentPage === 1, "aria-label": "First page", children: "\u00AB" })), showPrevNext && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === 1), onClick: () => handle(currentPage - 1), disabled: disabled || currentPage === 1, "aria-label": "Previous page", children: "\u2039" })), pages.map((page, i) => page === "..." ? (_jsx("span", { className: `appkit-pagination__ellipsis ${SIZE_CLASSES[size]}`, "aria-hidden": "true", children: "\u2026" }, `ellipsis-${i}`)) : (_jsx("button", { type: "button", className: btnClass(page === currentPage, disabled && page !== currentPage), onClick: () => handle(page), disabled: disabled, "aria-label": `Page ${page}`, "aria-current": page === currentPage ? "page" : undefined, children: page }, page))), showPrevNext && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === totalPages), onClick: () => handle(currentPage + 1), disabled: disabled || currentPage === totalPages, "aria-label": "Next page", children: "\u203A" })), showFirstLast && (_jsx("button", { type: "button", className: btnClass(false, disabled || currentPage === totalPages), onClick: () => handle(totalPages), disabled: disabled || currentPage === totalPages, "aria-label": "Last page", children: "\u00BB" })), showPageSizeSelector && (_jsx(Select, { "aria-label": "Rows per page", value: String(pageSize), onValueChange: (next) => onPageSizeChange(Number(next)), options: resolved.pageSizeOptions.map((n) => ({ label: `${n} / page`, value: String(n) })), disabled: disabled, className: "appkit-pagination__page-size" }))] }));
|
|
55
57
|
}
|
|
@@ -40,7 +40,7 @@ export function RowActionMenu({ actions, align = "right", }) {
|
|
|
40
40
|
const dropdown = open && pos && mounted
|
|
41
41
|
? createPortal(_jsx("div", { ref: dropdownRef, role: "menu", className: "appkit-row-action-menu__dropdown", style: {
|
|
42
42
|
position: "fixed",
|
|
43
|
-
zIndex: "var(--appkit-z-
|
|
43
|
+
zIndex: "var(--appkit-z-confirm)",
|
|
44
44
|
top: pos.top,
|
|
45
45
|
...(pos.right !== undefined ? { right: pos.right } : { left: pos.left }),
|
|
46
46
|
}, onClick: (e) => e.stopPropagation(), children: actions.map((action, idx) => (_jsxs("div", { children: [action.separator && idx > 0 ? (_jsx("div", { className: "appkit-row-action-menu__separator" })) : null, _jsxs(Button, { type: "button", role: "menuitem", variant: "ghost", disabled: action.disabled, onClick: () => {
|