@mohasinac/appkit 2.7.56 → 2.7.58
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/layout/DashboardLayoutClient.d.ts +7 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +8 -2
- package/dist/_internal/shared/actions/action-registry.js +31 -5
- package/dist/client.d.ts +2 -4
- package/dist/client.js +2 -3
- package/dist/configs/tailwind.d.ts +16 -3
- package/dist/configs/tailwind.js +18 -5
- package/dist/constants/field-names.d.ts +3 -0
- package/dist/constants/field-names.js +3 -0
- package/dist/features/about/components/FAQPageView.js +2 -2
- package/dist/features/about/components/FeesView.js +1 -1
- package/dist/features/about/components/PolicyPageView.js +1 -1
- package/dist/features/about/components/PublicProfileView.js +1 -1
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/BuyerAccountGuideView.js +7 -7
- package/dist/features/account/components/BuyerAuctionsGuideView.js +7 -7
- package/dist/features/account/components/BuyerOrdersGuideView.js +6 -6
- package/dist/features/account/components/BuyerShoppingGuideView.js +7 -7
- package/dist/features/account/components/MessagesView.js +1 -1
- package/dist/features/account/components/NotificationPreferencesPanel.js +12 -3
- package/dist/features/account/components/UserOffersPanel.js +2 -2
- package/dist/features/account/components/UserSidebar.js +3 -3
- package/dist/features/account/components/UserSupportView.js +5 -5
- package/dist/features/admin/components/AdminAdsView.js +1 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.js +2 -2
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +3 -3
- package/dist/features/admin/components/AdminBidsView.js +6 -2
- package/dist/features/admin/components/AdminBlogView.js +7 -2
- package/dist/features/admin/components/AdminBrandsView.js +7 -2
- package/dist/features/admin/components/AdminBundleEditorView.js +13 -9
- package/dist/features/admin/components/AdminBundlesView.js +4 -2
- package/dist/features/admin/components/AdminCarouselEditorView.js +7 -8
- package/dist/features/admin/components/AdminCarouselView.js +6 -4
- package/dist/features/admin/components/AdminCartsView.js +1 -1
- package/dist/features/admin/components/AdminCatalogGuideView.js +5 -5
- package/dist/features/admin/components/AdminCategoriesView.js +7 -2
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactView.js +4 -2
- package/dist/features/admin/components/AdminContentGuideView.js +6 -6
- package/dist/features/admin/components/AdminCouponsView.js +4 -2
- package/dist/features/admin/components/AdminEmployeeEditorView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +4 -2
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -1
- package/dist/features/admin/components/AdminFeaturesView.js +5 -1
- package/dist/features/admin/components/AdminGuideHubView.js +1 -1
- package/dist/features/admin/components/AdminHistoryView.js +1 -1
- package/dist/features/admin/components/AdminListingScaffold.js +1 -1
- package/dist/features/admin/components/AdminMediaView.js +10 -5
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +4 -2
- package/dist/features/admin/components/AdminNotificationsView.js +7 -2
- package/dist/features/admin/components/AdminOrdersGuideView.js +5 -5
- package/dist/features/admin/components/AdminOrdersView.js +11 -2
- package/dist/features/admin/components/AdminPayoutsView.js +6 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -0
- package/dist/features/admin/components/AdminProductsView.js +14 -2
- package/dist/features/admin/components/AdminReturnRequestsView.js +1 -1
- package/dist/features/admin/components/AdminReviewsView.js +7 -2
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -3
- package/dist/features/admin/components/AdminScammersView.js +5 -5
- package/dist/features/admin/components/AdminSectionsView.js +2 -2
- package/dist/features/admin/components/AdminSessionsView.js +6 -2
- package/dist/features/admin/components/AdminSidebar.js +3 -3
- package/dist/features/admin/components/AdminSiteSettingsView.js +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +1 -1
- package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +6 -6
- package/dist/features/admin/components/AdminStoresView.js +7 -2
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +3 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +4 -4
- package/dist/features/admin/components/AdminSupportTicketsView.js +8 -8
- package/dist/features/admin/components/AdminTeamGuideView.js +4 -4
- package/dist/features/admin/components/AdminTeamView.js +4 -2
- package/dist/features/admin/components/AdminTrustGuideView.js +5 -5
- package/dist/features/admin/components/AdminUserEditorView.js +2 -2
- package/dist/features/admin/components/AdminUsersGuideView.js +5 -5
- package/dist/features/admin/components/AdminUsersView.js +6 -2
- package/dist/features/admin/components/AdminViewCards.js +3 -3
- package/dist/features/admin/components/AdminWishlistsView.js +1 -1
- package/dist/features/admin/components/DataTable.js +1 -1
- package/dist/features/admin/constants/filter-tabs.d.ts +9 -0
- package/dist/features/admin/constants/filter-tabs.js +3 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionBottomActions.d.ts +7 -0
- package/dist/features/auctions/components/AuctionBottomActions.js +24 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +7 -7
- package/dist/features/auctions/components/AuctionsListView.js +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +2 -2
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +1 -1
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auth/components/LoginForm.js +1 -1
- package/dist/features/auth/components/VerifyEmailView.js +2 -2
- package/dist/features/before-after/components/BeforeAfterGallery.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
- package/dist/features/blog/components/BlogIndexListing.js +1 -1
- package/dist/features/blog/components/BlogListView.js +2 -2
- package/dist/features/blog/components/BlogPostView.js +8 -8
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/cart/repository/cart.repository.js +11 -4
- package/dist/features/cart/schemas/firestore.d.ts +3 -0
- package/dist/features/categories/components/BrandDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoriesIndexListing.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +39 -3
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +4 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +7 -2
- package/dist/features/categories/components/CategoryGrid.js +1 -1
- package/dist/features/categories/components/CategoryProductsView.js +1 -1
- package/dist/features/categories/components/CategoryStoresListing.d.ts +5 -0
- package/dist/features/categories/components/CategoryStoresListing.js +11 -0
- package/dist/features/categories/components/CategoryTableColumns.js +2 -2
- package/dist/features/categories/components/CategoryTree.js +1 -1
- package/dist/features/categories/components/index.d.ts +2 -0
- package/dist/features/categories/components/index.js +1 -0
- package/dist/features/checkout/components/CheckoutStepper.js +2 -2
- package/dist/features/classified/components/ClassifiedIndexListing.js +2 -0
- package/dist/features/classified/components/ClassifiedListView.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/contact/components/ContactInfoSidebar.js +1 -1
- package/dist/features/copilot/components/AdminCopilotView.js +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +2 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.js +1 -1
- package/dist/features/events/components/AdminEventsView.js +5 -1
- package/dist/features/events/components/EventCard.js +1 -1
- package/dist/features/events/components/EventPollWidget.js +3 -3
- package/dist/features/events/components/EventStatusBadge.js +5 -5
- package/dist/features/events/components/EventsIndexListing.js +1 -1
- package/dist/features/events/components/EventsListView.js +2 -2
- package/dist/features/events/components/SpinWheelView.js +5 -3
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/filters/AsyncFacetSection.js +3 -3
- package/dist/features/filters/FilterFacetSection.js +5 -5
- package/dist/features/filters/RangeFilter.js +1 -1
- package/dist/features/forms/Input.js +5 -5
- package/dist/features/forms/Select.js +3 -3
- package/dist/features/forms/Slider.js +1 -1
- package/dist/features/forms/Textarea.js +3 -3
- package/dist/features/forms/utils.d.ts +2 -2
- package/dist/features/forms/utils.js +2 -2
- package/dist/features/history/hooks/useHistory.js +23 -10
- package/dist/features/homepage/components/AdvertisementBanner.js +2 -2
- package/dist/features/homepage/components/CharacterHotspotForm.js +2 -2
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/HeroSection.js +1 -1
- package/dist/features/homepage/components/NewsletterSection.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/layout/BottomActions.js +2 -2
- package/dist/features/layout/ListingLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/live/components/LiveItemsIndexListing.js +2 -0
- package/dist/features/live/components/LiveItemsListView.js +1 -1
- package/dist/features/media/index.d.ts +2 -0
- package/dist/features/media/index.js +1 -0
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.d.ts +12 -0
- package/dist/features/media/modals/ImageEditor.js +73 -0
- package/dist/features/media/upload/ImageUpload.d.ts +5 -1
- package/dist/features/media/upload/ImageUpload.js +33 -8
- package/dist/features/media/upload/MediaUploadField.d.ts +5 -1
- package/dist/features/media/upload/MediaUploadField.js +26 -12
- package/dist/features/orders/components/OrdersList.js +12 -12
- package/dist/features/orders/components/RefundHistoryTable.js +2 -2
- package/dist/features/orders/components/RefundRequestView.js +3 -3
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +5 -5
- package/dist/features/pre-orders/components/PreOrderBottomActions.d.ts +5 -0
- package/dist/features/pre-orders/components/PreOrderBottomActions.js +22 -0
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +5 -5
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +47 -0
- package/dist/features/pre-orders/components/PreOrdersListView.js +1 -1
- package/dist/features/pre-orders/components/PreorderCard.js +3 -3
- package/dist/features/products/components/AuctionsIndexListing.js +23 -0
- package/dist/features/products/components/BidHistory.js +2 -2
- package/dist/features/products/components/CompareOverlay.js +1 -1
- package/dist/features/products/components/CustomFieldsEditor.js +1 -1
- package/dist/features/products/components/CustomSectionTabContent.js +1 -1
- package/dist/features/products/components/CustomSectionsEditor.js +1 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/MakeOfferButton.js +2 -2
- package/dist/features/products/components/PrizeDrawBottomActions.d.ts +6 -0
- package/dist/features/products/components/PrizeDrawBottomActions.js +24 -0
- package/dist/features/products/components/PrizeDrawDetailPageView.js +5 -7
- package/dist/features/products/components/PrizeDrawEntryActions.js +5 -18
- package/dist/features/products/components/PrizeDrawItemsEditor.js +3 -3
- package/dist/features/products/components/PrizeRevealModal.js +7 -4
- package/dist/features/products/components/ProductDetailActions.d.ts +6 -1
- package/dist/features/products/components/ProductDetailActions.js +36 -6
- package/dist/features/products/components/ProductDetailPageView.js +19 -18
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +1 -1
- package/dist/features/products/components/ProductGrid.js +8 -8
- package/dist/features/products/components/ProductTabs.js +1 -1
- package/dist/features/products/components/ProductTabsShell.js +1 -1
- package/dist/features/products/components/ProductsIndexListing.js +47 -0
- package/dist/features/products/components/RelatedProducts.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +1 -1
- package/dist/features/products/components/SublistingCarouselSection.js +1 -1
- package/dist/features/products/components/SublistingCategorySelect.js +1 -1
- package/dist/features/products/components/index.d.ts +0 -2
- package/dist/features/products/components/index.js +0 -1
- package/dist/features/products/constants/action-defs.d.ts +7 -0
- package/dist/features/products/constants/action-defs.js +14 -0
- package/dist/features/products/constants/listing-tabs.d.ts +6 -0
- package/dist/features/products/constants/listing-tabs.js +1 -0
- package/dist/features/promotions/components/CouponCard.js +3 -3
- package/dist/features/promotions/components/CouponsIndexListing.js +2 -2
- package/dist/features/promotions/components/PromotionsView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +4 -4
- package/dist/features/reviews/components/ReviewModal.js +2 -2
- package/dist/features/reviews/components/ReviewSummary.js +1 -1
- package/dist/features/reviews/components/ReviewsIndexListing.js +1 -1
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +4 -3
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +11 -4
- package/dist/features/seller/components/SellerBidsView.js +22 -7
- package/dist/features/seller/components/SellerBundlesView.js +11 -4
- package/dist/features/seller/components/SellerClassifiedView.js +12 -5
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +13 -4
- package/dist/features/seller/components/SellerDigitalCodesView.js +11 -4
- package/dist/features/seller/components/SellerFeaturesView.js +1 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +10 -5
- package/dist/features/seller/components/SellerGroupedListingsView.js +2 -0
- package/dist/features/seller/components/SellerLiveView.js +13 -6
- package/dist/features/seller/components/SellerOffersPanel.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +41 -18
- package/dist/features/seller/components/SellerPayoutMethodsView.js +14 -5
- package/dist/features/seller/components/SellerPayoutsView.js +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +7 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +7 -2
- package/dist/features/seller/components/SellerProductShell.js +27 -9
- package/dist/features/seller/components/SellerProductsCards.js +2 -1
- package/dist/features/seller/components/SellerProductsView.js +22 -9
- package/dist/features/seller/components/SellerReviewsView.js +9 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +15 -6
- package/dist/features/seller/components/SellerSidebar.js +2 -2
- package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -4
- package/dist/features/seller/components/SellerTemplatesView.js +20 -7
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/shell/StepForm.js +9 -3
- package/dist/features/site-settings/components/ActionPermissionsManager.js +1 -1
- package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
- package/dist/features/stores/components/InteractiveStoreCard.js +1 -1
- package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +3 -3
- package/dist/features/stores/components/StoreOrdersGuideView.js +4 -4
- package/dist/features/stores/components/StoreReviewsListing.js +1 -1
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +17 -1
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +4 -4
- package/dist/features/wishlist/components/WishlistPage.js +3 -3
- package/dist/features/wishlist/hooks/useWishlistToggle.js +6 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -3
- package/dist/react/hooks/use-action-dispatch.d.ts +5 -0
- package/dist/react/hooks/use-action-dispatch.js +10 -0
- package/dist/seed/cart-seed-data.js +50 -3
- package/dist/seed/categories-seed-data.js +80 -16
- package/dist/seed/index.d.ts +3 -0
- package/dist/seed/index.js +3 -0
- package/dist/seed/manifest.js +15 -1
- package/dist/seed/products-classifieds-seed-data.d.ts +10 -0
- package/dist/seed/products-classifieds-seed-data.js +197 -0
- package/dist/seed/products-digital-codes-seed-data.d.ts +10 -0
- package/dist/seed/products-digital-codes-seed-data.js +204 -0
- package/dist/seed/products-live-items-seed-data.d.ts +13 -0
- package/dist/seed/products-live-items-seed-data.js +190 -0
- package/dist/styles.css +301 -3
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/motion.d.ts +162 -0
- package/dist/tokens/motion.js +89 -0
- package/dist/ui/DataTable.js +6 -5
- package/dist/ui/components/Accordion.js +2 -1
- package/dist/ui/components/Button.style.css +15 -0
- package/dist/ui/components/Card.d.ts +5 -2
- package/dist/ui/components/Card.js +29 -11
- package/dist/ui/components/Div.d.ts +2 -16
- package/dist/ui/components/Div.js +2 -16
- package/dist/ui/components/Input.js +1 -1
- package/dist/ui/components/Layout.d.ts +9 -19
- package/dist/ui/components/Layout.js +9 -7
- package/dist/ui/components/ListingToolbar.js +1 -1
- package/dist/ui/components/Modal.js +7 -4
- package/dist/ui/components/Motion.d.ts +75 -0
- package/dist/ui/components/Motion.js +122 -0
- package/dist/ui/components/Select.js +1 -1
- package/dist/ui/components/Semantic.d.ts +81 -14
- package/dist/ui/components/Semantic.js +75 -10
- package/dist/ui/components/Semantic.style.css +261 -2
- package/dist/ui/components/SideDrawer.d.ts +1 -1
- package/dist/ui/components/SideDrawer.js +8 -6
- package/dist/ui/components/SideModal.d.ts +1 -1
- package/dist/ui/components/SideModal.js +11 -9
- package/dist/ui/components/StackedViewShell.js +6 -1
- package/dist/ui/components/StatsGrid.js +1 -1
- package/dist/ui/components/Toast.js +5 -2
- package/dist/ui/components/Typography.d.ts +44 -3
- package/dist/ui/components/Typography.js +15 -30
- package/dist/ui/components/Typography.style.css +24 -0
- package/dist/ui/components/VacationBanner.js +2 -1
- package/dist/ui/components/surface-tokens.d.ts +70 -0
- package/dist/ui/components/surface-tokens.js +68 -0
- package/dist/ui/forms/FormShell.d.ts +6 -1
- package/dist/ui/forms/FormShell.js +32 -4
- package/dist/ui/index.d.ts +9 -6
- package/dist/ui/index.js +4 -4
- package/dist/validation/schemas.d.ts +28 -28
- package/package.json +3 -1
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.js +0 -49
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.d.ts +0 -7
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.js +0 -32
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.d.ts +0 -28
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.js +0 -33
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.js +0 -30
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.js +0 -102
- package/dist/_internal/client/features/seller/print-center/PrintGrid.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PrintGrid.js +0 -13
- package/dist/_internal/client/features/seller/print-center/StoreCard.d.ts +0 -19
- package/dist/_internal/client/features/seller/print-center/StoreCard.js +0 -30
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.d.ts +0 -11
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.js +0 -25
- package/dist/_internal/client/features/seller/print-center/index.d.ts +0 -11
- package/dist/_internal/client/features/seller/print-center/index.js +0 -10
- package/dist/_internal/client/features/seller/print-center/types.d.ts +0 -20
- package/dist/_internal/client/features/seller/print-center/types.js +0 -20
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.d.ts +0 -18
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.js +0 -76
- package/dist/features/account/repository/address.repository.d.ts +0 -17
- package/dist/features/account/repository/address.repository.js +0 -184
- package/dist/features/auctions/components/AuctionCard.d.ts +0 -29
- package/dist/features/auctions/components/AuctionCard.js +0 -38
- package/dist/features/categories/components/BundleAddToCartCta.d.ts +0 -16
- package/dist/features/categories/components/BundleAddToCartCta.js +0 -54
- package/dist/features/categories/components/CategoriesListView.d.ts +0 -31
- package/dist/features/categories/components/CategoriesListView.js +0 -27
- package/dist/features/products/components/AuctionsView.d.ts +0 -6
- package/dist/features/products/components/AuctionsView.js +0 -5
- package/dist/features/products/components/BuyBar.d.ts +0 -21
- package/dist/features/products/components/BuyBar.js +0 -19
- package/dist/features/products/components/PreOrdersView.d.ts +0 -6
- package/dist/features/products/components/PreOrdersView.js +0 -5
- package/dist/features/reviews/components/ReviewsListView.d.ts +0 -31
- package/dist/features/reviews/components/ReviewsListView.js +0 -16
- package/dist/features/stores/components/StoresListView.d.ts +0 -19
- package/dist/features/stores/components/StoresListView.js +0 -25
- package/dist/features/stores/repository/store-address.repository.d.ts +0 -55
- package/dist/features/stores/repository/store-address.repository.js +0 -187
- package/dist/ui/components/BulkActionsBar.d.ts +0 -18
- package/dist/ui/components/BulkActionsBar.js +0 -25
- package/dist/ui/components/CollageLightbox.d.ts +0 -18
- package/dist/ui/components/CollageLightbox.js +0 -41
- package/dist/ui/components/StickyBottomBar.d.ts +0 -22
- package/dist/ui/components/StickyBottomBar.js +0 -20
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/* Semantic — HTML5 landmark wrappers (Section, Article, Main, Aside, Nav, etc.) */
|
|
2
|
-
/* Pure passthroughs — no default styles. Exists for style contract compliance. */
|
|
3
|
-
/* Consumer themes may add base landmark styles via these hooks. */
|
|
4
2
|
|
|
5
3
|
.appkit-section {}
|
|
6
4
|
.appkit-article {}
|
|
@@ -12,3 +10,264 @@
|
|
|
12
10
|
.appkit-ul {}
|
|
13
11
|
.appkit-ol {}
|
|
14
12
|
.appkit-li {}
|
|
13
|
+
|
|
14
|
+
/* --- Table family --------------------------------------------------------- */
|
|
15
|
+
|
|
16
|
+
.appkit-table {
|
|
17
|
+
width: 100%;
|
|
18
|
+
border-collapse: collapse;
|
|
19
|
+
text-align: left;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.appkit-table--sm .appkit-th,
|
|
23
|
+
.appkit-table--sm .appkit-td { padding: 0.375rem 0.5rem; font-size: 0.8125rem; }
|
|
24
|
+
|
|
25
|
+
.appkit-table--md .appkit-th,
|
|
26
|
+
.appkit-table--md .appkit-td { padding: 0.625rem 0.75rem; font-size: 0.875rem; }
|
|
27
|
+
|
|
28
|
+
.appkit-table--lg .appkit-th,
|
|
29
|
+
.appkit-table--lg .appkit-td { padding: 0.875rem 1rem; font-size: 1rem; }
|
|
30
|
+
|
|
31
|
+
.appkit-thead {}
|
|
32
|
+
|
|
33
|
+
.appkit-th {
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
color: var(--appkit-color-zinc-600, #52525b);
|
|
36
|
+
border-bottom: 1px solid var(--appkit-color-zinc-200, #e4e4e7);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dark .appkit-th {
|
|
40
|
+
color: var(--appkit-color-zinc-400, #a1a1aa);
|
|
41
|
+
border-bottom-color: var(--appkit-color-slate-700, #334155);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.appkit-td {
|
|
45
|
+
border-bottom: 1px solid var(--appkit-color-zinc-100, #f4f4f5);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dark .appkit-td {
|
|
49
|
+
border-bottom-color: var(--appkit-color-slate-800, #1e293b);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.appkit-table--default .appkit-th {
|
|
53
|
+
background: var(--appkit-color-zinc-50, #fafafa);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dark .appkit-table--default .appkit-th {
|
|
57
|
+
background: var(--appkit-color-slate-900, #0f172a);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.appkit-table--striped .appkit-tbody .appkit-tr:nth-child(even) {
|
|
61
|
+
background: var(--appkit-color-zinc-50, #fafafa);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dark .appkit-table--striped .appkit-tbody .appkit-tr:nth-child(even) {
|
|
65
|
+
background: var(--appkit-color-slate-800, #1e293b);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.appkit-table--bordered .appkit-th,
|
|
69
|
+
.appkit-table--bordered .appkit-td {
|
|
70
|
+
border: 1px solid var(--appkit-color-zinc-200, #e4e4e7);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dark .appkit-table--bordered .appkit-th,
|
|
74
|
+
.dark .appkit-table--bordered .appkit-td {
|
|
75
|
+
border-color: var(--appkit-color-slate-700, #334155);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.appkit-table--sticky-header .appkit-th {
|
|
79
|
+
position: sticky;
|
|
80
|
+
top: 0;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
background: var(--appkit-color-zinc-50, #fafafa);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dark .appkit-table--sticky-header .appkit-th {
|
|
86
|
+
background: var(--appkit-color-slate-900, #0f172a);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.appkit-tr--hover:hover {
|
|
90
|
+
background: var(--appkit-color-zinc-50, #fafafa);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dark .appkit-tr--hover:hover {
|
|
94
|
+
background: var(--appkit-color-slate-800, #1e293b);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* --- Code / Pre ----------------------------------------------------------- */
|
|
98
|
+
|
|
99
|
+
.appkit-code {
|
|
100
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
101
|
+
font-size: 0.875em;
|
|
102
|
+
padding: 0.125rem 0.375rem;
|
|
103
|
+
border-radius: 0.25rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.appkit-code--default {
|
|
107
|
+
background: var(--appkit-color-zinc-100, #f4f4f5);
|
|
108
|
+
color: var(--appkit-color-zinc-800, #27272a);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dark .appkit-code--default {
|
|
112
|
+
background: var(--appkit-color-slate-800, #1e293b);
|
|
113
|
+
color: var(--appkit-color-zinc-200, #e4e4e7);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.appkit-code--primary {
|
|
117
|
+
background: var(--appkit-color-primary-50, #eef5ff);
|
|
118
|
+
color: var(--appkit-color-primary-700, #1343de);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dark .appkit-code--primary {
|
|
122
|
+
background: var(--appkit-color-primary-950, #111e58);
|
|
123
|
+
color: var(--appkit-color-primary-300, #8eb9ff);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.appkit-code--error {
|
|
127
|
+
background: #fef2f2;
|
|
128
|
+
color: #b91c1c;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.dark .appkit-code--error {
|
|
132
|
+
background: #1c0a0a;
|
|
133
|
+
color: #fca5a5;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.appkit-code--success {
|
|
137
|
+
background: #f0fdf4;
|
|
138
|
+
color: #15803d;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dark .appkit-code--success {
|
|
142
|
+
background: #052e16;
|
|
143
|
+
color: #86efac;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.appkit-pre {
|
|
147
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
148
|
+
font-size: 0.875rem;
|
|
149
|
+
line-height: 1.7;
|
|
150
|
+
margin: 0;
|
|
151
|
+
overflow-x: auto;
|
|
152
|
+
background: var(--appkit-color-zinc-50, #fafafa);
|
|
153
|
+
padding: 1rem;
|
|
154
|
+
border-radius: 0.5rem;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.dark .appkit-pre {
|
|
158
|
+
background: var(--appkit-color-slate-900, #0f172a);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* --- Blockquote ----------------------------------------------------------- */
|
|
162
|
+
|
|
163
|
+
.appkit-blockquote {
|
|
164
|
+
margin: 0;
|
|
165
|
+
padding: 0.75rem 1rem;
|
|
166
|
+
border-left: 3px solid;
|
|
167
|
+
font-style: italic;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.appkit-blockquote--default {
|
|
171
|
+
border-left-color: var(--appkit-color-zinc-300, #d4d4d8);
|
|
172
|
+
color: var(--appkit-color-zinc-600, #52525b);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.dark .appkit-blockquote--default {
|
|
176
|
+
border-left-color: var(--appkit-color-slate-600, #475569);
|
|
177
|
+
color: var(--appkit-color-zinc-400, #a1a1aa);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.appkit-blockquote--primary {
|
|
181
|
+
border-left-color: var(--appkit-color-primary);
|
|
182
|
+
color: var(--appkit-color-primary-700, #1343de);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.dark .appkit-blockquote--primary {
|
|
186
|
+
color: var(--appkit-color-primary-300, #8eb9ff);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.appkit-blockquote--info {
|
|
190
|
+
border-left-color: var(--appkit-color-info, #0284c7);
|
|
191
|
+
color: var(--appkit-color-info, #0284c7);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.dark .appkit-blockquote--info {
|
|
195
|
+
border-left-color: var(--appkit-color-info, #38bdf8);
|
|
196
|
+
color: var(--appkit-color-info, #38bdf8);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.appkit-blockquote--warning {
|
|
200
|
+
border-left-color: var(--appkit-color-warning, #d97706);
|
|
201
|
+
color: var(--appkit-color-warning, #d97706);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.dark .appkit-blockquote--warning {
|
|
205
|
+
border-left-color: var(--appkit-color-warning, #fbbf24);
|
|
206
|
+
color: var(--appkit-color-warning, #fbbf24);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* --- Figure / Figcaption -------------------------------------------------- */
|
|
210
|
+
|
|
211
|
+
.appkit-figure {
|
|
212
|
+
margin: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.appkit-figcaption {
|
|
216
|
+
font-size: 0.875rem;
|
|
217
|
+
color: var(--appkit-color-zinc-500, #71717a);
|
|
218
|
+
margin-top: 0.5rem;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.dark .appkit-figcaption {
|
|
222
|
+
color: var(--appkit-color-zinc-400, #a1a1aa);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* --- Dl / Dt / Dd (description list) -------------------------------------- */
|
|
226
|
+
|
|
227
|
+
.appkit-dl {
|
|
228
|
+
margin: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.appkit-dl--stacked .appkit-dt {
|
|
232
|
+
font-weight: 600;
|
|
233
|
+
color: var(--appkit-color-zinc-700, #3f3f46);
|
|
234
|
+
margin-bottom: 0.25rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.dark .appkit-dl--stacked .appkit-dt {
|
|
238
|
+
color: var(--appkit-color-zinc-300, #d4d4d8);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.appkit-dl--stacked .appkit-dd {
|
|
242
|
+
margin: 0 0 1rem 0;
|
|
243
|
+
color: var(--appkit-color-zinc-600, #52525b);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.dark .appkit-dl--stacked .appkit-dd {
|
|
247
|
+
color: var(--appkit-color-zinc-400, #a1a1aa);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.appkit-dl--inline {
|
|
251
|
+
display: grid;
|
|
252
|
+
grid-template-columns: auto 1fr;
|
|
253
|
+
gap: 0.25rem 1rem;
|
|
254
|
+
align-items: baseline;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.appkit-dl--inline .appkit-dt {
|
|
258
|
+
font-weight: 600;
|
|
259
|
+
color: var(--appkit-color-zinc-700, #3f3f46);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.dark .appkit-dl--inline .appkit-dt {
|
|
263
|
+
color: var(--appkit-color-zinc-300, #d4d4d8);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.appkit-dl--inline .appkit-dd {
|
|
267
|
+
margin: 0;
|
|
268
|
+
color: var(--appkit-color-zinc-600, #52525b);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.dark .appkit-dl--inline .appkit-dd {
|
|
272
|
+
color: var(--appkit-color-zinc-400, #a1a1aa);
|
|
273
|
+
}
|
|
@@ -24,4 +24,4 @@ export interface SideDrawerProps {
|
|
|
24
24
|
* </SideDrawer>
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export declare function SideDrawer({ isOpen, onClose, title, children, footer, mode, isDirty, side, }: SideDrawerProps): import("react/jsx-runtime").JSX.Element
|
|
27
|
+
export declare function SideDrawer({ isOpen, onClose, title, children, footer, mode, isDirty, side, }: SideDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef, useState, useCallback } from "react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
|
+
import { motion, AnimatePresence, useReducedMotion } from "motion/react";
|
|
5
6
|
import { Button } from "./Button";
|
|
6
7
|
import { Row } from "./Layout";
|
|
7
8
|
import { Heading, Span } from "./Typography";
|
|
8
9
|
import { useSwipe } from "../../react";
|
|
9
10
|
import { Text } from "./Typography";
|
|
11
|
+
import { SPRING_SNAPPY } from "../../tokens/motion";
|
|
10
12
|
const UI_SIDE_DRAWER = {
|
|
11
13
|
backdrop: "appkit-side-drawer__backdrop",
|
|
12
14
|
root: "appkit-side-drawer",
|
|
@@ -142,11 +144,11 @@ export function SideDrawer({ isOpen, onClose, title, children, footer, mode = "v
|
|
|
142
144
|
: { onSwipeRight: () => attemptClose() }),
|
|
143
145
|
minSwipeDistance: 60,
|
|
144
146
|
});
|
|
145
|
-
|
|
146
|
-
return null;
|
|
147
|
+
const reduced = useReducedMotion();
|
|
147
148
|
const positionClass = side === "left" ? UI_SIDE_DRAWER.left : UI_SIDE_DRAWER.right;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
const slideX = side === "left" ? "-100%" : "100%";
|
|
150
|
+
return (_jsx(AnimatePresence, { children: isOpen && (_jsxs(_Fragment, { children: [_jsx(motion.div, { className: UI_SIDE_DRAWER.backdrop, onClick: attemptClose, "aria-hidden": "true", initial: reduced ? false : { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 } }), _jsxs(motion.div, { ref: drawerRef, className: [UI_SIDE_DRAWER.root, positionClass].join(" "), role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-title", initial: reduced ? false : { x: slideX }, animate: { x: 0 }, exit: { x: slideX }, transition: SPRING_SNAPPY, "data-section": "sidedrawer-div-598", children: [_jsxs(Row, { justify: "between", gap: "none", className: [
|
|
151
|
+
UI_SIDE_DRAWER.header,
|
|
152
|
+
UI_SIDE_DRAWER.headerMode[mode],
|
|
153
|
+
].join(" "), children: [_jsxs(Row, { gap: "3", className: "min-w-0", children: [_jsx(Button, { variant: "ghost", onClick: attemptClose, className: UI_SIDE_DRAWER.closeBtn, "aria-label": tActions("close"), children: _jsx("svg", { className: UI_SIDE_DRAWER.closeIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), _jsx(Heading, { level: 3, id: "drawer-title", className: "truncate", children: title })] }), mode === "delete" && (_jsx(Span, { className: UI_SIDE_DRAWER.deleteBadge, children: tActions("delete") }))] }), _jsx("div", { className: UI_SIDE_DRAWER.content, "data-section": "sidedrawer-div-599", children: children }), footer && _jsx("div", { className: UI_SIDE_DRAWER.footer, "data-section": "sidedrawer-div-600", children: footer })] }), showUnsavedWarning && (_jsxs(_Fragment, { children: [_jsx("div", { className: UI_SIDE_DRAWER.warnBackdrop, onClick: cancelClose }), _jsxs("div", { className: UI_SIDE_DRAWER.warnDialog, "data-section": "sidedrawer-div-601", children: [_jsxs("div", { className: UI_SIDE_DRAWER.warnHeader, "data-section": "sidedrawer-div-602", children: [_jsx("div", { className: UI_SIDE_DRAWER.warnIcon, "data-section": "sidedrawer-div-603", children: _jsx("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }), _jsxs("div", { "data-section": "sidedrawer-div-604", children: [_jsx(Heading, { level: 4, className: "mb-1", children: tConfirm("unsavedChangesTitle") }), _jsx(Text, { className: UI_SIDE_DRAWER.warnText, children: tConfirm("unsavedChangesDescription") })] })] }), _jsxs("div", { className: UI_SIDE_DRAWER.warnActions, "data-section": "sidedrawer-div-605", children: [_jsx(Button, { variant: "outline", onClick: cancelClose, size: "sm", children: tActions("keepEditing") }), _jsx(Button, { variant: "danger", onClick: confirmClose, size: "sm", children: tActions("discardChanges") })] })] })] }))] })) }));
|
|
152
154
|
}
|
|
@@ -21,4 +21,4 @@ export interface SideModalProps {
|
|
|
21
21
|
* - backdrop click closes panel
|
|
22
22
|
* - role="dialog" + aria-modal + aria-labelledby
|
|
23
23
|
*/
|
|
24
|
-
export declare function SideModal({ isOpen, onClose, title, side, children, className, }: SideModalProps): import("react/jsx-runtime").JSX.Element
|
|
24
|
+
export declare function SideModal({ isOpen, onClose, title, side, children, className, }: SideModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
|
+
import { motion, AnimatePresence, useReducedMotion } from "motion/react";
|
|
4
5
|
import { Button, Div, Heading } from "..";
|
|
6
|
+
import { SPRING_SNAPPY } from "../../tokens/motion";
|
|
5
7
|
/**
|
|
6
8
|
* SideModal — slides in from the right (or left) on desktop (60 vw),
|
|
7
9
|
* full-screen drawer on mobile (< sm breakpoint).
|
|
@@ -48,13 +50,13 @@ export function SideModal({ isOpen, onClose, title, side = "right", children, cl
|
|
|
48
50
|
document.body.style.overflow = "";
|
|
49
51
|
};
|
|
50
52
|
}, [isOpen]);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return (_jsxs(Div, { className: "appkit-side-modal", "aria-hidden": !isOpen, children: [_jsx(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
const reduced = useReducedMotion();
|
|
54
|
+
const slideX = side === "left" ? "-100%" : "100%";
|
|
55
|
+
return (_jsx(AnimatePresence, { children: isOpen && (_jsxs(Div, { className: "appkit-side-modal", "aria-hidden": !isOpen, children: [_jsx(motion.div, { className: "appkit-side-modal__backdrop", onClick: onClose, "aria-hidden": "true", initial: reduced ? false : { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 } }), _jsxs(motion.div, { ref: panelRef, role: "dialog", "aria-modal": "true", "aria-labelledby": title ? titleId.current : undefined, className: [
|
|
56
|
+
"appkit-side-modal__panel",
|
|
57
|
+
`appkit-side-modal__panel--${side}`,
|
|
58
|
+
className,
|
|
59
|
+
]
|
|
60
|
+
.filter(Boolean)
|
|
61
|
+
.join(" "), initial: reduced ? false : { x: slideX }, animate: { x: 0 }, exit: { x: slideX }, transition: SPRING_SNAPPY, children: [title && (_jsxs(Div, { className: "appkit-side-modal__header", children: [_jsx(Heading, { level: 2, id: titleId.current, className: "text-base font-semibold text-neutral-900 dark:text-white truncate", children: title }), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, "aria-label": "Close panel", className: "ml-2 flex-shrink-0", children: "\u2715" })] })), _jsx(Div, { className: "appkit-side-modal__body", children: children })] })] })) }));
|
|
60
62
|
}
|
|
@@ -33,5 +33,10 @@ export function StackedViewShell({ title, labels = {},
|
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
34
34
|
portal, renderHeader, sections = [], isEmpty = false, renderEmpty, overlays, className = "", }) {
|
|
35
35
|
const displayTitle = title ?? labels?.title;
|
|
36
|
-
return (_jsxs(Div, { className: className, children: [renderHeader ? (renderHeader()) : displayTitle ? (_jsx(Heading, { level: 1, className: "text-2xl font-bold mb-6", children: displayTitle })) : null, isEmpty && renderEmpty ? (renderEmpty()) : (_jsx(_Fragment, { children: sections.map((slot, i) =>
|
|
36
|
+
return (_jsxs(Div, { className: className, children: [renderHeader ? (renderHeader()) : displayTitle ? (_jsx(Heading, { level: 1, className: "text-2xl font-bold mb-6", children: displayTitle })) : null, isEmpty && renderEmpty ? (renderEmpty()) : (_jsx(_Fragment, { children: sections.map((slot, i) => {
|
|
37
|
+
const resolved = resolveSlot(slot);
|
|
38
|
+
if (resolved == null)
|
|
39
|
+
return null;
|
|
40
|
+
return _jsx(React.Fragment, { children: resolved }, i);
|
|
41
|
+
}) })), overlays] }));
|
|
37
42
|
}
|
|
@@ -12,5 +12,5 @@ const variantClass = {
|
|
|
12
12
|
flat: "appkit-stats-grid--flat",
|
|
13
13
|
};
|
|
14
14
|
export function StatsGrid({ stats, columns = 3, variant = "elevated", className, }) {
|
|
15
|
-
return (_jsx(Div, { className: classNames("appkit-stats-grid", columnsClass[columns], variantClass[variant], className), children: stats.map((stat, i) => (_jsx(Div, { className: "appkit-stats-grid__item", children: _jsxs(Div, { className: "appkit-stats-grid__item-inner", children: [_jsxs(Div, { children: [_jsx(Text, { className: "appkit-stats-grid__label", children: stat.label }), _jsx(Text, { className: "appkit-stats-grid__value", children: stat.value })] }), stat.icon && (_jsx(Div, { className: classNames("appkit-stats-grid__icon", stat.colorClass ?? "text-zinc-400 dark:text-zinc-
|
|
15
|
+
return (_jsx(Div, { className: classNames("appkit-stats-grid", columnsClass[columns], variantClass[variant], className), children: stats.map((stat, i) => (_jsx(Div, { className: "appkit-stats-grid__item", children: _jsxs(Div, { className: "appkit-stats-grid__item-inner", children: [_jsxs(Div, { children: [_jsx(Text, { className: "appkit-stats-grid__label", children: stat.label }), _jsx(Text, { className: "appkit-stats-grid__value", children: stat.value })] }), stat.icon && (_jsx(Div, { className: classNames("appkit-stats-grid__icon", stat.colorClass ?? "text-zinc-400 dark:text-zinc-400"), children: stat.icon }))] }) }, `${stat.label}-${i}`))) }));
|
|
16
16
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { motion, AnimatePresence, useReducedMotion } from "motion/react";
|
|
4
5
|
import { Button } from "./Button";
|
|
5
6
|
import { Text } from "./Typography";
|
|
7
|
+
import { SPRING_SNAPPY } from "../../tokens/motion";
|
|
6
8
|
const ToastContext = React.createContext(undefined);
|
|
7
9
|
function buildToastId() {
|
|
8
10
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
@@ -47,14 +49,15 @@ export function ToastProvider({ children, position = "top-right", }) {
|
|
|
47
49
|
}, [hideToast]);
|
|
48
50
|
return (_jsxs(ToastContext.Provider, { value: { showToast, hideToast }, children: [children, _jsx("div", { "aria-live": "polite", "aria-atomic": "true", "data-testid": "toast-container", className: [UI_TOAST.container, UI_TOAST.positions[position]]
|
|
49
51
|
.filter(Boolean)
|
|
50
|
-
.join(" "), "data-section": "toast-div-623", children: toasts.map((toast) => (_jsx(ToastRow, { toast: toast, onClose: hideToast }, toast.id))) })] }));
|
|
52
|
+
.join(" "), "data-section": "toast-div-623", children: _jsx(AnimatePresence, { mode: "popLayout", children: toasts.map((toast) => (_jsx(ToastRow, { toast: toast, onClose: hideToast }, toast.id))) }) })] }));
|
|
51
53
|
}
|
|
52
54
|
function ToastRow({ toast, onClose, }) {
|
|
55
|
+
const reduced = useReducedMotion();
|
|
53
56
|
const iconMap = {
|
|
54
57
|
success: _jsx("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
55
58
|
error: _jsx("span", { "aria-hidden": "true", children: "!" }),
|
|
56
59
|
warning: _jsx("span", { "aria-hidden": "true", children: "!" }),
|
|
57
60
|
info: _jsx("span", { "aria-hidden": "true", children: "i" }),
|
|
58
61
|
};
|
|
59
|
-
return (_jsxs(
|
|
62
|
+
return (_jsxs(motion.div, { role: "alert", "data-testid": "toast", className: [UI_TOAST.row, UI_TOAST.variants[toast.variant]].join(" "), layout: true, initial: reduced ? false : { opacity: 0, x: 24, scale: 0.95 }, animate: { opacity: 1, x: 0, scale: 1 }, exit: { opacity: 0, x: 24, scale: 0.95 }, transition: SPRING_SNAPPY, "data-section": "toast-div-624", children: [_jsx("div", { className: UI_TOAST.icon, "data-section": "toast-div-625", children: iconMap[toast.variant] }), _jsx(Text, { as: "div", size: "sm", weight: "medium", className: "flex-1 pr-1", children: toast.message }), toast.action && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => { toast.action.onClick(); onClose(toast.id); }, className: "min-h-0 shrink-0 px-2 py-1 font-semibold underline", children: toast.action.label })), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onClose(toast.id), className: "min-h-0 shrink-0 px-2 py-1", "aria-label": "Close notification", children: "\u00D7" })] }));
|
|
60
63
|
}
|
|
@@ -1,19 +1,59 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
declare const TYPOGRAPHY: {
|
|
3
|
+
readonly headingLevel: {
|
|
4
|
+
readonly 1: "appkit-heading--h1";
|
|
5
|
+
readonly 2: "appkit-heading--h2";
|
|
6
|
+
readonly 3: "appkit-heading--h3";
|
|
7
|
+
readonly 4: "appkit-heading--h4";
|
|
8
|
+
readonly 5: "appkit-heading--h5";
|
|
9
|
+
readonly 6: "appkit-heading--h6";
|
|
10
|
+
};
|
|
11
|
+
readonly textSize: {
|
|
12
|
+
readonly xs: "appkit-text--xs";
|
|
13
|
+
readonly sm: "appkit-text--sm";
|
|
14
|
+
readonly base: "appkit-text--base";
|
|
15
|
+
readonly lg: "appkit-text--lg";
|
|
16
|
+
readonly xl: "appkit-text--xl";
|
|
17
|
+
};
|
|
18
|
+
readonly textWeight: {
|
|
19
|
+
readonly normal: "appkit-font--normal";
|
|
20
|
+
readonly medium: "appkit-font--medium";
|
|
21
|
+
readonly semibold: "appkit-font--semibold";
|
|
22
|
+
readonly bold: "appkit-font--bold";
|
|
23
|
+
};
|
|
24
|
+
readonly colorVariant: {
|
|
25
|
+
readonly primary: "appkit-color--primary";
|
|
26
|
+
readonly secondary: "appkit-color--secondary";
|
|
27
|
+
readonly muted: "appkit-color--muted";
|
|
28
|
+
readonly faint: "appkit-color--faint";
|
|
29
|
+
readonly error: "appkit-color--error";
|
|
30
|
+
readonly danger: "appkit-color--error";
|
|
31
|
+
readonly success: "appkit-color--success";
|
|
32
|
+
readonly warning: "appkit-color--warning";
|
|
33
|
+
readonly info: "appkit-color--info";
|
|
34
|
+
readonly none: "";
|
|
35
|
+
readonly inherit: "";
|
|
36
|
+
readonly accent: "appkit-color--accent";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type ColorVariant = keyof typeof TYPOGRAPHY.colorVariant;
|
|
2
40
|
interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
3
41
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
42
|
variant?: "primary" | "secondary" | "muted" | "none";
|
|
43
|
+
color?: ColorVariant;
|
|
5
44
|
children: React.ReactNode;
|
|
6
45
|
}
|
|
7
|
-
export declare function Heading({ level, variant, className, children, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function Heading({ level, variant, color, className, children, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
8
47
|
interface TextProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
9
48
|
variant?: "primary" | "secondary" | "muted" | "error" | "success" | "none";
|
|
49
|
+
color?: ColorVariant;
|
|
10
50
|
size?: "xs" | "sm" | "base" | "lg" | "xl";
|
|
11
51
|
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
12
52
|
/** Override the rendered element. Defaults to `p`. */
|
|
13
53
|
as?: React.ElementType;
|
|
14
54
|
children: React.ReactNode;
|
|
15
55
|
}
|
|
16
|
-
export declare function Text({ variant, size, weight, className, as: Tag, children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function Text({ variant, color, size, weight, className, as: Tag, children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
17
57
|
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
18
58
|
required?: boolean;
|
|
19
59
|
children: React.ReactNode;
|
|
@@ -42,9 +82,10 @@ export declare function Caption({ variant, className, children, ...props }: Capt
|
|
|
42
82
|
interface SpanProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
43
83
|
/** Colour variant. "inherit" (default) applies no colour class. */
|
|
44
84
|
variant?: "inherit" | "primary" | "secondary" | "muted" | "error" | "success" | "accent";
|
|
85
|
+
color?: ColorVariant;
|
|
45
86
|
size?: "xs" | "sm" | "base" | "lg" | "xl";
|
|
46
87
|
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
47
88
|
children?: React.ReactNode;
|
|
48
89
|
}
|
|
49
|
-
export declare function Span({ variant, size, weight, className, children, ...props }: SpanProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
export declare function Span({ variant, color, size, weight, className, children, ...props }: SpanProps): import("react/jsx-runtime").JSX.Element;
|
|
50
91
|
export {};
|
|
@@ -25,30 +25,36 @@ const TYPOGRAPHY = {
|
|
|
25
25
|
primary: "appkit-color--primary",
|
|
26
26
|
secondary: "appkit-color--secondary",
|
|
27
27
|
muted: "appkit-color--muted",
|
|
28
|
+
faint: "appkit-color--faint",
|
|
28
29
|
error: "appkit-color--error",
|
|
30
|
+
danger: "appkit-color--error",
|
|
29
31
|
success: "appkit-color--success",
|
|
32
|
+
warning: "appkit-color--warning",
|
|
33
|
+
info: "appkit-color--info",
|
|
30
34
|
none: "",
|
|
31
35
|
inherit: "",
|
|
32
36
|
accent: "appkit-color--accent",
|
|
33
37
|
},
|
|
34
38
|
};
|
|
35
|
-
export function Heading({ level = 1, variant = "primary", className = "", children, ...props }) {
|
|
39
|
+
export function Heading({ level = 1, variant = "primary", color, className = "", children, ...props }) {
|
|
36
40
|
const Tag = `h${level}`;
|
|
41
|
+
const resolvedColor = color ?? variant;
|
|
37
42
|
return (_jsx(Tag, { className: [
|
|
38
43
|
"appkit-heading",
|
|
39
44
|
TYPOGRAPHY.headingLevel[level],
|
|
40
|
-
TYPOGRAPHY.colorVariant[
|
|
45
|
+
TYPOGRAPHY.colorVariant[resolvedColor],
|
|
41
46
|
className,
|
|
42
47
|
]
|
|
43
48
|
.filter(Boolean)
|
|
44
49
|
.join(" "), ...props, children: children }));
|
|
45
50
|
}
|
|
46
|
-
export function Text({ variant = "primary", size = "base", weight = "normal", className = "", as: Tag = "p", children, ...props }) {
|
|
51
|
+
export function Text({ variant = "primary", color, size = "base", weight = "normal", className = "", as: Tag = "p", children, ...props }) {
|
|
52
|
+
const resolvedColor = color ?? variant;
|
|
47
53
|
return (_jsx(Tag, { className: [
|
|
48
54
|
"appkit-text",
|
|
49
55
|
TYPOGRAPHY.textSize[size],
|
|
50
56
|
TYPOGRAPHY.textWeight[weight],
|
|
51
|
-
TYPOGRAPHY.colorVariant[
|
|
57
|
+
TYPOGRAPHY.colorVariant[resolvedColor],
|
|
52
58
|
className,
|
|
53
59
|
]
|
|
54
60
|
.filter(Boolean)
|
|
@@ -67,34 +73,13 @@ export function Caption({ variant = "default", className = "", children, ...prop
|
|
|
67
73
|
.filter(Boolean)
|
|
68
74
|
.join(" "), ...props, children: children }));
|
|
69
75
|
}
|
|
70
|
-
export function Span({ variant = "inherit", size, weight, className = "", children, ...props }) {
|
|
71
|
-
const
|
|
72
|
-
inherit: "",
|
|
73
|
-
primary: "appkit-color--primary",
|
|
74
|
-
secondary: "appkit-color--secondary",
|
|
75
|
-
muted: "appkit-color--muted",
|
|
76
|
-
error: "appkit-color--error",
|
|
77
|
-
success: "appkit-color--success",
|
|
78
|
-
accent: "appkit-color--accent",
|
|
79
|
-
};
|
|
80
|
-
const sizeClasses = {
|
|
81
|
-
xs: "appkit-text--xs",
|
|
82
|
-
sm: "appkit-text--sm",
|
|
83
|
-
base: "appkit-text--base",
|
|
84
|
-
lg: "appkit-text--lg",
|
|
85
|
-
xl: "appkit-text--xl",
|
|
86
|
-
};
|
|
87
|
-
const weightClasses = {
|
|
88
|
-
normal: "appkit-font--normal",
|
|
89
|
-
medium: "appkit-font--medium",
|
|
90
|
-
semibold: "appkit-font--semibold",
|
|
91
|
-
bold: "appkit-font--bold",
|
|
92
|
-
};
|
|
76
|
+
export function Span({ variant = "inherit", color, size, weight, className = "", children, ...props }) {
|
|
77
|
+
const resolvedColor = color ?? variant;
|
|
93
78
|
const classes = [
|
|
94
79
|
"appkit-span",
|
|
95
|
-
size ?
|
|
96
|
-
weight ?
|
|
97
|
-
|
|
80
|
+
size ? TYPOGRAPHY.textSize[size] : "",
|
|
81
|
+
weight ? TYPOGRAPHY.textWeight[weight] : "",
|
|
82
|
+
TYPOGRAPHY.colorVariant[resolvedColor],
|
|
98
83
|
className,
|
|
99
84
|
]
|
|
100
85
|
.filter(Boolean)
|
|
@@ -107,6 +107,18 @@
|
|
|
107
107
|
color: var(--appkit-color-secondary);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
.appkit-color--faint {
|
|
111
|
+
color: var(--appkit-color-zinc-400);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.appkit-color--warning {
|
|
115
|
+
color: var(--appkit-color-warning, #d97706);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.appkit-color--info {
|
|
119
|
+
color: var(--appkit-color-info, #0284c7);
|
|
120
|
+
}
|
|
121
|
+
|
|
110
122
|
.dark .appkit-color--primary {
|
|
111
123
|
color: var(--appkit-color-text);
|
|
112
124
|
}
|
|
@@ -131,6 +143,18 @@
|
|
|
131
143
|
color: var(--appkit-color-primary-400);
|
|
132
144
|
}
|
|
133
145
|
|
|
146
|
+
.dark .appkit-color--faint {
|
|
147
|
+
color: var(--appkit-color-zinc-600);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dark .appkit-color--warning {
|
|
151
|
+
color: var(--appkit-color-warning, #fbbf24);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.dark .appkit-color--info {
|
|
155
|
+
color: var(--appkit-color-info, #38bdf8);
|
|
156
|
+
}
|
|
157
|
+
|
|
134
158
|
.appkit-label {
|
|
135
159
|
display: block;
|
|
136
160
|
margin-bottom: 0.375rem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Alert } from "./Alert";
|
|
4
|
+
import { Span } from "./Typography";
|
|
4
5
|
/**
|
|
5
6
|
* S-STORE-6-A — Vacation-mode banner shown on product detail + checkout
|
|
6
7
|
* pages when the seller has paused new orders.
|
|
@@ -12,5 +13,5 @@ export function VacationBanner({ storeName, message, returnDate, className, }) {
|
|
|
12
13
|
month: "short",
|
|
13
14
|
day: "numeric",
|
|
14
15
|
});
|
|
15
|
-
return (_jsx(Alert, { variant: "warning", className: className, children: _jsxs("div", { className: "text-sm", children: [_jsx("
|
|
16
|
+
return (_jsx(Alert, { variant: "warning", className: className, children: _jsxs("div", { className: "text-sm", children: [_jsx(Span, { weight: "bold", children: storeName ? `${storeName} is on vacation` : "Store is on vacation" }), message ? _jsxs("span", { children: [" \u2014 ", message] }) : null, formattedDate ? _jsxs("span", { children: [" Returns ", formattedDate, "."] }) : null, _jsx("div", { className: "text-xs opacity-80 mt-1", children: "New orders are paused; you can still wishlist items." })] }) }));
|
|
16
17
|
}
|