@mohasinac/appkit 2.1.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -30
- package/dist/index.d.ts +3124 -0
- package/dist/index.js +5836 -0
- package/package.json +67 -383
- package/src/cli/index.ts +0 -221
- package/src/contracts/auth.ts +0 -63
- package/src/contracts/config.ts +0 -58
- package/src/contracts/email.ts +0 -37
- package/src/contracts/extend.ts +0 -195
- package/src/contracts/feature.ts +0 -60
- package/src/contracts/index.ts +0 -122
- package/src/contracts/infra.ts +0 -50
- package/src/contracts/payment.ts +0 -50
- package/src/contracts/registry.ts +0 -44
- package/src/contracts/repository.ts +0 -87
- package/src/contracts/search.ts +0 -49
- package/src/contracts/shipping.ts +0 -77
- package/src/contracts/storage.ts +0 -37
- package/src/contracts/style.ts +0 -25
- package/src/contracts/table.ts +0 -148
- package/src/core/CacheManager.ts +0 -85
- package/src/core/EventBus.ts +0 -89
- package/src/core/Logger.ts +0 -209
- package/src/core/Queue.ts +0 -126
- package/src/core/StorageManager.ts +0 -167
- package/src/core/copilot-log.repository.ts +0 -106
- package/src/core/index.ts +0 -39
- package/src/core/newsletter.repository.ts +0 -193
- package/src/core/site-config.ts +0 -109
- package/src/errors/api-error.ts +0 -7
- package/src/errors/authentication-error.ts +0 -7
- package/src/errors/authorization-error.ts +0 -7
- package/src/errors/base-error.ts +0 -30
- package/src/errors/database-error.ts +0 -7
- package/src/errors/error-codes.ts +0 -106
- package/src/errors/error-handler.ts +0 -74
- package/src/errors/index.ts +0 -11
- package/src/errors/not-found-error.ts +0 -7
- package/src/errors/validation-error.ts +0 -7
- package/src/features/about/components/AboutView.tsx +0 -142
- package/src/features/about/components/index.ts +0 -7
- package/src/features/about/index.ts +0 -7
- package/src/features/account/api/[userId]/addresses/route.ts +0 -131
- package/src/features/account/api/[userId]/route.ts +0 -107
- package/src/features/account/columns/index.ts +0 -61
- package/src/features/account/components/AddressBook.tsx +0 -109
- package/src/features/account/components/BecomeSellerView.tsx +0 -44
- package/src/features/account/components/ChatList.tsx +0 -43
- package/src/features/account/components/ChatWindow.tsx +0 -52
- package/src/features/account/components/MessagesView.tsx +0 -60
- package/src/features/account/components/OrderDetailView.tsx +0 -50
- package/src/features/account/components/ProfileView.tsx +0 -40
- package/src/features/account/components/UserAccountHubView.tsx +0 -40
- package/src/features/account/components/UserAddressesView.tsx +0 -44
- package/src/features/account/components/UserNotificationsView.tsx +0 -52
- package/src/features/account/components/UserOffersView.tsx +0 -37
- package/src/features/account/components/UserOrderTrackView.tsx +0 -36
- package/src/features/account/components/UserOrdersView.tsx +0 -45
- package/src/features/account/components/UserSettingsView.tsx +0 -48
- package/src/features/account/components/index.ts +0 -54
- package/src/features/account/hooks/useAccount.ts +0 -25
- package/src/features/account/index.ts +0 -7
- package/src/features/account/manifest.ts +0 -29
- package/src/features/account/messages/en.json +0 -12
- package/src/features/account/repository/account.repository.ts +0 -28
- package/src/features/account/schemas/index.ts +0 -56
- package/src/features/account/types/index.ts +0 -124
- package/src/features/admin/api/bids/route.ts +0 -63
- package/src/features/admin/api/coupons/route.ts +0 -63
- package/src/features/admin/api/products/route.ts +0 -64
- package/src/features/admin/api/reviews/route.ts +0 -63
- package/src/features/admin/components/AdminAnalyticsView.tsx +0 -124
- package/src/features/admin/components/AdminBidsView.tsx +0 -29
- package/src/features/admin/components/AdminBlogView.tsx +0 -32
- package/src/features/admin/components/AdminCarouselView.tsx +0 -57
- package/src/features/admin/components/AdminCategoriesView.tsx +0 -57
- package/src/features/admin/components/AdminCouponsView.tsx +0 -32
- package/src/features/admin/components/AdminDashboardView.tsx +0 -50
- package/src/features/admin/components/AdminFaqsView.tsx +0 -29
- package/src/features/admin/components/AdminFeatureFlagsView.tsx +0 -33
- package/src/features/admin/components/AdminMediaView.tsx +0 -57
- package/src/features/admin/components/AdminNavigationView.tsx +0 -57
- package/src/features/admin/components/AdminOrdersView.tsx +0 -29
- package/src/features/admin/components/AdminPayoutsView.tsx +0 -29
- package/src/features/admin/components/AdminProductsView.tsx +0 -32
- package/src/features/admin/components/AdminReviewsView.tsx +0 -38
- package/src/features/admin/components/AdminSectionsView.tsx +0 -57
- package/src/features/admin/components/AdminSessionsManager.tsx +0 -28
- package/src/features/admin/components/AdminSidebar.tsx +0 -28
- package/src/features/admin/components/AdminSiteView.tsx +0 -34
- package/src/features/admin/components/AdminStoresView.tsx +0 -29
- package/src/features/admin/components/AdminTopBar.tsx +0 -22
- package/src/features/admin/components/AdminUsersView.tsx +0 -32
- package/src/features/admin/components/DashboardStats.tsx +0 -95
- package/src/features/admin/components/DataTable.tsx +0 -115
- package/src/features/admin/components/DemoSeedView.tsx +0 -22
- package/src/features/admin/components/QuickActionsPanel.tsx +0 -62
- package/src/features/admin/components/analytics/AdminAnalyticsCharts.tsx +0 -114
- package/src/features/admin/components/analytics/AdminStatCard.tsx +0 -36
- package/src/features/admin/components/analytics/AdminTopProductsTable.tsx +0 -61
- package/src/features/admin/components/analytics/index.ts +0 -3
- package/src/features/admin/components/index.ts +0 -71
- package/src/features/admin/hooks/useAdmin.ts +0 -19
- package/src/features/admin/index.ts +0 -5
- package/src/features/admin/manifest.ts +0 -15
- package/src/features/admin/messages/en.json +0 -13
- package/src/features/admin/permission-map.ts +0 -27
- package/src/features/admin/server.ts +0 -10
- package/src/features/admin/types/index.ts +0 -75
- package/src/features/auctions/api/route.ts +0 -83
- package/src/features/auctions/columns/index.ts +0 -91
- package/src/features/auctions/components/AuctionCard.tsx +0 -149
- package/src/features/auctions/components/index.ts +0 -1
- package/src/features/auctions/hooks/useAuctions.ts +0 -145
- package/src/features/auctions/hooks/usePlaceBid.ts +0 -48
- package/src/features/auctions/hooks/useRealtimeBids.ts +0 -100
- package/src/features/auctions/index.ts +0 -9
- package/src/features/auctions/manifest.ts +0 -19
- package/src/features/auctions/messages/en.json +0 -18
- package/src/features/auctions/repository/auctions.repository.ts +0 -57
- package/src/features/auctions/schemas/index.ts +0 -69
- package/src/features/auctions/server.ts +0 -7
- package/src/features/auctions/types/index.ts +0 -90
- package/src/features/auth/api/route.ts +0 -63
- package/src/features/auth/components/AuthStatusPanel.tsx +0 -67
- package/src/features/auth/components/ForgotPasswordView.tsx +0 -114
- package/src/features/auth/components/Guards.tsx +0 -60
- package/src/features/auth/components/LoginForm.tsx +0 -180
- package/src/features/auth/components/RegisterForm.tsx +0 -232
- package/src/features/auth/components/ResetPasswordView.tsx +0 -144
- package/src/features/auth/components/SocialAuthButtons.tsx +0 -60
- package/src/features/auth/components/VerifyEmailView.tsx +0 -118
- package/src/features/auth/components/index.ts +0 -13
- package/src/features/auth/hooks/useAuth.ts +0 -33
- package/src/features/auth/index.ts +0 -5
- package/src/features/auth/manifest.ts +0 -23
- package/src/features/auth/messages/en.json +0 -13
- package/src/features/auth/schemas/index.ts +0 -48
- package/src/features/auth/server.ts +0 -17
- package/src/features/auth/types/index.ts +0 -36
- package/src/features/before-after/api/[id]/route.ts +0 -143
- package/src/features/before-after/api/route.ts +0 -104
- package/src/features/before-after/columns/index.ts +0 -72
- package/src/features/before-after/components/BeforeAfterGallery.tsx +0 -41
- package/src/features/before-after/components/BeforeAfterSlider.tsx +0 -89
- package/src/features/before-after/components/index.ts +0 -2
- package/src/features/before-after/hooks/useBeforeAfter.ts +0 -33
- package/src/features/before-after/index.ts +0 -7
- package/src/features/before-after/manifest.ts +0 -12
- package/src/features/before-after/messages/en.json +0 -8
- package/src/features/before-after/repository/before-after.repository.ts +0 -44
- package/src/features/before-after/schemas/index.ts +0 -25
- package/src/features/before-after/types/index.ts +0 -19
- package/src/features/blog/api/[slug]/route.ts +0 -73
- package/src/features/blog/api/route.ts +0 -81
- package/src/features/blog/columns/index.ts +0 -68
- package/src/features/blog/components/BlogFeaturedCard.tsx +0 -108
- package/src/features/blog/components/BlogListView.tsx +0 -219
- package/src/features/blog/components/BlogPostForm.tsx +0 -254
- package/src/features/blog/components/BlogPostView.tsx +0 -221
- package/src/features/blog/components/index.ts +0 -12
- package/src/features/blog/hooks/useBlog.ts +0 -67
- package/src/features/blog/index.ts +0 -7
- package/src/features/blog/manifest.ts +0 -16
- package/src/features/blog/messages/en.json +0 -14
- package/src/features/blog/repository/blog.repository.ts +0 -73
- package/src/features/blog/schemas/index.ts +0 -74
- package/src/features/blog/server.ts +0 -9
- package/src/features/blog/types/index.ts +0 -58
- package/src/features/cart/api/[id]/route.ts +0 -98
- package/src/features/cart/api/route.ts +0 -104
- package/src/features/cart/columns/index.ts +0 -73
- package/src/features/cart/components/CartDrawer.tsx +0 -183
- package/src/features/cart/components/CartSummary.tsx +0 -43
- package/src/features/cart/components/CartView.tsx +0 -47
- package/src/features/cart/components/CheckoutAddressStep.tsx +0 -68
- package/src/features/cart/components/CheckoutOtpModal.tsx +0 -39
- package/src/features/cart/components/CheckoutSuccessView.tsx +0 -31
- package/src/features/cart/components/CheckoutView.tsx +0 -70
- package/src/features/cart/components/index.ts +0 -16
- package/src/features/cart/hooks/useCart.ts +0 -30
- package/src/features/cart/hooks/useCartQuery.ts +0 -22
- package/src/features/cart/hooks/useCheckoutReadQueries.ts +0 -34
- package/src/features/cart/hooks/useOrder.ts +0 -35
- package/src/features/cart/index.ts +0 -11
- package/src/features/cart/manifest.ts +0 -12
- package/src/features/cart/messages/en.json +0 -10
- package/src/features/cart/repository/cart.repository.ts +0 -50
- package/src/features/cart/schemas/index.ts +0 -36
- package/src/features/cart/types/index.ts +0 -29
- package/src/features/cart/utils/guest-cart.ts +0 -149
- package/src/features/categories/api/[id]/route.ts +0 -144
- package/src/features/categories/api/route.ts +0 -253
- package/src/features/categories/columns/index.ts +0 -51
- package/src/features/categories/components/BreadcrumbTrail.tsx +0 -80
- package/src/features/categories/components/CategoriesListView.tsx +0 -77
- package/src/features/categories/components/CategoryGrid.tsx +0 -93
- package/src/features/categories/components/CategoryProductsView.tsx +0 -116
- package/src/features/categories/components/CategoryTree.tsx +0 -156
- package/src/features/categories/components/ConcernCard.tsx +0 -45
- package/src/features/categories/components/ConcernGrid.tsx +0 -25
- package/src/features/categories/components/index.ts +0 -17
- package/src/features/categories/hooks/useCategories.ts +0 -72
- package/src/features/categories/index.ts +0 -7
- package/src/features/categories/manifest.ts +0 -22
- package/src/features/categories/messages/en.json +0 -14
- package/src/features/categories/repository/categories.repository.ts +0 -76
- package/src/features/categories/schemas/index.ts +0 -74
- package/src/features/categories/server.ts +0 -12
- package/src/features/categories/types/index.ts +0 -60
- package/src/features/checkout/components/CheckoutStepper.tsx +0 -45
- package/src/features/checkout/components/index.ts +0 -1
- package/src/features/checkout/hooks/useCheckout.ts +0 -38
- package/src/features/checkout/index.ts +0 -4
- package/src/features/checkout/manifest.ts +0 -19
- package/src/features/checkout/messages/en.json +0 -10
- package/src/features/checkout/types/index.ts +0 -62
- package/src/features/cms/index.ts +0 -6
- package/src/features/collections/api/[slug]/route.ts +0 -167
- package/src/features/collections/api/route.ts +0 -104
- package/src/features/collections/columns/index.ts +0 -77
- package/src/features/collections/components/CollectionCard.tsx +0 -61
- package/src/features/collections/components/index.ts +0 -1
- package/src/features/collections/hooks/useCollections.ts +0 -31
- package/src/features/collections/index.ts +0 -7
- package/src/features/collections/manifest.ts +0 -18
- package/src/features/collections/messages/en.json +0 -10
- package/src/features/collections/repository/collections.repository.ts +0 -19
- package/src/features/collections/schemas/index.ts +0 -36
- package/src/features/collections/types/index.ts +0 -26
- package/src/features/consultation/api/[id]/route.ts +0 -143
- package/src/features/consultation/api/route.ts +0 -104
- package/src/features/consultation/columns/index.ts +0 -76
- package/src/features/consultation/components/ConsultationForm.tsx +0 -161
- package/src/features/consultation/components/index.ts +0 -1
- package/src/features/consultation/hooks/useBookConsultation.ts +0 -19
- package/src/features/consultation/index.ts +0 -7
- package/src/features/consultation/manifest.ts +0 -14
- package/src/features/consultation/messages/en.json +0 -25
- package/src/features/consultation/repository/consultations.repository.ts +0 -35
- package/src/features/consultation/schemas/index.ts +0 -51
- package/src/features/consultation/types/index.ts +0 -36
- package/src/features/contact/components/ContactForm.tsx +0 -202
- package/src/features/contact/components/ContactInfoSidebar.tsx +0 -85
- package/src/features/contact/components/index.ts +0 -7
- package/src/features/contact/index.ts +0 -1
- package/src/features/copilot/components/AdminCopilotView.tsx +0 -157
- package/src/features/copilot/components/index.ts +0 -2
- package/src/features/copilot/hooks/useCopilotChat.ts +0 -86
- package/src/features/copilot/index.ts +0 -2
- package/src/features/corporate/api/[id]/route.ts +0 -149
- package/src/features/corporate/api/route.ts +0 -108
- package/src/features/corporate/columns/index.ts +0 -76
- package/src/features/corporate/components/CorporateInquiryForm.tsx +0 -155
- package/src/features/corporate/components/index.ts +0 -1
- package/src/features/corporate/hooks/useSubmitCorporateInquiry.ts +0 -19
- package/src/features/corporate/index.ts +0 -7
- package/src/features/corporate/manifest.ts +0 -14
- package/src/features/corporate/messages/en.json +0 -26
- package/src/features/corporate/repository/corporate.repository.ts +0 -39
- package/src/features/corporate/schemas/index.ts +0 -53
- package/src/features/corporate/types/index.ts +0 -40
- package/src/features/cron/firebase-adapters.ts +0 -117
- package/src/features/cron/index.ts +0 -28
- package/src/features/cron/jobs/auction-expiry.job.ts +0 -76
- package/src/features/cron/jobs/preorder-reminder.job.ts +0 -64
- package/src/features/cron/registry.ts +0 -115
- package/src/features/cron/types.ts +0 -83
- package/src/features/events/api/[id]/route.ts +0 -123
- package/src/features/events/api/route.ts +0 -110
- package/src/features/events/columns/index.ts +0 -54
- package/src/features/events/components/AdminEventEntriesView.tsx +0 -39
- package/src/features/events/components/AdminEventsView.tsx +0 -47
- package/src/features/events/components/EventCard.tsx +0 -88
- package/src/features/events/components/EventDetailView.tsx +0 -51
- package/src/features/events/components/EventFormDrawer.tsx +0 -47
- package/src/features/events/components/EventLeaderboard.tsx +0 -76
- package/src/features/events/components/EventParticipateView.tsx +0 -48
- package/src/features/events/components/EventStatusBadge.tsx +0 -28
- package/src/features/events/components/EventsListView.tsx +0 -100
- package/src/features/events/components/index.ts +0 -15
- package/src/features/events/hooks/useEvent.ts +0 -94
- package/src/features/events/hooks/useEvents.ts +0 -59
- package/src/features/events/index.ts +0 -11
- package/src/features/events/manifest.ts +0 -26
- package/src/features/events/messages/en.json +0 -28
- package/src/features/events/repository/events.repository.ts +0 -110
- package/src/features/events/schemas/index.ts +0 -98
- package/src/features/events/server.ts +0 -8
- package/src/features/events/types/index.ts +0 -185
- package/src/features/faq/api/route.ts +0 -61
- package/src/features/faq/columns/index.ts +0 -60
- package/src/features/faq/components/ContactCTA.tsx +0 -115
- package/src/features/faq/components/FAQAccordion.tsx +0 -150
- package/src/features/faq/components/FAQCategorySidebar.tsx +0 -124
- package/src/features/faq/components/FAQHelpfulButtons.tsx +0 -110
- package/src/features/faq/components/FAQPageContent.tsx +0 -217
- package/src/features/faq/components/FAQSortDropdown.tsx +0 -43
- package/src/features/faq/components/RelatedFAQs.tsx +0 -74
- package/src/features/faq/components/index.ts +0 -9
- package/src/features/faq/hooks/useFAQs.ts +0 -50
- package/src/features/faq/hooks/useFaqList.ts +0 -53
- package/src/features/faq/index.ts +0 -8
- package/src/features/faq/manifest.ts +0 -12
- package/src/features/faq/messages/en.json +0 -14
- package/src/features/faq/repository/faqs.repository.ts +0 -61
- package/src/features/faq/schemas/index.ts +0 -69
- package/src/features/faq/server.ts +0 -7
- package/src/features/faq/types/index.ts +0 -63
- package/src/features/filters/FilterFacetSection.tsx +0 -205
- package/src/features/filters/FilterPanel.tsx +0 -227
- package/src/features/filters/RangeFilter.tsx +0 -291
- package/src/features/filters/SwitchFilter.tsx +0 -143
- package/src/features/filters/filterUtils.ts +0 -24
- package/src/features/filters/index.ts +0 -28
- package/src/features/forms/Checkbox.tsx +0 -100
- package/src/features/forms/Form.tsx +0 -105
- package/src/features/forms/Input.tsx +0 -127
- package/src/features/forms/Radio.tsx +0 -126
- package/src/features/forms/Select.tsx +0 -101
- package/src/features/forms/Slider.tsx +0 -119
- package/src/features/forms/Textarea.tsx +0 -99
- package/src/features/forms/Toggle.tsx +0 -110
- package/src/features/forms/index.ts +0 -34
- package/src/features/forms/utils.ts +0 -25
- package/src/features/homepage/api/[id]/route.ts +0 -145
- package/src/features/homepage/api/carousel/[id]/route.ts +0 -169
- package/src/features/homepage/api/carousel/route.ts +0 -188
- package/src/features/homepage/api/route.ts +0 -167
- package/src/features/homepage/api/sections/[id]/route.ts +0 -143
- package/src/features/homepage/api/sections/route.ts +0 -104
- package/src/features/homepage/components/AdvertisementBanner.tsx +0 -202
- package/src/features/homepage/components/BeforeAfterCard.tsx +0 -147
- package/src/features/homepage/components/CharacterHotspot.tsx +0 -742
- package/src/features/homepage/components/CharacterHotspotForm.tsx +0 -1002
- package/src/features/homepage/components/CustomerReviewsSection.tsx +0 -108
- package/src/features/homepage/components/FAQSection.tsx +0 -154
- package/src/features/homepage/components/FeaturedResultsSection.tsx +0 -97
- package/src/features/homepage/components/HeroBanner.tsx +0 -283
- package/src/features/homepage/components/HeroCarousel.tsx +0 -442
- package/src/features/homepage/components/HeroSection.tsx +0 -50
- package/src/features/homepage/components/HomepageSkeleton.tsx +0 -88
- package/src/features/homepage/components/HomepageView.tsx +0 -77
- package/src/features/homepage/components/HowItWorksInfoView.tsx +0 -161
- package/src/features/homepage/components/HowItWorksSection.tsx +0 -194
- package/src/features/homepage/components/NewsletterBanner.tsx +0 -130
- package/src/features/homepage/components/NewsletterSection.tsx +0 -85
- package/src/features/homepage/components/PromoGrid.tsx +0 -130
- package/src/features/homepage/components/SectionCarousel.tsx +0 -284
- package/src/features/homepage/components/SecurityHighlightsSection.tsx +0 -149
- package/src/features/homepage/components/SiteFeaturesSection.tsx +0 -86
- package/src/features/homepage/components/StatsCounterSection.tsx +0 -118
- package/src/features/homepage/components/TestimonialsCarousel.tsx +0 -96
- package/src/features/homepage/components/TrustBadges.tsx +0 -155
- package/src/features/homepage/components/TrustFeaturesSection.tsx +0 -168
- package/src/features/homepage/components/TrustIndicatorsSection.tsx +0 -59
- package/src/features/homepage/components/WelcomeSection.tsx +0 -178
- package/src/features/homepage/components/WhatsAppCommunitySection.tsx +0 -187
- package/src/features/homepage/components/index.ts +0 -91
- package/src/features/homepage/hooks/useBlogArticles.ts +0 -46
- package/src/features/homepage/hooks/useFeaturedAuctions.ts +0 -39
- package/src/features/homepage/hooks/useFeaturedPreOrders.ts +0 -39
- package/src/features/homepage/hooks/useFeaturedProducts.ts +0 -44
- package/src/features/homepage/hooks/useHeroCarousel.ts +0 -19
- package/src/features/homepage/hooks/useHomepage.ts +0 -25
- package/src/features/homepage/hooks/useTopBrands.ts +0 -17
- package/src/features/homepage/hooks/useTopCategories.ts +0 -19
- package/src/features/homepage/index.ts +0 -10
- package/src/features/homepage/manifest.ts +0 -16
- package/src/features/homepage/messages/en.json +0 -6
- package/src/features/homepage/repository/homepage.repository.ts +0 -38
- package/src/features/homepage/server.ts +0 -14
- package/src/features/homepage/types/index.ts +0 -183
- package/src/features/layout/AutoBreadcrumbs.tsx +0 -143
- package/src/features/layout/BackToTop.tsx +0 -58
- package/src/features/layout/BottomNavItem.tsx +0 -71
- package/src/features/layout/BottomNavLayout.tsx +0 -34
- package/src/features/layout/BottomSheet.tsx +0 -120
- package/src/features/layout/Breadcrumbs.tsx +0 -83
- package/src/features/layout/FooterLayout.tsx +0 -215
- package/src/features/layout/ListingLayout.tsx +0 -383
- package/src/features/layout/LocaleSwitcher.tsx +0 -44
- package/src/features/layout/NavbarLayout.tsx +0 -108
- package/src/features/layout/SidebarLayout.tsx +0 -75
- package/src/features/layout/TitleBarLayout.tsx +0 -285
- package/src/features/layout/index.ts +0 -46
- package/src/features/loyalty/api/admin/loyalty/grant/route.ts +0 -51
- package/src/features/loyalty/api/balance/route.ts +0 -53
- package/src/features/loyalty/api/earn/route.ts +0 -51
- package/src/features/loyalty/api/history/route.ts +0 -74
- package/src/features/loyalty/api/redeem/route.ts +0 -51
- package/src/features/loyalty/columns/index.ts +0 -61
- package/src/features/loyalty/components/CoinsDisplay.tsx +0 -36
- package/src/features/loyalty/components/index.ts +0 -1
- package/src/features/loyalty/hooks/useLoyaltyBalance.ts +0 -17
- package/src/features/loyalty/index.ts +0 -7
- package/src/features/loyalty/manifest.ts +0 -18
- package/src/features/loyalty/messages/en.json +0 -19
- package/src/features/loyalty/repository/loyalty.repository.ts +0 -29
- package/src/features/loyalty/schemas/index.ts +0 -44
- package/src/features/loyalty/types/index.ts +0 -43
- package/src/features/loyalty/types/loyalty-math.ts +0 -36
- package/src/features/media/MediaAvatar.tsx +0 -37
- package/src/features/media/MediaImage.tsx +0 -119
- package/src/features/media/MediaLightbox.tsx +0 -520
- package/src/features/media/MediaVideo.tsx +0 -94
- package/src/features/media/components/MediaSlider.tsx +0 -53
- package/src/features/media/hooks/useMedia.ts +0 -118
- package/src/features/media/index.ts +0 -74
- package/src/features/media/messages/en.json +0 -63
- package/src/features/media/modals/ImageCropModal.tsx +0 -270
- package/src/features/media/modals/VideoThumbnailSelector.tsx +0 -117
- package/src/features/media/modals/VideoTrimModal.tsx +0 -193
- package/src/features/media/types/index.ts +0 -69
- package/src/features/media/upload/CameraCapture.tsx +0 -150
- package/src/features/media/upload/ImageUpload.tsx +0 -358
- package/src/features/media/upload/MediaUploadField.tsx +0 -442
- package/src/features/media/upload/MediaUploadList.tsx +0 -255
- package/src/features/orders/columns/index.ts +0 -47
- package/src/features/orders/components/OrdersList.tsx +0 -168
- package/src/features/orders/components/index.ts +0 -1
- package/src/features/orders/hooks/useOrders.ts +0 -53
- package/src/features/orders/index.ts +0 -8
- package/src/features/orders/manifest.ts +0 -20
- package/src/features/orders/messages/en.json +0 -15
- package/src/features/orders/repository/orders.repository.ts +0 -47
- package/src/features/orders/schemas/index.ts +0 -82
- package/src/features/orders/types/index.ts +0 -97
- package/src/features/orders/utils/order-splitter.ts +0 -48
- package/src/features/payments/columns/index.ts +0 -67
- package/src/features/payments/components/index.ts +0 -1
- package/src/features/payments/hooks/usePayments.ts +0 -23
- package/src/features/payments/index.ts +0 -6
- package/src/features/payments/manifest.ts +0 -14
- package/src/features/payments/messages/en.json +0 -11
- package/src/features/payments/repository/payments.repository.ts +0 -57
- package/src/features/payments/schemas/index.ts +0 -47
- package/src/features/payments/types/index.ts +0 -50
- package/src/features/pre-orders/api/[id]/route.ts +0 -143
- package/src/features/pre-orders/api/[slug]/route.ts +0 -61
- package/src/features/pre-orders/api/admin/[id]/route.ts +0 -105
- package/src/features/pre-orders/api/admin/route.ts +0 -69
- package/src/features/pre-orders/api/route.ts +0 -96
- package/src/features/pre-orders/columns/index.ts +0 -90
- package/src/features/pre-orders/components/PreOrderBadge.tsx +0 -52
- package/src/features/pre-orders/components/PreorderCard.tsx +0 -90
- package/src/features/pre-orders/components/index.ts +0 -1
- package/src/features/pre-orders/hooks/usePreOrders.ts +0 -31
- package/src/features/pre-orders/index.ts +0 -7
- package/src/features/pre-orders/manifest.ts +0 -19
- package/src/features/pre-orders/messages/en.json +0 -13
- package/src/features/pre-orders/repository/pre-orders.repository.ts +0 -75
- package/src/features/pre-orders/repository/preorders.repository.ts +0 -24
- package/src/features/pre-orders/schemas/index.ts +0 -28
- package/src/features/pre-orders/server.ts +0 -12
- package/src/features/pre-orders/types/index.ts +0 -49
- package/src/features/products/api/[id]/route.ts +0 -200
- package/src/features/products/api/route.ts +0 -242
- package/src/features/products/columns/index.ts +0 -90
- package/src/features/products/components/AuctionDetailView.tsx +0 -58
- package/src/features/products/components/AuctionsView.tsx +0 -48
- package/src/features/products/components/BidHistory.tsx +0 -83
- package/src/features/products/components/BuyBar.tsx +0 -36
- package/src/features/products/components/MakeOfferForm.tsx +0 -43
- package/src/features/products/components/PlaceBidForm.tsx +0 -42
- package/src/features/products/components/PreOrderDetailView.tsx +0 -50
- package/src/features/products/components/PreOrdersView.tsx +0 -39
- package/src/features/products/components/ProductDetailView.tsx +0 -52
- package/src/features/products/components/ProductFeatureBadges.tsx +0 -192
- package/src/features/products/components/ProductGrid.tsx +0 -424
- package/src/features/products/components/ProductInfo.tsx +0 -44
- package/src/features/products/components/ProductTabs.tsx +0 -84
- package/src/features/products/components/ProductsView.tsx +0 -48
- package/src/features/products/components/RelatedProducts.tsx +0 -51
- package/src/features/products/components/index.ts +0 -28
- package/src/features/products/hooks/useProductDetail.ts +0 -44
- package/src/features/products/hooks/useProducts.ts +0 -112
- package/src/features/products/index.ts +0 -9
- package/src/features/products/manifest.ts +0 -18
- package/src/features/products/messages/en.json +0 -11
- package/src/features/products/repository/products.repository.ts +0 -83
- package/src/features/products/schemas/index.ts +0 -185
- package/src/features/products/server.ts +0 -12
- package/src/features/products/types/index.ts +0 -142
- package/src/features/products/utils/listing-type.ts +0 -12
- package/src/features/promotions/api/route.ts +0 -105
- package/src/features/promotions/columns/index.ts +0 -60
- package/src/features/promotions/components/CouponCard.tsx +0 -79
- package/src/features/promotions/components/PromotionsView.tsx +0 -129
- package/src/features/promotions/components/index.ts +0 -7
- package/src/features/promotions/hooks/usePromotions.ts +0 -59
- package/src/features/promotions/index.ts +0 -7
- package/src/features/promotions/manifest.ts +0 -16
- package/src/features/promotions/messages/en.json +0 -20
- package/src/features/promotions/repository/promotions.repository.ts +0 -62
- package/src/features/promotions/schemas/index.ts +0 -63
- package/src/features/promotions/server.ts +0 -7
- package/src/features/promotions/types/index.ts +0 -65
- package/src/features/reviews/api/[id]/route.ts +0 -163
- package/src/features/reviews/api/route.ts +0 -216
- package/src/features/reviews/columns/index.ts +0 -57
- package/src/features/reviews/components/ReviewModal.tsx +0 -133
- package/src/features/reviews/components/ReviewSummary.tsx +0 -82
- package/src/features/reviews/components/ReviewsList.tsx +0 -182
- package/src/features/reviews/components/ReviewsListView.tsx +0 -100
- package/src/features/reviews/components/index.ts +0 -11
- package/src/features/reviews/hooks/useReviews.ts +0 -67
- package/src/features/reviews/index.ts +0 -7
- package/src/features/reviews/manifest.ts +0 -12
- package/src/features/reviews/messages/en.json +0 -10
- package/src/features/reviews/repository/reviews.repository.ts +0 -69
- package/src/features/reviews/schemas/index.ts +0 -74
- package/src/features/reviews/server.ts +0 -12
- package/src/features/reviews/types/index.ts +0 -68
- package/src/features/search/api/route.ts +0 -100
- package/src/features/search/columns/index.ts +0 -70
- package/src/features/search/components/SearchFiltersRow.tsx +0 -118
- package/src/features/search/components/SearchResultsSection.tsx +0 -195
- package/src/features/search/components/SearchView.tsx +0 -99
- package/src/features/search/components/index.ts +0 -6
- package/src/features/search/hooks/useSearch.ts +0 -41
- package/src/features/search/index.ts +0 -7
- package/src/features/search/manifest.ts +0 -12
- package/src/features/search/messages/en.json +0 -15
- package/src/features/search/repository/search.repository.ts +0 -64
- package/src/features/search/schemas/index.ts +0 -36
- package/src/features/search/server.ts +0 -3
- package/src/features/search/types/index.ts +0 -59
- package/src/features/seller/api/coupons/route.ts +0 -57
- package/src/features/seller/api/offers/route.ts +0 -73
- package/src/features/seller/api/products/route.ts +0 -75
- package/src/features/seller/api/store/route.ts +0 -41
- package/src/features/seller/columns/index.ts +0 -103
- package/src/features/seller/components/SellerAddressesView.tsx +0 -32
- package/src/features/seller/components/SellerAnalyticsView.tsx +0 -38
- package/src/features/seller/components/SellerAuctionsView.tsx +0 -48
- package/src/features/seller/components/SellerCouponsView.tsx +0 -48
- package/src/features/seller/components/SellerCreateProductView.tsx +0 -27
- package/src/features/seller/components/SellerDashboardView.tsx +0 -41
- package/src/features/seller/components/SellerEditProductView.tsx +0 -27
- package/src/features/seller/components/SellerGuideView.tsx +0 -34
- package/src/features/seller/components/SellerOffersView.tsx +0 -46
- package/src/features/seller/components/SellerOrdersView.tsx +0 -46
- package/src/features/seller/components/SellerPayoutHistoryTable.tsx +0 -44
- package/src/features/seller/components/SellerPayoutSettingsView.tsx +0 -27
- package/src/features/seller/components/SellerPayoutStats.tsx +0 -24
- package/src/features/seller/components/SellerPayoutsView.tsx +0 -46
- package/src/features/seller/components/SellerProductsView.tsx +0 -51
- package/src/features/seller/components/SellerShippingView.tsx +0 -30
- package/src/features/seller/components/SellerSidebar.tsx +0 -84
- package/src/features/seller/components/SellerStatCard.tsx +0 -44
- package/src/features/seller/components/SellerStoreSetupView.tsx +0 -31
- package/src/features/seller/components/SellerStoreView.tsx +0 -27
- package/src/features/seller/components/SellerStorefrontView.tsx +0 -49
- package/src/features/seller/components/SellersListView.tsx +0 -43
- package/src/features/seller/components/analytics/SellerAnalyticsStats.tsx +0 -87
- package/src/features/seller/components/analytics/SellerRevenueChart.tsx +0 -99
- package/src/features/seller/components/analytics/SellerTopProducts.tsx +0 -76
- package/src/features/seller/components/analytics/index.ts +0 -3
- package/src/features/seller/components/index.ts +0 -47
- package/src/features/seller/hooks/useSellerPayouts.ts +0 -51
- package/src/features/seller/hooks/useSellerStore.ts +0 -60
- package/src/features/seller/index.ts +0 -12
- package/src/features/seller/manifest.ts +0 -76
- package/src/features/seller/messages/en.json +0 -32
- package/src/features/seller/permission-map.ts +0 -18
- package/src/features/seller/repository/seller.repository.ts +0 -100
- package/src/features/seller/schemas/index.ts +0 -113
- package/src/features/seller/server.ts +0 -10
- package/src/features/seller/types/index.ts +0 -185
- package/src/features/stores/api/[storeSlug]/auctions/route.ts +0 -134
- package/src/features/stores/api/[storeSlug]/products/route.ts +0 -139
- package/src/features/stores/api/[storeSlug]/reviews/route.ts +0 -155
- package/src/features/stores/api/[storeSlug]/route.ts +0 -120
- package/src/features/stores/api/route.ts +0 -128
- package/src/features/stores/columns/index.ts +0 -58
- package/src/features/stores/components/StoreAboutView.tsx +0 -134
- package/src/features/stores/components/StoreAuctionsView.tsx +0 -46
- package/src/features/stores/components/StoreHeader.tsx +0 -115
- package/src/features/stores/components/StoreNavTabs.tsx +0 -77
- package/src/features/stores/components/StoreProductsView.tsx +0 -77
- package/src/features/stores/components/StoreReviewsView.tsx +0 -45
- package/src/features/stores/components/StoresListView.tsx +0 -142
- package/src/features/stores/components/index.ts +0 -12
- package/src/features/stores/hooks/useStores.ts +0 -130
- package/src/features/stores/index.ts +0 -7
- package/src/features/stores/manifest.ts +0 -37
- package/src/features/stores/messages/en.json +0 -21
- package/src/features/stores/repository/stores.repository.ts +0 -51
- package/src/features/stores/schemas/index.ts +0 -42
- package/src/features/stores/server.ts +0 -11
- package/src/features/stores/types/index.ts +0 -123
- package/src/features/user/components/BecomeSellerView.tsx +0 -36
- package/src/features/user/components/MessagesView.tsx +0 -37
- package/src/features/user/components/OrderDetailView.tsx +0 -36
- package/src/features/user/components/ProfileView.tsx +0 -33
- package/src/features/user/components/UserAccountHub.tsx +0 -30
- package/src/features/user/components/UserAddressesView.tsx +0 -32
- package/src/features/user/components/UserNotificationsView.tsx +0 -38
- package/src/features/user/components/UserOffersView.tsx +0 -35
- package/src/features/user/components/UserOrdersView.tsx +0 -39
- package/src/features/user/components/UserSettingsView.tsx +0 -31
- package/src/features/user/components/UserSidebar.tsx +0 -27
- package/src/features/user/components/index.ts +0 -22
- package/src/features/user/index.ts +0 -1
- package/src/features/whatsapp-bot/api/send-status/route.ts +0 -48
- package/src/features/whatsapp-bot/api/webhook/route.ts +0 -55
- package/src/features/whatsapp-bot/components/WhatsAppChatButton.tsx +0 -38
- package/src/features/whatsapp-bot/components/index.ts +0 -1
- package/src/features/whatsapp-bot/helpers/whatsapp.ts +0 -137
- package/src/features/whatsapp-bot/index.ts +0 -4
- package/src/features/whatsapp-bot/manifest.ts +0 -15
- package/src/features/whatsapp-bot/messages/en.json +0 -7
- package/src/features/whatsapp-bot/types/index.ts +0 -61
- package/src/features/wishlist/columns/index.ts +0 -65
- package/src/features/wishlist/components/WishlistPage.tsx +0 -118
- package/src/features/wishlist/components/WishlistToggleButton.tsx +0 -68
- package/src/features/wishlist/components/WishlistView.tsx +0 -150
- package/src/features/wishlist/components/index.ts +0 -4
- package/src/features/wishlist/hooks/useUserWishlist.ts +0 -39
- package/src/features/wishlist/hooks/useWishlist.ts +0 -31
- package/src/features/wishlist/index.ts +0 -8
- package/src/features/wishlist/manifest.ts +0 -14
- package/src/features/wishlist/messages/en.json +0 -7
- package/src/features/wishlist/repository/wishlist.repository.ts +0 -43
- package/src/features/wishlist/schemas/index.ts +0 -25
- package/src/features/wishlist/types/index.ts +0 -17
- package/src/http/ApiClient.ts +0 -247
- package/src/http/index.ts +0 -10
- package/src/index.ts +0 -22
- package/src/instrumentation/index.ts +0 -77
- package/src/monitoring/cache-metrics.ts +0 -105
- package/src/monitoring/client-logger.ts +0 -83
- package/src/monitoring/error-tracking.ts +0 -115
- package/src/monitoring/index.ts +0 -52
- package/src/monitoring/performance.ts +0 -64
- package/src/monitoring/runtime.ts +0 -33
- package/src/monitoring/server-logger.ts +0 -93
- package/src/next/IAuthVerifier.ts +0 -56
- package/src/next/api/api-response.ts +0 -72
- package/src/next/api/apiHandler.ts +0 -178
- package/src/next/api/errorHandler.ts +0 -125
- package/src/next/api/routeHandler.ts +0 -175
- package/src/next/cache-middleware.ts +0 -112
- package/src/next/components/ErrorView.tsx +0 -73
- package/src/next/components/GlobalError.tsx +0 -75
- package/src/next/components/NotFoundView.tsx +0 -56
- package/src/next/components/UnauthorizedView.tsx +0 -61
- package/src/next/index.ts +0 -82
- package/src/next/middleware/chain.ts +0 -117
- package/src/next/middleware/index.ts +0 -14
- package/src/next/middleware/pii-redactor.ts +0 -112
- package/src/next/middleware/pii-scrubber.ts +0 -56
- package/src/next/middleware/types.ts +0 -26
- package/src/next/request-helpers.ts +0 -76
- package/src/next/routing/route-map.ts +0 -221
- package/src/providers/auth-firebase/browser-stub.ts +0 -32
- package/src/providers/auth-firebase/helpers.ts +0 -150
- package/src/providers/auth-firebase/index.ts +0 -26
- package/src/providers/auth-firebase/provider.ts +0 -163
- package/src/providers/auth-firebase/session.ts +0 -111
- package/src/providers/db-firebase/admin-app-lite.ts +0 -66
- package/src/providers/db-firebase/admin-auth-lite.ts +0 -16
- package/src/providers/db-firebase/admin-storage-lite.ts +0 -19
- package/src/providers/db-firebase/admin.ts +0 -217
- package/src/providers/db-firebase/base.ts +0 -243
- package/src/providers/db-firebase/browser-stub.ts +0 -47
- package/src/providers/db-firebase/helpers.ts +0 -88
- package/src/providers/db-firebase/index.ts +0 -60
- package/src/providers/db-firebase/realtime.ts +0 -185
- package/src/providers/db-firebase/sieve.ts +0 -136
- package/src/providers/email-resend/index.ts +0 -16
- package/src/providers/email-resend/provider.ts +0 -103
- package/src/providers/payment-razorpay/index.ts +0 -165
- package/src/providers/shipping-shiprocket/index.ts +0 -402
- package/src/providers/storage-firebase/index.ts +0 -17
- package/src/providers/storage-firebase/provider.ts +0 -131
- package/src/react/ErrorBoundary.tsx +0 -130
- package/src/react/hooks/useBreakpoint.ts +0 -41
- package/src/react/hooks/useBulkAction.ts +0 -161
- package/src/react/hooks/useBulkSelection.ts +0 -119
- package/src/react/hooks/useCamera.ts +0 -191
- package/src/react/hooks/useClickOutside.ts +0 -87
- package/src/react/hooks/useContainerGrid.ts +0 -77
- package/src/react/hooks/useCountdown.ts +0 -73
- package/src/react/hooks/useGesture.ts +0 -255
- package/src/react/hooks/useKeyPress.ts +0 -113
- package/src/react/hooks/useLongPress.ts +0 -62
- package/src/react/hooks/useMediaQuery.ts +0 -40
- package/src/react/hooks/usePendingFilters.ts +0 -138
- package/src/react/hooks/usePendingTable.ts +0 -84
- package/src/react/hooks/usePullToRefresh.ts +0 -111
- package/src/react/hooks/useSwipe.ts +0 -240
- package/src/react/hooks/useUnsavedChanges.ts +0 -104
- package/src/react/hooks/useUrlTable.ts +0 -189
- package/src/react/hooks/useVisibleItems.ts +0 -110
- package/src/react/index.ts +0 -99
- package/src/react/useModalStack.ts +0 -86
- package/src/security/authorization.ts +0 -92
- package/src/security/csp.ts +0 -44
- package/src/security/index.ts +0 -50
- package/src/security/pii-encrypt.ts +0 -117
- package/src/security/pii-redact.ts +0 -133
- package/src/security/rate-limit.ts +0 -170
- package/src/security/rbac/Can.tsx +0 -50
- package/src/security/rbac/default-roles.ts +0 -86
- package/src/security/rbac/hook.ts +0 -55
- package/src/security/rbac/index.ts +0 -14
- package/src/security/rbac/middleware.ts +0 -103
- package/src/security/rbac/resolver.ts +0 -69
- package/src/security/rbac/server.ts +0 -52
- package/src/security/rbac/types.ts +0 -27
- package/src/seed/defaults/categories.ts +0 -13
- package/src/seed/defaults/faqs.ts +0 -40
- package/src/seed/defaults/homepage-sections.ts +0 -63
- package/src/seed/factories/address.factory.ts +0 -106
- package/src/seed/factories/bid.factory.ts +0 -50
- package/src/seed/factories/blog-post.factory.ts +0 -40
- package/src/seed/factories/carousel.factory.ts +0 -30
- package/src/seed/factories/cart.factory.ts +0 -66
- package/src/seed/factories/category.factory.ts +0 -30
- package/src/seed/factories/coupon.factory.ts +0 -67
- package/src/seed/factories/faq.factory.ts +0 -28
- package/src/seed/factories/homepage-section.factory.ts +0 -35
- package/src/seed/factories/notification.factory.ts +0 -68
- package/src/seed/factories/order.factory.ts +0 -43
- package/src/seed/factories/payout.factory.ts +0 -62
- package/src/seed/factories/product.factory.ts +0 -120
- package/src/seed/factories/review.factory.ts +0 -67
- package/src/seed/factories/session.factory.ts +0 -49
- package/src/seed/factories/store.factory.ts +0 -69
- package/src/seed/factories/user.factory.ts +0 -88
- package/src/seed/index.ts +0 -84
- package/src/seed/runner.ts +0 -57
- package/src/seed/test-utils.ts +0 -155
- package/src/seed/types.ts +0 -40
- package/src/seo/index.ts +0 -2
- package/src/seo/json-ld.ts +0 -241
- package/src/seo/metadata.ts +0 -302
- package/src/style/tailwind/index.ts +0 -66
- package/src/style/vanilla/index.ts +0 -57
- package/src/tokens/index.ts +0 -864
- package/src/tokens/tokens.css +0 -221
- package/src/ui/DataTable.tsx +0 -655
- package/src/ui/animation.helper.ts +0 -20
- package/src/ui/color.helper.ts +0 -37
- package/src/ui/components/Accordion.tsx +0 -189
- package/src/ui/components/ActiveFilterChips.tsx +0 -81
- package/src/ui/components/Alert.tsx +0 -167
- package/src/ui/components/Badge.tsx +0 -65
- package/src/ui/components/Breadcrumb.tsx +0 -61
- package/src/ui/components/BulkActionBar.tsx +0 -246
- package/src/ui/components/Button.tsx +0 -75
- package/src/ui/components/CountdownDisplay.tsx +0 -87
- package/src/ui/components/DescriptionField.tsx +0 -55
- package/src/ui/components/Div.tsx +0 -29
- package/src/ui/components/Divider.tsx +0 -52
- package/src/ui/components/Drawer.tsx +0 -178
- package/src/ui/components/Form.tsx +0 -25
- package/src/ui/components/FormGrid.tsx +0 -82
- package/src/ui/components/HorizontalScroller.tsx +0 -183
- package/src/ui/components/IconButton.tsx +0 -71
- package/src/ui/components/ImageLightbox.tsx +0 -187
- package/src/ui/components/Input.tsx +0 -17
- package/src/ui/components/ItemRow.tsx +0 -38
- package/src/ui/components/Layout.tsx +0 -391
- package/src/ui/components/ListingLayout.tsx +0 -514
- package/src/ui/components/Modal.tsx +0 -162
- package/src/ui/components/Pagination.tsx +0 -182
- package/src/ui/components/PriceDisplay.tsx +0 -63
- package/src/ui/components/Progress.tsx +0 -154
- package/src/ui/components/RatingDisplay.tsx +0 -56
- package/src/ui/components/Select.tsx +0 -221
- package/src/ui/components/Semantic.tsx +0 -257
- package/src/ui/components/SideModal.tsx +0 -137
- package/src/ui/components/Skeleton.tsx +0 -82
- package/src/ui/components/Slider.tsx +0 -35
- package/src/ui/components/SortDropdown.tsx +0 -43
- package/src/ui/components/Spinner.tsx +0 -48
- package/src/ui/components/StarRating.tsx +0 -85
- package/src/ui/components/StatsGrid.tsx +0 -56
- package/src/ui/components/StatusBadge.tsx +0 -130
- package/src/ui/components/StepperNav.tsx +0 -89
- package/src/ui/components/SummaryCard.tsx +0 -66
- package/src/ui/components/TabStrip.tsx +0 -142
- package/src/ui/components/TablePagination.tsx +0 -134
- package/src/ui/components/TagInput.tsx +0 -133
- package/src/ui/components/TextLink.tsx +0 -68
- package/src/ui/components/Textarea.tsx +0 -17
- package/src/ui/components/Tooltip.tsx +0 -190
- package/src/ui/components/Typography.tsx +0 -270
- package/src/ui/components/ViewToggle.tsx +0 -133
- package/src/ui/index.ts +0 -248
- package/src/ui/rich-text/RichText.tsx +0 -243
- package/src/ui/rich-text/index.ts +0 -2
- package/src/ui/style.helper.ts +0 -18
- package/src/utils/animation.helper.ts +0 -22
- package/src/utils/array.helper.ts +0 -73
- package/src/utils/color.helper.ts +0 -57
- package/src/utils/cookie.converter.ts +0 -32
- package/src/utils/date.formatter.ts +0 -228
- package/src/utils/event-manager.ts +0 -168
- package/src/utils/filter.helper.ts +0 -24
- package/src/utils/id-generators.ts +0 -629
- package/src/utils/index.ts +0 -31
- package/src/utils/media-field.ts +0 -13
- package/src/utils/number.formatter.ts +0 -107
- package/src/utils/object.helper.ts +0 -111
- package/src/utils/pagination.helper.ts +0 -46
- package/src/utils/sorting.helper.ts +0 -21
- package/src/utils/string.formatter.ts +0 -178
- package/src/utils/type.converter.ts +0 -86
- package/src/validation/email.validator.ts +0 -37
- package/src/validation/index.ts +0 -17
- package/src/validation/input.validator.ts +0 -38
- package/src/validation/password.validator.ts +0 -97
- package/src/validation/phone.validator.ts +0 -38
- package/src/validation/schemas.ts +0 -106
- package/src/validation/url.validator.ts +0 -46
- package/src/validation/zod-error-map.ts +0 -96
package/src/tokens/index.ts
DELETED
|
@@ -1,864 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mohasinac/tokens — TypeScript constants
|
|
3
|
-
*
|
|
4
|
-
* Mirrors the CSS custom properties in tokens.css as typed TS values.
|
|
5
|
-
* Use these when you need token values in JS (e.g. canvas drawing, charting,
|
|
6
|
-
* or building the tailwind.config.js color palette from a single source).
|
|
7
|
-
*
|
|
8
|
-
* In CSS/Tailwind prefer `var(--appkit-*)` references over these constants.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// ─── Brand Colors ──────────────────────────────────────────────────────────
|
|
12
|
-
|
|
13
|
-
export const COLORS = {
|
|
14
|
-
primary: {
|
|
15
|
-
DEFAULT: "#84e122",
|
|
16
|
-
50: "#f3ffe3",
|
|
17
|
-
100: "#e4ffc5",
|
|
18
|
-
200: "#c8ff90",
|
|
19
|
-
300: "#a3f550",
|
|
20
|
-
400: "#84e122",
|
|
21
|
-
500: "#65c408",
|
|
22
|
-
600: "#509c02",
|
|
23
|
-
700: "#3e7708",
|
|
24
|
-
800: "#345e0d",
|
|
25
|
-
900: "#2c5011",
|
|
26
|
-
950: "#142d03",
|
|
27
|
-
},
|
|
28
|
-
secondary: {
|
|
29
|
-
DEFAULT: "#e91e8c",
|
|
30
|
-
50: "#fdf0f8",
|
|
31
|
-
100: "#fce2f2",
|
|
32
|
-
200: "#fac6e6",
|
|
33
|
-
300: "#f79dd2",
|
|
34
|
-
400: "#f063b9",
|
|
35
|
-
500: "#e91e8c",
|
|
36
|
-
600: "#d4107a",
|
|
37
|
-
700: "#b00d66",
|
|
38
|
-
800: "#900f56",
|
|
39
|
-
900: "#771249",
|
|
40
|
-
950: "#480525",
|
|
41
|
-
},
|
|
42
|
-
cobalt: {
|
|
43
|
-
DEFAULT: "#3570fc",
|
|
44
|
-
50: "#eef5ff",
|
|
45
|
-
100: "#d9e8ff",
|
|
46
|
-
200: "#bcd4ff",
|
|
47
|
-
300: "#8eb9ff",
|
|
48
|
-
400: "#5992ff",
|
|
49
|
-
500: "#3570fc",
|
|
50
|
-
600: "#1a55f2",
|
|
51
|
-
700: "#1343de",
|
|
52
|
-
800: "#1536b4",
|
|
53
|
-
900: "#18318e",
|
|
54
|
-
950: "#111e58",
|
|
55
|
-
},
|
|
56
|
-
accent: {
|
|
57
|
-
DEFAULT: "#8393b2",
|
|
58
|
-
50: "#f5f7fa",
|
|
59
|
-
100: "#eaeef4",
|
|
60
|
-
200: "#d1dae6",
|
|
61
|
-
300: "#adb9cf",
|
|
62
|
-
400: "#8393b2",
|
|
63
|
-
500: "#657599",
|
|
64
|
-
600: "#505f7f",
|
|
65
|
-
700: "#424d67",
|
|
66
|
-
800: "#394257",
|
|
67
|
-
900: "#333b4b",
|
|
68
|
-
950: "#222730",
|
|
69
|
-
},
|
|
70
|
-
semantic: {
|
|
71
|
-
success: "#059669",
|
|
72
|
-
warning: "#d97706",
|
|
73
|
-
error: "#dc2626",
|
|
74
|
-
info: "#0284c7",
|
|
75
|
-
},
|
|
76
|
-
} as const;
|
|
77
|
-
|
|
78
|
-
// ─── Border Radius ─────────────────────────────────────────────────────────
|
|
79
|
-
|
|
80
|
-
export const RADIUS = {
|
|
81
|
-
sm: "0.25rem",
|
|
82
|
-
md: "0.375rem",
|
|
83
|
-
lg: "0.5rem",
|
|
84
|
-
xl: "0.75rem",
|
|
85
|
-
"2xl": "1rem",
|
|
86
|
-
"3xl": "1.5rem",
|
|
87
|
-
card: "1rem",
|
|
88
|
-
btn: "0.75rem",
|
|
89
|
-
full: "9999px",
|
|
90
|
-
} as const;
|
|
91
|
-
|
|
92
|
-
// ─── Shadow ────────────────────────────────────────────────────────────────
|
|
93
|
-
|
|
94
|
-
export const SHADOWS = {
|
|
95
|
-
sm: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
96
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
97
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
98
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)",
|
|
99
|
-
soft: "0 2px 15px -3px rgba(0,0,0,0.07), 0 10px 20px -2px rgba(0,0,0,0.04)",
|
|
100
|
-
glow: "0 0 20px rgba(80, 156, 2, 0.45)",
|
|
101
|
-
glowPink: "0 0 20px rgba(233, 30, 140, 0.5)",
|
|
102
|
-
} as const;
|
|
103
|
-
|
|
104
|
-
// ─── Z-index ───────────────────────────────────────────────────────────────
|
|
105
|
-
|
|
106
|
-
export const Z_INDEX = {
|
|
107
|
-
dropdown: 30,
|
|
108
|
-
searchBackdrop: 35,
|
|
109
|
-
navbar: 40,
|
|
110
|
-
bottomNav: 40,
|
|
111
|
-
overlay: 45,
|
|
112
|
-
sidebar: 50,
|
|
113
|
-
titleBar: 50,
|
|
114
|
-
modal: 60,
|
|
115
|
-
toast: 70,
|
|
116
|
-
} as const;
|
|
117
|
-
|
|
118
|
-
// ─── Token helper ──────────────────────────────────────────────────────────
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Returns a CSS custom property reference for the given token name.
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* token("color-primary") // "var(--appkit-color-primary)"
|
|
125
|
-
* token("radius-card") // "var(--appkit-radius-card)"
|
|
126
|
-
* token("shadow-glow") // "var(--appkit-shadow-glow)"
|
|
127
|
-
*/
|
|
128
|
-
export function token(name: string): string {
|
|
129
|
-
return `var(--appkit-${name})`;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// ─── Convenience groups ────────────────────────────────────────────────────
|
|
133
|
-
|
|
134
|
-
export const TOKENS = {
|
|
135
|
-
colors: COLORS,
|
|
136
|
-
radius: RADIUS,
|
|
137
|
-
shadows: SHADOWS,
|
|
138
|
-
zIndex: Z_INDEX,
|
|
139
|
-
token,
|
|
140
|
-
} as const;
|
|
141
|
-
|
|
142
|
-
// ─── LOCALE_CONFIG ─────────────────────────────────────────────────────────
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Locale and currency defaults for Indian e-commerce.
|
|
146
|
-
* Consumer projects can override individual keys in their own constants.
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* ```ts
|
|
150
|
-
* import { LOCALE_CONFIG } from "@mohasinac/appkit/tokens";
|
|
151
|
-
*
|
|
152
|
-
* const price = new Intl.NumberFormat(LOCALE_CONFIG.defaultLocale, {
|
|
153
|
-
* style: "currency",
|
|
154
|
-
* currency: LOCALE_CONFIG.defaultCurrency,
|
|
155
|
-
* }).format(1299);
|
|
156
|
-
* // => "\u20b91,299.00"
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
export const LOCALE_CONFIG = {
|
|
160
|
-
/** IETF language tag used for Intl formatters. */
|
|
161
|
-
defaultLocale: "en-IN",
|
|
162
|
-
/** ISO 4217 currency code. */
|
|
163
|
-
defaultCurrency: "INR",
|
|
164
|
-
/** IANA timezone for server-side date rendering. */
|
|
165
|
-
defaultTimezone: "Asia/Kolkata",
|
|
166
|
-
/** ISO 3166-1 alpha-2 country code. */
|
|
167
|
-
defaultCountry: "IN",
|
|
168
|
-
/** Locales available for the i18n router. */
|
|
169
|
-
supportedLocales: ["en-IN", "en-US", "en-GB"] as const,
|
|
170
|
-
/** Currencies the platform accepts. */
|
|
171
|
-
supportedCurrencies: ["INR", "USD", "GBP", "EUR", "AED", "SGD"] as const,
|
|
172
|
-
/** Currency symbol map for quick display use. */
|
|
173
|
-
currencySymbols: {
|
|
174
|
-
INR: "\u20b9",
|
|
175
|
-
USD: "$",
|
|
176
|
-
GBP: "\u00a3",
|
|
177
|
-
EUR: "\u20ac",
|
|
178
|
-
AED: "\u062f.\u0625",
|
|
179
|
-
SGD: "S$",
|
|
180
|
-
} as const,
|
|
181
|
-
/** Phone number prefix for IN locale. */
|
|
182
|
-
defaultPhonePrefix: "+91",
|
|
183
|
-
/** Postal code pattern for India (6 digits). */
|
|
184
|
-
postalPattern: /^[1-9][0-9]{5}$/,
|
|
185
|
-
} as const;
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
// Responsive-first design system constants for Tailwind CSS.
|
|
189
|
-
// Framework rule: every grid includes xl: and 2xl: breakpoints (widescreen).
|
|
190
|
-
// Touch targets are ≥ 44×44 px (WCAG 2.5.5).
|
|
191
|
-
//
|
|
192
|
-
// Projects (letitrip.in, licorice, hobson) import this as their base and
|
|
193
|
-
// extend with brand-specific values. The `primary`/`secondary` Tailwind color
|
|
194
|
-
// names are resolved by each consumer project's tailwind.config.js.
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Dark-mode aware classes for backgrounds, text, and borders.
|
|
198
|
-
* Base = zinc (light) / slate (dark — navy-tinted).
|
|
199
|
-
*/
|
|
200
|
-
const THEMED = {
|
|
201
|
-
// Backgrounds
|
|
202
|
-
bgPrimary: "bg-zinc-50 dark:bg-slate-950",
|
|
203
|
-
bgSecondary: "bg-zinc-100 dark:bg-slate-900",
|
|
204
|
-
bgTertiary: "bg-zinc-200 dark:bg-slate-800",
|
|
205
|
-
bgElevated: "bg-white dark:bg-slate-900/90",
|
|
206
|
-
bgInput: "bg-white dark:bg-slate-800/60",
|
|
207
|
-
// Text
|
|
208
|
-
textPrimary: "text-zinc-900 dark:text-zinc-50",
|
|
209
|
-
textSecondary: "text-zinc-500 dark:text-zinc-400",
|
|
210
|
-
textMuted: "text-zinc-400 dark:text-zinc-500",
|
|
211
|
-
textError: "text-red-600 dark:text-red-400",
|
|
212
|
-
textSuccess: "text-emerald-600 dark:text-emerald-400",
|
|
213
|
-
textOnPrimary: "text-white",
|
|
214
|
-
textOnDark: "text-white",
|
|
215
|
-
// Borders
|
|
216
|
-
border: "border-zinc-200 dark:border-slate-700",
|
|
217
|
-
borderSubtle: "border-zinc-100 dark:border-slate-800/60",
|
|
218
|
-
borderLight: "border-zinc-100 dark:border-slate-700/60",
|
|
219
|
-
borderError: "border-red-500",
|
|
220
|
-
borderColor: "border-zinc-200 dark:border-slate-700",
|
|
221
|
-
// Interactive
|
|
222
|
-
hover: "hover:bg-zinc-100 dark:hover:bg-slate-800",
|
|
223
|
-
hoverCard: "hover:bg-zinc-50 dark:hover:bg-slate-800/60",
|
|
224
|
-
hoverBorder: "hover:border-zinc-300 dark:hover:border-slate-600",
|
|
225
|
-
hoverText: "hover:text-zinc-800 dark:hover:text-zinc-100",
|
|
226
|
-
activeRow: "bg-primary-50 dark:bg-secondary-950/30",
|
|
227
|
-
focusRing: "focus:ring-primary-500 dark:focus:ring-secondary-400",
|
|
228
|
-
divider: "divide-zinc-200 dark:divide-slate-700",
|
|
229
|
-
placeholder: "placeholder-zinc-400 dark:placeholder-zinc-500",
|
|
230
|
-
} as const;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Layout dimension constants (height, width strings for Tailwind).
|
|
234
|
-
*/
|
|
235
|
-
const LAYOUT = {
|
|
236
|
-
titleBarHeight: "h-12",
|
|
237
|
-
navbarHeight: "h-10 md:h-12",
|
|
238
|
-
sidebarWidth: "w-80",
|
|
239
|
-
bottomNavHeight: "h-14",
|
|
240
|
-
maxContentWidth: "max-w-[1920px]",
|
|
241
|
-
containerWidth: "max-w-[1920px]",
|
|
242
|
-
contentPadding: "px-4 md:px-6 lg:px-8",
|
|
243
|
-
navPadding: "px-4 sm:px-6 lg:px-8",
|
|
244
|
-
titleBarBg:
|
|
245
|
-
"bg-white/90 dark:bg-slate-950/90 backdrop-blur-md border-b border-zinc-200/80 dark:border-slate-800/80",
|
|
246
|
-
navbarBg:
|
|
247
|
-
"bg-white/90 dark:bg-slate-950/90 backdrop-blur-md border-b border-zinc-200/80 dark:border-slate-800/80",
|
|
248
|
-
sidebarBg:
|
|
249
|
-
"bg-white dark:bg-slate-900 border-l border-zinc-200 dark:border-slate-800",
|
|
250
|
-
bottomNavBg:
|
|
251
|
-
"bg-white/90 dark:bg-slate-950/90 backdrop-blur-md border-t border-zinc-200/80 dark:border-slate-800/80",
|
|
252
|
-
footerBg:
|
|
253
|
-
"bg-zinc-50 dark:bg-slate-900 border-t border-zinc-200 dark:border-slate-800",
|
|
254
|
-
fullScreen: "min-h-screen",
|
|
255
|
-
flexCenter: "flex items-center justify-center",
|
|
256
|
-
centerText: "text-center",
|
|
257
|
-
// Mobile-first layout zone tokens (Phase 20)
|
|
258
|
-
/** Full-width content zone: max screen-xl, centred, responsive px */
|
|
259
|
-
content: "w-full max-w-screen-xl mx-auto px-4 sm:px-6 xl:px-8",
|
|
260
|
-
/** Narrow zone for forms, articles, policy pages */
|
|
261
|
-
tight: "w-full max-w-3xl mx-auto px-4 sm:px-6",
|
|
262
|
-
/** Vertical rhythm padding for sections */
|
|
263
|
-
section: "py-10 sm:py-14 xl:py-20",
|
|
264
|
-
/** Compact sections (filters, related products) */
|
|
265
|
-
sectionSm: "py-6 sm:py-10",
|
|
266
|
-
/** Responsive gap for flex/grid children */
|
|
267
|
-
gap: "gap-4 sm:gap-6 xl:gap-8",
|
|
268
|
-
/** Responsive vertical stack spacing */
|
|
269
|
-
stack: "space-y-4 sm:space-y-6",
|
|
270
|
-
/** Kill trailing space from last child in a zone */
|
|
271
|
-
noBleed: "pb-0 mb-0",
|
|
272
|
-
/** Kill top margin from first element in a zone */
|
|
273
|
-
firstChild: "mt-0 pt-0",
|
|
274
|
-
/** Kill bottom margin from last element in a zone */
|
|
275
|
-
lastChild: "mb-0 pb-0",
|
|
276
|
-
/** Combined bottom-nav bar (hidden on lg+, iPhone safe-area aware) */
|
|
277
|
-
bottomNav:
|
|
278
|
-
"fixed bottom-0 inset-x-0 z-50 flex justify-around items-center h-16 bg-white dark:bg-zinc-900 border-t border-zinc-200 dark:border-zinc-800 lg:hidden pb-[env(safe-area-inset-bottom)]",
|
|
279
|
-
/** Main content bottom padding to clear the bottom nav on mobile */
|
|
280
|
-
mainPadBottomNav: "pb-20 lg:pb-0",
|
|
281
|
-
} as const;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Typography scale — fluid steps across sm/md/lg breakpoints.
|
|
285
|
-
*/
|
|
286
|
-
const TYPOGRAPHY = {
|
|
287
|
-
pageTitle:
|
|
288
|
-
"text-2xl md:text-3xl lg:text-4xl font-bold tracking-tight leading-tight",
|
|
289
|
-
pageSubtitle:
|
|
290
|
-
"text-base md:text-lg text-zinc-500 dark:text-zinc-400 leading-relaxed mt-1",
|
|
291
|
-
sectionTitle: "text-xl md:text-2xl lg:text-3xl font-semibold tracking-tight",
|
|
292
|
-
sectionSubtitle:
|
|
293
|
-
"text-sm md:text-base lg:text-lg text-zinc-500 dark:text-zinc-400",
|
|
294
|
-
cardTitle: "text-base md:text-lg font-semibold leading-snug",
|
|
295
|
-
cardBody: "text-sm md:text-base leading-relaxed",
|
|
296
|
-
label: "text-sm font-medium text-zinc-700 dark:text-zinc-300",
|
|
297
|
-
caption: "text-xs text-zinc-500 dark:text-zinc-400",
|
|
298
|
-
overline:
|
|
299
|
-
"text-xs font-semibold uppercase tracking-wider text-zinc-500 dark:text-zinc-400",
|
|
300
|
-
h1: "text-3xl md:text-4xl lg:text-5xl font-bold tracking-tight font-display",
|
|
301
|
-
h2: "text-2xl md:text-3xl lg:text-4xl font-bold tracking-tight font-display",
|
|
302
|
-
h3: "text-xl md:text-2xl lg:text-3xl font-bold tracking-tight font-display",
|
|
303
|
-
h4: "text-lg md:text-xl lg:text-2xl font-bold font-display",
|
|
304
|
-
h5: "text-base md:text-lg lg:text-xl font-medium",
|
|
305
|
-
h6: "text-sm md:text-base lg:text-lg font-medium",
|
|
306
|
-
body: "text-base lg:text-lg",
|
|
307
|
-
small: "text-sm lg:text-base",
|
|
308
|
-
xs: "text-xs lg:text-sm",
|
|
309
|
-
display: "text-8xl md:text-9xl font-bold font-display",
|
|
310
|
-
} as const;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Spacing — section, form, and element stacking patterns + gap token map.
|
|
314
|
-
* The gap map mirrors the GAP_MAP inlined in @mohasinac/ui Layout.tsx.
|
|
315
|
-
*/
|
|
316
|
-
const SPACING = {
|
|
317
|
-
section: "space-y-8 md:space-y-12 lg:space-y-16",
|
|
318
|
-
formGroup: "space-y-6 lg:space-y-8",
|
|
319
|
-
stack: "space-y-4",
|
|
320
|
-
stackSmall: "space-y-2",
|
|
321
|
-
inline: "space-x-4",
|
|
322
|
-
inlineSmall: "gap-2 lg:gap-3",
|
|
323
|
-
inlineLarge: "gap-4 lg:gap-6",
|
|
324
|
-
pageY: "py-6 sm:py-8 lg:py-10",
|
|
325
|
-
sectionGap: "mt-8 md:mt-12",
|
|
326
|
-
cardPadding: "p-5 sm:p-6 lg:p-8",
|
|
327
|
-
padding: {
|
|
328
|
-
xs: "p-2",
|
|
329
|
-
sm: "p-3",
|
|
330
|
-
md: "p-4",
|
|
331
|
-
lg: "p-6",
|
|
332
|
-
xl: "p-8",
|
|
333
|
-
},
|
|
334
|
-
gap: {
|
|
335
|
-
none: "",
|
|
336
|
-
px: "gap-px",
|
|
337
|
-
xs: "gap-1",
|
|
338
|
-
sm: "gap-2",
|
|
339
|
-
"2.5": "gap-2.5",
|
|
340
|
-
"3": "gap-3",
|
|
341
|
-
md: "gap-4",
|
|
342
|
-
lg: "gap-6",
|
|
343
|
-
xl: "gap-8",
|
|
344
|
-
"2xl": "gap-12",
|
|
345
|
-
},
|
|
346
|
-
} as const;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Responsive grid presets — mobile-first, every preset reaches xl: and 2xl:.
|
|
350
|
-
*
|
|
351
|
-
* Rules:
|
|
352
|
-
* - Fixed column grids (cols1–cols6) scale gracefully to widescreen.
|
|
353
|
-
* - Card grids start at 1 col on portrait mobile (≤639 px) for readability.
|
|
354
|
-
* - Auto-fill grids use minmax so columns form naturally at any viewport width.
|
|
355
|
-
*/
|
|
356
|
-
const GRID = {
|
|
357
|
-
/** Single column */
|
|
358
|
-
cols1: "grid grid-cols-1",
|
|
359
|
-
/** 1 → 2 */
|
|
360
|
-
cols2: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2",
|
|
361
|
-
/** 1 → 2 → 3 → 4 on widescreen */
|
|
362
|
-
cols3:
|
|
363
|
-
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4",
|
|
364
|
-
/** 1 → 2 → 3 → 4 → 5 on widescreen */
|
|
365
|
-
cols4:
|
|
366
|
-
"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5",
|
|
367
|
-
/** 1 → 2 → 3 → 4 → 5 */
|
|
368
|
-
cols5:
|
|
369
|
-
"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5",
|
|
370
|
-
/** 2 → 3 → 4 → 5 → 6 */
|
|
371
|
-
cols6:
|
|
372
|
-
"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6",
|
|
373
|
-
/**
|
|
374
|
-
* Generic card grid — 1 col on portrait mobile → 5 on ultrawide.
|
|
375
|
-
* Starts at 1 (not 2) so product cards with title+image+price are readable
|
|
376
|
-
* even on 320 px handsets in portrait orientation.
|
|
377
|
-
*/
|
|
378
|
-
cards:
|
|
379
|
-
"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5",
|
|
380
|
-
/** Auto-fill product cards — min 200 px */
|
|
381
|
-
productCards: "grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-6",
|
|
382
|
-
/** Auto-fill store cards — min 220 px */
|
|
383
|
-
storeCards: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-6",
|
|
384
|
-
/** Auto-fill category icon+label tiles — min 130 px */
|
|
385
|
-
categoryCards: "grid grid-cols-[repeat(auto-fill,minmax(130px,1fr))] gap-4",
|
|
386
|
-
/** Auto-fill coupon/promo cards — min 264 px */
|
|
387
|
-
couponCards: "grid grid-cols-[repeat(auto-fill,minmax(264px,1fr))] gap-6",
|
|
388
|
-
/** Auto-fill address / wide cards — min 300 px */
|
|
389
|
-
addressCards: "grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-4",
|
|
390
|
-
/** Auto-fill KPI/stat tiles — min 180 px */
|
|
391
|
-
statTiles: "grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-4",
|
|
392
|
-
/** Auto-fill account nav tiles — min 160 px */
|
|
393
|
-
navTiles: "grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4",
|
|
394
|
-
/** Auto-fill, min 200 px */
|
|
395
|
-
autoFillSm: "grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))]",
|
|
396
|
-
/** Auto-fill, min 280 px */
|
|
397
|
-
autoFillMd: "grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",
|
|
398
|
-
/** Auto-fill, min 360 px */
|
|
399
|
-
autoFillLg: "grid grid-cols-[repeat(auto-fill,minmax(360px,1fr))]",
|
|
400
|
-
/** Fixed 280 px left sidebar + 1fr */
|
|
401
|
-
sidebar: "grid grid-cols-1 lg:grid-cols-[280px_1fr]",
|
|
402
|
-
/** 1fr + fixed 280 px right sidebar */
|
|
403
|
-
sidebarRight: "grid grid-cols-1 lg:grid-cols-[1fr_280px]",
|
|
404
|
-
/** Fixed 320 px left sidebar + 1fr (admin) */
|
|
405
|
-
sidebarWide: "grid grid-cols-1 lg:grid-cols-[320px_1fr]",
|
|
406
|
-
/** Equal halves on md+ */
|
|
407
|
-
halves: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2",
|
|
408
|
-
/** 2fr / 1fr */
|
|
409
|
-
twoThird: "grid grid-cols-1 md:grid-cols-[2fr_1fr]",
|
|
410
|
-
/** 1fr / 2fr */
|
|
411
|
-
oneThird: "grid grid-cols-1 md:grid-cols-[1fr_2fr]",
|
|
412
|
-
// Phase 20 mobile-first named grid presets
|
|
413
|
-
/** Product grid — 2 cols on mobile, scales to 5 on ultrawide */
|
|
414
|
-
products:
|
|
415
|
-
"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3 sm:gap-4 xl:gap-6",
|
|
416
|
-
/** Wide card grid — 1 col on mobile → 3 on xl */
|
|
417
|
-
wide: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 xl:gap-8",
|
|
418
|
-
/** Admin stats grid — 1 col → 4 KPI tiles on xl */
|
|
419
|
-
admin: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",
|
|
420
|
-
/** Filter sidebar + main content + optional right aside */
|
|
421
|
-
withFilter:
|
|
422
|
-
"grid grid-cols-1 lg:grid-cols-[220px_1fr] xl:grid-cols-[260px_1fr_200px] gap-4 xl:gap-6",
|
|
423
|
-
} as const;
|
|
424
|
-
|
|
425
|
-
// ─── FLUID GRID ─────────────────────────────────────────────────────────────
|
|
426
|
-
/**
|
|
427
|
-
* Minimum item widths for auto-fill fluid grids matching the four
|
|
428
|
-
* `fluid-grid-*` CSS utilities (defined in tailwind.config.js plugin).
|
|
429
|
-
*
|
|
430
|
-
* Usage: `useContainerGrid({ minItemWidth: FLUID_GRID_MIN_WIDTHS.card })`
|
|
431
|
-
*/
|
|
432
|
-
export const FLUID_GRID_MIN_WIDTHS = {
|
|
433
|
-
/** Product cards, store cards */
|
|
434
|
-
card: 220,
|
|
435
|
-
/** Admin stat cards, user cards */
|
|
436
|
-
admin: 260,
|
|
437
|
-
/** Blog cards, event cards */
|
|
438
|
-
wide: 300,
|
|
439
|
-
/** Gallery thumbnails */
|
|
440
|
-
thumb: 160,
|
|
441
|
-
/** Form fields — two-column threshold */
|
|
442
|
-
form: 280,
|
|
443
|
-
/** Tab strip items */
|
|
444
|
-
tabItem: 100,
|
|
445
|
-
/** Filter chips */
|
|
446
|
-
chip: 80,
|
|
447
|
-
} as const;
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Tailwind CSS class strings for fluid auto-fill grids.
|
|
451
|
-
* Use these instead of `grid grid-cols-*` breakpoint classes.
|
|
452
|
-
*/
|
|
453
|
-
const FLUID_GRID = {
|
|
454
|
-
/** Product / store cards — min 220 px */
|
|
455
|
-
card: "fluid-grid-card",
|
|
456
|
-
/** Admin stat / user cards — min 260 px */
|
|
457
|
-
admin: "fluid-grid-admin",
|
|
458
|
-
/** Blog / event cards — min 300 px */
|
|
459
|
-
wide: "fluid-grid-wide",
|
|
460
|
-
/** Gallery thumbnails — min 160 px */
|
|
461
|
-
thumb: "fluid-grid-thumb",
|
|
462
|
-
} as const;
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* Page container presets — max-width + centering + responsive horizontal padding.
|
|
466
|
-
* Mirrors the CONTAINER_MAP inlined in @mohasinac/ui Layout.tsx.
|
|
467
|
-
*/
|
|
468
|
-
const PAGE = {
|
|
469
|
-
px: "px-4 sm:px-6 lg:px-8",
|
|
470
|
-
container: {
|
|
471
|
-
/** max-w-3xl — blog / policy */
|
|
472
|
-
sm: "max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
473
|
-
/** max-w-4xl — contact / about */
|
|
474
|
-
md: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
475
|
-
/** max-w-5xl — checkout / help */
|
|
476
|
-
lg: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
477
|
-
/** max-w-6xl — product detail / cart */
|
|
478
|
-
xl: "max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
479
|
-
/** max-w-7xl — main content grids (default) */
|
|
480
|
-
"2xl": "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
481
|
-
/** max-w-screen-2xl — full-bleed content */
|
|
482
|
-
full: "max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
483
|
-
/** max-w-screen-2xl — wide store/seller layouts (compact px) */
|
|
484
|
-
wide: "max-w-screen-2xl mx-auto px-4 sm:px-6",
|
|
485
|
-
/** max-w-[1920px] — ultra-wide / 4K displays */
|
|
486
|
-
ultra: "max-w-[1920px] mx-auto px-4 sm:px-6 lg:px-8",
|
|
487
|
-
},
|
|
488
|
-
} as const;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Form input styles — border, bg, focus ring, error/success/disabled states.
|
|
492
|
-
*/
|
|
493
|
-
const INPUT = {
|
|
494
|
-
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",
|
|
495
|
-
error:
|
|
496
|
-
"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",
|
|
497
|
-
success:
|
|
498
|
-
"border-emerald-400 dark:border-emerald-500 focus:ring-emerald-500/20 focus:border-emerald-500",
|
|
499
|
-
disabled:
|
|
500
|
-
"bg-zinc-50 dark:bg-slate-800/30 text-zinc-400 dark:text-zinc-500 cursor-not-allowed opacity-60",
|
|
501
|
-
withIcon: "pl-10",
|
|
502
|
-
} as const;
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Card styles — base, hover, elevated, glass, and interactive variants.
|
|
506
|
-
*/
|
|
507
|
-
const CARD = {
|
|
508
|
-
base: "rounded-2xl overflow-hidden transition-all",
|
|
509
|
-
shadow: "shadow-sm",
|
|
510
|
-
shadowElevated: "shadow-lg",
|
|
511
|
-
hover:
|
|
512
|
-
"hover:shadow-md dark:hover:shadow-xl cursor-pointer transition-shadow duration-200",
|
|
513
|
-
standard:
|
|
514
|
-
"rounded-2xl border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-900 shadow-sm hover:shadow-md transition-all duration-200",
|
|
515
|
-
elevated:
|
|
516
|
-
"rounded-2xl bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 shadow-md hover:shadow-lg transition-shadow duration-200",
|
|
517
|
-
interactive:
|
|
518
|
-
"rounded-2xl border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-900 shadow-sm hover:shadow-md hover:border-primary-300/60 dark:hover:border-secondary-500/60 transition-all duration-200 cursor-pointer",
|
|
519
|
-
glass:
|
|
520
|
-
"rounded-2xl backdrop-blur-md bg-white/85 dark:bg-slate-900/85 border border-zinc-200/60 dark:border-slate-700/40 shadow-lg",
|
|
521
|
-
// Card anatomy tokens (Phase 20)
|
|
522
|
-
/** Product card image wrapper — portrait aspect ratio */
|
|
523
|
-
image: "relative aspect-[3/4] overflow-hidden bg-zinc-100 dark:bg-zinc-800",
|
|
524
|
-
/** Wide image wrapper — video/landscape ratio */
|
|
525
|
-
imageWide:
|
|
526
|
-
"relative aspect-video overflow-hidden bg-zinc-100 dark:bg-zinc-800",
|
|
527
|
-
/** Square image wrapper */
|
|
528
|
-
imageSquare:
|
|
529
|
-
"relative aspect-square overflow-hidden bg-zinc-100 dark:bg-zinc-800",
|
|
530
|
-
/** Card body — flex-column, responsive padding */
|
|
531
|
-
body: "flex flex-col flex-1 gap-1 p-3 sm:p-4",
|
|
532
|
-
/** Card footer — responsive padding */
|
|
533
|
-
footer: "px-3 pb-3 sm:px-4 sm:pb-4",
|
|
534
|
-
/** Badge overlay (top-left) */
|
|
535
|
-
badge: "absolute top-2 left-2 z-10",
|
|
536
|
-
/** Action overlay, e.g. wishlist button (top-right) */
|
|
537
|
-
action: "absolute top-2 right-2 z-10",
|
|
538
|
-
} as const;
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Flex layout compositions — pre-composed flex containers.
|
|
542
|
-
* Use these instead of writing flex classes inline.
|
|
543
|
-
*/
|
|
544
|
-
const FLEX = {
|
|
545
|
-
row: "flex flex-row",
|
|
546
|
-
col: "flex flex-col",
|
|
547
|
-
rowWrap: "flex flex-row flex-wrap",
|
|
548
|
-
colWrap: "flex flex-col flex-wrap",
|
|
549
|
-
inline: "inline-flex",
|
|
550
|
-
center: "flex items-center justify-center",
|
|
551
|
-
between: "flex items-center justify-between",
|
|
552
|
-
betweenStart: "flex items-start justify-between",
|
|
553
|
-
betweenEnd: "flex items-end justify-between",
|
|
554
|
-
start: "flex items-center justify-start",
|
|
555
|
-
end: "flex items-center justify-end",
|
|
556
|
-
rowCenter: "flex flex-row items-center",
|
|
557
|
-
rowStart: "flex flex-row items-start",
|
|
558
|
-
rowEnd: "flex flex-row items-end",
|
|
559
|
-
centerCol: "flex flex-col items-center justify-center",
|
|
560
|
-
colStart: "flex flex-col items-start",
|
|
561
|
-
colCenter: "flex flex-col items-center",
|
|
562
|
-
colEnd: "flex flex-col items-end",
|
|
563
|
-
colBetween: "flex flex-col justify-between",
|
|
564
|
-
inlineCenter: "inline-flex items-center",
|
|
565
|
-
inlineFull: "inline-flex items-center justify-center",
|
|
566
|
-
grow: "flex-1",
|
|
567
|
-
growMin: "flex-1 min-w-0",
|
|
568
|
-
growMinH: "flex-1 min-h-0",
|
|
569
|
-
noShrink: "flex-shrink-0",
|
|
570
|
-
none: "flex-none",
|
|
571
|
-
hCenter: "flex justify-center",
|
|
572
|
-
} as const;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Position utilities.
|
|
576
|
-
*/
|
|
577
|
-
const POSITION = {
|
|
578
|
-
relative: "relative",
|
|
579
|
-
absolute: "absolute",
|
|
580
|
-
fixed: "fixed",
|
|
581
|
-
sticky: "sticky",
|
|
582
|
-
static: "static",
|
|
583
|
-
fill: "absolute inset-0",
|
|
584
|
-
absoluteCenter: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
585
|
-
absoluteTop: "absolute top-0 inset-x-0",
|
|
586
|
-
absoluteBottom: "absolute bottom-0 inset-x-0",
|
|
587
|
-
absoluteTopRight: "absolute top-0 right-0",
|
|
588
|
-
absoluteTopLeft: "absolute top-0 left-0",
|
|
589
|
-
absoluteBottomRight: "absolute bottom-0 right-0",
|
|
590
|
-
absoluteBottomLeft: "absolute bottom-0 left-0",
|
|
591
|
-
} as const;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Component state modifiers.
|
|
595
|
-
*/
|
|
596
|
-
const STATES = {
|
|
597
|
-
disabled: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
598
|
-
loading: "opacity-75 cursor-wait",
|
|
599
|
-
readonly: "bg-zinc-100 dark:bg-slate-800 cursor-default",
|
|
600
|
-
error: "border-red-500 dark:border-red-500",
|
|
601
|
-
success: "border-green-500 dark:border-green-500",
|
|
602
|
-
focus:
|
|
603
|
-
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-secondary-400 dark:focus:ring-offset-slate-950",
|
|
604
|
-
} as const;
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Transition classes.
|
|
608
|
-
*/
|
|
609
|
-
const TRANSITIONS = {
|
|
610
|
-
default: "transition-all duration-200 ease-in-out",
|
|
611
|
-
fast: "transition-all duration-150 ease-in-out",
|
|
612
|
-
slow: "transition-all duration-500 ease-in-out",
|
|
613
|
-
colors: "transition-colors duration-200 ease-in-out",
|
|
614
|
-
transform: "transition-transform duration-200 ease-in-out",
|
|
615
|
-
opacity: "transition-opacity duration-200 ease-in-out",
|
|
616
|
-
} as const;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Skeleton loading placeholders.
|
|
620
|
-
*
|
|
621
|
-
* Two variants:
|
|
622
|
-
* - `pulse` (default) — fade in/out via `animate-pulse`.
|
|
623
|
-
* - `shimmer` — left-to-right highlight sweep. Requires `animate-shimmer`
|
|
624
|
-
* keyframe defined in tailwind.config.js:
|
|
625
|
-
* ```js
|
|
626
|
-
* // tailwind.config.js
|
|
627
|
-
* theme: { extend: { animation: { shimmer: "shimmer 1.5s infinite" },
|
|
628
|
-
* keyframes: { shimmer: { "0%": { backgroundPosition: "-400% 0" },
|
|
629
|
-
* "100%": { backgroundPosition: "400% 0" } } } } }
|
|
630
|
-
* ```
|
|
631
|
-
*/
|
|
632
|
-
const SKELETON = {
|
|
633
|
-
// ─ Pulse (fade) variant ────────────────────────────────────────────────────────────────
|
|
634
|
-
base: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60",
|
|
635
|
-
text: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-4",
|
|
636
|
-
heading: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-7",
|
|
637
|
-
image: "animate-pulse rounded-xl bg-zinc-200 dark:bg-slate-700/60",
|
|
638
|
-
card: "animate-pulse rounded-2xl bg-zinc-200 dark:bg-slate-700/60",
|
|
639
|
-
// ─ Shimmer (sweep) variant ──────────────────────────────────────────────────────────
|
|
640
|
-
shimmer:
|
|
641
|
-
"animate-shimmer bg-[length:400%_100%] rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
|
|
642
|
-
shimmerText:
|
|
643
|
-
"animate-shimmer bg-[length:400%_100%] h-4 rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
|
|
644
|
-
shimmerCard:
|
|
645
|
-
"animate-shimmer bg-[length:400%_100%] rounded-2xl bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
|
|
646
|
-
} as const;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Touch target sizes — WCAG 2.5.5 (minimum 44 × 44 px).
|
|
650
|
-
*/
|
|
651
|
-
const TOUCH = {
|
|
652
|
-
target: "min-h-[44px] min-w-[44px]",
|
|
653
|
-
targetSm: "min-h-[36px] min-w-[36px]",
|
|
654
|
-
targetH: "min-h-[44px]",
|
|
655
|
-
targetW: "min-w-[44px]",
|
|
656
|
-
/** 44 px height primary button */
|
|
657
|
-
button: "h-11 px-5 py-2.5",
|
|
658
|
-
/** 44×44 icon button */
|
|
659
|
-
icon: "h-11 w-11 flex items-center justify-center",
|
|
660
|
-
/** 44 px height input */
|
|
661
|
-
input: "h-11 px-3 py-2",
|
|
662
|
-
/** 48 px height tab */
|
|
663
|
-
tab: "h-12 px-4",
|
|
664
|
-
/** Secondary chip (smaller but acceptable) */
|
|
665
|
-
chip: "h-9 px-3",
|
|
666
|
-
} as const;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Scrollbar and safe-area utilities.
|
|
670
|
-
*/
|
|
671
|
-
const UTILITIES = {
|
|
672
|
-
scrollbarHide:
|
|
673
|
-
"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
674
|
-
scrollbarThin:
|
|
675
|
-
"scrollbar-thin [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-zinc-100 dark:[&::-webkit-scrollbar-track]:bg-slate-800/60 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:bg-zinc-300 dark:[&::-webkit-scrollbar-thumb]:bg-slate-600 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb:hover]:bg-zinc-400 dark:[&::-webkit-scrollbar-thumb:hover]:bg-slate-500",
|
|
676
|
-
scrollbarThinX:
|
|
677
|
-
"[&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-track]:bg-zinc-100 dark:[&::-webkit-scrollbar-track]:bg-slate-800/60 [&::-webkit-scrollbar-thumb]:bg-zinc-300 dark:[&::-webkit-scrollbar-thumb]:bg-slate-600 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb:hover]:bg-zinc-400 dark:[&::-webkit-scrollbar-thumb:hover]:bg-slate-500",
|
|
678
|
-
safeAreaBottom: "pb-[env(safe-area-inset-bottom)]",
|
|
679
|
-
safeAreaTop: "pt-[env(safe-area-inset-top)]",
|
|
680
|
-
safeAreaInline:
|
|
681
|
-
"px-[env(safe-area-inset-left)] px-[env(safe-area-inset-right)]",
|
|
682
|
-
gradientText:
|
|
683
|
-
"bg-gradient-to-r from-primary-600 to-primary-800 bg-clip-text text-transparent",
|
|
684
|
-
} as const;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* Common component pattern compositions.
|
|
688
|
-
*/
|
|
689
|
-
const PATTERNS = {
|
|
690
|
-
pageContainer: "min-h-screen bg-white dark:bg-slate-950",
|
|
691
|
-
sectionContainer: "max-w-7xl mx-auto px-4 md:px-6 lg:px-8 py-8 lg:py-12",
|
|
692
|
-
formContainer:
|
|
693
|
-
"bg-white dark:bg-slate-900 rounded-2xl border border-zinc-200 dark:border-slate-700 shadow-sm p-6 lg:p-8 space-y-6",
|
|
694
|
-
listItem:
|
|
695
|
-
"bg-white dark:bg-slate-900 border border-zinc-200 dark:border-slate-700 rounded-xl p-4 hover:border-zinc-300 dark:hover:border-slate-600 transition-colors",
|
|
696
|
-
linkDefault:
|
|
697
|
-
"text-primary-600 dark:text-secondary-400 hover:text-primary-500 dark:hover:text-secondary-300 transition-colors underline-offset-2 hover:underline",
|
|
698
|
-
iconButton:
|
|
699
|
-
"p-2 rounded-lg transition-colors hover:bg-zinc-100 dark:hover:bg-slate-800 active:bg-zinc-200 dark:active:bg-slate-700 min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
700
|
-
modalOverlay:
|
|
701
|
-
"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50",
|
|
702
|
-
modalContent:
|
|
703
|
-
"bg-white dark:bg-slate-900 rounded-2xl border border-zinc-200 dark:border-slate-700 shadow-xl max-w-lg w-full mx-4 overflow-hidden",
|
|
704
|
-
divider: "border-t border-zinc-200 dark:border-slate-700",
|
|
705
|
-
emptyState:
|
|
706
|
-
"flex flex-col items-center justify-center py-12 text-center text-zinc-500 dark:text-zinc-400",
|
|
707
|
-
} as const;
|
|
708
|
-
|
|
709
|
-
/** Icon colour variants and sizes. */
|
|
710
|
-
const ICON = {
|
|
711
|
-
muted: "text-zinc-400 dark:text-zinc-500",
|
|
712
|
-
primary: "text-primary-600 dark:text-secondary-400",
|
|
713
|
-
success: "text-emerald-500 dark:text-emerald-400",
|
|
714
|
-
danger: "text-red-500 dark:text-red-400",
|
|
715
|
-
warning: "text-amber-500 dark:text-amber-400",
|
|
716
|
-
size: {
|
|
717
|
-
sm: "w-4 h-4",
|
|
718
|
-
md: "w-6 h-6",
|
|
719
|
-
lg: "w-8 h-8",
|
|
720
|
-
xl: "w-16 h-16",
|
|
721
|
-
},
|
|
722
|
-
} as const;
|
|
723
|
-
|
|
724
|
-
/** Horizontal tab active / inactive states. */
|
|
725
|
-
const TAB = {
|
|
726
|
-
active:
|
|
727
|
-
"border-b-2 border-primary-600 dark:border-secondary-400 text-primary-600 dark:text-secondary-400 font-semibold",
|
|
728
|
-
inactive:
|
|
729
|
-
"border-transparent text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-300",
|
|
730
|
-
} as const;
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* Motion tokens — respect prefers-reduced-motion via motion-safe: prefix.
|
|
734
|
-
* Custom keyframes must be defined in tailwind.config.js:
|
|
735
|
-
* fade-in, slide-up, scale-in
|
|
736
|
-
*/
|
|
737
|
-
const MOTION = {
|
|
738
|
-
fadeIn: "motion-safe:animate-fade-in",
|
|
739
|
-
slideUp: "motion-safe:animate-slide-up",
|
|
740
|
-
scaleIn: "motion-safe:animate-scale-in",
|
|
741
|
-
skeleton: "motion-safe:animate-pulse",
|
|
742
|
-
transition: "motion-safe:transition-all motion-safe:duration-200",
|
|
743
|
-
transitionSlow:
|
|
744
|
-
"motion-safe:transition-all motion-safe:duration-500 motion-safe:ease-in-out",
|
|
745
|
-
} as const;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Mobile-first typography scale — maps to named semantic sizes.
|
|
749
|
-
* Use in place of raw text-* utilities.
|
|
750
|
-
*/
|
|
751
|
-
const TEXT = {
|
|
752
|
-
h1: "text-2xl sm:text-3xl xl:text-4xl font-bold tracking-tight leading-tight",
|
|
753
|
-
h2: "text-xl sm:text-2xl xl:text-3xl font-semibold tracking-tight",
|
|
754
|
-
h3: "text-lg sm:text-xl xl:text-2xl font-semibold",
|
|
755
|
-
h4: "text-base sm:text-lg font-semibold",
|
|
756
|
-
body: "text-sm sm:text-base leading-relaxed",
|
|
757
|
-
bodyLg: "text-base sm:text-lg leading-relaxed",
|
|
758
|
-
small: "text-xs sm:text-sm",
|
|
759
|
-
label: "text-xs font-medium uppercase tracking-wide",
|
|
760
|
-
price: "text-lg sm:text-xl font-bold tabular-nums",
|
|
761
|
-
priceLg: "text-2xl sm:text-3xl font-bold tabular-nums",
|
|
762
|
-
muted: "text-zinc-500 dark:text-zinc-400",
|
|
763
|
-
error: "text-red-600 dark:text-red-400",
|
|
764
|
-
success: "text-green-600 dark:text-green-400",
|
|
765
|
-
} as const;
|
|
766
|
-
|
|
767
|
-
/** Star rating colours. */
|
|
768
|
-
const RATING = {
|
|
769
|
-
filled: "text-yellow-400",
|
|
770
|
-
empty: "text-zinc-300 dark:text-zinc-600",
|
|
771
|
-
} as const;
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* THEME_CONSTANTS
|
|
775
|
-
*
|
|
776
|
-
* The complete, responsive-first design system constant map.
|
|
777
|
-
* Import in your project's `constants/theme.ts` and extend with
|
|
778
|
-
* brand-specific values (accentBanner gradients, badge role variants, etc.).
|
|
779
|
-
*
|
|
780
|
-
* @example
|
|
781
|
-
* ```ts
|
|
782
|
-
* // In your project constants/theme.ts:
|
|
783
|
-
* import { THEME_CONSTANTS } from "./";
|
|
784
|
-
*
|
|
785
|
-
* export { THEME_CONSTANTS }; // re-export as-is
|
|
786
|
-
*
|
|
787
|
-
* // or merge with project-specific extensions:
|
|
788
|
-
* export const THEME_CONSTANTS = {
|
|
789
|
-
* ...baseTheme,
|
|
790
|
-
* accentBanner: { ... }, // project-specific
|
|
791
|
-
* };
|
|
792
|
-
* ```
|
|
793
|
-
*/
|
|
794
|
-
export const THEME_CONSTANTS = {
|
|
795
|
-
themed: THEMED,
|
|
796
|
-
layout: LAYOUT,
|
|
797
|
-
typography: TYPOGRAPHY,
|
|
798
|
-
spacing: SPACING,
|
|
799
|
-
grid: GRID,
|
|
800
|
-
page: PAGE,
|
|
801
|
-
input: INPUT,
|
|
802
|
-
card: CARD,
|
|
803
|
-
flex: FLEX,
|
|
804
|
-
position: POSITION,
|
|
805
|
-
states: STATES,
|
|
806
|
-
transitions: TRANSITIONS,
|
|
807
|
-
skeleton: SKELETON,
|
|
808
|
-
motion: MOTION,
|
|
809
|
-
text: TEXT,
|
|
810
|
-
touch: TOUCH,
|
|
811
|
-
fluidGrid: FLUID_GRID,
|
|
812
|
-
/** Form layout tokens — pair with FormGrid / FormField components */
|
|
813
|
-
form: {
|
|
814
|
-
grid: "flex flex-wrap gap-4",
|
|
815
|
-
field: "flex-1 min-w-[280px] flex flex-col gap-1.5",
|
|
816
|
-
fieldWide: "w-full flex flex-col gap-1.5",
|
|
817
|
-
fieldHalf: "w-1/2 min-w-[280px] flex flex-col gap-1.5",
|
|
818
|
-
label: "text-sm font-medium text-zinc-700 dark:text-zinc-300",
|
|
819
|
-
hint: "text-xs text-zinc-500 dark:text-zinc-400",
|
|
820
|
-
error: "text-xs text-red-600 dark:text-red-400",
|
|
821
|
-
section: "space-y-6",
|
|
822
|
-
sectionHead:
|
|
823
|
-
"text-base font-semibold text-zinc-900 dark:text-zinc-100 border-b pb-2 mb-2 border-zinc-200 dark:border-zinc-700",
|
|
824
|
-
} as const,
|
|
825
|
-
/** Tooltip bubble styles — used by the <Tooltip> component. */
|
|
826
|
-
tooltip: {
|
|
827
|
-
content:
|
|
828
|
-
"z-50 px-2 py-1 text-xs font-medium rounded bg-zinc-900 dark:bg-zinc-100 text-white dark:text-zinc-900 shadow-sm",
|
|
829
|
-
arrow: "fill-zinc-900 dark:fill-zinc-100",
|
|
830
|
-
} as const,
|
|
831
|
-
utilities: UTILITIES,
|
|
832
|
-
patterns: PATTERNS,
|
|
833
|
-
icon: ICON,
|
|
834
|
-
tab: TAB,
|
|
835
|
-
rating: RATING,
|
|
836
|
-
/** Breakpoints for reference (matches Tailwind defaults). */
|
|
837
|
-
breakpoints: {
|
|
838
|
-
sm: "640px",
|
|
839
|
-
md: "768px",
|
|
840
|
-
lg: "1024px",
|
|
841
|
-
xl: "1280px",
|
|
842
|
-
"2xl": "1536px",
|
|
843
|
-
"3xl": "1920px",
|
|
844
|
-
},
|
|
845
|
-
/** Global body/html base classes. */
|
|
846
|
-
base: {
|
|
847
|
-
body: 'bg-white dark:bg-slate-950 text-zinc-900 dark:text-zinc-100 antialiased font-[Inter,ui-sans-serif,system-ui,-apple-system,"Segoe_UI",Roboto,"Helvetica_Neue",Arial,sans-serif]',
|
|
848
|
-
html: "scroll-smooth",
|
|
849
|
-
},
|
|
850
|
-
/** Hero / homepage section layout tokens. */
|
|
851
|
-
homepage: {
|
|
852
|
-
heroMinH: "min-h-[clamp(420px,72vh,680px)]" as const,
|
|
853
|
-
heroMinHMobile: "min-h-[clamp(120px,14vh,200px)]" as const,
|
|
854
|
-
},
|
|
855
|
-
/** Carousel navigation tokens — shared by HeroCarousel and SectionCarousel. */
|
|
856
|
-
carousel: {
|
|
857
|
-
arrow:
|
|
858
|
-
"w-10 h-10 rounded-2xl bg-white/85 dark:bg-slate-800/90 backdrop-blur-sm shadow-lg border border-zinc-300/70 dark:border-slate-600 text-zinc-800 dark:text-zinc-200 hover:-translate-y-0.5 hover:bg-white hover:shadow-xl hover:border-zinc-400 dark:hover:border-slate-500 active:scale-95 transition-all duration-200 flex items-center justify-center" as const,
|
|
859
|
-
dotActive:
|
|
860
|
-
"w-8 h-2 !min-h-0 rounded-full bg-white shadow-sm transition-all duration-500" as const,
|
|
861
|
-
dotInactive:
|
|
862
|
-
"w-2 h-2 !min-h-0 rounded-full bg-white/55 shadow-sm transition-all duration-500" as const,
|
|
863
|
-
},
|
|
864
|
-
} as const;
|