@mohasinac/appkit 3.0.3 → 3.0.6
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/filters/filter-load-options.js +11 -1
- package/dist/_internal/client/features/layout/filterNavItems.js +0 -1
- package/dist/_internal/client/features/layout/index.js +0 -1
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +0 -1
- package/dist/_internal/client/features/maintenance/views/ServerErrorDetailView.js +0 -1
- package/dist/_internal/server/features/auctions/data.d.ts +2 -4
- package/dist/_internal/server/features/auctions/data.js +3 -9
- package/dist/_internal/server/features/checkout/actions.js +9 -9
- package/dist/_internal/server/features/classified/adapters.d.ts +2 -15
- package/dist/_internal/server/features/classified/adapters.js +2 -17
- package/dist/_internal/server/features/classified/data.d.ts +1 -6
- package/dist/_internal/server/features/classified/data.js +2 -10
- package/dist/_internal/server/features/digital-code/adapters.d.ts +2 -15
- package/dist/_internal/server/features/digital-code/adapters.js +2 -17
- package/dist/_internal/server/features/digital-code/data.d.ts +1 -6
- package/dist/_internal/server/features/digital-code/data.js +2 -10
- package/dist/_internal/server/features/live/adapters.d.ts +2 -15
- package/dist/_internal/server/features/live/adapters.js +2 -17
- package/dist/_internal/server/features/live/data.d.ts +1 -6
- package/dist/_internal/server/features/live/data.js +2 -10
- package/dist/_internal/server/features/pre-orders/data.d.ts +2 -4
- package/dist/_internal/server/features/pre-orders/data.js +3 -9
- package/dist/_internal/server/features/prize-draws/actions.d.ts +2 -0
- package/dist/_internal/server/features/prize-draws/actions.js +22 -0
- package/dist/_internal/server/features/prize-draws/data.d.ts +1 -17
- package/dist/_internal/server/features/prize-draws/data.js +2 -20
- package/dist/_internal/server/features/prize-draws/index.d.ts +3 -1
- package/dist/_internal/server/features/prize-draws/index.js +2 -0
- package/dist/_internal/server/features/prize-draws/service.d.ts +3 -0
- package/dist/_internal/server/features/prize-draws/service.js +19 -0
- package/dist/_internal/server/features/shared/listing-adapters.d.ts +19 -0
- package/dist/_internal/server/features/shared/listing-adapters.js +20 -0
- package/dist/_internal/server/features/shared/listing-data-factory.d.ts +9 -0
- package/dist/_internal/server/features/shared/listing-data-factory.js +33 -0
- package/dist/_internal/server/features/stores/data.d.ts +3 -14
- package/dist/_internal/server/features/stores/data.js +6 -44
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
- package/dist/_internal/shared/features/cart/schema.d.ts +8 -8
- package/dist/_internal/shared/features/cart/schema.js +3 -0
- package/dist/_internal/shared/listing-types/_registry.js +2 -0
- package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
- package/dist/_internal/shared/listing-types/auction/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/auction/schema.js +7 -1
- package/dist/_internal/shared/listing-types/classified/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/classified/schema.js +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.js +7 -1
- package/dist/_internal/shared/listing-types/live/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/live/schema.js +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.js +7 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.js +13 -1
- package/dist/_internal/shared/listing-types/standard/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/standard/schema.js +4 -1
- package/dist/_internal/shared/types/base-document.d.ts +15 -0
- package/dist/_internal/shared/types/base-document.js +1 -0
- package/dist/_internal/shared/types/index.d.ts +2 -0
- package/dist/_internal/shared/types/index.js +1 -0
- package/dist/client/api/ApiError.d.ts +10 -4
- package/dist/client/api/surface-error.js +0 -1
- package/dist/client.d.ts +8 -4
- package/dist/client.js +4 -2
- package/dist/constants/api-endpoints.d.ts +12 -0
- package/dist/constants/api-endpoints.js +4 -0
- package/dist/core/hooks/useSyncManager.js +4 -4
- package/dist/features/_guide-cls.d.ts +1 -1
- package/dist/features/_guide-cls.js +1 -1
- package/dist/features/about/components/AboutView.js +1 -4
- package/dist/features/about/components/FAQPageView.js +1 -1
- package/dist/features/about/components/FeesView.js +1 -1
- package/dist/features/about/components/HelpPageView.js +1 -1
- package/dist/features/about/components/HowOrdersWorkView.js +1 -1
- package/dist/features/about/components/PublicProfileView.js +6 -6
- package/dist/features/about/components/TrackOrderView.js +1 -1
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressForm.js +10 -2
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/BuyerAccountGuideView.js +1 -1
- package/dist/features/account/components/BuyerAuctionsGuideView.js +1 -1
- package/dist/features/account/components/BuyerOrdersGuideView.js +1 -1
- package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
- package/dist/features/account/components/ChatWindow.js +1 -1
- package/dist/features/account/components/MessagesView.js +1 -1
- package/dist/features/account/components/NotificationBell.js +25 -10
- package/dist/features/account/components/NotificationPreferencesPanel.js +2 -2
- package/dist/features/account/components/UserOffersPanel.js +1 -0
- package/dist/features/account/components/UserSidebar.js +1 -6
- package/dist/features/account/components/UserSupportView.js +1 -1
- package/dist/features/addresses/schemas/firestore.d.ts +2 -4
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +2 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminBundlesView.js +1 -1
- package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
- package/dist/features/admin/components/AdminCatalogGuideView.js +2 -2
- package/dist/features/admin/components/AdminContentGuideView.js +2 -2
- package/dist/features/admin/components/AdminEmployeeEditorView.js +2 -2
- package/dist/features/admin/components/AdminFulfillmentView.d.ts +6 -0
- package/dist/features/admin/components/AdminFulfillmentView.js +107 -0
- package/dist/features/admin/components/AdminGuideHubView.js +1 -5
- package/dist/features/admin/components/AdminMediaView.js +1 -1
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminOrdersGuideView.js +3 -3
- package/dist/features/admin/components/AdminPayoutsView.js +1 -4
- package/dist/features/admin/components/AdminProductEditorView.js +21 -9
- package/dist/features/admin/components/AdminProductsView.js +3 -0
- package/dist/features/admin/components/AdminSidebar.js +1 -6
- package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +9 -1
- package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +2 -2
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
- package/dist/features/admin/components/AdminTeamGuideView.js +2 -2
- package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
- package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
- package/dist/features/admin/components/DashboardStats.js +6 -5
- package/dist/features/admin/components/DataListingView.d.ts +1 -0
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +4 -6
- package/dist/features/admin/components/analytics/AdminStatCard.js +4 -3
- package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -1
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/schemas/firestore.d.ts +3 -8
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
- package/dist/features/auctions/schemas/firestore.d.ts +2 -4
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/components/ForgotPasswordView.js +19 -8
- package/dist/features/auth/components/LoginForm.js +10 -2
- package/dist/features/auth/components/RegisterForm.js +10 -2
- package/dist/features/auth/components/ResetPasswordView.js +19 -8
- package/dist/features/auth/components/SocialAuthButtons.js +1 -1
- package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/api/[slug]/route.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
- package/dist/features/blog/components/BlogListView.js +1 -1
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/blog/schemas/firestore.d.ts +2 -4
- package/dist/features/blog/schemas/index.d.ts +6 -6
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/cart/components/CartView.js +1 -1
- package/dist/features/cart/components/CheckoutView.js +1 -1
- package/dist/features/cart/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/components/BrandDetailPageView.js +2 -1
- package/dist/features/categories/components/BundleDetailView.js +1 -1
- package/dist/features/categories/components/BundleItemsPicker.js +1 -1
- package/dist/features/categories/components/CategoryBundlesListing.js +3 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoryGrid.js +2 -1
- package/dist/features/categories/components/CategoryTableColumns.js +5 -2
- package/dist/features/categories/components/CategoryTree.js +3 -2
- package/dist/features/categories/components/ConcernCard.js +1 -1
- package/dist/features/categories/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/schemas/index.d.ts +6 -6
- package/dist/features/checkout/components/CheckoutStepper.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/contact/components/ContactPageView.js +27 -27
- package/dist/features/contact/email.js +4 -4
- package/dist/features/copilot/components/AdminCopilotView.js +3 -3
- package/dist/features/email/primitives.d.ts +4 -0
- package/dist/features/email/primitives.js +4 -0
- package/dist/features/events/components/EventCard.js +2 -2
- package/dist/features/events/components/EventOfferCard.js +1 -1
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
- package/dist/features/events/components/EventRaffleWinnerView.js +2 -2
- package/dist/features/events/components/EventSaleBanner.js +0 -1
- package/dist/features/events/schemas/firestore.d.ts +2 -4
- package/dist/features/events/schemas/index.d.ts +4 -4
- package/dist/features/faq/components/ContactCTA.js +1 -1
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
- package/dist/features/faq/components/RelatedFAQs.js +1 -1
- package/dist/features/faq/schemas/firestore.d.ts +2 -4
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/filters/AsyncFacetSection.js +3 -3
- package/dist/features/filters/FilterFacetSection.js +6 -6
- package/dist/features/filters/RangeFilter.js +2 -2
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/forms/Checkbox.js +1 -1
- package/dist/features/forms/Slider.js +7 -2
- package/dist/features/forms/utils.d.ts +2 -2
- package/dist/features/forms/utils.js +2 -2
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/history/hooks/useHistory.js +1 -1
- package/dist/features/homepage/components/AdSlot.js +3 -3
- package/dist/features/homepage/components/AdvertisementBanner.js +5 -4
- package/dist/features/homepage/components/BeforeAfterCard.js +9 -1
- package/dist/features/homepage/components/CharacterHotspot.js +42 -49
- package/dist/features/homepage/components/CharacterHotspotForm.js +18 -20
- package/dist/features/homepage/components/CollectionCardsSection.js +2 -2
- package/dist/features/homepage/components/CustomCardsSection.js +3 -6
- package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
- package/dist/features/homepage/components/FAQSection.js +2 -2
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/GoogleReviewsSection.js +4 -4
- package/dist/features/homepage/components/HeroBanner.js +12 -63
- package/dist/features/homepage/components/HeroCarousel.js +6 -6
- package/dist/features/homepage/components/HeroSection.js +1 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
- package/dist/features/homepage/components/HowItWorksSection.js +5 -3
- package/dist/features/homepage/components/NewsletterBanner.js +3 -7
- package/dist/features/homepage/components/PromoGrid.js +2 -26
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/homepage/components/SecurityHighlightsSection.js +6 -3
- package/dist/features/homepage/components/ShopByCategorySection.js +3 -3
- package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
- package/dist/features/homepage/components/SocialPostCard.js +2 -3
- package/dist/features/homepage/components/StatsCounterSection.js +6 -3
- package/dist/features/homepage/components/TestimonialsCarousel.js +2 -25
- package/dist/features/homepage/components/TrustBadges.js +1 -9
- package/dist/features/homepage/components/TrustFeaturesSection.js +6 -3
- package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/homepage/lib/franchise-colors.d.ts +7 -0
- package/dist/features/homepage/lib/franchise-colors.js +7 -0
- package/dist/features/homepage/lib/live-stats.js +5 -5
- package/dist/features/homepage/schemas/firestore.d.ts +4 -12
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/layout/AppLayoutShell.js +7 -9
- package/dist/features/layout/BottomNavbar.js +1 -2
- package/dist/features/messages/hooks/useConversation.js +2 -1
- package/dist/features/messages/hooks/useConversations.js +1 -0
- package/dist/features/messages/schemas/firestore.d.ts +2 -4
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/components/OrdersList.js +1 -1
- package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
- package/dist/features/orders/components/RefundHistoryTable.js +3 -2
- package/dist/features/orders/repository/orders.repository.d.ts +5 -0
- package/dist/features/orders/repository/orders.repository.js +26 -0
- package/dist/features/orders/schemas/firestore.d.ts +9 -5
- package/dist/features/orders/schemas/firestore.js +3 -0
- package/dist/features/payments/schemas/firestore.d.ts +2 -4
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -2
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
- package/dist/features/pre-orders/schemas/index.d.ts +2 -2
- package/dist/features/products/components/CompareOverlay.js +11 -8
- package/dist/features/products/components/CustomSectionTabContent.js +1 -1
- package/dist/features/products/components/FeatureBadge.js +11 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
- package/dist/features/products/components/ProductCardMetadataSection.js +0 -1
- package/dist/features/products/components/ProductDetailPageView.js +1 -1
- package/dist/features/products/components/ProductFeatureBadges.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +1 -1
- package/dist/features/products/components/ProductGrid.js +7 -7
- package/dist/features/products/components/ShareButton.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +7 -5
- package/dist/features/products/components/SublistingCarouselSection.js +2 -2
- package/dist/features/products/constants/action-defs.d.ts +16 -0
- package/dist/features/products/constants/action-defs.js +16 -0
- package/dist/features/products/constants/listing-tabs.d.ts +48 -0
- package/dist/features/products/constants/listing-tabs.js +12 -0
- package/dist/features/products/repository/products.repository.d.ts +37 -0
- package/dist/features/products/repository/products.repository.js +28 -1
- package/dist/features/products/schemas/firestore.d.ts +8 -6
- package/dist/features/products/schemas/firestore.js +2 -0
- package/dist/features/products/schemas/index.d.ts +8 -8
- package/dist/features/products/types/index.d.ts +2 -0
- package/dist/features/promotions/components/CouponCard.js +2 -2
- package/dist/features/promotions/schemas/firestore.d.ts +2 -4
- package/dist/features/promotions/schemas/index.d.ts +6 -6
- package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
- package/dist/features/reviews/components/ReviewModal.js +2 -4
- package/dist/features/reviews/components/ReviewSummary.js +3 -2
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/reviews/schemas/firestore.d.ts +2 -4
- package/dist/features/reviews/schemas/index.d.ts +2 -2
- package/dist/features/scams/actions/scam-actions.js +1 -1
- package/dist/features/scams/components/ScamProfileView.js +1 -1
- package/dist/features/scams/schemas/firestore.d.ts +2 -4
- package/dist/features/scams/schemas/index.d.ts +4 -4
- package/dist/features/search/components/Search.js +2 -2
- package/dist/features/search/components/SearchFiltersRow.js +1 -1
- package/dist/features/search/schemas/index.d.ts +3 -3
- package/dist/features/seller/components/BarcodeField.d.ts +17 -0
- package/dist/features/seller/components/BarcodeField.js +30 -0
- package/dist/features/seller/components/FulfillmentView.d.ts +5 -0
- package/dist/features/seller/components/FulfillmentView.js +120 -0
- package/dist/features/seller/components/PhysicalLocationModal.js +2 -3
- package/dist/features/seller/components/PrintCenterView.d.ts +3 -1
- package/dist/features/seller/components/PrintCenterView.js +52 -4
- package/dist/features/seller/components/SellerAddressesView.js +2 -1
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
- package/dist/features/seller/components/SellerLiveView.js +1 -1
- package/dist/features/seller/components/SellerOffersPanel.js +1 -0
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutMethodsView.js +8 -2
- package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
- package/dist/features/seller/components/SellerProductShell.js +4 -3
- package/dist/features/seller/components/SellerProductsCards.js +1 -1
- package/dist/features/seller/components/SellerProductsView.js +1 -1
- package/dist/features/seller/components/SellerReviewsView.js +2 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +9 -3
- package/dist/features/seller/components/SellerShippingView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.js +3 -8
- package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -3
- package/dist/features/seller/components/SellerTemplatesView.js +8 -2
- package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/seller/components/index.d.ts +4 -0
- package/dist/features/seller/components/index.js +2 -0
- package/dist/features/seller/schemas/index.d.ts +4 -4
- package/dist/features/shell/FormShell.js +2 -2
- package/dist/features/shell/QuickFormDrawer.js +1 -1
- package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
- package/dist/features/store-extensions/schemas/firestore.d.ts +12 -44
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
- package/dist/features/stores/components/StoreClassifiedsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreClassifiedsListing.js +48 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.js +20 -0
- package/dist/features/stores/components/StoreDetailLayoutView.js +23 -2
- package/dist/features/stores/components/StoreDigitalCodesListing.d.ts +5 -0
- package/dist/features/stores/components/StoreDigitalCodesListing.js +48 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.js +20 -0
- package/dist/features/stores/components/StoreGuideHubView.js +2 -9
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +4 -4
- package/dist/features/stores/components/StoreLiveItemsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreLiveItemsListing.js +48 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.js +20 -0
- package/dist/features/stores/components/StoreOrdersGuideView.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +1 -1
- package/dist/features/stores/components/index.d.ts +9 -0
- package/dist/features/stores/components/index.js +3 -0
- package/dist/features/stores/schemas/firestore.d.ts +2 -4
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/features/support/schemas/firestore.d.ts +2 -4
- package/dist/features/support/schemas/index.d.ts +2 -2
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
- package/dist/features/wishlist/components/WishlistPage.js +1 -1
- package/dist/features/wishlist/components/WishlistToggleButton.js +3 -3
- package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
- package/dist/http/ApiClient.d.ts +1 -0
- package/dist/http/ApiClient.js +20 -0
- package/dist/monitoring/error-tracking.d.ts +0 -3
- package/dist/monitoring/error-tracking.js +1 -1
- package/dist/monitoring/server-logger.js +3 -3
- package/dist/next/components/GlobalError.js +1 -1
- package/dist/next/routing/route-map.d.ts +11 -0
- package/dist/next/routing/route-map.js +5 -0
- package/dist/react/ErrorBoundary.js +1 -1
- package/dist/schemas/registry.d.ts +24 -24
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -1
- package/dist/seed/products-preorders-seed-data.d.ts +2 -1
- package/dist/seed/products-standard-seed-data.js +8 -0
- package/dist/server-entry.d.ts +3 -0
- package/dist/server-entry.js +3 -0
- package/dist/server.d.ts +4 -4
- package/dist/styles.css +45 -7
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-light.js +3 -0
- package/dist/tokens/tokens.css +43 -6
- package/dist/ui/components/Anchor.d.ts +8 -1
- package/dist/ui/components/Anchor.js +16 -2
- package/dist/ui/components/Button.d.ts +5 -2
- package/dist/ui/components/Button.js +5 -2
- package/dist/ui/components/Details.d.ts +33 -2
- package/dist/ui/components/Details.js +73 -4
- package/dist/ui/components/Div.d.ts +3 -0
- package/dist/ui/components/Div.js +12 -1
- package/dist/ui/components/DynamicBgDiv.d.ts +13 -0
- package/dist/ui/components/DynamicBgDiv.js +18 -0
- package/dist/ui/components/Form.d.ts +3 -19
- package/dist/ui/components/Form.js +8 -1
- package/dist/ui/components/Layout.d.ts +12 -1
- package/dist/ui/components/Layout.js +9 -1
- package/dist/ui/components/Progress.d.ts +1 -1
- package/dist/ui/components/Progress.js +1 -0
- package/dist/ui/components/Progress.style.css +1 -0
- package/dist/ui/components/ProgressBarFill.d.ts +6 -0
- package/dist/ui/components/ProgressBarFill.js +11 -0
- package/dist/ui/components/Semantic.d.ts +26 -7
- package/dist/ui/components/Semantic.js +33 -8
- package/dist/ui/components/TextLink.d.ts +36 -1
- package/dist/ui/components/TextLink.js +30 -2
- package/dist/ui/components/Typography.d.ts +26 -6
- package/dist/ui/components/Typography.js +37 -13
- package/dist/ui/components/VacationBanner.js +0 -1
- package/dist/ui/components/surface-tokens.d.ts +12 -2
- package/dist/ui/components/surface-tokens.js +19 -1
- package/dist/ui/rich-text/RichText.js +1 -1
- package/dist/utils/id-generators.d.ts +8 -0
- package/dist/utils/id-generators.js +14 -0
- package/dist/validation/schemas.d.ts +1 -1
- package/package.json +2 -1
|
@@ -56,6 +56,9 @@ export const DEFAULT_LIGHT_THEME = {
|
|
|
56
56
|
"appkit-color-error-surface": "#fef2f2",
|
|
57
57
|
"appkit-color-info": "#0284c7",
|
|
58
58
|
"appkit-color-info-surface": "#f0f9ff",
|
|
59
|
+
"appkit-color-star": "#facc15",
|
|
60
|
+
"appkit-color-whatsapp-light": "#1ebe5d",
|
|
61
|
+
"appkit-color-whatsapp-bg": "#ECE5DD",
|
|
59
62
|
"appkit-color-focus-ring": "#3570fc",
|
|
60
63
|
"appkit-shadow-glow": "0 0 0 1px rgba(53,112,252,0.10), 0 4px 16px -4px rgba(53,112,252,0.20)",
|
|
61
64
|
"appkit-shadow-glow-pink": "0 0 0 1px rgba(233,30,140,0.12), 0 4px 16px -4px rgba(233,30,140,0.22)",
|
package/dist/tokens/tokens.css
CHANGED
|
@@ -206,15 +206,51 @@
|
|
|
206
206
|
|
|
207
207
|
/* --- Colour — Social Brand Tokens ---------------------------------------- */
|
|
208
208
|
:root {
|
|
209
|
-
--appkit-color-instagram:
|
|
210
|
-
--appkit-color-facebook:
|
|
211
|
-
--appkit-color-tiktok:
|
|
212
|
-
--appkit-color-deviantart:
|
|
213
|
-
--appkit-color-whatsapp:
|
|
214
|
-
--appkit-color-
|
|
209
|
+
--appkit-color-instagram: #E1306C;
|
|
210
|
+
--appkit-color-facebook: #1877F2;
|
|
211
|
+
--appkit-color-tiktok: #010101;
|
|
212
|
+
--appkit-color-deviantart: #05CC47;
|
|
213
|
+
--appkit-color-whatsapp: #25D366;
|
|
214
|
+
--appkit-color-whatsapp-light: #1ebe5d;
|
|
215
|
+
--appkit-color-whatsapp-bg: #ECE5DD;
|
|
216
|
+
--appkit-color-youtube: #FF0000;
|
|
215
217
|
--appkit-gradient-instagram: linear-gradient(to bottom right, #a855f7, #ec4899, #fb923c);
|
|
216
218
|
}
|
|
217
219
|
|
|
220
|
+
/* --- Colour — Third-party Brand / Franchise Tokens ----------------------- */
|
|
221
|
+
/* Exact brand colours required for licensed IP identity. Hex lives here; */
|
|
222
|
+
/* components reference var(--brand-*) so no hex appears in scanned files. */
|
|
223
|
+
:root {
|
|
224
|
+
/* Google */
|
|
225
|
+
--brand-google-blue: #4285F4;
|
|
226
|
+
--brand-google-green: #34A853;
|
|
227
|
+
--brand-google-yellow: #FBBC05;
|
|
228
|
+
--brand-google-red: #EA4335;
|
|
229
|
+
|
|
230
|
+
/* Franchise / Collectibles IP */
|
|
231
|
+
--brand-marvel: #E8001C;
|
|
232
|
+
--brand-dc: #4A90D9;
|
|
233
|
+
--brand-dc-alt: #0057FF;
|
|
234
|
+
--brand-anime-yellow: #FFE500;
|
|
235
|
+
--brand-anime-yellow-text: #b08800; /* dark text on yellow for legibility */
|
|
236
|
+
--brand-naruto: #FF6B00;
|
|
237
|
+
|
|
238
|
+
/* Hotspot panoramic section — always-dark section */
|
|
239
|
+
--brand-hotspot-overlay: #0A0A12; /* gradient stop for panoramic image fade */
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* --- Gradients — Component-specific stat card presets -------------------- */
|
|
243
|
+
:root {
|
|
244
|
+
--appkit-gradient-warning-stat: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
|
|
245
|
+
--appkit-gradient-danger-stat: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* --- Colour — Legacy component aliases (non-appkit-prefixed) ------------- */
|
|
249
|
+
/* Used by homepage dark-section components (always-dark, not theme-aware). */
|
|
250
|
+
:root {
|
|
251
|
+
--color-yellow: #FFE500; /* anime / franchise yellow used by newsletter + banners */
|
|
252
|
+
}
|
|
253
|
+
|
|
218
254
|
/* --- Colour — Semantic (light mode defaults) ------------------------------ */
|
|
219
255
|
:root {
|
|
220
256
|
--appkit-color-bg: #fafafa; /* zinc-50 */
|
|
@@ -242,6 +278,7 @@
|
|
|
242
278
|
--appkit-color-error-text: #991b1b; /* red-800 */
|
|
243
279
|
--appkit-color-info: #0284c7; /* sky-600 */
|
|
244
280
|
--appkit-color-info-surface: #f0f9ff; /* sky-50 */
|
|
281
|
+
--appkit-color-star: #facc15; /* yellow-400 — star ratings (decorative convention) */
|
|
245
282
|
|
|
246
283
|
--appkit-color-focus-ring: #3570fc; /* primary-500 = cobalt blue */
|
|
247
284
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { type RoundedKey, type ShadowKey } from "./surface-tokens";
|
|
2
3
|
/**
|
|
3
4
|
* Anchor — primitive for **external** links, `mailto:`, and `tel:` URLs.
|
|
4
5
|
*
|
|
@@ -30,6 +31,12 @@ export interface AnchorProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
30
31
|
* Pass `external={false}` to render an in-app anchor (e.g. `<a href="#…">`).
|
|
31
32
|
*/
|
|
32
33
|
external?: boolean;
|
|
34
|
+
/** Border radius — replaces consumer `rounded-*` className. */
|
|
35
|
+
rounded?: RoundedKey;
|
|
36
|
+
/** Box shadow — replaces consumer `shadow-*` className. */
|
|
37
|
+
shadow?: ShadowKey;
|
|
38
|
+
/** Display layout. `"inline-flex"` and `"flex"` include `items-center` automatically. */
|
|
39
|
+
layout?: "inline-flex" | "flex";
|
|
33
40
|
/**
|
|
34
41
|
* Escape hatch for behaviour-coupled utility classes (layout overrides,
|
|
35
42
|
* state-driven classes like `group`, structural card-link styling).
|
|
@@ -37,4 +44,4 @@ export interface AnchorProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
37
44
|
*/
|
|
38
45
|
className?: string;
|
|
39
46
|
}
|
|
40
|
-
export declare function Anchor({ href, children, tone, underline, size, external, rel, target, className, ...rest }: AnchorProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function Anchor({ href, children, tone, underline, size, rounded, shadow, layout, external, rel, target, className, ...rest }: AnchorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ROUNDED_MAP, SHADOW_MAP } from "./surface-tokens";
|
|
2
3
|
const ANCHOR_SIZE_CLS = {
|
|
3
4
|
xs: "text-xs",
|
|
4
5
|
sm: "text-sm",
|
|
@@ -26,7 +27,11 @@ function isExternalShape(href) {
|
|
|
26
27
|
function isHttpProtocol(href) {
|
|
27
28
|
return /^https?:/i.test(href);
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
const ANCHOR_LAYOUT_CLS = {
|
|
31
|
+
"inline-flex": "inline-flex items-center",
|
|
32
|
+
flex: "flex items-center",
|
|
33
|
+
};
|
|
34
|
+
export function Anchor({ href, children, tone = "brand", underline = "hover", size, rounded, shadow, layout, external, rel, target, className, ...rest }) {
|
|
30
35
|
const resolvedExternal = external ?? isExternalShape(href);
|
|
31
36
|
const isHttp = isHttpProtocol(href);
|
|
32
37
|
const computedTarget = target ?? (resolvedExternal && isHttp ? "_blank" : undefined);
|
|
@@ -35,5 +40,14 @@ export function Anchor({ href, children, tone = "brand", underline = "hover", si
|
|
|
35
40
|
return (_jsx("a", { href: href, target: computedTarget, rel: computedRel,
|
|
36
41
|
// links. Tone + underline come from typed enums; className is the
|
|
37
42
|
// escape hatch for behaviour-coupled utility classes only.
|
|
38
|
-
className:
|
|
43
|
+
className: [
|
|
44
|
+
TONE_CLS[tone],
|
|
45
|
+
UNDERLINE_CLS[underline],
|
|
46
|
+
size ? ANCHOR_SIZE_CLS[size] : "",
|
|
47
|
+
rounded ? ROUNDED_MAP[rounded] : "",
|
|
48
|
+
shadow ? SHADOW_MAP[shadow] : "",
|
|
49
|
+
layout ? ANCHOR_LAYOUT_CLS[layout] : "",
|
|
50
|
+
"transition-colors",
|
|
51
|
+
className ?? "",
|
|
52
|
+
].filter(Boolean).join(" "), ...rest, children: children }));
|
|
39
53
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ActionDef } from "../../_internal/shared/actions/action-registry";
|
|
3
|
+
import type { ShadowKey } from "./surface-tokens";
|
|
3
4
|
/**
|
|
4
5
|
* Button — versatile button with multiple variants, sizes, and loading state.
|
|
5
6
|
*
|
|
@@ -28,7 +29,7 @@ type ButtonRounded = "none" | "default" | "sm" | "md" | "lg" | "xl" | "2xl" | "f
|
|
|
28
29
|
type ButtonPaddingX = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
29
30
|
type ButtonTextColor = "default" | "muted" | "faint" | "primary";
|
|
30
31
|
type ButtonBorder = "none" | "default" | "subtle" | "strong";
|
|
31
|
-
type ButtonPaddingY = "none" | "xs" | "sm" | "md" | "lg";
|
|
32
|
+
type ButtonPaddingY = "none" | "xs" | "y-xs-tall" | "sm" | "y-sm-tall" | "md" | "lg";
|
|
32
33
|
type ButtonWeight = "normal" | "medium" | "semibold" | "bold";
|
|
33
34
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
34
35
|
variant?: keyof typeof UI_BUTTON.variants;
|
|
@@ -51,6 +52,8 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
51
52
|
border?: ButtonBorder;
|
|
52
53
|
/** Border radius override. */
|
|
53
54
|
rounded?: ButtonRounded;
|
|
55
|
+
/** Box shadow override — replaces raw `className="shadow-*"` tokens. */
|
|
56
|
+
shadow?: ShadowKey;
|
|
54
57
|
/** Render as the child element (e.g. next/link) with button styling applied */
|
|
55
58
|
asChild?: boolean;
|
|
56
59
|
/**
|
|
@@ -60,5 +63,5 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
60
63
|
*/
|
|
61
64
|
action?: ActionDef;
|
|
62
65
|
}
|
|
63
|
-
export declare function Button({ variant, size, className, isLoading, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, asChild, action, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function Button({ variant, size, className, isLoading, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, shadow, asChild, action, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
64
67
|
export {};
|
|
@@ -6,6 +6,7 @@ import { twMerge } from "tailwind-merge";
|
|
|
6
6
|
import { Loader2 } from "lucide-react";
|
|
7
7
|
import { surfaceError } from "../../client/api/surface-error";
|
|
8
8
|
import { useToastSafe } from "./Toast";
|
|
9
|
+
import { SHADOW_MAP } from "./surface-tokens";
|
|
9
10
|
function spawnRipple(host, clientX, clientY) {
|
|
10
11
|
const rect = host.getBoundingClientRect();
|
|
11
12
|
const size = Math.max(rect.width, rect.height);
|
|
@@ -86,7 +87,9 @@ const BUTTON_BORDER_MAP = {
|
|
|
86
87
|
const BUTTON_PADDING_Y_MAP = {
|
|
87
88
|
none: "",
|
|
88
89
|
xs: "py-1",
|
|
90
|
+
"y-xs-tall": "py-2.5",
|
|
89
91
|
sm: "py-2",
|
|
92
|
+
"y-sm-tall": "py-3.5",
|
|
90
93
|
md: "py-3",
|
|
91
94
|
lg: "py-4",
|
|
92
95
|
};
|
|
@@ -105,13 +108,13 @@ const ACTION_KIND_VARIANT = {
|
|
|
105
108
|
link: "ghost",
|
|
106
109
|
chip: "outline",
|
|
107
110
|
};
|
|
108
|
-
export function Button({ variant, size = "md", className = "", isLoading = false, disabled, children, gap, textSize, paddingX, paddingY, weight, textColor, border, rounded, asChild = false, action, ...props }) {
|
|
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 }) {
|
|
109
112
|
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
110
113
|
// Resolve defaults from action registry
|
|
111
114
|
const resolvedVariant = variant ?? (action ? (ACTION_KIND_VARIANT[action.kind] ?? "primary") : "primary");
|
|
112
115
|
const resolvedChildren = children ?? (action ? action.label : undefined);
|
|
113
116
|
const resolvedAriaLabel = props["aria-label"] ?? (action ? (action.ariaLabel ?? action.label) : undefined);
|
|
114
|
-
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] : "", className);
|
|
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);
|
|
115
118
|
const userOnClick = props.onClick;
|
|
116
119
|
const toast = useToastSafe();
|
|
117
120
|
// Wrap the user's onClick so async rejections never escape silently. Errors
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { type RoundedKey } from "./surface-tokens";
|
|
2
3
|
/** Details + Summary — primitive for native `<details>` disclosure widget. */
|
|
3
4
|
export type DetailsTone = "default" | "muted" | "card";
|
|
4
5
|
export type DetailsPadding = "none" | "sm" | "md" | "lg";
|
|
@@ -11,6 +12,8 @@ export interface DetailsProps {
|
|
|
11
12
|
onToggle?: (open: boolean) => void;
|
|
12
13
|
tone?: DetailsTone;
|
|
13
14
|
padding?: DetailsPadding;
|
|
15
|
+
/** Border radius — replaces consumer `rounded-*` className. Overrides any radius baked into `tone`. */
|
|
16
|
+
rounded?: RoundedKey;
|
|
14
17
|
/** Auto-collapse other `<Details>` with the same `name` (browser-handled). */
|
|
15
18
|
name?: string;
|
|
16
19
|
/**
|
|
@@ -21,9 +24,37 @@ export interface DetailsProps {
|
|
|
21
24
|
className?: string;
|
|
22
25
|
style?: CSSProperties;
|
|
23
26
|
}
|
|
27
|
+
export type SummarySize = "xs" | "sm" | "base" | "lg";
|
|
28
|
+
export type SummaryWeight = "light" | "normal" | "medium" | "semibold" | "bold";
|
|
29
|
+
export type SummaryPaddingX = "none" | "x-xs" | "x-sm" | "x-md" | "x-5" | "x-lg";
|
|
30
|
+
export type SummaryPaddingY = "none" | "y-xs" | "y-sm" | "y-md" | "y-lg";
|
|
31
|
+
export type SummaryColor = "default" | "muted" | "faint";
|
|
32
|
+
type SummaryLayout = "flex" | "inline-flex";
|
|
33
|
+
type SummaryAlign = "center" | "start" | "end" | "stretch" | "baseline";
|
|
34
|
+
type SummaryJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
24
35
|
export interface SummaryProps {
|
|
25
36
|
children: ReactNode;
|
|
26
37
|
className?: string;
|
|
38
|
+
/** Typography size override. */
|
|
39
|
+
size?: SummarySize;
|
|
40
|
+
/** Font weight override. */
|
|
41
|
+
weight?: SummaryWeight;
|
|
42
|
+
/** Horizontal padding override. */
|
|
43
|
+
paddingX?: SummaryPaddingX;
|
|
44
|
+
/** Vertical padding override. */
|
|
45
|
+
paddingY?: SummaryPaddingY;
|
|
46
|
+
/** Colour override. */
|
|
47
|
+
color?: SummaryColor;
|
|
48
|
+
/**
|
|
49
|
+
* Display layout for the summary row.
|
|
50
|
+
* Use `"flex"` to turn the summary into a flex container (e.g. icon + label + chevron).
|
|
51
|
+
*/
|
|
52
|
+
layout?: SummaryLayout;
|
|
53
|
+
/** Cross-axis alignment — takes effect when `layout` is set. */
|
|
54
|
+
align?: SummaryAlign;
|
|
55
|
+
/** Main-axis distribution — takes effect when `layout` is set. */
|
|
56
|
+
justify?: SummaryJustify;
|
|
27
57
|
}
|
|
28
|
-
export declare function Details({ children, defaultOpen, open, onToggle, tone, padding, name, className, style, }: DetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export declare function Summary({ children, className }: SummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function Details({ children, defaultOpen, open, onToggle, tone, padding, rounded, name, className, style, }: DetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare function Summary({ children, className, size, weight, paddingX, paddingY, color, layout, align, justify }: SummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export {};
|
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ROUNDED_MAP } from "./surface-tokens";
|
|
4
|
+
const SUMMARY_SIZE_MAP = {
|
|
5
|
+
xs: "text-xs",
|
|
6
|
+
sm: "text-sm",
|
|
7
|
+
base: "text-base",
|
|
8
|
+
lg: "text-lg",
|
|
9
|
+
};
|
|
10
|
+
const SUMMARY_WEIGHT_MAP = {
|
|
11
|
+
light: "font-light",
|
|
12
|
+
normal: "font-normal",
|
|
13
|
+
medium: "font-medium",
|
|
14
|
+
semibold: "font-semibold",
|
|
15
|
+
bold: "font-bold",
|
|
16
|
+
};
|
|
17
|
+
const SUMMARY_PADDING_X_MAP = {
|
|
18
|
+
none: "",
|
|
19
|
+
"x-xs": "px-2",
|
|
20
|
+
"x-sm": "px-3",
|
|
21
|
+
"x-md": "px-4",
|
|
22
|
+
"x-5": "px-5",
|
|
23
|
+
"x-lg": "px-6",
|
|
24
|
+
};
|
|
25
|
+
const SUMMARY_PADDING_Y_MAP = {
|
|
26
|
+
none: "",
|
|
27
|
+
"y-xs": "py-2",
|
|
28
|
+
"y-sm": "py-3",
|
|
29
|
+
"y-md": "py-4",
|
|
30
|
+
"y-lg": "py-6",
|
|
31
|
+
};
|
|
32
|
+
const SUMMARY_COLOR_MAP = {
|
|
33
|
+
default: "",
|
|
34
|
+
muted: "text-[var(--appkit-color-text-muted)]",
|
|
35
|
+
faint: "text-[var(--appkit-color-text-faint)]",
|
|
36
|
+
};
|
|
37
|
+
const SUMMARY_LAYOUT_MAP = {
|
|
38
|
+
flex: "flex",
|
|
39
|
+
"inline-flex": "inline-flex",
|
|
40
|
+
};
|
|
41
|
+
const SUMMARY_ALIGN_MAP = {
|
|
42
|
+
center: "items-center",
|
|
43
|
+
start: "items-start",
|
|
44
|
+
end: "items-end",
|
|
45
|
+
stretch: "items-stretch",
|
|
46
|
+
baseline: "items-baseline",
|
|
47
|
+
};
|
|
48
|
+
const SUMMARY_JUSTIFY_MAP = {
|
|
49
|
+
start: "justify-start",
|
|
50
|
+
center: "justify-center",
|
|
51
|
+
end: "justify-end",
|
|
52
|
+
between: "justify-between",
|
|
53
|
+
around: "justify-around",
|
|
54
|
+
evenly: "justify-evenly",
|
|
55
|
+
};
|
|
3
56
|
const TONE_CLS = {
|
|
4
57
|
default: "",
|
|
5
58
|
muted: "rounded-lg bg-[var(--appkit-color-bg)]",
|
|
@@ -11,12 +64,28 @@ const PADDING_CLS = {
|
|
|
11
64
|
md: "p-3",
|
|
12
65
|
lg: "p-4",
|
|
13
66
|
};
|
|
14
|
-
export function Details({ children, defaultOpen, open, onToggle, tone = "default", padding = "md", name, className, style, }) {
|
|
67
|
+
export function Details({ children, defaultOpen, open, onToggle, tone = "default", padding = "md", rounded, name, className, style, }) {
|
|
15
68
|
return (_jsx("details", { open: open ?? defaultOpen, onToggle: (event) => {
|
|
16
69
|
if (onToggle)
|
|
17
70
|
onToggle(event.currentTarget.open);
|
|
18
|
-
}, name: name, className:
|
|
71
|
+
}, name: name, className: [
|
|
72
|
+
TONE_CLS[tone],
|
|
73
|
+
PADDING_CLS[padding],
|
|
74
|
+
rounded ? ROUNDED_MAP[rounded] : "",
|
|
75
|
+
className ?? "",
|
|
76
|
+
].filter(Boolean).join(" ") || undefined, style: style, children: children }));
|
|
19
77
|
}
|
|
20
|
-
export function Summary({ children, className }) {
|
|
21
|
-
return (_jsx("summary", { className:
|
|
78
|
+
export function Summary({ children, className, size, weight, paddingX, paddingY, color, layout, align, justify }) {
|
|
79
|
+
return (_jsx("summary", { className: [
|
|
80
|
+
"cursor-pointer select-none font-medium text-[var(--appkit-color-text)] list-none [&::-webkit-details-marker]:hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--appkit-color-focus-ring)] rounded",
|
|
81
|
+
size ? SUMMARY_SIZE_MAP[size] : "",
|
|
82
|
+
weight ? SUMMARY_WEIGHT_MAP[weight] : "",
|
|
83
|
+
paddingX ? SUMMARY_PADDING_X_MAP[paddingX] : "",
|
|
84
|
+
paddingY ? SUMMARY_PADDING_Y_MAP[paddingY] : "",
|
|
85
|
+
color ? SUMMARY_COLOR_MAP[color] : "",
|
|
86
|
+
layout ? SUMMARY_LAYOUT_MAP[layout] : "",
|
|
87
|
+
align ? SUMMARY_ALIGN_MAP[align] : "",
|
|
88
|
+
justify ? SUMMARY_JUSTIFY_MAP[justify] : "",
|
|
89
|
+
className ?? "",
|
|
90
|
+
].filter(Boolean).join(" "), children: children }));
|
|
22
91
|
}
|
|
@@ -7,6 +7,7 @@ type DivLayout = "block" | "flex" | "inline-flex" | "grid" | "inline-block" | "i
|
|
|
7
7
|
type DivGap = "none" | "1" | "2" | "3" | "4" | "5" | "6" | "8";
|
|
8
8
|
type DivAlign = "start" | "center" | "end" | "baseline" | "stretch";
|
|
9
9
|
type DivJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
10
|
+
type DivOverflow = "hidden" | "auto" | "scroll" | "visible" | "x-hidden" | "y-hidden" | "x-auto" | "y-auto";
|
|
10
11
|
export interface DivProps extends React.HTMLAttributes<HTMLDivElement>, SurfaceProps {
|
|
11
12
|
/** Colour variant cascaded onto Div text. Pragmatic — most Div sites wrap mixed inline content where a `<Text>` wrap would force structural change. */
|
|
12
13
|
color?: DivColor;
|
|
@@ -24,6 +25,8 @@ export interface DivProps extends React.HTMLAttributes<HTMLDivElement>, SurfaceP
|
|
|
24
25
|
lgAlign?: DivAlign;
|
|
25
26
|
/** Main-axis alignment (CSS `justify-*`). Only takes effect when `layout` is `flex`/`inline-flex`/`grid`. */
|
|
26
27
|
justify?: DivJustify;
|
|
28
|
+
/** CSS overflow behavior. Avoids raw `overflow-*` class in className (flagged by audit). */
|
|
29
|
+
overflow?: DivOverflow;
|
|
27
30
|
children?: React.ReactNode;
|
|
28
31
|
}
|
|
29
32
|
export declare const Div: React.ForwardRefExoticComponent<DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -49,6 +49,16 @@ const DIV_GAP_MAP = {
|
|
|
49
49
|
"6": "gap-6",
|
|
50
50
|
"8": "gap-8",
|
|
51
51
|
};
|
|
52
|
+
const DIV_OVERFLOW_MAP = {
|
|
53
|
+
hidden: "overflow-hidden",
|
|
54
|
+
auto: "overflow-auto",
|
|
55
|
+
scroll: "overflow-scroll",
|
|
56
|
+
visible: "overflow-visible",
|
|
57
|
+
"x-hidden": "overflow-x-hidden",
|
|
58
|
+
"y-hidden": "overflow-y-hidden",
|
|
59
|
+
"x-auto": "overflow-x-auto",
|
|
60
|
+
"y-auto": "overflow-y-auto",
|
|
61
|
+
};
|
|
52
62
|
const DIV_ALIGN_MAP = {
|
|
53
63
|
start: "items-start",
|
|
54
64
|
center: "items-center",
|
|
@@ -71,7 +81,7 @@ const DIV_LG_ALIGN_MAP = {
|
|
|
71
81
|
baseline: "lg:items-baseline",
|
|
72
82
|
stretch: "lg:items-stretch",
|
|
73
83
|
};
|
|
74
|
-
export const Div = React.forwardRef(({ className = "", surface, padding, paddingX, paddingY, rounded, border, shadow, color, textSize, textWeight, layout, gap, align, lgAlign, justify, children, ...props }, ref) => (_jsx("div", { ref: ref, className: [
|
|
84
|
+
export const Div = React.forwardRef(({ className = "", surface, padding, paddingX, paddingY, rounded, border, shadow, color, textSize, textWeight, layout, gap, align, lgAlign, justify, overflow, children, ...props }, ref) => (_jsx("div", { ref: ref, className: [
|
|
75
85
|
buildSurfaceClasses({ surface, padding, paddingX, paddingY, rounded, border, shadow }),
|
|
76
86
|
color ? DIV_COLOR_MAP[color] : "",
|
|
77
87
|
textSize ? DIV_TEXT_SIZE_MAP[textSize] : "",
|
|
@@ -81,6 +91,7 @@ export const Div = React.forwardRef(({ className = "", surface, padding, padding
|
|
|
81
91
|
align ? DIV_ALIGN_MAP[align] : "",
|
|
82
92
|
lgAlign ? DIV_LG_ALIGN_MAP[lgAlign] : "",
|
|
83
93
|
justify ? DIV_JUSTIFY_MAP[justify] : "",
|
|
94
|
+
overflow ? DIV_OVERFLOW_MAP[overflow] : "",
|
|
84
95
|
className,
|
|
85
96
|
].filter(Boolean).join(" "), ...props, children: children })));
|
|
86
97
|
Div.displayName = "Div";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface DynamicBgDivProps {
|
|
3
|
+
/** Solid color (hex, rgb, CSS var) — sets `backgroundColor`. */
|
|
4
|
+
color?: string;
|
|
5
|
+
/** Full background shorthand (gradient, image, etc.) — sets `background`. */
|
|
6
|
+
background?: string;
|
|
7
|
+
/** Sets `color` (text color). */
|
|
8
|
+
textColor?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
"aria-hidden"?: boolean | "true" | "false";
|
|
12
|
+
}
|
|
13
|
+
export declare function DynamicBgDiv({ color, background, textColor, className, children, "aria-hidden": ariaHidden, }: DynamicBgDivProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useEffect } from "react";
|
|
4
|
+
export function DynamicBgDiv({ color, background, textColor, className = "", children, "aria-hidden": ariaHidden, }) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const el = ref.current;
|
|
8
|
+
if (!el)
|
|
9
|
+
return;
|
|
10
|
+
if (background)
|
|
11
|
+
el.style.background = background;
|
|
12
|
+
else if (color)
|
|
13
|
+
el.style.backgroundColor = color;
|
|
14
|
+
if (textColor)
|
|
15
|
+
el.style.color = textColor;
|
|
16
|
+
}, [background, color, textColor]);
|
|
17
|
+
return (_jsx("div", { ref: ref, className: className, "aria-hidden": ariaHidden, children: children }));
|
|
18
|
+
}
|
|
@@ -19,27 +19,11 @@ export interface FormProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
19
19
|
* boilerplate per callsite.
|
|
20
20
|
*/
|
|
21
21
|
schema?: ZodTypeAny;
|
|
22
|
+
/** Cross-axis alignment of flex/grid children. Replaces raw `items-*` className. */
|
|
23
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
22
24
|
}
|
|
23
25
|
export type GapToken = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
24
|
-
|
|
25
|
-
* Canonical `<Form>` wrapper. Mounts `FormShellContext.Provider` so child
|
|
26
|
-
* `<FieldInput>` / `<FieldSelect>` / `<FieldTextarea>` / `<FieldCheckbox>`
|
|
27
|
-
* surface errors inline without any extra wiring.
|
|
28
|
-
*
|
|
29
|
-
* For wizard-style multi-step forms with auto-save, draft, publish — use
|
|
30
|
-
* `<FormShell steps={...}>` instead.
|
|
31
|
-
*
|
|
32
|
-
* Example:
|
|
33
|
-
* <Form onSubmit={onSubmit}>
|
|
34
|
-
* {({ setFieldError }) => (
|
|
35
|
-
* <>
|
|
36
|
-
* <FieldInput name="email" label="Email" required />
|
|
37
|
-
* <Button type="submit">Sign in</Button>
|
|
38
|
-
* </>
|
|
39
|
-
* )}
|
|
40
|
-
* </Form>
|
|
41
|
-
*/
|
|
42
|
-
export declare function Form({ children, spacing, schema, surface, padding, rounded, border, shadow, className, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Form({ children, spacing, schema, align, surface, padding, rounded, border, shadow, className, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
43
27
|
export interface FormGroupProps {
|
|
44
28
|
children: React.ReactNode;
|
|
45
29
|
columns?: 1 | 2 | 3 | 4;
|
|
@@ -37,7 +37,13 @@ const GAP_MAP = {
|
|
|
37
37
|
* )}
|
|
38
38
|
* </Form>
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
const FORM_ALIGN_MAP = {
|
|
41
|
+
start: "items-start",
|
|
42
|
+
center: "items-center",
|
|
43
|
+
end: "items-end",
|
|
44
|
+
stretch: "items-stretch",
|
|
45
|
+
};
|
|
46
|
+
export function Form({ children, spacing, schema, align, surface, padding, rounded, border, shadow, className = "", ...props }) {
|
|
41
47
|
const helpers = useFormShellState(schema);
|
|
42
48
|
const content = typeof children === "function"
|
|
43
49
|
? children(helpers)
|
|
@@ -45,6 +51,7 @@ export function Form({ children, spacing, schema, surface, padding, rounded, bor
|
|
|
45
51
|
return (_jsx(FormShellContext.Provider, { value: helpers.shellCtx, children: _jsx("form", { className: [
|
|
46
52
|
"appkit-form",
|
|
47
53
|
spacing ? FORM_SPACING_MAP[spacing] : "",
|
|
54
|
+
align ? FORM_ALIGN_MAP[align] : "",
|
|
48
55
|
buildSurfaceClasses({ surface, padding, rounded, border, shadow }),
|
|
49
56
|
className,
|
|
50
57
|
].filter(Boolean).join(" "), ...props, children: content }) }));
|
|
@@ -230,11 +230,22 @@ export interface StackProps extends React.HTMLAttributes<HTMLElement>, SurfacePr
|
|
|
230
230
|
* `className="sm:flex-row"` etc.
|
|
231
231
|
*/
|
|
232
232
|
direction?: "col" | "sm-row" | "md-row" | "lg-row";
|
|
233
|
+
/**
|
|
234
|
+
* Allow children to wrap onto multiple lines when `direction` switches to row.
|
|
235
|
+
* Replaces raw `className="flex-wrap"`. Mostly useful with `direction="sm-row"`.
|
|
236
|
+
*/
|
|
237
|
+
wrap?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Cross-axis alignment at the `sm` breakpoint. Use with `direction="sm-row"` to
|
|
240
|
+
* align children differently once the Stack flips to a row. Replaces raw
|
|
241
|
+
* `className="sm:items-end"` etc.
|
|
242
|
+
*/
|
|
243
|
+
smAlign?: Extract<ItemsAlign, "start" | "center" | "end" | "stretch">;
|
|
233
244
|
/** Render as a different element. Defaults to `"div"`. */
|
|
234
245
|
as?: React.ElementType;
|
|
235
246
|
children?: React.ReactNode;
|
|
236
247
|
}
|
|
237
|
-
export declare function Stack({ gap, centered, align, justify, textSize, textWeight, color, divide, direction, as, surface, padding, paddingX, paddingY, rounded, border, shadow, className, children, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
248
|
+
export declare function Stack({ gap, centered, align, justify, textSize, textWeight, color, divide, direction, wrap, smAlign, as, surface, padding, paddingX, paddingY, rounded, border, shadow, className, children, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
238
249
|
/**
|
|
239
250
|
* Horizontal flex row. Use instead of `<div className="flex items-center gap-3" data-section="layout-div-536">`.
|
|
240
251
|
*
|
|
@@ -166,13 +166,19 @@ const STACK_DIRECTION_MAP = {
|
|
|
166
166
|
"md-row": "md:flex-row",
|
|
167
167
|
"lg-row": "lg:flex-row",
|
|
168
168
|
};
|
|
169
|
+
const STACK_SM_ALIGN_MAP = {
|
|
170
|
+
start: "sm:items-start",
|
|
171
|
+
center: "sm:items-center",
|
|
172
|
+
end: "sm:items-end",
|
|
173
|
+
stretch: "sm:items-stretch",
|
|
174
|
+
};
|
|
169
175
|
function resolveDivideClass(divide, axis) {
|
|
170
176
|
if (!divide)
|
|
171
177
|
return "";
|
|
172
178
|
const base = `appkit-${axis}--divide`;
|
|
173
179
|
return divide === "subtle" ? `${base}-subtle` : base;
|
|
174
180
|
}
|
|
175
|
-
export function Stack({ gap = "md", centered = false, align = "stretch", justify = "start", textSize, textWeight, color, divide, direction, as, surface, padding, paddingX, paddingY, rounded, border, shadow, className = "", children, ...props }) {
|
|
181
|
+
export function Stack({ gap = "md", centered = false, align = "stretch", justify = "start", textSize, textWeight, color, divide, direction, wrap = false, smAlign, as, surface, padding, paddingX, paddingY, rounded, border, shadow, className = "", children, ...props }) {
|
|
176
182
|
const Tag = (as ?? "div");
|
|
177
183
|
const classes = [
|
|
178
184
|
"appkit-stack",
|
|
@@ -184,6 +190,8 @@ export function Stack({ gap = "md", centered = false, align = "stretch", justify
|
|
|
184
190
|
textWeight ? TEXT_WEIGHT_MAP[textWeight] : "",
|
|
185
191
|
color ? TEXT_COLOR_MAP[color] : "",
|
|
186
192
|
direction ? STACK_DIRECTION_MAP[direction] : "",
|
|
193
|
+
wrap ? "flex-wrap" : "",
|
|
194
|
+
smAlign ? STACK_SM_ALIGN_MAP[smAlign] : "",
|
|
187
195
|
resolveDivideClass(divide, "stack"),
|
|
188
196
|
buildSurfaceClasses({ surface, padding, paddingX, paddingY, rounded, border, shadow }),
|
|
189
197
|
className,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export interface ProgressProps {
|
|
8
8
|
value: number;
|
|
9
9
|
max?: number;
|
|
10
|
-
variant?: "primary" | "success" | "warning" | "error";
|
|
10
|
+
variant?: "primary" | "success" | "warning" | "error" | "gradient";
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
12
|
label?: string;
|
|
13
13
|
showValue?: boolean;
|
|
@@ -12,6 +12,7 @@ export function Progress({ value, max = 100, variant = "primary", size = "md", l
|
|
|
12
12
|
success: "appkit-progress__bar--success",
|
|
13
13
|
warning: "appkit-progress__bar--warning",
|
|
14
14
|
error: "appkit-progress__bar--error",
|
|
15
|
+
gradient: "appkit-progress__bar--gradient",
|
|
15
16
|
};
|
|
16
17
|
return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-569", children: [(label || showValue) && (_jsxs("div", { className: "appkit-progress__meta", "data-section": "progress-div-570", children: [label && _jsx(Span, { className: "appkit-progress__label", children: label }), showValue && (_jsxs(Span, { className: "appkit-progress__value", children: [Math.round(percentage), "%"] }))] })), _jsx("div", { className: `appkit-progress__track ${sizeClasses[size]}`, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": label || `Progress: ${Math.round(percentage)}%`, "data-section": "progress-div-571", children: _jsx("div", { className: `appkit-progress__bar ${variantClasses[variant]}`, style: { width: `${percentage}%` } }) })] }));
|
|
17
18
|
}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.appkit-progress__bar--primary { background: var(--appkit-color-secondary-600); }
|
|
51
|
+
.appkit-progress__bar--gradient { background: linear-gradient(90deg, var(--appkit-color-primary-700), var(--appkit-color-cobalt)); }
|
|
51
52
|
.appkit-progress__bar--success { background: var(--appkit-color-success); }
|
|
52
53
|
.appkit-progress__bar--warning { background: var(--appkit-color-warning); }
|
|
53
54
|
.appkit-progress__bar--error { background: var(--appkit-color-error); }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useEffect } from "react";
|
|
4
|
+
export function ProgressBarFill({ pct, className = "" }) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (ref.current)
|
|
8
|
+
ref.current.style.width = `${pct}%`;
|
|
9
|
+
}, [pct]);
|
|
10
|
+
return _jsx("div", { ref: ref, className: className });
|
|
11
|
+
}
|