@mohasinac/appkit 2.1.1 → 2.2.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 +36 -65
- package/dist/cli/index.d.ts +6 -9
- package/dist/cli/index.js +167 -141
- package/dist/client.d.ts +15 -0
- package/dist/client.js +15 -0
- package/dist/constants/api-endpoint-resolver.d.ts +34 -0
- package/dist/constants/api-endpoint-resolver.js +38 -0
- package/dist/constants/api-endpoints.d.ts +388 -0
- package/dist/constants/api-endpoints.js +342 -0
- package/dist/constants/cache-invalidation.d.ts +18 -0
- package/dist/constants/cache-invalidation.js +33 -0
- package/dist/constants/index.d.ts +14 -0
- package/dist/constants/index.js +14 -0
- package/dist/contracts/auth.d.ts +58 -0
- package/dist/contracts/auth.js +2 -0
- package/dist/contracts/client-auth.d.ts +22 -0
- package/dist/contracts/client-auth.js +17 -0
- package/dist/contracts/client-payment-gateway.d.ts +65 -0
- package/dist/contracts/client-payment-gateway.js +25 -0
- package/dist/contracts/client-realtime.d.ts +24 -0
- package/dist/contracts/client-realtime.js +18 -0
- package/dist/contracts/client-session.d.ts +37 -0
- package/dist/contracts/client-session.js +22 -0
- package/dist/contracts/config.d.ts +53 -0
- package/dist/contracts/config.js +2 -0
- package/dist/contracts/email.d.ts +30 -0
- package/dist/contracts/email.js +2 -0
- package/dist/contracts/extend.d.ts +270 -0
- package/dist/contracts/extend.js +75 -0
- package/dist/contracts/feature.d.ts +53 -0
- package/dist/contracts/feature.js +2 -0
- package/dist/contracts/field-ops.d.ts +31 -0
- package/dist/contracts/field-ops.js +35 -0
- package/dist/contracts/form.d.ts +89 -0
- package/dist/contracts/form.js +80 -0
- package/dist/contracts/index.d.ts +32 -728
- package/dist/contracts/index.js +13 -4
- package/dist/contracts/infra.d.ts +43 -0
- package/dist/contracts/infra.js +2 -0
- package/dist/contracts/payment.d.ts +39 -0
- package/dist/contracts/payment.js +2 -0
- package/dist/contracts/registry.d.ts +26 -0
- package/dist/contracts/registry.js +14 -0
- package/dist/contracts/repository.d.ts +127 -0
- package/dist/contracts/repository.js +28 -0
- package/dist/contracts/search.d.ts +44 -0
- package/dist/contracts/search.js +2 -0
- package/dist/contracts/shipping.d.ts +64 -0
- package/dist/contracts/shipping.js +2 -0
- package/dist/contracts/storage.d.ts +27 -0
- package/dist/contracts/storage.js +2 -0
- package/dist/contracts/style.d.ts +23 -0
- package/dist/contracts/style.js +2 -0
- package/dist/contracts/table.d.ts +104 -0
- package/dist/contracts/table.js +68 -0
- package/dist/core/CacheManager.d.ts +31 -0
- package/dist/core/CacheManager.js +63 -0
- package/dist/core/EventBus.d.ts +27 -0
- package/dist/core/EventBus.js +75 -0
- package/dist/core/Logger.d.ts +60 -0
- package/dist/core/Logger.js +153 -0
- package/dist/core/Queue.d.ts +43 -0
- package/dist/core/Queue.js +92 -0
- package/dist/core/StorageManager.d.ts +36 -0
- package/dist/core/StorageManager.js +159 -0
- package/dist/core/baseline-resolver.d.ts +52 -0
- package/dist/core/baseline-resolver.js +74 -0
- package/dist/core/browser.d.ts +18 -0
- package/dist/core/browser.js +9 -0
- package/dist/core/copilot-log.repository.d.ts +44 -0
- package/dist/core/copilot-log.repository.js +61 -0
- package/dist/core/hooks/useSiteSettings.d.ts +1 -0
- package/dist/core/hooks/useSiteSettings.js +11 -0
- package/dist/core/index.d.ts +31 -326
- package/dist/core/index.js +21 -7
- package/dist/core/integration-keys.d.ts +30 -0
- package/dist/core/integration-keys.js +55 -0
- package/dist/core/mutation-events.d.ts +147 -0
- package/dist/core/mutation-events.js +193 -0
- package/dist/core/newsletter-actions.d.ts +20 -0
- package/dist/core/newsletter-actions.js +28 -0
- package/dist/core/newsletter.repository.d.ts +55 -0
- package/dist/core/newsletter.repository.js +109 -0
- package/dist/core/server-action.d.ts +114 -0
- package/dist/core/server-action.js +119 -0
- package/dist/core/site-config.d.ts +33 -0
- package/dist/core/site-config.js +74 -0
- package/dist/core/unit-of-work.d.ts +32 -0
- package/dist/core/unit-of-work.js +114 -0
- package/dist/errors/api-error.d.ts +4 -0
- package/dist/errors/api-error.js +6 -0
- package/dist/errors/authentication-error.d.ts +4 -0
- package/dist/errors/authentication-error.js +6 -0
- package/dist/errors/authorization-error.d.ts +4 -0
- package/dist/errors/authorization-error.js +6 -0
- package/dist/errors/base-error.d.ts +14 -0
- package/dist/errors/base-error.js +22 -0
- package/dist/errors/database-error.d.ts +4 -0
- package/dist/errors/database-error.js +6 -0
- package/dist/errors/error-codes.d.ts +43 -0
- package/dist/errors/error-codes.js +93 -0
- package/dist/errors/error-handler.d.ts +16 -0
- package/dist/errors/error-handler.js +57 -0
- package/dist/errors/index.d.ts +11 -96
- package/dist/errors/index.js +15 -4
- package/dist/errors/messages.d.ts +469 -0
- package/dist/errors/messages.js +503 -0
- package/dist/errors/not-found-error.d.ts +4 -0
- package/dist/errors/not-found-error.js +6 -0
- package/dist/errors/validation-error.d.ts +4 -0
- package/dist/errors/validation-error.js +6 -0
- package/dist/features/about/components/AboutView.d.ts +38 -0
- package/dist/features/about/components/AboutView.js +5 -0
- package/dist/features/about/index.d.ts +2 -42
- package/dist/features/about/index.js +1 -280
- package/dist/features/account/actions/address-actions.d.ts +7 -0
- package/dist/features/account/actions/address-actions.js +24 -0
- package/dist/features/account/actions/index.d.ts +1 -0
- package/dist/features/account/actions/index.js +1 -0
- package/dist/features/account/address-validation.d.ts +20 -0
- package/dist/features/account/address-validation.js +35 -0
- package/dist/features/account/api/[userId]/addresses/route.d.ts +21 -0
- package/dist/features/account/api/[userId]/addresses/route.js +91 -0
- package/dist/features/account/api/[userId]/route.d.ts +23 -0
- package/dist/features/account/api/[userId]/route.js +67 -0
- package/dist/features/account/columns/index.d.ts +17 -0
- package/dist/features/account/columns/index.js +39 -0
- package/dist/features/account/components/AddressBook.d.ts +39 -0
- package/dist/features/account/components/AddressBook.js +14 -0
- package/dist/features/account/components/AddressForm.d.ts +39 -0
- package/dist/features/account/components/AddressForm.js +55 -0
- package/dist/features/account/components/AddressSelectorCreate.d.ts +16 -0
- package/dist/features/account/components/AddressSelectorCreate.js +40 -0
- package/dist/features/account/components/BecomeSellerView.d.ts +17 -0
- package/dist/features/account/components/BecomeSellerView.js +5 -0
- package/dist/features/account/components/ChatList.d.ts +14 -0
- package/dist/features/account/components/ChatList.js +10 -0
- package/dist/features/account/components/ChatWindow.d.ts +17 -0
- package/dist/features/account/components/ChatWindow.js +6 -0
- package/dist/features/account/components/MessagesView.d.ts +16 -0
- package/dist/features/account/components/MessagesView.js +5 -0
- package/dist/features/account/components/NotificationBell.d.ts +32 -0
- package/dist/features/account/components/NotificationBell.js +80 -0
- package/dist/features/account/components/OrderDetailView.d.ts +18 -0
- package/dist/features/account/components/OrderDetailView.js +12 -0
- package/dist/features/account/components/ProfileView.d.ts +12 -0
- package/dist/features/account/components/ProfileView.js +5 -0
- package/dist/features/account/components/UserAccountHubView.d.ts +13 -0
- package/dist/features/account/components/UserAccountHubView.js +5 -0
- package/dist/features/account/components/UserAddressesView.d.ts +13 -0
- package/dist/features/account/components/UserAddressesView.js +5 -0
- package/dist/features/account/components/UserNotificationsView.d.ts +15 -0
- package/dist/features/account/components/UserNotificationsView.js +12 -0
- package/dist/features/account/components/UserOffersView.d.ts +10 -0
- package/dist/features/account/components/UserOffersView.js +5 -0
- package/dist/features/account/components/UserOrderTrackView.d.ts +16 -0
- package/dist/features/account/components/UserOrderTrackView.js +8 -0
- package/dist/features/account/components/UserOrdersView.d.ts +12 -0
- package/dist/features/account/components/UserOrdersView.js +5 -0
- package/dist/features/account/components/UserSettingsView.d.ts +15 -0
- package/dist/features/account/components/UserSettingsView.js +12 -0
- package/dist/features/account/components/index.d.ts +34 -0
- package/dist/features/account/components/index.js +17 -0
- package/dist/features/account/constants/addresses.d.ts +13 -0
- package/dist/features/account/constants/addresses.js +43 -0
- package/dist/features/account/hooks/useAccount.d.ts +13 -0
- package/dist/features/account/hooks/useAccount.js +19 -0
- package/dist/features/account/hooks/useAddressForm.d.ts +24 -0
- package/dist/features/account/hooks/useAddressForm.js +58 -0
- package/dist/features/account/hooks/useAddressSelector.d.ts +25 -0
- package/dist/features/account/hooks/useAddressSelector.js +30 -0
- package/dist/features/account/hooks/useAddresses.d.ts +59 -0
- package/dist/features/account/hooks/useAddresses.js +73 -0
- package/dist/features/account/hooks/useNotifications.d.ts +23 -0
- package/dist/features/account/hooks/useNotifications.js +31 -0
- package/dist/features/account/hooks/useProfile.d.ts +25 -0
- package/dist/features/account/hooks/useProfile.js +24 -0
- package/dist/features/account/hooks/useProfileStats.d.ts +6 -0
- package/dist/features/account/hooks/useProfileStats.js +21 -0
- package/dist/features/account/hooks/usePublicProfile.d.ts +78 -0
- package/dist/features/account/hooks/usePublicProfile.js +51 -0
- package/dist/features/account/index.d.ts +15 -555
- package/dist/features/account/index.js +15 -1003
- package/dist/features/account/manifest.d.ts +2 -0
- package/dist/features/account/manifest.js +27 -0
- package/dist/features/account/messages/en.json +12 -0
- package/dist/features/account/repository/account.repository.d.ts +11 -0
- package/dist/features/account/repository/account.repository.js +20 -0
- package/dist/features/account/repository/address.repository.d.ts +17 -0
- package/dist/features/account/repository/address.repository.js +185 -0
- package/dist/features/account/schemas/firestore.d.ts +48 -0
- package/dist/features/account/schemas/firestore.js +59 -0
- package/dist/features/account/schemas/index.d.ts +198 -0
- package/dist/features/account/schemas/index.js +51 -0
- package/dist/features/account/server.d.ts +9 -0
- package/dist/features/account/server.js +9 -0
- package/dist/features/account/types/index.d.ts +83 -0
- package/dist/features/account/types/index.js +2 -0
- package/dist/features/admin/actions/admin-actions.d.ts +35 -0
- package/dist/features/admin/actions/admin-actions.js +174 -0
- package/dist/features/admin/actions/admin-coupon-actions.d.ts +17 -0
- package/dist/features/admin/actions/admin-coupon-actions.js +87 -0
- package/dist/features/admin/actions/admin-read-actions.d.ts +105 -0
- package/dist/features/admin/actions/admin-read-actions.js +172 -0
- package/dist/features/admin/actions/chat-actions.d.ts +29 -0
- package/dist/features/admin/actions/chat-actions.js +97 -0
- package/dist/features/admin/actions/index.d.ts +6 -0
- package/dist/features/admin/actions/index.js +6 -0
- package/dist/features/admin/actions/notification-actions.d.ts +31 -0
- package/dist/features/admin/actions/notification-actions.js +42 -0
- package/dist/features/admin/actions/site-settings-actions.d.ts +8 -0
- package/dist/features/admin/actions/site-settings-actions.js +16 -0
- package/dist/features/admin/api/bids/route.d.ts +14 -0
- package/dist/features/admin/api/bids/route.js +53 -0
- package/dist/features/admin/api/coupons/route.d.ts +14 -0
- package/dist/features/admin/api/coupons/route.js +53 -0
- package/dist/features/admin/api/products/route.d.ts +14 -0
- package/dist/features/admin/api/products/route.js +54 -0
- package/dist/features/admin/api/reviews/route.d.ts +14 -0
- package/dist/features/admin/api/reviews/route.js +53 -0
- package/dist/features/admin/components/AdminAnalyticsView.d.ts +29 -0
- package/dist/features/admin/components/AdminAnalyticsView.js +15 -0
- package/dist/features/admin/components/AdminBidsView.d.ts +4 -0
- package/dist/features/admin/components/AdminBidsView.js +5 -0
- package/dist/features/admin/components/AdminBlogView.d.ts +4 -0
- package/dist/features/admin/components/AdminBlogView.js +5 -0
- package/dist/features/admin/components/AdminCarouselView.d.ts +9 -0
- package/dist/features/admin/components/AdminCarouselView.js +5 -0
- package/dist/features/admin/components/AdminCategoriesView.d.ts +9 -0
- package/dist/features/admin/components/AdminCategoriesView.js +5 -0
- package/dist/features/admin/components/AdminCouponsView.d.ts +4 -0
- package/dist/features/admin/components/AdminCouponsView.js +5 -0
- package/dist/features/admin/components/AdminDashboardView.d.ts +16 -0
- package/dist/features/admin/components/AdminDashboardView.js +11 -0
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -0
- package/dist/features/admin/components/AdminFaqsView.js +5 -0
- package/dist/features/admin/components/AdminFeatureFlagsView.d.ts +9 -0
- package/dist/features/admin/components/AdminFeatureFlagsView.js +5 -0
- package/dist/features/admin/components/AdminFilterBar.d.ts +65 -0
- package/dist/features/admin/components/AdminFilterBar.js +22 -0
- package/dist/features/admin/components/AdminMediaView.d.ts +9 -0
- package/dist/features/admin/components/AdminMediaView.js +5 -0
- package/dist/features/admin/components/AdminNavigationView.d.ts +9 -0
- package/dist/features/admin/components/AdminNavigationView.js +5 -0
- package/dist/features/admin/components/AdminOrdersView.d.ts +4 -0
- package/dist/features/admin/components/AdminOrdersView.js +5 -0
- package/dist/features/admin/components/AdminPageHeader.d.ts +53 -0
- package/dist/features/admin/components/AdminPageHeader.js +12 -0
- package/dist/features/admin/components/AdminPayoutsView.d.ts +4 -0
- package/dist/features/admin/components/AdminPayoutsView.js +5 -0
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -0
- package/dist/features/admin/components/AdminProductsView.js +5 -0
- package/dist/features/admin/components/AdminReviewsView.d.ts +7 -0
- package/dist/features/admin/components/AdminReviewsView.js +5 -0
- package/dist/features/admin/components/AdminSectionsView.d.ts +9 -0
- package/dist/features/admin/components/AdminSectionsView.js +5 -0
- package/dist/features/admin/components/AdminSessionsManager.d.ts +9 -0
- package/dist/features/admin/components/AdminSessionsManager.js +5 -0
- package/dist/features/admin/components/AdminSidebar.d.ts +9 -0
- package/dist/features/admin/components/AdminSidebar.js +6 -0
- package/dist/features/admin/components/AdminSiteView.d.ts +10 -0
- package/dist/features/admin/components/AdminSiteView.js +5 -0
- package/dist/features/admin/components/AdminStoresView.d.ts +4 -0
- package/dist/features/admin/components/AdminStoresView.js +5 -0
- package/dist/features/admin/components/AdminTopBar.d.ts +8 -0
- package/dist/features/admin/components/AdminTopBar.js +8 -0
- package/dist/features/admin/components/AdminUsersView.d.ts +4 -0
- package/dist/features/admin/components/AdminUsersView.js +5 -0
- package/dist/features/admin/components/DashboardStats.d.ts +8 -0
- package/dist/features/admin/components/DashboardStats.js +21 -0
- package/dist/features/admin/components/DataTable.d.ts +19 -0
- package/dist/features/admin/components/DataTable.js +7 -0
- package/dist/features/admin/components/DemoSeedView.d.ts +11 -0
- package/dist/features/admin/components/DemoSeedView.js +5 -0
- package/dist/features/admin/components/DrawerFormFooter.d.ts +54 -0
- package/dist/features/admin/components/DrawerFormFooter.js +6 -0
- package/dist/features/admin/components/QuickActionsPanel.d.ts +15 -0
- package/dist/features/admin/components/QuickActionsPanel.js +6 -0
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.d.ts +17 -0
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +33 -0
- package/dist/features/admin/components/analytics/AdminStatCard.d.ts +8 -0
- package/dist/features/admin/components/analytics/AdminStatCard.js +6 -0
- package/dist/features/admin/components/analytics/AdminTopProductsTable.d.ts +16 -0
- package/dist/features/admin/components/analytics/AdminTopProductsTable.js +6 -0
- package/dist/features/admin/components/analytics/index.d.ts +3 -0
- package/dist/features/admin/components/analytics/index.js +3 -0
- package/dist/features/admin/components/index.d.ts +62 -0
- package/dist/features/admin/components/index.js +32 -0
- package/dist/features/admin/hooks/useAdmin.d.ts +9 -0
- package/dist/features/admin/hooks/useAdmin.js +14 -0
- package/dist/features/admin/hooks/useChat.d.ts +24 -0
- package/dist/features/admin/hooks/useChat.js +97 -0
- package/dist/features/admin/index.d.ts +8 -554
- package/dist/features/admin/index.js +7 -2703
- package/dist/features/admin/manifest.d.ts +2 -0
- package/dist/features/admin/manifest.js +13 -0
- package/dist/features/admin/messages/en.json +13 -0
- package/dist/features/admin/permission-map.d.ts +3 -0
- package/dist/features/admin/permission-map.js +24 -0
- package/dist/features/admin/repository/chat.repository.d.ts +70 -0
- package/dist/features/admin/repository/chat.repository.js +216 -0
- package/dist/features/admin/repository/notification.repository.d.ts +64 -0
- package/dist/features/admin/repository/notification.repository.js +225 -0
- package/dist/features/admin/repository/site-settings.repository.d.ts +118 -0
- package/dist/features/admin/repository/site-settings.repository.js +214 -0
- package/dist/features/admin/schemas/firestore.d.ts +311 -0
- package/dist/features/admin/schemas/firestore.js +246 -0
- package/dist/features/admin/schemas/index.d.ts +1 -0
- package/dist/features/admin/schemas/index.js +1 -0
- package/dist/features/admin/server.d.ts +15 -0
- package/dist/features/admin/server.js +14 -0
- package/dist/features/admin/types/index.d.ts +61 -0
- package/dist/features/admin/types/index.js +1 -0
- package/dist/features/admin/types/product.types.d.ts +78 -0
- package/dist/features/admin/types/product.types.js +13 -0
- package/dist/features/auctions/actions/bid-actions.d.ts +22 -0
- package/dist/features/auctions/actions/bid-actions.js +106 -0
- package/dist/features/auctions/actions/index.d.ts +1 -0
- package/dist/features/auctions/actions/index.js +1 -0
- package/dist/features/auctions/api/route.d.ts +14 -0
- package/dist/features/auctions/api/route.js +67 -0
- package/dist/features/auctions/columns/index.d.ts +14 -0
- package/dist/features/auctions/columns/index.js +63 -0
- package/dist/features/auctions/components/AuctionCard.d.ts +26 -0
- package/dist/features/auctions/components/AuctionCard.js +35 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +56 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +112 -0
- package/dist/features/auctions/components/MarketplaceAuctionGrid.d.ts +22 -0
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +37 -0
- package/dist/features/auctions/components/index.d.ts +3 -0
- package/dist/features/auctions/components/index.js +3 -0
- package/dist/features/auctions/hooks/useAuctions.d.ts +50 -0
- package/dist/features/auctions/hooks/useAuctions.js +93 -0
- package/dist/features/auctions/hooks/usePlaceBid.d.ts +24 -0
- package/dist/features/auctions/hooks/usePlaceBid.js +29 -0
- package/dist/features/auctions/hooks/useRealtimeBids.d.ts +38 -0
- package/dist/features/auctions/hooks/useRealtimeBids.js +66 -0
- package/dist/features/auctions/index.d.ts +8 -513
- package/dist/features/auctions/index.js +8 -1194
- package/dist/features/auctions/manifest.d.ts +2 -0
- package/dist/features/auctions/manifest.js +17 -0
- package/dist/features/auctions/messages/en.json +18 -0
- package/dist/features/auctions/repository/auctions.repository.d.ts +12 -0
- package/dist/features/auctions/repository/auctions.repository.js +42 -0
- package/dist/features/auctions/repository/bid.repository.d.ts +145 -0
- package/dist/features/auctions/repository/bid.repository.js +370 -0
- package/dist/features/auctions/schemas/firestore.d.ts +48 -0
- package/dist/features/auctions/schemas/firestore.js +50 -0
- package/dist/features/auctions/schemas/index.d.ts +155 -0
- package/dist/features/auctions/schemas/index.js +64 -0
- package/dist/features/auctions/server.d.ts +10 -0
- package/dist/features/auctions/server.js +10 -0
- package/dist/features/auctions/types/index.d.ts +73 -0
- package/dist/features/auctions/types/index.js +1 -0
- package/dist/features/auth/actions/index.d.ts +2 -0
- package/dist/features/auth/actions/index.js +2 -0
- package/dist/features/auth/actions/profile-actions.d.ts +27 -0
- package/dist/features/auth/actions/profile-actions.js +50 -0
- package/dist/features/auth/actions/realtime-token-actions.d.ts +11 -0
- package/dist/features/auth/actions/realtime-token-actions.js +31 -0
- package/dist/features/auth/api/route.d.ts +22 -0
- package/dist/features/auth/api/route.js +48 -0
- package/dist/features/auth/auth-helpers.d.ts +14 -0
- package/dist/features/auth/auth-helpers.js +68 -0
- package/dist/features/auth/components/AuthStatusPanel.d.ts +10 -0
- package/dist/features/auth/components/AuthStatusPanel.js +22 -0
- package/dist/features/auth/components/ForgotPasswordView.d.ts +18 -0
- package/dist/features/auth/components/ForgotPasswordView.js +15 -0
- package/dist/features/auth/components/Guards.d.ts +86 -0
- package/dist/features/auth/components/Guards.js +91 -0
- package/dist/features/auth/components/LoginForm.d.ts +36 -0
- package/dist/features/auth/components/LoginForm.js +18 -0
- package/dist/features/auth/components/RegisterForm.d.ts +36 -0
- package/dist/features/auth/components/RegisterForm.js +27 -0
- package/dist/features/auth/components/ResetPasswordView.d.ts +23 -0
- package/dist/features/auth/components/ResetPasswordView.js +22 -0
- package/dist/features/auth/components/SocialAuthButtons.d.ts +8 -0
- package/dist/features/auth/components/SocialAuthButtons.js +6 -0
- package/dist/features/auth/components/VerifyEmailView.d.ts +20 -0
- package/dist/features/auth/components/VerifyEmailView.js +8 -0
- package/dist/features/auth/components/index.d.ts +14 -0
- package/dist/features/auth/components/index.js +8 -0
- package/dist/features/auth/consent-otp.d.ts +52 -0
- package/dist/features/auth/consent-otp.js +120 -0
- package/dist/features/auth/hooks/useAuth.d.ts +81 -0
- package/dist/features/auth/hooks/useAuth.js +164 -0
- package/dist/features/auth/hooks/useAuthEvent.d.ts +22 -0
- package/dist/features/auth/hooks/useAuthEvent.js +31 -0
- package/dist/features/auth/hooks/useLogout.d.ts +16 -0
- package/dist/features/auth/hooks/useLogout.js +22 -0
- package/dist/features/auth/hooks/useRBAC.d.ts +38 -0
- package/dist/features/auth/hooks/useRBAC.js +80 -0
- package/dist/features/auth/index.d.ts +10 -315
- package/dist/features/auth/index.js +10 -1874
- package/dist/features/auth/manifest.d.ts +2 -0
- package/dist/features/auth/manifest.js +21 -0
- package/dist/features/auth/messages/en.json +13 -0
- package/dist/features/auth/repository/index.d.ts +4 -0
- package/dist/features/auth/repository/index.js +4 -0
- package/dist/features/auth/repository/session.repository.d.ts +44 -0
- package/dist/features/auth/repository/session.repository.js +246 -0
- package/dist/features/auth/repository/sms-counter.repository.d.ts +15 -0
- package/dist/features/auth/repository/sms-counter.repository.js +54 -0
- package/dist/features/auth/repository/token.repository.d.ts +38 -0
- package/dist/features/auth/repository/token.repository.js +186 -0
- package/dist/features/auth/repository/user.repository.d.ts +46 -0
- package/dist/features/auth/repository/user.repository.js +233 -0
- package/dist/features/auth/schemas/firestore.d.ts +351 -0
- package/dist/features/auth/schemas/firestore.js +272 -0
- package/dist/features/auth/schemas/index.d.ts +72 -0
- package/dist/features/auth/schemas/index.js +41 -0
- package/dist/features/auth/server.d.ts +15 -18
- package/dist/features/auth/server.js +21 -529
- package/dist/features/auth/token-helpers.d.ts +7 -0
- package/dist/features/auth/token-helpers.js +37 -0
- package/dist/features/auth/token-store.d.ts +39 -0
- package/dist/features/auth/token-store.js +120 -0
- package/dist/features/auth/types/index.d.ts +30 -0
- package/dist/features/auth/types/index.js +1 -0
- package/dist/features/before-after/api/[id]/route.d.ts +26 -0
- package/dist/features/before-after/api/[id]/route.js +88 -0
- package/dist/features/before-after/api/route.d.ts +13 -0
- package/dist/features/before-after/api/route.js +79 -0
- package/dist/features/before-after/columns/index.d.ts +17 -0
- package/dist/features/before-after/columns/index.js +50 -0
- package/dist/features/before-after/components/BeforeAfterGallery.d.ts +7 -0
- package/dist/features/before-after/components/BeforeAfterGallery.js +8 -0
- package/dist/features/before-after/components/BeforeAfterSlider.d.ts +7 -0
- package/dist/features/before-after/components/BeforeAfterSlider.js +27 -0
- package/dist/features/before-after/components/index.d.ts +2 -0
- package/dist/features/before-after/components/index.js +2 -0
- package/dist/features/before-after/hooks/useBeforeAfter.d.ts +15 -0
- package/dist/features/before-after/hooks/useBeforeAfter.js +25 -0
- package/dist/features/before-after/index.d.ts +6 -128
- package/dist/features/before-after/index.js +6 -546
- package/dist/features/before-after/manifest.d.ts +2 -0
- package/dist/features/before-after/manifest.js +10 -0
- package/dist/features/before-after/messages/en.json +8 -0
- package/dist/features/before-after/repository/before-after.repository.d.ts +13 -0
- package/dist/features/before-after/repository/before-after.repository.js +36 -0
- package/dist/features/before-after/schemas/index.d.ts +48 -0
- package/dist/features/before-after/schemas/index.js +24 -0
- package/dist/features/before-after/server.d.ts +7 -0
- package/dist/features/before-after/server.js +7 -0
- package/dist/features/before-after/types/index.d.ts +18 -0
- package/dist/features/before-after/types/index.js +1 -0
- package/dist/features/blog/actions/blog-actions.d.ts +302 -0
- package/dist/features/blog/actions/blog-actions.js +119 -0
- package/dist/features/blog/actions/index.d.ts +1 -0
- package/dist/features/blog/actions/index.js +1 -0
- package/dist/features/blog/api/[slug]/route.d.ts +23 -0
- package/dist/features/blog/api/[slug]/route.js +40 -0
- package/dist/features/blog/api/route.d.ts +12 -0
- package/dist/features/blog/api/route.js +64 -0
- package/dist/features/blog/columns/index.d.ts +27 -0
- package/dist/features/blog/columns/index.js +54 -0
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +17 -0
- package/dist/features/blog/components/BlogFeaturedCard.js +24 -0
- package/dist/features/blog/components/BlogFilters.d.ts +106 -0
- package/dist/features/blog/components/BlogFilters.js +67 -0
- package/dist/features/blog/components/BlogListView.d.ts +29 -0
- package/dist/features/blog/components/BlogListView.js +38 -0
- package/dist/features/blog/components/BlogPostForm.d.ts +56 -0
- package/dist/features/blog/components/BlogPostForm.js +24 -0
- package/dist/features/blog/components/BlogPostView.d.ts +32 -0
- package/dist/features/blog/components/BlogPostView.js +39 -0
- package/dist/features/blog/components/index.d.ts +9 -0
- package/dist/features/blog/components/index.js +5 -0
- package/dist/features/blog/hooks/useBlog.d.ts +27 -0
- package/dist/features/blog/hooks/useBlog.js +51 -0
- package/dist/features/blog/index.d.ts +6 -492
- package/dist/features/blog/index.js +6 -4062
- package/dist/features/blog/manifest.d.ts +2 -0
- package/dist/features/blog/manifest.js +14 -0
- package/dist/features/blog/messages/en.json +14 -0
- package/dist/features/blog/repository/blog.repository.d.ts +79 -0
- package/dist/features/blog/repository/blog.repository.js +130 -0
- package/dist/features/blog/schemas/firestore.d.ts +87 -0
- package/dist/features/blog/schemas/firestore.js +99 -0
- package/dist/features/blog/schemas/index.d.ts +207 -0
- package/dist/features/blog/schemas/index.js +71 -0
- package/dist/features/blog/server.d.ts +8 -71
- package/dist/features/blog/server.js +10 -180
- package/dist/features/blog/types/index.d.ts +47 -0
- package/dist/features/blog/types/index.js +1 -0
- package/dist/features/cart/actions/cart-actions.d.ts +16 -0
- package/dist/features/cart/actions/cart-actions.js +52 -0
- package/dist/features/cart/actions/index.d.ts +1 -0
- package/dist/features/cart/actions/index.js +1 -0
- package/dist/features/cart/api/[id]/route.d.ts +21 -0
- package/dist/features/cart/api/[id]/route.js +62 -0
- package/dist/features/cart/api/route.d.ts +13 -0
- package/dist/features/cart/api/route.js +79 -0
- package/dist/features/cart/columns/index.d.ts +17 -0
- package/dist/features/cart/columns/index.js +53 -0
- package/dist/features/cart/components/CartDrawer.d.ts +27 -0
- package/dist/features/cart/components/CartDrawer.js +14 -0
- package/dist/features/cart/components/CartSummary.d.ts +19 -0
- package/dist/features/cart/components/CartSummary.js +5 -0
- package/dist/features/cart/components/CartView.d.ts +17 -0
- package/dist/features/cart/components/CartView.js +7 -0
- package/dist/features/cart/components/CheckoutAddressStep.d.ts +20 -0
- package/dist/features/cart/components/CheckoutAddressStep.js +12 -0
- package/dist/features/cart/components/CheckoutOtpModal.d.ts +15 -0
- package/dist/features/cart/components/CheckoutOtpModal.js +12 -0
- package/dist/features/cart/components/CheckoutSuccessView.d.ts +12 -0
- package/dist/features/cart/components/CheckoutSuccessView.js +9 -0
- package/dist/features/cart/components/CheckoutView.d.ts +15 -0
- package/dist/features/cart/components/CheckoutView.js +18 -0
- package/dist/features/cart/components/index.d.ts +13 -0
- package/dist/features/cart/components/index.js +7 -0
- package/dist/features/cart/hooks/useAddToCart.d.ts +27 -0
- package/dist/features/cart/hooks/useAddToCart.js +52 -0
- package/dist/features/cart/hooks/useCart.d.ts +17 -0
- package/dist/features/cart/hooks/useCart.js +24 -0
- package/dist/features/cart/hooks/useCartCount.d.ts +7 -0
- package/dist/features/cart/hooks/useCartCount.js +19 -0
- package/dist/features/cart/hooks/useCartQuery.d.ts +8 -0
- package/dist/features/cart/hooks/useCartQuery.js +11 -0
- package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +14 -0
- package/dist/features/cart/hooks/useCheckoutReadQueries.js +18 -0
- package/dist/features/cart/hooks/useGuestCart.d.ts +18 -0
- package/dist/features/cart/hooks/useGuestCart.js +32 -0
- package/dist/features/cart/hooks/useGuestCartMerge.d.ts +15 -0
- package/dist/features/cart/hooks/useGuestCartMerge.js +50 -0
- package/dist/features/cart/hooks/useOrder.d.ts +13 -0
- package/dist/features/cart/hooks/useOrder.js +24 -0
- package/dist/features/cart/index.d.ts +14 -451
- package/dist/features/cart/index.js +14 -1064
- package/dist/features/cart/manifest.d.ts +2 -0
- package/dist/features/cart/manifest.js +10 -0
- package/dist/features/cart/messages/en.json +10 -0
- package/dist/features/cart/repository/cart.repository.d.ts +23 -0
- package/dist/features/cart/repository/cart.repository.js +210 -0
- package/dist/features/cart/schemas/firestore.d.ts +83 -0
- package/dist/features/cart/schemas/firestore.js +36 -0
- package/dist/features/cart/schemas/index.d.ts +184 -0
- package/dist/features/cart/schemas/index.js +35 -0
- package/dist/features/cart/server.d.ts +8 -0
- package/dist/features/cart/server.js +8 -0
- package/dist/features/cart/types/index.d.ts +27 -0
- package/dist/features/cart/types/index.js +1 -0
- package/dist/features/cart/utils/guest-cart.d.ts +26 -0
- package/dist/features/cart/utils/guest-cart.js +83 -0
- package/dist/features/categories/actions/category-actions.d.ts +17 -0
- package/dist/features/categories/actions/category-actions.js +63 -0
- package/dist/features/categories/actions/index.d.ts +1 -0
- package/dist/features/categories/actions/index.js +1 -0
- package/dist/features/categories/api/[id]/route.d.ts +23 -0
- package/dist/features/categories/api/[id]/route.js +98 -0
- package/dist/features/categories/api/route.d.ts +19 -0
- package/dist/features/categories/api/route.js +200 -0
- package/dist/features/categories/columns/index.d.ts +15 -0
- package/dist/features/categories/columns/index.js +38 -0
- package/dist/features/categories/components/BreadcrumbTrail.d.ts +47 -0
- package/dist/features/categories/components/BreadcrumbTrail.js +36 -0
- package/dist/features/categories/components/CategoriesListView.d.ts +31 -0
- package/dist/features/categories/components/CategoriesListView.js +27 -0
- package/dist/features/categories/components/CategoryFilters.d.ts +68 -0
- package/dist/features/categories/components/CategoryFilters.js +75 -0
- package/dist/features/categories/components/CategoryForm.d.ts +24 -0
- package/dist/features/categories/components/CategoryForm.js +42 -0
- package/dist/features/categories/components/CategoryGrid.d.ts +14 -0
- package/dist/features/categories/components/CategoryGrid.js +14 -0
- package/dist/features/categories/components/CategoryProductsView.d.ts +49 -0
- package/dist/features/categories/components/CategoryProductsView.js +21 -0
- package/dist/features/categories/components/CategorySelectorCreate.d.ts +17 -0
- package/dist/features/categories/components/CategorySelectorCreate.js +57 -0
- package/dist/features/categories/components/CategorySortSelect.d.ts +9 -0
- package/dist/features/categories/components/CategorySortSelect.js +8 -0
- package/dist/features/categories/components/CategoryTableColumns.d.ts +30 -0
- package/dist/features/categories/components/CategoryTableColumns.js +54 -0
- package/dist/features/categories/components/CategoryTree.d.ts +15 -0
- package/dist/features/categories/components/CategoryTree.js +49 -0
- package/dist/features/categories/components/ConcernCard.d.ts +8 -0
- package/dist/features/categories/components/ConcernCard.js +5 -0
- package/dist/features/categories/components/ConcernGrid.d.ts +8 -0
- package/dist/features/categories/components/ConcernGrid.js +8 -0
- package/dist/features/categories/components/index.d.ts +22 -0
- package/dist/features/categories/components/index.js +12 -0
- package/dist/features/categories/hooks/useCategories.d.ts +26 -0
- package/dist/features/categories/hooks/useCategories.js +50 -0
- package/dist/features/categories/hooks/useCategorySelector.d.ts +26 -0
- package/dist/features/categories/hooks/useCategorySelector.js +42 -0
- package/dist/features/categories/index.d.ts +7 -461
- package/dist/features/categories/index.js +7 -2031
- package/dist/features/categories/manifest.d.ts +2 -0
- package/dist/features/categories/manifest.js +20 -0
- package/dist/features/categories/messages/en.json +14 -0
- package/dist/features/categories/repository/categories.repository.d.ts +31 -0
- package/dist/features/categories/repository/categories.repository.js +399 -0
- package/dist/features/categories/schemas/firestore.d.ts +140 -0
- package/dist/features/categories/schemas/firestore.js +189 -0
- package/dist/features/categories/schemas/index.d.ts +207 -0
- package/dist/features/categories/schemas/index.js +67 -0
- package/dist/features/categories/server.d.ts +7 -44
- package/dist/features/categories/server.js +10 -789
- package/dist/features/categories/types/index.d.ts +80 -0
- package/dist/features/categories/types/index.js +13 -0
- package/dist/features/checkout/actions/checkout-actions.d.ts +14 -0
- package/dist/features/checkout/actions/checkout-actions.js +91 -0
- package/dist/features/checkout/actions/index.d.ts +1 -0
- package/dist/features/checkout/actions/index.js +1 -0
- package/dist/features/checkout/components/CheckoutStepper.d.ts +10 -0
- package/dist/features/checkout/components/CheckoutStepper.js +15 -0
- package/dist/features/checkout/components/index.d.ts +1 -0
- package/dist/features/checkout/components/index.js +1 -0
- package/dist/features/checkout/hooks/useCheckout.d.ts +9 -0
- package/dist/features/checkout/hooks/useCheckout.js +24 -0
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +74 -0
- package/dist/features/checkout/hooks/useCheckoutApi.js +48 -0
- package/dist/features/checkout/hooks/usePaymentCheckout.d.ts +78 -0
- package/dist/features/checkout/hooks/usePaymentCheckout.js +178 -0
- package/dist/features/checkout/index.d.ts +8 -70
- package/dist/features/checkout/index.js +7 -192
- package/dist/features/checkout/manifest.d.ts +2 -0
- package/dist/features/checkout/manifest.js +17 -0
- package/dist/features/checkout/messages/en.json +10 -0
- package/dist/features/checkout/repository/failed-checkout.repository.d.ts +18 -0
- package/dist/features/checkout/repository/failed-checkout.repository.js +29 -0
- package/dist/features/checkout/schemas/firestore.d.ts +33 -0
- package/dist/features/checkout/schemas/firestore.js +6 -0
- package/dist/features/checkout/schemas/index.d.ts +1 -0
- package/dist/features/checkout/schemas/index.js +1 -0
- package/dist/features/checkout/server.d.ts +8 -0
- package/dist/features/checkout/server.js +8 -0
- package/dist/features/checkout/types/index.d.ts +46 -0
- package/dist/features/checkout/types/index.js +2 -0
- package/dist/features/cms/index.d.ts +1 -2
- package/dist/features/cms/index.js +5 -4
- package/dist/features/collections/api/[slug]/route.d.ts +26 -0
- package/dist/features/collections/api/[slug]/route.js +102 -0
- package/dist/features/collections/api/route.d.ts +13 -0
- package/dist/features/collections/api/route.js +79 -0
- package/dist/features/collections/columns/index.d.ts +17 -0
- package/dist/features/collections/columns/index.js +55 -0
- package/dist/features/collections/components/CollectionCard.d.ts +12 -0
- package/dist/features/collections/components/CollectionCard.js +9 -0
- package/dist/features/collections/components/index.d.ts +1 -0
- package/dist/features/collections/components/index.js +1 -0
- package/dist/features/collections/hooks/useCollections.d.ts +7 -0
- package/dist/features/collections/hooks/useCollections.js +34 -0
- package/dist/features/collections/index.d.ts +6 -148
- package/dist/features/collections/index.js +6 -378
- package/dist/features/collections/manifest.d.ts +2 -0
- package/dist/features/collections/manifest.js +16 -0
- package/dist/features/collections/messages/en.json +10 -0
- package/dist/features/collections/repository/collections.repository.d.ts +8 -0
- package/dist/features/collections/repository/collections.repository.js +16 -0
- package/dist/features/collections/schemas/index.d.ts +76 -0
- package/dist/features/collections/schemas/index.js +34 -0
- package/dist/features/collections/server.d.ts +7 -0
- package/dist/features/collections/server.js +7 -0
- package/dist/features/collections/types/index.d.ts +25 -0
- package/dist/features/collections/types/index.js +1 -0
- package/dist/features/consultation/api/[id]/route.d.ts +26 -0
- package/dist/features/consultation/api/[id]/route.js +88 -0
- package/dist/features/consultation/api/route.d.ts +13 -0
- package/dist/features/consultation/api/route.js +79 -0
- package/dist/features/consultation/columns/index.d.ts +17 -0
- package/dist/features/consultation/columns/index.js +54 -0
- package/dist/features/consultation/components/ConsultationForm.d.ts +8 -0
- package/dist/features/consultation/components/ConsultationForm.js +51 -0
- package/dist/features/consultation/components/index.d.ts +1 -0
- package/dist/features/consultation/components/index.js +1 -0
- package/dist/features/consultation/hooks/useBookConsultation.d.ts +8 -0
- package/dist/features/consultation/hooks/useBookConsultation.js +16 -0
- package/dist/features/consultation/index.d.ts +6 -172
- package/dist/features/consultation/index.js +6 -1084
- package/dist/features/consultation/manifest.d.ts +2 -0
- package/dist/features/consultation/manifest.js +12 -0
- package/dist/features/consultation/messages/en.json +25 -0
- package/dist/features/consultation/repository/consultations.repository.d.ts +12 -0
- package/dist/features/consultation/repository/consultations.repository.js +28 -0
- package/dist/features/consultation/schemas/index.d.ts +87 -0
- package/dist/features/consultation/schemas/index.js +47 -0
- package/dist/features/consultation/server.d.ts +7 -0
- package/dist/features/consultation/server.js +7 -0
- package/dist/features/consultation/types/index.d.ts +33 -0
- package/dist/features/consultation/types/index.js +1 -0
- package/dist/features/contact/components/ContactForm.d.ts +32 -0
- package/dist/features/contact/components/ContactForm.js +58 -0
- package/dist/features/contact/components/ContactInfoSidebar.d.ts +20 -0
- package/dist/features/contact/components/ContactInfoSidebar.js +6 -0
- package/dist/features/contact/components/index.d.ts +4 -0
- package/dist/features/contact/components/index.js +2 -0
- package/dist/features/contact/email.d.ts +61 -0
- package/dist/features/contact/email.js +345 -0
- package/dist/features/contact/hooks/useContactSubmit.d.ts +4 -0
- package/dist/features/contact/hooks/useContactSubmit.js +7 -0
- package/dist/features/contact/index.d.ts +2 -56
- package/dist/features/contact/index.js +2 -586
- package/dist/features/contact/server.d.ts +7 -0
- package/dist/features/contact/server.js +7 -0
- package/dist/features/copilot/components/AdminCopilotView.d.ts +21 -0
- package/dist/features/copilot/components/AdminCopilotView.js +29 -0
- package/dist/features/copilot/components/index.d.ts +2 -0
- package/dist/features/copilot/components/index.js +1 -0
- package/dist/features/copilot/hooks/useCopilotChat.d.ts +22 -0
- package/dist/features/copilot/hooks/useCopilotChat.js +57 -0
- package/dist/features/copilot/hooks/useCopilotFeedback.d.ts +15 -0
- package/dist/features/copilot/hooks/useCopilotFeedback.js +16 -0
- package/dist/features/copilot/index.d.ts +3 -47
- package/dist/features/copilot/index.js +3 -681
- package/dist/features/corporate/api/[id]/route.d.ts +26 -0
- package/dist/features/corporate/api/[id]/route.js +88 -0
- package/dist/features/corporate/api/route.d.ts +13 -0
- package/dist/features/corporate/api/route.js +79 -0
- package/dist/features/corporate/columns/index.d.ts +17 -0
- package/dist/features/corporate/columns/index.js +54 -0
- package/dist/features/corporate/components/CorporateInquiryForm.d.ts +7 -0
- package/dist/features/corporate/components/CorporateInquiryForm.js +36 -0
- package/dist/features/corporate/components/index.d.ts +1 -0
- package/dist/features/corporate/components/index.js +1 -0
- package/dist/features/corporate/hooks/useSubmitCorporateInquiry.d.ts +8 -0
- package/dist/features/corporate/hooks/useSubmitCorporateInquiry.js +16 -0
- package/dist/features/corporate/index.d.ts +6 -183
- package/dist/features/corporate/index.js +6 -782
- package/dist/features/corporate/manifest.d.ts +2 -0
- package/dist/features/corporate/manifest.js +12 -0
- package/dist/features/corporate/messages/en.json +26 -0
- package/dist/features/corporate/repository/corporate.repository.d.ts +12 -0
- package/dist/features/corporate/repository/corporate.repository.js +28 -0
- package/dist/features/corporate/schemas/index.d.ts +95 -0
- package/dist/features/corporate/schemas/index.js +50 -0
- package/dist/features/corporate/server.d.ts +7 -0
- package/dist/features/corporate/server.js +7 -0
- package/dist/features/corporate/types/index.d.ts +37 -0
- package/dist/features/corporate/types/index.js +1 -0
- package/dist/features/cron/firebase-adapters.d.ts +70 -0
- package/dist/features/cron/firebase-adapters.js +68 -0
- package/dist/features/cron/index.d.ts +5 -0
- package/dist/features/cron/index.js +7 -0
- package/dist/features/cron/jobs/auction-expiry.job.d.ts +27 -0
- package/dist/features/cron/jobs/auction-expiry.job.js +38 -0
- package/dist/features/cron/jobs/preorder-reminder.job.d.ts +14 -0
- package/dist/features/cron/jobs/preorder-reminder.job.js +40 -0
- package/dist/features/cron/registry.d.ts +45 -0
- package/dist/features/cron/registry.js +86 -0
- package/dist/features/cron/types.d.ts +66 -0
- package/dist/features/cron/types.js +9 -0
- package/dist/features/events/actions/event-actions.d.ts +92 -0
- package/dist/features/events/actions/event-actions.js +253 -0
- package/dist/features/events/actions/index.d.ts +1 -0
- package/dist/features/events/actions/index.js +1 -0
- package/dist/features/events/api/[id]/route.d.ts +24 -0
- package/dist/features/events/api/[id]/route.js +83 -0
- package/dist/features/events/api/route.d.ts +12 -0
- package/dist/features/events/api/route.js +88 -0
- package/dist/features/events/columns/index.d.ts +22 -0
- package/dist/features/events/columns/index.js +41 -0
- package/dist/features/events/components/AdminEventEntriesView.d.ts +17 -0
- package/dist/features/events/components/AdminEventEntriesView.js +10 -0
- package/dist/features/events/components/AdminEventsView.d.ts +11 -0
- package/dist/features/events/components/AdminEventsView.js +5 -0
- package/dist/features/events/components/EventBanner.d.ts +13 -0
- package/dist/features/events/components/EventBanner.js +48 -0
- package/dist/features/events/components/EventCard.d.ts +13 -0
- package/dist/features/events/components/EventCard.js +21 -0
- package/dist/features/events/components/EventDetailView.d.ts +15 -0
- package/dist/features/events/components/EventDetailView.js +11 -0
- package/dist/features/events/components/EventFilters.d.ts +105 -0
- package/dist/features/events/components/EventFilters.js +73 -0
- package/dist/features/events/components/EventFormDrawer.d.ts +22 -0
- package/dist/features/events/components/EventFormDrawer.js +6 -0
- package/dist/features/events/components/EventLeaderboard.d.ts +23 -0
- package/dist/features/events/components/EventLeaderboard.js +18 -0
- package/dist/features/events/components/EventParticipateView.d.ts +19 -0
- package/dist/features/events/components/EventParticipateView.js +13 -0
- package/dist/features/events/components/EventStatusBadge.d.ts +7 -0
- package/dist/features/events/components/EventStatusBadge.js +12 -0
- package/dist/features/events/components/EventsListView.d.ts +16 -0
- package/dist/features/events/components/EventsListView.js +21 -0
- package/dist/features/events/components/index.d.ts +19 -0
- package/dist/features/events/components/index.js +11 -0
- package/dist/features/events/hooks/useBulkEvent.d.ts +19 -0
- package/dist/features/events/hooks/useBulkEvent.js +36 -0
- package/dist/features/events/hooks/useEvent.d.ts +43 -0
- package/dist/features/events/hooks/useEvent.js +55 -0
- package/dist/features/events/hooks/useEvents.d.ts +27 -0
- package/dist/features/events/hooks/useEvents.js +38 -0
- package/dist/features/events/index.d.ts +8 -841
- package/dist/features/events/index.js +8 -1453
- package/dist/features/events/manifest.d.ts +2 -0
- package/dist/features/events/manifest.js +24 -0
- package/dist/features/events/messages/en.json +28 -0
- package/dist/features/events/repository/event-entry.repository.d.ts +17 -0
- package/dist/features/events/repository/event-entry.repository.js +115 -0
- package/dist/features/events/repository/events.repository.d.ts +18 -0
- package/dist/features/events/repository/events.repository.js +128 -0
- package/dist/features/events/schemas/firestore.d.ts +115 -0
- package/dist/features/events/schemas/firestore.js +77 -0
- package/dist/features/events/schemas/index.d.ts +383 -0
- package/dist/features/events/schemas/index.js +87 -0
- package/dist/features/events/server.d.ts +8 -37
- package/dist/features/events/server.js +11 -195
- package/dist/features/events/types/index.d.ts +133 -0
- package/dist/features/events/types/index.js +1 -0
- package/dist/features/faq/actions/faq-actions.d.ts +191 -0
- package/dist/features/faq/actions/faq-actions.js +103 -0
- package/dist/features/faq/actions/index.d.ts +1 -0
- package/dist/features/faq/actions/index.js +1 -0
- package/dist/features/faq/api/route.d.ts +11 -0
- package/dist/features/faq/api/route.js +50 -0
- package/dist/features/faq/columns/index.d.ts +15 -0
- package/dist/features/faq/columns/index.js +47 -0
- package/dist/features/faq/components/ContactCTA.d.ts +16 -0
- package/dist/features/faq/components/ContactCTA.js +6 -0
- package/dist/features/faq/components/FAQAccordion.d.ts +20 -0
- package/dist/features/faq/components/FAQAccordion.js +17 -0
- package/dist/features/faq/components/FAQCategorySidebar.d.ts +24 -0
- package/dist/features/faq/components/FAQCategorySidebar.js +15 -0
- package/dist/features/faq/components/FAQHelpfulButtons.d.ts +19 -0
- package/dist/features/faq/components/FAQHelpfulButtons.js +46 -0
- package/dist/features/faq/components/FAQPageContent.d.ts +54 -0
- package/dist/features/faq/components/FAQPageContent.js +67 -0
- package/dist/features/faq/components/FAQSortDropdown.d.ts +13 -0
- package/dist/features/faq/components/FAQSortDropdown.js +11 -0
- package/dist/features/faq/components/RelatedFAQs.d.ts +10 -0
- package/dist/features/faq/components/RelatedFAQs.js +9 -0
- package/dist/features/faq/components/index.d.ts +9 -0
- package/dist/features/faq/components/index.js +7 -0
- package/dist/features/faq/hooks/useFAQs.d.ts +22 -0
- package/dist/features/faq/hooks/useFAQs.js +42 -0
- package/dist/features/faq/hooks/useFaqList.d.ts +194 -0
- package/dist/features/faq/hooks/useFaqList.js +35 -0
- package/dist/features/faq/hooks/useFaqVote.d.ts +14 -0
- package/dist/features/faq/hooks/useFaqVote.js +10 -0
- package/dist/features/faq/index.d.ts +8 -619
- package/dist/features/faq/index.js +8 -1685
- package/dist/features/faq/manifest.d.ts +2 -0
- package/dist/features/faq/manifest.js +10 -0
- package/dist/features/faq/messages/en.json +14 -0
- package/dist/features/faq/repository/faqs.repository.d.ts +43 -0
- package/dist/features/faq/repository/faqs.repository.js +300 -0
- package/dist/features/faq/schemas/firestore.d.ts +63 -0
- package/dist/features/faq/schemas/firestore.js +115 -0
- package/dist/features/faq/schemas/index.d.ts +157 -0
- package/dist/features/faq/schemas/index.js +62 -0
- package/dist/features/faq/server.d.ts +9 -0
- package/dist/features/faq/server.js +9 -0
- package/dist/features/faq/types/index.d.ts +52 -0
- package/dist/features/faq/types/index.js +1 -0
- package/dist/features/filters/FilterFacetSection.d.ts +23 -0
- package/dist/features/filters/FilterFacetSection.js +39 -0
- package/dist/features/filters/FilterPanel.d.ts +61 -0
- package/dist/features/filters/FilterPanel.js +40 -0
- package/dist/features/filters/RangeFilter.d.ts +23 -0
- package/dist/features/filters/RangeFilter.js +28 -0
- package/dist/features/filters/SwitchFilter.d.ts +12 -0
- package/dist/features/filters/SwitchFilter.js +19 -0
- package/dist/features/filters/filterUtils.d.ts +11 -0
- package/dist/features/filters/filterUtils.js +13 -0
- package/dist/features/filters/index.d.ts +10 -136
- package/dist/features/filters/index.js +6 -1061
- package/dist/features/forms/Checkbox.d.ts +8 -0
- package/dist/features/forms/Checkbox.js +15 -0
- package/dist/features/forms/Form.d.ts +25 -0
- package/dist/features/forms/Form.js +38 -0
- package/dist/features/forms/Input.d.ts +10 -0
- package/dist/features/forms/Input.js +23 -0
- package/dist/features/forms/Radio.d.ts +17 -0
- package/dist/features/forms/Radio.js +19 -0
- package/dist/features/forms/Select.d.ts +13 -0
- package/dist/features/forms/Select.js +8 -0
- package/dist/features/forms/Slider.d.ts +20 -0
- package/dist/features/forms/Slider.js +22 -0
- package/dist/features/forms/Textarea.d.ts +8 -0
- package/dist/features/forms/Textarea.js +15 -0
- package/dist/features/forms/Toggle.d.ts +15 -0
- package/dist/features/forms/Toggle.js +48 -0
- package/dist/features/forms/index.d.ts +17 -129
- package/dist/features/forms/index.js +11 -915
- package/dist/features/forms/utils.d.ts +10 -0
- package/dist/features/forms/utils.js +13 -0
- package/dist/features/homepage/actions/carousel-actions.d.ts +37 -0
- package/dist/features/homepage/actions/carousel-actions.js +54 -0
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +46 -0
- package/dist/features/homepage/actions/homepage-section-actions.js +55 -0
- package/dist/features/homepage/actions/index.d.ts +2 -0
- package/dist/features/homepage/actions/index.js +2 -0
- package/dist/features/homepage/api/[id]/route.d.ts +23 -0
- package/dist/features/homepage/api/[id]/route.js +100 -0
- package/dist/features/homepage/api/carousel/[id]/route.d.ts +23 -0
- package/dist/features/homepage/api/carousel/[id]/route.js +122 -0
- package/dist/features/homepage/api/carousel/route.d.ts +15 -0
- package/dist/features/homepage/api/carousel/route.js +154 -0
- package/dist/features/homepage/api/route.d.ts +14 -0
- package/dist/features/homepage/api/route.js +136 -0
- package/dist/features/homepage/api/sections/[id]/route.d.ts +26 -0
- package/dist/features/homepage/api/sections/[id]/route.js +88 -0
- package/dist/features/homepage/api/sections/route.d.ts +13 -0
- package/dist/features/homepage/api/sections/route.js +79 -0
- package/dist/features/homepage/components/AdvertisementBanner.d.ts +13 -0
- package/dist/features/homepage/components/AdvertisementBanner.js +23 -0
- package/dist/features/homepage/components/BeforeAfterCard.d.ts +10 -0
- package/dist/features/homepage/components/BeforeAfterCard.js +54 -0
- package/dist/features/homepage/components/CharacterHotspot.d.ts +24 -0
- package/dist/features/homepage/components/CharacterHotspot.js +373 -0
- package/dist/features/homepage/components/CharacterHotspotForm.d.ts +26 -0
- package/dist/features/homepage/components/CharacterHotspotForm.js +309 -0
- package/dist/features/homepage/components/CustomerReviewsSection.d.ts +13 -0
- package/dist/features/homepage/components/CustomerReviewsSection.js +14 -0
- package/dist/features/homepage/components/FAQSection.d.ts +26 -0
- package/dist/features/homepage/components/FAQSection.js +20 -0
- package/dist/features/homepage/components/FeaturedResultsSection.d.ts +17 -0
- package/dist/features/homepage/components/FeaturedResultsSection.js +18 -0
- package/dist/features/homepage/components/HeroBanner.d.ts +7 -0
- package/dist/features/homepage/components/HeroBanner.js +93 -0
- package/dist/features/homepage/components/HeroCarousel.d.ts +12 -0
- package/dist/features/homepage/components/HeroCarousel.js +157 -0
- package/dist/features/homepage/components/HeroSection.d.ts +7 -0
- package/dist/features/homepage/components/HeroSection.js +12 -0
- package/dist/features/homepage/components/HomepageSkeleton.d.ts +2 -0
- package/dist/features/homepage/components/HomepageSkeleton.js +14 -0
- package/dist/features/homepage/components/HomepageView.d.ts +25 -0
- package/dist/features/homepage/components/HomepageView.js +5 -0
- package/dist/features/homepage/components/HowItWorksInfoView.d.ts +36 -0
- package/dist/features/homepage/components/HowItWorksInfoView.js +8 -0
- package/dist/features/homepage/components/HowItWorksSection.d.ts +23 -0
- package/dist/features/homepage/components/HowItWorksSection.js +36 -0
- package/dist/features/homepage/components/NewsletterBanner.d.ts +22 -0
- package/dist/features/homepage/components/NewsletterBanner.js +34 -0
- package/dist/features/homepage/components/NewsletterSection.d.ts +10 -0
- package/dist/features/homepage/components/NewsletterSection.js +8 -0
- package/dist/features/homepage/components/PromoGrid.d.ts +9 -0
- package/dist/features/homepage/components/PromoGrid.js +35 -0
- package/dist/features/homepage/components/SectionCarousel.d.ts +75 -0
- package/dist/features/homepage/components/SectionCarousel.js +39 -0
- package/dist/features/homepage/components/SecurityHighlightsSection.d.ts +21 -0
- package/dist/features/homepage/components/SecurityHighlightsSection.js +36 -0
- package/dist/features/homepage/components/SiteFeaturesSection.d.ts +13 -0
- package/dist/features/homepage/components/SiteFeaturesSection.js +9 -0
- package/dist/features/homepage/components/StatsCounterSection.d.ts +14 -0
- package/dist/features/homepage/components/StatsCounterSection.js +32 -0
- package/dist/features/homepage/components/TestimonialsCarousel.d.ts +9 -0
- package/dist/features/homepage/components/TestimonialsCarousel.js +30 -0
- package/dist/features/homepage/components/TrustBadges.d.ts +5 -0
- package/dist/features/homepage/components/TrustBadges.js +54 -0
- package/dist/features/homepage/components/TrustFeaturesSection.d.ts +16 -0
- package/dist/features/homepage/components/TrustFeaturesSection.js +41 -0
- package/dist/features/homepage/components/TrustIndicatorsSection.d.ts +11 -0
- package/dist/features/homepage/components/TrustIndicatorsSection.js +9 -0
- package/dist/features/homepage/components/WelcomeSection.d.ts +20 -0
- package/dist/features/homepage/components/WelcomeSection.js +12 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.d.ts +15 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +21 -0
- package/dist/features/homepage/components/index.d.ts +52 -0
- package/dist/features/homepage/components/index.js +27 -0
- package/dist/features/homepage/hooks/useBlogArticles.d.ts +12 -0
- package/dist/features/homepage/hooks/useBlogArticles.js +31 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +2 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.js +26 -0
- package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +2 -0
- package/dist/features/homepage/hooks/useFeaturedPreOrders.js +26 -0
- package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +4 -0
- package/dist/features/homepage/hooks/useFeaturedProducts.js +32 -0
- package/dist/features/homepage/hooks/useHeroCarousel.d.ts +9 -0
- package/dist/features/homepage/hooks/useHeroCarousel.js +17 -0
- package/dist/features/homepage/hooks/useHomepage.d.ts +11 -0
- package/dist/features/homepage/hooks/useHomepage.js +18 -0
- package/dist/features/homepage/hooks/useHomepageReviews.d.ts +7 -0
- package/dist/features/homepage/hooks/useHomepageReviews.js +16 -0
- package/dist/features/homepage/hooks/useHomepageSections.d.ts +2 -0
- package/dist/features/homepage/hooks/useHomepageSections.js +11 -0
- package/dist/features/homepage/hooks/useNewsletter.d.ts +14 -0
- package/dist/features/homepage/hooks/useNewsletter.js +10 -0
- package/dist/features/homepage/hooks/useTopBrands.d.ts +2 -0
- package/dist/features/homepage/hooks/useTopBrands.js +12 -0
- package/dist/features/homepage/hooks/useTopCategories.d.ts +4 -0
- package/dist/features/homepage/hooks/useTopCategories.js +13 -0
- package/dist/features/homepage/index.d.ts +13 -846
- package/dist/features/homepage/index.js +13 -6279
- package/dist/features/homepage/manifest.d.ts +2 -0
- package/dist/features/homepage/manifest.js +14 -0
- package/dist/features/homepage/messages/en.json +6 -0
- package/dist/features/homepage/repository/carousel.repository.d.ts +101 -0
- package/dist/features/homepage/repository/carousel.repository.js +252 -0
- package/dist/features/homepage/repository/homepage-sections.repository.d.ts +27 -0
- package/dist/features/homepage/repository/homepage-sections.repository.js +174 -0
- package/dist/features/homepage/repository/homepage.repository.d.ts +11 -0
- package/dist/features/homepage/repository/homepage.repository.js +25 -0
- package/dist/features/homepage/schemas/firestore.d.ts +251 -0
- package/dist/features/homepage/schemas/firestore.js +83 -0
- package/dist/features/homepage/schemas/index.d.ts +1 -0
- package/dist/features/homepage/schemas/index.js +1 -0
- package/dist/features/homepage/server.d.ts +10 -121
- package/dist/features/homepage/server.js +10 -1024
- package/dist/features/homepage/types/index.d.ts +163 -0
- package/dist/features/homepage/types/index.js +1 -0
- package/dist/features/layout/AutoBreadcrumbs.d.ts +15 -0
- package/dist/features/layout/AutoBreadcrumbs.js +84 -0
- package/dist/features/layout/BackToTop.d.ts +16 -0
- package/dist/features/layout/BackToTop.js +26 -0
- package/dist/features/layout/BottomActions.d.ts +1 -0
- package/dist/features/layout/BottomActions.js +153 -0
- package/dist/features/layout/BottomActionsContext.d.ts +107 -0
- package/dist/features/layout/BottomActionsContext.js +114 -0
- package/dist/features/layout/BottomNavItem.d.ts +28 -0
- package/dist/features/layout/BottomNavItem.js +28 -0
- package/dist/features/layout/BottomNavLayout.d.ts +14 -0
- package/dist/features/layout/BottomNavLayout.js +12 -0
- package/dist/features/layout/BottomNavbar.d.ts +46 -0
- package/dist/features/layout/BottomNavbar.js +19 -0
- package/dist/features/layout/BottomSheet.d.ts +29 -0
- package/dist/features/layout/BottomSheet.js +40 -0
- package/dist/features/layout/Breadcrumbs.d.ts +26 -0
- package/dist/features/layout/Breadcrumbs.js +25 -0
- package/dist/features/layout/DashboardNavContext.d.ts +19 -0
- package/dist/features/layout/DashboardNavContext.js +36 -0
- package/dist/features/layout/FooterLayout.d.ts +39 -0
- package/dist/features/layout/FooterLayout.js +12 -0
- package/dist/features/layout/LayoutClient.d.ts +11 -0
- package/dist/features/layout/LayoutClient.js +7 -0
- package/dist/features/layout/ListingLayout.d.ts +35 -0
- package/dist/features/layout/ListingLayout.js +104 -0
- package/dist/features/layout/LocaleSwitcher.d.ts +22 -0
- package/dist/features/layout/LocaleSwitcher.js +12 -0
- package/dist/features/layout/MainNavbar.d.ts +32 -0
- package/dist/features/layout/MainNavbar.js +29 -0
- package/dist/features/layout/NavItem.d.ts +19 -0
- package/dist/features/layout/NavItem.js +35 -0
- package/dist/features/layout/NavbarLayout.d.ts +27 -0
- package/dist/features/layout/NavbarLayout.js +23 -0
- package/dist/features/layout/SidebarLayout.d.ts +24 -0
- package/dist/features/layout/SidebarLayout.js +29 -0
- package/dist/features/layout/TitleBar.d.ts +18 -0
- package/dist/features/layout/TitleBar.js +19 -0
- package/dist/features/layout/TitleBarLayout.d.ts +48 -0
- package/dist/features/layout/TitleBarLayout.js +17 -0
- package/dist/features/layout/hooks/useBottomActions.d.ts +7 -0
- package/dist/features/layout/hooks/useBottomActions.js +28 -0
- package/dist/features/layout/index.d.ts +41 -315
- package/dist/features/layout/index.js +23 -1745
- package/dist/features/loyalty/api/admin/loyalty/grant/route.d.ts +12 -0
- package/dist/features/loyalty/api/admin/loyalty/grant/route.js +36 -0
- package/dist/features/loyalty/api/balance/route.d.ts +12 -0
- package/dist/features/loyalty/api/balance/route.js +39 -0
- package/dist/features/loyalty/api/earn/route.d.ts +12 -0
- package/dist/features/loyalty/api/earn/route.js +36 -0
- package/dist/features/loyalty/api/history/route.d.ts +12 -0
- package/dist/features/loyalty/api/history/route.js +56 -0
- package/dist/features/loyalty/api/redeem/route.d.ts +12 -0
- package/dist/features/loyalty/api/redeem/route.js +36 -0
- package/dist/features/loyalty/columns/index.d.ts +17 -0
- package/dist/features/loyalty/columns/index.js +40 -0
- package/dist/features/loyalty/components/CoinsDisplay.d.ts +11 -0
- package/dist/features/loyalty/components/CoinsDisplay.js +9 -0
- package/dist/features/loyalty/components/index.d.ts +1 -0
- package/dist/features/loyalty/components/index.js +1 -0
- package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +4 -0
- package/dist/features/loyalty/hooks/useLoyaltyBalance.js +18 -0
- package/dist/features/loyalty/index.d.ts +6 -174
- package/dist/features/loyalty/index.js +6 -332
- package/dist/features/loyalty/manifest.d.ts +2 -0
- package/dist/features/loyalty/manifest.js +16 -0
- package/dist/features/loyalty/messages/en.json +19 -0
- package/dist/features/loyalty/repository/loyalty.repository.d.ts +8 -0
- package/dist/features/loyalty/repository/loyalty.repository.js +22 -0
- package/dist/features/loyalty/schemas/index.d.ts +85 -0
- package/dist/features/loyalty/schemas/index.js +40 -0
- package/dist/features/loyalty/server.d.ts +7 -0
- package/dist/features/loyalty/server.js +7 -0
- package/dist/features/loyalty/types/index.d.ts +31 -0
- package/dist/features/loyalty/types/index.js +1 -0
- package/dist/features/loyalty/types/loyalty-config.d.ts +7 -0
- package/dist/features/loyalty/types/loyalty-config.js +1 -0
- package/dist/features/loyalty/types/loyalty-math.d.ts +9 -0
- package/dist/features/loyalty/types/loyalty-math.js +27 -0
- package/dist/features/media/AvatarUpload.d.ts +22 -0
- package/dist/features/media/AvatarUpload.js +133 -0
- package/dist/features/media/MediaAvatar.d.ts +12 -0
- package/dist/features/media/MediaAvatar.js +13 -0
- package/dist/features/media/MediaImage.d.ts +28 -0
- package/dist/features/media/MediaImage.js +35 -0
- package/dist/features/media/MediaLightbox.d.ts +32 -0
- package/dist/features/media/MediaLightbox.js +245 -0
- package/dist/features/media/MediaVideo.d.ts +22 -0
- package/dist/features/media/MediaVideo.js +38 -0
- package/dist/features/media/components/MediaSlider.d.ts +10 -0
- package/dist/features/media/components/MediaSlider.js +12 -0
- package/dist/features/media/finalize.d.ts +11 -0
- package/dist/features/media/finalize.js +70 -0
- package/dist/features/media/hooks/useMedia.d.ts +198 -0
- package/dist/features/media/hooks/useMedia.js +78 -0
- package/dist/features/media/index.d.ts +30 -425
- package/dist/features/media/index.js +21 -3593
- package/dist/features/media/messages/en.json +63 -0
- package/dist/features/media/modals/ImageCropModal.d.ts +16 -0
- package/dist/features/media/modals/ImageCropModal.js +99 -0
- package/dist/features/media/modals/VideoThumbnailSelector.d.ts +10 -0
- package/dist/features/media/modals/VideoThumbnailSelector.js +51 -0
- package/dist/features/media/modals/VideoTrimModal.d.ts +11 -0
- package/dist/features/media/modals/VideoTrimModal.js +73 -0
- package/dist/features/media/server.d.ts +2 -0
- package/dist/features/media/server.js +2 -0
- package/dist/features/media/types/index.d.ts +29 -0
- package/dist/features/media/types/index.js +43 -0
- package/dist/features/media/upload/CameraCapture.d.ts +8 -0
- package/dist/features/media/upload/CameraCapture.js +59 -0
- package/dist/features/media/upload/ImageUpload.d.ts +14 -0
- package/dist/features/media/upload/ImageUpload.js +132 -0
- package/dist/features/media/upload/MediaUploadField.d.ts +31 -0
- package/dist/features/media/upload/MediaUploadField.js +204 -0
- package/dist/features/media/upload/MediaUploadList.d.ts +26 -0
- package/dist/features/media/upload/MediaUploadList.js +104 -0
- package/dist/features/orders/actions/index.d.ts +2 -0
- package/dist/features/orders/actions/index.js +2 -0
- package/dist/features/orders/actions/order-actions.d.ts +16 -0
- package/dist/features/orders/actions/order-actions.js +46 -0
- package/dist/features/orders/actions/refund-actions.d.ts +16 -0
- package/dist/features/orders/actions/refund-actions.js +88 -0
- package/dist/features/orders/api/track/[trackingId]/route.d.ts +17 -0
- package/dist/features/orders/api/track/[trackingId]/route.js +30 -0
- package/dist/features/orders/columns/index.d.ts +15 -0
- package/dist/features/orders/columns/index.js +34 -0
- package/dist/features/orders/components/MarketplaceOrderCard.d.ts +37 -0
- package/dist/features/orders/components/MarketplaceOrderCard.js +52 -0
- package/dist/features/orders/components/OrderFilters.d.ts +82 -0
- package/dist/features/orders/components/OrderFilters.js +106 -0
- package/dist/features/orders/components/OrdersList.d.ts +18 -0
- package/dist/features/orders/components/OrdersList.js +37 -0
- package/dist/features/orders/components/index.d.ts +4 -0
- package/dist/features/orders/components/index.js +3 -0
- package/dist/features/orders/hooks/useOrders.d.ts +32 -0
- package/dist/features/orders/hooks/useOrders.js +57 -0
- package/dist/features/orders/index.d.ts +7 -370
- package/dist/features/orders/index.js +7 -863
- package/dist/features/orders/manifest.d.ts +2 -0
- package/dist/features/orders/manifest.js +18 -0
- package/dist/features/orders/messages/en.json +15 -0
- package/dist/features/orders/repository/orders.repository.d.ts +188 -0
- package/dist/features/orders/repository/orders.repository.js +300 -0
- package/dist/features/orders/schemas/firestore.d.ts +129 -0
- package/dist/features/orders/schemas/firestore.js +96 -0
- package/dist/features/orders/schemas/index.d.ts +217 -0
- package/dist/features/orders/schemas/index.js +76 -0
- package/dist/features/orders/server.d.ts +9 -0
- package/dist/features/orders/server.js +10 -0
- package/dist/features/orders/types/index.d.ts +69 -0
- package/dist/features/orders/types/index.js +2 -0
- package/dist/features/orders/utils/order-splitter.d.ts +14 -0
- package/dist/features/orders/utils/order-splitter.js +29 -0
- package/dist/features/payments/columns/index.d.ts +17 -0
- package/dist/features/payments/columns/index.js +45 -0
- package/dist/features/payments/hooks/usePaymentEvent.d.ts +17 -0
- package/dist/features/payments/hooks/usePaymentEvent.js +26 -0
- package/dist/features/payments/hooks/usePayments.d.ts +10 -0
- package/dist/features/payments/hooks/usePayments.js +19 -0
- package/dist/features/payments/index.d.ts +6 -141
- package/dist/features/payments/index.js +6 -331
- package/dist/features/payments/manifest.d.ts +2 -0
- package/dist/features/payments/manifest.js +12 -0
- package/dist/features/payments/messages/en.json +11 -0
- package/dist/features/payments/repository/payments.repository.d.ts +15 -0
- package/dist/features/payments/repository/payments.repository.js +36 -0
- package/dist/features/payments/repository/payout.repository.d.ts +111 -0
- package/dist/features/payments/repository/payout.repository.js +202 -0
- package/dist/features/payments/schemas/firestore.d.ts +74 -0
- package/dist/features/payments/schemas/firestore.js +65 -0
- package/dist/features/payments/schemas/index.d.ts +77 -0
- package/dist/features/payments/schemas/index.js +67 -0
- package/dist/features/payments/server.d.ts +8 -0
- package/dist/features/payments/server.js +8 -0
- package/dist/features/payments/types/index.d.ts +36 -0
- package/dist/features/payments/types/index.js +2 -0
- package/dist/features/pre-orders/api/[id]/route.d.ts +26 -0
- package/dist/features/pre-orders/api/[id]/route.js +88 -0
- package/dist/features/pre-orders/api/[slug]/route.d.ts +16 -0
- package/dist/features/pre-orders/api/[slug]/route.js +41 -0
- package/dist/features/pre-orders/api/admin/[id]/route.d.ts +21 -0
- package/dist/features/pre-orders/api/admin/[id]/route.js +65 -0
- package/dist/features/pre-orders/api/admin/route.d.ts +12 -0
- package/dist/features/pre-orders/api/admin/route.js +56 -0
- package/dist/features/pre-orders/api/route.d.ts +13 -0
- package/dist/features/pre-orders/api/route.js +77 -0
- package/dist/features/pre-orders/columns/index.d.ts +17 -0
- package/dist/features/pre-orders/columns/index.js +68 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +24 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +53 -0
- package/dist/features/pre-orders/components/PreOrderBadge.d.ts +14 -0
- package/dist/features/pre-orders/components/PreOrderBadge.js +17 -0
- package/dist/features/pre-orders/components/PreorderCard.d.ts +12 -0
- package/dist/features/pre-orders/components/PreorderCard.js +27 -0
- package/dist/features/pre-orders/components/index.d.ts +2 -0
- package/dist/features/pre-orders/components/index.js +2 -0
- package/dist/features/pre-orders/hooks/usePreOrders.d.ts +7 -0
- package/dist/features/pre-orders/hooks/usePreOrders.js +34 -0
- package/dist/features/pre-orders/index.d.ts +6 -170
- package/dist/features/pre-orders/index.js +6 -538
- package/dist/features/pre-orders/manifest.d.ts +2 -0
- package/dist/features/pre-orders/manifest.js +17 -0
- package/dist/features/pre-orders/messages/en.json +13 -0
- package/dist/features/pre-orders/repository/pre-orders.repository.d.ts +14 -0
- package/dist/features/pre-orders/repository/pre-orders.repository.js +44 -0
- package/dist/features/pre-orders/repository/preorders.repository.d.ts +8 -0
- package/dist/features/pre-orders/repository/preorders.repository.js +21 -0
- package/dist/features/pre-orders/schemas/index.d.ts +79 -0
- package/dist/features/pre-orders/schemas/index.js +27 -0
- package/dist/features/pre-orders/server.d.ts +5 -14
- package/dist/features/pre-orders/server.js +8 -106
- package/dist/features/pre-orders/types/index.d.ts +29 -0
- package/dist/features/pre-orders/types/index.js +12 -0
- package/dist/features/products/actions/index.d.ts +1 -0
- package/dist/features/products/actions/index.js +1 -0
- package/dist/features/products/actions/product-actions.d.ts +26 -0
- package/dist/features/products/actions/product-actions.js +111 -0
- package/dist/features/products/api/[id]/route.d.ts +29 -0
- package/dist/features/products/api/[id]/route.js +137 -0
- package/dist/features/products/api/route.d.ts +19 -0
- package/dist/features/products/api/route.js +214 -0
- package/dist/features/products/columns/index.d.ts +64 -0
- package/dist/features/products/columns/index.js +85 -0
- package/dist/features/products/columns/productTableColumns.d.ts +27 -0
- package/dist/features/products/columns/productTableColumns.js +88 -0
- package/dist/features/products/components/AuctionDetailView.d.ts +13 -0
- package/dist/features/products/components/AuctionDetailView.js +9 -0
- package/dist/features/products/components/AuctionsView.d.ts +6 -0
- package/dist/features/products/components/AuctionsView.js +5 -0
- package/dist/features/products/components/BidHistory.d.ts +28 -0
- package/dist/features/products/components/BidHistory.js +18 -0
- package/dist/features/products/components/BuyBar.d.ts +21 -0
- package/dist/features/products/components/BuyBar.js +20 -0
- package/dist/features/products/components/InteractiveProductCard.d.ts +19 -0
- package/dist/features/products/components/InteractiveProductCard.js +18 -0
- package/dist/features/products/components/MakeOfferForm.d.ts +20 -0
- package/dist/features/products/components/MakeOfferForm.js +8 -0
- package/dist/features/products/components/PlaceBidForm.d.ts +20 -0
- package/dist/features/products/components/PlaceBidForm.js +6 -0
- package/dist/features/products/components/PreOrderDetailView.d.ts +14 -0
- package/dist/features/products/components/PreOrderDetailView.js +9 -0
- package/dist/features/products/components/PreOrdersView.d.ts +6 -0
- package/dist/features/products/components/PreOrdersView.js +5 -0
- package/dist/features/products/components/ProductDetailView.d.ts +11 -0
- package/dist/features/products/components/ProductDetailView.js +9 -0
- package/dist/features/products/components/ProductFeatureBadges.d.ts +32 -0
- package/dist/features/products/components/ProductFeatureBadges.js +103 -0
- package/dist/features/products/components/ProductFilters.d.ts +90 -0
- package/dist/features/products/components/ProductFilters.js +105 -0
- package/dist/features/products/components/ProductForm.d.ts +47 -0
- package/dist/features/products/components/ProductForm.js +120 -0
- package/dist/features/products/components/ProductGrid.d.ts +69 -0
- package/dist/features/products/components/ProductGrid.js +92 -0
- package/dist/features/products/components/ProductInfo.d.ts +20 -0
- package/dist/features/products/components/ProductInfo.js +4 -0
- package/dist/features/products/components/ProductTabs.d.ts +21 -0
- package/dist/features/products/components/ProductTabs.js +22 -0
- package/dist/features/products/components/ProductsView.d.ts +6 -0
- package/dist/features/products/components/ProductsView.js +5 -0
- package/dist/features/products/components/RelatedProducts.d.ts +16 -0
- package/dist/features/products/components/RelatedProducts.js +12 -0
- package/dist/features/products/components/index.d.ts +34 -0
- package/dist/features/products/components/index.js +18 -0
- package/dist/features/products/hooks/useBrands.d.ts +9 -0
- package/dist/features/products/hooks/useBrands.js +15 -0
- package/dist/features/products/hooks/useProductDetail.d.ts +15 -0
- package/dist/features/products/hooks/useProductDetail.js +29 -0
- package/dist/features/products/hooks/useProducts.d.ts +43 -0
- package/dist/features/products/hooks/useProducts.js +67 -0
- package/dist/features/products/hooks/useRelatedProducts.d.ts +2 -0
- package/dist/features/products/hooks/useRelatedProducts.js +17 -0
- package/dist/features/products/index.d.ts +10 -1066
- package/dist/features/products/index.js +10 -2475
- package/dist/features/products/manifest.d.ts +2 -0
- package/dist/features/products/manifest.js +16 -0
- package/dist/features/products/messages/en.json +11 -0
- package/dist/features/products/repository/products.repository.d.ts +213 -0
- package/dist/features/products/repository/products.repository.js +300 -0
- package/dist/features/products/schemas/firestore.d.ts +125 -0
- package/dist/features/products/schemas/firestore.js +149 -0
- package/dist/features/products/schemas/index.d.ts +400 -0
- package/dist/features/products/schemas/index.js +173 -0
- package/dist/features/products/server.d.ts +7 -49
- package/dist/features/products/server.js +10 -803
- package/dist/features/products/types/index.d.ts +122 -0
- package/dist/features/products/types/index.js +1 -0
- package/dist/features/products/utils/listing-type.d.ts +2 -0
- package/dist/features/products/utils/listing-type.js +9 -0
- package/dist/features/promotions/actions/coupon-actions.d.ts +28 -0
- package/dist/features/promotions/actions/coupon-actions.js +23 -0
- package/dist/features/promotions/actions/index.d.ts +3 -0
- package/dist/features/promotions/actions/index.js +3 -0
- package/dist/features/promotions/actions/promotions-actions.d.ts +18 -0
- package/dist/features/promotions/actions/promotions-actions.js +37 -0
- package/dist/features/promotions/actions/seller-coupon-actions.d.ts +41 -0
- package/dist/features/promotions/actions/seller-coupon-actions.js +92 -0
- package/dist/features/promotions/api/route.d.ts +21 -0
- package/dist/features/promotions/api/route.js +85 -0
- package/dist/features/promotions/columns/index.d.ts +12 -0
- package/dist/features/promotions/columns/index.js +45 -0
- package/dist/features/promotions/components/CouponCard.d.ts +16 -0
- package/dist/features/promotions/components/CouponCard.js +20 -0
- package/dist/features/promotions/components/PromotionsView.d.ts +43 -0
- package/dist/features/promotions/components/PromotionsView.js +10 -0
- package/dist/features/promotions/components/index.d.ts +3 -0
- package/dist/features/promotions/components/index.js +2 -0
- package/dist/features/promotions/hooks/useCouponValidate.d.ts +22 -0
- package/dist/features/promotions/hooks/useCouponValidate.js +10 -0
- package/dist/features/promotions/hooks/usePromotions.d.ts +21 -0
- package/dist/features/promotions/hooks/usePromotions.js +49 -0
- package/dist/features/promotions/index.d.ts +7 -301
- package/dist/features/promotions/index.js +7 -957
- package/dist/features/promotions/manifest.d.ts +2 -0
- package/dist/features/promotions/manifest.js +14 -0
- package/dist/features/promotions/messages/en.json +20 -0
- package/dist/features/promotions/repository/coupons.repository.d.ts +224 -0
- package/dist/features/promotions/repository/coupons.repository.js +539 -0
- package/dist/features/promotions/repository/promotions.repository.d.ts +14 -0
- package/dist/features/promotions/repository/promotions.repository.js +43 -0
- package/dist/features/promotions/schemas/firestore.d.ts +105 -0
- package/dist/features/promotions/schemas/firestore.js +124 -0
- package/dist/features/promotions/schemas/index.d.ts +117 -0
- package/dist/features/promotions/schemas/index.js +58 -0
- package/dist/features/promotions/server.d.ts +10 -0
- package/dist/features/promotions/server.js +10 -0
- package/dist/features/promotions/types/index.d.ts +51 -0
- package/dist/features/promotions/types/index.js +2 -0
- package/dist/features/reviews/actions/index.d.ts +1 -0
- package/dist/features/reviews/actions/index.js +1 -0
- package/dist/features/reviews/actions/review-actions.d.ts +40 -0
- package/dist/features/reviews/actions/review-actions.js +182 -0
- package/dist/features/reviews/api/[id]/route.d.ts +23 -0
- package/dist/features/reviews/api/[id]/route.js +109 -0
- package/dist/features/reviews/api/route.d.ts +21 -0
- package/dist/features/reviews/api/route.js +171 -0
- package/dist/features/reviews/columns/index.d.ts +15 -0
- package/dist/features/reviews/columns/index.js +44 -0
- package/dist/features/reviews/components/ReviewFilters.d.ts +74 -0
- package/dist/features/reviews/components/ReviewFilters.js +60 -0
- package/dist/features/reviews/components/ReviewModal.d.ts +11 -0
- package/dist/features/reviews/components/ReviewModal.js +25 -0
- package/dist/features/reviews/components/ReviewSummary.d.ts +16 -0
- package/dist/features/reviews/components/ReviewSummary.js +20 -0
- package/dist/features/reviews/components/ReviewsList.d.ts +15 -0
- package/dist/features/reviews/components/ReviewsList.js +25 -0
- package/dist/features/reviews/components/ReviewsListView.d.ts +31 -0
- package/dist/features/reviews/components/ReviewsListView.js +16 -0
- package/dist/features/reviews/components/index.d.ts +10 -0
- package/dist/features/reviews/components/index.js +5 -0
- package/dist/features/reviews/hooks/useCreateReview.d.ts +12 -0
- package/dist/features/reviews/hooks/useCreateReview.js +20 -0
- package/dist/features/reviews/hooks/useReviews.d.ts +34 -0
- package/dist/features/reviews/hooks/useReviews.js +49 -0
- package/dist/features/reviews/index.d.ts +7 -434
- package/dist/features/reviews/index.js +7 -2297
- package/dist/features/reviews/manifest.d.ts +2 -0
- package/dist/features/reviews/manifest.js +10 -0
- package/dist/features/reviews/messages/en.json +10 -0
- package/dist/features/reviews/repository/reviews.repository.d.ts +103 -0
- package/dist/features/reviews/repository/reviews.repository.js +214 -0
- package/dist/features/reviews/schemas/firestore.d.ts +67 -0
- package/dist/features/reviews/schemas/firestore.js +59 -0
- package/dist/features/reviews/schemas/index.d.ts +183 -0
- package/dist/features/reviews/schemas/index.js +68 -0
- package/dist/features/reviews/server.d.ts +7 -46
- package/dist/features/reviews/server.js +10 -769
- package/dist/features/reviews/types/index.d.ts +62 -0
- package/dist/features/reviews/types/index.js +1 -0
- package/dist/features/search/actions/index.d.ts +1 -0
- package/dist/features/search/actions/index.js +1 -0
- package/dist/features/search/actions/search-actions.d.ts +18 -0
- package/dist/features/search/actions/search-actions.js +43 -0
- package/dist/features/search/api/route.d.ts +22 -0
- package/dist/features/search/api/route.js +79 -0
- package/dist/features/search/columns/index.d.ts +17 -0
- package/dist/features/search/columns/index.js +49 -0
- package/dist/features/search/components/Search.d.ts +41 -0
- package/dist/features/search/components/Search.js +263 -0
- package/dist/features/search/components/SearchFiltersRow.d.ts +22 -0
- package/dist/features/search/components/SearchFiltersRow.js +21 -0
- package/dist/features/search/components/SearchResultsSection.d.ts +53 -0
- package/dist/features/search/components/SearchResultsSection.js +36 -0
- package/dist/features/search/components/SearchView.d.ts +29 -0
- package/dist/features/search/components/SearchView.js +8 -0
- package/dist/features/search/components/index.d.ts +8 -0
- package/dist/features/search/components/index.js +4 -0
- package/dist/features/search/hooks/useNavSuggestions.d.ts +11 -0
- package/dist/features/search/hooks/useNavSuggestions.js +32 -0
- package/dist/features/search/hooks/useSearch.d.ts +21 -0
- package/dist/features/search/hooks/useSearch.js +34 -0
- package/dist/features/search/index.d.ts +7 -298
- package/dist/features/search/index.js +7 -1351
- package/dist/features/search/manifest.d.ts +2 -0
- package/dist/features/search/manifest.js +10 -0
- package/dist/features/search/messages/en.json +15 -0
- package/dist/features/search/repository/search.repository.d.ts +14 -0
- package/dist/features/search/repository/search.repository.js +59 -0
- package/dist/features/search/schemas/index.d.ts +70 -0
- package/dist/features/search/schemas/index.js +34 -0
- package/dist/features/search/server.d.ts +5 -83
- package/dist/features/search/server.js +5 -149
- package/dist/features/search/types/index.d.ts +46 -0
- package/dist/features/search/types/index.js +2 -0
- package/dist/features/seller/actions/index.d.ts +2 -0
- package/dist/features/seller/actions/index.js +2 -0
- package/dist/features/seller/actions/offer-actions.d.ts +32 -0
- package/dist/features/seller/actions/offer-actions.js +266 -0
- package/dist/features/seller/actions/seller-actions.d.ts +172 -0
- package/dist/features/seller/actions/seller-actions.js +480 -0
- package/dist/features/seller/api/coupons/route.d.ts +17 -0
- package/dist/features/seller/api/coupons/route.js +47 -0
- package/dist/features/seller/api/offers/route.d.ts +17 -0
- package/dist/features/seller/api/offers/route.js +63 -0
- package/dist/features/seller/api/products/route.d.ts +17 -0
- package/dist/features/seller/api/products/route.js +64 -0
- package/dist/features/seller/api/store/route.d.ts +17 -0
- package/dist/features/seller/api/store/route.js +34 -0
- package/dist/features/seller/columns/index.d.ts +22 -0
- package/dist/features/seller/columns/index.js +73 -0
- package/dist/features/seller/components/SellerAddressesView.d.ts +13 -0
- package/dist/features/seller/components/SellerAddressesView.js +5 -0
- package/dist/features/seller/components/SellerAnalyticsView.d.ts +13 -0
- package/dist/features/seller/components/SellerAnalyticsView.js +17 -0
- package/dist/features/seller/components/SellerAuctionsView.d.ts +6 -0
- package/dist/features/seller/components/SellerAuctionsView.js +5 -0
- package/dist/features/seller/components/SellerCouponsView.d.ts +6 -0
- package/dist/features/seller/components/SellerCouponsView.js +5 -0
- package/dist/features/seller/components/SellerCreateProductView.d.ts +11 -0
- package/dist/features/seller/components/SellerCreateProductView.js +5 -0
- package/dist/features/seller/components/SellerDashboardView.d.ts +14 -0
- package/dist/features/seller/components/SellerDashboardView.js +11 -0
- package/dist/features/seller/components/SellerEditProductView.d.ts +11 -0
- package/dist/features/seller/components/SellerEditProductView.js +5 -0
- package/dist/features/seller/components/SellerGuideView.d.ts +12 -0
- package/dist/features/seller/components/SellerGuideView.js +5 -0
- package/dist/features/seller/components/SellerOffersView.d.ts +4 -0
- package/dist/features/seller/components/SellerOffersView.js +5 -0
- package/dist/features/seller/components/SellerOrdersView.d.ts +4 -0
- package/dist/features/seller/components/SellerOrdersView.js +5 -0
- package/dist/features/seller/components/SellerPayoutHistoryTable.d.ts +14 -0
- package/dist/features/seller/components/SellerPayoutHistoryTable.js +10 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.d.ts +11 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -0
- package/dist/features/seller/components/SellerPayoutStats.d.ts +8 -0
- package/dist/features/seller/components/SellerPayoutStats.js +9 -0
- package/dist/features/seller/components/SellerPayoutsView.d.ts +18 -0
- package/dist/features/seller/components/SellerPayoutsView.js +11 -0
- package/dist/features/seller/components/SellerProductsView.d.ts +6 -0
- package/dist/features/seller/components/SellerProductsView.js +5 -0
- package/dist/features/seller/components/SellerShippingView.d.ts +12 -0
- package/dist/features/seller/components/SellerShippingView.js +5 -0
- package/dist/features/seller/components/SellerSidebar.d.ts +16 -0
- package/dist/features/seller/components/SellerSidebar.js +11 -0
- package/dist/features/seller/components/SellerStatCard.d.ts +14 -0
- package/dist/features/seller/components/SellerStatCard.js +5 -0
- package/dist/features/seller/components/SellerStoreSetupView.d.ts +12 -0
- package/dist/features/seller/components/SellerStoreSetupView.js +8 -0
- package/dist/features/seller/components/SellerStoreView.d.ts +8 -0
- package/dist/features/seller/components/SellerStoreView.js +8 -0
- package/dist/features/seller/components/SellerStorefrontView.d.ts +13 -0
- package/dist/features/seller/components/SellerStorefrontView.js +10 -0
- package/dist/features/seller/components/SellersListView.d.ts +4 -0
- package/dist/features/seller/components/SellersListView.js +5 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.d.ts +14 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.js +9 -0
- package/dist/features/seller/components/analytics/SellerRevenueChart.d.ts +13 -0
- package/dist/features/seller/components/analytics/SellerRevenueChart.js +28 -0
- package/dist/features/seller/components/analytics/SellerTopProducts.d.ts +17 -0
- package/dist/features/seller/components/analytics/SellerTopProducts.js +6 -0
- package/dist/features/seller/components/analytics/index.d.ts +3 -0
- package/dist/features/seller/components/analytics/index.js +3 -0
- package/dist/features/seller/components/index.d.ts +44 -0
- package/dist/features/seller/components/index.js +23 -0
- package/dist/features/seller/hooks/useBecomeSeller.d.ts +12 -0
- package/dist/features/seller/hooks/useBecomeSeller.js +26 -0
- package/dist/features/seller/hooks/useSellerPayouts.d.ts +25 -0
- package/dist/features/seller/hooks/useSellerPayouts.js +42 -0
- package/dist/features/seller/hooks/useSellerStore.d.ts +28 -0
- package/dist/features/seller/hooks/useSellerStore.js +48 -0
- package/dist/features/seller/hooks/useSellerStorefront.d.ts +16 -0
- package/dist/features/seller/hooks/useSellerStorefront.js +57 -0
- package/dist/features/seller/index.d.ts +10 -926
- package/dist/features/seller/index.js +10 -2029
- package/dist/features/seller/manifest.d.ts +2 -0
- package/dist/features/seller/manifest.js +74 -0
- package/dist/features/seller/messages/en.json +32 -0
- package/dist/features/seller/permission-map.d.ts +3 -0
- package/dist/features/seller/permission-map.js +15 -0
- package/dist/features/seller/repository/offer.repository.d.ts +66 -0
- package/dist/features/seller/repository/offer.repository.js +210 -0
- package/dist/features/seller/repository/seller.repository.d.ts +22 -0
- package/dist/features/seller/repository/seller.repository.js +72 -0
- package/dist/features/seller/schemas/firestore.d.ts +76 -0
- package/dist/features/seller/schemas/firestore.js +57 -0
- package/dist/features/seller/schemas/index.d.ts +244 -0
- package/dist/features/seller/schemas/index.js +100 -0
- package/dist/features/seller/server.d.ts +13 -0
- package/dist/features/seller/server.js +13 -0
- package/dist/features/seller/types/index.d.ts +147 -0
- package/dist/features/seller/types/index.js +2 -0
- package/dist/features/stores/actions/index.d.ts +2 -0
- package/dist/features/stores/actions/index.js +2 -0
- package/dist/features/stores/actions/store-address-actions.d.ts +11 -0
- package/dist/features/stores/actions/store-address-actions.js +54 -0
- package/dist/features/stores/actions/store-query-actions.d.ts +34 -0
- package/dist/features/stores/actions/store-query-actions.js +113 -0
- package/dist/features/stores/api/[storeSlug]/auctions/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/auctions/route.js +92 -0
- package/dist/features/stores/api/[storeSlug]/products/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/products/route.js +97 -0
- package/dist/features/stores/api/[storeSlug]/reviews/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/reviews/route.js +101 -0
- package/dist/features/stores/api/[storeSlug]/route.d.ts +21 -0
- package/dist/features/stores/api/[storeSlug]/route.js +66 -0
- package/dist/features/stores/api/route.d.ts +12 -0
- package/dist/features/stores/api/route.js +101 -0
- package/dist/features/stores/columns/index.d.ts +16 -0
- package/dist/features/stores/columns/index.js +45 -0
- package/dist/features/stores/components/InteractiveStoreCard.d.ts +20 -0
- package/dist/features/stores/components/InteractiveStoreCard.js +16 -0
- package/dist/features/stores/components/StoreAboutView.d.ts +21 -0
- package/dist/features/stores/components/StoreAboutView.js +12 -0
- package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +16 -0
- package/dist/features/stores/components/StoreAddressSelectorCreate.js +40 -0
- package/dist/features/stores/components/StoreAuctionsView.d.ts +17 -0
- package/dist/features/stores/components/StoreAuctionsView.js +5 -0
- package/dist/features/stores/components/StoreHeader.d.ts +15 -0
- package/dist/features/stores/components/StoreHeader.js +8 -0
- package/dist/features/stores/components/StoreNavTabs.d.ts +15 -0
- package/dist/features/stores/components/StoreNavTabs.js +14 -0
- package/dist/features/stores/components/StoreProductsView.d.ts +30 -0
- package/dist/features/stores/components/StoreProductsView.js +11 -0
- package/dist/features/stores/components/StoreReviewsView.d.ts +17 -0
- package/dist/features/stores/components/StoreReviewsView.js +9 -0
- package/dist/features/stores/components/StoresListView.d.ts +19 -0
- package/dist/features/stores/components/StoresListView.js +24 -0
- package/dist/features/stores/components/index.d.ts +16 -0
- package/dist/features/stores/components/index.js +9 -0
- package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +23 -0
- package/dist/features/stores/hooks/useStoreAddressSelector.js +30 -0
- package/dist/features/stores/hooks/useStores.d.ts +58 -0
- package/dist/features/stores/hooks/useStores.js +96 -0
- package/dist/features/stores/index.d.ts +7 -536
- package/dist/features/stores/index.js +7 -1911
- package/dist/features/stores/manifest.d.ts +2 -0
- package/dist/features/stores/manifest.js +35 -0
- package/dist/features/stores/messages/en.json +21 -0
- package/dist/features/stores/repository/store-address.repository.d.ts +55 -0
- package/dist/features/stores/repository/store-address.repository.js +188 -0
- package/dist/features/stores/repository/store.repository.d.ts +67 -0
- package/dist/features/stores/repository/store.repository.js +181 -0
- package/dist/features/stores/repository/stores.repository.d.ts +11 -0
- package/dist/features/stores/repository/stores.repository.js +34 -0
- package/dist/features/stores/schemas/firestore.d.ts +117 -0
- package/dist/features/stores/schemas/firestore.js +109 -0
- package/dist/features/stores/schemas/index.d.ts +85 -0
- package/dist/features/stores/schemas/index.js +48 -0
- package/dist/features/stores/server.d.ts +12 -103
- package/dist/features/stores/server.js +15 -444
- package/dist/features/stores/types/index.d.ts +102 -0
- package/dist/features/stores/types/index.js +2 -0
- package/dist/features/whatsapp-bot/api/send-status/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/send-status/route.js +36 -0
- package/dist/features/whatsapp-bot/api/webhook/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/webhook/route.js +41 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +8 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +7 -0
- package/dist/features/whatsapp-bot/components/index.d.ts +1 -0
- package/dist/features/whatsapp-bot/components/index.js +1 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +21 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +125 -0
- package/dist/features/whatsapp-bot/index.d.ts +3 -85
- package/dist/features/whatsapp-bot/index.js +3 -154
- package/dist/features/whatsapp-bot/manifest.d.ts +2 -0
- package/dist/features/whatsapp-bot/manifest.js +13 -0
- package/dist/features/whatsapp-bot/messages/en.json +7 -0
- package/dist/features/whatsapp-bot/server.d.ts +7 -0
- package/dist/features/whatsapp-bot/server.js +7 -0
- package/dist/features/whatsapp-bot/types/index.d.ts +50 -0
- package/dist/features/whatsapp-bot/types/index.js +1 -0
- package/dist/features/wishlist/actions/index.d.ts +1 -0
- package/dist/features/wishlist/actions/index.js +1 -0
- package/dist/features/wishlist/actions/wishlist-actions.d.ts +20 -0
- package/dist/features/wishlist/actions/wishlist-actions.js +29 -0
- package/dist/features/wishlist/columns/index.d.ts +17 -0
- package/dist/features/wishlist/columns/index.js +42 -0
- package/dist/features/wishlist/components/WishlistPage.d.ts +16 -0
- package/dist/features/wishlist/components/WishlistPage.js +17 -0
- package/dist/features/wishlist/components/WishlistToggleButton.d.ts +12 -0
- package/dist/features/wishlist/components/WishlistToggleButton.js +21 -0
- package/dist/features/wishlist/components/WishlistView.d.ts +33 -0
- package/dist/features/wishlist/components/WishlistView.js +41 -0
- package/dist/features/wishlist/components/index.d.ts +4 -0
- package/dist/features/wishlist/components/index.js +3 -0
- package/dist/features/wishlist/hooks/useUserWishlist.d.ts +187 -0
- package/dist/features/wishlist/hooks/useUserWishlist.js +17 -0
- package/dist/features/wishlist/hooks/useWishlist.d.ts +16 -0
- package/dist/features/wishlist/hooks/useWishlist.js +23 -0
- package/dist/features/wishlist/hooks/useWishlistToggle.d.ts +10 -0
- package/dist/features/wishlist/hooks/useWishlistToggle.js +32 -0
- package/dist/features/wishlist/index.d.ts +9 -360
- package/dist/features/wishlist/index.js +8 -888
- package/dist/features/wishlist/manifest.d.ts +2 -0
- package/dist/features/wishlist/manifest.js +12 -0
- package/dist/features/wishlist/messages/en.json +7 -0
- package/dist/features/wishlist/repository/user-wishlist.repository.d.ts +14 -0
- package/dist/features/wishlist/repository/user-wishlist.repository.js +91 -0
- package/dist/features/wishlist/repository/wishlist.repository.d.ts +13 -0
- package/dist/features/wishlist/repository/wishlist.repository.js +31 -0
- package/dist/features/wishlist/schemas/index.d.ts +46 -0
- package/dist/features/wishlist/schemas/index.js +24 -0
- package/dist/features/wishlist/server.d.ts +9 -0
- package/dist/features/wishlist/server.js +9 -0
- package/dist/features/wishlist/types/index.d.ts +16 -0
- package/dist/features/wishlist/types/index.js +1 -0
- package/dist/http/ApiClient.d.ts +59 -0
- package/dist/http/ApiClient.js +149 -0
- package/dist/http/api-handler.d.ts +33 -0
- package/dist/http/api-handler.js +89 -0
- package/dist/http/index.d.ts +6 -58
- package/dist/http/index.js +8 -4
- package/dist/index.d.ts +1 -17
- package/dist/index.js +1 -13
- package/dist/instrumentation/index.d.ts +4 -6
- package/dist/instrumentation/index.js +54 -14
- package/dist/monitoring/analytics.d.ts +79 -0
- package/dist/monitoring/analytics.js +171 -0
- package/dist/monitoring/browser.d.ts +10 -0
- package/dist/monitoring/browser.js +6 -0
- package/dist/monitoring/cache-metrics.d.ts +24 -0
- package/dist/monitoring/cache-metrics.js +83 -0
- package/dist/monitoring/client-logger.d.ts +29 -0
- package/dist/monitoring/client-logger.js +127 -0
- package/dist/monitoring/error-tracking.d.ts +50 -0
- package/dist/monitoring/error-tracking.js +54 -0
- package/dist/monitoring/index.d.ts +12 -181
- package/dist/monitoring/index.js +7 -8
- package/dist/monitoring/performance.d.ts +31 -0
- package/dist/monitoring/performance.js +34 -0
- package/dist/monitoring/runtime.d.ts +17 -0
- package/dist/monitoring/runtime.js +28 -0
- package/dist/monitoring/server-logger.d.ts +37 -0
- package/dist/monitoring/server-logger.js +289 -0
- package/dist/next/ErrorBoundary.d.ts +19 -0
- package/dist/next/ErrorBoundary.js +35 -0
- package/dist/next/IAuthVerifier.d.ts +54 -0
- package/dist/next/IAuthVerifier.js +23 -0
- package/dist/next/api/api-response.d.ts +29 -0
- package/dist/next/api/api-response.js +31 -0
- package/dist/next/api/apiHandler.d.ts +48 -0
- package/dist/next/api/apiHandler.js +87 -0
- package/dist/next/api/errorHandler.d.ts +57 -0
- package/dist/next/api/errorHandler.js +72 -0
- package/dist/next/api/routeHandler.d.ts +60 -0
- package/dist/next/api/routeHandler.js +113 -0
- package/dist/next/cache-middleware.d.ts +35 -0
- package/dist/next/cache-middleware.js +77 -0
- package/dist/next/components/ErrorView.d.ts +13 -0
- package/dist/next/components/ErrorView.js +32 -0
- package/dist/next/components/GlobalError.d.ts +7 -0
- package/dist/next/components/GlobalError.js +43 -0
- package/dist/next/components/NotFoundView.d.ts +28 -0
- package/dist/next/components/NotFoundView.js +25 -0
- package/dist/next/components/UnauthorizedView.d.ts +28 -0
- package/dist/next/components/UnauthorizedView.js +22 -0
- package/dist/next/index.d.ts +34 -776
- package/dist/next/index.js +30 -646
- package/dist/next/middleware/chain.d.ts +47 -0
- package/dist/next/middleware/chain.js +80 -0
- package/dist/next/middleware/index.d.ts +6 -0
- package/dist/next/middleware/index.js +3 -0
- package/dist/next/middleware/pii-redactor.d.ts +32 -0
- package/dist/next/middleware/pii-redactor.js +82 -0
- package/dist/next/middleware/pii-scrubber.d.ts +11 -0
- package/dist/next/middleware/pii-scrubber.js +43 -0
- package/dist/next/middleware/types.d.ts +18 -0
- package/dist/next/middleware/types.js +1 -0
- package/dist/next/request-helpers.d.ts +25 -0
- package/dist/next/request-helpers.js +52 -0
- package/dist/next/routing/route-map.d.ts +272 -0
- package/dist/next/routing/route-map.js +202 -0
- package/dist/providers/auth-firebase/browser-stub.d.ts +24 -0
- package/dist/providers/auth-firebase/browser-stub.js +28 -0
- package/dist/providers/auth-firebase/helpers.d.ts +83 -0
- package/dist/providers/auth-firebase/helpers.js +205 -0
- package/dist/providers/auth-firebase/index.d.ts +7 -133
- package/dist/providers/auth-firebase/index.js +16 -370
- package/dist/providers/auth-firebase/provider.d.ts +8 -0
- package/dist/providers/auth-firebase/provider.js +118 -0
- package/dist/providers/auth-firebase/session.d.ts +19 -0
- package/dist/providers/auth-firebase/session.js +86 -0
- package/dist/providers/db-firebase/admin-app-lite.d.ts +6 -0
- package/dist/providers/db-firebase/admin-app-lite.js +50 -0
- package/dist/providers/db-firebase/admin-auth-lite.d.ts +5 -0
- package/dist/providers/db-firebase/admin-auth-lite.js +10 -0
- package/dist/providers/db-firebase/admin-storage-lite.d.ts +6 -0
- package/dist/providers/db-firebase/admin-storage-lite.js +11 -0
- package/dist/providers/db-firebase/admin.d.ts +29 -0
- package/dist/providers/db-firebase/admin.js +163 -0
- package/dist/providers/db-firebase/base.d.ts +44 -0
- package/dist/providers/db-firebase/base.js +180 -0
- package/dist/providers/db-firebase/base.repository.d.ts +34 -0
- package/dist/providers/db-firebase/base.repository.js +235 -0
- package/dist/providers/db-firebase/browser-stub.d.ts +37 -0
- package/dist/providers/db-firebase/browser-stub.js +56 -0
- package/dist/providers/db-firebase/client-config.d.ts +22 -0
- package/dist/providers/db-firebase/client-config.js +30 -0
- package/dist/providers/db-firebase/field-ops.d.ts +7 -0
- package/dist/providers/db-firebase/field-ops.js +13 -0
- package/dist/providers/db-firebase/helpers.d.ts +23 -0
- package/dist/providers/db-firebase/helpers.js +67 -0
- package/dist/providers/db-firebase/index.d.ts +16 -250
- package/dist/providers/db-firebase/index.js +42 -498
- package/dist/providers/db-firebase/realtime.d.ts +43 -0
- package/dist/providers/db-firebase/realtime.js +122 -0
- package/dist/providers/db-firebase/rtdb-paths.d.ts +12 -0
- package/dist/providers/db-firebase/rtdb-paths.js +12 -0
- package/dist/providers/db-firebase/sieve.d.ts +76 -0
- package/dist/providers/db-firebase/sieve.js +83 -0
- package/dist/providers/email-resend/index.d.ts +6 -64
- package/dist/providers/email-resend/index.js +14 -56
- package/dist/providers/email-resend/provider.d.ts +43 -0
- package/dist/providers/email-resend/provider.js +75 -0
- package/dist/providers/firebase-client/auth.d.ts +12 -0
- package/dist/providers/firebase-client/auth.js +30 -0
- package/dist/providers/firebase-client/index.d.ts +9 -0
- package/dist/providers/firebase-client/index.js +9 -0
- package/dist/providers/firebase-client/realtime.d.ts +18 -0
- package/dist/providers/firebase-client/realtime.js +39 -0
- package/dist/providers/payment-razorpay/index.d.ts +66 -69
- package/dist/providers/payment-razorpay/index.js +201 -97
- package/dist/providers/shipping-shiprocket/index.d.ts +69 -33
- package/dist/providers/shipping-shiprocket/index.js +135 -122
- package/dist/providers/shipping-shiprocket/shiprocket-provider.d.ts +46 -0
- package/dist/providers/shipping-shiprocket/shiprocket-provider.js +152 -0
- package/dist/providers/storage-firebase/client.d.ts +56 -0
- package/dist/providers/storage-firebase/client.js +141 -0
- package/dist/providers/storage-firebase/index.d.ts +6 -43
- package/dist/providers/storage-firebase/index.js +16 -153
- package/dist/providers/storage-firebase/provider.d.ts +23 -0
- package/dist/providers/storage-firebase/provider.js +103 -0
- package/dist/react/ErrorBoundary.d.ts +31 -0
- package/dist/react/ErrorBoundary.js +68 -0
- package/dist/react/contexts/SessionContext.d.ts +80 -0
- package/dist/react/contexts/SessionContext.js +350 -0
- package/dist/react/contexts/ThemeContext.d.ts +14 -0
- package/dist/react/contexts/ThemeContext.js +65 -0
- package/dist/react/contexts/index.d.ts +4 -0
- package/dist/react/contexts/index.js +2 -0
- package/dist/react/hooks/useBreakpoint.d.ts +29 -0
- package/dist/react/hooks/useBreakpoint.js +37 -0
- package/dist/react/hooks/useBulkAction.d.ts +65 -0
- package/dist/react/hooks/useBulkAction.js +69 -0
- package/dist/react/hooks/useBulkSelection.d.ts +40 -0
- package/dist/react/hooks/useBulkSelection.js +58 -0
- package/dist/react/hooks/useCamera.d.ts +34 -0
- package/dist/react/hooks/useCamera.js +147 -0
- package/dist/react/hooks/useClickOutside.d.ts +37 -0
- package/dist/react/hooks/useClickOutside.js +57 -0
- package/dist/react/hooks/useContainerGrid.d.ts +39 -0
- package/dist/react/hooks/useContainerGrid.js +47 -0
- package/dist/react/hooks/useCountdown.d.ts +26 -0
- package/dist/react/hooks/useCountdown.js +49 -0
- package/dist/react/hooks/useGesture.d.ts +51 -0
- package/dist/react/hooks/useGesture.js +181 -0
- package/dist/react/hooks/useKeyPress.d.ts +48 -0
- package/dist/react/hooks/useKeyPress.js +62 -0
- package/dist/react/hooks/useLongPress.d.ts +26 -0
- package/dist/react/hooks/useLongPress.js +55 -0
- package/dist/react/hooks/useMediaQuery.d.ts +17 -0
- package/dist/react/hooks/useMediaQuery.js +34 -0
- package/dist/react/hooks/useMessage.d.ts +11 -0
- package/dist/react/hooks/useMessage.js +45 -0
- package/dist/react/hooks/usePendingFilters.d.ts +58 -0
- package/dist/react/hooks/usePendingFilters.js +79 -0
- package/dist/react/hooks/usePendingTable.d.ts +49 -0
- package/dist/react/hooks/usePendingTable.js +45 -0
- package/dist/react/hooks/usePullToRefresh.d.ts +38 -0
- package/dist/react/hooks/usePullToRefresh.js +82 -0
- package/dist/react/hooks/useRealtimeEvent.d.ts +53 -0
- package/dist/react/hooks/useRealtimeEvent.js +124 -0
- package/dist/react/hooks/useSwipe.d.ts +55 -0
- package/dist/react/hooks/useSwipe.js +165 -0
- package/dist/react/hooks/useUnsavedChanges.d.ts +44 -0
- package/dist/react/hooks/useUnsavedChanges.js +55 -0
- package/dist/react/hooks/useUrlTable.d.ts +31 -0
- package/dist/react/hooks/useUrlTable.js +137 -0
- package/dist/react/hooks/useVisibleItems.d.ts +37 -0
- package/dist/react/hooks/useVisibleItems.js +59 -0
- package/dist/react/index.d.ts +49 -787
- package/dist/react/index.js +47 -1665
- package/dist/react/useModalStack.d.ts +33 -0
- package/dist/react/useModalStack.js +61 -0
- package/dist/repositories/index.d.ts +38 -0
- package/dist/repositories/index.js +40 -0
- package/dist/security/authorization.d.ts +24 -0
- package/dist/security/authorization.js +73 -0
- package/dist/security/browser.d.ts +7 -0
- package/dist/security/browser.js +5 -0
- package/dist/security/csp.d.ts +16 -0
- package/dist/security/csp.js +44 -0
- package/dist/security/index.d.ts +11 -309
- package/dist/security/index.js +8 -5
- package/dist/security/pii-encrypt.d.ts +121 -0
- package/dist/security/pii-encrypt.js +351 -0
- package/dist/security/pii-redact.d.ts +20 -0
- package/dist/security/pii-redact.js +129 -0
- package/dist/security/pii-schemas.d.ts +38 -0
- package/dist/security/pii-schemas.js +62 -0
- package/dist/security/rate-limit.d.ts +70 -0
- package/dist/security/rate-limit.js +107 -0
- package/dist/security/rbac/Can.d.ts +31 -0
- package/dist/security/rbac/Can.js +24 -0
- package/dist/security/rbac/default-roles.d.ts +2 -0
- package/dist/security/rbac/default-roles.js +83 -0
- package/dist/security/rbac/hook.d.ts +20 -0
- package/dist/security/rbac/hook.js +30 -0
- package/dist/security/rbac/index.d.ts +8 -0
- package/dist/security/rbac/index.js +6 -0
- package/dist/security/rbac/middleware.d.ts +51 -0
- package/dist/security/rbac/middleware.js +51 -0
- package/dist/security/rbac/resolver.d.ts +5 -0
- package/dist/security/rbac/resolver.js +38 -0
- package/dist/security/rbac/server.d.ts +24 -0
- package/dist/security/rbac/server.js +42 -0
- package/dist/security/rbac/types.d.ts +22 -0
- package/dist/security/rbac/types.js +2 -0
- package/dist/security/settings-encryption.d.ts +5 -0
- package/dist/security/settings-encryption.js +48 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +31 -0
- package/dist/seed/actions/demo-seed-actions.js +36 -0
- package/dist/seed/actions/index.d.ts +1 -0
- package/dist/seed/actions/index.js +1 -0
- package/dist/seed/addresses-seed-data.d.ts +19 -0
- package/dist/seed/addresses-seed-data.js +418 -0
- package/dist/seed/bids-seed-data.d.ts +7 -0
- package/dist/seed/bids-seed-data.js +1168 -0
- package/dist/seed/blog-posts-seed-data.d.ts +7 -0
- package/dist/seed/blog-posts-seed-data.js +215 -0
- package/dist/seed/carousel-slides-seed-data.d.ts +7 -0
- package/dist/seed/carousel-slides-seed-data.js +283 -0
- package/dist/seed/cart-seed-data.d.ts +20 -0
- package/dist/seed/cart-seed-data.js +179 -0
- package/dist/seed/categories-seed-data.d.ts +7 -0
- package/dist/seed/categories-seed-data.js +1220 -0
- package/dist/seed/coupons-seed-data.d.ts +7 -0
- package/dist/seed/coupons-seed-data.js +508 -0
- package/dist/seed/defaults/categories.d.ts +2 -0
- package/dist/seed/defaults/categories.js +12 -0
- package/dist/seed/defaults/faqs.d.ts +2 -0
- package/dist/seed/defaults/faqs.js +40 -0
- package/dist/seed/defaults/homepage-sections.d.ts +2 -0
- package/dist/seed/defaults/homepage-sections.js +59 -0
- package/dist/seed/events-seed-data.d.ts +8 -0
- package/dist/seed/events-seed-data.js +662 -0
- package/dist/seed/factories/address.factory.d.ts +21 -0
- package/dist/seed/factories/address.factory.js +44 -0
- package/dist/seed/factories/bid.factory.d.ts +15 -0
- package/dist/seed/factories/bid.factory.js +33 -0
- package/dist/seed/factories/blog-post.factory.d.ts +15 -0
- package/dist/seed/factories/blog-post.factory.js +22 -0
- package/dist/seed/factories/carousel.factory.d.ts +11 -0
- package/dist/seed/factories/carousel.factory.js +16 -0
- package/dist/seed/factories/cart.factory.d.ts +26 -0
- package/dist/seed/factories/cart.factory.js +35 -0
- package/dist/seed/factories/category.factory.d.ts +11 -0
- package/dist/seed/factories/category.factory.js +16 -0
- package/dist/seed/factories/coupon.factory.d.ts +21 -0
- package/dist/seed/factories/coupon.factory.js +43 -0
- package/dist/seed/factories/faq.factory.d.ts +10 -0
- package/dist/seed/factories/faq.factory.js +15 -0
- package/dist/seed/factories/homepage-section.factory.d.ts +9 -0
- package/dist/seed/factories/homepage-section.factory.js +13 -0
- package/dist/seed/factories/notification.factory.d.ts +17 -0
- package/dist/seed/factories/notification.factory.js +39 -0
- package/dist/seed/factories/order.factory.d.ts +20 -0
- package/dist/seed/factories/order.factory.js +20 -0
- package/dist/seed/factories/payout.factory.d.ts +21 -0
- package/dist/seed/factories/payout.factory.js +38 -0
- package/dist/seed/factories/product.factory.d.ts +27 -0
- package/dist/seed/factories/product.factory.js +111 -0
- package/dist/seed/factories/review.factory.d.ts +14 -0
- package/dist/seed/factories/review.factory.js +52 -0
- package/dist/seed/factories/session.factory.d.ts +15 -0
- package/dist/seed/factories/session.factory.js +31 -0
- package/dist/seed/factories/store.factory.d.ts +23 -0
- package/dist/seed/factories/store.factory.js +46 -0
- package/dist/seed/factories/user.factory.d.ts +19 -0
- package/dist/seed/factories/user.factory.js +55 -0
- package/dist/seed/faq-seed-data.d.ts +47 -0
- package/dist/seed/faq-seed-data.js +2320 -0
- package/dist/seed/firestore-indexes.d.ts +13 -0
- package/dist/seed/firestore-indexes.js +32 -0
- package/dist/seed/homepage-sections-seed-data.d.ts +18 -0
- package/dist/seed/homepage-sections-seed-data.js +339 -0
- package/dist/seed/index.d.ts +68 -397
- package/dist/seed/index.js +49 -1040
- package/dist/seed/notifications-seed-data.d.ts +7 -0
- package/dist/seed/notifications-seed-data.js +494 -0
- package/dist/seed/orders-seed-data.d.ts +7 -0
- package/dist/seed/orders-seed-data.js +578 -0
- package/dist/seed/payouts-seed-data.d.ts +7 -0
- package/dist/seed/payouts-seed-data.js +202 -0
- package/dist/seed/products-seed-data.d.ts +7 -0
- package/dist/seed/products-seed-data.js +2477 -0
- package/dist/seed/reviews-seed-data.d.ts +7 -0
- package/dist/seed/reviews-seed-data.js +618 -0
- package/dist/seed/runner.d.ts +3 -0
- package/dist/seed/runner.js +38 -0
- package/dist/seed/seed-market-config.d.ts +49 -0
- package/dist/seed/seed-market-config.js +198 -0
- package/dist/seed/sessions-seed-data.d.ts +17 -0
- package/dist/seed/sessions-seed-data.js +355 -0
- package/dist/seed/site-settings-seed-data.d.ts +7 -0
- package/dist/seed/site-settings-seed-data.js +236 -0
- package/dist/seed/store-addresses-seed-data.d.ts +19 -0
- package/dist/seed/store-addresses-seed-data.js +106 -0
- package/dist/seed/stores-seed-data.d.ts +14 -0
- package/dist/seed/stores-seed-data.js +127 -0
- package/dist/seed/test-utils.d.ts +49 -0
- package/dist/seed/test-utils.js +107 -0
- package/dist/seed/types.d.ts +33 -0
- package/dist/seed/types.js +1 -0
- package/dist/seed/users-seed-data.d.ts +7 -0
- package/dist/seed/users-seed-data.js +727 -0
- package/dist/seo/index.d.ts +2 -150
- package/dist/seo/index.js +2 -4
- package/dist/seo/json-ld.d.ts +69 -0
- package/dist/seo/json-ld.js +166 -0
- package/dist/seo/metadata.d.ts +77 -0
- package/dist/seo/metadata.js +157 -0
- package/dist/server.d.ts +109 -0
- package/dist/server.js +110 -0
- package/dist/style/tailwind/index.d.ts +5 -7
- package/dist/style/tailwind/index.js +54 -33
- package/dist/style/vanilla/index.d.ts +5 -7
- package/dist/style/vanilla/index.js +45 -33
- package/dist/tokens/index.d.ts +23 -24
- package/dist/tokens/index.js +786 -4
- package/dist/tokens/tokens.css +221 -0
- package/dist/ui/DataTable.d.ts +78 -0
- package/dist/ui/DataTable.js +157 -0
- package/dist/ui/DataTable.style.css +190 -0
- package/dist/ui/animation.helper.d.ts +17 -0
- package/dist/ui/animation.helper.js +17 -0
- package/dist/ui/color.helper.d.ts +12 -0
- package/dist/ui/color.helper.js +31 -0
- package/dist/ui/columns/build-columns.d.ts +21 -0
- package/dist/ui/columns/build-columns.js +33 -0
- package/dist/ui/columns/column-renderers.d.ts +33 -0
- package/dist/ui/columns/column-renderers.js +64 -0
- package/dist/ui/columns/index.d.ts +6 -0
- package/dist/ui/columns/index.js +5 -0
- package/dist/ui/components/Accordion.d.ts +27 -0
- package/dist/ui/components/Accordion.js +57 -0
- package/dist/ui/components/Accordion.style.css +82 -0
- package/dist/ui/components/ActiveFilterChips.d.ts +13 -0
- package/dist/ui/components/ActiveFilterChips.js +9 -0
- package/dist/ui/components/ActiveFilterChips.style.css +66 -0
- package/dist/ui/components/Alert.d.ts +43 -0
- package/dist/ui/components/Alert.js +47 -0
- package/dist/ui/components/Alert.style.css +187 -0
- package/dist/ui/components/Avatar.d.ts +18 -0
- package/dist/ui/components/Avatar.js +42 -0
- package/dist/ui/components/Avatar.style.css +73 -0
- package/dist/ui/components/AvatarDisplay.d.ts +10 -0
- package/dist/ui/components/AvatarDisplay.js +56 -0
- package/dist/ui/components/AvatarDisplay.style.css +46 -0
- package/dist/ui/components/BackgroundRenderer.d.ts +15 -0
- package/dist/ui/components/BackgroundRenderer.js +42 -0
- package/dist/ui/components/BackgroundRenderer.style.css +31 -0
- package/dist/ui/components/Badge.d.ts +33 -0
- package/dist/ui/components/Badge.js +34 -0
- package/dist/ui/components/Badge.style.css +114 -0
- package/dist/ui/components/BaseListingCard.d.ts +39 -0
- package/dist/ui/components/BaseListingCard.js +56 -0
- package/dist/ui/components/BaseListingCard.style.css +84 -0
- package/dist/ui/components/Breadcrumb.d.ts +15 -0
- package/dist/ui/components/Breadcrumb.js +12 -0
- package/dist/ui/components/Breadcrumb.style.css +60 -0
- package/dist/ui/components/BulkActionBar.d.ts +34 -0
- package/dist/ui/components/BulkActionBar.js +86 -0
- package/dist/ui/components/BulkActionBar.style.css +196 -0
- package/dist/ui/components/Button.d.ts +31 -0
- package/dist/ui/components/Button.js +29 -0
- package/dist/ui/components/Button.style.css +160 -0
- package/dist/ui/components/Card.d.ts +21 -0
- package/dist/ui/components/Card.js +51 -0
- package/dist/ui/components/Card.style.css +192 -0
- package/dist/ui/components/Checkbox.d.ts +8 -0
- package/dist/ui/components/Checkbox.js +38 -0
- package/dist/ui/components/Checkbox.style.css +113 -0
- package/dist/ui/components/ConfirmDeleteModal.d.ts +33 -0
- package/dist/ui/components/ConfirmDeleteModal.js +74 -0
- package/dist/ui/components/ConfirmDeleteModal.style.css +89 -0
- package/dist/ui/components/CountdownDisplay.d.ts +14 -0
- package/dist/ui/components/CountdownDisplay.js +50 -0
- package/dist/ui/components/CountdownDisplay.style.css +4 -0
- package/dist/ui/components/DashboardStatsCard.d.ts +15 -0
- package/dist/ui/components/DashboardStatsCard.js +28 -0
- package/dist/ui/components/DashboardStatsCard.style.css +70 -0
- package/dist/ui/components/DescriptionField.d.ts +23 -0
- package/dist/ui/components/DescriptionField.js +28 -0
- package/dist/ui/components/DescriptionField.style.css +36 -0
- package/dist/ui/components/DetailViewShell.d.ts +51 -0
- package/dist/ui/components/DetailViewShell.js +50 -0
- package/dist/ui/components/Div.d.ts +20 -0
- package/dist/ui/components/Div.js +19 -0
- package/dist/ui/components/Div.style.css +6 -0
- package/dist/ui/components/Divider.d.ts +12 -0
- package/dist/ui/components/Divider.js +11 -0
- package/dist/ui/components/Divider.style.css +39 -0
- package/dist/ui/components/Drawer.d.ts +21 -0
- package/dist/ui/components/Drawer.js +72 -0
- package/dist/ui/components/Drawer.style.css +146 -0
- package/dist/ui/components/Dropdown.d.ts +36 -0
- package/dist/ui/components/Dropdown.js +142 -0
- package/dist/ui/components/Dropdown.style.css +112 -0
- package/dist/ui/components/DynamicSelect.d.ts +24 -0
- package/dist/ui/components/DynamicSelect.js +78 -0
- package/dist/ui/components/DynamicSelect.style.css +101 -0
- package/dist/ui/components/EmptyState.d.ts +12 -0
- package/dist/ui/components/EmptyState.js +17 -0
- package/dist/ui/components/EmptyState.style.css +30 -0
- package/dist/ui/components/FilterDrawer.d.ts +16 -0
- package/dist/ui/components/FilterDrawer.js +39 -0
- package/dist/ui/components/FilterDrawer.style.css +61 -0
- package/dist/ui/components/FlowDiagram.d.ts +33 -0
- package/dist/ui/components/FlowDiagram.js +15 -0
- package/dist/ui/components/FlowDiagram.style.css +77 -0
- package/dist/ui/components/Form.d.ts +27 -0
- package/dist/ui/components/Form.js +48 -0
- package/dist/ui/components/Form.style.css +27 -0
- package/dist/ui/components/FormField.d.ts +26 -0
- package/dist/ui/components/FormField.js +25 -0
- package/dist/ui/components/FormField.style.css +30 -0
- package/dist/ui/components/FormGrid.d.ts +46 -0
- package/dist/ui/components/FormGrid.js +42 -0
- package/dist/ui/components/FormGrid.style.css +32 -0
- package/dist/ui/components/HorizontalScroller.d.ts +33 -0
- package/dist/ui/components/HorizontalScroller.js +47 -0
- package/dist/ui/components/HorizontalScroller.style.css +109 -0
- package/dist/ui/components/IconButton.d.ts +32 -0
- package/dist/ui/components/IconButton.js +31 -0
- package/dist/ui/components/IconButton.style.css +103 -0
- package/dist/ui/components/ImageGallery.d.ts +17 -0
- package/dist/ui/components/ImageGallery.js +108 -0
- package/dist/ui/components/ImageGallery.style.css +163 -0
- package/dist/ui/components/ImageLightbox.d.ts +24 -0
- package/dist/ui/components/ImageLightbox.js +61 -0
- package/dist/ui/components/ImageLightbox.style.css +58 -0
- package/dist/ui/components/Input.d.ts +12 -0
- package/dist/ui/components/Input.js +29 -0
- package/dist/ui/components/Input.style.css +28 -0
- package/dist/ui/components/ItemRow.d.ts +10 -0
- package/dist/ui/components/ItemRow.js +7 -0
- package/dist/ui/components/ItemRow.style.css +33 -0
- package/dist/ui/components/Layout.d.ts +282 -0
- package/dist/ui/components/Layout.js +184 -0
- package/dist/ui/components/Layout.style.css +212 -0
- package/dist/ui/components/ListingLayout.d.ts +60 -0
- package/dist/ui/components/ListingLayout.js +121 -0
- package/dist/ui/components/ListingLayout.style.css +527 -0
- package/dist/ui/components/ListingViewShell.d.ts +38 -0
- package/dist/ui/components/ListingViewShell.js +11 -0
- package/dist/ui/components/Menu.d.ts +29 -0
- package/dist/ui/components/Menu.js +19 -0
- package/dist/ui/components/Menu.style.css +6 -0
- package/dist/ui/components/Modal.d.ts +18 -0
- package/dist/ui/components/Modal.js +79 -0
- package/dist/ui/components/Modal.style.css +102 -0
- package/dist/ui/components/Pagination.d.ts +25 -0
- package/dist/ui/components/Pagination.js +56 -0
- package/dist/ui/components/Pagination.style.css +76 -0
- package/dist/ui/components/PasswordStrengthIndicator.d.ts +12 -0
- package/dist/ui/components/PasswordStrengthIndicator.js +35 -0
- package/dist/ui/components/PasswordStrengthIndicator.style.css +56 -0
- package/dist/ui/components/PriceDisplay.d.ts +8 -0
- package/dist/ui/components/PriceDisplay.js +28 -0
- package/dist/ui/components/PriceDisplay.style.css +47 -0
- package/dist/ui/components/Progress.d.ts +23 -0
- package/dist/ui/components/Progress.js +32 -0
- package/dist/ui/components/Progress.style.css +81 -0
- package/dist/ui/components/Radio.d.ts +18 -0
- package/dist/ui/components/Radio.js +64 -0
- package/dist/ui/components/Radio.style.css +155 -0
- package/dist/ui/components/RatingDisplay.d.ts +8 -0
- package/dist/ui/components/RatingDisplay.js +15 -0
- package/dist/ui/components/RatingDisplay.style.css +50 -0
- package/dist/ui/components/ResponsiveView.d.ts +12 -0
- package/dist/ui/components/ResponsiveView.js +9 -0
- package/dist/ui/components/ResponsiveView.style.css +69 -0
- package/dist/ui/components/RoleBadge.d.ts +7 -0
- package/dist/ui/components/RoleBadge.js +21 -0
- package/dist/ui/components/RoleBadge.style.css +7 -0
- package/dist/ui/components/RowActionMenu.d.ts +13 -0
- package/dist/ui/components/RowActionMenu.js +17 -0
- package/dist/ui/components/RowActionMenu.style.css +91 -0
- package/dist/ui/components/SectionTabs.d.ts +19 -0
- package/dist/ui/components/SectionTabs.js +66 -0
- package/dist/ui/components/SectionTabs.style.css +163 -0
- package/dist/ui/components/Select.d.ts +19 -0
- package/dist/ui/components/Select.js +27 -0
- package/dist/ui/components/Select.style.css +177 -0
- package/dist/ui/components/Semantic.d.ts +154 -0
- package/dist/ui/components/Semantic.js +32 -0
- package/dist/ui/components/Semantic.style.css +14 -0
- package/dist/ui/components/SideDrawer.d.ts +28 -0
- package/dist/ui/components/SideDrawer.js +151 -0
- package/dist/ui/components/SideDrawer.style.css +214 -0
- package/dist/ui/components/SideModal.d.ts +25 -0
- package/dist/ui/components/SideModal.js +61 -0
- package/dist/ui/components/SideModal.style.css +77 -0
- package/dist/ui/components/Skeleton.d.ts +14 -0
- package/dist/ui/components/Skeleton.js +22 -0
- package/dist/ui/components/Skeleton.style.css +55 -0
- package/dist/ui/components/SkipToMain.d.ts +6 -0
- package/dist/ui/components/SkipToMain.js +6 -0
- package/dist/ui/components/SkipToMain.style.css +34 -0
- package/dist/ui/components/Slider.d.ts +17 -0
- package/dist/ui/components/Slider.js +38 -0
- package/dist/ui/components/Slider.style.css +17 -0
- package/dist/ui/components/SlottedListingView.d.ts +62 -0
- package/dist/ui/components/SlottedListingView.js +41 -0
- package/dist/ui/components/SortDropdown.d.ts +15 -0
- package/dist/ui/components/SortDropdown.js +8 -0
- package/dist/ui/components/SortDropdown.style.css +12 -0
- package/dist/ui/components/Spinner.d.ts +13 -0
- package/dist/ui/components/Spinner.js +15 -0
- package/dist/ui/components/Spinner.style.css +76 -0
- package/dist/ui/components/StackedViewShell.d.ts +50 -0
- package/dist/ui/components/StackedViewShell.js +39 -0
- package/dist/ui/components/StarRating.d.ts +17 -0
- package/dist/ui/components/StarRating.js +29 -0
- package/dist/ui/components/StarRating.style.css +44 -0
- package/dist/ui/components/StatsGrid.d.ts +18 -0
- package/dist/ui/components/StatsGrid.js +17 -0
- package/dist/ui/components/StatsGrid.style.css +96 -0
- package/dist/ui/components/StatusBadge.d.ts +18 -0
- package/dist/ui/components/StatusBadge.js +60 -0
- package/dist/ui/components/StatusBadge.style.css +5 -0
- package/dist/ui/components/StepperNav.d.ts +10 -0
- package/dist/ui/components/StepperNav.js +23 -0
- package/dist/ui/components/StepperNav.style.css +110 -0
- package/dist/ui/components/SummaryCard.d.ts +21 -0
- package/dist/ui/components/SummaryCard.js +15 -0
- package/dist/ui/components/SummaryCard.style.css +82 -0
- package/dist/ui/components/TabStrip.d.ts +34 -0
- package/dist/ui/components/TabStrip.js +57 -0
- package/dist/ui/components/TabStrip.style.css +97 -0
- package/dist/ui/components/TablePagination.d.ts +21 -0
- package/dist/ui/components/TablePagination.js +32 -0
- package/dist/ui/components/TablePagination.style.css +89 -0
- package/dist/ui/components/Tabs.d.ts +28 -0
- package/dist/ui/components/Tabs.js +41 -0
- package/dist/ui/components/Tabs.style.css +46 -0
- package/dist/ui/components/TagInput.d.ts +10 -0
- package/dist/ui/components/TagInput.js +60 -0
- package/dist/ui/components/TagInput.style.css +121 -0
- package/dist/ui/components/TextLink.d.ts +42 -0
- package/dist/ui/components/TextLink.js +48 -0
- package/dist/ui/components/TextLink.style.css +94 -0
- package/dist/ui/components/Textarea.d.ts +9 -0
- package/dist/ui/components/Textarea.js +21 -0
- package/dist/ui/components/Textarea.style.css +30 -0
- package/dist/ui/components/Toast.d.ts +15 -0
- package/dist/ui/components/Toast.js +61 -0
- package/dist/ui/components/Toast.style.css +114 -0
- package/dist/ui/components/Toggle.d.ts +12 -0
- package/dist/ui/components/Toggle.js +47 -0
- package/dist/ui/components/Toggle.style.css +107 -0
- package/dist/ui/components/Tooltip.d.ts +34 -0
- package/dist/ui/components/Tooltip.js +110 -0
- package/dist/ui/components/Tooltip.style.css +114 -0
- package/dist/ui/components/Typography.d.ts +50 -0
- package/dist/ui/components/Typography.js +103 -0
- package/dist/ui/components/Typography.style.css +178 -0
- package/dist/ui/components/UnsavedChangesModal.d.ts +17 -0
- package/dist/ui/components/UnsavedChangesModal.js +52 -0
- package/dist/ui/components/UnsavedChangesModal.style.css +33 -0
- package/dist/ui/components/ViewToggle.d.ts +15 -0
- package/dist/ui/components/ViewToggle.js +29 -0
- package/dist/ui/components/ViewToggle.style.css +50 -0
- package/dist/ui/components/index.style.css +76 -0
- package/dist/ui/index.d.ts +165 -1644
- package/dist/ui/index.js +87 -4784
- package/dist/ui/rich-text/RichText.d.ts +46 -0
- package/dist/ui/rich-text/RichText.js +172 -0
- package/dist/ui/rich-text/RichText.style.css +5 -0
- package/dist/ui/rich-text/index.d.ts +2 -0
- package/dist/ui/rich-text/index.js +1 -0
- package/dist/ui/style.helper.d.ts +7 -0
- package/dist/ui/style.helper.js +12 -0
- package/dist/utils/animation.helper.d.ts +19 -0
- package/dist/utils/animation.helper.js +19 -0
- package/dist/utils/array.helper.d.ts +17 -0
- package/dist/utils/array.helper.js +53 -0
- package/dist/utils/business-day.d.ts +47 -0
- package/dist/utils/business-day.js +68 -0
- package/dist/utils/client.d.ts +1 -0
- package/dist/utils/client.js +1 -0
- package/dist/utils/color.helper.d.ts +32 -0
- package/dist/utils/color.helper.js +51 -0
- package/dist/utils/cookie.converter.d.ts +7 -0
- package/dist/utils/cookie.converter.js +32 -0
- package/dist/utils/date.formatter.d.ts +22 -0
- package/dist/utils/date.formatter.js +194 -0
- package/dist/utils/event-manager.d.ts +45 -0
- package/dist/utils/event-manager.js +185 -0
- package/dist/utils/filter.helper.d.ts +18 -0
- package/dist/utils/filter.helper.js +21 -0
- package/dist/utils/id-generators.d.ts +243 -0
- package/dist/utils/id-generators.js +360 -0
- package/dist/utils/index.d.ts +17 -545
- package/dist/utils/index.js +18 -4
- package/dist/utils/media-field.d.ts +2 -0
- package/dist/utils/media-field.js +1 -0
- package/dist/utils/number.formatter.d.ts +13 -0
- package/dist/utils/number.formatter.js +100 -0
- package/dist/utils/object.helper.d.ts +16 -0
- package/dist/utils/object.helper.js +82 -0
- package/dist/utils/pagination.helper.d.ts +23 -0
- package/dist/utils/pagination.helper.js +24 -0
- package/dist/utils/schema-ui.d.ts +83 -0
- package/dist/utils/schema-ui.js +185 -0
- package/dist/utils/sorting.helper.d.ts +7 -0
- package/dist/utils/sorting.helper.js +16 -0
- package/dist/utils/string.formatter.d.ts +19 -0
- package/dist/utils/string.formatter.js +140 -0
- package/dist/utils/type.converter.d.ts +14 -0
- package/dist/utils/type.converter.js +61 -0
- package/dist/validation/ZodSetup.d.ts +5 -0
- package/dist/validation/ZodSetup.js +11 -0
- package/dist/validation/email.validator.d.ts +7 -0
- package/dist/validation/email.validator.js +33 -0
- package/dist/validation/index.d.ts +9 -126
- package/dist/validation/index.js +8 -4
- package/dist/validation/input.validator.d.ts +11 -0
- package/dist/validation/input.validator.js +33 -0
- package/dist/validation/password.validator.d.ts +21 -0
- package/dist/validation/password.validator.js +77 -0
- package/dist/validation/phone.validator.d.ts +9 -0
- package/dist/validation/phone.validator.js +41 -0
- package/dist/validation/schemas.d.ts +267 -0
- package/dist/validation/schemas.js +176 -0
- package/dist/validation/url.validator.d.ts +7 -0
- package/dist/validation/url.validator.js +44 -0
- package/dist/validation/zod-error-map.d.ts +17 -0
- package/dist/validation/zod-error-map.js +85 -0
- package/dist/values/index.d.ts +6 -0
- package/dist/values/index.js +6 -0
- package/dist/values/success-messages.d.ts +242 -0
- package/dist/values/success-messages.js +272 -0
- package/package.json +87 -445
- package/dist/chunk-2NMEKWO5.js +0 -35
- package/dist/chunk-2NMEKWO5.js.map +0 -1
- package/dist/chunk-6344OTT4.js +0 -329
- package/dist/chunk-6344OTT4.js.map +0 -1
- package/dist/chunk-7HUFI4MW.cjs +0 -941
- package/dist/chunk-7HUFI4MW.cjs.map +0 -1
- package/dist/chunk-AZ2XDBYA.cjs +0 -150
- package/dist/chunk-AZ2XDBYA.cjs.map +0 -1
- package/dist/chunk-CI4ZFLS7.js +0 -1162
- package/dist/chunk-CI4ZFLS7.js.map +0 -1
- package/dist/chunk-DSCHV5OD.js +0 -620
- package/dist/chunk-DSCHV5OD.js.map +0 -1
- package/dist/chunk-EEMSMWIZ.js +0 -566
- package/dist/chunk-EEMSMWIZ.js.map +0 -1
- package/dist/chunk-EPJNBIKL.js +0 -916
- package/dist/chunk-EPJNBIKL.js.map +0 -1
- package/dist/chunk-FJEY6LN2.cjs +0 -64
- package/dist/chunk-FJEY6LN2.cjs.map +0 -1
- package/dist/chunk-GZXXRVTM.cjs +0 -343
- package/dist/chunk-GZXXRVTM.cjs.map +0 -1
- package/dist/chunk-IE5L2QHV.js +0 -204
- package/dist/chunk-IE5L2QHV.js.map +0 -1
- package/dist/chunk-JPHORBTI.cjs +0 -366
- package/dist/chunk-JPHORBTI.cjs.map +0 -1
- package/dist/chunk-K4C5Z22R.js +0 -146
- package/dist/chunk-K4C5Z22R.js.map +0 -1
- package/dist/chunk-PAHR3D5L.js +0 -56
- package/dist/chunk-PAHR3D5L.js.map +0 -1
- package/dist/chunk-PE44UBFV.js +0 -324
- package/dist/chunk-PE44UBFV.js.map +0 -1
- package/dist/chunk-RNELVIKK.cjs +0 -1287
- package/dist/chunk-RNELVIKK.cjs.map +0 -1
- package/dist/chunk-S367Y35J.cjs +0 -39
- package/dist/chunk-S367Y35J.cjs.map +0 -1
- package/dist/chunk-ULLW73KN.cjs +0 -217
- package/dist/chunk-ULLW73KN.cjs.map +0 -1
- package/dist/chunk-UNYFAUWW.cjs +0 -630
- package/dist/chunk-UNYFAUWW.cjs.map +0 -1
- package/dist/chunk-V55QYTXF.js +0 -259
- package/dist/chunk-V55QYTXF.js.map +0 -1
- package/dist/chunk-WKVCFDEA.cjs +0 -599
- package/dist/chunk-WKVCFDEA.cjs.map +0 -1
- package/dist/chunk-YT4QVIBP.cjs +0 -292
- package/dist/chunk-YT4QVIBP.cjs.map +0 -1
- package/dist/cli/index.cjs +0 -155
- package/dist/cli/index.cjs.map +0 -1
- package/dist/cli/index.d.cts +0 -41
- package/dist/cli/index.js.map +0 -1
- package/dist/contracts/index.cjs +0 -37
- package/dist/contracts/index.cjs.map +0 -1
- package/dist/contracts/index.d.cts +0 -728
- package/dist/contracts/index.js.map +0 -1
- package/dist/core/index.cjs +0 -84
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -329
- package/dist/core/index.js.map +0 -1
- package/dist/errors/index.cjs +0 -57
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.d.cts +0 -96
- package/dist/errors/index.js.map +0 -1
- package/dist/extend-D57fwPSu.d.cts +0 -122
- package/dist/extend-D57fwPSu.d.ts +0 -122
- package/dist/extend-D_0wzsse.d.cts +0 -79
- package/dist/extend-D_0wzsse.d.ts +0 -79
- package/dist/extend-jcOQfU2G.d.cts +0 -162
- package/dist/extend-jcOQfU2G.d.ts +0 -162
- package/dist/feature-C8mVv66I.d.cts +0 -84
- package/dist/feature-C8mVv66I.d.ts +0 -84
- package/dist/feature-DENiK3vd.d.cts +0 -55
- package/dist/feature-DENiK3vd.d.ts +0 -55
- package/dist/feature-RWXQ_lnf.d.cts +0 -41
- package/dist/feature-RWXQ_lnf.d.ts +0 -41
- package/dist/features/about/index.cjs +0 -286
- package/dist/features/about/index.cjs.map +0 -1
- package/dist/features/about/index.d.cts +0 -42
- package/dist/features/about/index.js.map +0 -1
- package/dist/features/account/index.cjs +0 -1032
- package/dist/features/account/index.cjs.map +0 -1
- package/dist/features/account/index.d.cts +0 -555
- package/dist/features/account/index.js.map +0 -1
- package/dist/features/admin/index.cjs +0 -2747
- package/dist/features/admin/index.cjs.map +0 -1
- package/dist/features/admin/index.d.cts +0 -554
- package/dist/features/admin/index.js.map +0 -1
- package/dist/features/auctions/index.cjs +0 -1219
- package/dist/features/auctions/index.cjs.map +0 -1
- package/dist/features/auctions/index.d.cts +0 -513
- package/dist/features/auctions/index.js.map +0 -1
- package/dist/features/auth/index.cjs +0 -1897
- package/dist/features/auth/index.cjs.map +0 -1
- package/dist/features/auth/index.d.cts +0 -315
- package/dist/features/auth/index.js.map +0 -1
- package/dist/features/auth/server.cjs +0 -531
- package/dist/features/auth/server.cjs.map +0 -1
- package/dist/features/auth/server.d.cts +0 -24
- package/dist/features/auth/server.js.map +0 -1
- package/dist/features/before-after/index.cjs +0 -559
- package/dist/features/before-after/index.cjs.map +0 -1
- package/dist/features/before-after/index.d.cts +0 -128
- package/dist/features/before-after/index.js.map +0 -1
- package/dist/features/blog/index.cjs +0 -4088
- package/dist/features/blog/index.cjs.map +0 -1
- package/dist/features/blog/index.d.cts +0 -492
- package/dist/features/blog/index.js.map +0 -1
- package/dist/features/blog/server.cjs +0 -184
- package/dist/features/blog/server.cjs.map +0 -1
- package/dist/features/blog/server.d.cts +0 -74
- package/dist/features/blog/server.js.map +0 -1
- package/dist/features/cart/index.cjs +0 -1097
- package/dist/features/cart/index.cjs.map +0 -1
- package/dist/features/cart/index.d.cts +0 -451
- package/dist/features/cart/index.js.map +0 -1
- package/dist/features/categories/index.cjs +0 -2062
- package/dist/features/categories/index.cjs.map +0 -1
- package/dist/features/categories/index.d.cts +0 -461
- package/dist/features/categories/index.js.map +0 -1
- package/dist/features/categories/server.cjs +0 -796
- package/dist/features/categories/server.cjs.map +0 -1
- package/dist/features/categories/server.d.cts +0 -47
- package/dist/features/categories/server.js.map +0 -1
- package/dist/features/checkout/index.cjs +0 -200
- package/dist/features/checkout/index.cjs.map +0 -1
- package/dist/features/checkout/index.d.cts +0 -70
- package/dist/features/checkout/index.js.map +0 -1
- package/dist/features/cms/index.cjs +0 -5
- package/dist/features/cms/index.cjs.map +0 -1
- package/dist/features/cms/index.d.cts +0 -2
- package/dist/features/cms/index.js.map +0 -1
- package/dist/features/collections/index.cjs +0 -394
- package/dist/features/collections/index.cjs.map +0 -1
- package/dist/features/collections/index.d.cts +0 -148
- package/dist/features/collections/index.js.map +0 -1
- package/dist/features/consultation/index.cjs +0 -1099
- package/dist/features/consultation/index.cjs.map +0 -1
- package/dist/features/consultation/index.d.cts +0 -172
- package/dist/features/consultation/index.js.map +0 -1
- package/dist/features/contact/index.cjs +0 -593
- package/dist/features/contact/index.cjs.map +0 -1
- package/dist/features/contact/index.d.cts +0 -56
- package/dist/features/contact/index.js.map +0 -1
- package/dist/features/copilot/index.cjs +0 -688
- package/dist/features/copilot/index.cjs.map +0 -1
- package/dist/features/copilot/index.d.cts +0 -47
- package/dist/features/copilot/index.js.map +0 -1
- package/dist/features/corporate/index.cjs +0 -796
- package/dist/features/corporate/index.cjs.map +0 -1
- package/dist/features/corporate/index.d.cts +0 -183
- package/dist/features/corporate/index.js.map +0 -1
- package/dist/features/events/index.cjs +0 -1486
- package/dist/features/events/index.cjs.map +0 -1
- package/dist/features/events/index.d.cts +0 -841
- package/dist/features/events/index.js.map +0 -1
- package/dist/features/events/server.cjs +0 -199
- package/dist/features/events/server.cjs.map +0 -1
- package/dist/features/events/server.d.cts +0 -40
- package/dist/features/events/server.js.map +0 -1
- package/dist/features/faq/index.cjs +0 -1714
- package/dist/features/faq/index.cjs.map +0 -1
- package/dist/features/faq/index.d.cts +0 -619
- package/dist/features/faq/index.js.map +0 -1
- package/dist/features/filters/index.cjs +0 -1073
- package/dist/features/filters/index.cjs.map +0 -1
- package/dist/features/filters/index.d.cts +0 -136
- package/dist/features/filters/index.js.map +0 -1
- package/dist/features/forms/index.cjs +0 -936
- package/dist/features/forms/index.cjs.map +0 -1
- package/dist/features/forms/index.d.cts +0 -129
- package/dist/features/forms/index.js.map +0 -1
- package/dist/features/homepage/index.cjs +0 -6321
- package/dist/features/homepage/index.cjs.map +0 -1
- package/dist/features/homepage/index.d.cts +0 -846
- package/dist/features/homepage/index.js.map +0 -1
- package/dist/features/homepage/server.cjs +0 -1038
- package/dist/features/homepage/server.cjs.map +0 -1
- package/dist/features/homepage/server.d.cts +0 -121
- package/dist/features/homepage/server.js.map +0 -1
- package/dist/features/layout/index.cjs +0 -1766
- package/dist/features/layout/index.cjs.map +0 -1
- package/dist/features/layout/index.d.cts +0 -315
- package/dist/features/layout/index.js.map +0 -1
- package/dist/features/loyalty/index.cjs +0 -352
- package/dist/features/loyalty/index.cjs.map +0 -1
- package/dist/features/loyalty/index.d.cts +0 -174
- package/dist/features/loyalty/index.js.map +0 -1
- package/dist/features/media/index.cjs +0 -3620
- package/dist/features/media/index.cjs.map +0 -1
- package/dist/features/media/index.d.cts +0 -425
- package/dist/features/media/index.js.map +0 -1
- package/dist/features/orders/index.cjs +0 -882
- package/dist/features/orders/index.cjs.map +0 -1
- package/dist/features/orders/index.d.cts +0 -370
- package/dist/features/orders/index.js.map +0 -1
- package/dist/features/payments/index.cjs +0 -341
- package/dist/features/payments/index.cjs.map +0 -1
- package/dist/features/payments/index.d.cts +0 -141
- package/dist/features/payments/index.js.map +0 -1
- package/dist/features/pre-orders/index.cjs +0 -558
- package/dist/features/pre-orders/index.cjs.map +0 -1
- package/dist/features/pre-orders/index.d.cts +0 -170
- package/dist/features/pre-orders/index.js.map +0 -1
- package/dist/features/pre-orders/server.cjs +0 -111
- package/dist/features/pre-orders/server.cjs.map +0 -1
- package/dist/features/pre-orders/server.d.cts +0 -17
- package/dist/features/pre-orders/server.js.map +0 -1
- package/dist/features/products/index.cjs +0 -2513
- package/dist/features/products/index.cjs.map +0 -1
- package/dist/features/products/index.d.cts +0 -1066
- package/dist/features/products/index.js.map +0 -1
- package/dist/features/products/server.cjs +0 -809
- package/dist/features/products/server.cjs.map +0 -1
- package/dist/features/products/server.d.cts +0 -52
- package/dist/features/products/server.js.map +0 -1
- package/dist/features/promotions/index.cjs +0 -977
- package/dist/features/promotions/index.cjs.map +0 -1
- package/dist/features/promotions/index.d.cts +0 -301
- package/dist/features/promotions/index.js.map +0 -1
- package/dist/features/reviews/index.cjs +0 -2324
- package/dist/features/reviews/index.cjs.map +0 -1
- package/dist/features/reviews/index.d.cts +0 -434
- package/dist/features/reviews/index.js.map +0 -1
- package/dist/features/reviews/server.cjs +0 -776
- package/dist/features/reviews/server.cjs.map +0 -1
- package/dist/features/reviews/server.d.cts +0 -49
- package/dist/features/reviews/server.js.map +0 -1
- package/dist/features/search/index.cjs +0 -1368
- package/dist/features/search/index.cjs.map +0 -1
- package/dist/features/search/index.d.cts +0 -298
- package/dist/features/search/index.js.map +0 -1
- package/dist/features/search/server.cjs +0 -154
- package/dist/features/search/server.cjs.map +0 -1
- package/dist/features/search/server.d.cts +0 -83
- package/dist/features/search/server.js.map +0 -1
- package/dist/features/seller/index.cjs +0 -2086
- package/dist/features/seller/index.cjs.map +0 -1
- package/dist/features/seller/index.d.cts +0 -926
- package/dist/features/seller/index.js.map +0 -1
- package/dist/features/stores/index.cjs +0 -1942
- package/dist/features/stores/index.cjs.map +0 -1
- package/dist/features/stores/index.d.cts +0 -536
- package/dist/features/stores/index.js.map +0 -1
- package/dist/features/stores/server.cjs +0 -451
- package/dist/features/stores/server.cjs.map +0 -1
- package/dist/features/stores/server.d.cts +0 -106
- package/dist/features/stores/server.js.map +0 -1
- package/dist/features/whatsapp-bot/index.cjs +0 -168
- package/dist/features/whatsapp-bot/index.cjs.map +0 -1
- package/dist/features/whatsapp-bot/index.d.cts +0 -85
- package/dist/features/whatsapp-bot/index.js.map +0 -1
- package/dist/features/wishlist/index.cjs +0 -904
- package/dist/features/wishlist/index.cjs.map +0 -1
- package/dist/features/wishlist/index.d.cts +0 -360
- package/dist/features/wishlist/index.js.map +0 -1
- package/dist/http/index.cjs +0 -21
- package/dist/http/index.cjs.map +0 -1
- package/dist/http/index.d.cts +0 -61
- package/dist/http/index.js.map +0 -1
- package/dist/index-B6T9NNcG.d.cts +0 -9
- package/dist/index-B6T9NNcG.d.ts +0 -9
- package/dist/index-CakUKzrE.d.cts +0 -10
- package/dist/index-CakUKzrE.d.ts +0 -10
- package/dist/index-D0Fxv9Z8.d.cts +0 -32
- package/dist/index-D0Fxv9Z8.d.ts +0 -32
- package/dist/index-Dh42RtMY.d.cts +0 -54
- package/dist/index-Dh42RtMY.d.ts +0 -54
- package/dist/index.cjs +0 -1182
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -17
- package/dist/index.js.map +0 -1
- package/dist/instrumentation/index.cjs +0 -17
- package/dist/instrumentation/index.cjs.map +0 -1
- package/dist/instrumentation/index.d.cts +0 -66
- package/dist/instrumentation/index.js.map +0 -1
- package/dist/monitoring/index.cjs +0 -141
- package/dist/monitoring/index.cjs.map +0 -1
- package/dist/monitoring/index.d.cts +0 -181
- package/dist/monitoring/index.js.map +0 -1
- package/dist/next/index.cjs +0 -693
- package/dist/next/index.cjs.map +0 -1
- package/dist/next/index.d.cts +0 -777
- package/dist/next/index.js.map +0 -1
- package/dist/providers/auth-firebase/index.cjs +0 -400
- package/dist/providers/auth-firebase/index.cjs.map +0 -1
- package/dist/providers/auth-firebase/index.d.cts +0 -137
- package/dist/providers/auth-firebase/index.js.map +0 -1
- package/dist/providers/db-firebase/index.cjs +0 -533
- package/dist/providers/db-firebase/index.cjs.map +0 -1
- package/dist/providers/db-firebase/index.d.cts +0 -265
- package/dist/providers/db-firebase/index.js.map +0 -1
- package/dist/providers/email-resend/index.cjs +0 -58
- package/dist/providers/email-resend/index.cjs.map +0 -1
- package/dist/providers/email-resend/index.d.cts +0 -73
- package/dist/providers/email-resend/index.js.map +0 -1
- package/dist/providers/payment-razorpay/index.cjs +0 -111
- package/dist/providers/payment-razorpay/index.cjs.map +0 -1
- package/dist/providers/payment-razorpay/index.d.cts +0 -96
- package/dist/providers/payment-razorpay/index.js.map +0 -1
- package/dist/providers/search-algolia/index.cjs +0 -301
- package/dist/providers/search-algolia/index.cjs.map +0 -1
- package/dist/providers/search-algolia/index.d.cts +0 -251
- package/dist/providers/search-algolia/index.d.ts +0 -251
- package/dist/providers/search-algolia/index.js +0 -280
- package/dist/providers/search-algolia/index.js.map +0 -1
- package/dist/providers/shipping-shiprocket/index.cjs +0 -147
- package/dist/providers/shipping-shiprocket/index.cjs.map +0 -1
- package/dist/providers/shipping-shiprocket/index.d.cts +0 -236
- package/dist/providers/shipping-shiprocket/index.js.map +0 -1
- package/dist/providers/storage-firebase/index.cjs +0 -176
- package/dist/providers/storage-firebase/index.cjs.map +0 -1
- package/dist/providers/storage-firebase/index.d.cts +0 -53
- package/dist/providers/storage-firebase/index.js.map +0 -1
- package/dist/react/index.cjs +0 -1687
- package/dist/react/index.cjs.map +0 -1
- package/dist/react/index.d.cts +0 -788
- package/dist/react/index.js.map +0 -1
- package/dist/repository-BO60jtdT.d.cts +0 -61
- package/dist/repository-BO60jtdT.d.ts +0 -61
- package/dist/repository-jKU_Ji1P.d.cts +0 -44
- package/dist/repository-jKU_Ji1P.d.ts +0 -44
- package/dist/security/index.cjs +0 -138
- package/dist/security/index.cjs.map +0 -1
- package/dist/security/index.d.cts +0 -309
- package/dist/security/index.js.map +0 -1
- package/dist/seed/index.cjs +0 -1085
- package/dist/seed/index.cjs.map +0 -1
- package/dist/seed/index.d.cts +0 -397
- package/dist/seed/index.js.map +0 -1
- package/dist/seo/index.cjs +0 -81
- package/dist/seo/index.cjs.map +0 -1
- package/dist/seo/index.d.cts +0 -150
- package/dist/seo/index.js.map +0 -1
- package/dist/style/tailwind/index.cjs +0 -40
- package/dist/style/tailwind/index.cjs.map +0 -1
- package/dist/style/tailwind/index.d.cts +0 -34
- package/dist/style/tailwind/index.js.map +0 -1
- package/dist/style/vanilla/index.cjs +0 -40
- package/dist/style/vanilla/index.cjs.map +0 -1
- package/dist/style/vanilla/index.d.cts +0 -26
- package/dist/style/vanilla/index.js.map +0 -1
- package/dist/style-BSlM-eWG.d.cts +0 -25
- package/dist/style-BSlM-eWG.d.ts +0 -25
- package/dist/tokens/index.cjs +0 -45
- package/dist/tokens/index.cjs.map +0 -1
- package/dist/tokens/index.d.cts +0 -734
- package/dist/tokens/index.js.map +0 -1
- package/dist/ui/index.cjs +0 -4870
- package/dist/ui/index.cjs.map +0 -1
- package/dist/ui/index.d.cts +0 -1644
- package/dist/ui/index.js.map +0 -1
- package/dist/utils/index.cjs +0 -505
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -545
- package/dist/utils/index.js.map +0 -1
- package/dist/validation/index.cjs +0 -153
- package/dist/validation/index.cjs.map +0 -1
- package/dist/validation/index.d.cts +0 -126
- package/dist/validation/index.js.map +0 -1
package/dist/ui/index.cjs
DELETED
|
@@ -1,4870 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var tailwindMerge = require('tailwind-merge');
|
|
7
|
-
var Link = require('next/link');
|
|
8
|
-
var reactDom = require('react-dom');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
-
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
14
|
-
|
|
15
|
-
var __defProp = Object.defineProperty;
|
|
16
|
-
var __defProps = Object.defineProperties;
|
|
17
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
18
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
19
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
21
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22
|
-
var __spreadValues = (a, b) => {
|
|
23
|
-
for (var prop in b || (b = {}))
|
|
24
|
-
if (__hasOwnProp.call(b, prop))
|
|
25
|
-
__defNormalProp(a, prop, b[prop]);
|
|
26
|
-
if (__getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
28
|
-
if (__propIsEnum.call(b, prop))
|
|
29
|
-
__defNormalProp(a, prop, b[prop]);
|
|
30
|
-
}
|
|
31
|
-
return a;
|
|
32
|
-
};
|
|
33
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
34
|
-
var __objRest = (source, exclude) => {
|
|
35
|
-
var target = {};
|
|
36
|
-
for (var prop in source)
|
|
37
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
38
|
-
target[prop] = source[prop];
|
|
39
|
-
if (source != null && __getOwnPropSymbols)
|
|
40
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
41
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
42
|
-
target[prop] = source[prop];
|
|
43
|
-
}
|
|
44
|
-
return target;
|
|
45
|
-
};
|
|
46
|
-
var Section = React__default.default.forwardRef(
|
|
47
|
-
(_a, ref) => {
|
|
48
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", __spreadProps(__spreadValues({ className, ref }, props), { children }));
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
Section.displayName = "Section";
|
|
53
|
-
function Article(_a) {
|
|
54
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
55
|
-
return /* @__PURE__ */ jsxRuntime.jsx("article", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
56
|
-
}
|
|
57
|
-
function Main(_a) {
|
|
58
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
59
|
-
return /* @__PURE__ */ jsxRuntime.jsx("main", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
60
|
-
}
|
|
61
|
-
var Aside = React__default.default.forwardRef(
|
|
62
|
-
(_a, ref) => {
|
|
63
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
64
|
-
return /* @__PURE__ */ jsxRuntime.jsx("aside", __spreadProps(__spreadValues({ className, ref }, props), { children }));
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
Aside.displayName = "Aside";
|
|
68
|
-
function Nav(_a) {
|
|
69
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
70
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
71
|
-
}
|
|
72
|
-
function BlockHeader(_a) {
|
|
73
|
-
var _b = _a, {
|
|
74
|
-
className = "",
|
|
75
|
-
children
|
|
76
|
-
} = _b, props = __objRest(_b, [
|
|
77
|
-
"className",
|
|
78
|
-
"children"
|
|
79
|
-
]);
|
|
80
|
-
return /* @__PURE__ */ jsxRuntime.jsx("header", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
81
|
-
}
|
|
82
|
-
function BlockFooter(_a) {
|
|
83
|
-
var _b = _a, {
|
|
84
|
-
className = "",
|
|
85
|
-
children
|
|
86
|
-
} = _b, props = __objRest(_b, [
|
|
87
|
-
"className",
|
|
88
|
-
"children"
|
|
89
|
-
]);
|
|
90
|
-
return /* @__PURE__ */ jsxRuntime.jsx("footer", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
91
|
-
}
|
|
92
|
-
function Ul(_a) {
|
|
93
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
94
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
95
|
-
}
|
|
96
|
-
function Ol(_a) {
|
|
97
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
98
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
99
|
-
}
|
|
100
|
-
function Li(_a) {
|
|
101
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
102
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
103
|
-
}
|
|
104
|
-
var Header = BlockHeader;
|
|
105
|
-
var Footer = BlockFooter;
|
|
106
|
-
var Div = React__default.default.forwardRef(
|
|
107
|
-
(_a, ref) => {
|
|
108
|
-
var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
109
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className }, props), { children }));
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
Div.displayName = "Div";
|
|
113
|
-
var UI_THEME = {
|
|
114
|
-
typography: {
|
|
115
|
-
h1: "text-3xl md:text-4xl lg:text-5xl font-bold tracking-tight font-display",
|
|
116
|
-
h2: "text-2xl md:text-3xl lg:text-4xl font-bold tracking-tight font-display",
|
|
117
|
-
h3: "text-xl md:text-2xl lg:text-3xl font-bold tracking-tight font-display",
|
|
118
|
-
h4: "text-lg md:text-xl lg:text-2xl font-bold font-display",
|
|
119
|
-
h5: "text-base md:text-lg lg:text-xl font-medium",
|
|
120
|
-
h6: "text-sm md:text-base lg:text-lg font-medium",
|
|
121
|
-
body: "text-base lg:text-lg",
|
|
122
|
-
small: "text-sm lg:text-base",
|
|
123
|
-
xs: "text-xs lg:text-sm"
|
|
124
|
-
},
|
|
125
|
-
themed: {
|
|
126
|
-
textPrimary: "text-zinc-900 dark:text-zinc-50",
|
|
127
|
-
textSecondary: "text-zinc-500 dark:text-zinc-400",
|
|
128
|
-
textMuted: "text-zinc-400 dark:text-zinc-500",
|
|
129
|
-
textError: "text-red-600 dark:text-red-400",
|
|
130
|
-
textSuccess: "text-emerald-600 dark:text-emerald-400"
|
|
131
|
-
},
|
|
132
|
-
colors: {
|
|
133
|
-
form: {
|
|
134
|
-
required: "text-red-500"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
function Heading(_a) {
|
|
139
|
-
var _b = _a, {
|
|
140
|
-
level = 1,
|
|
141
|
-
variant = "primary",
|
|
142
|
-
className = "",
|
|
143
|
-
children
|
|
144
|
-
} = _b, props = __objRest(_b, [
|
|
145
|
-
"level",
|
|
146
|
-
"variant",
|
|
147
|
-
"className",
|
|
148
|
-
"children"
|
|
149
|
-
]);
|
|
150
|
-
const Tag = `h${level}`;
|
|
151
|
-
const { typography, themed } = UI_THEME;
|
|
152
|
-
const sizeClasses = {
|
|
153
|
-
1: typography.h1,
|
|
154
|
-
2: typography.h2,
|
|
155
|
-
3: typography.h3,
|
|
156
|
-
4: typography.h4,
|
|
157
|
-
5: typography.h5,
|
|
158
|
-
6: typography.h6
|
|
159
|
-
};
|
|
160
|
-
const variantClasses = {
|
|
161
|
-
primary: themed.textPrimary,
|
|
162
|
-
secondary: themed.textSecondary,
|
|
163
|
-
muted: themed.textMuted,
|
|
164
|
-
none: ""
|
|
165
|
-
};
|
|
166
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
167
|
-
Tag,
|
|
168
|
-
__spreadProps(__spreadValues({
|
|
169
|
-
className: `${sizeClasses[level]} ${variantClasses[variant]} ${className}`
|
|
170
|
-
}, props), {
|
|
171
|
-
children
|
|
172
|
-
})
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
function Text(_a) {
|
|
176
|
-
var _b = _a, {
|
|
177
|
-
variant = "primary",
|
|
178
|
-
size = "base",
|
|
179
|
-
weight = "normal",
|
|
180
|
-
className = "",
|
|
181
|
-
as: Tag = "p",
|
|
182
|
-
children
|
|
183
|
-
} = _b, props = __objRest(_b, [
|
|
184
|
-
"variant",
|
|
185
|
-
"size",
|
|
186
|
-
"weight",
|
|
187
|
-
"className",
|
|
188
|
-
"as",
|
|
189
|
-
"children"
|
|
190
|
-
]);
|
|
191
|
-
const { typography, themed } = UI_THEME;
|
|
192
|
-
const sizeClasses = {
|
|
193
|
-
xs: typography.xs,
|
|
194
|
-
sm: typography.small,
|
|
195
|
-
base: typography.body,
|
|
196
|
-
lg: "text-lg",
|
|
197
|
-
xl: "text-xl"
|
|
198
|
-
};
|
|
199
|
-
const weightClasses = {
|
|
200
|
-
normal: "font-normal",
|
|
201
|
-
medium: "font-medium",
|
|
202
|
-
semibold: "font-semibold",
|
|
203
|
-
bold: "font-bold"
|
|
204
|
-
};
|
|
205
|
-
const variantClasses = {
|
|
206
|
-
primary: themed.textPrimary,
|
|
207
|
-
secondary: themed.textSecondary,
|
|
208
|
-
muted: themed.textMuted,
|
|
209
|
-
error: themed.textError,
|
|
210
|
-
success: themed.textSuccess,
|
|
211
|
-
none: ""
|
|
212
|
-
};
|
|
213
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
-
Tag,
|
|
215
|
-
__spreadProps(__spreadValues({
|
|
216
|
-
className: `${sizeClasses[size]} ${weightClasses[weight]} ${variantClasses[variant]} ${className}`
|
|
217
|
-
}, props), {
|
|
218
|
-
children
|
|
219
|
-
})
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
function Label(_a) {
|
|
223
|
-
var _b = _a, {
|
|
224
|
-
required,
|
|
225
|
-
className = "",
|
|
226
|
-
children
|
|
227
|
-
} = _b, props = __objRest(_b, [
|
|
228
|
-
"required",
|
|
229
|
-
"className",
|
|
230
|
-
"children"
|
|
231
|
-
]);
|
|
232
|
-
const { themed, typography, colors } = UI_THEME;
|
|
233
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
234
|
-
"label",
|
|
235
|
-
__spreadProps(__spreadValues({
|
|
236
|
-
className: `block ${typography.small} font-medium ${themed.textSecondary} mb-1.5 ${className}`
|
|
237
|
-
}, props), {
|
|
238
|
-
children: [
|
|
239
|
-
children,
|
|
240
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${colors.form.required} ml-1`, children: "*" })
|
|
241
|
-
]
|
|
242
|
-
})
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
function Caption(_a) {
|
|
246
|
-
var _b = _a, {
|
|
247
|
-
variant = "default",
|
|
248
|
-
className = "",
|
|
249
|
-
children
|
|
250
|
-
} = _b, props = __objRest(_b, [
|
|
251
|
-
"variant",
|
|
252
|
-
"className",
|
|
253
|
-
"children"
|
|
254
|
-
]);
|
|
255
|
-
const { themed, typography } = UI_THEME;
|
|
256
|
-
const variantClasses = {
|
|
257
|
-
default: themed.textMuted,
|
|
258
|
-
accent: "text-primary font-semibold",
|
|
259
|
-
inverse: "text-primary/40"
|
|
260
|
-
};
|
|
261
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
262
|
-
"span",
|
|
263
|
-
__spreadProps(__spreadValues({
|
|
264
|
-
className: `${typography.xs} ${variantClasses[variant]} ${className}`
|
|
265
|
-
}, props), {
|
|
266
|
-
children
|
|
267
|
-
})
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
function Span(_a) {
|
|
271
|
-
var _b = _a, {
|
|
272
|
-
variant = "inherit",
|
|
273
|
-
size,
|
|
274
|
-
weight,
|
|
275
|
-
className = "",
|
|
276
|
-
children
|
|
277
|
-
} = _b, props = __objRest(_b, [
|
|
278
|
-
"variant",
|
|
279
|
-
"size",
|
|
280
|
-
"weight",
|
|
281
|
-
"className",
|
|
282
|
-
"children"
|
|
283
|
-
]);
|
|
284
|
-
const { themed, typography } = UI_THEME;
|
|
285
|
-
const variantClasses = {
|
|
286
|
-
inherit: "",
|
|
287
|
-
primary: themed.textPrimary,
|
|
288
|
-
secondary: themed.textSecondary,
|
|
289
|
-
muted: themed.textMuted,
|
|
290
|
-
error: themed.textError,
|
|
291
|
-
success: themed.textSuccess,
|
|
292
|
-
accent: "text-primary"
|
|
293
|
-
};
|
|
294
|
-
const sizeClasses = {
|
|
295
|
-
xs: typography.xs,
|
|
296
|
-
sm: typography.small,
|
|
297
|
-
base: typography.body,
|
|
298
|
-
lg: "text-lg",
|
|
299
|
-
xl: "text-xl"
|
|
300
|
-
};
|
|
301
|
-
const weightClasses = {
|
|
302
|
-
normal: "font-normal",
|
|
303
|
-
medium: "font-medium",
|
|
304
|
-
semibold: "font-semibold",
|
|
305
|
-
bold: "font-bold"
|
|
306
|
-
};
|
|
307
|
-
const classes = [
|
|
308
|
-
size ? sizeClasses[size] : "",
|
|
309
|
-
weight ? weightClasses[weight] : "",
|
|
310
|
-
variantClasses[variant],
|
|
311
|
-
className
|
|
312
|
-
].filter(Boolean).join(" ");
|
|
313
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({ className: classes }, props), { children }));
|
|
314
|
-
}
|
|
315
|
-
function Spinner({
|
|
316
|
-
size = "md",
|
|
317
|
-
variant = "primary",
|
|
318
|
-
className = "",
|
|
319
|
-
label = "Loading..."
|
|
320
|
-
}) {
|
|
321
|
-
const sizeClasses = {
|
|
322
|
-
sm: "w-4 h-4 border-2",
|
|
323
|
-
md: "w-8 h-8 border-2",
|
|
324
|
-
lg: "w-12 h-12 border-[3px]",
|
|
325
|
-
xl: "w-16 h-16 border-4"
|
|
326
|
-
};
|
|
327
|
-
const variantClasses = {
|
|
328
|
-
primary: "border-primary-600 border-t-transparent dark:border-secondary-500 dark:border-t-transparent",
|
|
329
|
-
white: "border-white border-t-transparent",
|
|
330
|
-
current: "border-current border-t-transparent"
|
|
331
|
-
};
|
|
332
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
333
|
-
"div",
|
|
334
|
-
{
|
|
335
|
-
className: `inline-flex items-center gap-3 ${className}`,
|
|
336
|
-
role: "status",
|
|
337
|
-
"aria-label": label,
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
340
|
-
"div",
|
|
341
|
-
{
|
|
342
|
-
className: `${sizeClasses[size]} ${variantClasses[variant]} rounded-full animate-spin force-spin`
|
|
343
|
-
}
|
|
344
|
-
),
|
|
345
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: label })
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
var BG_TERTIARY = "bg-zinc-100 dark:bg-slate-800";
|
|
351
|
-
var WAVE_CSS = `
|
|
352
|
-
@keyframes appkit-skeleton-wave {
|
|
353
|
-
0% { transform: translateX(-100%); }
|
|
354
|
-
50%, 100% { transform: translateX(100%); }
|
|
355
|
-
}
|
|
356
|
-
.appkit-skeleton-wave {
|
|
357
|
-
position: relative;
|
|
358
|
-
overflow: hidden;
|
|
359
|
-
}
|
|
360
|
-
.appkit-skeleton-wave::after {
|
|
361
|
-
content: "";
|
|
362
|
-
position: absolute;
|
|
363
|
-
top: 0; left: 0; right: 0; bottom: 0;
|
|
364
|
-
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
|
|
365
|
-
animation: appkit-skeleton-wave 1.5s infinite;
|
|
366
|
-
}
|
|
367
|
-
`;
|
|
368
|
-
function Skeleton({
|
|
369
|
-
variant = "text",
|
|
370
|
-
width,
|
|
371
|
-
height,
|
|
372
|
-
className = "",
|
|
373
|
-
animation = "pulse"
|
|
374
|
-
}) {
|
|
375
|
-
const variantClass = variant === "circular" ? "rounded-full" : "rounded";
|
|
376
|
-
const defaultSize = {
|
|
377
|
-
circular: { width: "40px", height: "40px" },
|
|
378
|
-
rectangular: { width: "100%", height: "140px" },
|
|
379
|
-
text: { width: "100%", height: "1em" }
|
|
380
|
-
}[variant];
|
|
381
|
-
const animationClass = {
|
|
382
|
-
pulse: "animate-pulse",
|
|
383
|
-
wave: "appkit-skeleton-wave",
|
|
384
|
-
none: ""
|
|
385
|
-
}[animation];
|
|
386
|
-
const style = {
|
|
387
|
-
width: width != null ? width : defaultSize.width,
|
|
388
|
-
height: height != null ? height : defaultSize.height
|
|
389
|
-
};
|
|
390
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
391
|
-
animation === "wave" && /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: WAVE_CSS } }),
|
|
392
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
393
|
-
"div",
|
|
394
|
-
{
|
|
395
|
-
className: `${BG_TERTIARY} ${variantClass} ${animationClass} ${className}`,
|
|
396
|
-
style,
|
|
397
|
-
role: "status",
|
|
398
|
-
"aria-label": "Loading",
|
|
399
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
400
|
-
}
|
|
401
|
-
)
|
|
402
|
-
] });
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
406
|
-
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
407
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
408
|
-
}).join(" ").trim();
|
|
409
|
-
|
|
410
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
|
|
411
|
-
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
412
|
-
|
|
413
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
|
|
414
|
-
var toCamelCase = (string) => string.replace(
|
|
415
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
416
|
-
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
417
|
-
);
|
|
418
|
-
|
|
419
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
|
|
420
|
-
var toPascalCase = (string) => {
|
|
421
|
-
const camelCase = toCamelCase(string);
|
|
422
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
// node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
426
|
-
var defaultAttributes = {
|
|
427
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
428
|
-
width: 24,
|
|
429
|
-
height: 24,
|
|
430
|
-
viewBox: "0 0 24 24",
|
|
431
|
-
fill: "none",
|
|
432
|
-
stroke: "currentColor",
|
|
433
|
-
strokeWidth: 2,
|
|
434
|
-
strokeLinecap: "round",
|
|
435
|
-
strokeLinejoin: "round"
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
|
|
439
|
-
var hasA11yProp = (props) => {
|
|
440
|
-
for (const prop in props) {
|
|
441
|
-
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
442
|
-
return true;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
return false;
|
|
446
|
-
};
|
|
447
|
-
var LucideContext = React.createContext({});
|
|
448
|
-
var useLucideContext = () => React.useContext(LucideContext);
|
|
449
|
-
|
|
450
|
-
// node_modules/lucide-react/dist/esm/Icon.js
|
|
451
|
-
var Icon = React.forwardRef(
|
|
452
|
-
(_a, ref) => {
|
|
453
|
-
var _b = _a, { color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children", "iconNode"]);
|
|
454
|
-
var _a2, _b2, _c;
|
|
455
|
-
const {
|
|
456
|
-
size: contextSize = 24,
|
|
457
|
-
strokeWidth: contextStrokeWidth = 2,
|
|
458
|
-
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
459
|
-
color: contextColor = "currentColor",
|
|
460
|
-
className: contextClass = ""
|
|
461
|
-
} = (_a2 = useLucideContext()) != null ? _a2 : {};
|
|
462
|
-
const calculatedStrokeWidth = (absoluteStrokeWidth != null ? absoluteStrokeWidth : contextAbsoluteStrokeWidth) ? Number(strokeWidth != null ? strokeWidth : contextStrokeWidth) * 24 / Number(size != null ? size : contextSize) : strokeWidth != null ? strokeWidth : contextStrokeWidth;
|
|
463
|
-
return React.createElement(
|
|
464
|
-
"svg",
|
|
465
|
-
__spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
466
|
-
ref
|
|
467
|
-
}, defaultAttributes), {
|
|
468
|
-
width: (_b2 = size != null ? size : contextSize) != null ? _b2 : defaultAttributes.width,
|
|
469
|
-
height: (_c = size != null ? size : contextSize) != null ? _c : defaultAttributes.height,
|
|
470
|
-
stroke: color != null ? color : contextColor,
|
|
471
|
-
strokeWidth: calculatedStrokeWidth,
|
|
472
|
-
className: mergeClasses("lucide", contextClass, className)
|
|
473
|
-
}), !children && !hasA11yProp(rest) && { "aria-hidden": "true" }), rest),
|
|
474
|
-
[
|
|
475
|
-
...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
|
|
476
|
-
...Array.isArray(children) ? children : [children]
|
|
477
|
-
]
|
|
478
|
-
);
|
|
479
|
-
}
|
|
480
|
-
);
|
|
481
|
-
|
|
482
|
-
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
483
|
-
var createLucideIcon = (iconName, iconNode) => {
|
|
484
|
-
const Component = React.forwardRef(
|
|
485
|
-
(_a, ref) => {
|
|
486
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
487
|
-
return React.createElement(Icon, __spreadValues({
|
|
488
|
-
ref,
|
|
489
|
-
iconNode,
|
|
490
|
-
className: mergeClasses(
|
|
491
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
492
|
-
`lucide-${iconName}`,
|
|
493
|
-
className
|
|
494
|
-
)
|
|
495
|
-
}, props));
|
|
496
|
-
}
|
|
497
|
-
);
|
|
498
|
-
Component.displayName = toPascalCase(iconName);
|
|
499
|
-
return Component;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
// node_modules/lucide-react/dist/esm/icons/check.js
|
|
503
|
-
var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
504
|
-
var Check = createLucideIcon("check", __iconNode);
|
|
505
|
-
|
|
506
|
-
// node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
507
|
-
var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
508
|
-
var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
|
|
509
|
-
|
|
510
|
-
// node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
511
|
-
var __iconNode3 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
512
|
-
var ChevronLeft = createLucideIcon("chevron-left", __iconNode3);
|
|
513
|
-
|
|
514
|
-
// node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
515
|
-
var __iconNode4 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
516
|
-
var ChevronRight = createLucideIcon("chevron-right", __iconNode4);
|
|
517
|
-
|
|
518
|
-
// node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
519
|
-
var __iconNode5 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
520
|
-
var ChevronUp = createLucideIcon("chevron-up", __iconNode5);
|
|
521
|
-
|
|
522
|
-
// node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
523
|
-
var __iconNode6 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
524
|
-
var LoaderCircle = createLucideIcon("loader-circle", __iconNode6);
|
|
525
|
-
|
|
526
|
-
// node_modules/lucide-react/dist/esm/icons/star.js
|
|
527
|
-
var __iconNode7 = [
|
|
528
|
-
[
|
|
529
|
-
"path",
|
|
530
|
-
{
|
|
531
|
-
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
532
|
-
key: "r04s7s"
|
|
533
|
-
}
|
|
534
|
-
]
|
|
535
|
-
];
|
|
536
|
-
var Star = createLucideIcon("star", __iconNode7);
|
|
537
|
-
|
|
538
|
-
// node_modules/lucide-react/dist/esm/icons/x.js
|
|
539
|
-
var __iconNode8 = [
|
|
540
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
541
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
542
|
-
];
|
|
543
|
-
var X = createLucideIcon("x", __iconNode8);
|
|
544
|
-
|
|
545
|
-
// node_modules/lucide-react/dist/esm/icons/zoom-in.js
|
|
546
|
-
var __iconNode9 = [
|
|
547
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
548
|
-
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
549
|
-
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
550
|
-
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
551
|
-
];
|
|
552
|
-
var ZoomIn = createLucideIcon("zoom-in", __iconNode9);
|
|
553
|
-
var UI_BUTTON = {
|
|
554
|
-
base: "inline-flex items-center justify-center font-medium rounded-xl transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
555
|
-
active: "active:scale-95",
|
|
556
|
-
variants: {
|
|
557
|
-
primary: "bg-primary-600 text-white hover:bg-primary-700 active:bg-primary-800 shadow-sm focus:ring-primary-500/30 dark:bg-secondary-500 dark:text-white dark:hover:bg-secondary-400 dark:active:bg-secondary-600 dark:focus:ring-secondary-400/30",
|
|
558
|
-
secondary: "bg-primary-700 text-white hover:bg-primary-600 active:bg-primary-800 shadow-md focus:ring-primary-500 dark:bg-secondary-700 dark:text-white dark:hover:bg-secondary-600 dark:active:bg-secondary-800 dark:focus:ring-secondary-500",
|
|
559
|
-
outline: "border border-zinc-200 dark:border-slate-700 bg-white dark:bg-transparent text-zinc-900 dark:text-zinc-100 hover:bg-zinc-50 dark:hover:bg-slate-800 focus:ring-zinc-400",
|
|
560
|
-
ghost: "text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-slate-800 focus:ring-zinc-400",
|
|
561
|
-
danger: "bg-red-600 text-white hover:bg-red-500 active:bg-red-700 shadow-sm shadow-red-600/10 focus:ring-red-500",
|
|
562
|
-
warning: "bg-amber-500 text-white hover:bg-amber-400 active:bg-amber-600 shadow-sm shadow-amber-500/10 focus:ring-amber-500"
|
|
563
|
-
},
|
|
564
|
-
sizes: {
|
|
565
|
-
sm: "px-2.5 py-1.5 text-xs sm:px-3 sm:text-sm gap-1.5 min-h-[36px]",
|
|
566
|
-
md: "px-3 py-2 text-sm sm:px-4 sm:py-2.5 sm:text-base gap-2 min-h-[44px]",
|
|
567
|
-
lg: "px-4 py-2.5 text-base sm:px-6 sm:py-3 sm:text-lg gap-2.5 min-h-[44px]"
|
|
568
|
-
}
|
|
569
|
-
};
|
|
570
|
-
function Button(_a) {
|
|
571
|
-
var _b = _a, {
|
|
572
|
-
variant = "primary",
|
|
573
|
-
size = "md",
|
|
574
|
-
className = "",
|
|
575
|
-
isLoading = false,
|
|
576
|
-
disabled,
|
|
577
|
-
children
|
|
578
|
-
} = _b, props = __objRest(_b, [
|
|
579
|
-
"variant",
|
|
580
|
-
"size",
|
|
581
|
-
"className",
|
|
582
|
-
"isLoading",
|
|
583
|
-
"disabled",
|
|
584
|
-
"children"
|
|
585
|
-
]);
|
|
586
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
587
|
-
"button",
|
|
588
|
-
__spreadProps(__spreadValues({
|
|
589
|
-
className: tailwindMerge.twMerge(
|
|
590
|
-
UI_BUTTON.base,
|
|
591
|
-
UI_BUTTON.active,
|
|
592
|
-
UI_BUTTON.variants[variant],
|
|
593
|
-
UI_BUTTON.sizes[size],
|
|
594
|
-
className
|
|
595
|
-
),
|
|
596
|
-
disabled: disabled || isLoading,
|
|
597
|
-
"aria-busy": isLoading || void 0
|
|
598
|
-
}, props), {
|
|
599
|
-
children: [
|
|
600
|
-
isLoading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
601
|
-
LoaderCircle,
|
|
602
|
-
{
|
|
603
|
-
className: "w-4 h-4 animate-spin flex-shrink-0",
|
|
604
|
-
"aria-hidden": "true"
|
|
605
|
-
}
|
|
606
|
-
),
|
|
607
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-70", children }) : children
|
|
608
|
-
]
|
|
609
|
-
})
|
|
610
|
-
);
|
|
611
|
-
}
|
|
612
|
-
var BASE = "inline-flex items-center justify-center flex-shrink-0 transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
613
|
-
var SIZES = {
|
|
614
|
-
sm: "h-8 w-8 rounded-lg",
|
|
615
|
-
md: "h-10 w-10 rounded-xl",
|
|
616
|
-
lg: "h-12 w-12 rounded-xl"
|
|
617
|
-
};
|
|
618
|
-
var VARIANTS = {
|
|
619
|
-
ghost: "text-zinc-600 hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800 focus:ring-zinc-400",
|
|
620
|
-
outline: "border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-transparent text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 focus:ring-zinc-400",
|
|
621
|
-
primary: "bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500 dark:bg-secondary-500 dark:hover:bg-secondary-400",
|
|
622
|
-
danger: "text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 focus:ring-red-500"
|
|
623
|
-
};
|
|
624
|
-
function IconButton(_a) {
|
|
625
|
-
var _b = _a, {
|
|
626
|
-
size = "md",
|
|
627
|
-
variant = "ghost",
|
|
628
|
-
className = "",
|
|
629
|
-
icon,
|
|
630
|
-
children
|
|
631
|
-
} = _b, props = __objRest(_b, [
|
|
632
|
-
"size",
|
|
633
|
-
"variant",
|
|
634
|
-
"className",
|
|
635
|
-
"icon",
|
|
636
|
-
"children"
|
|
637
|
-
]);
|
|
638
|
-
if (process.env.NODE_ENV !== "production" && !props["aria-label"]) {
|
|
639
|
-
throw new Error(
|
|
640
|
-
'[IconButton] Missing required "aria-label" prop. Add aria-label="..." to the button or wrap with <Tooltip label="...">.'
|
|
641
|
-
);
|
|
642
|
-
}
|
|
643
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
644
|
-
"button",
|
|
645
|
-
__spreadProps(__spreadValues({
|
|
646
|
-
type: "button",
|
|
647
|
-
className: tailwindMerge.twMerge(BASE, SIZES[size], VARIANTS[variant], className)
|
|
648
|
-
}, props), {
|
|
649
|
-
children: icon != null ? icon : children
|
|
650
|
-
})
|
|
651
|
-
);
|
|
652
|
-
}
|
|
653
|
-
var VARIANTS2 = {
|
|
654
|
-
default: "text-primary-600 dark:text-primary-400 hover:text-primary-800 dark:hover:text-primary-200 transition-colors",
|
|
655
|
-
muted: "text-zinc-500 dark:text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 transition-colors",
|
|
656
|
-
underline: "text-primary-600 dark:text-primary-400 underline hover:no-underline transition-all",
|
|
657
|
-
none: ""
|
|
658
|
-
};
|
|
659
|
-
function TextLink(_a) {
|
|
660
|
-
var _b = _a, {
|
|
661
|
-
href,
|
|
662
|
-
children,
|
|
663
|
-
variant = "default",
|
|
664
|
-
external = false,
|
|
665
|
-
className = ""
|
|
666
|
-
} = _b, props = __objRest(_b, [
|
|
667
|
-
"href",
|
|
668
|
-
"children",
|
|
669
|
-
"variant",
|
|
670
|
-
"external",
|
|
671
|
-
"className"
|
|
672
|
-
]);
|
|
673
|
-
const cls = tailwindMerge.twMerge(VARIANTS2[variant], className);
|
|
674
|
-
if (external) {
|
|
675
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
676
|
-
"a",
|
|
677
|
-
__spreadProps(__spreadValues({
|
|
678
|
-
href,
|
|
679
|
-
className: cls,
|
|
680
|
-
target: "_blank",
|
|
681
|
-
rel: "noopener noreferrer"
|
|
682
|
-
}, props), {
|
|
683
|
-
children
|
|
684
|
-
})
|
|
685
|
-
);
|
|
686
|
-
}
|
|
687
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, __spreadProps(__spreadValues({ href, className: cls }, props), { children }));
|
|
688
|
-
}
|
|
689
|
-
var TOOLTIP_CONTENT = "absolute z-50 whitespace-nowrap px-2 py-1 text-xs font-medium rounded bg-zinc-900 dark:bg-zinc-100 text-white dark:text-zinc-900 shadow-sm pointer-events-none";
|
|
690
|
-
var POSITION = {
|
|
691
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
692
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
693
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
694
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
695
|
-
};
|
|
696
|
-
function Tooltip({
|
|
697
|
-
label,
|
|
698
|
-
children,
|
|
699
|
-
side = "top",
|
|
700
|
-
delay = 400,
|
|
701
|
-
mobileSheet = true,
|
|
702
|
-
longPressDelay = 500
|
|
703
|
-
}) {
|
|
704
|
-
var _a;
|
|
705
|
-
const [visible, setVisible] = React.useState(false);
|
|
706
|
-
const [mobileOpen, setMobileOpen] = React.useState(false);
|
|
707
|
-
const timeoutRef = React.useRef(null);
|
|
708
|
-
const longPressRef = React.useRef(null);
|
|
709
|
-
React.useEffect(() => {
|
|
710
|
-
return () => {
|
|
711
|
-
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
|
|
712
|
-
if (longPressRef.current !== null) clearTimeout(longPressRef.current);
|
|
713
|
-
};
|
|
714
|
-
}, []);
|
|
715
|
-
const showTooltip = () => {
|
|
716
|
-
timeoutRef.current = setTimeout(() => setVisible(true), delay);
|
|
717
|
-
};
|
|
718
|
-
const hideTooltip = () => {
|
|
719
|
-
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
|
|
720
|
-
setVisible(false);
|
|
721
|
-
};
|
|
722
|
-
const handleTouchStart = React.useCallback(() => {
|
|
723
|
-
if (!mobileSheet) return;
|
|
724
|
-
longPressRef.current = setTimeout(() => {
|
|
725
|
-
setMobileOpen(true);
|
|
726
|
-
}, longPressDelay);
|
|
727
|
-
}, [mobileSheet, longPressDelay]);
|
|
728
|
-
const handleTouchEnd = React.useCallback(() => {
|
|
729
|
-
if (longPressRef.current !== null) {
|
|
730
|
-
clearTimeout(longPressRef.current);
|
|
731
|
-
longPressRef.current = null;
|
|
732
|
-
}
|
|
733
|
-
}, []);
|
|
734
|
-
React.useEffect(() => {
|
|
735
|
-
if (!mobileOpen) return;
|
|
736
|
-
const handler = (e) => {
|
|
737
|
-
if (e.key === "Escape") setMobileOpen(false);
|
|
738
|
-
};
|
|
739
|
-
document.addEventListener("keydown", handler);
|
|
740
|
-
return () => document.removeEventListener("keydown", handler);
|
|
741
|
-
}, [mobileOpen]);
|
|
742
|
-
const existingProps = children.props;
|
|
743
|
-
const child = React__default.default.cloneElement(
|
|
744
|
-
children,
|
|
745
|
-
{
|
|
746
|
-
"aria-label": (_a = existingProps["aria-label"]) != null ? _a : label,
|
|
747
|
-
onMouseEnter: (e) => {
|
|
748
|
-
if (typeof existingProps.onMouseEnter === "function")
|
|
749
|
-
existingProps.onMouseEnter(e);
|
|
750
|
-
showTooltip();
|
|
751
|
-
},
|
|
752
|
-
onMouseLeave: (e) => {
|
|
753
|
-
if (typeof existingProps.onMouseLeave === "function")
|
|
754
|
-
existingProps.onMouseLeave(e);
|
|
755
|
-
hideTooltip();
|
|
756
|
-
},
|
|
757
|
-
onFocus: (e) => {
|
|
758
|
-
if (typeof existingProps.onFocus === "function") existingProps.onFocus(e);
|
|
759
|
-
setVisible(true);
|
|
760
|
-
},
|
|
761
|
-
onBlur: (e) => {
|
|
762
|
-
if (typeof existingProps.onBlur === "function") existingProps.onBlur(e);
|
|
763
|
-
hideTooltip();
|
|
764
|
-
},
|
|
765
|
-
onTouchStart: (e) => {
|
|
766
|
-
if (typeof existingProps.onTouchStart === "function")
|
|
767
|
-
existingProps.onTouchStart(e);
|
|
768
|
-
handleTouchStart();
|
|
769
|
-
},
|
|
770
|
-
onTouchEnd: (e) => {
|
|
771
|
-
if (typeof existingProps.onTouchEnd === "function")
|
|
772
|
-
existingProps.onTouchEnd(e);
|
|
773
|
-
handleTouchEnd();
|
|
774
|
-
},
|
|
775
|
-
onTouchCancel: (e) => {
|
|
776
|
-
if (typeof existingProps.onTouchCancel === "function")
|
|
777
|
-
existingProps.onTouchCancel(e);
|
|
778
|
-
handleTouchEnd();
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
);
|
|
782
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex", children: [
|
|
783
|
-
child,
|
|
784
|
-
visible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
785
|
-
"span",
|
|
786
|
-
{
|
|
787
|
-
role: "tooltip",
|
|
788
|
-
className: `${TOOLTIP_CONTENT} ${POSITION[side]}`,
|
|
789
|
-
children: label
|
|
790
|
-
}
|
|
791
|
-
),
|
|
792
|
-
mobileOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
793
|
-
"span",
|
|
794
|
-
{
|
|
795
|
-
role: "presentation",
|
|
796
|
-
className: "fixed inset-0 z-50 md:hidden",
|
|
797
|
-
onClick: () => setMobileOpen(false),
|
|
798
|
-
children: [
|
|
799
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
800
|
-
"span",
|
|
801
|
-
{
|
|
802
|
-
className: "absolute inset-0 bg-black/40 backdrop-blur-sm",
|
|
803
|
-
"aria-hidden": "true"
|
|
804
|
-
}
|
|
805
|
-
),
|
|
806
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
807
|
-
"span",
|
|
808
|
-
{
|
|
809
|
-
role: "tooltip",
|
|
810
|
-
"aria-label": label,
|
|
811
|
-
className: "absolute bottom-0 inset-x-0 flex flex-col items-center gap-2 rounded-t-2xl bg-white dark:bg-zinc-900 border-t border-zinc-200 dark:border-zinc-800 shadow-2xl px-6 py-5 pb-[calc(1.25rem+env(safe-area-inset-bottom,0px))]",
|
|
812
|
-
children: [
|
|
813
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
814
|
-
"span",
|
|
815
|
-
{
|
|
816
|
-
className: "w-10 h-1 rounded-full bg-zinc-300 dark:bg-zinc-600 mb-2",
|
|
817
|
-
"aria-hidden": "true"
|
|
818
|
-
}
|
|
819
|
-
),
|
|
820
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100 text-center", children: label })
|
|
821
|
-
]
|
|
822
|
-
}
|
|
823
|
-
)
|
|
824
|
-
]
|
|
825
|
-
}
|
|
826
|
-
)
|
|
827
|
-
] });
|
|
828
|
-
}
|
|
829
|
-
var AccordionContext = React.createContext(null);
|
|
830
|
-
function toArray(value) {
|
|
831
|
-
if (!value) return [];
|
|
832
|
-
return Array.isArray(value) ? value : [value];
|
|
833
|
-
}
|
|
834
|
-
function renderLegacyAccordion({
|
|
835
|
-
title,
|
|
836
|
-
children,
|
|
837
|
-
open,
|
|
838
|
-
className = "",
|
|
839
|
-
titleClassName = "",
|
|
840
|
-
contentClassName = ""
|
|
841
|
-
}) {
|
|
842
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
843
|
-
"details",
|
|
844
|
-
{
|
|
845
|
-
open,
|
|
846
|
-
className: `group border-b border-zinc-200 dark:border-zinc-700 ${className}`,
|
|
847
|
-
children: [
|
|
848
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
849
|
-
"summary",
|
|
850
|
-
{
|
|
851
|
-
className: `flex cursor-pointer select-none list-none items-center justify-between py-3 text-sm font-medium text-zinc-900 dark:text-zinc-100 ${titleClassName}`,
|
|
852
|
-
children: [
|
|
853
|
-
title,
|
|
854
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
855
|
-
"span",
|
|
856
|
-
{
|
|
857
|
-
className: "ml-2 flex-shrink-0 text-zinc-400 transition-transform duration-200 group-open:rotate-180",
|
|
858
|
-
"aria-hidden": "true",
|
|
859
|
-
children: "\u25BE"
|
|
860
|
-
}
|
|
861
|
-
)
|
|
862
|
-
]
|
|
863
|
-
}
|
|
864
|
-
),
|
|
865
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
866
|
-
"div",
|
|
867
|
-
{
|
|
868
|
-
className: `pb-4 text-sm text-zinc-600 dark:text-zinc-400 ${contentClassName}`,
|
|
869
|
-
children
|
|
870
|
-
}
|
|
871
|
-
)
|
|
872
|
-
]
|
|
873
|
-
}
|
|
874
|
-
);
|
|
875
|
-
}
|
|
876
|
-
function Accordion({
|
|
877
|
-
title,
|
|
878
|
-
children,
|
|
879
|
-
open = false,
|
|
880
|
-
className = "",
|
|
881
|
-
titleClassName = "",
|
|
882
|
-
contentClassName = "",
|
|
883
|
-
type = "single",
|
|
884
|
-
defaultValue,
|
|
885
|
-
value,
|
|
886
|
-
onChange
|
|
887
|
-
}) {
|
|
888
|
-
if (title !== void 0) {
|
|
889
|
-
return renderLegacyAccordion({
|
|
890
|
-
title,
|
|
891
|
-
children,
|
|
892
|
-
open,
|
|
893
|
-
className,
|
|
894
|
-
titleClassName,
|
|
895
|
-
contentClassName
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
const initialOpen = React.useMemo(() => {
|
|
899
|
-
if (value !== void 0) return toArray(value);
|
|
900
|
-
return toArray(defaultValue);
|
|
901
|
-
}, [defaultValue, value]);
|
|
902
|
-
const [internalOpenValues, setInternalOpenValues] = React.useState(initialOpen);
|
|
903
|
-
const activeOpenValues = value !== void 0 ? toArray(value) : internalOpenValues;
|
|
904
|
-
const toggle = (itemValue) => {
|
|
905
|
-
var _a;
|
|
906
|
-
const nextOpenValues = type === "single" ? activeOpenValues.includes(itemValue) ? [] : [itemValue] : activeOpenValues.includes(itemValue) ? activeOpenValues.filter((v) => v !== itemValue) : [...activeOpenValues, itemValue];
|
|
907
|
-
if (value === void 0) {
|
|
908
|
-
setInternalOpenValues(nextOpenValues);
|
|
909
|
-
}
|
|
910
|
-
onChange == null ? void 0 : onChange(type === "single" ? (_a = nextOpenValues[0]) != null ? _a : "" : nextOpenValues);
|
|
911
|
-
};
|
|
912
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
913
|
-
AccordionContext.Provider,
|
|
914
|
-
{
|
|
915
|
-
value: { type, openValues: activeOpenValues, toggle },
|
|
916
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Div, { className, children })
|
|
917
|
-
}
|
|
918
|
-
);
|
|
919
|
-
}
|
|
920
|
-
function AccordionItem({
|
|
921
|
-
value,
|
|
922
|
-
title,
|
|
923
|
-
disabled = false,
|
|
924
|
-
className = "",
|
|
925
|
-
children
|
|
926
|
-
}) {
|
|
927
|
-
const ctx = React.useContext(AccordionContext);
|
|
928
|
-
if (!ctx) {
|
|
929
|
-
throw new Error("AccordionItem must be used within Accordion.");
|
|
930
|
-
}
|
|
931
|
-
const isOpen = ctx.openValues.includes(value);
|
|
932
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
933
|
-
Div,
|
|
934
|
-
{
|
|
935
|
-
className: `border-b border-gray-200 dark:border-gray-700 ${className}`,
|
|
936
|
-
children: [
|
|
937
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
938
|
-
Button,
|
|
939
|
-
{
|
|
940
|
-
type: "button",
|
|
941
|
-
disabled,
|
|
942
|
-
"aria-expanded": isOpen,
|
|
943
|
-
onClick: () => ctx.toggle(value),
|
|
944
|
-
className: "w-full flex items-center justify-between py-3 px-1 text-left text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",
|
|
945
|
-
children: [
|
|
946
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { children: title }),
|
|
947
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
948
|
-
Span,
|
|
949
|
-
{
|
|
950
|
-
className: `transition-transform duration-200 ${isOpen ? "rotate-180" : ""}`,
|
|
951
|
-
children: "\u25BE"
|
|
952
|
-
}
|
|
953
|
-
)
|
|
954
|
-
]
|
|
955
|
-
}
|
|
956
|
-
),
|
|
957
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx(Div, { className: "pb-3 px-1 text-sm text-gray-600 dark:text-gray-400", children })
|
|
958
|
-
]
|
|
959
|
-
}
|
|
960
|
-
);
|
|
961
|
-
}
|
|
962
|
-
function Form(_a) {
|
|
963
|
-
var _b = _a, { children, className = "" } = _b, props = __objRest(_b, ["children", "className"]);
|
|
964
|
-
return /* @__PURE__ */ jsxRuntime.jsx("form", __spreadProps(__spreadValues({ className }, props), { children }));
|
|
965
|
-
}
|
|
966
|
-
var BADGE_CLASSES = {
|
|
967
|
-
// Status badges
|
|
968
|
-
active: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-emerald-50 text-emerald-700 ring-1 ring-emerald-600/20 dark:bg-emerald-900/30 dark:text-emerald-300 dark:ring-emerald-400/20",
|
|
969
|
-
inactive: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-zinc-100 text-zinc-600 ring-1 ring-zinc-500/10 dark:bg-slate-800 dark:text-zinc-400 dark:ring-zinc-400/20",
|
|
970
|
-
pending: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-amber-50 text-amber-700 ring-1 ring-amber-600/20 dark:bg-amber-900/30 dark:text-amber-300 dark:ring-amber-400/20",
|
|
971
|
-
approved: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-emerald-50 text-emerald-700 ring-1 ring-emerald-600/20 dark:bg-emerald-900/30 dark:text-emerald-300 dark:ring-emerald-400/20",
|
|
972
|
-
rejected: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-rose-50 text-rose-700 ring-1 ring-rose-600/20 dark:bg-rose-900/30 dark:text-rose-300 dark:ring-rose-400/20",
|
|
973
|
-
// Semantic badges
|
|
974
|
-
success: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-emerald-50 text-emerald-700 ring-1 ring-emerald-600/20 dark:bg-emerald-900/30 dark:text-emerald-300 dark:ring-emerald-400/20",
|
|
975
|
-
warning: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-amber-50 text-amber-700 ring-1 ring-amber-600/20 dark:bg-amber-900/30 dark:text-amber-300 dark:ring-amber-400/20",
|
|
976
|
-
danger: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-rose-50 text-rose-700 ring-1 ring-rose-600/20 dark:bg-rose-900/30 dark:text-rose-300 dark:ring-rose-400/20",
|
|
977
|
-
info: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-sky-50 text-sky-700 ring-1 ring-sky-600/20 dark:bg-sky-900/30 dark:text-sky-300 dark:ring-sky-400/20",
|
|
978
|
-
// Role badges
|
|
979
|
-
admin: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-purple-50 text-purple-700 ring-1 ring-purple-600/20 dark:bg-purple-900/30 dark:text-purple-300 dark:ring-purple-400/20",
|
|
980
|
-
moderator: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-sky-50 text-sky-700 ring-1 ring-sky-600/20 dark:bg-sky-900/30 dark:text-sky-300 dark:ring-sky-400/20",
|
|
981
|
-
seller: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-teal-50 text-teal-700 ring-1 ring-teal-600/20 dark:bg-teal-900/30 dark:text-teal-300 dark:ring-teal-400/20",
|
|
982
|
-
user: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-zinc-100 text-zinc-700 ring-1 ring-zinc-500/10 dark:bg-slate-800 dark:text-zinc-300 dark:ring-zinc-400/20",
|
|
983
|
-
// Legacy / generic variants
|
|
984
|
-
default: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-zinc-100 text-zinc-700 ring-1 ring-zinc-500/10 dark:bg-slate-800 dark:text-zinc-300 dark:ring-zinc-400/20",
|
|
985
|
-
primary: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300",
|
|
986
|
-
secondary: "inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-semibold rounded-full bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300"
|
|
987
|
-
};
|
|
988
|
-
function Badge({
|
|
989
|
-
children,
|
|
990
|
-
variant = "default",
|
|
991
|
-
className = ""
|
|
992
|
-
}) {
|
|
993
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Span, { className: `${BADGE_CLASSES[variant]} ${className}`, children });
|
|
994
|
-
}
|
|
995
|
-
var ALERT_STYLES = {
|
|
996
|
-
info: {
|
|
997
|
-
container: "bg-sky-50 border-sky-200/80 dark:bg-sky-950/30 dark:border-sky-800/50",
|
|
998
|
-
icon: "text-sky-600 dark:text-sky-400",
|
|
999
|
-
title: "text-sky-900 dark:text-sky-200",
|
|
1000
|
-
text: "text-sky-800 dark:text-sky-300"
|
|
1001
|
-
},
|
|
1002
|
-
success: {
|
|
1003
|
-
container: "bg-emerald-50 border-emerald-200/80 dark:bg-emerald-950/30 dark:border-emerald-800/50",
|
|
1004
|
-
icon: "text-emerald-600 dark:text-emerald-400",
|
|
1005
|
-
title: "text-emerald-900 dark:text-emerald-200",
|
|
1006
|
-
text: "text-emerald-800 dark:text-emerald-300"
|
|
1007
|
-
},
|
|
1008
|
-
warning: {
|
|
1009
|
-
container: "bg-amber-50 border-amber-200/80 dark:bg-amber-950/30 dark:border-amber-800/50",
|
|
1010
|
-
icon: "text-amber-600 dark:text-amber-400",
|
|
1011
|
-
title: "text-amber-900 dark:text-amber-200",
|
|
1012
|
-
text: "text-amber-800 dark:text-amber-300"
|
|
1013
|
-
},
|
|
1014
|
-
error: {
|
|
1015
|
-
container: "bg-red-50 border-red-200/80 dark:bg-red-950/30 dark:border-red-800/50",
|
|
1016
|
-
icon: "text-red-600 dark:text-red-400",
|
|
1017
|
-
title: "text-red-900 dark:text-red-200",
|
|
1018
|
-
text: "text-red-800 dark:text-red-300"
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
var ALERT_CLOSE_HOVER = "hover:bg-black/5 dark:hover:bg-white/5";
|
|
1022
|
-
var ICONS = {
|
|
1023
|
-
info: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
-
"svg",
|
|
1025
|
-
{
|
|
1026
|
-
className: "w-5 h-5",
|
|
1027
|
-
fill: "currentColor",
|
|
1028
|
-
viewBox: "0 0 20 20",
|
|
1029
|
-
"aria-hidden": "true",
|
|
1030
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1031
|
-
"path",
|
|
1032
|
-
{
|
|
1033
|
-
fillRule: "evenodd",
|
|
1034
|
-
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
|
|
1035
|
-
clipRule: "evenodd"
|
|
1036
|
-
}
|
|
1037
|
-
)
|
|
1038
|
-
}
|
|
1039
|
-
),
|
|
1040
|
-
success: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
-
"svg",
|
|
1042
|
-
{
|
|
1043
|
-
className: "w-5 h-5",
|
|
1044
|
-
fill: "currentColor",
|
|
1045
|
-
viewBox: "0 0 20 20",
|
|
1046
|
-
"aria-hidden": "true",
|
|
1047
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
-
"path",
|
|
1049
|
-
{
|
|
1050
|
-
fillRule: "evenodd",
|
|
1051
|
-
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
1052
|
-
clipRule: "evenodd"
|
|
1053
|
-
}
|
|
1054
|
-
)
|
|
1055
|
-
}
|
|
1056
|
-
),
|
|
1057
|
-
warning: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1058
|
-
"svg",
|
|
1059
|
-
{
|
|
1060
|
-
className: "w-5 h-5",
|
|
1061
|
-
fill: "currentColor",
|
|
1062
|
-
viewBox: "0 0 20 20",
|
|
1063
|
-
"aria-hidden": "true",
|
|
1064
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1065
|
-
"path",
|
|
1066
|
-
{
|
|
1067
|
-
fillRule: "evenodd",
|
|
1068
|
-
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
1069
|
-
clipRule: "evenodd"
|
|
1070
|
-
}
|
|
1071
|
-
)
|
|
1072
|
-
}
|
|
1073
|
-
),
|
|
1074
|
-
error: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1075
|
-
"svg",
|
|
1076
|
-
{
|
|
1077
|
-
className: "w-5 h-5",
|
|
1078
|
-
fill: "currentColor",
|
|
1079
|
-
viewBox: "0 0 20 20",
|
|
1080
|
-
"aria-hidden": "true",
|
|
1081
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1082
|
-
"path",
|
|
1083
|
-
{
|
|
1084
|
-
fillRule: "evenodd",
|
|
1085
|
-
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
1086
|
-
clipRule: "evenodd"
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
}
|
|
1090
|
-
)
|
|
1091
|
-
};
|
|
1092
|
-
function Alert({
|
|
1093
|
-
children,
|
|
1094
|
-
variant = "info",
|
|
1095
|
-
title,
|
|
1096
|
-
onClose,
|
|
1097
|
-
className = ""
|
|
1098
|
-
}) {
|
|
1099
|
-
const styles = ALERT_STYLES[variant];
|
|
1100
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1101
|
-
"div",
|
|
1102
|
-
{
|
|
1103
|
-
className: `relative p-4 rounded-xl border ${styles.container} ${className}`,
|
|
1104
|
-
role: "alert",
|
|
1105
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
|
|
1106
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-shrink-0 ${styles.icon}`, children: ICONS[variant] }),
|
|
1107
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1108
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
|
-
Heading,
|
|
1110
|
-
{
|
|
1111
|
-
level: 3,
|
|
1112
|
-
className: `text-sm font-semibold mb-1 ${styles.title}`,
|
|
1113
|
-
children: title
|
|
1114
|
-
}
|
|
1115
|
-
),
|
|
1116
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `text-sm ${styles.text}`, children })
|
|
1117
|
-
] }),
|
|
1118
|
-
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1119
|
-
Button,
|
|
1120
|
-
{
|
|
1121
|
-
variant: "ghost",
|
|
1122
|
-
size: "sm",
|
|
1123
|
-
onClick: onClose,
|
|
1124
|
-
className: `flex-shrink-0 ml-3 rounded-lg p-1.5 min-h-0 ${styles.icon} ${ALERT_CLOSE_HOVER}`,
|
|
1125
|
-
"aria-label": "Close",
|
|
1126
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
-
"svg",
|
|
1128
|
-
{
|
|
1129
|
-
className: "w-5 h-5",
|
|
1130
|
-
fill: "currentColor",
|
|
1131
|
-
viewBox: "0 0 20 20",
|
|
1132
|
-
"aria-hidden": "true",
|
|
1133
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1134
|
-
"path",
|
|
1135
|
-
{
|
|
1136
|
-
fillRule: "evenodd",
|
|
1137
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1138
|
-
clipRule: "evenodd"
|
|
1139
|
-
}
|
|
1140
|
-
)
|
|
1141
|
-
}
|
|
1142
|
-
)
|
|
1143
|
-
}
|
|
1144
|
-
)
|
|
1145
|
-
] })
|
|
1146
|
-
}
|
|
1147
|
-
);
|
|
1148
|
-
}
|
|
1149
|
-
var BORDER_LIGHT = "border-zinc-100 dark:border-slate-700/60";
|
|
1150
|
-
var TEXT_MUTED = "text-zinc-400 dark:text-zinc-500";
|
|
1151
|
-
function Divider({
|
|
1152
|
-
label,
|
|
1153
|
-
orientation = "horizontal",
|
|
1154
|
-
className = ""
|
|
1155
|
-
}) {
|
|
1156
|
-
if (orientation === "vertical") {
|
|
1157
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1158
|
-
"div",
|
|
1159
|
-
{
|
|
1160
|
-
className: `w-px h-full border-l ${BORDER_LIGHT} ${className}`,
|
|
1161
|
-
role: "separator",
|
|
1162
|
-
"aria-orientation": "vertical"
|
|
1163
|
-
}
|
|
1164
|
-
);
|
|
1165
|
-
}
|
|
1166
|
-
if (label) {
|
|
1167
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-4 ${className}`, role: "separator", children: [
|
|
1168
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 h-px border-t ${BORDER_LIGHT}` }),
|
|
1169
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: `text-sm font-medium ${TEXT_MUTED}`, children: label }),
|
|
1170
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 h-px border-t ${BORDER_LIGHT}` })
|
|
1171
|
-
] });
|
|
1172
|
-
}
|
|
1173
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1174
|
-
"div",
|
|
1175
|
-
{
|
|
1176
|
-
className: `w-full h-px border-t ${BORDER_LIGHT} ${className}`,
|
|
1177
|
-
role: "separator",
|
|
1178
|
-
"aria-orientation": "horizontal"
|
|
1179
|
-
}
|
|
1180
|
-
);
|
|
1181
|
-
}
|
|
1182
|
-
var TEXT_PRIMARY = "text-zinc-900 dark:text-zinc-50";
|
|
1183
|
-
var TEXT_SECONDARY = "text-zinc-500 dark:text-zinc-400";
|
|
1184
|
-
var BG_SECONDARY = "bg-zinc-50 dark:bg-slate-900";
|
|
1185
|
-
var FLEX_BETWEEN = "flex items-center justify-between";
|
|
1186
|
-
var INDETERMINATE_CSS = `
|
|
1187
|
-
@keyframes appkit-progress-indeterminate {
|
|
1188
|
-
0% { transform: translateX(-100%); }
|
|
1189
|
-
100% { transform: translateX(350%); }
|
|
1190
|
-
}
|
|
1191
|
-
.appkit-progress-indeterminate {
|
|
1192
|
-
animation: appkit-progress-indeterminate 1.5s ease-in-out infinite;
|
|
1193
|
-
}
|
|
1194
|
-
`;
|
|
1195
|
-
function Progress({
|
|
1196
|
-
value,
|
|
1197
|
-
max = 100,
|
|
1198
|
-
variant = "primary",
|
|
1199
|
-
size = "md",
|
|
1200
|
-
label,
|
|
1201
|
-
showValue = false,
|
|
1202
|
-
className = ""
|
|
1203
|
-
}) {
|
|
1204
|
-
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1205
|
-
const sizeClasses = {
|
|
1206
|
-
sm: "h-1",
|
|
1207
|
-
md: "h-2",
|
|
1208
|
-
lg: "h-3"
|
|
1209
|
-
};
|
|
1210
|
-
const variantClasses = {
|
|
1211
|
-
primary: "bg-primary",
|
|
1212
|
-
success: "bg-green-600 dark:bg-green-500",
|
|
1213
|
-
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
1214
|
-
error: "bg-red-600 dark:bg-red-500"
|
|
1215
|
-
};
|
|
1216
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1217
|
-
(label || showValue) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${FLEX_BETWEEN} mb-2`, children: [
|
|
1218
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(Span, { className: `text-sm font-medium ${TEXT_PRIMARY}`, children: label }),
|
|
1219
|
-
showValue && /* @__PURE__ */ jsxRuntime.jsxs(Span, { className: `text-sm font-medium ${TEXT_SECONDARY}`, children: [
|
|
1220
|
-
Math.round(percentage),
|
|
1221
|
-
"%"
|
|
1222
|
-
] })
|
|
1223
|
-
] }),
|
|
1224
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1225
|
-
"div",
|
|
1226
|
-
{
|
|
1227
|
-
className: `w-full ${sizeClasses[size]} rounded-full overflow-hidden ${BG_SECONDARY}`,
|
|
1228
|
-
role: "progressbar",
|
|
1229
|
-
"aria-valuenow": value,
|
|
1230
|
-
"aria-valuemin": 0,
|
|
1231
|
-
"aria-valuemax": max,
|
|
1232
|
-
"aria-label": label || `Progress: ${Math.round(percentage)}%`,
|
|
1233
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1234
|
-
"div",
|
|
1235
|
-
{
|
|
1236
|
-
className: `h-full ${variantClasses[variant]} transition-all duration-300 ease-in-out rounded-full`,
|
|
1237
|
-
style: { width: `${percentage}%` }
|
|
1238
|
-
}
|
|
1239
|
-
)
|
|
1240
|
-
}
|
|
1241
|
-
)
|
|
1242
|
-
] });
|
|
1243
|
-
}
|
|
1244
|
-
function IndeterminateProgress({
|
|
1245
|
-
variant = "primary",
|
|
1246
|
-
size = "md",
|
|
1247
|
-
label,
|
|
1248
|
-
className = ""
|
|
1249
|
-
}) {
|
|
1250
|
-
const sizeClasses = {
|
|
1251
|
-
sm: "h-1",
|
|
1252
|
-
md: "h-2",
|
|
1253
|
-
lg: "h-3"
|
|
1254
|
-
};
|
|
1255
|
-
const variantClasses = {
|
|
1256
|
-
primary: "bg-primary",
|
|
1257
|
-
success: "bg-green-600 dark:bg-green-500",
|
|
1258
|
-
warning: "bg-yellow-600 dark:bg-yellow-500",
|
|
1259
|
-
error: "bg-red-600 dark:bg-red-500"
|
|
1260
|
-
};
|
|
1261
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1262
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: INDETERMINATE_CSS } }),
|
|
1263
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(Span, { className: `block text-sm font-medium mb-2 ${TEXT_PRIMARY}`, children: label }),
|
|
1264
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1265
|
-
"div",
|
|
1266
|
-
{
|
|
1267
|
-
className: `w-full ${sizeClasses[size]} rounded-full overflow-hidden ${BG_SECONDARY} relative`,
|
|
1268
|
-
role: "progressbar",
|
|
1269
|
-
"aria-label": label || "Loading...",
|
|
1270
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1271
|
-
"div",
|
|
1272
|
-
{
|
|
1273
|
-
className: `absolute inset-0 ${variantClasses[variant]} appkit-progress-indeterminate rounded-full`,
|
|
1274
|
-
style: { width: "40%" }
|
|
1275
|
-
}
|
|
1276
|
-
)
|
|
1277
|
-
}
|
|
1278
|
-
)
|
|
1279
|
-
] });
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
// src/contracts/table.ts
|
|
1283
|
-
var DEFAULT_PAGINATION_CONFIG = {
|
|
1284
|
-
perPage: 20,
|
|
1285
|
-
maxPerPage: 100,
|
|
1286
|
-
showPageSizeSelector: false,
|
|
1287
|
-
pageSizeOptions: [10, 20, 50, 100],
|
|
1288
|
-
showFirstLast: true,
|
|
1289
|
-
showPrevNext: true,
|
|
1290
|
-
maxVisible: 7,
|
|
1291
|
-
size: "md"
|
|
1292
|
-
};
|
|
1293
|
-
var DEFAULT_STICKY_CONFIG = {
|
|
1294
|
-
enabled: false,
|
|
1295
|
-
topOffset: "top-0",
|
|
1296
|
-
maxHeight: "600px",
|
|
1297
|
-
zIndex: 10
|
|
1298
|
-
};
|
|
1299
|
-
var DEFAULT_TABLE_CONFIG = {
|
|
1300
|
-
pageSize: DEFAULT_PAGINATION_CONFIG.perPage,
|
|
1301
|
-
sticky: DEFAULT_STICKY_CONFIG,
|
|
1302
|
-
striped: false,
|
|
1303
|
-
selectable: false,
|
|
1304
|
-
showViewToggle: false,
|
|
1305
|
-
defaultViewMode: "table",
|
|
1306
|
-
pagination: DEFAULT_PAGINATION_CONFIG
|
|
1307
|
-
};
|
|
1308
|
-
function mergeTableConfig(override) {
|
|
1309
|
-
if (!override) return DEFAULT_TABLE_CONFIG;
|
|
1310
|
-
return __spreadProps(__spreadValues(__spreadValues({}, DEFAULT_TABLE_CONFIG), override), {
|
|
1311
|
-
sticky: __spreadValues(__spreadValues({}, DEFAULT_STICKY_CONFIG), override.sticky),
|
|
1312
|
-
pagination: __spreadValues(__spreadValues({}, DEFAULT_PAGINATION_CONFIG), override.pagination)
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
function getPageNumbers(currentPage, totalPages, maxVisible) {
|
|
1316
|
-
if (totalPages <= maxVisible) {
|
|
1317
|
-
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
1318
|
-
}
|
|
1319
|
-
const pages = [];
|
|
1320
|
-
const halfVisible = Math.floor(maxVisible / 2);
|
|
1321
|
-
let startPage = Math.max(1, currentPage - halfVisible);
|
|
1322
|
-
let endPage = Math.min(totalPages, currentPage + halfVisible);
|
|
1323
|
-
if (currentPage <= halfVisible) endPage = maxVisible;
|
|
1324
|
-
if (currentPage >= totalPages - halfVisible)
|
|
1325
|
-
startPage = totalPages - maxVisible + 1;
|
|
1326
|
-
if (startPage > 1) {
|
|
1327
|
-
pages.push(1);
|
|
1328
|
-
if (startPage > 2) pages.push("...");
|
|
1329
|
-
}
|
|
1330
|
-
for (let i = startPage; i <= endPage; i++) pages.push(i);
|
|
1331
|
-
if (endPage < totalPages) {
|
|
1332
|
-
if (endPage < totalPages - 1) pages.push("...");
|
|
1333
|
-
pages.push(totalPages);
|
|
1334
|
-
}
|
|
1335
|
-
return pages;
|
|
1336
|
-
}
|
|
1337
|
-
var SIZE_CLASSES = {
|
|
1338
|
-
sm: "text-xs px-2 py-1 min-w-[28px]",
|
|
1339
|
-
md: "text-sm px-3 py-1.5 min-w-[36px]",
|
|
1340
|
-
lg: "text-base px-4 py-2 min-w-[44px]"
|
|
1341
|
-
};
|
|
1342
|
-
function Pagination({
|
|
1343
|
-
currentPage,
|
|
1344
|
-
totalPages,
|
|
1345
|
-
onPageChange,
|
|
1346
|
-
paginationConfig,
|
|
1347
|
-
maxVisible: maxVisibleProp,
|
|
1348
|
-
showFirstLast: showFirstLastProp,
|
|
1349
|
-
showPrevNext: showPrevNextProp,
|
|
1350
|
-
disabled = false,
|
|
1351
|
-
size: sizeProp,
|
|
1352
|
-
className = ""
|
|
1353
|
-
}) {
|
|
1354
|
-
const resolved = __spreadValues(__spreadValues({}, DEFAULT_PAGINATION_CONFIG), paginationConfig);
|
|
1355
|
-
const maxVisible = maxVisibleProp != null ? maxVisibleProp : resolved.maxVisible;
|
|
1356
|
-
const showFirstLast = showFirstLastProp != null ? showFirstLastProp : resolved.showFirstLast;
|
|
1357
|
-
const showPrevNext = showPrevNextProp != null ? showPrevNextProp : resolved.showPrevNext;
|
|
1358
|
-
const size = sizeProp != null ? sizeProp : resolved.size;
|
|
1359
|
-
const handle = (page) => {
|
|
1360
|
-
if (disabled || page < 1 || page > totalPages || page === currentPage)
|
|
1361
|
-
return;
|
|
1362
|
-
onPageChange(page);
|
|
1363
|
-
};
|
|
1364
|
-
const btnClass = (active, off) => {
|
|
1365
|
-
const base = `${SIZE_CLASSES[size]} rounded border font-medium transition-colors`;
|
|
1366
|
-
if (off)
|
|
1367
|
-
return `${base} bg-zinc-100 dark:bg-slate-800 opacity-50 text-zinc-400 dark:text-zinc-500 border-zinc-200 dark:border-slate-700 cursor-not-allowed`;
|
|
1368
|
-
if (active)
|
|
1369
|
-
return `${base} bg-primary-600 text-white border-primary-600 cursor-default`;
|
|
1370
|
-
return `${base} bg-white dark:bg-slate-900 text-zinc-700 dark:text-zinc-300 border-zinc-200 dark:border-slate-700 hover:bg-zinc-50 dark:hover:bg-slate-800 hover:border-zinc-300 dark:hover:border-slate-600 cursor-pointer`;
|
|
1371
|
-
};
|
|
1372
|
-
const pages = getPageNumbers(currentPage, totalPages, maxVisible);
|
|
1373
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1374
|
-
"nav",
|
|
1375
|
-
{
|
|
1376
|
-
className: `flex items-center gap-1 ${className}`,
|
|
1377
|
-
"aria-label": "Pagination",
|
|
1378
|
-
children: [
|
|
1379
|
-
showFirstLast && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1380
|
-
"button",
|
|
1381
|
-
{
|
|
1382
|
-
type: "button",
|
|
1383
|
-
className: btnClass(false, disabled || currentPage === 1),
|
|
1384
|
-
onClick: () => handle(1),
|
|
1385
|
-
disabled: disabled || currentPage === 1,
|
|
1386
|
-
"aria-label": "First page",
|
|
1387
|
-
children: "\xAB"
|
|
1388
|
-
}
|
|
1389
|
-
),
|
|
1390
|
-
showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
-
"button",
|
|
1392
|
-
{
|
|
1393
|
-
type: "button",
|
|
1394
|
-
className: btnClass(false, disabled || currentPage === 1),
|
|
1395
|
-
onClick: () => handle(currentPage - 1),
|
|
1396
|
-
disabled: disabled || currentPage === 1,
|
|
1397
|
-
"aria-label": "Previous page",
|
|
1398
|
-
children: "\u2039"
|
|
1399
|
-
}
|
|
1400
|
-
),
|
|
1401
|
-
pages.map(
|
|
1402
|
-
(page, i) => page === "..." ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
|
-
"span",
|
|
1404
|
-
{
|
|
1405
|
-
className: `${SIZE_CLASSES[size]} text-zinc-400 dark:text-zinc-500 text-center`,
|
|
1406
|
-
"aria-hidden": "true",
|
|
1407
|
-
children: "\u2026"
|
|
1408
|
-
},
|
|
1409
|
-
`ellipsis-${i}`
|
|
1410
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
-
"button",
|
|
1412
|
-
{
|
|
1413
|
-
type: "button",
|
|
1414
|
-
className: btnClass(
|
|
1415
|
-
page === currentPage,
|
|
1416
|
-
disabled && page !== currentPage
|
|
1417
|
-
),
|
|
1418
|
-
onClick: () => handle(page),
|
|
1419
|
-
disabled,
|
|
1420
|
-
"aria-label": `Page ${page}`,
|
|
1421
|
-
"aria-current": page === currentPage ? "page" : void 0,
|
|
1422
|
-
children: page
|
|
1423
|
-
},
|
|
1424
|
-
page
|
|
1425
|
-
)
|
|
1426
|
-
),
|
|
1427
|
-
showPrevNext && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
-
"button",
|
|
1429
|
-
{
|
|
1430
|
-
type: "button",
|
|
1431
|
-
className: btnClass(false, disabled || currentPage === totalPages),
|
|
1432
|
-
onClick: () => handle(currentPage + 1),
|
|
1433
|
-
disabled: disabled || currentPage === totalPages,
|
|
1434
|
-
"aria-label": "Next page",
|
|
1435
|
-
children: "\u203A"
|
|
1436
|
-
}
|
|
1437
|
-
),
|
|
1438
|
-
showFirstLast && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1439
|
-
"button",
|
|
1440
|
-
{
|
|
1441
|
-
type: "button",
|
|
1442
|
-
className: btnClass(false, disabled || currentPage === totalPages),
|
|
1443
|
-
onClick: () => handle(totalPages),
|
|
1444
|
-
disabled: disabled || currentPage === totalPages,
|
|
1445
|
-
"aria-label": "Last page",
|
|
1446
|
-
children: "\xBB"
|
|
1447
|
-
}
|
|
1448
|
-
)
|
|
1449
|
-
]
|
|
1450
|
-
}
|
|
1451
|
-
);
|
|
1452
|
-
}
|
|
1453
|
-
var STATUS_TO_VARIANT = {
|
|
1454
|
-
// Generic
|
|
1455
|
-
active: "active",
|
|
1456
|
-
inactive: "inactive",
|
|
1457
|
-
pending: "pending",
|
|
1458
|
-
approved: "approved",
|
|
1459
|
-
rejected: "rejected",
|
|
1460
|
-
success: "success",
|
|
1461
|
-
warning: "warning",
|
|
1462
|
-
danger: "danger",
|
|
1463
|
-
info: "info",
|
|
1464
|
-
// Order
|
|
1465
|
-
confirmed: "success",
|
|
1466
|
-
processing: "info",
|
|
1467
|
-
shipped: "info",
|
|
1468
|
-
delivered: "success",
|
|
1469
|
-
cancelled: "danger",
|
|
1470
|
-
refunded: "warning",
|
|
1471
|
-
failed: "danger",
|
|
1472
|
-
// Payment
|
|
1473
|
-
paid: "success",
|
|
1474
|
-
partially_refunded: "warning",
|
|
1475
|
-
// Review (pending/approved/rejected already covered)
|
|
1476
|
-
// Ticket
|
|
1477
|
-
open: "warning",
|
|
1478
|
-
in_progress: "info",
|
|
1479
|
-
resolved: "success",
|
|
1480
|
-
closed: "inactive"
|
|
1481
|
-
};
|
|
1482
|
-
var STATUS_LABELS = {
|
|
1483
|
-
active: "Active",
|
|
1484
|
-
inactive: "Inactive",
|
|
1485
|
-
pending: "Pending",
|
|
1486
|
-
approved: "Approved",
|
|
1487
|
-
rejected: "Rejected",
|
|
1488
|
-
success: "Success",
|
|
1489
|
-
warning: "Warning",
|
|
1490
|
-
danger: "Danger",
|
|
1491
|
-
info: "Info",
|
|
1492
|
-
confirmed: "Confirmed",
|
|
1493
|
-
processing: "Processing",
|
|
1494
|
-
shipped: "Shipped",
|
|
1495
|
-
delivered: "Delivered",
|
|
1496
|
-
cancelled: "Cancelled",
|
|
1497
|
-
refunded: "Refunded",
|
|
1498
|
-
failed: "Failed",
|
|
1499
|
-
paid: "Paid",
|
|
1500
|
-
partially_refunded: "Partially Refunded",
|
|
1501
|
-
open: "Open",
|
|
1502
|
-
in_progress: "In Progress",
|
|
1503
|
-
resolved: "Resolved",
|
|
1504
|
-
closed: "Closed"
|
|
1505
|
-
};
|
|
1506
|
-
function StatusBadge({ status, label, className }) {
|
|
1507
|
-
var _a, _b;
|
|
1508
|
-
const variant = (_a = STATUS_TO_VARIANT[status]) != null ? _a : "default";
|
|
1509
|
-
const displayLabel = (_b = label != null ? label : STATUS_LABELS[status]) != null ? _b : status;
|
|
1510
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, className, children: displayLabel });
|
|
1511
|
-
}
|
|
1512
|
-
var SIZE_CLASSES2 = {
|
|
1513
|
-
sm: "max-w-sm",
|
|
1514
|
-
md: "max-w-lg",
|
|
1515
|
-
lg: "max-w-2xl",
|
|
1516
|
-
xl: "max-w-4xl",
|
|
1517
|
-
full: "max-w-[95vw] max-h-[95vh]"
|
|
1518
|
-
};
|
|
1519
|
-
function Modal({
|
|
1520
|
-
isOpen,
|
|
1521
|
-
onClose,
|
|
1522
|
-
title,
|
|
1523
|
-
children,
|
|
1524
|
-
size = "md",
|
|
1525
|
-
showCloseButton = true,
|
|
1526
|
-
className = ""
|
|
1527
|
-
}) {
|
|
1528
|
-
const titleId = React.useId();
|
|
1529
|
-
const panelRef = React.useRef(null);
|
|
1530
|
-
const prevFocusRef = React.useRef(null);
|
|
1531
|
-
React.useEffect(() => {
|
|
1532
|
-
if (!isOpen) return;
|
|
1533
|
-
const prev = document.body.style.overflow;
|
|
1534
|
-
document.body.style.overflow = "hidden";
|
|
1535
|
-
return () => {
|
|
1536
|
-
document.body.style.overflow = prev;
|
|
1537
|
-
};
|
|
1538
|
-
}, [isOpen]);
|
|
1539
|
-
React.useEffect(() => {
|
|
1540
|
-
var _a;
|
|
1541
|
-
if (isOpen) {
|
|
1542
|
-
prevFocusRef.current = document.activeElement;
|
|
1543
|
-
requestAnimationFrame(() => {
|
|
1544
|
-
var _a2;
|
|
1545
|
-
return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
|
|
1546
|
-
});
|
|
1547
|
-
} else {
|
|
1548
|
-
(_a = prevFocusRef.current) == null ? void 0 : _a.focus();
|
|
1549
|
-
}
|
|
1550
|
-
}, [isOpen]);
|
|
1551
|
-
const handleKeyDown = React.useCallback(
|
|
1552
|
-
(e) => {
|
|
1553
|
-
if (e.key === "Escape") {
|
|
1554
|
-
onClose();
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
|
-
if (e.key !== "Tab") return;
|
|
1558
|
-
const panel = panelRef.current;
|
|
1559
|
-
if (!panel) return;
|
|
1560
|
-
const focusable = Array.from(
|
|
1561
|
-
panel.querySelectorAll(
|
|
1562
|
-
'a[href],button:not([disabled]),textarea,input,select,[tabindex]:not([tabindex="-1"])'
|
|
1563
|
-
)
|
|
1564
|
-
);
|
|
1565
|
-
if (!focusable.length) return;
|
|
1566
|
-
const first = focusable[0];
|
|
1567
|
-
const last = focusable[focusable.length - 1];
|
|
1568
|
-
if (e.shiftKey && document.activeElement === first) {
|
|
1569
|
-
e.preventDefault();
|
|
1570
|
-
last.focus();
|
|
1571
|
-
} else if (!e.shiftKey && document.activeElement === last) {
|
|
1572
|
-
e.preventDefault();
|
|
1573
|
-
first.focus();
|
|
1574
|
-
}
|
|
1575
|
-
},
|
|
1576
|
-
[onClose]
|
|
1577
|
-
);
|
|
1578
|
-
if (!isOpen) return null;
|
|
1579
|
-
if (typeof document === "undefined") return null;
|
|
1580
|
-
return reactDom.createPortal(
|
|
1581
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1582
|
-
"div",
|
|
1583
|
-
{
|
|
1584
|
-
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
1585
|
-
role: "dialog",
|
|
1586
|
-
"aria-modal": "true",
|
|
1587
|
-
"aria-labelledby": title ? titleId : void 0,
|
|
1588
|
-
onKeyDown: handleKeyDown,
|
|
1589
|
-
children: [
|
|
1590
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1591
|
-
"div",
|
|
1592
|
-
{
|
|
1593
|
-
className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
|
|
1594
|
-
"aria-hidden": "true",
|
|
1595
|
-
onClick: onClose
|
|
1596
|
-
}
|
|
1597
|
-
),
|
|
1598
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1599
|
-
"div",
|
|
1600
|
-
{
|
|
1601
|
-
ref: panelRef,
|
|
1602
|
-
tabIndex: -1,
|
|
1603
|
-
className: [
|
|
1604
|
-
"relative w-full rounded-2xl bg-white dark:bg-slate-900",
|
|
1605
|
-
"shadow-2xl ring-1 ring-zinc-200 dark:ring-slate-700",
|
|
1606
|
-
"flex flex-col max-h-[90vh] overflow-hidden",
|
|
1607
|
-
"animate-[fadeInUp_0.15s_ease_forwards]",
|
|
1608
|
-
SIZE_CLASSES2[size],
|
|
1609
|
-
className
|
|
1610
|
-
].join(" "),
|
|
1611
|
-
children: [
|
|
1612
|
-
(title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-zinc-100 dark:border-slate-800 flex-shrink-0", children: [
|
|
1613
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1614
|
-
Heading,
|
|
1615
|
-
{
|
|
1616
|
-
level: 2,
|
|
1617
|
-
id: titleId,
|
|
1618
|
-
className: "!text-lg !font-semibold !font-sans tracking-tight",
|
|
1619
|
-
children: title
|
|
1620
|
-
}
|
|
1621
|
-
),
|
|
1622
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
-
Button,
|
|
1624
|
-
{
|
|
1625
|
-
variant: "ghost",
|
|
1626
|
-
size: "sm",
|
|
1627
|
-
type: "button",
|
|
1628
|
-
onClick: onClose,
|
|
1629
|
-
className: "ml-auto p-1.5 !min-h-0 rounded-lg text-zinc-400 hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-300",
|
|
1630
|
-
"aria-label": "Close",
|
|
1631
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "w-5 h-5" })
|
|
1632
|
-
}
|
|
1633
|
-
)
|
|
1634
|
-
] }),
|
|
1635
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto flex-1 px-6 py-4", children })
|
|
1636
|
-
]
|
|
1637
|
-
}
|
|
1638
|
-
)
|
|
1639
|
-
]
|
|
1640
|
-
}
|
|
1641
|
-
),
|
|
1642
|
-
document.body
|
|
1643
|
-
);
|
|
1644
|
-
}
|
|
1645
|
-
var SIDE_TRANSLATE = {
|
|
1646
|
-
left: {
|
|
1647
|
-
closed: "-translate-x-full",
|
|
1648
|
-
open: "translate-x-0",
|
|
1649
|
-
base: "left-0 top-0 bottom-0"
|
|
1650
|
-
},
|
|
1651
|
-
right: {
|
|
1652
|
-
closed: "translate-x-full",
|
|
1653
|
-
open: "translate-x-0",
|
|
1654
|
-
base: "right-0 top-0 bottom-0"
|
|
1655
|
-
},
|
|
1656
|
-
bottom: {
|
|
1657
|
-
closed: "translate-y-full",
|
|
1658
|
-
open: "translate-y-0",
|
|
1659
|
-
base: "bottom-0 left-0 right-0"
|
|
1660
|
-
}
|
|
1661
|
-
};
|
|
1662
|
-
var SIDE_SIZE = {
|
|
1663
|
-
sm: "w-72",
|
|
1664
|
-
md: "w-80 sm:w-96",
|
|
1665
|
-
lg: "w-full sm:w-[480px]",
|
|
1666
|
-
full: "w-full"
|
|
1667
|
-
};
|
|
1668
|
-
function Drawer({
|
|
1669
|
-
isOpen,
|
|
1670
|
-
onClose,
|
|
1671
|
-
title,
|
|
1672
|
-
children,
|
|
1673
|
-
footer,
|
|
1674
|
-
side = "right",
|
|
1675
|
-
size = "md",
|
|
1676
|
-
showCloseButton = true,
|
|
1677
|
-
className = ""
|
|
1678
|
-
}) {
|
|
1679
|
-
const panelRef = React.useRef(null);
|
|
1680
|
-
const prevFocusRef = React.useRef(null);
|
|
1681
|
-
React.useEffect(() => {
|
|
1682
|
-
if (!isOpen) return;
|
|
1683
|
-
const prev = document.body.style.overflow;
|
|
1684
|
-
document.body.style.overflow = "hidden";
|
|
1685
|
-
return () => {
|
|
1686
|
-
document.body.style.overflow = prev;
|
|
1687
|
-
};
|
|
1688
|
-
}, [isOpen]);
|
|
1689
|
-
React.useEffect(() => {
|
|
1690
|
-
var _a;
|
|
1691
|
-
if (isOpen) {
|
|
1692
|
-
prevFocusRef.current = document.activeElement;
|
|
1693
|
-
requestAnimationFrame(() => {
|
|
1694
|
-
var _a2;
|
|
1695
|
-
return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
|
|
1696
|
-
});
|
|
1697
|
-
} else {
|
|
1698
|
-
(_a = prevFocusRef.current) == null ? void 0 : _a.focus();
|
|
1699
|
-
}
|
|
1700
|
-
}, [isOpen]);
|
|
1701
|
-
const handleKeyDown = React.useCallback(
|
|
1702
|
-
(e) => {
|
|
1703
|
-
if (e.key === "Escape") onClose();
|
|
1704
|
-
},
|
|
1705
|
-
[onClose]
|
|
1706
|
-
);
|
|
1707
|
-
const { closed, open, base } = SIDE_TRANSLATE[side];
|
|
1708
|
-
const isBottom = side === "bottom";
|
|
1709
|
-
if (typeof document === "undefined") return null;
|
|
1710
|
-
return reactDom.createPortal(
|
|
1711
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1712
|
-
"div",
|
|
1713
|
-
{
|
|
1714
|
-
className: `fixed inset-0 z-50 ${isOpen ? "pointer-events-auto" : "pointer-events-none"}`,
|
|
1715
|
-
onKeyDown: handleKeyDown,
|
|
1716
|
-
children: [
|
|
1717
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1718
|
-
"div",
|
|
1719
|
-
{
|
|
1720
|
-
className: `absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300 ${isOpen ? "opacity-100" : "opacity-0"}`,
|
|
1721
|
-
"aria-hidden": "true",
|
|
1722
|
-
onClick: onClose
|
|
1723
|
-
}
|
|
1724
|
-
),
|
|
1725
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1726
|
-
"div",
|
|
1727
|
-
{
|
|
1728
|
-
ref: panelRef,
|
|
1729
|
-
tabIndex: -1,
|
|
1730
|
-
role: "dialog",
|
|
1731
|
-
"aria-modal": "true",
|
|
1732
|
-
className: [
|
|
1733
|
-
"absolute bg-white dark:bg-slate-900",
|
|
1734
|
-
"shadow-2xl ring-1 ring-zinc-200 dark:ring-slate-700",
|
|
1735
|
-
"flex flex-col",
|
|
1736
|
-
"transition-transform duration-300 ease-out",
|
|
1737
|
-
base,
|
|
1738
|
-
isBottom ? "rounded-t-2xl max-h-[90vh]" : `${SIDE_SIZE[size]} h-full`,
|
|
1739
|
-
isOpen ? open : closed,
|
|
1740
|
-
className
|
|
1741
|
-
].join(" "),
|
|
1742
|
-
children: [
|
|
1743
|
-
isBottom && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-3 pb-1 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
-
"div",
|
|
1745
|
-
{
|
|
1746
|
-
className: "w-10 h-1 rounded-full bg-zinc-300 dark:bg-slate-600",
|
|
1747
|
-
"aria-hidden": "true"
|
|
1748
|
-
}
|
|
1749
|
-
) }),
|
|
1750
|
-
(title || showCloseButton) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-zinc-100 dark:border-slate-800 flex-shrink-0", children: [
|
|
1751
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
-
Heading,
|
|
1753
|
-
{
|
|
1754
|
-
level: 2,
|
|
1755
|
-
className: "!text-base !font-semibold !font-sans",
|
|
1756
|
-
children: title
|
|
1757
|
-
}
|
|
1758
|
-
),
|
|
1759
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1760
|
-
Button,
|
|
1761
|
-
{
|
|
1762
|
-
variant: "ghost",
|
|
1763
|
-
size: "sm",
|
|
1764
|
-
type: "button",
|
|
1765
|
-
onClick: onClose,
|
|
1766
|
-
className: "ml-auto p-1.5 !min-h-0 rounded-lg text-zinc-400 hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300",
|
|
1767
|
-
"aria-label": "Close",
|
|
1768
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "w-5 h-5" })
|
|
1769
|
-
}
|
|
1770
|
-
)
|
|
1771
|
-
] }),
|
|
1772
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-4", children }),
|
|
1773
|
-
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 border-t border-zinc-100 dark:border-slate-800 px-5 py-4", children: footer })
|
|
1774
|
-
]
|
|
1775
|
-
}
|
|
1776
|
-
)
|
|
1777
|
-
]
|
|
1778
|
-
}
|
|
1779
|
-
),
|
|
1780
|
-
document.body
|
|
1781
|
-
);
|
|
1782
|
-
}
|
|
1783
|
-
function Select({
|
|
1784
|
-
options,
|
|
1785
|
-
value,
|
|
1786
|
-
onChange,
|
|
1787
|
-
placeholder = "Select\u2026",
|
|
1788
|
-
label,
|
|
1789
|
-
error,
|
|
1790
|
-
disabled = false,
|
|
1791
|
-
required,
|
|
1792
|
-
className = "",
|
|
1793
|
-
id: externalId
|
|
1794
|
-
}) {
|
|
1795
|
-
var _a;
|
|
1796
|
-
const generatedId = React.useId();
|
|
1797
|
-
const id = externalId != null ? externalId : generatedId;
|
|
1798
|
-
const [open, setOpen] = React.useState(false);
|
|
1799
|
-
const [openUp, setOpenUp] = React.useState(false);
|
|
1800
|
-
const ref = React.useRef(null);
|
|
1801
|
-
const selected = options.find((o) => o.value === value);
|
|
1802
|
-
const toggle = React.useCallback(() => {
|
|
1803
|
-
if (!disabled) {
|
|
1804
|
-
if (!open && ref.current) {
|
|
1805
|
-
const rect = ref.current.getBoundingClientRect();
|
|
1806
|
-
const spaceBelow = window.innerHeight - rect.bottom;
|
|
1807
|
-
const spaceAbove = rect.top;
|
|
1808
|
-
setOpenUp(spaceBelow < 160 && spaceAbove > spaceBelow);
|
|
1809
|
-
}
|
|
1810
|
-
setOpen((v) => !v);
|
|
1811
|
-
}
|
|
1812
|
-
}, [disabled, open]);
|
|
1813
|
-
const handleSelect = React.useCallback(
|
|
1814
|
-
(val) => {
|
|
1815
|
-
onChange == null ? void 0 : onChange(val);
|
|
1816
|
-
setOpen(false);
|
|
1817
|
-
},
|
|
1818
|
-
[onChange]
|
|
1819
|
-
);
|
|
1820
|
-
React.useEffect(() => {
|
|
1821
|
-
const handler = (e) => {
|
|
1822
|
-
if (ref.current && !ref.current.contains(e.target)) {
|
|
1823
|
-
setOpen(false);
|
|
1824
|
-
}
|
|
1825
|
-
};
|
|
1826
|
-
if (open) document.addEventListener("mousedown", handler);
|
|
1827
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
1828
|
-
}, [open]);
|
|
1829
|
-
const handleKeyDown = React.useCallback(
|
|
1830
|
-
(e) => {
|
|
1831
|
-
if (e.key === "Escape") {
|
|
1832
|
-
setOpen(false);
|
|
1833
|
-
return;
|
|
1834
|
-
}
|
|
1835
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1836
|
-
toggle();
|
|
1837
|
-
e.preventDefault();
|
|
1838
|
-
return;
|
|
1839
|
-
}
|
|
1840
|
-
if (e.key === "ArrowDown" && !open) {
|
|
1841
|
-
setOpen(true);
|
|
1842
|
-
e.preventDefault();
|
|
1843
|
-
return;
|
|
1844
|
-
}
|
|
1845
|
-
if (e.key === "ArrowDown") {
|
|
1846
|
-
e.preventDefault();
|
|
1847
|
-
const idx = options.findIndex((o) => o.value === value);
|
|
1848
|
-
const next = options.slice(idx < 0 ? 0 : idx + 1).find((o) => !o.disabled);
|
|
1849
|
-
if (next) onChange == null ? void 0 : onChange(next.value);
|
|
1850
|
-
}
|
|
1851
|
-
if (e.key === "ArrowUp") {
|
|
1852
|
-
e.preventDefault();
|
|
1853
|
-
const idx = options.findIndex((o) => o.value === value);
|
|
1854
|
-
if (idx < 0) return;
|
|
1855
|
-
const prev = [...options].slice(0, idx).reverse().find((o) => !o.disabled);
|
|
1856
|
-
if (prev) onChange == null ? void 0 : onChange(prev.value);
|
|
1857
|
-
}
|
|
1858
|
-
},
|
|
1859
|
-
[open, options, value, onChange, toggle]
|
|
1860
|
-
);
|
|
1861
|
-
const triggerClass = [
|
|
1862
|
-
"flex h-10 w-full items-center justify-between rounded-lg border px-3 py-2 text-sm",
|
|
1863
|
-
"transition-colors bg-white dark:bg-slate-800/60",
|
|
1864
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0",
|
|
1865
|
-
error ? "border-red-400 dark:border-red-500 focus:ring-red-500/20" : "border-zinc-200 dark:border-slate-700 focus:ring-primary-500/20 dark:focus:ring-secondary-400/20 focus:border-primary-500 dark:focus:border-secondary-400",
|
|
1866
|
-
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
1867
|
-
className
|
|
1868
|
-
].join(" ");
|
|
1869
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "relative w-full", children: [
|
|
1870
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1871
|
-
Label,
|
|
1872
|
-
{
|
|
1873
|
-
htmlFor: id,
|
|
1874
|
-
className: "!text-zinc-700 dark:!text-zinc-300",
|
|
1875
|
-
required,
|
|
1876
|
-
children: label
|
|
1877
|
-
}
|
|
1878
|
-
),
|
|
1879
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1880
|
-
Button,
|
|
1881
|
-
{
|
|
1882
|
-
id,
|
|
1883
|
-
type: "button",
|
|
1884
|
-
role: "combobox",
|
|
1885
|
-
"aria-expanded": open,
|
|
1886
|
-
"aria-haspopup": "listbox",
|
|
1887
|
-
"aria-disabled": disabled,
|
|
1888
|
-
disabled,
|
|
1889
|
-
variant: "ghost",
|
|
1890
|
-
className: triggerClass,
|
|
1891
|
-
onClick: toggle,
|
|
1892
|
-
onKeyDown: handleKeyDown,
|
|
1893
|
-
children: [
|
|
1894
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1895
|
-
Span,
|
|
1896
|
-
{
|
|
1897
|
-
className: selected ? "text-zinc-900 dark:text-zinc-50" : "text-zinc-400 dark:text-zinc-500",
|
|
1898
|
-
children: (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder
|
|
1899
|
-
}
|
|
1900
|
-
),
|
|
1901
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1902
|
-
ChevronDown,
|
|
1903
|
-
{
|
|
1904
|
-
className: `h-4 w-4 flex-shrink-0 text-zinc-400 transition-transform duration-200 ${open ? "rotate-180" : ""}`,
|
|
1905
|
-
"aria-hidden": "true"
|
|
1906
|
-
}
|
|
1907
|
-
)
|
|
1908
|
-
]
|
|
1909
|
-
}
|
|
1910
|
-
),
|
|
1911
|
-
open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1912
|
-
Ul,
|
|
1913
|
-
{
|
|
1914
|
-
role: "listbox",
|
|
1915
|
-
className: [
|
|
1916
|
-
"absolute z-50 w-full overflow-auto rounded-lg border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800 shadow-lg max-h-60 py-1",
|
|
1917
|
-
openUp ? "bottom-full mb-1" : "top-full mt-1"
|
|
1918
|
-
].join(" "),
|
|
1919
|
-
children: options.map((option) => {
|
|
1920
|
-
const isSelected = option.value === value;
|
|
1921
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1922
|
-
Li,
|
|
1923
|
-
{
|
|
1924
|
-
role: "option",
|
|
1925
|
-
"aria-selected": isSelected,
|
|
1926
|
-
"aria-disabled": option.disabled,
|
|
1927
|
-
className: [
|
|
1928
|
-
"relative flex cursor-pointer items-center px-3 py-2 text-sm select-none",
|
|
1929
|
-
option.disabled ? "opacity-40 cursor-not-allowed" : isSelected ? "bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300" : "text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-slate-700"
|
|
1930
|
-
].join(" "),
|
|
1931
|
-
onClick: () => !option.disabled && handleSelect(option.value),
|
|
1932
|
-
children: [
|
|
1933
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "flex-1", children: option.label }),
|
|
1934
|
-
isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1935
|
-
Check,
|
|
1936
|
-
{
|
|
1937
|
-
className: "h-4 w-4 ml-2 flex-shrink-0",
|
|
1938
|
-
"aria-hidden": "true"
|
|
1939
|
-
}
|
|
1940
|
-
)
|
|
1941
|
-
]
|
|
1942
|
-
},
|
|
1943
|
-
option.value
|
|
1944
|
-
);
|
|
1945
|
-
})
|
|
1946
|
-
}
|
|
1947
|
-
),
|
|
1948
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "xs", variant: "error", className: "mt-1.5", role: "alert", children: error })
|
|
1949
|
-
] });
|
|
1950
|
-
}
|
|
1951
|
-
function Input(_a) {
|
|
1952
|
-
var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
|
|
1953
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1954
|
-
"input",
|
|
1955
|
-
__spreadValues({
|
|
1956
|
-
className: [
|
|
1957
|
-
"w-full rounded-md border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-2.5 py-1.5 text-sm text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-primary-500/20 dark:focus:ring-secondary-400/20",
|
|
1958
|
-
className
|
|
1959
|
-
].filter(Boolean).join(" ")
|
|
1960
|
-
}, props)
|
|
1961
|
-
);
|
|
1962
|
-
}
|
|
1963
|
-
function Textarea(_a) {
|
|
1964
|
-
var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
|
|
1965
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1966
|
-
"textarea",
|
|
1967
|
-
__spreadValues({
|
|
1968
|
-
className: [
|
|
1969
|
-
"w-full rounded-md border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-800/60 px-2.5 py-1.5 text-sm text-zinc-900 dark:text-zinc-100 focus:outline-none focus:ring-2 focus:ring-primary-500/20 dark:focus:ring-secondary-400/20",
|
|
1970
|
-
className
|
|
1971
|
-
].filter(Boolean).join(" ")
|
|
1972
|
-
}, props)
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
|
-
function Slider({
|
|
1976
|
-
value = 0,
|
|
1977
|
-
min = 0,
|
|
1978
|
-
max = 100,
|
|
1979
|
-
step = 1,
|
|
1980
|
-
onChange,
|
|
1981
|
-
className = "",
|
|
1982
|
-
disabled = false
|
|
1983
|
-
}) {
|
|
1984
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
|
-
"input",
|
|
1986
|
-
{
|
|
1987
|
-
type: "range",
|
|
1988
|
-
min,
|
|
1989
|
-
max,
|
|
1990
|
-
step,
|
|
1991
|
-
value,
|
|
1992
|
-
disabled,
|
|
1993
|
-
onChange: (e) => onChange == null ? void 0 : onChange(Number(e.target.value)),
|
|
1994
|
-
className: ["w-full accent-primary dark:accent-secondary", className].filter(Boolean).join(" ")
|
|
1995
|
-
}
|
|
1996
|
-
);
|
|
1997
|
-
}
|
|
1998
|
-
var SIZE_PX = { sm: "w-4 h-4", md: "w-5 h-5", lg: "w-6 h-6" };
|
|
1999
|
-
function StarRating({
|
|
2000
|
-
value = 0,
|
|
2001
|
-
onChange,
|
|
2002
|
-
max = 5,
|
|
2003
|
-
size = "md",
|
|
2004
|
-
readOnly = false,
|
|
2005
|
-
className = "",
|
|
2006
|
-
label
|
|
2007
|
-
}) {
|
|
2008
|
-
const [hovered, setHovered] = React.useState(null);
|
|
2009
|
-
const displayed = hovered != null ? hovered : value;
|
|
2010
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2011
|
-
Span,
|
|
2012
|
-
{
|
|
2013
|
-
className: `inline-flex items-center gap-0.5 ${className}`,
|
|
2014
|
-
role: readOnly ? "img" : "group",
|
|
2015
|
-
"aria-label": label != null ? label : `${value} out of ${max} stars`,
|
|
2016
|
-
children: [
|
|
2017
|
-
Array.from({ length: max }, (_, i) => {
|
|
2018
|
-
const starValue = i + 1;
|
|
2019
|
-
const filled = starValue <= displayed;
|
|
2020
|
-
const half = !filled && starValue - 0.5 <= displayed;
|
|
2021
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2022
|
-
Span,
|
|
2023
|
-
{
|
|
2024
|
-
className: readOnly ? void 0 : "cursor-pointer",
|
|
2025
|
-
onClick: () => !readOnly && (onChange == null ? void 0 : onChange(starValue)),
|
|
2026
|
-
onMouseEnter: () => !readOnly && setHovered(starValue),
|
|
2027
|
-
onMouseLeave: () => !readOnly && setHovered(null),
|
|
2028
|
-
"aria-hidden": !readOnly ? "true" : void 0,
|
|
2029
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2030
|
-
Star,
|
|
2031
|
-
{
|
|
2032
|
-
className: [
|
|
2033
|
-
SIZE_PX[size],
|
|
2034
|
-
"transition-colors duration-100",
|
|
2035
|
-
filled || half ? "fill-amber-400 text-amber-400" : "fill-transparent text-zinc-300 dark:text-slate-600",
|
|
2036
|
-
!readOnly && !filled ? "hover:fill-amber-300 hover:text-amber-300" : ""
|
|
2037
|
-
].join(" "),
|
|
2038
|
-
"aria-hidden": "true"
|
|
2039
|
-
}
|
|
2040
|
-
)
|
|
2041
|
-
},
|
|
2042
|
-
starValue
|
|
2043
|
-
);
|
|
2044
|
-
}),
|
|
2045
|
-
!readOnly && /* @__PURE__ */ jsxRuntime.jsxs(Span, { className: "sr-only", children: [
|
|
2046
|
-
value,
|
|
2047
|
-
" out of ",
|
|
2048
|
-
max
|
|
2049
|
-
] })
|
|
2050
|
-
]
|
|
2051
|
-
}
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
function Breadcrumb({ items, className = "" }) {
|
|
2055
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Nav, { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx(Ol, { className: "flex items-center gap-1 flex-wrap text-sm text-zinc-500 dark:text-zinc-400", children: items.map((item, i) => {
|
|
2056
|
-
const isLast = i === items.length - 1;
|
|
2057
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Li, { className: "flex items-center gap-1", children: [
|
|
2058
|
-
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2059
|
-
ChevronRight,
|
|
2060
|
-
{
|
|
2061
|
-
className: "w-3.5 h-3.5 flex-shrink-0 text-zinc-400 dark:text-zinc-600",
|
|
2062
|
-
"aria-hidden": "true"
|
|
2063
|
-
}
|
|
2064
|
-
),
|
|
2065
|
-
isLast || !item.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2066
|
-
Span,
|
|
2067
|
-
{
|
|
2068
|
-
className: isLast ? "font-medium text-zinc-900 dark:text-zinc-50" : "text-zinc-500 dark:text-zinc-400",
|
|
2069
|
-
"aria-current": isLast ? "page" : void 0,
|
|
2070
|
-
children: item.label
|
|
2071
|
-
}
|
|
2072
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2073
|
-
"a",
|
|
2074
|
-
{
|
|
2075
|
-
href: item.href,
|
|
2076
|
-
className: "hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
|
|
2077
|
-
children: item.label
|
|
2078
|
-
}
|
|
2079
|
-
)
|
|
2080
|
-
] }, i);
|
|
2081
|
-
}) }) });
|
|
2082
|
-
}
|
|
2083
|
-
function ImageLightbox({
|
|
2084
|
-
images,
|
|
2085
|
-
activeIndex,
|
|
2086
|
-
onClose,
|
|
2087
|
-
onNavigate
|
|
2088
|
-
}) {
|
|
2089
|
-
var _a;
|
|
2090
|
-
const [currentIndex, setCurrentIndex] = React.useState(activeIndex != null ? activeIndex : 0);
|
|
2091
|
-
const overlayRef = React.useRef(null);
|
|
2092
|
-
React.useEffect(() => {
|
|
2093
|
-
if (activeIndex !== null && activeIndex >= 0) {
|
|
2094
|
-
setCurrentIndex(activeIndex);
|
|
2095
|
-
}
|
|
2096
|
-
}, [activeIndex]);
|
|
2097
|
-
const isOpen = activeIndex !== null && activeIndex >= 0 && images.length > 0;
|
|
2098
|
-
React.useEffect(() => {
|
|
2099
|
-
if (!isOpen) return;
|
|
2100
|
-
const prev = document.body.style.overflow;
|
|
2101
|
-
document.body.style.overflow = "hidden";
|
|
2102
|
-
return () => {
|
|
2103
|
-
document.body.style.overflow = prev;
|
|
2104
|
-
};
|
|
2105
|
-
}, [isOpen]);
|
|
2106
|
-
const navigate = React.useCallback(
|
|
2107
|
-
(dir) => {
|
|
2108
|
-
setCurrentIndex((prev) => {
|
|
2109
|
-
const next = (prev + dir + images.length) % images.length;
|
|
2110
|
-
onNavigate == null ? void 0 : onNavigate(next);
|
|
2111
|
-
return next;
|
|
2112
|
-
});
|
|
2113
|
-
},
|
|
2114
|
-
[images.length, onNavigate]
|
|
2115
|
-
);
|
|
2116
|
-
const handleKeyDown = React.useCallback(
|
|
2117
|
-
(e) => {
|
|
2118
|
-
if (e.key === "Escape") {
|
|
2119
|
-
onClose();
|
|
2120
|
-
return;
|
|
2121
|
-
}
|
|
2122
|
-
if (e.key === "ArrowLeft") {
|
|
2123
|
-
navigate(-1);
|
|
2124
|
-
return;
|
|
2125
|
-
}
|
|
2126
|
-
if (e.key === "ArrowRight") {
|
|
2127
|
-
navigate(1);
|
|
2128
|
-
return;
|
|
2129
|
-
}
|
|
2130
|
-
},
|
|
2131
|
-
[onClose, navigate]
|
|
2132
|
-
);
|
|
2133
|
-
React.useEffect(() => {
|
|
2134
|
-
if (isOpen) {
|
|
2135
|
-
requestAnimationFrame(() => {
|
|
2136
|
-
var _a2;
|
|
2137
|
-
return (_a2 = overlayRef.current) == null ? void 0 : _a2.focus();
|
|
2138
|
-
});
|
|
2139
|
-
}
|
|
2140
|
-
}, [isOpen]);
|
|
2141
|
-
if (!isOpen || typeof document === "undefined") return null;
|
|
2142
|
-
const image = images[currentIndex];
|
|
2143
|
-
const hasMultiple = images.length > 1;
|
|
2144
|
-
return reactDom.createPortal(
|
|
2145
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2146
|
-
"div",
|
|
2147
|
-
{
|
|
2148
|
-
ref: overlayRef,
|
|
2149
|
-
tabIndex: -1,
|
|
2150
|
-
className: "fixed inset-0 z-[9999] bg-black/95 flex flex-col items-center justify-center outline-none",
|
|
2151
|
-
role: "dialog",
|
|
2152
|
-
"aria-modal": "true",
|
|
2153
|
-
"aria-label": "Image lightbox",
|
|
2154
|
-
onKeyDown: handleKeyDown,
|
|
2155
|
-
children: [
|
|
2156
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2157
|
-
Button,
|
|
2158
|
-
{
|
|
2159
|
-
variant: "ghost",
|
|
2160
|
-
size: "sm",
|
|
2161
|
-
type: "button",
|
|
2162
|
-
onClick: onClose,
|
|
2163
|
-
className: "absolute top-4 right-4 z-10 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-red-500/50 text-white flex items-center justify-center",
|
|
2164
|
-
"aria-label": "Close lightbox",
|
|
2165
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "w-7 h-7" })
|
|
2166
|
-
}
|
|
2167
|
-
),
|
|
2168
|
-
hasMultiple && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-4 left-1/2 -translate-x-1/2 text-white/70 text-sm font-medium", children: [
|
|
2169
|
-
currentIndex + 1,
|
|
2170
|
-
" / ",
|
|
2171
|
-
images.length
|
|
2172
|
-
] }),
|
|
2173
|
-
hasMultiple && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2174
|
-
Button,
|
|
2175
|
-
{
|
|
2176
|
-
variant: "ghost",
|
|
2177
|
-
size: "sm",
|
|
2178
|
-
type: "button",
|
|
2179
|
-
onClick: () => navigate(-1),
|
|
2180
|
-
className: "absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center",
|
|
2181
|
-
"aria-label": "Previous image",
|
|
2182
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft, { className: "w-7 h-7" })
|
|
2183
|
-
}
|
|
2184
|
-
),
|
|
2185
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex items-center justify-center p-16 w-full h-full relative", children: [
|
|
2186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2187
|
-
"img",
|
|
2188
|
-
{
|
|
2189
|
-
src: image.src,
|
|
2190
|
-
alt: (_a = image.alt) != null ? _a : "",
|
|
2191
|
-
className: "max-h-full max-w-full object-contain select-none",
|
|
2192
|
-
draggable: false
|
|
2193
|
-
}
|
|
2194
|
-
),
|
|
2195
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-4 right-4 text-white/40 flex items-center gap-1 text-xs", children: [
|
|
2196
|
-
/* @__PURE__ */ jsxRuntime.jsx(ZoomIn, { className: "w-4 h-4" }),
|
|
2197
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "text-xs", children: "Scroll to zoom" })
|
|
2198
|
-
] })
|
|
2199
|
-
] }),
|
|
2200
|
-
image.caption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2201
|
-
Text,
|
|
2202
|
-
{
|
|
2203
|
-
size: "sm",
|
|
2204
|
-
variant: "secondary",
|
|
2205
|
-
className: "flex-shrink-0 !text-white/70 text-center px-8 pb-4",
|
|
2206
|
-
children: image.caption
|
|
2207
|
-
}
|
|
2208
|
-
),
|
|
2209
|
-
hasMultiple && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2210
|
-
Button,
|
|
2211
|
-
{
|
|
2212
|
-
variant: "ghost",
|
|
2213
|
-
size: "sm",
|
|
2214
|
-
type: "button",
|
|
2215
|
-
onClick: () => navigate(1),
|
|
2216
|
-
className: "absolute right-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center",
|
|
2217
|
-
"aria-label": "Next image",
|
|
2218
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "w-7 h-7" })
|
|
2219
|
-
}
|
|
2220
|
-
)
|
|
2221
|
-
]
|
|
2222
|
-
}
|
|
2223
|
-
),
|
|
2224
|
-
document.body
|
|
2225
|
-
);
|
|
2226
|
-
}
|
|
2227
|
-
function TagInput({
|
|
2228
|
-
value,
|
|
2229
|
-
onChange,
|
|
2230
|
-
disabled = false,
|
|
2231
|
-
label,
|
|
2232
|
-
placeholder = "Add a tag...",
|
|
2233
|
-
className = "",
|
|
2234
|
-
helperText = "Press Enter or comma to add a tag"
|
|
2235
|
-
}) {
|
|
2236
|
-
const [draft, setDraft] = React.useState("");
|
|
2237
|
-
const inputRef = React.useRef(null);
|
|
2238
|
-
const addTag = (raw) => {
|
|
2239
|
-
const tag = raw.trim().replace(/,+$/, "").trim();
|
|
2240
|
-
if (!tag || value.includes(tag)) {
|
|
2241
|
-
setDraft("");
|
|
2242
|
-
return;
|
|
2243
|
-
}
|
|
2244
|
-
onChange([...value, tag]);
|
|
2245
|
-
setDraft("");
|
|
2246
|
-
};
|
|
2247
|
-
const removeTag = (tag) => {
|
|
2248
|
-
onChange(value.filter((t) => t !== tag));
|
|
2249
|
-
};
|
|
2250
|
-
const handleKeyDown = (e) => {
|
|
2251
|
-
if (e.key === "Enter" || e.key === ",") {
|
|
2252
|
-
e.preventDefault();
|
|
2253
|
-
addTag(draft);
|
|
2254
|
-
return;
|
|
2255
|
-
}
|
|
2256
|
-
if (e.key === "Backspace" && draft === "" && value.length > 0) {
|
|
2257
|
-
onChange(value.slice(0, -1));
|
|
2258
|
-
}
|
|
2259
|
-
};
|
|
2260
|
-
const handleChange = (e) => {
|
|
2261
|
-
var _a;
|
|
2262
|
-
const inputValue = e.target.value;
|
|
2263
|
-
if (inputValue.includes(",")) {
|
|
2264
|
-
const parts = inputValue.split(",");
|
|
2265
|
-
const last = (_a = parts.pop()) != null ? _a : "";
|
|
2266
|
-
parts.forEach((part) => addTag(part));
|
|
2267
|
-
setDraft(last);
|
|
2268
|
-
return;
|
|
2269
|
-
}
|
|
2270
|
-
setDraft(inputValue);
|
|
2271
|
-
};
|
|
2272
|
-
const handleBlur = () => {
|
|
2273
|
-
if (draft.trim()) {
|
|
2274
|
-
addTag(draft);
|
|
2275
|
-
}
|
|
2276
|
-
};
|
|
2277
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2278
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1.5 block text-sm font-medium", children: label }),
|
|
2279
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2280
|
-
"div",
|
|
2281
|
-
{
|
|
2282
|
-
onClick: () => {
|
|
2283
|
-
var _a;
|
|
2284
|
-
return !disabled && ((_a = inputRef.current) == null ? void 0 : _a.focus());
|
|
2285
|
-
},
|
|
2286
|
-
className: [
|
|
2287
|
-
"flex min-h-[42px] w-full cursor-text flex-wrap items-center gap-1.5 rounded-lg border px-3 py-2",
|
|
2288
|
-
"border-zinc-300 bg-white dark:border-slate-700 dark:bg-slate-900",
|
|
2289
|
-
disabled ? "cursor-not-allowed opacity-50" : "transition-colors focus-within:border-primary-500 focus-within:ring-2 focus-within:ring-primary-500/30"
|
|
2290
|
-
].join(" "),
|
|
2291
|
-
children: [
|
|
2292
|
-
value.map((tag) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2293
|
-
"span",
|
|
2294
|
-
{
|
|
2295
|
-
className: "inline-flex items-center gap-1 rounded-full bg-primary-500/10 px-2 py-0.5 text-xs font-medium text-primary-700 dark:text-primary-300",
|
|
2296
|
-
children: [
|
|
2297
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { size: "xs", children: tag }),
|
|
2298
|
-
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2299
|
-
"button",
|
|
2300
|
-
{
|
|
2301
|
-
type: "button",
|
|
2302
|
-
onClick: (e) => {
|
|
2303
|
-
e.stopPropagation();
|
|
2304
|
-
removeTag(tag);
|
|
2305
|
-
},
|
|
2306
|
-
className: "ml-0.5 text-primary-700/70 hover:text-primary-700 dark:text-primary-300/70 dark:hover:text-primary-300",
|
|
2307
|
-
"aria-label": `Remove tag ${tag}`,
|
|
2308
|
-
children: "x"
|
|
2309
|
-
}
|
|
2310
|
-
)
|
|
2311
|
-
]
|
|
2312
|
-
},
|
|
2313
|
-
tag
|
|
2314
|
-
)),
|
|
2315
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2316
|
-
"input",
|
|
2317
|
-
{
|
|
2318
|
-
ref: inputRef,
|
|
2319
|
-
value: draft,
|
|
2320
|
-
onChange: handleChange,
|
|
2321
|
-
onKeyDown: handleKeyDown,
|
|
2322
|
-
onBlur: handleBlur,
|
|
2323
|
-
disabled,
|
|
2324
|
-
placeholder: value.length === 0 ? placeholder : "",
|
|
2325
|
-
className: [
|
|
2326
|
-
"min-w-[100px] flex-1 bg-transparent text-sm outline-none",
|
|
2327
|
-
"text-zinc-900 placeholder:text-zinc-400 dark:text-zinc-100 dark:placeholder:text-zinc-500",
|
|
2328
|
-
disabled ? "cursor-not-allowed" : ""
|
|
2329
|
-
].join(" "),
|
|
2330
|
-
"aria-label": label != null ? label : "Tag input"
|
|
2331
|
-
}
|
|
2332
|
-
)
|
|
2333
|
-
]
|
|
2334
|
-
}
|
|
2335
|
-
),
|
|
2336
|
-
helperText && /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "xs", className: "mt-1 text-zinc-500 dark:text-zinc-400", children: helperText })
|
|
2337
|
-
] });
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
// src/ui/style.helper.ts
|
|
2341
|
-
function classNames(...classes) {
|
|
2342
|
-
return classes.filter(Boolean).join(" ");
|
|
2343
|
-
}
|
|
2344
|
-
function mergeTailwindClasses(...classes) {
|
|
2345
|
-
const classArray = classes.filter(Boolean).join(" ").split(" ");
|
|
2346
|
-
return Array.from(new Set(classArray)).join(" ");
|
|
2347
|
-
}
|
|
2348
|
-
function StepperNav({ steps, currentStep, className }) {
|
|
2349
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Nav, { "aria-label": "Steps", className: classNames("mb-8", className), children: /* @__PURE__ */ jsxRuntime.jsx(Ol, { className: "flex items-center gap-0", children: steps.map((step, i) => {
|
|
2350
|
-
const isComplete = step.number < currentStep;
|
|
2351
|
-
const isActive = step.number === currentStep;
|
|
2352
|
-
const isLast = i === steps.length - 1;
|
|
2353
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Li, { className: "flex flex-1 items-center", children: [
|
|
2354
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
|
|
2355
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2356
|
-
"div",
|
|
2357
|
-
{
|
|
2358
|
-
className: classNames(
|
|
2359
|
-
"flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",
|
|
2360
|
-
isComplete ? "border-primary bg-primary text-white" : isActive ? "border-primary bg-transparent text-primary" : "border-zinc-300 text-zinc-500 dark:border-slate-700 dark:text-zinc-400"
|
|
2361
|
-
),
|
|
2362
|
-
children: isComplete ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2363
|
-
"svg",
|
|
2364
|
-
{
|
|
2365
|
-
className: "h-4 w-4",
|
|
2366
|
-
fill: "none",
|
|
2367
|
-
viewBox: "0 0 24 24",
|
|
2368
|
-
stroke: "currentColor",
|
|
2369
|
-
"aria-hidden": "true",
|
|
2370
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2371
|
-
"path",
|
|
2372
|
-
{
|
|
2373
|
-
strokeLinecap: "round",
|
|
2374
|
-
strokeLinejoin: "round",
|
|
2375
|
-
strokeWidth: 2.5,
|
|
2376
|
-
d: "M5 13l4 4L19 7"
|
|
2377
|
-
}
|
|
2378
|
-
)
|
|
2379
|
-
}
|
|
2380
|
-
) : step.number
|
|
2381
|
-
}
|
|
2382
|
-
),
|
|
2383
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2384
|
-
Span,
|
|
2385
|
-
{
|
|
2386
|
-
className: classNames(
|
|
2387
|
-
"hidden text-sm font-medium sm:block",
|
|
2388
|
-
isActive ? "text-primary" : isComplete ? "text-zinc-900 dark:text-zinc-100" : "text-zinc-500 dark:text-zinc-400"
|
|
2389
|
-
),
|
|
2390
|
-
children: step.label
|
|
2391
|
-
}
|
|
2392
|
-
)
|
|
2393
|
-
] }),
|
|
2394
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2395
|
-
"div",
|
|
2396
|
-
{
|
|
2397
|
-
className: classNames(
|
|
2398
|
-
"mx-3 h-0.5 flex-1 transition-colors",
|
|
2399
|
-
isComplete ? "bg-primary" : "bg-zinc-200 dark:bg-slate-700"
|
|
2400
|
-
)
|
|
2401
|
-
}
|
|
2402
|
-
)
|
|
2403
|
-
] }, step.number);
|
|
2404
|
-
}) }) });
|
|
2405
|
-
}
|
|
2406
|
-
var ACTIVE = "bg-primary/5 text-primary ring-primary/30 dark:bg-primary/10";
|
|
2407
|
-
var INACTIVE = "text-zinc-500 ring-zinc-200 hover:bg-zinc-100 dark:text-zinc-400 dark:ring-slate-700 dark:hover:bg-slate-800";
|
|
2408
|
-
var DEFAULT_LABELS = {
|
|
2409
|
-
card: "Card grid",
|
|
2410
|
-
fluid: "Fluid grid",
|
|
2411
|
-
list: "List view",
|
|
2412
|
-
toolbar: "View mode"
|
|
2413
|
-
};
|
|
2414
|
-
function ViewToggle({
|
|
2415
|
-
value,
|
|
2416
|
-
onChange,
|
|
2417
|
-
labels,
|
|
2418
|
-
className
|
|
2419
|
-
}) {
|
|
2420
|
-
const mergedLabels = __spreadValues(__spreadValues({}, DEFAULT_LABELS), labels);
|
|
2421
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2422
|
-
Div,
|
|
2423
|
-
{
|
|
2424
|
-
className: ["flex gap-1", className != null ? className : ""].join(" ").trim(),
|
|
2425
|
-
role: "toolbar",
|
|
2426
|
-
"aria-label": mergedLabels.toolbar,
|
|
2427
|
-
children: [
|
|
2428
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2429
|
-
Button,
|
|
2430
|
-
{
|
|
2431
|
-
type: "button",
|
|
2432
|
-
variant: "ghost",
|
|
2433
|
-
size: "sm",
|
|
2434
|
-
onClick: () => onChange("card"),
|
|
2435
|
-
"aria-label": mergedLabels.card,
|
|
2436
|
-
"aria-pressed": value === "card",
|
|
2437
|
-
className: `flex items-center justify-center rounded-lg p-2 ring-1 transition-colors ${value === "card" ? ACTIVE : INACTIVE}`,
|
|
2438
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2439
|
-
"svg",
|
|
2440
|
-
{
|
|
2441
|
-
className: "h-5 w-5",
|
|
2442
|
-
fill: "none",
|
|
2443
|
-
viewBox: "0 0 24 24",
|
|
2444
|
-
stroke: "currentColor",
|
|
2445
|
-
strokeWidth: 1.5,
|
|
2446
|
-
"aria-hidden": "true",
|
|
2447
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2448
|
-
"path",
|
|
2449
|
-
{
|
|
2450
|
-
strokeLinecap: "round",
|
|
2451
|
-
strokeLinejoin: "round",
|
|
2452
|
-
d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"
|
|
2453
|
-
}
|
|
2454
|
-
)
|
|
2455
|
-
}
|
|
2456
|
-
)
|
|
2457
|
-
}
|
|
2458
|
-
),
|
|
2459
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2460
|
-
Button,
|
|
2461
|
-
{
|
|
2462
|
-
type: "button",
|
|
2463
|
-
variant: "ghost",
|
|
2464
|
-
size: "sm",
|
|
2465
|
-
onClick: () => onChange("fluid"),
|
|
2466
|
-
"aria-label": mergedLabels.fluid,
|
|
2467
|
-
"aria-pressed": value === "fluid",
|
|
2468
|
-
className: `flex items-center justify-center rounded-lg p-2 ring-1 transition-colors ${value === "fluid" ? ACTIVE : INACTIVE}`,
|
|
2469
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2470
|
-
"svg",
|
|
2471
|
-
{
|
|
2472
|
-
className: "h-5 w-5",
|
|
2473
|
-
fill: "none",
|
|
2474
|
-
viewBox: "0 0 24 24",
|
|
2475
|
-
stroke: "currentColor",
|
|
2476
|
-
strokeWidth: 1.5,
|
|
2477
|
-
"aria-hidden": "true",
|
|
2478
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2479
|
-
"path",
|
|
2480
|
-
{
|
|
2481
|
-
strokeLinecap: "round",
|
|
2482
|
-
strokeLinejoin: "round",
|
|
2483
|
-
d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0118 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0118 9.375v1.5m1.5-3.75C19.496 8.25 20 8.754 20 9.375v1.5m0-5.25v5.25m0-5.25C20 5.004 19.496 4.5 18.875 4.5M7.5 15h9"
|
|
2484
|
-
}
|
|
2485
|
-
)
|
|
2486
|
-
}
|
|
2487
|
-
)
|
|
2488
|
-
}
|
|
2489
|
-
),
|
|
2490
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2491
|
-
Button,
|
|
2492
|
-
{
|
|
2493
|
-
type: "button",
|
|
2494
|
-
variant: "ghost",
|
|
2495
|
-
size: "sm",
|
|
2496
|
-
onClick: () => onChange("list"),
|
|
2497
|
-
"aria-label": mergedLabels.list,
|
|
2498
|
-
"aria-pressed": value === "list",
|
|
2499
|
-
className: `flex items-center justify-center rounded-lg p-2 ring-1 transition-colors ${value === "list" ? ACTIVE : INACTIVE}`,
|
|
2500
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2501
|
-
"svg",
|
|
2502
|
-
{
|
|
2503
|
-
className: "h-5 w-5",
|
|
2504
|
-
fill: "none",
|
|
2505
|
-
viewBox: "0 0 24 24",
|
|
2506
|
-
stroke: "currentColor",
|
|
2507
|
-
strokeWidth: 1.5,
|
|
2508
|
-
"aria-hidden": "true",
|
|
2509
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2510
|
-
"path",
|
|
2511
|
-
{
|
|
2512
|
-
strokeLinecap: "round",
|
|
2513
|
-
strokeLinejoin: "round",
|
|
2514
|
-
d: "M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.007v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.007v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"
|
|
2515
|
-
}
|
|
2516
|
-
)
|
|
2517
|
-
}
|
|
2518
|
-
)
|
|
2519
|
-
}
|
|
2520
|
-
)
|
|
2521
|
-
]
|
|
2522
|
-
}
|
|
2523
|
-
);
|
|
2524
|
-
}
|
|
2525
|
-
var sizeClass = {
|
|
2526
|
-
sm: "h-4 w-4",
|
|
2527
|
-
md: "h-5 w-5",
|
|
2528
|
-
lg: "h-6 w-6"
|
|
2529
|
-
};
|
|
2530
|
-
function RatingDisplay({
|
|
2531
|
-
rating,
|
|
2532
|
-
maxRating = 5,
|
|
2533
|
-
size = "sm",
|
|
2534
|
-
showValue = false,
|
|
2535
|
-
className
|
|
2536
|
-
}) {
|
|
2537
|
-
const starSize = sizeClass[size];
|
|
2538
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames("flex items-center gap-1", className), children: [
|
|
2539
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: Array.from({ length: maxRating }, (_, i) => i + 1).map((star) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2540
|
-
"svg",
|
|
2541
|
-
{
|
|
2542
|
-
className: classNames(
|
|
2543
|
-
starSize,
|
|
2544
|
-
star <= rating ? "text-amber-400 dark:text-secondary-500" : "text-zinc-300 dark:text-zinc-700"
|
|
2545
|
-
),
|
|
2546
|
-
fill: "currentColor",
|
|
2547
|
-
viewBox: "0 0 20 20",
|
|
2548
|
-
"aria-hidden": "true",
|
|
2549
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
|
|
2550
|
-
},
|
|
2551
|
-
star
|
|
2552
|
-
)) }),
|
|
2553
|
-
showValue && /* @__PURE__ */ jsxRuntime.jsx(Span, { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: rating.toFixed(1) })
|
|
2554
|
-
] });
|
|
2555
|
-
}
|
|
2556
|
-
var GAP_MAP = {
|
|
2557
|
-
none: "",
|
|
2558
|
-
px: "gap-px",
|
|
2559
|
-
xs: "gap-1",
|
|
2560
|
-
sm: "gap-2",
|
|
2561
|
-
"2.5": "gap-2.5",
|
|
2562
|
-
"3": "gap-3",
|
|
2563
|
-
md: "gap-4",
|
|
2564
|
-
"5": "gap-5",
|
|
2565
|
-
lg: "gap-6",
|
|
2566
|
-
xl: "gap-8",
|
|
2567
|
-
"2xl": "gap-12"
|
|
2568
|
-
};
|
|
2569
|
-
var CONTAINER_MAP = {
|
|
2570
|
-
/** `max-w-3xl` — blog posts, legal / policy pages */
|
|
2571
|
-
sm: "max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2572
|
-
/** `max-w-4xl` — narrow content, contact, about */
|
|
2573
|
-
md: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2574
|
-
/** `max-w-5xl` — medium content, checkout, help */
|
|
2575
|
-
lg: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2576
|
-
/** `max-w-6xl` — product detail, cart */
|
|
2577
|
-
xl: "max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2578
|
-
/** `max-w-7xl` — main content grids (default) */
|
|
2579
|
-
"2xl": "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2580
|
-
/** `max-w-screen-2xl` — full-bleed wide content */
|
|
2581
|
-
full: "max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8",
|
|
2582
|
-
/** `max-w-screen-2xl` — wide store/seller layouts (compact px) */
|
|
2583
|
-
wide: "max-w-screen-2xl mx-auto px-4 sm:px-6",
|
|
2584
|
-
/** `max-w-[1920px]` — ultra-wide / 4K displays */
|
|
2585
|
-
ultra: "max-w-[1920px] mx-auto px-4 sm:px-6 lg:px-8"
|
|
2586
|
-
};
|
|
2587
|
-
var GRID_MAP = {
|
|
2588
|
-
/** Single column */
|
|
2589
|
-
1: "grid grid-cols-1",
|
|
2590
|
-
/** 1 → 2 */
|
|
2591
|
-
2: "grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2",
|
|
2592
|
-
/** 1 → 2 → 3 → 4 on widescreen */
|
|
2593
|
-
3: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4",
|
|
2594
|
-
/** 1 → 2 → 3 → 4 → 5 on widescreen */
|
|
2595
|
-
4: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5",
|
|
2596
|
-
/** 1 → 2 → 3 → 4 → 5 */
|
|
2597
|
-
5: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5",
|
|
2598
|
-
/** 2 → 3 → 4 → 5 → 6 */
|
|
2599
|
-
6: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6",
|
|
2600
|
-
/**
|
|
2601
|
-
* Generic card grid — 1 col on portrait mobile → 5 on ultrawide.
|
|
2602
|
-
* Starts at 1 so product cards are readable even on 320 px handsets.
|
|
2603
|
-
*/
|
|
2604
|
-
cards: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5",
|
|
2605
|
-
/** Auto-fill product cards — min 200 px */
|
|
2606
|
-
productCards: "grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-6",
|
|
2607
|
-
/** Auto-fill product cards (compact) — min 220 px */
|
|
2608
|
-
productCardsCompact: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-4",
|
|
2609
|
-
/** Auto-fill store cards — min 220 px */
|
|
2610
|
-
storeCards: "grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-6",
|
|
2611
|
-
/** Auto-fill category tiles — min 130 px */
|
|
2612
|
-
categoryCards: "grid grid-cols-[repeat(auto-fill,minmax(130px,1fr))] gap-4",
|
|
2613
|
-
/** Auto-fill coupon/promo cards — min 264 px */
|
|
2614
|
-
couponCards: "grid grid-cols-[repeat(auto-fill,minmax(264px,1fr))] gap-6",
|
|
2615
|
-
/** Auto-fill address / wide cards — min 300 px */
|
|
2616
|
-
addressCards: "grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-4",
|
|
2617
|
-
/** Auto-fill KPI/stat tiles — min 180 px */
|
|
2618
|
-
statTiles: "grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-4",
|
|
2619
|
-
/** Auto-fill account nav tiles — min 160 px */
|
|
2620
|
-
navTiles: "grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4",
|
|
2621
|
-
/** Equal halves on md+ */
|
|
2622
|
-
halves: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2",
|
|
2623
|
-
/** 2fr / 1fr split on md+ */
|
|
2624
|
-
twoThird: "grid grid-cols-1 md:grid-cols-[2fr_1fr]",
|
|
2625
|
-
/** 1fr / 2fr split on md+ */
|
|
2626
|
-
oneThird: "grid grid-cols-1 md:grid-cols-[1fr_2fr]",
|
|
2627
|
-
/** Fixed 280px left sidebar + 1fr on lg+ */
|
|
2628
|
-
sidebar: "grid grid-cols-1 lg:grid-cols-[280px_1fr]",
|
|
2629
|
-
/** 1fr + fixed 280px right sidebar on lg+ */
|
|
2630
|
-
sidebarRight: "grid grid-cols-1 lg:grid-cols-[1fr_280px]",
|
|
2631
|
-
/** Fixed 320px left sidebar + 1fr on lg+ (admin layout) */
|
|
2632
|
-
sidebarWide: "grid grid-cols-1 lg:grid-cols-[320px_1fr]",
|
|
2633
|
-
/** Product detail triplet: gallery | info | actions sidebar */
|
|
2634
|
-
productDetailTriplet: "grid grid-cols-1 lg:grid-cols-[1fr_1fr_280px] xl:grid-cols-[1fr_1fr_300px] 2xl:grid-cols-[1fr_1fr_320px] gap-6 lg:gap-8",
|
|
2635
|
-
/** CSS auto-fill, min 200px columns */
|
|
2636
|
-
autoSm: "grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))]",
|
|
2637
|
-
/** CSS auto-fill, min 280px columns */
|
|
2638
|
-
autoMd: "grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",
|
|
2639
|
-
/** CSS auto-fill, min 360px columns */
|
|
2640
|
-
autoLg: "grid grid-cols-[repeat(auto-fill,minmax(360px,1fr))]"
|
|
2641
|
-
};
|
|
2642
|
-
var ITEMS_MAP = {
|
|
2643
|
-
start: "items-start",
|
|
2644
|
-
center: "items-center",
|
|
2645
|
-
end: "items-end",
|
|
2646
|
-
stretch: "items-stretch",
|
|
2647
|
-
baseline: "items-baseline"
|
|
2648
|
-
};
|
|
2649
|
-
var JUSTIFY_MAP = {
|
|
2650
|
-
start: "justify-start",
|
|
2651
|
-
center: "justify-center",
|
|
2652
|
-
end: "justify-end",
|
|
2653
|
-
between: "justify-between",
|
|
2654
|
-
around: "justify-around",
|
|
2655
|
-
evenly: "justify-evenly"
|
|
2656
|
-
};
|
|
2657
|
-
function Container(_a) {
|
|
2658
|
-
var _b = _a, {
|
|
2659
|
-
size = "2xl",
|
|
2660
|
-
as,
|
|
2661
|
-
className = "",
|
|
2662
|
-
children
|
|
2663
|
-
} = _b, props = __objRest(_b, [
|
|
2664
|
-
"size",
|
|
2665
|
-
"as",
|
|
2666
|
-
"className",
|
|
2667
|
-
"children"
|
|
2668
|
-
]);
|
|
2669
|
-
const Tag = as != null ? as : "div";
|
|
2670
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2671
|
-
Tag,
|
|
2672
|
-
__spreadProps(__spreadValues({
|
|
2673
|
-
className: [CONTAINER_MAP[size], className].filter(Boolean).join(" ")
|
|
2674
|
-
}, props), {
|
|
2675
|
-
children
|
|
2676
|
-
})
|
|
2677
|
-
);
|
|
2678
|
-
}
|
|
2679
|
-
function Stack(_a) {
|
|
2680
|
-
var _b = _a, {
|
|
2681
|
-
gap = "md",
|
|
2682
|
-
centered = false,
|
|
2683
|
-
align = "stretch",
|
|
2684
|
-
as,
|
|
2685
|
-
className = "",
|
|
2686
|
-
children
|
|
2687
|
-
} = _b, props = __objRest(_b, [
|
|
2688
|
-
"gap",
|
|
2689
|
-
"centered",
|
|
2690
|
-
"align",
|
|
2691
|
-
"as",
|
|
2692
|
-
"className",
|
|
2693
|
-
"children"
|
|
2694
|
-
]);
|
|
2695
|
-
const Tag = as != null ? as : "div";
|
|
2696
|
-
const classes = [
|
|
2697
|
-
"flex flex-col",
|
|
2698
|
-
GAP_MAP[gap],
|
|
2699
|
-
centered ? "items-center justify-center" : "",
|
|
2700
|
-
!centered && align !== "stretch" ? ITEMS_MAP[align] : "",
|
|
2701
|
-
className
|
|
2702
|
-
].filter(Boolean).join(" ");
|
|
2703
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tag, __spreadProps(__spreadValues({ className: classes }, props), { children }));
|
|
2704
|
-
}
|
|
2705
|
-
function Row(_a) {
|
|
2706
|
-
var _b = _a, {
|
|
2707
|
-
gap = "md",
|
|
2708
|
-
centered = false,
|
|
2709
|
-
align = "center",
|
|
2710
|
-
justify = "start",
|
|
2711
|
-
wrap = false,
|
|
2712
|
-
as,
|
|
2713
|
-
className = "",
|
|
2714
|
-
children
|
|
2715
|
-
} = _b, props = __objRest(_b, [
|
|
2716
|
-
"gap",
|
|
2717
|
-
"centered",
|
|
2718
|
-
"align",
|
|
2719
|
-
"justify",
|
|
2720
|
-
"wrap",
|
|
2721
|
-
"as",
|
|
2722
|
-
"className",
|
|
2723
|
-
"children"
|
|
2724
|
-
]);
|
|
2725
|
-
const Tag = as != null ? as : "div";
|
|
2726
|
-
const classes = [
|
|
2727
|
-
"flex flex-row",
|
|
2728
|
-
centered ? "items-center justify-center" : ITEMS_MAP[align],
|
|
2729
|
-
!centered && justify !== "start" ? JUSTIFY_MAP[justify] : "",
|
|
2730
|
-
GAP_MAP[gap],
|
|
2731
|
-
wrap ? "flex-wrap" : "",
|
|
2732
|
-
className
|
|
2733
|
-
].filter(Boolean).join(" ");
|
|
2734
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tag, __spreadProps(__spreadValues({ className: classes }, props), { children }));
|
|
2735
|
-
}
|
|
2736
|
-
function Grid(_a) {
|
|
2737
|
-
var _b = _a, {
|
|
2738
|
-
cols,
|
|
2739
|
-
gap = "md",
|
|
2740
|
-
as,
|
|
2741
|
-
className = "",
|
|
2742
|
-
children
|
|
2743
|
-
} = _b, props = __objRest(_b, [
|
|
2744
|
-
"cols",
|
|
2745
|
-
"gap",
|
|
2746
|
-
"as",
|
|
2747
|
-
"className",
|
|
2748
|
-
"children"
|
|
2749
|
-
]);
|
|
2750
|
-
const Tag = as != null ? as : "div";
|
|
2751
|
-
const baseClass = cols !== void 0 ? GRID_MAP[cols] : "grid";
|
|
2752
|
-
const classes = [baseClass, GAP_MAP[gap], className].filter(Boolean).join(" ");
|
|
2753
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tag, __spreadProps(__spreadValues({ className: classes }, props), { children }));
|
|
2754
|
-
}
|
|
2755
|
-
function formatCurrency(amount, currency) {
|
|
2756
|
-
return new Intl.NumberFormat("en-IN", {
|
|
2757
|
-
style: "currency",
|
|
2758
|
-
currency,
|
|
2759
|
-
maximumFractionDigits: 2
|
|
2760
|
-
}).format(amount);
|
|
2761
|
-
}
|
|
2762
|
-
function formatPercent(value) {
|
|
2763
|
-
return `${Math.round(value * 100)}%`;
|
|
2764
|
-
}
|
|
2765
|
-
function PriceDisplay({
|
|
2766
|
-
amount,
|
|
2767
|
-
currency = "INR",
|
|
2768
|
-
originalAmount,
|
|
2769
|
-
variant = "compact",
|
|
2770
|
-
className
|
|
2771
|
-
}) {
|
|
2772
|
-
const hasDiscount = originalAmount !== void 0 && originalAmount > amount;
|
|
2773
|
-
const discountPct = hasDiscount ? (originalAmount - amount) / originalAmount : 0;
|
|
2774
|
-
const priceClass = variant === "detail" ? "text-xl font-bold text-primary" : "text-base font-bold text-primary";
|
|
2775
|
-
const originalClass = variant === "detail" ? "text-sm text-zinc-400 line-through dark:text-zinc-500" : "text-xs text-zinc-400 line-through dark:text-zinc-500";
|
|
2776
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Row, { wrap: true, align: "baseline", gap: "xs", className, children: [
|
|
2777
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: priceClass, children: formatCurrency(amount, currency) }),
|
|
2778
|
-
hasDiscount && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2779
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: originalClass, children: formatCurrency(originalAmount, currency) }),
|
|
2780
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Span, { className: "rounded bg-emerald-100 px-1 py-0.5 text-xs font-semibold text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400", children: [
|
|
2781
|
-
"-",
|
|
2782
|
-
formatPercent(discountPct)
|
|
2783
|
-
] })
|
|
2784
|
-
] })
|
|
2785
|
-
] });
|
|
2786
|
-
}
|
|
2787
|
-
var columnsClass = {
|
|
2788
|
-
2: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
2789
|
-
3: "grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",
|
|
2790
|
-
4: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4"
|
|
2791
|
-
};
|
|
2792
|
-
function StatsGrid({ stats, columns = 3, className }) {
|
|
2793
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(columnsClass[columns], className), children: stats.map((stat, i) => {
|
|
2794
|
-
var _a;
|
|
2795
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2796
|
-
"div",
|
|
2797
|
-
{
|
|
2798
|
-
className: "rounded-xl border border-zinc-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-900",
|
|
2799
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2800
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2801
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { className: "text-sm font-medium text-zinc-500 dark:text-zinc-400", children: stat.label }),
|
|
2802
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { className: "mt-1 text-3xl font-bold", children: stat.value })
|
|
2803
|
-
] }),
|
|
2804
|
-
stat.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2805
|
-
"div",
|
|
2806
|
-
{
|
|
2807
|
-
className: classNames(
|
|
2808
|
-
(_a = stat.colorClass) != null ? _a : "text-zinc-400 dark:text-zinc-500"
|
|
2809
|
-
),
|
|
2810
|
-
children: stat.icon
|
|
2811
|
-
}
|
|
2812
|
-
)
|
|
2813
|
-
] })
|
|
2814
|
-
},
|
|
2815
|
-
`${stat.label}-${i}`
|
|
2816
|
-
);
|
|
2817
|
-
}) });
|
|
2818
|
-
}
|
|
2819
|
-
function SummaryCard({
|
|
2820
|
-
lines,
|
|
2821
|
-
total,
|
|
2822
|
-
action,
|
|
2823
|
-
className
|
|
2824
|
-
}) {
|
|
2825
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2826
|
-
"div",
|
|
2827
|
-
{
|
|
2828
|
-
className: classNames(
|
|
2829
|
-
"space-y-4 rounded-xl border border-zinc-200 bg-white p-5 dark:border-slate-700 dark:bg-slate-900",
|
|
2830
|
-
className
|
|
2831
|
-
),
|
|
2832
|
-
children: [
|
|
2833
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
|
|
2834
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "text-zinc-500 dark:text-zinc-400", children: line.label }),
|
|
2835
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2836
|
-
Span,
|
|
2837
|
-
{
|
|
2838
|
-
className: line.muted ? "text-zinc-500 dark:text-zinc-400" : "text-zinc-900 dark:text-zinc-100",
|
|
2839
|
-
children: line.value
|
|
2840
|
-
}
|
|
2841
|
-
)
|
|
2842
|
-
] }, i)) }),
|
|
2843
|
-
/* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
|
|
2844
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2845
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "font-bold text-zinc-900 dark:text-zinc-100", children: total.label }),
|
|
2846
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "text-lg font-bold text-primary", children: total.value })
|
|
2847
|
-
] }),
|
|
2848
|
-
action && /* @__PURE__ */ jsxRuntime.jsx("div", { children: action })
|
|
2849
|
-
]
|
|
2850
|
-
}
|
|
2851
|
-
);
|
|
2852
|
-
}
|
|
2853
|
-
function getRemaining(targetDate) {
|
|
2854
|
-
const now = Date.now();
|
|
2855
|
-
const distance = targetDate.getTime() - now;
|
|
2856
|
-
if (distance <= 0) {
|
|
2857
|
-
return null;
|
|
2858
|
-
}
|
|
2859
|
-
const totalSeconds = Math.floor(distance / 1e3);
|
|
2860
|
-
const days = Math.floor(totalSeconds / 86400);
|
|
2861
|
-
const hours = Math.floor(totalSeconds % 86400 / 3600);
|
|
2862
|
-
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
2863
|
-
const seconds = totalSeconds % 60;
|
|
2864
|
-
return { days, hours, minutes, seconds };
|
|
2865
|
-
}
|
|
2866
|
-
function formatLabel(remaining, format) {
|
|
2867
|
-
const { days, hours, minutes, seconds } = remaining;
|
|
2868
|
-
if (format === "hms") {
|
|
2869
|
-
const totalHours = days * 24 + hours;
|
|
2870
|
-
return `${totalHours}h ${minutes}m ${seconds}s`;
|
|
2871
|
-
}
|
|
2872
|
-
if (format === "dhms") {
|
|
2873
|
-
return `${days}d ${hours}h ${minutes}m ${seconds}s`;
|
|
2874
|
-
}
|
|
2875
|
-
if (days > 0) {
|
|
2876
|
-
return `${days}d ${hours}h ${minutes}m`;
|
|
2877
|
-
}
|
|
2878
|
-
if (hours > 0) {
|
|
2879
|
-
return `${hours}h ${minutes}m ${seconds}s`;
|
|
2880
|
-
}
|
|
2881
|
-
return `${minutes}m ${seconds}s`;
|
|
2882
|
-
}
|
|
2883
|
-
function CountdownDisplay({
|
|
2884
|
-
targetDate,
|
|
2885
|
-
format = "auto",
|
|
2886
|
-
expiredLabel = "Ended",
|
|
2887
|
-
className
|
|
2888
|
-
}) {
|
|
2889
|
-
const [tick, setTick] = React.useState(0);
|
|
2890
|
-
React.useEffect(() => {
|
|
2891
|
-
const id = window.setInterval(() => {
|
|
2892
|
-
setTick((value) => value + 1);
|
|
2893
|
-
}, 1e3);
|
|
2894
|
-
return () => {
|
|
2895
|
-
window.clearInterval(id);
|
|
2896
|
-
};
|
|
2897
|
-
}, []);
|
|
2898
|
-
const remaining = React.useMemo(() => getRemaining(targetDate), [targetDate, tick]);
|
|
2899
|
-
const label = remaining ? formatLabel(remaining, format) : expiredLabel;
|
|
2900
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Span, { variant: "inherit", className: classNames("tabular-nums", className), children: label });
|
|
2901
|
-
}
|
|
2902
|
-
function ItemRow({
|
|
2903
|
-
thumbnail,
|
|
2904
|
-
title,
|
|
2905
|
-
subtitle,
|
|
2906
|
-
rightSlot,
|
|
2907
|
-
actions,
|
|
2908
|
-
className
|
|
2909
|
-
}) {
|
|
2910
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Div, { className: classNames("flex items-start gap-4", className), children: [
|
|
2911
|
-
thumbnail && /* @__PURE__ */ jsxRuntime.jsx(Div, { className: "flex-shrink-0", children: thumbnail }),
|
|
2912
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Div, { className: "min-w-0 flex-1", children: [
|
|
2913
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", weight: "medium", className: "line-clamp-2", children: title }),
|
|
2914
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx(Caption, { className: "mt-0.5", children: subtitle }),
|
|
2915
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(Div, { className: "mt-2", children: actions })
|
|
2916
|
-
] }),
|
|
2917
|
-
rightSlot && /* @__PURE__ */ jsxRuntime.jsx(Div, { className: "flex-shrink-0", children: rightSlot })
|
|
2918
|
-
] });
|
|
2919
|
-
}
|
|
2920
|
-
function HorizontalScroller({
|
|
2921
|
-
children,
|
|
2922
|
-
className = "",
|
|
2923
|
-
gap = 16,
|
|
2924
|
-
snapToItems,
|
|
2925
|
-
showArrows,
|
|
2926
|
-
arrowSize = "md",
|
|
2927
|
-
showScrollbar,
|
|
2928
|
-
showFadeEdges,
|
|
2929
|
-
scrollContainerRef: externalRef,
|
|
2930
|
-
onScroll,
|
|
2931
|
-
items,
|
|
2932
|
-
renderItem,
|
|
2933
|
-
keyExtractor,
|
|
2934
|
-
perView,
|
|
2935
|
-
rows = 1,
|
|
2936
|
-
autoScroll,
|
|
2937
|
-
autoScrollInterval = 3500,
|
|
2938
|
-
minItemWidth,
|
|
2939
|
-
itemClassName = ""
|
|
2940
|
-
}) {
|
|
2941
|
-
const internalRef = React.useRef(null);
|
|
2942
|
-
const containerRef = externalRef != null ? externalRef : internalRef;
|
|
2943
|
-
const autoScrollTimer = React.useRef(
|
|
2944
|
-
void 0
|
|
2945
|
-
);
|
|
2946
|
-
const scrollBy = React.useCallback(
|
|
2947
|
-
(direction) => {
|
|
2948
|
-
const el = containerRef.current;
|
|
2949
|
-
if (!el) return;
|
|
2950
|
-
const width = el.clientWidth;
|
|
2951
|
-
el.scrollBy({ left: direction * width * 0.8, behavior: "smooth" });
|
|
2952
|
-
},
|
|
2953
|
-
[containerRef]
|
|
2954
|
-
);
|
|
2955
|
-
React.useEffect(() => {
|
|
2956
|
-
if (!autoScroll) return;
|
|
2957
|
-
autoScrollTimer.current = setInterval(
|
|
2958
|
-
() => scrollBy(1),
|
|
2959
|
-
autoScrollInterval
|
|
2960
|
-
);
|
|
2961
|
-
return () => clearInterval(autoScrollTimer.current);
|
|
2962
|
-
}, [autoScroll, autoScrollInterval, scrollBy]);
|
|
2963
|
-
const itemsMode = items != null && renderItem != null;
|
|
2964
|
-
const arrowCls = {
|
|
2965
|
-
sm: "w-7 h-7 text-sm",
|
|
2966
|
-
md: "w-9 h-9 text-base",
|
|
2967
|
-
lg: "w-11 h-11 text-lg"
|
|
2968
|
-
}[arrowSize];
|
|
2969
|
-
const scrollerCls = [
|
|
2970
|
-
"flex h-full overflow-x-auto scroll-smooth",
|
|
2971
|
-
snapToItems ? "snap-x snap-mandatory" : "",
|
|
2972
|
-
showScrollbar ? "" : "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
2973
|
-
"pb-1"
|
|
2974
|
-
].filter(Boolean).join(" ");
|
|
2975
|
-
const content = itemsMode ? items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2976
|
-
"div",
|
|
2977
|
-
{
|
|
2978
|
-
className: [
|
|
2979
|
-
snapToItems ? "snap-start flex-none" : "flex-none",
|
|
2980
|
-
itemClassName
|
|
2981
|
-
].filter(Boolean).join(" "),
|
|
2982
|
-
style: minItemWidth ? { minWidth: minItemWidth } : void 0,
|
|
2983
|
-
children: renderItem(item, i)
|
|
2984
|
-
},
|
|
2985
|
-
keyExtractor ? keyExtractor(item, i) : i
|
|
2986
|
-
)) : children;
|
|
2987
|
-
if (showArrows) {
|
|
2988
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative ${className}`, children: [
|
|
2989
|
-
showFadeEdges && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2990
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-8 bg-gradient-to-r from-white dark:from-gray-900 to-transparent z-10 pointer-events-none" }),
|
|
2991
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-white dark:from-gray-900 to-transparent z-10 pointer-events-none" })
|
|
2992
|
-
] }),
|
|
2993
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2994
|
-
"button",
|
|
2995
|
-
{
|
|
2996
|
-
type: "button",
|
|
2997
|
-
onClick: () => scrollBy(-1),
|
|
2998
|
-
"aria-label": "Previous",
|
|
2999
|
-
className: `absolute left-0 top-1/2 -translate-y-1/2 z-20 ${arrowCls} rounded-full bg-white/90 dark:bg-gray-800/90 border border-gray-200 dark:border-gray-700 shadow flex items-center justify-center hover:bg-white dark:hover:bg-gray-700 transition-colors`,
|
|
3000
|
-
children: "<"
|
|
3001
|
-
}
|
|
3002
|
-
),
|
|
3003
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3004
|
-
"div",
|
|
3005
|
-
{
|
|
3006
|
-
ref: containerRef,
|
|
3007
|
-
onScroll,
|
|
3008
|
-
className: scrollerCls,
|
|
3009
|
-
style: { gap: `${gap}px`, paddingLeft: 36, paddingRight: 36 },
|
|
3010
|
-
children: content
|
|
3011
|
-
}
|
|
3012
|
-
),
|
|
3013
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3014
|
-
"button",
|
|
3015
|
-
{
|
|
3016
|
-
type: "button",
|
|
3017
|
-
onClick: () => scrollBy(1),
|
|
3018
|
-
"aria-label": "Next",
|
|
3019
|
-
className: `absolute right-0 top-1/2 -translate-y-1/2 z-20 ${arrowCls} rounded-full bg-white/90 dark:bg-gray-800/90 border border-gray-200 dark:border-gray-700 shadow flex items-center justify-center hover:bg-white dark:hover:bg-gray-700 transition-colors`,
|
|
3020
|
-
children: ">"
|
|
3021
|
-
}
|
|
3022
|
-
)
|
|
3023
|
-
] });
|
|
3024
|
-
}
|
|
3025
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative ${className}`, children: [
|
|
3026
|
-
showFadeEdges && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3027
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-8 bg-gradient-to-r from-white dark:from-gray-900 to-transparent z-10 pointer-events-none" }),
|
|
3028
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-white dark:from-gray-900 to-transparent z-10 pointer-events-none" })
|
|
3029
|
-
] }),
|
|
3030
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3031
|
-
"div",
|
|
3032
|
-
{
|
|
3033
|
-
ref: containerRef,
|
|
3034
|
-
onScroll,
|
|
3035
|
-
className: scrollerCls,
|
|
3036
|
-
style: { gap: `${gap}px` },
|
|
3037
|
-
children: content
|
|
3038
|
-
}
|
|
3039
|
-
)
|
|
3040
|
-
] });
|
|
3041
|
-
}
|
|
3042
|
-
function useVisibleItems({
|
|
3043
|
-
total,
|
|
3044
|
-
minItemWidth,
|
|
3045
|
-
arrowWidth = 36,
|
|
3046
|
-
gap = 8
|
|
3047
|
-
}) {
|
|
3048
|
-
const containerRef = React.useRef(null);
|
|
3049
|
-
const [visibleCount, setVisibleCount] = React.useState(total);
|
|
3050
|
-
const [scrollOffset, setScrollOffset] = React.useState(0);
|
|
3051
|
-
React.useEffect(() => {
|
|
3052
|
-
const el = containerRef.current;
|
|
3053
|
-
if (!el) return;
|
|
3054
|
-
const compute = (width) => {
|
|
3055
|
-
const totalItemsWidth = total * minItemWidth + Math.max(0, total - 1) * gap;
|
|
3056
|
-
if (totalItemsWidth <= width) {
|
|
3057
|
-
setVisibleCount(total);
|
|
3058
|
-
return;
|
|
3059
|
-
}
|
|
3060
|
-
const usable = width - 2 * (arrowWidth + gap);
|
|
3061
|
-
const raw = Math.floor((usable + gap) / (minItemWidth + gap));
|
|
3062
|
-
setVisibleCount(Math.max(1, raw));
|
|
3063
|
-
};
|
|
3064
|
-
const ro = new ResizeObserver(([entry]) => {
|
|
3065
|
-
if (entry) compute(entry.contentRect.width);
|
|
3066
|
-
});
|
|
3067
|
-
ro.observe(el);
|
|
3068
|
-
compute(el.getBoundingClientRect().width);
|
|
3069
|
-
return () => ro.disconnect();
|
|
3070
|
-
}, [total, minItemWidth, arrowWidth, gap]);
|
|
3071
|
-
React.useEffect(() => {
|
|
3072
|
-
setScrollOffset((o) => Math.min(o, Math.max(0, total - visibleCount)));
|
|
3073
|
-
}, [visibleCount, total]);
|
|
3074
|
-
const hasOverflow = visibleCount < total;
|
|
3075
|
-
const scrollLeft = React.useCallback(
|
|
3076
|
-
() => setScrollOffset((o) => Math.max(0, o - visibleCount)),
|
|
3077
|
-
[visibleCount]
|
|
3078
|
-
);
|
|
3079
|
-
const scrollRight = React.useCallback(
|
|
3080
|
-
() => setScrollOffset(
|
|
3081
|
-
(o) => Math.min(total - visibleCount, o + visibleCount)
|
|
3082
|
-
),
|
|
3083
|
-
[visibleCount, total]
|
|
3084
|
-
);
|
|
3085
|
-
return {
|
|
3086
|
-
containerRef,
|
|
3087
|
-
visibleCount,
|
|
3088
|
-
hasOverflow,
|
|
3089
|
-
scrollOffset,
|
|
3090
|
-
setScrollOffset,
|
|
3091
|
-
scrollLeft,
|
|
3092
|
-
scrollRight,
|
|
3093
|
-
canScrollLeft: scrollOffset > 0,
|
|
3094
|
-
canScrollRight: scrollOffset + visibleCount < total
|
|
3095
|
-
};
|
|
3096
|
-
}
|
|
3097
|
-
var FLUID_GRID_MIN_WIDTHS = {
|
|
3098
|
-
/** Tab strip items */
|
|
3099
|
-
tabItem: 100};
|
|
3100
|
-
var TEXT = {
|
|
3101
|
-
body: "text-sm sm:text-base leading-relaxed",
|
|
3102
|
-
label: "text-xs font-medium uppercase tracking-wide"};
|
|
3103
|
-
var THEME_CONSTANTS = {
|
|
3104
|
-
text: TEXT};
|
|
3105
|
-
function TabStrip({
|
|
3106
|
-
tabs,
|
|
3107
|
-
activeKey,
|
|
3108
|
-
onChange,
|
|
3109
|
-
minTabWidth = FLUID_GRID_MIN_WIDTHS.tabItem,
|
|
3110
|
-
className
|
|
3111
|
-
}) {
|
|
3112
|
-
const {
|
|
3113
|
-
containerRef,
|
|
3114
|
-
visibleCount,
|
|
3115
|
-
hasOverflow,
|
|
3116
|
-
scrollLeft,
|
|
3117
|
-
scrollRight,
|
|
3118
|
-
setScrollOffset,
|
|
3119
|
-
scrollOffset,
|
|
3120
|
-
canScrollLeft,
|
|
3121
|
-
canScrollRight
|
|
3122
|
-
} = useVisibleItems({
|
|
3123
|
-
total: tabs.length,
|
|
3124
|
-
minItemWidth: minTabWidth,
|
|
3125
|
-
gap: 0
|
|
3126
|
-
});
|
|
3127
|
-
React.useEffect(() => {
|
|
3128
|
-
const idx = tabs.findIndex((t) => t.key === activeKey);
|
|
3129
|
-
if (idx < 0) return;
|
|
3130
|
-
if (idx < scrollOffset) {
|
|
3131
|
-
setScrollOffset(idx);
|
|
3132
|
-
} else if (idx >= scrollOffset + visibleCount) {
|
|
3133
|
-
setScrollOffset(idx - visibleCount + 1);
|
|
3134
|
-
}
|
|
3135
|
-
}, [activeKey, scrollOffset, visibleCount, tabs, setScrollOffset]);
|
|
3136
|
-
const visible = tabs.slice(scrollOffset, scrollOffset + visibleCount);
|
|
3137
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3138
|
-
"div",
|
|
3139
|
-
{
|
|
3140
|
-
ref: containerRef,
|
|
3141
|
-
role: "tablist",
|
|
3142
|
-
className: [
|
|
3143
|
-
"flex items-end border-b border-zinc-200 dark:border-zinc-700",
|
|
3144
|
-
className != null ? className : ""
|
|
3145
|
-
].join(" ").trim(),
|
|
3146
|
-
children: [
|
|
3147
|
-
hasOverflow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3148
|
-
"button",
|
|
3149
|
-
{
|
|
3150
|
-
type: "button",
|
|
3151
|
-
onClick: scrollLeft,
|
|
3152
|
-
disabled: !canScrollLeft,
|
|
3153
|
-
"aria-label": "Previous tabs",
|
|
3154
|
-
className: "flex-none h-12 w-9 flex items-center justify-center text-zinc-500 disabled:opacity-30 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",
|
|
3155
|
-
children: "\u2039"
|
|
3156
|
-
}
|
|
3157
|
-
),
|
|
3158
|
-
visible.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3159
|
-
"button",
|
|
3160
|
-
{
|
|
3161
|
-
type: "button",
|
|
3162
|
-
role: "tab",
|
|
3163
|
-
"aria-selected": tab.key === activeKey,
|
|
3164
|
-
"aria-disabled": tab.disabled,
|
|
3165
|
-
onClick: () => !tab.disabled && onChange(tab.key),
|
|
3166
|
-
style: { minWidth: `${minTabWidth}px` },
|
|
3167
|
-
className: [
|
|
3168
|
-
"flex-1 h-12 px-4 text-sm font-medium whitespace-nowrap border-b-2 transition-colors",
|
|
3169
|
-
tab.key === activeKey ? "border-primary-500 text-primary-600 dark:text-primary-400" : "border-transparent text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100",
|
|
3170
|
-
tab.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
|
|
3171
|
-
].join(" ").trim(),
|
|
3172
|
-
children: [
|
|
3173
|
-
tab.label,
|
|
3174
|
-
tab.badge != null && tab.badge > 0 && /* @__PURE__ */ jsxRuntime.jsx(Span, { className: "ml-1.5 inline-flex items-center justify-center h-4 min-w-[1rem] px-1 rounded-full text-[10px] bg-primary-100 dark:bg-primary-900/40 text-primary-600 dark:text-primary-400", children: tab.badge > 99 ? "99+" : tab.badge })
|
|
3175
|
-
]
|
|
3176
|
-
},
|
|
3177
|
-
tab.key
|
|
3178
|
-
)),
|
|
3179
|
-
hasOverflow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3180
|
-
"button",
|
|
3181
|
-
{
|
|
3182
|
-
type: "button",
|
|
3183
|
-
onClick: scrollRight,
|
|
3184
|
-
disabled: !canScrollRight,
|
|
3185
|
-
"aria-label": "Next tabs",
|
|
3186
|
-
className: "flex-none h-12 w-9 flex items-center justify-center text-zinc-500 disabled:opacity-30 hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors",
|
|
3187
|
-
children: "\u203A"
|
|
3188
|
-
}
|
|
3189
|
-
)
|
|
3190
|
-
]
|
|
3191
|
-
}
|
|
3192
|
-
);
|
|
3193
|
-
}
|
|
3194
|
-
function FormGrid({
|
|
3195
|
-
children,
|
|
3196
|
-
minFieldWidth = 280,
|
|
3197
|
-
gap = 16,
|
|
3198
|
-
className
|
|
3199
|
-
}) {
|
|
3200
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3201
|
-
"div",
|
|
3202
|
-
{
|
|
3203
|
-
className: `flex flex-wrap ${className != null ? className : ""}`,
|
|
3204
|
-
style: { gap: `${gap}px` },
|
|
3205
|
-
children
|
|
3206
|
-
}
|
|
3207
|
-
);
|
|
3208
|
-
}
|
|
3209
|
-
function FormField({
|
|
3210
|
-
children,
|
|
3211
|
-
span = "auto",
|
|
3212
|
-
className
|
|
3213
|
-
}) {
|
|
3214
|
-
const spanClass = span === "full" ? "w-full" : span === "half" ? "w-1/2 min-w-[280px]" : "flex-1 min-w-[280px]";
|
|
3215
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${spanClass} flex flex-col gap-1.5 ${className != null ? className : ""}`, children });
|
|
3216
|
-
}
|
|
3217
|
-
function DescriptionField({
|
|
3218
|
-
label,
|
|
3219
|
-
value,
|
|
3220
|
-
fullWidth,
|
|
3221
|
-
className
|
|
3222
|
-
}) {
|
|
3223
|
-
const isLong = fullWidth != null ? fullWidth : value.length > 80;
|
|
3224
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3225
|
-
"div",
|
|
3226
|
-
{
|
|
3227
|
-
className: [
|
|
3228
|
-
"flex flex-col gap-1",
|
|
3229
|
-
isLong ? "w-full" : "flex-1 min-w-[280px]",
|
|
3230
|
-
className != null ? className : ""
|
|
3231
|
-
].join(" ").trim(),
|
|
3232
|
-
children: [
|
|
3233
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: THEME_CONSTANTS.text.label, children: label }),
|
|
3234
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3235
|
-
"dd",
|
|
3236
|
-
{
|
|
3237
|
-
className: isLong ? THEME_CONSTANTS.text.body : THEME_CONSTANTS.text.body,
|
|
3238
|
-
children: value
|
|
3239
|
-
}
|
|
3240
|
-
)
|
|
3241
|
-
]
|
|
3242
|
-
}
|
|
3243
|
-
);
|
|
3244
|
-
}
|
|
3245
|
-
function ActiveFilterChips({
|
|
3246
|
-
filters,
|
|
3247
|
-
onRemove,
|
|
3248
|
-
onClearAll,
|
|
3249
|
-
className = "",
|
|
3250
|
-
clearAllLabel = "Clear all"
|
|
3251
|
-
}) {
|
|
3252
|
-
if (filters.length === 0) return null;
|
|
3253
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3254
|
-
Row,
|
|
3255
|
-
{
|
|
3256
|
-
wrap: true,
|
|
3257
|
-
gap: "sm",
|
|
3258
|
-
className,
|
|
3259
|
-
role: "list",
|
|
3260
|
-
"aria-label": "Active filters",
|
|
3261
|
-
children: [
|
|
3262
|
-
filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3263
|
-
"span",
|
|
3264
|
-
{
|
|
3265
|
-
role: "listitem",
|
|
3266
|
-
className: "inline-flex items-center gap-1 text-xs font-medium rounded-lg border border-zinc-200 dark:border-slate-700 bg-zinc-50 dark:bg-slate-800 text-zinc-800 dark:text-zinc-200 py-1 pl-2 pr-1",
|
|
3267
|
-
children: [
|
|
3268
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Span, { className: "text-zinc-500 dark:text-zinc-400 mr-0.5", children: [
|
|
3269
|
-
filter.label,
|
|
3270
|
-
":"
|
|
3271
|
-
] }),
|
|
3272
|
-
filter.value,
|
|
3273
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3274
|
-
"button",
|
|
3275
|
-
{
|
|
3276
|
-
type: "button",
|
|
3277
|
-
onClick: () => onRemove(filter.key),
|
|
3278
|
-
"aria-label": `Remove ${filter.label}: ${filter.value} filter`,
|
|
3279
|
-
className: "ml-1 inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-zinc-300 dark:hover:bg-zinc-600 transition-colors",
|
|
3280
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3281
|
-
"svg",
|
|
3282
|
-
{
|
|
3283
|
-
className: "w-2.5 h-2.5",
|
|
3284
|
-
fill: "none",
|
|
3285
|
-
viewBox: "0 0 24 24",
|
|
3286
|
-
stroke: "currentColor",
|
|
3287
|
-
strokeWidth: 3,
|
|
3288
|
-
"aria-hidden": "true",
|
|
3289
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3290
|
-
"path",
|
|
3291
|
-
{
|
|
3292
|
-
strokeLinecap: "round",
|
|
3293
|
-
strokeLinejoin: "round",
|
|
3294
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
3295
|
-
}
|
|
3296
|
-
)
|
|
3297
|
-
}
|
|
3298
|
-
)
|
|
3299
|
-
}
|
|
3300
|
-
)
|
|
3301
|
-
]
|
|
3302
|
-
},
|
|
3303
|
-
filter.key
|
|
3304
|
-
)),
|
|
3305
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3306
|
-
"button",
|
|
3307
|
-
{
|
|
3308
|
-
type: "button",
|
|
3309
|
-
onClick: onClearAll,
|
|
3310
|
-
className: "text-xs font-medium text-primary hover:underline p-2",
|
|
3311
|
-
children: clearAllLabel
|
|
3312
|
-
}
|
|
3313
|
-
)
|
|
3314
|
-
]
|
|
3315
|
-
}
|
|
3316
|
-
);
|
|
3317
|
-
}
|
|
3318
|
-
function SortDropdown({
|
|
3319
|
-
value,
|
|
3320
|
-
onChange,
|
|
3321
|
-
options,
|
|
3322
|
-
label,
|
|
3323
|
-
className = ""
|
|
3324
|
-
}) {
|
|
3325
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Row, { gap: "sm", className, children: [
|
|
3326
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(Span, { variant: "secondary", size: "sm", className: "whitespace-nowrap", children: label }),
|
|
3327
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3328
|
-
Select,
|
|
3329
|
-
{
|
|
3330
|
-
value: value != null ? value : "",
|
|
3331
|
-
onChange,
|
|
3332
|
-
options,
|
|
3333
|
-
className: "h-9 min-h-9"
|
|
3334
|
-
}
|
|
3335
|
-
)
|
|
3336
|
-
] });
|
|
3337
|
-
}
|
|
3338
|
-
var DEFAULT_PAGE_SIZE_OPTIONS = [10, 25, 50, 100];
|
|
3339
|
-
function TablePagination({
|
|
3340
|
-
currentPage,
|
|
3341
|
-
totalPages,
|
|
3342
|
-
pageSize,
|
|
3343
|
-
total,
|
|
3344
|
-
onPageChange,
|
|
3345
|
-
onPageSizeChange,
|
|
3346
|
-
pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,
|
|
3347
|
-
isLoading = false,
|
|
3348
|
-
className = "",
|
|
3349
|
-
compact = false,
|
|
3350
|
-
labels
|
|
3351
|
-
}) {
|
|
3352
|
-
var _a, _b, _c, _d, _e;
|
|
3353
|
-
const l = {
|
|
3354
|
-
paginationLabel: (_a = labels == null ? void 0 : labels.paginationLabel) != null ? _a : "Pagination",
|
|
3355
|
-
showing: (_b = labels == null ? void 0 : labels.showing) != null ? _b : "Showing",
|
|
3356
|
-
of: (_c = labels == null ? void 0 : labels.of) != null ? _c : "of",
|
|
3357
|
-
results: (_d = labels == null ? void 0 : labels.results) != null ? _d : "results",
|
|
3358
|
-
perPage: (_e = labels == null ? void 0 : labels.perPage) != null ? _e : "Per page"
|
|
3359
|
-
};
|
|
3360
|
-
if (compact) {
|
|
3361
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3362
|
-
"div",
|
|
3363
|
-
{
|
|
3364
|
-
role: "navigation",
|
|
3365
|
-
"aria-label": l.paginationLabel,
|
|
3366
|
-
className: `flex items-center gap-0.5 ${className}`,
|
|
3367
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3368
|
-
Pagination,
|
|
3369
|
-
{
|
|
3370
|
-
currentPage,
|
|
3371
|
-
totalPages,
|
|
3372
|
-
onPageChange,
|
|
3373
|
-
disabled: isLoading,
|
|
3374
|
-
size: "sm",
|
|
3375
|
-
maxVisible: 5
|
|
3376
|
-
}
|
|
3377
|
-
)
|
|
3378
|
-
}
|
|
3379
|
-
);
|
|
3380
|
-
}
|
|
3381
|
-
const from = total === 0 ? 0 : (currentPage - 1) * pageSize + 1;
|
|
3382
|
-
const to = Math.min(currentPage * pageSize, total);
|
|
3383
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3384
|
-
"div",
|
|
3385
|
-
{
|
|
3386
|
-
role: "navigation",
|
|
3387
|
-
"aria-label": l.paginationLabel,
|
|
3388
|
-
className: [
|
|
3389
|
-
"flex flex-col sm:flex-row items-center gap-3 px-4 py-3",
|
|
3390
|
-
"border-t border-zinc-100 dark:border-slate-800/80",
|
|
3391
|
-
className
|
|
3392
|
-
].join(" "),
|
|
3393
|
-
children: [
|
|
3394
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3395
|
-
Text,
|
|
3396
|
-
{
|
|
3397
|
-
size: "xs",
|
|
3398
|
-
variant: "none",
|
|
3399
|
-
className: "text-zinc-400 dark:text-slate-500 tabular-nums sm:mr-auto",
|
|
3400
|
-
children: [
|
|
3401
|
-
l.showing,
|
|
3402
|
-
" ",
|
|
3403
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Span, { className: "font-semibold text-zinc-600 dark:text-slate-300", children: [
|
|
3404
|
-
from,
|
|
3405
|
-
"\u2013",
|
|
3406
|
-
to
|
|
3407
|
-
] }),
|
|
3408
|
-
" ",
|
|
3409
|
-
l.of,
|
|
3410
|
-
" ",
|
|
3411
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "font-semibold text-zinc-600 dark:text-slate-300", children: new Intl.NumberFormat().format(total) }),
|
|
3412
|
-
" ",
|
|
3413
|
-
l.results
|
|
3414
|
-
]
|
|
3415
|
-
}
|
|
3416
|
-
),
|
|
3417
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl p-0.5 bg-zinc-100 dark:bg-slate-800 inline-flex", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3418
|
-
Pagination,
|
|
3419
|
-
{
|
|
3420
|
-
currentPage,
|
|
3421
|
-
totalPages,
|
|
3422
|
-
onPageChange,
|
|
3423
|
-
disabled: isLoading
|
|
3424
|
-
}
|
|
3425
|
-
) }),
|
|
3426
|
-
onPageSizeChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 sm:ml-1", children: [
|
|
3427
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3428
|
-
"label",
|
|
3429
|
-
{
|
|
3430
|
-
htmlFor: "page-size-select",
|
|
3431
|
-
className: "text-xs text-zinc-400 dark:text-slate-500 whitespace-nowrap",
|
|
3432
|
-
children: l.perPage
|
|
3433
|
-
}
|
|
3434
|
-
),
|
|
3435
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3436
|
-
Select,
|
|
3437
|
-
{
|
|
3438
|
-
id: "page-size-select",
|
|
3439
|
-
value: String(pageSize),
|
|
3440
|
-
onChange: (value) => onPageSizeChange(Number(value)),
|
|
3441
|
-
disabled: isLoading,
|
|
3442
|
-
"aria-label": l.perPage,
|
|
3443
|
-
className: "text-xs h-7 py-0 px-2 rounded-lg",
|
|
3444
|
-
options: pageSizeOptions.map((s) => ({
|
|
3445
|
-
value: String(s),
|
|
3446
|
-
label: String(s)
|
|
3447
|
-
}))
|
|
3448
|
-
}
|
|
3449
|
-
)
|
|
3450
|
-
] })
|
|
3451
|
-
]
|
|
3452
|
-
}
|
|
3453
|
-
);
|
|
3454
|
-
}
|
|
3455
|
-
function DataTable({
|
|
3456
|
-
data,
|
|
3457
|
-
columns,
|
|
3458
|
-
keyExtractor: keyExtractorProp,
|
|
3459
|
-
onRowClick,
|
|
3460
|
-
loading = false,
|
|
3461
|
-
emptyMessage,
|
|
3462
|
-
actions,
|
|
3463
|
-
mobileCardRender,
|
|
3464
|
-
emptyState,
|
|
3465
|
-
emptyIcon,
|
|
3466
|
-
emptyTitle,
|
|
3467
|
-
tableConfig,
|
|
3468
|
-
paginationConfig,
|
|
3469
|
-
externalPagination = false,
|
|
3470
|
-
// Explicit flat props — override tableConfig when provided
|
|
3471
|
-
pageSize: pageSizeProp,
|
|
3472
|
-
stickyHeader: stickyHeaderProp,
|
|
3473
|
-
striped: stripedProp,
|
|
3474
|
-
showViewToggle: showViewToggleProp,
|
|
3475
|
-
showTableView = true,
|
|
3476
|
-
viewMode: controlledViewMode,
|
|
3477
|
-
defaultViewMode: defaultViewModeProp,
|
|
3478
|
-
onViewModeChange,
|
|
3479
|
-
selectable: selectableProp,
|
|
3480
|
-
selectedIds = [],
|
|
3481
|
-
onSelectionChange,
|
|
3482
|
-
gridCols = "cards",
|
|
3483
|
-
labels = {}
|
|
3484
|
-
}) {
|
|
3485
|
-
const resolvedTable = mergeTableConfig(tableConfig);
|
|
3486
|
-
const resolvedPag = __spreadValues(__spreadValues(__spreadValues({}, DEFAULT_PAGINATION_CONFIG), tableConfig == null ? void 0 : tableConfig.pagination), paginationConfig);
|
|
3487
|
-
const keyExtractor = keyExtractorProp != null ? keyExtractorProp : ((item) => {
|
|
3488
|
-
var _a;
|
|
3489
|
-
return (_a = item.id) != null ? _a : JSON.stringify(item);
|
|
3490
|
-
});
|
|
3491
|
-
const pageSize = pageSizeProp != null ? pageSizeProp : resolvedTable.pageSize;
|
|
3492
|
-
const stickyHeader = stickyHeaderProp != null ? stickyHeaderProp : resolvedTable.sticky.enabled;
|
|
3493
|
-
const striped = stripedProp != null ? stripedProp : resolvedTable.striped;
|
|
3494
|
-
const showViewToggle = showViewToggleProp != null ? showViewToggleProp : resolvedTable.showViewToggle;
|
|
3495
|
-
const selectable = selectableProp != null ? selectableProp : resolvedTable.selectable;
|
|
3496
|
-
const defaultViewMode = defaultViewModeProp != null ? defaultViewModeProp : resolvedTable.defaultViewMode;
|
|
3497
|
-
const [sortKey, setSortKey] = React.useState(null);
|
|
3498
|
-
const [sortDirection, setSortDirection] = React.useState(null);
|
|
3499
|
-
const [currentPage, setCurrentPage] = React.useState(1);
|
|
3500
|
-
const [internalViewMode, setInternalViewMode] = React.useState(defaultViewMode);
|
|
3501
|
-
const activeViewMode = controlledViewMode != null ? controlledViewMode : internalViewMode;
|
|
3502
|
-
const {
|
|
3503
|
-
loading: labelLoading = "Loading\u2026",
|
|
3504
|
-
noDataTitle = "No data found",
|
|
3505
|
-
noDataDescription = "There are no items to display.",
|
|
3506
|
-
actions: labelActions = "Actions",
|
|
3507
|
-
tableView = "Table view",
|
|
3508
|
-
gridView = "Grid view",
|
|
3509
|
-
listView = "List view"
|
|
3510
|
-
} = labels;
|
|
3511
|
-
const handleViewModeChange = (mode) => {
|
|
3512
|
-
if (controlledViewMode === void 0) setInternalViewMode(mode);
|
|
3513
|
-
onViewModeChange == null ? void 0 : onViewModeChange(mode);
|
|
3514
|
-
};
|
|
3515
|
-
const handleSort = (key) => {
|
|
3516
|
-
const col = columns.find((c) => c.key === key);
|
|
3517
|
-
if (!(col == null ? void 0 : col.sortable)) return;
|
|
3518
|
-
if (sortKey === key) {
|
|
3519
|
-
if (sortDirection === "asc") setSortDirection("desc");
|
|
3520
|
-
else {
|
|
3521
|
-
setSortKey(null);
|
|
3522
|
-
setSortDirection(null);
|
|
3523
|
-
}
|
|
3524
|
-
} else {
|
|
3525
|
-
setSortKey(key);
|
|
3526
|
-
setSortDirection("asc");
|
|
3527
|
-
}
|
|
3528
|
-
};
|
|
3529
|
-
const sortedData = React.useMemo(() => {
|
|
3530
|
-
const sorted = [...data];
|
|
3531
|
-
if (sortKey && sortDirection) {
|
|
3532
|
-
sorted.sort((a, b) => {
|
|
3533
|
-
const aVal = a[sortKey];
|
|
3534
|
-
const bVal = b[sortKey];
|
|
3535
|
-
if (aVal == null) return 1;
|
|
3536
|
-
if (bVal == null) return -1;
|
|
3537
|
-
if (typeof aVal === "string" && typeof bVal === "string") {
|
|
3538
|
-
return sortDirection === "asc" ? aVal.localeCompare(bVal) : bVal.localeCompare(aVal);
|
|
3539
|
-
}
|
|
3540
|
-
if (aVal < bVal) return sortDirection === "asc" ? -1 : 1;
|
|
3541
|
-
if (aVal > bVal) return sortDirection === "asc" ? 1 : -1;
|
|
3542
|
-
return 0;
|
|
3543
|
-
});
|
|
3544
|
-
}
|
|
3545
|
-
return sorted;
|
|
3546
|
-
}, [data, sortKey, sortDirection]);
|
|
3547
|
-
const paginatedData = React.useMemo(() => {
|
|
3548
|
-
if (externalPagination) return sortedData;
|
|
3549
|
-
const start = (currentPage - 1) * pageSize;
|
|
3550
|
-
return sortedData.slice(start, start + pageSize);
|
|
3551
|
-
}, [sortedData, currentPage, externalPagination, pageSize]);
|
|
3552
|
-
const totalPages = Math.ceil(sortedData.length / pageSize);
|
|
3553
|
-
if (loading) {
|
|
3554
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-zinc-200 dark:border-slate-700 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "lg", label: labelLoading }) }) });
|
|
3555
|
-
}
|
|
3556
|
-
if (data.length === 0) {
|
|
3557
|
-
if (emptyState) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: emptyState });
|
|
3558
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-zinc-200 dark:border-slate-700 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center px-4", children: [
|
|
3559
|
-
emptyIcon != null ? emptyIcon : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3560
|
-
"svg",
|
|
3561
|
-
{
|
|
3562
|
-
className: "mx-auto h-12 w-12 text-zinc-400",
|
|
3563
|
-
fill: "none",
|
|
3564
|
-
viewBox: "0 0 24 24",
|
|
3565
|
-
stroke: "currentColor",
|
|
3566
|
-
"aria-hidden": "true",
|
|
3567
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3568
|
-
"path",
|
|
3569
|
-
{
|
|
3570
|
-
strokeLinecap: "round",
|
|
3571
|
-
strokeLinejoin: "round",
|
|
3572
|
-
strokeWidth: 1.5,
|
|
3573
|
-
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"
|
|
3574
|
-
}
|
|
3575
|
-
)
|
|
3576
|
-
}
|
|
3577
|
-
),
|
|
3578
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", weight: "semibold", className: "mt-4", children: emptyTitle != null ? emptyTitle : noDataTitle }),
|
|
3579
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: "sm", variant: "secondary", className: "mt-1", children: emptyMessage != null ? emptyMessage : noDataDescription })
|
|
3580
|
-
] }) }) });
|
|
3581
|
-
}
|
|
3582
|
-
const renderViewToggle = () => {
|
|
3583
|
-
if (!showViewToggle) return null;
|
|
3584
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3585
|
-
"div",
|
|
3586
|
-
{
|
|
3587
|
-
className: "flex justify-end gap-1",
|
|
3588
|
-
role: "toolbar",
|
|
3589
|
-
"aria-label": "View mode",
|
|
3590
|
-
children: [
|
|
3591
|
-
showTableView && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3592
|
-
Button,
|
|
3593
|
-
{
|
|
3594
|
-
type: "button",
|
|
3595
|
-
variant: "ghost",
|
|
3596
|
-
size: "sm",
|
|
3597
|
-
onClick: () => handleViewModeChange("table"),
|
|
3598
|
-
"aria-label": tableView,
|
|
3599
|
-
"aria-pressed": activeViewMode === "table",
|
|
3600
|
-
className: `hidden sm:flex items-center justify-center p-2 rounded-lg ring-1 transition-colors ${activeViewMode === "table" ? "bg-primary/5 text-primary dark:bg-primary/10 ring-primary/30" : "text-zinc-500 dark:text-zinc-400 ring-zinc-200 dark:ring-slate-700 hover:bg-zinc-100 dark:hover:bg-slate-800"}`,
|
|
3601
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3602
|
-
"svg",
|
|
3603
|
-
{
|
|
3604
|
-
className: "w-4 h-4",
|
|
3605
|
-
fill: "none",
|
|
3606
|
-
viewBox: "0 0 24 24",
|
|
3607
|
-
stroke: "currentColor",
|
|
3608
|
-
strokeWidth: 1.5,
|
|
3609
|
-
"aria-hidden": "true",
|
|
3610
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3611
|
-
"path",
|
|
3612
|
-
{
|
|
3613
|
-
strokeLinecap: "round",
|
|
3614
|
-
strokeLinejoin: "round",
|
|
3615
|
-
d: "M3 10h18M3 6h18M3 14h18M3 18h18"
|
|
3616
|
-
}
|
|
3617
|
-
)
|
|
3618
|
-
}
|
|
3619
|
-
)
|
|
3620
|
-
}
|
|
3621
|
-
),
|
|
3622
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3623
|
-
Button,
|
|
3624
|
-
{
|
|
3625
|
-
type: "button",
|
|
3626
|
-
variant: "ghost",
|
|
3627
|
-
size: "sm",
|
|
3628
|
-
onClick: () => handleViewModeChange("grid"),
|
|
3629
|
-
"aria-label": gridView,
|
|
3630
|
-
"aria-pressed": activeViewMode === "grid",
|
|
3631
|
-
className: `flex items-center justify-center p-2 rounded-lg ring-1 transition-colors ${activeViewMode === "grid" ? "bg-primary/5 text-primary dark:bg-primary/10 ring-primary/30" : "text-zinc-500 dark:text-zinc-400 ring-zinc-200 dark:ring-slate-700 hover:bg-zinc-100 dark:hover:bg-slate-800"}`,
|
|
3632
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3633
|
-
"svg",
|
|
3634
|
-
{
|
|
3635
|
-
className: "w-4 h-4",
|
|
3636
|
-
fill: "none",
|
|
3637
|
-
viewBox: "0 0 24 24",
|
|
3638
|
-
stroke: "currentColor",
|
|
3639
|
-
strokeWidth: 1.5,
|
|
3640
|
-
"aria-hidden": "true",
|
|
3641
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3642
|
-
"path",
|
|
3643
|
-
{
|
|
3644
|
-
strokeLinecap: "round",
|
|
3645
|
-
strokeLinejoin: "round",
|
|
3646
|
-
d: "M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"
|
|
3647
|
-
}
|
|
3648
|
-
)
|
|
3649
|
-
}
|
|
3650
|
-
)
|
|
3651
|
-
}
|
|
3652
|
-
),
|
|
3653
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3654
|
-
Button,
|
|
3655
|
-
{
|
|
3656
|
-
type: "button",
|
|
3657
|
-
variant: "ghost",
|
|
3658
|
-
size: "sm",
|
|
3659
|
-
onClick: () => handleViewModeChange("list"),
|
|
3660
|
-
"aria-label": listView,
|
|
3661
|
-
"aria-pressed": activeViewMode === "list",
|
|
3662
|
-
className: `flex items-center justify-center p-2 rounded-lg ring-1 transition-colors ${activeViewMode === "list" ? "bg-primary/5 text-primary dark:bg-primary/10 ring-primary/30" : "text-zinc-500 dark:text-zinc-400 ring-zinc-200 dark:ring-slate-700 hover:bg-zinc-100 dark:hover:bg-slate-800"}`,
|
|
3663
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3664
|
-
"svg",
|
|
3665
|
-
{
|
|
3666
|
-
className: "w-4 h-4",
|
|
3667
|
-
fill: "none",
|
|
3668
|
-
viewBox: "0 0 24 24",
|
|
3669
|
-
stroke: "currentColor",
|
|
3670
|
-
strokeWidth: 1.5,
|
|
3671
|
-
"aria-hidden": "true",
|
|
3672
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3673
|
-
"path",
|
|
3674
|
-
{
|
|
3675
|
-
strokeLinecap: "round",
|
|
3676
|
-
strokeLinejoin: "round",
|
|
3677
|
-
d: "M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.007v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.007v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"
|
|
3678
|
-
}
|
|
3679
|
-
)
|
|
3680
|
-
}
|
|
3681
|
-
)
|
|
3682
|
-
}
|
|
3683
|
-
)
|
|
3684
|
-
]
|
|
3685
|
-
}
|
|
3686
|
-
);
|
|
3687
|
-
};
|
|
3688
|
-
const renderCardGrid = (mode) => {
|
|
3689
|
-
if (!mobileCardRender) return null;
|
|
3690
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3691
|
-
"div",
|
|
3692
|
-
{
|
|
3693
|
-
className: mode === "grid" ? `${GRID_MAP[gridCols]} gap-6` : "flex flex-col gap-4",
|
|
3694
|
-
children: paginatedData.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3695
|
-
SelectableCard,
|
|
3696
|
-
{
|
|
3697
|
-
id: keyExtractor(item),
|
|
3698
|
-
selectable,
|
|
3699
|
-
selected: selectedIds.includes(keyExtractor(item)),
|
|
3700
|
-
listMode: mode === "list",
|
|
3701
|
-
onToggle: (id, checked) => onSelectionChange == null ? void 0 : onSelectionChange(
|
|
3702
|
-
checked ? [...selectedIds, id] : selectedIds.filter((s) => s !== id)
|
|
3703
|
-
),
|
|
3704
|
-
children: mobileCardRender(item)
|
|
3705
|
-
},
|
|
3706
|
-
keyExtractor(item)
|
|
3707
|
-
))
|
|
3708
|
-
}
|
|
3709
|
-
);
|
|
3710
|
-
};
|
|
3711
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3712
|
-
renderViewToggle(),
|
|
3713
|
-
activeViewMode !== "table" && mobileCardRender && renderCardGrid(activeViewMode),
|
|
3714
|
-
activeViewMode === "table" && mobileCardRender && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:hidden space-y-6", children: paginatedData.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3715
|
-
SelectableCard,
|
|
3716
|
-
{
|
|
3717
|
-
id: keyExtractor(item),
|
|
3718
|
-
selectable,
|
|
3719
|
-
selected: selectedIds.includes(keyExtractor(item)),
|
|
3720
|
-
onToggle: (id, checked) => onSelectionChange == null ? void 0 : onSelectionChange(
|
|
3721
|
-
checked ? [...selectedIds, id] : selectedIds.filter((s) => s !== id)
|
|
3722
|
-
),
|
|
3723
|
-
children: mobileCardRender(item)
|
|
3724
|
-
},
|
|
3725
|
-
keyExtractor(item)
|
|
3726
|
-
)) }),
|
|
3727
|
-
activeViewMode === "table" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-zinc-200 dark:border-slate-700 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3728
|
-
"div",
|
|
3729
|
-
{
|
|
3730
|
-
className: `overflow-x-auto ${stickyHeader ? "max-h-[600px] overflow-y-auto" : ""}`,
|
|
3731
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-zinc-200 dark:divide-slate-700", children: [
|
|
3732
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3733
|
-
"thead",
|
|
3734
|
-
{
|
|
3735
|
-
className: `bg-zinc-50 dark:bg-slate-800 ${stickyHeader ? "sticky top-0 z-10" : ""}`,
|
|
3736
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3737
|
-
selectable && /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-4 py-3 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3738
|
-
"input",
|
|
3739
|
-
{
|
|
3740
|
-
type: "checkbox",
|
|
3741
|
-
className: "rounded border-zinc-300",
|
|
3742
|
-
"aria-label": "Select all on page",
|
|
3743
|
-
checked: paginatedData.length > 0 && paginatedData.every(
|
|
3744
|
-
(item) => selectedIds.includes(keyExtractor(item))
|
|
3745
|
-
),
|
|
3746
|
-
onChange: (e) => {
|
|
3747
|
-
const pageIds = paginatedData.map(keyExtractor);
|
|
3748
|
-
onSelectionChange == null ? void 0 : onSelectionChange(
|
|
3749
|
-
e.target.checked ? [.../* @__PURE__ */ new Set([...selectedIds, ...pageIds])] : selectedIds.filter(
|
|
3750
|
-
(id) => !pageIds.includes(id)
|
|
3751
|
-
)
|
|
3752
|
-
);
|
|
3753
|
-
}
|
|
3754
|
-
}
|
|
3755
|
-
) }),
|
|
3756
|
-
columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3757
|
-
"th",
|
|
3758
|
-
{
|
|
3759
|
-
scope: "col",
|
|
3760
|
-
"aria-sort": col.sortable ? sortKey === col.key ? sortDirection === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
3761
|
-
className: `px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider ${col.sortable ? "cursor-pointer select-none hover:bg-zinc-100 dark:hover:bg-slate-700" : ""}`,
|
|
3762
|
-
style: { width: col.width },
|
|
3763
|
-
onClick: () => col.sortable && handleSort(col.key),
|
|
3764
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3765
|
-
col.header,
|
|
3766
|
-
col.sortable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? sortDirection === "asc" ? "\u2191" : "\u2193" : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-30", children: "\u2195" }) })
|
|
3767
|
-
] })
|
|
3768
|
-
},
|
|
3769
|
-
col.key
|
|
3770
|
-
)),
|
|
3771
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3772
|
-
"th",
|
|
3773
|
-
{
|
|
3774
|
-
scope: "col",
|
|
3775
|
-
className: "px-6 py-3 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider",
|
|
3776
|
-
children: labelActions
|
|
3777
|
-
}
|
|
3778
|
-
)
|
|
3779
|
-
] })
|
|
3780
|
-
}
|
|
3781
|
-
),
|
|
3782
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-white dark:bg-slate-900 divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3783
|
-
"tr",
|
|
3784
|
-
{
|
|
3785
|
-
className: [
|
|
3786
|
-
striped && index % 2 === 1 ? "bg-zinc-50 dark:bg-slate-800" : "",
|
|
3787
|
-
onRowClick ? "cursor-pointer hover:bg-zinc-50 dark:hover:bg-slate-800/60" : "",
|
|
3788
|
-
"transition-colors duration-150"
|
|
3789
|
-
].join(" "),
|
|
3790
|
-
onClick: () => onRowClick == null ? void 0 : onRowClick(item),
|
|
3791
|
-
children: [
|
|
3792
|
-
selectable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3793
|
-
"td",
|
|
3794
|
-
{
|
|
3795
|
-
className: "px-4 py-4 w-8",
|
|
3796
|
-
onClick: (e) => e.stopPropagation(),
|
|
3797
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3798
|
-
"input",
|
|
3799
|
-
{
|
|
3800
|
-
type: "checkbox",
|
|
3801
|
-
className: "rounded border-zinc-300",
|
|
3802
|
-
"aria-label": "Select row",
|
|
3803
|
-
checked: selectedIds.includes(keyExtractor(item)),
|
|
3804
|
-
onChange: (e) => {
|
|
3805
|
-
const id = keyExtractor(item);
|
|
3806
|
-
onSelectionChange == null ? void 0 : onSelectionChange(
|
|
3807
|
-
e.target.checked ? [...selectedIds, id] : selectedIds.filter((s) => s !== id)
|
|
3808
|
-
);
|
|
3809
|
-
}
|
|
3810
|
-
}
|
|
3811
|
-
)
|
|
3812
|
-
}
|
|
3813
|
-
),
|
|
3814
|
-
columns.map((col) => {
|
|
3815
|
-
var _a;
|
|
3816
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3817
|
-
"td",
|
|
3818
|
-
{
|
|
3819
|
-
className: "px-6 py-4 whitespace-nowrap text-sm text-zinc-900 dark:text-zinc-100",
|
|
3820
|
-
children: col.render ? col.render(item) : (_a = item[col.key]) != null ? _a : "-"
|
|
3821
|
-
},
|
|
3822
|
-
col.key
|
|
3823
|
-
);
|
|
3824
|
-
}),
|
|
3825
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3826
|
-
"td",
|
|
3827
|
-
{
|
|
3828
|
-
className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium",
|
|
3829
|
-
onClick: (e) => e.stopPropagation(),
|
|
3830
|
-
children: actions(item)
|
|
3831
|
-
}
|
|
3832
|
-
)
|
|
3833
|
-
]
|
|
3834
|
-
},
|
|
3835
|
-
keyExtractor(item)
|
|
3836
|
-
)) })
|
|
3837
|
-
] })
|
|
3838
|
-
}
|
|
3839
|
-
) }),
|
|
3840
|
-
!externalPagination && totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3841
|
-
Pagination,
|
|
3842
|
-
{
|
|
3843
|
-
currentPage,
|
|
3844
|
-
totalPages,
|
|
3845
|
-
onPageChange: setCurrentPage,
|
|
3846
|
-
maxVisible: resolvedPag.maxVisible,
|
|
3847
|
-
showFirstLast: resolvedPag.showFirstLast,
|
|
3848
|
-
showPrevNext: resolvedPag.showPrevNext,
|
|
3849
|
-
size: resolvedPag.size
|
|
3850
|
-
}
|
|
3851
|
-
) })
|
|
3852
|
-
] });
|
|
3853
|
-
}
|
|
3854
|
-
function SelectableCard({
|
|
3855
|
-
id,
|
|
3856
|
-
selectable,
|
|
3857
|
-
selected,
|
|
3858
|
-
onToggle,
|
|
3859
|
-
children,
|
|
3860
|
-
listMode = false
|
|
3861
|
-
}) {
|
|
3862
|
-
if (!selectable) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full", children });
|
|
3863
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group h-full", children: [
|
|
3864
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3865
|
-
"div",
|
|
3866
|
-
{
|
|
3867
|
-
className: [
|
|
3868
|
-
"absolute z-10",
|
|
3869
|
-
listMode ? "left-2 top-1/2 -translate-y-1/2" : "top-2 left-2"
|
|
3870
|
-
].join(" "),
|
|
3871
|
-
onClick: (e) => e.stopPropagation(),
|
|
3872
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-md bg-white/95 dark:bg-slate-800/95 shadow-md flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-center", children: [
|
|
3873
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3874
|
-
"input",
|
|
3875
|
-
{
|
|
3876
|
-
type: "checkbox",
|
|
3877
|
-
className: [
|
|
3878
|
-
"w-4 h-4 rounded cursor-pointer transition-all appearance-none",
|
|
3879
|
-
selected ? "border-2 border-primary bg-primary" : "border-2 border-zinc-500 dark:border-slate-400 bg-transparent group-hover:border-primary"
|
|
3880
|
-
].join(" "),
|
|
3881
|
-
checked: selected,
|
|
3882
|
-
onChange: (e) => onToggle(id, e.target.checked),
|
|
3883
|
-
"aria-label": "Select item"
|
|
3884
|
-
}
|
|
3885
|
-
),
|
|
3886
|
-
selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3887
|
-
"svg",
|
|
3888
|
-
{
|
|
3889
|
-
className: "absolute inset-0 m-auto w-2.5 h-2.5 text-white pointer-events-none",
|
|
3890
|
-
fill: "none",
|
|
3891
|
-
stroke: "currentColor",
|
|
3892
|
-
viewBox: "0 0 24 24",
|
|
3893
|
-
"aria-hidden": "true",
|
|
3894
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3895
|
-
"path",
|
|
3896
|
-
{
|
|
3897
|
-
strokeLinecap: "round",
|
|
3898
|
-
strokeLinejoin: "round",
|
|
3899
|
-
strokeWidth: 3,
|
|
3900
|
-
d: "M5 13l4 4L19 7"
|
|
3901
|
-
}
|
|
3902
|
-
)
|
|
3903
|
-
}
|
|
3904
|
-
)
|
|
3905
|
-
] }) })
|
|
3906
|
-
}
|
|
3907
|
-
),
|
|
3908
|
-
selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3909
|
-
"div",
|
|
3910
|
-
{
|
|
3911
|
-
className: "absolute inset-0 z-[5] rounded-xl ring-2 ring-primary ring-offset-0 pointer-events-none",
|
|
3912
|
-
"aria-hidden": "true"
|
|
3913
|
-
}
|
|
3914
|
-
),
|
|
3915
|
-
children
|
|
3916
|
-
] });
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
// src/ui/animation.helper.ts
|
|
3920
|
-
var easings = {
|
|
3921
|
-
linear: (t) => t,
|
|
3922
|
-
easeInQuad: (t) => t * t,
|
|
3923
|
-
easeOutQuad: (t) => t * (2 - t),
|
|
3924
|
-
easeInOutQuad: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t,
|
|
3925
|
-
easeInCubic: (t) => t * t * t,
|
|
3926
|
-
easeOutCubic: (t) => --t * t * t + 1,
|
|
3927
|
-
easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
3928
|
-
easeInQuart: (t) => t * t * t * t,
|
|
3929
|
-
easeOutQuart: (t) => 1 - --t * t * t * t,
|
|
3930
|
-
easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t
|
|
3931
|
-
};
|
|
3932
|
-
|
|
3933
|
-
// src/ui/color.helper.ts
|
|
3934
|
-
function hexToRgb(hex) {
|
|
3935
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
3936
|
-
return result ? {
|
|
3937
|
-
r: parseInt(result[1], 16),
|
|
3938
|
-
g: parseInt(result[2], 16),
|
|
3939
|
-
b: parseInt(result[3], 16)
|
|
3940
|
-
} : null;
|
|
3941
|
-
}
|
|
3942
|
-
function rgbToHex(r, g, b) {
|
|
3943
|
-
return "#" + [r, g, b].map((x) => {
|
|
3944
|
-
const hex = x.toString(16);
|
|
3945
|
-
return hex.length === 1 ? "0" + hex : hex;
|
|
3946
|
-
}).join("");
|
|
3947
|
-
}
|
|
3948
|
-
function getContrastColor(hex) {
|
|
3949
|
-
const rgb = hexToRgb(hex);
|
|
3950
|
-
if (!rgb) return "#000000";
|
|
3951
|
-
const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
|
|
3952
|
-
return luminance > 0.5 ? "#000000" : "#ffffff";
|
|
3953
|
-
}
|
|
3954
|
-
function SideModal({
|
|
3955
|
-
isOpen,
|
|
3956
|
-
onClose,
|
|
3957
|
-
title,
|
|
3958
|
-
side = "right",
|
|
3959
|
-
children,
|
|
3960
|
-
className = ""
|
|
3961
|
-
}) {
|
|
3962
|
-
const panelRef = React.useRef(null);
|
|
3963
|
-
const titleId = React.useRef(`side-modal-title-${Math.random().toString(36).slice(2, 8)}`);
|
|
3964
|
-
React.useEffect(() => {
|
|
3965
|
-
if (!isOpen) return;
|
|
3966
|
-
const handler = (e) => {
|
|
3967
|
-
if (e.key === "Escape") onClose();
|
|
3968
|
-
};
|
|
3969
|
-
document.addEventListener("keydown", handler);
|
|
3970
|
-
return () => document.removeEventListener("keydown", handler);
|
|
3971
|
-
}, [isOpen, onClose]);
|
|
3972
|
-
React.useEffect(() => {
|
|
3973
|
-
if (isOpen) {
|
|
3974
|
-
const el = panelRef.current;
|
|
3975
|
-
if (el) {
|
|
3976
|
-
const focusable = el.querySelector(
|
|
3977
|
-
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3978
|
-
);
|
|
3979
|
-
focusable == null ? void 0 : focusable.focus();
|
|
3980
|
-
}
|
|
3981
|
-
}
|
|
3982
|
-
}, [isOpen]);
|
|
3983
|
-
React.useEffect(() => {
|
|
3984
|
-
if (isOpen) {
|
|
3985
|
-
document.body.style.overflow = "hidden";
|
|
3986
|
-
} else {
|
|
3987
|
-
document.body.style.overflow = "";
|
|
3988
|
-
}
|
|
3989
|
-
return () => {
|
|
3990
|
-
document.body.style.overflow = "";
|
|
3991
|
-
};
|
|
3992
|
-
}, [isOpen]);
|
|
3993
|
-
if (!isOpen) return null;
|
|
3994
|
-
const translateOut = side === "right" ? "translate-x-full" : "-translate-x-full";
|
|
3995
|
-
const origin = side === "right" ? "right-0" : "left-0";
|
|
3996
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3997
|
-
Div,
|
|
3998
|
-
{
|
|
3999
|
-
className: "fixed inset-0 z-50 flex",
|
|
4000
|
-
"aria-hidden": !isOpen,
|
|
4001
|
-
children: [
|
|
4002
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4003
|
-
Div,
|
|
4004
|
-
{
|
|
4005
|
-
className: "absolute inset-0 bg-black/50 transition-opacity duration-300",
|
|
4006
|
-
onClick: onClose,
|
|
4007
|
-
"aria-hidden": "true"
|
|
4008
|
-
}
|
|
4009
|
-
),
|
|
4010
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4011
|
-
Div,
|
|
4012
|
-
{
|
|
4013
|
-
ref: panelRef,
|
|
4014
|
-
role: "dialog",
|
|
4015
|
-
"aria-modal": "true",
|
|
4016
|
-
"aria-labelledby": title ? titleId.current : void 0,
|
|
4017
|
-
className: `
|
|
4018
|
-
absolute inset-y-0 ${origin} flex flex-col
|
|
4019
|
-
w-full sm:w-[min(60vw,_672px)]
|
|
4020
|
-
bg-white dark:bg-zinc-900
|
|
4021
|
-
shadow-2xl
|
|
4022
|
-
transition-transform duration-300 ease-in-out
|
|
4023
|
-
${isOpen ? "translate-x-0" : translateOut}
|
|
4024
|
-
${className}
|
|
4025
|
-
`,
|
|
4026
|
-
children: [
|
|
4027
|
-
title && /* @__PURE__ */ jsxRuntime.jsxs(Div, { className: "flex items-center justify-between border-b border-neutral-200 dark:border-zinc-700 px-5 py-4 flex-shrink-0", children: [
|
|
4028
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4029
|
-
Heading,
|
|
4030
|
-
{
|
|
4031
|
-
level: 2,
|
|
4032
|
-
id: titleId.current,
|
|
4033
|
-
className: "text-base font-semibold text-neutral-900 dark:text-white truncate",
|
|
4034
|
-
children: title
|
|
4035
|
-
}
|
|
4036
|
-
),
|
|
4037
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4038
|
-
Button,
|
|
4039
|
-
{
|
|
4040
|
-
variant: "ghost",
|
|
4041
|
-
size: "sm",
|
|
4042
|
-
onClick: onClose,
|
|
4043
|
-
"aria-label": "Close panel",
|
|
4044
|
-
className: "ml-2 flex-shrink-0",
|
|
4045
|
-
children: "\u2715"
|
|
4046
|
-
}
|
|
4047
|
-
)
|
|
4048
|
-
] }),
|
|
4049
|
-
/* @__PURE__ */ jsxRuntime.jsx(Div, { className: "flex-1 overflow-y-auto p-5", children })
|
|
4050
|
-
]
|
|
4051
|
-
}
|
|
4052
|
-
)
|
|
4053
|
-
]
|
|
4054
|
-
}
|
|
4055
|
-
);
|
|
4056
|
-
}
|
|
4057
|
-
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
4058
|
-
"p",
|
|
4059
|
-
"br",
|
|
4060
|
-
"strong",
|
|
4061
|
-
"em",
|
|
4062
|
-
"u",
|
|
4063
|
-
"s",
|
|
4064
|
-
"del",
|
|
4065
|
-
"ins",
|
|
4066
|
-
"b",
|
|
4067
|
-
"i",
|
|
4068
|
-
"mark",
|
|
4069
|
-
"code",
|
|
4070
|
-
"pre",
|
|
4071
|
-
"blockquote",
|
|
4072
|
-
"h1",
|
|
4073
|
-
"h2",
|
|
4074
|
-
"h3",
|
|
4075
|
-
"h4",
|
|
4076
|
-
"h5",
|
|
4077
|
-
"h6",
|
|
4078
|
-
"ul",
|
|
4079
|
-
"ol",
|
|
4080
|
-
"li",
|
|
4081
|
-
"a",
|
|
4082
|
-
"hr",
|
|
4083
|
-
"table",
|
|
4084
|
-
"thead",
|
|
4085
|
-
"tbody",
|
|
4086
|
-
"tr",
|
|
4087
|
-
"th",
|
|
4088
|
-
"td",
|
|
4089
|
-
"caption",
|
|
4090
|
-
"figure",
|
|
4091
|
-
"figcaption",
|
|
4092
|
-
"img",
|
|
4093
|
-
"picture",
|
|
4094
|
-
"span",
|
|
4095
|
-
"div",
|
|
4096
|
-
"section",
|
|
4097
|
-
"article"
|
|
4098
|
-
]);
|
|
4099
|
-
var ALLOWED_ATTRS = {
|
|
4100
|
-
"*": ["class", "id", "lang", "dir", "aria-label", "role", "tabindex"],
|
|
4101
|
-
a: ["href", "title", "target", "rel"],
|
|
4102
|
-
img: ["src", "alt", "width", "height", "loading", "data-align"],
|
|
4103
|
-
td: ["colspan", "rowspan"],
|
|
4104
|
-
th: ["colspan", "rowspan", "scope"],
|
|
4105
|
-
ol: ["type", "start"]
|
|
4106
|
-
};
|
|
4107
|
-
function sanitiseHtml(dirty) {
|
|
4108
|
-
if (typeof window === "undefined") {
|
|
4109
|
-
return dirty;
|
|
4110
|
-
}
|
|
4111
|
-
const dp = new DOMParser();
|
|
4112
|
-
const doc = dp.parseFromString(dirty, "text/html");
|
|
4113
|
-
function walk(node) {
|
|
4114
|
-
var _a, _b, _c, _d, _e;
|
|
4115
|
-
const children = Array.from(node.children);
|
|
4116
|
-
for (const child of children) {
|
|
4117
|
-
const tag = child.tagName.toLowerCase();
|
|
4118
|
-
if (!ALLOWED_TAGS.has(tag)) {
|
|
4119
|
-
node.replaceChild(
|
|
4120
|
-
document.createTextNode((_a = child.textContent) != null ? _a : ""),
|
|
4121
|
-
child
|
|
4122
|
-
);
|
|
4123
|
-
continue;
|
|
4124
|
-
}
|
|
4125
|
-
const attrNames = Array.from(child.attributes).map((a) => a.name);
|
|
4126
|
-
const allowed = [
|
|
4127
|
-
...(_b = ALLOWED_ATTRS["*"]) != null ? _b : [],
|
|
4128
|
-
...(_c = ALLOWED_ATTRS[tag]) != null ? _c : []
|
|
4129
|
-
];
|
|
4130
|
-
for (const attr of attrNames) {
|
|
4131
|
-
if (!allowed.includes(attr)) {
|
|
4132
|
-
child.removeAttribute(attr);
|
|
4133
|
-
}
|
|
4134
|
-
}
|
|
4135
|
-
if (tag === "a") {
|
|
4136
|
-
const href = (_d = child.getAttribute("href")) != null ? _d : "";
|
|
4137
|
-
if (/^javascript:/i.test(href)) {
|
|
4138
|
-
child.removeAttribute("href");
|
|
4139
|
-
}
|
|
4140
|
-
if (!href.startsWith("/") && !href.startsWith("#")) {
|
|
4141
|
-
child.setAttribute("rel", "noopener noreferrer");
|
|
4142
|
-
child.setAttribute("target", "_blank");
|
|
4143
|
-
}
|
|
4144
|
-
}
|
|
4145
|
-
if (tag === "img") {
|
|
4146
|
-
const src = (_e = child.getAttribute("src")) != null ? _e : "";
|
|
4147
|
-
if (/^data:/i.test(src)) {
|
|
4148
|
-
child.removeAttribute("src");
|
|
4149
|
-
}
|
|
4150
|
-
}
|
|
4151
|
-
walk(child);
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
walk(doc.body);
|
|
4155
|
-
return doc.body.innerHTML;
|
|
4156
|
-
}
|
|
4157
|
-
function attachCopyButtons(container) {
|
|
4158
|
-
container.querySelectorAll("pre").forEach((pre) => {
|
|
4159
|
-
if (pre.querySelector("[data-copy-btn]")) return;
|
|
4160
|
-
pre.style.position = "relative";
|
|
4161
|
-
const btn = document.createElement("button");
|
|
4162
|
-
btn.dataset.copyBtn = "1";
|
|
4163
|
-
btn.type = "button";
|
|
4164
|
-
btn.setAttribute("aria-label", "Copy code");
|
|
4165
|
-
btn.textContent = "Copy";
|
|
4166
|
-
btn.style.cssText = "position:absolute;top:8px;right:8px;padding:2px 10px;font-size:11px;font-family:inherit;border-radius:6px;border:1px solid rgba(148,163,184,.4);background:rgba(30,41,59,.75);color:#e2e8f0;cursor:pointer;line-height:1.6;user-select:none;transition:background .15s;";
|
|
4167
|
-
btn.addEventListener("click", () => {
|
|
4168
|
-
var _a, _b, _c;
|
|
4169
|
-
const code = (_c = (_b = (_a = pre.querySelector("code")) == null ? void 0 : _a.textContent) != null ? _b : pre.textContent) != null ? _c : "";
|
|
4170
|
-
navigator.clipboard.writeText(code).then(() => {
|
|
4171
|
-
btn.textContent = "Copied!";
|
|
4172
|
-
setTimeout(() => {
|
|
4173
|
-
btn.textContent = "Copy";
|
|
4174
|
-
}, 1800);
|
|
4175
|
-
}).catch(() => {
|
|
4176
|
-
});
|
|
4177
|
-
});
|
|
4178
|
-
pre.appendChild(btn);
|
|
4179
|
-
});
|
|
4180
|
-
}
|
|
4181
|
-
function RichText({
|
|
4182
|
-
html,
|
|
4183
|
-
className = "",
|
|
4184
|
-
proseClass = "prose dark:prose-invert max-w-none",
|
|
4185
|
-
copyableCode = false,
|
|
4186
|
-
highlightCode
|
|
4187
|
-
}) {
|
|
4188
|
-
const containerRef = React.useRef(null);
|
|
4189
|
-
const safe = React.useMemo(() => {
|
|
4190
|
-
const sanitized = sanitiseHtml(html);
|
|
4191
|
-
if (!highlightCode || typeof document === "undefined") return sanitized;
|
|
4192
|
-
const container = document.createElement("div");
|
|
4193
|
-
container.innerHTML = sanitized;
|
|
4194
|
-
container.querySelectorAll("pre > code").forEach((codeEl) => {
|
|
4195
|
-
var _a;
|
|
4196
|
-
const langClass = Array.from(codeEl.classList).find(
|
|
4197
|
-
(c) => c.startsWith("language-")
|
|
4198
|
-
);
|
|
4199
|
-
const lang = langClass ? langClass.replace("language-", "") : "plaintext";
|
|
4200
|
-
const highlighted = highlightCode((_a = codeEl.textContent) != null ? _a : "", lang);
|
|
4201
|
-
codeEl.innerHTML = highlighted;
|
|
4202
|
-
});
|
|
4203
|
-
return container.innerHTML;
|
|
4204
|
-
}, [html, highlightCode]);
|
|
4205
|
-
const ref = (el) => {
|
|
4206
|
-
containerRef.current = el;
|
|
4207
|
-
if (el && copyableCode) {
|
|
4208
|
-
attachCopyButtons(el);
|
|
4209
|
-
}
|
|
4210
|
-
};
|
|
4211
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4212
|
-
Div,
|
|
4213
|
-
{
|
|
4214
|
-
ref,
|
|
4215
|
-
className: `${proseClass} ${className}`,
|
|
4216
|
-
dangerouslySetInnerHTML: { __html: safe }
|
|
4217
|
-
}
|
|
4218
|
-
);
|
|
4219
|
-
}
|
|
4220
|
-
var DEFAULT_LABELS2 = {
|
|
4221
|
-
selected: "selected",
|
|
4222
|
-
apply: "Apply",
|
|
4223
|
-
clearSelection: "Clear selection",
|
|
4224
|
-
bulkActions: "Bulk actions"
|
|
4225
|
-
};
|
|
4226
|
-
function BulkActionBar({
|
|
4227
|
-
selectedCount,
|
|
4228
|
-
onClearSelection,
|
|
4229
|
-
actions = [],
|
|
4230
|
-
labels
|
|
4231
|
-
}) {
|
|
4232
|
-
var _a, _b;
|
|
4233
|
-
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS2), labels);
|
|
4234
|
-
const [pickerOpen, setPickerOpen] = React.useState(false);
|
|
4235
|
-
const [selectedActionId, setSelectedActionId] = React.useState(null);
|
|
4236
|
-
const containerRef = React.useRef(null);
|
|
4237
|
-
React.useEffect(() => {
|
|
4238
|
-
const handler = (e) => {
|
|
4239
|
-
var _a2;
|
|
4240
|
-
if (!((_a2 = containerRef.current) == null ? void 0 : _a2.contains(e.target))) {
|
|
4241
|
-
setPickerOpen(false);
|
|
4242
|
-
}
|
|
4243
|
-
};
|
|
4244
|
-
document.addEventListener("mousedown", handler);
|
|
4245
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
4246
|
-
}, []);
|
|
4247
|
-
React.useEffect(() => {
|
|
4248
|
-
setSelectedActionId((prev) => {
|
|
4249
|
-
var _a2;
|
|
4250
|
-
const ids = actions.map((a) => a.id);
|
|
4251
|
-
if (prev && ids.includes(prev)) return prev;
|
|
4252
|
-
return (_a2 = ids[0]) != null ? _a2 : null;
|
|
4253
|
-
});
|
|
4254
|
-
}, [actions.map((a) => a.id).join(",")]);
|
|
4255
|
-
if (selectedCount === 0) return null;
|
|
4256
|
-
const selectedAction = actions.find((a) => a.id === selectedActionId);
|
|
4257
|
-
const handleApply = () => {
|
|
4258
|
-
if (!selectedActionId) return;
|
|
4259
|
-
selectedAction == null ? void 0 : selectedAction.onClick();
|
|
4260
|
-
setPickerOpen(false);
|
|
4261
|
-
};
|
|
4262
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4263
|
-
"div",
|
|
4264
|
-
{
|
|
4265
|
-
ref: containerRef,
|
|
4266
|
-
className: "relative rounded-lg overflow-hidden border border-primary/20 dark:border-primary/30 animate-in fade-in slide-in-from-top-1 duration-150",
|
|
4267
|
-
role: "region",
|
|
4268
|
-
"aria-live": "polite",
|
|
4269
|
-
"aria-label": l.bulkActions,
|
|
4270
|
-
children: [
|
|
4271
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[3px] w-full bg-gradient-to-r from-primary-600 via-primary-400 to-primary-600 dark:from-secondary-600 dark:via-secondary-400 dark:to-secondary-600" }),
|
|
4272
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3 py-2", children: [
|
|
4273
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4274
|
-
Button,
|
|
4275
|
-
{
|
|
4276
|
-
type: "button",
|
|
4277
|
-
variant: "ghost",
|
|
4278
|
-
onClick: onClearSelection,
|
|
4279
|
-
className: "inline-flex items-center gap-1.5 flex-shrink-0 bg-primary-50 hover:bg-primary-100 active:bg-primary-200 dark:bg-primary-950/30 dark:hover:bg-primary-900/50 text-primary-700 dark:text-primary-300 rounded-full pl-2 pr-3 h-8 border border-primary-200/70 dark:border-primary-800/50 transition-colors min-h-0",
|
|
4280
|
-
"aria-label": l.clearSelection,
|
|
4281
|
-
children: [
|
|
4282
|
-
/* @__PURE__ */ jsxRuntime.jsx(X, { className: "w-3.5 h-3.5 flex-shrink-0", "aria-hidden": "true" }),
|
|
4283
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Span, { className: "text-xs font-semibold tabular-nums whitespace-nowrap leading-none", children: [
|
|
4284
|
-
selectedCount,
|
|
4285
|
-
" ",
|
|
4286
|
-
l.selected
|
|
4287
|
-
] })
|
|
4288
|
-
]
|
|
4289
|
-
}
|
|
4290
|
-
),
|
|
4291
|
-
actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4292
|
-
Button,
|
|
4293
|
-
{
|
|
4294
|
-
type: "button",
|
|
4295
|
-
variant: "ghost",
|
|
4296
|
-
onClick: () => setPickerOpen((o) => !o),
|
|
4297
|
-
"aria-haspopup": "listbox",
|
|
4298
|
-
"aria-expanded": pickerOpen,
|
|
4299
|
-
className: [
|
|
4300
|
-
"flex-1 min-w-0 h-10 flex items-center gap-2 px-3 rounded-lg border text-sm font-medium transition-colors",
|
|
4301
|
-
"bg-zinc-50 hover:bg-zinc-100 active:bg-zinc-200 dark:bg-slate-800/60 dark:hover:bg-slate-700/60",
|
|
4302
|
-
"border-zinc-200 dark:border-slate-700",
|
|
4303
|
-
(selectedAction == null ? void 0 : selectedAction.variant) === "danger" ? "text-red-600 dark:text-red-400" : "text-zinc-800 dark:text-zinc-100"
|
|
4304
|
-
].filter(Boolean).join(" "),
|
|
4305
|
-
children: [
|
|
4306
|
-
(selectedAction == null ? void 0 : selectedAction.icon) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4307
|
-
Span,
|
|
4308
|
-
{
|
|
4309
|
-
className: "flex-shrink-0 w-4 h-4 flex items-center justify-center",
|
|
4310
|
-
"aria-hidden": "true",
|
|
4311
|
-
children: selectedAction.icon
|
|
4312
|
-
}
|
|
4313
|
-
),
|
|
4314
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "flex-1 truncate text-left leading-none", children: (_a = selectedAction == null ? void 0 : selectedAction.label) != null ? _a : l.bulkActions }),
|
|
4315
|
-
pickerOpen ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4316
|
-
ChevronUp,
|
|
4317
|
-
{
|
|
4318
|
-
className: "w-4 h-4 flex-shrink-0 text-zinc-400",
|
|
4319
|
-
"aria-hidden": "true"
|
|
4320
|
-
}
|
|
4321
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4322
|
-
ChevronDown,
|
|
4323
|
-
{
|
|
4324
|
-
className: "w-4 h-4 flex-shrink-0 text-zinc-400",
|
|
4325
|
-
"aria-hidden": "true"
|
|
4326
|
-
}
|
|
4327
|
-
)
|
|
4328
|
-
]
|
|
4329
|
-
}
|
|
4330
|
-
),
|
|
4331
|
-
actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4332
|
-
Button,
|
|
4333
|
-
{
|
|
4334
|
-
type: "button",
|
|
4335
|
-
variant: (_b = selectedAction == null ? void 0 : selectedAction.variant) != null ? _b : "primary",
|
|
4336
|
-
size: "sm",
|
|
4337
|
-
isLoading: selectedAction == null ? void 0 : selectedAction.loading,
|
|
4338
|
-
disabled: !selectedActionId || (selectedAction == null ? void 0 : selectedAction.disabled) || (selectedAction == null ? void 0 : selectedAction.loading),
|
|
4339
|
-
onClick: handleApply,
|
|
4340
|
-
className: "h-10 flex-shrink-0",
|
|
4341
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Span, { className: "leading-none", children: l.apply })
|
|
4342
|
-
}
|
|
4343
|
-
)
|
|
4344
|
-
] }),
|
|
4345
|
-
actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4346
|
-
"div",
|
|
4347
|
-
{
|
|
4348
|
-
role: "listbox",
|
|
4349
|
-
"aria-label": l.bulkActions,
|
|
4350
|
-
className: [
|
|
4351
|
-
"overflow-hidden border-t border-zinc-200/80 dark:border-slate-700/80",
|
|
4352
|
-
"transition-[max-height,opacity] duration-200 ease-out",
|
|
4353
|
-
pickerOpen ? "max-h-64 opacity-100" : "max-h-0 opacity-0 pointer-events-none"
|
|
4354
|
-
].filter(Boolean).join(" "),
|
|
4355
|
-
children: actions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4356
|
-
"button",
|
|
4357
|
-
{
|
|
4358
|
-
role: "option",
|
|
4359
|
-
"aria-selected": selectedActionId === action.id,
|
|
4360
|
-
disabled: action.disabled,
|
|
4361
|
-
onClick: () => {
|
|
4362
|
-
setSelectedActionId(action.id);
|
|
4363
|
-
setPickerOpen(false);
|
|
4364
|
-
},
|
|
4365
|
-
className: [
|
|
4366
|
-
"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm text-left transition-colors",
|
|
4367
|
-
"hover:bg-zinc-50 dark:hover:bg-slate-800/60",
|
|
4368
|
-
action.variant === "danger" ? "text-red-600 dark:text-red-400" : "text-zinc-700 dark:text-zinc-200",
|
|
4369
|
-
selectedActionId === action.id ? "bg-zinc-50 dark:bg-slate-800/60 font-medium" : "",
|
|
4370
|
-
action.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
|
|
4371
|
-
].filter(Boolean).join(" "),
|
|
4372
|
-
children: [
|
|
4373
|
-
action.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4374
|
-
Span,
|
|
4375
|
-
{
|
|
4376
|
-
className: "flex-shrink-0 w-4 h-4 flex items-center justify-center",
|
|
4377
|
-
"aria-hidden": "true",
|
|
4378
|
-
children: action.icon
|
|
4379
|
-
}
|
|
4380
|
-
),
|
|
4381
|
-
/* @__PURE__ */ jsxRuntime.jsx(Span, { className: "flex-1", children: action.label })
|
|
4382
|
-
]
|
|
4383
|
-
},
|
|
4384
|
-
action.id
|
|
4385
|
-
))
|
|
4386
|
-
}
|
|
4387
|
-
)
|
|
4388
|
-
]
|
|
4389
|
-
}
|
|
4390
|
-
);
|
|
4391
|
-
}
|
|
4392
|
-
var DEFAULT_LABELS3 = {
|
|
4393
|
-
filtersTitle: "Filters",
|
|
4394
|
-
clearAll: "Clear all",
|
|
4395
|
-
applyFilters: "Apply filters",
|
|
4396
|
-
close: "Close",
|
|
4397
|
-
showFilters: "Show filters",
|
|
4398
|
-
hideFilters: "Hide filters",
|
|
4399
|
-
filterActiveCount: (count) => `${count} active`
|
|
4400
|
-
};
|
|
4401
|
-
function ListingLayout({
|
|
4402
|
-
headerSlot,
|
|
4403
|
-
statusTabsSlot,
|
|
4404
|
-
filterContent,
|
|
4405
|
-
filterActiveCount = 0,
|
|
4406
|
-
onFilterApply,
|
|
4407
|
-
onFilterClear,
|
|
4408
|
-
filterTitle,
|
|
4409
|
-
activeFiltersSlot,
|
|
4410
|
-
searchSlot,
|
|
4411
|
-
sortSlot,
|
|
4412
|
-
viewToggleSlot,
|
|
4413
|
-
actionsSlot,
|
|
4414
|
-
selectedCount = 0,
|
|
4415
|
-
onClearSelection,
|
|
4416
|
-
bulkActionItems,
|
|
4417
|
-
toolbarPaginationSlot,
|
|
4418
|
-
paginationSlot,
|
|
4419
|
-
children,
|
|
4420
|
-
isDashboard = false,
|
|
4421
|
-
defaultSidebarOpen = false,
|
|
4422
|
-
className = "",
|
|
4423
|
-
loading = false,
|
|
4424
|
-
errorSlot,
|
|
4425
|
-
labels
|
|
4426
|
-
}) {
|
|
4427
|
-
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS3), labels);
|
|
4428
|
-
const [sidebarOpen, setSidebarOpen] = React.useState(defaultSidebarOpen);
|
|
4429
|
-
const [mobileFilterOpen, setMobileFilterOpen] = React.useState(false);
|
|
4430
|
-
const mobileOverlayRef = React.useRef(null);
|
|
4431
|
-
const hasFilter = Boolean(filterContent);
|
|
4432
|
-
const panelTitle = filterTitle != null ? filterTitle : l.filtersTitle;
|
|
4433
|
-
const stickyTop = isDashboard ? "top-0" : "top-14 md:top-[120px]";
|
|
4434
|
-
const sidebarSticky = isDashboard ? "sticky top-16" : "sticky top-[176px]";
|
|
4435
|
-
React.useEffect(() => {
|
|
4436
|
-
if (!mobileFilterOpen) return;
|
|
4437
|
-
const handle = (e) => {
|
|
4438
|
-
if (e.key === "Escape") setMobileFilterOpen(false);
|
|
4439
|
-
};
|
|
4440
|
-
document.addEventListener("keydown", handle);
|
|
4441
|
-
return () => document.removeEventListener("keydown", handle);
|
|
4442
|
-
}, [mobileFilterOpen]);
|
|
4443
|
-
React.useEffect(() => {
|
|
4444
|
-
if (mobileFilterOpen) {
|
|
4445
|
-
const w = window.innerWidth - document.documentElement.clientWidth;
|
|
4446
|
-
document.body.style.overflow = "hidden";
|
|
4447
|
-
document.body.style.paddingRight = `${w}px`;
|
|
4448
|
-
} else {
|
|
4449
|
-
document.body.style.overflow = "";
|
|
4450
|
-
document.body.style.paddingRight = "";
|
|
4451
|
-
}
|
|
4452
|
-
return () => {
|
|
4453
|
-
document.body.style.overflow = "";
|
|
4454
|
-
document.body.style.paddingRight = "";
|
|
4455
|
-
};
|
|
4456
|
-
}, [mobileFilterOpen]);
|
|
4457
|
-
const handleMobileApply = () => {
|
|
4458
|
-
onFilterApply == null ? void 0 : onFilterApply();
|
|
4459
|
-
setMobileFilterOpen(false);
|
|
4460
|
-
};
|
|
4461
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4462
|
-
"div",
|
|
4463
|
-
{
|
|
4464
|
-
className: [
|
|
4465
|
-
"w-full space-y-4",
|
|
4466
|
-
toolbarPaginationSlot ? selectedCount > 0 ? "pb-28 lg:pb-0" : "pb-12 lg:pb-0" : "",
|
|
4467
|
-
className
|
|
4468
|
-
].filter(Boolean).join(" "),
|
|
4469
|
-
children: [
|
|
4470
|
-
headerSlot,
|
|
4471
|
-
statusTabsSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto touch-pan-x -mx-4 px-4 md:-mx-6 md:px-6", children: statusTabsSlot }),
|
|
4472
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4473
|
-
"div",
|
|
4474
|
-
{
|
|
4475
|
-
className: [
|
|
4476
|
-
"sticky z-20 -mx-4 px-4 md:-mx-6 md:px-6",
|
|
4477
|
-
stickyTop,
|
|
4478
|
-
"bg-white/80 dark:bg-slate-950/80 backdrop-blur-md",
|
|
4479
|
-
"border-b border-zinc-200/70 dark:border-slate-800/70",
|
|
4480
|
-
"shadow-[0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_1px_3px_rgba(0,0,0,0.2)]",
|
|
4481
|
-
"py-2.5"
|
|
4482
|
-
].join(" "),
|
|
4483
|
-
children: [
|
|
4484
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex items-center gap-2 min-w-0", children: [
|
|
4485
|
-
hasFilter && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4486
|
-
Button,
|
|
4487
|
-
{
|
|
4488
|
-
type: "button",
|
|
4489
|
-
variant: "outline",
|
|
4490
|
-
size: "sm",
|
|
4491
|
-
onClick: () => setSidebarOpen((prev) => !prev),
|
|
4492
|
-
"aria-label": sidebarOpen ? l.hideFilters : l.showFilters,
|
|
4493
|
-
"aria-expanded": sidebarOpen,
|
|
4494
|
-
className: [
|
|
4495
|
-
"hidden lg:flex flex-shrink-0 items-center gap-1.5",
|
|
4496
|
-
"rounded-full h-8 px-3 text-sm font-medium",
|
|
4497
|
-
"border transition-all duration-150",
|
|
4498
|
-
sidebarOpen ? "bg-primary/10 border-primary/30 text-primary dark:bg-primary/15 dark:border-primary/40" : "border-zinc-200 dark:border-slate-700 text-zinc-600 dark:text-slate-300 hover:border-zinc-300 dark:hover:border-slate-600 hover:bg-zinc-50 dark:hover:bg-slate-800/60"
|
|
4499
|
-
].join(" "),
|
|
4500
|
-
children: [
|
|
4501
|
-
/* @__PURE__ */ jsxRuntime.jsx(FilterIcon, {}),
|
|
4502
|
-
l.filtersTitle,
|
|
4503
|
-
filterActiveCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4504
|
-
Span,
|
|
4505
|
-
{
|
|
4506
|
-
className: "inline-flex items-center justify-center w-4 h-4 text-[10px] font-bold rounded-full bg-primary text-white",
|
|
4507
|
-
"aria-label": l.filterActiveCount(filterActiveCount),
|
|
4508
|
-
children: filterActiveCount
|
|
4509
|
-
}
|
|
4510
|
-
)
|
|
4511
|
-
]
|
|
4512
|
-
}
|
|
4513
|
-
),
|
|
4514
|
-
searchSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: searchSlot }),
|
|
4515
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
|
|
4516
|
-
sortSlot,
|
|
4517
|
-
viewToggleSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5 rounded-full border border-zinc-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-0.5 shadow-sm", children: viewToggleSlot }),
|
|
4518
|
-
actionsSlot
|
|
4519
|
-
] }),
|
|
4520
|
-
toolbarPaginationSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex-shrink-0 pl-3 border-l border-zinc-200/70 dark:border-slate-700/70", children: toolbarPaginationSlot })
|
|
4521
|
-
] }),
|
|
4522
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 lg:hidden", children: [
|
|
4523
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4524
|
-
hasFilter && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4525
|
-
Button,
|
|
4526
|
-
{
|
|
4527
|
-
type: "button",
|
|
4528
|
-
variant: "outline",
|
|
4529
|
-
size: "sm",
|
|
4530
|
-
onClick: () => setMobileFilterOpen(true),
|
|
4531
|
-
"aria-label": l.filtersTitle,
|
|
4532
|
-
className: [
|
|
4533
|
-
"flex-shrink-0 flex items-center gap-1.5",
|
|
4534
|
-
"rounded-full h-9 px-3 text-sm font-medium",
|
|
4535
|
-
"border border-zinc-200 dark:border-slate-700",
|
|
4536
|
-
"text-zinc-600 dark:text-slate-300",
|
|
4537
|
-
"hover:bg-zinc-50 dark:hover:bg-slate-800/60 transition-colors",
|
|
4538
|
-
filterActiveCount > 0 ? "border-primary/40 bg-primary/5 text-primary" : ""
|
|
4539
|
-
].join(" "),
|
|
4540
|
-
children: [
|
|
4541
|
-
/* @__PURE__ */ jsxRuntime.jsx(FilterIcon, {}),
|
|
4542
|
-
l.filtersTitle,
|
|
4543
|
-
filterActiveCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4544
|
-
Span,
|
|
4545
|
-
{
|
|
4546
|
-
className: "inline-flex items-center justify-center w-4 h-4 text-[10px] font-bold rounded-full bg-primary text-white",
|
|
4547
|
-
"aria-label": l.filterActiveCount(filterActiveCount),
|
|
4548
|
-
children: filterActiveCount
|
|
4549
|
-
}
|
|
4550
|
-
)
|
|
4551
|
-
]
|
|
4552
|
-
}
|
|
4553
|
-
),
|
|
4554
|
-
searchSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: searchSlot })
|
|
4555
|
-
] }),
|
|
4556
|
-
(sortSlot || viewToggleSlot || actionsSlot) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-stretch min-h-[44px] gap-2 overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-shrink-0 pb-px", children: [
|
|
4557
|
-
sortSlot,
|
|
4558
|
-
viewToggleSlot,
|
|
4559
|
-
actionsSlot
|
|
4560
|
-
] }) })
|
|
4561
|
-
] }),
|
|
4562
|
-
selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:block pt-2 mt-2 border-t border-zinc-100 dark:border-slate-800", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4563
|
-
BulkActionBar,
|
|
4564
|
-
{
|
|
4565
|
-
selectedCount,
|
|
4566
|
-
onClearSelection,
|
|
4567
|
-
actions: bulkActionItems,
|
|
4568
|
-
labels: {
|
|
4569
|
-
selected: l.filtersTitle,
|
|
4570
|
-
// placeholder — callers provide proper labels
|
|
4571
|
-
apply: l.applyFilters,
|
|
4572
|
-
clearSelection: l.clearAll
|
|
4573
|
-
}
|
|
4574
|
-
}
|
|
4575
|
-
) })
|
|
4576
|
-
]
|
|
4577
|
-
}
|
|
4578
|
-
),
|
|
4579
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 lg:gap-6 items-start", children: [
|
|
4580
|
-
hasFilter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4581
|
-
Aside,
|
|
4582
|
-
{
|
|
4583
|
-
"aria-label": panelTitle,
|
|
4584
|
-
className: [
|
|
4585
|
-
"hidden lg:block flex-shrink-0 self-start",
|
|
4586
|
-
sidebarSticky,
|
|
4587
|
-
"transition-all duration-200 ease-in-out overflow-hidden",
|
|
4588
|
-
sidebarOpen ? "w-60 xl:w-64 2xl:w-72 opacity-100" : "w-0 opacity-0 pointer-events-none"
|
|
4589
|
-
].join(" "),
|
|
4590
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4591
|
-
"div",
|
|
4592
|
-
{
|
|
4593
|
-
className: [
|
|
4594
|
-
"w-60 xl:w-64 2xl:w-72 rounded-2xl overflow-hidden",
|
|
4595
|
-
"border border-zinc-200/80 dark:border-slate-700/60",
|
|
4596
|
-
"bg-white dark:bg-slate-900",
|
|
4597
|
-
"shadow-sm"
|
|
4598
|
-
].join(" "),
|
|
4599
|
-
children: [
|
|
4600
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b border-zinc-100 dark:border-slate-800", children: [
|
|
4601
|
-
/* @__PURE__ */ jsxRuntime.jsx(Text, { weight: "semibold", size: "sm", children: panelTitle }),
|
|
4602
|
-
filterActiveCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4603
|
-
Button,
|
|
4604
|
-
{
|
|
4605
|
-
type: "button",
|
|
4606
|
-
variant: "ghost",
|
|
4607
|
-
size: "sm",
|
|
4608
|
-
onClick: onFilterClear,
|
|
4609
|
-
className: "text-xs text-primary hover:text-primary/80 hover:underline p-0 h-auto leading-none font-medium",
|
|
4610
|
-
children: l.clearAll
|
|
4611
|
-
}
|
|
4612
|
-
)
|
|
4613
|
-
] }),
|
|
4614
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 pt-5 pb-3 max-h-[calc(100vh-15rem)] overflow-y-auto space-y-4", children: filterContent }),
|
|
4615
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 pb-3 pt-2 border-t border-zinc-100 dark:border-slate-800", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4616
|
-
Button,
|
|
4617
|
-
{
|
|
4618
|
-
type: "button",
|
|
4619
|
-
variant: "primary",
|
|
4620
|
-
className: "w-full rounded-xl",
|
|
4621
|
-
size: "sm",
|
|
4622
|
-
onClick: onFilterApply,
|
|
4623
|
-
children: l.applyFilters
|
|
4624
|
-
}
|
|
4625
|
-
) })
|
|
4626
|
-
]
|
|
4627
|
-
}
|
|
4628
|
-
)
|
|
4629
|
-
}
|
|
4630
|
-
),
|
|
4631
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 space-y-3", children: [
|
|
4632
|
-
activeFiltersSlot,
|
|
4633
|
-
errorSlot ? errorSlot : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4634
|
-
children,
|
|
4635
|
-
paginationSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-2", children: paginationSlot })
|
|
4636
|
-
] })
|
|
4637
|
-
] })
|
|
4638
|
-
] }),
|
|
4639
|
-
toolbarPaginationSlot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4640
|
-
Nav,
|
|
4641
|
-
{
|
|
4642
|
-
"aria-label": "Pagination",
|
|
4643
|
-
className: [
|
|
4644
|
-
"fixed left-0 right-0 lg:hidden",
|
|
4645
|
-
isDashboard ? "bottom-0" : selectedCount > 0 ? "bottom-28" : "bottom-14",
|
|
4646
|
-
"z-[39]",
|
|
4647
|
-
"bg-white/90 dark:bg-slate-950/90 backdrop-blur-md border-t border-zinc-200/80 dark:border-slate-800/80",
|
|
4648
|
-
"shadow-[0_-2px_8px_rgba(0,0,0,0.06)] dark:shadow-[0_-2px_8px_rgba(0,0,0,0.20)]",
|
|
4649
|
-
"h-10 flex items-center justify-center px-3 overflow-x-auto pb-px"
|
|
4650
|
-
].join(" "),
|
|
4651
|
-
children: toolbarPaginationSlot
|
|
4652
|
-
}
|
|
4653
|
-
),
|
|
4654
|
-
hasFilter && mobileFilterOpen && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4655
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4656
|
-
"div",
|
|
4657
|
-
{
|
|
4658
|
-
className: "fixed inset-0 z-40 bg-black/40 lg:hidden",
|
|
4659
|
-
onClick: () => setMobileFilterOpen(false),
|
|
4660
|
-
"aria-hidden": "true"
|
|
4661
|
-
}
|
|
4662
|
-
),
|
|
4663
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4664
|
-
"div",
|
|
4665
|
-
{
|
|
4666
|
-
ref: mobileOverlayRef,
|
|
4667
|
-
className: "fixed inset-0 z-50 flex flex-col lg:hidden bg-white dark:bg-slate-950",
|
|
4668
|
-
role: "dialog",
|
|
4669
|
-
"aria-modal": "true",
|
|
4670
|
-
"aria-label": panelTitle,
|
|
4671
|
-
children: [
|
|
4672
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b border-zinc-100 dark:border-slate-800 flex-shrink-0", children: [
|
|
4673
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Text, { weight: "semibold", children: [
|
|
4674
|
-
panelTitle,
|
|
4675
|
-
filterActiveCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(Span, { className: "ml-2 inline-flex items-center justify-center w-5 h-5 text-[11px] font-bold rounded-full bg-primary text-white", children: filterActiveCount })
|
|
4676
|
-
] }),
|
|
4677
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4678
|
-
Button,
|
|
4679
|
-
{
|
|
4680
|
-
type: "button",
|
|
4681
|
-
variant: "ghost",
|
|
4682
|
-
size: "sm",
|
|
4683
|
-
onClick: () => setMobileFilterOpen(false),
|
|
4684
|
-
"aria-label": l.close,
|
|
4685
|
-
className: "rounded-full w-8 h-8 p-0 flex items-center justify-center hover:bg-zinc-100 dark:hover:bg-slate-800",
|
|
4686
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4687
|
-
"svg",
|
|
4688
|
-
{
|
|
4689
|
-
className: "w-4 h-4",
|
|
4690
|
-
fill: "none",
|
|
4691
|
-
stroke: "currentColor",
|
|
4692
|
-
viewBox: "0 0 24 24",
|
|
4693
|
-
"aria-hidden": "true",
|
|
4694
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4695
|
-
"path",
|
|
4696
|
-
{
|
|
4697
|
-
strokeLinecap: "round",
|
|
4698
|
-
strokeLinejoin: "round",
|
|
4699
|
-
strokeWidth: 2,
|
|
4700
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
4701
|
-
}
|
|
4702
|
-
)
|
|
4703
|
-
}
|
|
4704
|
-
)
|
|
4705
|
-
}
|
|
4706
|
-
)
|
|
4707
|
-
] }),
|
|
4708
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-4 pt-6 pb-4 space-y-4", children: filterContent }),
|
|
4709
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 flex gap-3 px-4 py-4 border-t border-zinc-100 dark:border-slate-800 bg-white dark:bg-slate-950", children: [
|
|
4710
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4711
|
-
Button,
|
|
4712
|
-
{
|
|
4713
|
-
type: "button",
|
|
4714
|
-
variant: "secondary",
|
|
4715
|
-
className: "flex-1 rounded-xl",
|
|
4716
|
-
onClick: () => onFilterClear == null ? void 0 : onFilterClear(),
|
|
4717
|
-
children: l.clearAll
|
|
4718
|
-
}
|
|
4719
|
-
),
|
|
4720
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4721
|
-
Button,
|
|
4722
|
-
{
|
|
4723
|
-
type: "button",
|
|
4724
|
-
variant: "primary",
|
|
4725
|
-
className: "flex-1 rounded-xl",
|
|
4726
|
-
onClick: handleMobileApply,
|
|
4727
|
-
children: l.applyFilters
|
|
4728
|
-
}
|
|
4729
|
-
)
|
|
4730
|
-
] })
|
|
4731
|
-
]
|
|
4732
|
-
}
|
|
4733
|
-
)
|
|
4734
|
-
] })
|
|
4735
|
-
]
|
|
4736
|
-
}
|
|
4737
|
-
);
|
|
4738
|
-
}
|
|
4739
|
-
function FilterIcon() {
|
|
4740
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4741
|
-
"svg",
|
|
4742
|
-
{
|
|
4743
|
-
className: "w-4 h-4",
|
|
4744
|
-
fill: "none",
|
|
4745
|
-
viewBox: "0 0 24 24",
|
|
4746
|
-
stroke: "currentColor",
|
|
4747
|
-
strokeWidth: 2,
|
|
4748
|
-
"aria-hidden": "true",
|
|
4749
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4750
|
-
"path",
|
|
4751
|
-
{
|
|
4752
|
-
strokeLinecap: "round",
|
|
4753
|
-
strokeLinejoin: "round",
|
|
4754
|
-
d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2a1 1 0 01-.293.707L13 13.414V19a1 1 0 01-.553.894l-4 2A1 1 0 017 21v-7.586L3.293 6.707A1 1 0 013 6V4z"
|
|
4755
|
-
}
|
|
4756
|
-
)
|
|
4757
|
-
}
|
|
4758
|
-
);
|
|
4759
|
-
}
|
|
4760
|
-
/*! Bundled license information:
|
|
4761
|
-
|
|
4762
|
-
lucide-react/dist/esm/shared/src/utils/mergeClasses.js:
|
|
4763
|
-
lucide-react/dist/esm/shared/src/utils/toKebabCase.js:
|
|
4764
|
-
lucide-react/dist/esm/shared/src/utils/toCamelCase.js:
|
|
4765
|
-
lucide-react/dist/esm/shared/src/utils/toPascalCase.js:
|
|
4766
|
-
lucide-react/dist/esm/defaultAttributes.js:
|
|
4767
|
-
lucide-react/dist/esm/shared/src/utils/hasA11yProp.js:
|
|
4768
|
-
lucide-react/dist/esm/context.js:
|
|
4769
|
-
lucide-react/dist/esm/Icon.js:
|
|
4770
|
-
lucide-react/dist/esm/createLucideIcon.js:
|
|
4771
|
-
lucide-react/dist/esm/icons/check.js:
|
|
4772
|
-
lucide-react/dist/esm/icons/chevron-down.js:
|
|
4773
|
-
lucide-react/dist/esm/icons/chevron-left.js:
|
|
4774
|
-
lucide-react/dist/esm/icons/chevron-right.js:
|
|
4775
|
-
lucide-react/dist/esm/icons/chevron-up.js:
|
|
4776
|
-
lucide-react/dist/esm/icons/loader-circle.js:
|
|
4777
|
-
lucide-react/dist/esm/icons/star.js:
|
|
4778
|
-
lucide-react/dist/esm/icons/x.js:
|
|
4779
|
-
lucide-react/dist/esm/icons/zoom-in.js:
|
|
4780
|
-
lucide-react/dist/esm/lucide-react.js:
|
|
4781
|
-
(**
|
|
4782
|
-
* @license lucide-react v1.7.0 - ISC
|
|
4783
|
-
*
|
|
4784
|
-
* This source code is licensed under the ISC license.
|
|
4785
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
4786
|
-
*)
|
|
4787
|
-
*/
|
|
4788
|
-
|
|
4789
|
-
exports.Accordion = Accordion;
|
|
4790
|
-
exports.AccordionItem = AccordionItem;
|
|
4791
|
-
exports.ActiveFilterChips = ActiveFilterChips;
|
|
4792
|
-
exports.Alert = Alert;
|
|
4793
|
-
exports.Article = Article;
|
|
4794
|
-
exports.Aside = Aside;
|
|
4795
|
-
exports.Badge = Badge;
|
|
4796
|
-
exports.BlockFooter = BlockFooter;
|
|
4797
|
-
exports.BlockHeader = BlockHeader;
|
|
4798
|
-
exports.Breadcrumb = Breadcrumb;
|
|
4799
|
-
exports.BulkActionBar = BulkActionBar;
|
|
4800
|
-
exports.Button = Button;
|
|
4801
|
-
exports.Caption = Caption;
|
|
4802
|
-
exports.Container = Container;
|
|
4803
|
-
exports.CountdownDisplay = CountdownDisplay;
|
|
4804
|
-
exports.DEFAULT_PAGINATION_CONFIG = DEFAULT_PAGINATION_CONFIG;
|
|
4805
|
-
exports.DEFAULT_STICKY_CONFIG = DEFAULT_STICKY_CONFIG;
|
|
4806
|
-
exports.DEFAULT_TABLE_CONFIG = DEFAULT_TABLE_CONFIG;
|
|
4807
|
-
exports.DataTable = DataTable;
|
|
4808
|
-
exports.DescriptionField = DescriptionField;
|
|
4809
|
-
exports.Div = Div;
|
|
4810
|
-
exports.Divider = Divider;
|
|
4811
|
-
exports.Drawer = Drawer;
|
|
4812
|
-
exports.Footer = Footer;
|
|
4813
|
-
exports.Form = Form;
|
|
4814
|
-
exports.FormField = FormField;
|
|
4815
|
-
exports.FormGrid = FormGrid;
|
|
4816
|
-
exports.GRID_MAP = GRID_MAP;
|
|
4817
|
-
exports.Grid = Grid;
|
|
4818
|
-
exports.Header = Header;
|
|
4819
|
-
exports.Heading = Heading;
|
|
4820
|
-
exports.HorizontalScroller = HorizontalScroller;
|
|
4821
|
-
exports.IconButton = IconButton;
|
|
4822
|
-
exports.ImageLightbox = ImageLightbox;
|
|
4823
|
-
exports.IndeterminateProgress = IndeterminateProgress;
|
|
4824
|
-
exports.Input = Input;
|
|
4825
|
-
exports.ItemRow = ItemRow;
|
|
4826
|
-
exports.Label = Label;
|
|
4827
|
-
exports.Li = Li;
|
|
4828
|
-
exports.ListingLayout = ListingLayout;
|
|
4829
|
-
exports.Main = Main;
|
|
4830
|
-
exports.Modal = Modal;
|
|
4831
|
-
exports.Nav = Nav;
|
|
4832
|
-
exports.Ol = Ol;
|
|
4833
|
-
exports.Pagination = Pagination;
|
|
4834
|
-
exports.PriceDisplay = PriceDisplay;
|
|
4835
|
-
exports.Progress = Progress;
|
|
4836
|
-
exports.RatingDisplay = RatingDisplay;
|
|
4837
|
-
exports.RichText = RichText;
|
|
4838
|
-
exports.Row = Row;
|
|
4839
|
-
exports.Section = Section;
|
|
4840
|
-
exports.Select = Select;
|
|
4841
|
-
exports.SideModal = SideModal;
|
|
4842
|
-
exports.Skeleton = Skeleton;
|
|
4843
|
-
exports.Slider = Slider;
|
|
4844
|
-
exports.SortDropdown = SortDropdown;
|
|
4845
|
-
exports.Span = Span;
|
|
4846
|
-
exports.Spinner = Spinner;
|
|
4847
|
-
exports.Stack = Stack;
|
|
4848
|
-
exports.StarRating = StarRating;
|
|
4849
|
-
exports.StatsGrid = StatsGrid;
|
|
4850
|
-
exports.StatusBadge = StatusBadge;
|
|
4851
|
-
exports.StepperNav = StepperNav;
|
|
4852
|
-
exports.SummaryCard = SummaryCard;
|
|
4853
|
-
exports.TabStrip = TabStrip;
|
|
4854
|
-
exports.TablePagination = TablePagination;
|
|
4855
|
-
exports.TagInput = TagInput;
|
|
4856
|
-
exports.Text = Text;
|
|
4857
|
-
exports.TextLink = TextLink;
|
|
4858
|
-
exports.Textarea = Textarea;
|
|
4859
|
-
exports.Tooltip = Tooltip;
|
|
4860
|
-
exports.Ul = Ul;
|
|
4861
|
-
exports.ViewToggle = ViewToggle;
|
|
4862
|
-
exports.classNames = classNames;
|
|
4863
|
-
exports.easings = easings;
|
|
4864
|
-
exports.getContrastColor = getContrastColor;
|
|
4865
|
-
exports.hexToRgb = hexToRgb;
|
|
4866
|
-
exports.mergeTableConfig = mergeTableConfig;
|
|
4867
|
-
exports.mergeTailwindClasses = mergeTailwindClasses;
|
|
4868
|
-
exports.rgbToHex = rgbToHex;
|
|
4869
|
-
//# sourceMappingURL=index.cjs.map
|
|
4870
|
-
//# sourceMappingURL=index.cjs.map
|