@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
package/dist/tokens/index.d.ts
CHANGED
|
@@ -366,7 +366,7 @@ export declare const THEME_CONSTANTS: {
|
|
|
366
366
|
readonly bgInput: "bg-white dark:bg-slate-800/60";
|
|
367
367
|
readonly textPrimary: "text-zinc-900 dark:text-zinc-50";
|
|
368
368
|
readonly textSecondary: "text-zinc-500 dark:text-zinc-400";
|
|
369
|
-
readonly textMuted: "text-zinc-400 dark:text-zinc-
|
|
369
|
+
readonly textMuted: "text-zinc-400 dark:text-zinc-400";
|
|
370
370
|
readonly textError: "text-red-600 dark:text-red-400";
|
|
371
371
|
readonly textSuccess: "text-emerald-600 dark:text-emerald-400";
|
|
372
372
|
readonly textOnPrimary: "text-white";
|
|
@@ -585,7 +585,7 @@ export declare const THEME_CONSTANTS: {
|
|
|
585
585
|
readonly base: "rounded-lg border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-3.5 py-2.5 text-base sm:text-sm text-zinc-900 dark:text-zinc-100 focus:ring-2 focus:ring-primary-500/40 dark:focus:ring-secondary-400/40 focus:border-primary-500 dark:focus:border-secondary-400 focus:outline-none transition-colors duration-150 placeholder:text-zinc-400 dark:placeholder:text-zinc-500";
|
|
586
586
|
readonly error: "border-red-400 dark:border-red-500 focus:ring-red-500/20 focus:border-red-500 bg-red-50/30 dark:bg-red-950/10";
|
|
587
587
|
readonly success: "border-emerald-400 dark:border-emerald-500 focus:ring-emerald-500/20 focus:border-emerald-500";
|
|
588
|
-
readonly disabled: "bg-zinc-50 dark:bg-slate-800/30 text-zinc-400 dark:text-zinc-
|
|
588
|
+
readonly disabled: "bg-zinc-50 dark:bg-slate-800/30 text-zinc-400 dark:text-zinc-400 cursor-not-allowed opacity-60";
|
|
589
589
|
readonly withIcon: "pl-10";
|
|
590
590
|
};
|
|
591
591
|
readonly card: {
|
|
@@ -778,7 +778,7 @@ export declare const THEME_CONSTANTS: {
|
|
|
778
778
|
readonly emptyState: "flex flex-col items-center justify-center py-12 text-center text-zinc-500 dark:text-zinc-400";
|
|
779
779
|
};
|
|
780
780
|
readonly icon: {
|
|
781
|
-
readonly muted: "text-zinc-400 dark:text-zinc-
|
|
781
|
+
readonly muted: "text-zinc-400 dark:text-zinc-400";
|
|
782
782
|
readonly primary: "text-primary-600 dark:text-secondary-400";
|
|
783
783
|
readonly success: "text-emerald-500 dark:text-emerald-400";
|
|
784
784
|
readonly danger: "text-red-500 dark:text-red-400";
|
package/dist/tokens/index.js
CHANGED
|
@@ -203,7 +203,7 @@ const THEMED = {
|
|
|
203
203
|
// Text
|
|
204
204
|
textPrimary: "text-zinc-900 dark:text-zinc-50",
|
|
205
205
|
textSecondary: "text-zinc-500 dark:text-zinc-400",
|
|
206
|
-
textMuted: "text-zinc-400 dark:text-zinc-
|
|
206
|
+
textMuted: "text-zinc-400 dark:text-zinc-400",
|
|
207
207
|
textError: "text-red-600 dark:text-red-400",
|
|
208
208
|
textSuccess: "text-emerald-600 dark:text-emerald-400",
|
|
209
209
|
textOnPrimary: "text-white",
|
|
@@ -488,7 +488,7 @@ const INPUT = {
|
|
|
488
488
|
base: "rounded-lg border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-3.5 py-2.5 text-base sm:text-sm text-zinc-900 dark:text-zinc-100 focus:ring-2 focus:ring-primary-500/40 dark:focus:ring-secondary-400/40 focus:border-primary-500 dark:focus:border-secondary-400 focus:outline-none transition-colors duration-150 placeholder:text-zinc-400 dark:placeholder:text-zinc-500",
|
|
489
489
|
error: "border-red-400 dark:border-red-500 focus:ring-red-500/20 focus:border-red-500 bg-red-50/30 dark:bg-red-950/10",
|
|
490
490
|
success: "border-emerald-400 dark:border-emerald-500 focus:ring-emerald-500/20 focus:border-emerald-500",
|
|
491
|
-
disabled: "bg-zinc-50 dark:bg-slate-800/30 text-zinc-400 dark:text-zinc-
|
|
491
|
+
disabled: "bg-zinc-50 dark:bg-slate-800/30 text-zinc-400 dark:text-zinc-400 cursor-not-allowed opacity-60",
|
|
492
492
|
withIcon: "pl-10",
|
|
493
493
|
};
|
|
494
494
|
/**
|
|
@@ -674,7 +674,7 @@ const PATTERNS = {
|
|
|
674
674
|
};
|
|
675
675
|
/** Icon colour variants and sizes. */
|
|
676
676
|
const ICON = {
|
|
677
|
-
muted: "text-zinc-400 dark:text-zinc-
|
|
677
|
+
muted: "text-zinc-400 dark:text-zinc-400",
|
|
678
678
|
primary: "text-primary-600 dark:text-secondary-400",
|
|
679
679
|
success: "text-emerald-500 dark:text-emerald-400",
|
|
680
680
|
danger: "text-red-500 dark:text-red-400",
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion presets — reusable animation configs for motion/react components.
|
|
3
|
+
*
|
|
4
|
+
* All presets respect `prefers-reduced-motion` via the `useReducedMotion` hook
|
|
5
|
+
* in the consuming component wrappers (Motion.tsx).
|
|
6
|
+
*/
|
|
7
|
+
import type { Transition } from "motion/react";
|
|
8
|
+
export declare const SPRING_SNAPPY: Transition;
|
|
9
|
+
export declare const SPRING_GENTLE: Transition;
|
|
10
|
+
export declare const EASE_OUT: Transition;
|
|
11
|
+
export declare const MOTION_PRESETS: {
|
|
12
|
+
readonly fadeIn: {
|
|
13
|
+
readonly initial: {
|
|
14
|
+
readonly opacity: 0;
|
|
15
|
+
};
|
|
16
|
+
readonly animate: {
|
|
17
|
+
readonly opacity: 1;
|
|
18
|
+
};
|
|
19
|
+
readonly exit: {
|
|
20
|
+
readonly opacity: 0;
|
|
21
|
+
};
|
|
22
|
+
readonly transition: {
|
|
23
|
+
readonly duration: 0.2;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly fadeInUp: {
|
|
27
|
+
readonly initial: {
|
|
28
|
+
readonly opacity: 0;
|
|
29
|
+
readonly y: 16;
|
|
30
|
+
};
|
|
31
|
+
readonly animate: {
|
|
32
|
+
readonly opacity: 1;
|
|
33
|
+
readonly y: 0;
|
|
34
|
+
};
|
|
35
|
+
readonly exit: {
|
|
36
|
+
readonly opacity: 0;
|
|
37
|
+
readonly y: 16;
|
|
38
|
+
};
|
|
39
|
+
readonly transition: Transition;
|
|
40
|
+
};
|
|
41
|
+
readonly fadeInDown: {
|
|
42
|
+
readonly initial: {
|
|
43
|
+
readonly opacity: 0;
|
|
44
|
+
readonly y: -16;
|
|
45
|
+
};
|
|
46
|
+
readonly animate: {
|
|
47
|
+
readonly opacity: 1;
|
|
48
|
+
readonly y: 0;
|
|
49
|
+
};
|
|
50
|
+
readonly exit: {
|
|
51
|
+
readonly opacity: 0;
|
|
52
|
+
readonly y: -16;
|
|
53
|
+
};
|
|
54
|
+
readonly transition: Transition;
|
|
55
|
+
};
|
|
56
|
+
readonly slideUp: {
|
|
57
|
+
readonly initial: {
|
|
58
|
+
readonly opacity: 0;
|
|
59
|
+
readonly y: 20;
|
|
60
|
+
};
|
|
61
|
+
readonly animate: {
|
|
62
|
+
readonly opacity: 1;
|
|
63
|
+
readonly y: 0;
|
|
64
|
+
};
|
|
65
|
+
readonly exit: {
|
|
66
|
+
readonly opacity: 0;
|
|
67
|
+
readonly y: 20;
|
|
68
|
+
};
|
|
69
|
+
readonly transition: Transition;
|
|
70
|
+
};
|
|
71
|
+
readonly slideDown: {
|
|
72
|
+
readonly initial: {
|
|
73
|
+
readonly opacity: 0;
|
|
74
|
+
readonly y: -20;
|
|
75
|
+
};
|
|
76
|
+
readonly animate: {
|
|
77
|
+
readonly opacity: 1;
|
|
78
|
+
readonly y: 0;
|
|
79
|
+
};
|
|
80
|
+
readonly exit: {
|
|
81
|
+
readonly opacity: 0;
|
|
82
|
+
readonly y: -20;
|
|
83
|
+
};
|
|
84
|
+
readonly transition: Transition;
|
|
85
|
+
};
|
|
86
|
+
readonly slideInLeft: {
|
|
87
|
+
readonly initial: {
|
|
88
|
+
readonly opacity: 0;
|
|
89
|
+
readonly x: -24;
|
|
90
|
+
};
|
|
91
|
+
readonly animate: {
|
|
92
|
+
readonly opacity: 1;
|
|
93
|
+
readonly x: 0;
|
|
94
|
+
};
|
|
95
|
+
readonly exit: {
|
|
96
|
+
readonly opacity: 0;
|
|
97
|
+
readonly x: -24;
|
|
98
|
+
};
|
|
99
|
+
readonly transition: Transition;
|
|
100
|
+
};
|
|
101
|
+
readonly slideInRight: {
|
|
102
|
+
readonly initial: {
|
|
103
|
+
readonly opacity: 0;
|
|
104
|
+
readonly x: 24;
|
|
105
|
+
};
|
|
106
|
+
readonly animate: {
|
|
107
|
+
readonly opacity: 1;
|
|
108
|
+
readonly x: 0;
|
|
109
|
+
};
|
|
110
|
+
readonly exit: {
|
|
111
|
+
readonly opacity: 0;
|
|
112
|
+
readonly x: 24;
|
|
113
|
+
};
|
|
114
|
+
readonly transition: Transition;
|
|
115
|
+
};
|
|
116
|
+
readonly scaleIn: {
|
|
117
|
+
readonly initial: {
|
|
118
|
+
readonly opacity: 0;
|
|
119
|
+
readonly scale: 0.95;
|
|
120
|
+
};
|
|
121
|
+
readonly animate: {
|
|
122
|
+
readonly opacity: 1;
|
|
123
|
+
readonly scale: 1;
|
|
124
|
+
};
|
|
125
|
+
readonly exit: {
|
|
126
|
+
readonly opacity: 0;
|
|
127
|
+
readonly scale: 0.95;
|
|
128
|
+
};
|
|
129
|
+
readonly transition: Transition;
|
|
130
|
+
};
|
|
131
|
+
readonly pressScale: {
|
|
132
|
+
readonly whileTap: {
|
|
133
|
+
readonly scale: 0.97;
|
|
134
|
+
};
|
|
135
|
+
readonly transition: {
|
|
136
|
+
readonly duration: 0.1;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
readonly hoverLift: {
|
|
140
|
+
readonly whileHover: {
|
|
141
|
+
readonly y: -2;
|
|
142
|
+
};
|
|
143
|
+
readonly transition: Transition;
|
|
144
|
+
};
|
|
145
|
+
readonly hoverScale: {
|
|
146
|
+
readonly whileHover: {
|
|
147
|
+
readonly scale: 1.02;
|
|
148
|
+
};
|
|
149
|
+
readonly transition: Transition;
|
|
150
|
+
};
|
|
151
|
+
readonly stagger: {
|
|
152
|
+
readonly transition: {
|
|
153
|
+
readonly staggerChildren: 0.05;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
readonly staggerSlow: {
|
|
157
|
+
readonly transition: {
|
|
158
|
+
readonly staggerChildren: 0.1;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
export type MotionPreset = keyof typeof MOTION_PRESETS;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion presets — reusable animation configs for motion/react components.
|
|
3
|
+
*
|
|
4
|
+
* All presets respect `prefers-reduced-motion` via the `useReducedMotion` hook
|
|
5
|
+
* in the consuming component wrappers (Motion.tsx).
|
|
6
|
+
*/
|
|
7
|
+
export const SPRING_SNAPPY = {
|
|
8
|
+
type: "spring",
|
|
9
|
+
stiffness: 400,
|
|
10
|
+
damping: 30,
|
|
11
|
+
};
|
|
12
|
+
export const SPRING_GENTLE = {
|
|
13
|
+
type: "spring",
|
|
14
|
+
stiffness: 200,
|
|
15
|
+
damping: 25,
|
|
16
|
+
};
|
|
17
|
+
export const EASE_OUT = {
|
|
18
|
+
type: "tween",
|
|
19
|
+
ease: [0.25, 0.46, 0.45, 0.94],
|
|
20
|
+
duration: 0.3,
|
|
21
|
+
};
|
|
22
|
+
export const MOTION_PRESETS = {
|
|
23
|
+
fadeIn: {
|
|
24
|
+
initial: { opacity: 0 },
|
|
25
|
+
animate: { opacity: 1 },
|
|
26
|
+
exit: { opacity: 0 },
|
|
27
|
+
transition: { duration: 0.2 },
|
|
28
|
+
},
|
|
29
|
+
fadeInUp: {
|
|
30
|
+
initial: { opacity: 0, y: 16 },
|
|
31
|
+
animate: { opacity: 1, y: 0 },
|
|
32
|
+
exit: { opacity: 0, y: 16 },
|
|
33
|
+
transition: EASE_OUT,
|
|
34
|
+
},
|
|
35
|
+
fadeInDown: {
|
|
36
|
+
initial: { opacity: 0, y: -16 },
|
|
37
|
+
animate: { opacity: 1, y: 0 },
|
|
38
|
+
exit: { opacity: 0, y: -16 },
|
|
39
|
+
transition: EASE_OUT,
|
|
40
|
+
},
|
|
41
|
+
slideUp: {
|
|
42
|
+
initial: { opacity: 0, y: 20 },
|
|
43
|
+
animate: { opacity: 1, y: 0 },
|
|
44
|
+
exit: { opacity: 0, y: 20 },
|
|
45
|
+
transition: SPRING_SNAPPY,
|
|
46
|
+
},
|
|
47
|
+
slideDown: {
|
|
48
|
+
initial: { opacity: 0, y: -20 },
|
|
49
|
+
animate: { opacity: 1, y: 0 },
|
|
50
|
+
exit: { opacity: 0, y: -20 },
|
|
51
|
+
transition: SPRING_SNAPPY,
|
|
52
|
+
},
|
|
53
|
+
slideInLeft: {
|
|
54
|
+
initial: { opacity: 0, x: -24 },
|
|
55
|
+
animate: { opacity: 1, x: 0 },
|
|
56
|
+
exit: { opacity: 0, x: -24 },
|
|
57
|
+
transition: SPRING_SNAPPY,
|
|
58
|
+
},
|
|
59
|
+
slideInRight: {
|
|
60
|
+
initial: { opacity: 0, x: 24 },
|
|
61
|
+
animate: { opacity: 1, x: 0 },
|
|
62
|
+
exit: { opacity: 0, x: 24 },
|
|
63
|
+
transition: SPRING_SNAPPY,
|
|
64
|
+
},
|
|
65
|
+
scaleIn: {
|
|
66
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
67
|
+
animate: { opacity: 1, scale: 1 },
|
|
68
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
69
|
+
transition: SPRING_GENTLE,
|
|
70
|
+
},
|
|
71
|
+
pressScale: {
|
|
72
|
+
whileTap: { scale: 0.97 },
|
|
73
|
+
transition: { duration: 0.1 },
|
|
74
|
+
},
|
|
75
|
+
hoverLift: {
|
|
76
|
+
whileHover: { y: -2 },
|
|
77
|
+
transition: SPRING_SNAPPY,
|
|
78
|
+
},
|
|
79
|
+
hoverScale: {
|
|
80
|
+
whileHover: { scale: 1.02 },
|
|
81
|
+
transition: SPRING_SNAPPY,
|
|
82
|
+
},
|
|
83
|
+
stagger: {
|
|
84
|
+
transition: { staggerChildren: 0.05 },
|
|
85
|
+
},
|
|
86
|
+
staggerSlow: {
|
|
87
|
+
transition: { staggerChildren: 0.1 },
|
|
88
|
+
},
|
|
89
|
+
};
|
package/dist/ui/DataTable.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Button } from "./components/Button";
|
|
|
6
6
|
import { Spinner } from "./components/Spinner";
|
|
7
7
|
import { Pagination } from "./components/Pagination";
|
|
8
8
|
import { Text } from "./components/Typography";
|
|
9
|
+
import { AnimatedList } from "./components/Motion";
|
|
9
10
|
import { GRID_MAP } from "./components/Layout";
|
|
10
11
|
import { Row } from "./components/Layout";
|
|
11
12
|
import { mergeTableConfig, DEFAULT_PAGINATION_CONFIG } from "../contracts";
|
|
@@ -98,7 +99,7 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
|
|
|
98
99
|
if (data.length === 0) {
|
|
99
100
|
if (emptyState)
|
|
100
101
|
return _jsx(_Fragment, { children: emptyState });
|
|
101
|
-
return (_jsx("div", { className: "appkit-data-table__wrapper", "data-section": "datatable-div-632", children: _jsx("div", { className: "appkit-data-table__empty", "data-section": "datatable-div-633", children: _jsxs("div", { className: "text-center px-4", "data-section": "datatable-div-634", children: [emptyIcon ?? (_jsx("svg", { className: "mx-auto h-12 w-12 text-zinc-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) })), _jsx(Text, { size: "sm", weight: "semibold", className: "mt-4", children: emptyTitle ?? noDataTitle }), _jsx(Text, { size: "sm", variant: "secondary", className: "mt-1", children: emptyMessage ?? noDataDescription })] }) }) }));
|
|
102
|
+
return (_jsx("div", { className: "appkit-data-table__wrapper", "data-section": "datatable-div-632", children: _jsx("div", { className: "appkit-data-table__empty", "data-section": "datatable-div-633", children: _jsxs("div", { className: "text-center px-4", "data-section": "datatable-div-634", children: [emptyIcon ?? (_jsx("svg", { className: "mx-auto h-12 w-12 text-zinc-400 dark:text-zinc-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) })), _jsx(Text, { size: "sm", weight: "semibold", className: "mt-4", children: emptyTitle ?? noDataTitle }), _jsx(Text, { size: "sm", variant: "secondary", className: "mt-1", children: emptyMessage ?? noDataDescription })] }) }) }));
|
|
102
103
|
}
|
|
103
104
|
const renderViewToggle = () => {
|
|
104
105
|
if (!showViewToggle)
|
|
@@ -109,9 +110,9 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
|
|
|
109
110
|
const renderCardGrid = (mode) => {
|
|
110
111
|
if (!mobileCardRender)
|
|
111
112
|
return null;
|
|
112
|
-
return (_jsx(
|
|
113
|
+
return (_jsx(AnimatedList, { className: mode === "grid"
|
|
113
114
|
? `${GRID_MAP[gridCols]} gap-6`
|
|
114
|
-
: "flex flex-col gap-4", "data-section": "datatable-div-636", children: paginatedData.map((item) => (_jsx(SelectableCard, { id: keyExtractor(item), selectable: selectable, selected: selectedIds.includes(keyExtractor(item)), listMode: mode === "list", onToggle: (id, checked) => onSelectionChange?.(checked
|
|
115
|
+
: "flex flex-col gap-4", staggerDelay: 0.03, "data-section": "datatable-div-636", children: paginatedData.map((item) => (_jsx(SelectableCard, { id: keyExtractor(item), selectable: selectable, selected: selectedIds.includes(keyExtractor(item)), listMode: mode === "list", onToggle: (id, checked) => onSelectionChange?.(checked
|
|
115
116
|
? [...selectedIds, id]
|
|
116
117
|
: selectedIds.filter((s) => s !== id)), children: mobileCardRender(item) }, keyExtractor(item)))) }));
|
|
117
118
|
};
|
|
@@ -132,7 +133,7 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
|
|
|
132
133
|
? "ascending"
|
|
133
134
|
: "descending"
|
|
134
135
|
: "none"
|
|
135
|
-
: undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && handleSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx("span", { className: "text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? ("↑") : ("↓")) : (_jsx("span", { className: "opacity-30", children: "\u2195" })) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
|
|
136
|
+
: undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && handleSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx("span", { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? ("↑") : ("↓")) : (_jsx("span", { className: "opacity-30", children: "\u2195" })) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
|
|
136
137
|
"appkit-data-table__row",
|
|
137
138
|
striped && index % 2 === 1
|
|
138
139
|
? "appkit-data-table__row--striped"
|
|
@@ -157,7 +158,7 @@ function DataTableTableView({ columns, paginatedData, keyExtractor, selectable,
|
|
|
157
158
|
? sortKey === col.key
|
|
158
159
|
? sortDirection === "asc" ? "ascending" : "descending"
|
|
159
160
|
: "none"
|
|
160
|
-
: undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && onSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx("span", { className: "text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? "↑" : "↓") : _jsx("span", { className: "opacity-30", children: "\u2195" }) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
|
|
161
|
+
: undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && onSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx("span", { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? "↑" : "↓") : _jsx("span", { className: "opacity-30", children: "\u2195" }) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
|
|
161
162
|
"appkit-data-table__row",
|
|
162
163
|
striped && index % 2 === 1 ? "appkit-data-table__row--striped" : "",
|
|
163
164
|
onRowClick ? "appkit-data-table__row--clickable" : "",
|
|
@@ -4,6 +4,7 @@ import { createContext, useContext, useMemo, useState } from "react";
|
|
|
4
4
|
import { Button } from "./Button";
|
|
5
5
|
import { Div } from "./Div";
|
|
6
6
|
import { Span } from "./Typography";
|
|
7
|
+
import { Collapse } from "./Motion";
|
|
7
8
|
const AccordionContext = createContext(null);
|
|
8
9
|
function toArray(value) {
|
|
9
10
|
if (!value)
|
|
@@ -53,5 +54,5 @@ export function AccordionItem({ value, title, disabled = false, className = "",
|
|
|
53
54
|
throw new Error("AccordionItem must be used within Accordion.");
|
|
54
55
|
}
|
|
55
56
|
const isOpen = ctx.openValues.includes(value);
|
|
56
|
-
return (_jsxs(Div, { className: `appkit-accordion__item ${className}`, children: [_jsxs(Button, { type: "button", disabled: disabled, "aria-expanded": isOpen, onClick: () => ctx.toggle(value), className: "appkit-accordion__trigger", children: [_jsx(Span, { children: title }), _jsx(Span, { className: `appkit-accordion__item-chevron ${isOpen ? "appkit-accordion__item-chevron--open" : ""}`, children: "\u25BE" })] }), isOpen
|
|
57
|
+
return (_jsxs(Div, { className: `appkit-accordion__item ${className}`, children: [_jsxs(Button, { type: "button", disabled: disabled, "aria-expanded": isOpen, onClick: () => ctx.toggle(value), className: "appkit-accordion__trigger", children: [_jsx(Span, { children: title }), _jsx(Span, { className: `appkit-accordion__item-chevron ${isOpen ? "appkit-accordion__item-chevron--open" : ""}`, children: "\u25BE" })] }), _jsx(Collapse, { isOpen: isOpen, children: _jsx(Div, { className: "appkit-accordion__panel", children: children }) })] }));
|
|
57
58
|
}
|
|
@@ -107,6 +107,13 @@
|
|
|
107
107
|
background: var(--appkit-color-secondary-400);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/* Cascade fill foreground to all non-appkit-component children inside filled
|
|
111
|
+
variants. :not([class*="appkit-"]) preserves Badge / Checkbox / Toggle
|
|
112
|
+
internal styling. Specificity (0,3,0) beats Tailwind text-* (0,1,0). */
|
|
113
|
+
.appkit-button.appkit-button--primary :not([class*="appkit-"]) {
|
|
114
|
+
color: inherit;
|
|
115
|
+
}
|
|
116
|
+
|
|
110
117
|
.appkit-button.appkit-button--secondary {
|
|
111
118
|
background: var(--appkit-color-surface);
|
|
112
119
|
border-color: var(--appkit-color-primary-700);
|
|
@@ -173,6 +180,10 @@
|
|
|
173
180
|
background: var(--appkit-color-error-hover);
|
|
174
181
|
}
|
|
175
182
|
|
|
183
|
+
.appkit-button.appkit-button--danger :not([class*="appkit-"]) {
|
|
184
|
+
color: inherit;
|
|
185
|
+
}
|
|
186
|
+
|
|
176
187
|
.appkit-button.appkit-button--warning {
|
|
177
188
|
background: var(--appkit-color-warning);
|
|
178
189
|
color: var(--appkit-color-text-on-primary);
|
|
@@ -182,6 +193,10 @@
|
|
|
182
193
|
background: var(--appkit-color-amber-400);
|
|
183
194
|
}
|
|
184
195
|
|
|
196
|
+
.appkit-button.appkit-button--warning :not([class*="appkit-"]) {
|
|
197
|
+
color: inherit;
|
|
198
|
+
}
|
|
199
|
+
|
|
185
200
|
.appkit-button__spinner {
|
|
186
201
|
width: 1rem;
|
|
187
202
|
height: 1rem;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { SurfaceProps } from "./surface-tokens";
|
|
3
|
+
type CardAnimate = "hoverLift" | "pressScale" | "hoverScale" | "both";
|
|
2
4
|
type CardVariant = "flat" | "outlined" | "elevated" | "default" | "primary" | "bordered" | "interactive" | "glass" | "gradient-indigo" | "gradient-teal" | "gradient-amber" | "gradient-rose" | "stat-indigo" | "stat-teal" | "stat-amber" | "stat-rose" | "stat-emerald";
|
|
3
5
|
type CardPadding = "none" | "sm" | "md" | "lg";
|
|
4
|
-
export interface CardProps {
|
|
6
|
+
export interface CardProps extends SurfaceProps {
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
variant?: CardVariant;
|
|
7
9
|
padding?: CardPadding;
|
|
8
10
|
hover?: boolean;
|
|
11
|
+
animate?: CardAnimate;
|
|
9
12
|
className?: string;
|
|
10
13
|
style?: React.CSSProperties;
|
|
11
14
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
12
15
|
}
|
|
13
|
-
export declare function Card({ children, variant, padding, hover, className, style, onClick, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Card({ children, variant, padding, hover, animate, surface, rounded, border, shadow, className, style, onClick, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
17
|
export interface CardSectionProps {
|
|
15
18
|
children: React.ReactNode;
|
|
16
19
|
className?: string;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useReducedMotion } from "motion/react";
|
|
4
|
+
import { buildSurfaceClasses } from "./surface-tokens";
|
|
5
|
+
import { SPRING_SNAPPY } from "../../tokens/motion";
|
|
2
6
|
const UI_CARD = {
|
|
3
7
|
base: "appkit-card",
|
|
4
8
|
variants: {
|
|
@@ -27,17 +31,31 @@ const UI_CARD = {
|
|
|
27
31
|
lg: "appkit-card--pad-lg",
|
|
28
32
|
},
|
|
29
33
|
};
|
|
30
|
-
export function Card({ children, variant = "flat", padding = "md", hover = false, className = "", style, onClick, }) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
export function Card({ children, variant = "flat", padding = "md", hover = false, animate, surface, rounded, border, shadow, className = "", style, onClick, }) {
|
|
35
|
+
const reduced = useReducedMotion();
|
|
36
|
+
const cls = [
|
|
37
|
+
UI_CARD.base,
|
|
38
|
+
UI_CARD.variants[variant],
|
|
39
|
+
UI_CARD.padding[padding],
|
|
40
|
+
hover ? "appkit-card--hoverable" : "",
|
|
41
|
+
onClick ? "appkit-card--clickable" : "",
|
|
42
|
+
buildSurfaceClasses({ surface, rounded, border, shadow }),
|
|
43
|
+
className,
|
|
44
|
+
]
|
|
45
|
+
.filter(Boolean)
|
|
46
|
+
.join(" ");
|
|
47
|
+
if (animate && !reduced) {
|
|
48
|
+
const whileHover = animate === "hoverLift" || animate === "both"
|
|
49
|
+
? { y: -2 }
|
|
50
|
+
: animate === "hoverScale"
|
|
51
|
+
? { scale: 1.02 }
|
|
52
|
+
: undefined;
|
|
53
|
+
const whileTap = animate === "pressScale" || animate === "both"
|
|
54
|
+
? { scale: 0.97 }
|
|
55
|
+
: undefined;
|
|
56
|
+
return (_jsx(motion.div, { className: cls, style: style, onClick: onClick, whileHover: whileHover, whileTap: whileTap, transition: SPRING_SNAPPY, "data-section": "card-div-463", children: children }));
|
|
57
|
+
}
|
|
58
|
+
return (_jsx("div", { className: cls, style: style, onClick: onClick, "data-section": "card-div-463", children: children }));
|
|
41
59
|
}
|
|
42
60
|
export function CardHeader({ children, className = "" }) {
|
|
43
61
|
return (_jsx("div", { className: ["appkit-card__header", className].filter(Boolean).join(" "), "data-section": "card-div-464", children: children }));
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import type { SurfaceProps } from "./surface-tokens";
|
|
3
|
+
export interface DivProps extends React.HTMLAttributes<HTMLDivElement>, SurfaceProps {
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
}
|
|
5
|
-
/**
|
|
6
|
-
* Semantic `<div data-section="div-div-477">` wrapper for general-purpose layout containers.
|
|
7
|
-
*
|
|
8
|
-
* Use when no more specific semantic element applies
|
|
9
|
-
* (`<Section>`, `<Article>`, `<Main>`, `<Aside>` etc). Enables
|
|
10
|
-
* future one-place theming and consistent import from `@mohasinac/appkit/ui`.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* <Div className="flex items-center gap-4">
|
|
15
|
-
* <Badge>New</Badge>
|
|
16
|
-
* <Text>Product title</Text>
|
|
17
|
-
* </Div>
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
6
|
export declare const Div: React.ForwardRefExoticComponent<DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* Use when no more specific semantic element applies
|
|
7
|
-
* (`<Section>`, `<Article>`, `<Main>`, `<Aside>` etc). Enables
|
|
8
|
-
* future one-place theming and consistent import from `@mohasinac/appkit/ui`.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <Div className="flex items-center gap-4">
|
|
13
|
-
* <Badge>New</Badge>
|
|
14
|
-
* <Text>Product title</Text>
|
|
15
|
-
* </Div>
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export const Div = React.forwardRef(({ className = "", children, ...props }, ref) => (_jsx("div", { ref: ref, className: className, ...props, "data-section": "div-div-478", children: children })));
|
|
3
|
+
import { buildSurfaceClasses } from "./surface-tokens";
|
|
4
|
+
export const Div = React.forwardRef(({ className = "", surface, padding, rounded, border, shadow, children, ...props }, ref) => (_jsx("div", { ref: ref, className: [buildSurfaceClasses({ surface, padding, rounded, border, shadow }), className].filter(Boolean).join(" "), ...props, children: children })));
|
|
19
5
|
Div.displayName = "Div";
|
|
@@ -24,6 +24,6 @@ export const Input = React.forwardRef(function Input({ label, error, helperText,
|
|
|
24
24
|
}
|
|
25
25
|
const adornment = rightIcon ??
|
|
26
26
|
(success && !error ? (_jsx("svg", { className: "h-4 w-4 text-green-600 dark:text-green-400", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { fillRule: "evenodd", d: "M16.704 5.29a1 1 0 010 1.42l-7.2 7.2a1 1 0 01-1.415 0l-3.2-3.2a1 1 0 111.414-1.42l2.493 2.494 6.493-6.494a1 1 0 011.415 0z", clipRule: "evenodd" }) })) : null);
|
|
27
|
-
return (_jsxs("div", { className: "w-full", "data-section": "input-div-527", children: [label && (_jsx(Label, { htmlFor: inputId, required: required, children: label })), _jsxs("div", { className: "relative", "data-section": "input-div-528", children: [icon && (_jsx("div", { className: "pointer-events-none absolute inset-y-0 left-3 flex items-center text-zinc-400 dark:text-zinc-
|
|
27
|
+
return (_jsxs("div", { className: "w-full", "data-section": "input-div-527", children: [label && (_jsx(Label, { htmlFor: inputId, required: required, children: label })), _jsxs("div", { className: "relative", "data-section": "input-div-528", children: [icon && (_jsx("div", { className: "pointer-events-none absolute inset-y-0 left-3 flex items-center text-zinc-400 dark:text-zinc-400", "data-section": "input-div-529", children: icon })), _jsx("input", { ...props, ref: ref, id: inputId, disabled: disabled, "aria-invalid": error ? "true" : undefined, className: inputClassName }), adornment && (_jsx("div", { className: "pointer-events-none absolute inset-y-0 right-3 flex items-center text-zinc-400 dark:text-zinc-400", "data-section": "input-div-530", children: adornment }))] }), error ? (_jsx(Text, { size: "sm", variant: "error", className: "mt-1.5", role: "alert", children: error })) : helperText ? (_jsx(Text, { size: "sm", variant: "secondary", className: "mt-1.5", children: helperText })) : null] }));
|
|
28
28
|
});
|
|
29
29
|
Input.displayName = "Input";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { SurfaceProps } from "./surface-tokens";
|
|
2
3
|
/**
|
|
3
4
|
* Layout Primitives — Container, Stack, Row, Grid
|
|
4
5
|
*
|
|
@@ -167,24 +168,13 @@ type JustifyContent = keyof typeof JUSTIFY_MAP;
|
|
|
167
168
|
* <Container size="full" as="main">...</Container>
|
|
168
169
|
* ```
|
|
169
170
|
*/
|
|
170
|
-
export interface ContainerProps extends React.HTMLAttributes<HTMLElement
|
|
171
|
-
/**
|
|
172
|
-
* Max-width breakpoint preset.
|
|
173
|
-
* - `sm` → `max-w-3xl` (blog / policy)
|
|
174
|
-
* - `md` → `max-w-4xl` (contact / about)
|
|
175
|
-
* - `lg` → `max-w-5xl` (checkout / help)
|
|
176
|
-
* - `xl` → `max-w-6xl` (product detail / cart)
|
|
177
|
-
* - `2xl` → `max-w-7xl` (main content grids — **default**)
|
|
178
|
-
* - `full` → `max-w-screen-2xl` (full-bleed)
|
|
179
|
-
* - `wide` → `max-w-screen-2xl` (compact px, no lg step)
|
|
180
|
-
* - `ultra` → `max-w-[1920px]` (ultra-wide / 4K displays)
|
|
181
|
-
*/
|
|
171
|
+
export interface ContainerProps extends React.HTMLAttributes<HTMLElement>, SurfaceProps {
|
|
182
172
|
size?: ContainerSize;
|
|
183
173
|
/** Render as a different element (e.g. `"main"`, `"section"`). Defaults to `"div"`. */
|
|
184
174
|
as?: React.ElementType;
|
|
185
175
|
children?: React.ReactNode;
|
|
186
176
|
}
|
|
187
|
-
export declare function Container({ size, as, className, children, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
177
|
+
export declare function Container({ size, as, surface, padding, rounded, border, shadow, className, children, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
188
178
|
/**
|
|
189
179
|
* Vertical flex column. Use instead of `<div className="flex flex-col gap-4" data-section="layout-div-535">`.
|
|
190
180
|
*
|
|
@@ -201,7 +191,7 @@ export declare function Container({ size, as, className, children, ...props }: C
|
|
|
201
191
|
* </Stack>
|
|
202
192
|
* ```
|
|
203
193
|
*/
|
|
204
|
-
export interface StackProps extends React.HTMLAttributes<HTMLElement
|
|
194
|
+
export interface StackProps extends React.HTMLAttributes<HTMLElement>, SurfaceProps {
|
|
205
195
|
/** Space between children. Defaults to `"md"` (`gap-4`). */
|
|
206
196
|
gap?: GapKey;
|
|
207
197
|
/** Centers children on both axes (`items-center justify-center`). */
|
|
@@ -212,7 +202,7 @@ export interface StackProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
212
202
|
as?: React.ElementType;
|
|
213
203
|
children?: React.ReactNode;
|
|
214
204
|
}
|
|
215
|
-
export declare function Stack({ gap, centered, align, as, className, children, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
205
|
+
export declare function Stack({ gap, centered, align, as, surface, padding, rounded, border, shadow, className, children, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
216
206
|
/**
|
|
217
207
|
* Horizontal flex row. Use instead of `<div className="flex items-center gap-3" data-section="layout-div-536">`.
|
|
218
208
|
*
|
|
@@ -229,7 +219,7 @@ export declare function Stack({ gap, centered, align, as, className, children, .
|
|
|
229
219
|
* </Row>
|
|
230
220
|
* ```
|
|
231
221
|
*/
|
|
232
|
-
export interface RowProps extends React.HTMLAttributes<HTMLElement
|
|
222
|
+
export interface RowProps extends React.HTMLAttributes<HTMLElement>, SurfaceProps {
|
|
233
223
|
/** Space between children. Defaults to `"md"` (`gap-4`). */
|
|
234
224
|
gap?: GapKey;
|
|
235
225
|
/** Centers children on both axes (`items-center justify-center`). */
|
|
@@ -244,7 +234,7 @@ export interface RowProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
244
234
|
as?: React.ElementType;
|
|
245
235
|
children?: React.ReactNode;
|
|
246
236
|
}
|
|
247
|
-
export declare function Row({ gap, centered, align, justify, wrap, as, className, children, ...props }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
237
|
+
export declare function Row({ gap, centered, align, justify, wrap, as, surface, padding, rounded, border, shadow, className, children, ...props }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
248
238
|
/**
|
|
249
239
|
* Responsive CSS grid. Use instead of `<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" data-section="layout-div-537">`.
|
|
250
240
|
*
|
|
@@ -261,7 +251,7 @@ export declare function Row({ gap, centered, align, justify, wrap, as, className
|
|
|
261
251
|
* </Grid>
|
|
262
252
|
* ```
|
|
263
253
|
*/
|
|
264
|
-
export interface GridProps extends React.HTMLAttributes<HTMLElement
|
|
254
|
+
export interface GridProps extends React.HTMLAttributes<HTMLElement>, SurfaceProps {
|
|
265
255
|
/**
|
|
266
256
|
* Column preset.
|
|
267
257
|
* - Numbers `1`–`6` → mobile-first responsive stacks
|
|
@@ -280,5 +270,5 @@ export interface GridProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
280
270
|
as?: React.ElementType;
|
|
281
271
|
children?: React.ReactNode;
|
|
282
272
|
}
|
|
283
|
-
export declare function Grid({ cols, gap, as, className, children, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
273
|
+
export declare function Grid({ cols, gap, as, surface, padding, rounded, border, shadow, className, children, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
284
274
|
export {};
|