@varity-labs/ui-kit 2.0.0-alpha.1
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/LICENSE +31 -0
- package/README.md +248 -0
- package/dist/components/AI/ChatbotWidget.d.ts +53 -0
- package/dist/components/AI/ChatbotWidget.d.ts.map +1 -0
- package/dist/components/AI/ChatbotWidget.js +126 -0
- package/dist/components/AI/ChatbotWidget.js.map +1 -0
- package/dist/components/AI/InputBar.d.ts +25 -0
- package/dist/components/AI/InputBar.d.ts.map +1 -0
- package/dist/components/AI/InputBar.js +126 -0
- package/dist/components/AI/InputBar.js.map +1 -0
- package/dist/components/AI/MessageBubble.d.ts +37 -0
- package/dist/components/AI/MessageBubble.d.ts.map +1 -0
- package/dist/components/AI/MessageBubble.js +124 -0
- package/dist/components/AI/MessageBubble.js.map +1 -0
- package/dist/components/AI/index.d.ts +12 -0
- package/dist/components/AI/index.d.ts.map +1 -0
- package/dist/components/AI/index.js +9 -0
- package/dist/components/AI/index.js.map +1 -0
- package/dist/components/Analytics/AnalyticsCard.d.ts +48 -0
- package/dist/components/Analytics/AnalyticsCard.d.ts.map +1 -0
- package/dist/components/Analytics/AnalyticsCard.js +156 -0
- package/dist/components/Analytics/AnalyticsCard.js.map +1 -0
- package/dist/components/Analytics/ChartContainer.d.ts +53 -0
- package/dist/components/Analytics/ChartContainer.d.ts.map +1 -0
- package/dist/components/Analytics/ChartContainer.js +128 -0
- package/dist/components/Analytics/ChartContainer.js.map +1 -0
- package/dist/components/Analytics/DataTable.d.ts +62 -0
- package/dist/components/Analytics/DataTable.d.ts.map +1 -0
- package/dist/components/Analytics/DataTable.js +165 -0
- package/dist/components/Analytics/DataTable.js.map +1 -0
- package/dist/components/Analytics/MetricDisplay.d.ts +42 -0
- package/dist/components/Analytics/MetricDisplay.d.ts.map +1 -0
- package/dist/components/Analytics/MetricDisplay.js +110 -0
- package/dist/components/Analytics/MetricDisplay.js.map +1 -0
- package/dist/components/Analytics/index.d.ts +14 -0
- package/dist/components/Analytics/index.d.ts.map +1 -0
- package/dist/components/Analytics/index.js +10 -0
- package/dist/components/Analytics/index.js.map +1 -0
- package/dist/components/Branding/Attribution.d.ts +39 -0
- package/dist/components/Branding/Attribution.d.ts.map +1 -0
- package/dist/components/Branding/Attribution.js +124 -0
- package/dist/components/Branding/Attribution.js.map +1 -0
- package/dist/components/Branding/Logo.d.ts +39 -0
- package/dist/components/Branding/Logo.d.ts.map +1 -0
- package/dist/components/Branding/Logo.js +67 -0
- package/dist/components/Branding/Logo.js.map +1 -0
- package/dist/components/Branding/ThemeProvider.d.ts +85 -0
- package/dist/components/Branding/ThemeProvider.d.ts.map +1 -0
- package/dist/components/Branding/ThemeProvider.js +186 -0
- package/dist/components/Branding/ThemeProvider.js.map +1 -0
- package/dist/components/Branding/index.d.ts +12 -0
- package/dist/components/Branding/index.d.ts.map +1 -0
- package/dist/components/Branding/index.js +9 -0
- package/dist/components/Branding/index.js.map +1 -0
- package/dist/components/Dashboard/DashboardFooter.d.ts +30 -0
- package/dist/components/Dashboard/DashboardFooter.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardFooter.js +68 -0
- package/dist/components/Dashboard/DashboardFooter.js.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts +24 -0
- package/dist/components/Dashboard/DashboardHeader.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardHeader.js +87 -0
- package/dist/components/Dashboard/DashboardHeader.js.map +1 -0
- package/dist/components/Dashboard/DashboardLayout.d.ts +71 -0
- package/dist/components/Dashboard/DashboardLayout.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardLayout.js +52 -0
- package/dist/components/Dashboard/DashboardLayout.js.map +1 -0
- package/dist/components/Dashboard/DashboardSidebar.d.ts +26 -0
- package/dist/components/Dashboard/DashboardSidebar.d.ts.map +1 -0
- package/dist/components/Dashboard/DashboardSidebar.js +146 -0
- package/dist/components/Dashboard/DashboardSidebar.js.map +1 -0
- package/dist/components/Dashboard/EmptyState.d.ts +84 -0
- package/dist/components/Dashboard/EmptyState.d.ts.map +1 -0
- package/dist/components/Dashboard/EmptyState.js +99 -0
- package/dist/components/Dashboard/EmptyState.js.map +1 -0
- package/dist/components/Dashboard/KPICard.d.ts +58 -0
- package/dist/components/Dashboard/KPICard.d.ts.map +1 -0
- package/dist/components/Dashboard/KPICard.js +82 -0
- package/dist/components/Dashboard/KPICard.js.map +1 -0
- package/dist/components/Dashboard/LoadingSkeleton.d.ts +58 -0
- package/dist/components/Dashboard/LoadingSkeleton.d.ts.map +1 -0
- package/dist/components/Dashboard/LoadingSkeleton.js +105 -0
- package/dist/components/Dashboard/LoadingSkeleton.js.map +1 -0
- package/dist/components/Dashboard/StatusBadge.d.ts +57 -0
- package/dist/components/Dashboard/StatusBadge.d.ts.map +1 -0
- package/dist/components/Dashboard/StatusBadge.js +149 -0
- package/dist/components/Dashboard/StatusBadge.js.map +1 -0
- package/dist/components/Dashboard/index.d.ts +19 -0
- package/dist/components/Dashboard/index.d.ts.map +1 -0
- package/dist/components/Dashboard/index.js +18 -0
- package/dist/components/Dashboard/index.js.map +1 -0
- package/dist/components/InAppWallet/EmailLoginButton.d.ts +27 -0
- package/dist/components/InAppWallet/EmailLoginButton.d.ts.map +1 -0
- package/dist/components/InAppWallet/EmailLoginButton.js +84 -0
- package/dist/components/InAppWallet/EmailLoginButton.js.map +1 -0
- package/dist/components/InAppWallet/InAppWalletProvider.d.ts +54 -0
- package/dist/components/InAppWallet/InAppWalletProvider.d.ts.map +1 -0
- package/dist/components/InAppWallet/InAppWalletProvider.js +238 -0
- package/dist/components/InAppWallet/InAppWalletProvider.js.map +1 -0
- package/dist/components/InAppWallet/OnboardingFlow.d.ts +25 -0
- package/dist/components/InAppWallet/OnboardingFlow.d.ts.map +1 -0
- package/dist/components/InAppWallet/OnboardingFlow.js +159 -0
- package/dist/components/InAppWallet/OnboardingFlow.js.map +1 -0
- package/dist/components/InAppWallet/SocialLoginButtons.d.ts +28 -0
- package/dist/components/InAppWallet/SocialLoginButtons.d.ts.map +1 -0
- package/dist/components/InAppWallet/SocialLoginButtons.js +128 -0
- package/dist/components/InAppWallet/SocialLoginButtons.js.map +1 -0
- package/dist/components/InAppWallet/index.d.ts +15 -0
- package/dist/components/InAppWallet/index.d.ts.map +1 -0
- package/dist/components/InAppWallet/index.js +14 -0
- package/dist/components/InAppWallet/index.js.map +1 -0
- package/dist/components/Onramp/BuyUSDCButton.d.ts +27 -0
- package/dist/components/Onramp/BuyUSDCButton.d.ts.map +1 -0
- package/dist/components/Onramp/BuyUSDCButton.js +70 -0
- package/dist/components/Onramp/BuyUSDCButton.js.map +1 -0
- package/dist/components/Onramp/OnrampWidget.d.ts +38 -0
- package/dist/components/Onramp/OnrampWidget.d.ts.map +1 -0
- package/dist/components/Onramp/OnrampWidget.js +105 -0
- package/dist/components/Onramp/OnrampWidget.js.map +1 -0
- package/dist/components/Onramp/index.d.ts +14 -0
- package/dist/components/Onramp/index.d.ts.map +1 -0
- package/dist/components/Onramp/index.js +12 -0
- package/dist/components/Onramp/index.js.map +1 -0
- package/dist/components/Payments/CheckoutModal.d.ts +19 -0
- package/dist/components/Payments/CheckoutModal.d.ts.map +1 -0
- package/dist/components/Payments/CheckoutModal.js +183 -0
- package/dist/components/Payments/CheckoutModal.js.map +1 -0
- package/dist/components/Payments/SubscriptionWidget.d.ts +17 -0
- package/dist/components/Payments/SubscriptionWidget.d.ts.map +1 -0
- package/dist/components/Payments/SubscriptionWidget.js +89 -0
- package/dist/components/Payments/SubscriptionWidget.js.map +1 -0
- package/dist/components/Payments/constants.d.ts +59 -0
- package/dist/components/Payments/constants.d.ts.map +1 -0
- package/dist/components/Payments/constants.js +145 -0
- package/dist/components/Payments/constants.js.map +1 -0
- package/dist/components/Payments/index.d.ts +10 -0
- package/dist/components/Payments/index.d.ts.map +1 -0
- package/dist/components/Payments/index.js +12 -0
- package/dist/components/Payments/index.js.map +1 -0
- package/dist/components/Payments/types.d.ts +119 -0
- package/dist/components/Payments/types.d.ts.map +1 -0
- package/dist/components/Payments/types.js +27 -0
- package/dist/components/Payments/types.js.map +1 -0
- package/dist/components/Payments/usePayments.d.ts +33 -0
- package/dist/components/Payments/usePayments.d.ts.map +1 -0
- package/dist/components/Payments/usePayments.js +249 -0
- package/dist/components/Payments/usePayments.js.map +1 -0
- package/dist/components/Privy/InitTimeoutScreen.d.ts +62 -0
- package/dist/components/Privy/InitTimeoutScreen.d.ts.map +1 -0
- package/dist/components/Privy/InitTimeoutScreen.js +64 -0
- package/dist/components/Privy/InitTimeoutScreen.js.map +1 -0
- package/dist/components/Privy/InitializingScreen.d.ts +56 -0
- package/dist/components/Privy/InitializingScreen.d.ts.map +1 -0
- package/dist/components/Privy/InitializingScreen.js +60 -0
- package/dist/components/Privy/InitializingScreen.js.map +1 -0
- package/dist/components/Privy/PrivyLoginButton.d.ts +27 -0
- package/dist/components/Privy/PrivyLoginButton.d.ts.map +1 -0
- package/dist/components/Privy/PrivyLoginButton.js +48 -0
- package/dist/components/Privy/PrivyLoginButton.js.map +1 -0
- package/dist/components/Privy/PrivyProtectedRoute.d.ts +22 -0
- package/dist/components/Privy/PrivyProtectedRoute.d.ts.map +1 -0
- package/dist/components/Privy/PrivyProtectedRoute.js +46 -0
- package/dist/components/Privy/PrivyProtectedRoute.js.map +1 -0
- package/dist/components/Privy/PrivyReadyGate.d.ts +69 -0
- package/dist/components/Privy/PrivyReadyGate.d.ts.map +1 -0
- package/dist/components/Privy/PrivyReadyGate.js +83 -0
- package/dist/components/Privy/PrivyReadyGate.js.map +1 -0
- package/dist/components/Privy/PrivyUserProfile.d.ts +25 -0
- package/dist/components/Privy/PrivyUserProfile.d.ts.map +1 -0
- package/dist/components/Privy/PrivyUserProfile.js +98 -0
- package/dist/components/Privy/PrivyUserProfile.js.map +1 -0
- package/dist/components/Privy/index.d.ts +21 -0
- package/dist/components/Privy/index.d.ts.map +1 -0
- package/dist/components/Privy/index.js +16 -0
- package/dist/components/Privy/index.js.map +1 -0
- package/dist/components/SIWE/AuthStatus.d.ts +15 -0
- package/dist/components/SIWE/AuthStatus.d.ts.map +1 -0
- package/dist/components/SIWE/AuthStatus.js +47 -0
- package/dist/components/SIWE/AuthStatus.js.map +1 -0
- package/dist/components/SIWE/ProtectedRoute.d.ts +17 -0
- package/dist/components/SIWE/ProtectedRoute.d.ts.map +1 -0
- package/dist/components/SIWE/ProtectedRoute.js +52 -0
- package/dist/components/SIWE/ProtectedRoute.js.map +1 -0
- package/dist/components/SIWE/SIWEButton.d.ts +22 -0
- package/dist/components/SIWE/SIWEButton.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEButton.js +106 -0
- package/dist/components/SIWE/SIWEButton.js.map +1 -0
- package/dist/components/SIWE/SIWEModal.d.ts +19 -0
- package/dist/components/SIWE/SIWEModal.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEModal.js +75 -0
- package/dist/components/SIWE/SIWEModal.js.map +1 -0
- package/dist/components/SIWE/SIWEProvider.d.ts +38 -0
- package/dist/components/SIWE/SIWEProvider.d.ts.map +1 -0
- package/dist/components/SIWE/SIWEProvider.js +227 -0
- package/dist/components/SIWE/SIWEProvider.js.map +1 -0
- package/dist/components/SIWE/index.d.ts +15 -0
- package/dist/components/SIWE/index.d.ts.map +1 -0
- package/dist/components/SIWE/index.js +10 -0
- package/dist/components/SIWE/index.js.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/templates/Finance/FinanceDashboard.d.ts +15 -0
- package/dist/components/templates/Finance/FinanceDashboard.d.ts.map +1 -0
- package/dist/components/templates/Finance/FinanceDashboard.js +112 -0
- package/dist/components/templates/Finance/FinanceDashboard.js.map +1 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts +15 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.d.ts.map +1 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.js +121 -0
- package/dist/components/templates/Healthcare/HealthcareDashboard.js.map +1 -0
- package/dist/components/templates/ISO/ISODashboard.d.ts +15 -0
- package/dist/components/templates/ISO/ISODashboard.d.ts.map +1 -0
- package/dist/components/templates/ISO/ISODashboard.js +184 -0
- package/dist/components/templates/ISO/ISODashboard.js.map +1 -0
- package/dist/components/templates/Retail/RetailDashboard.d.ts +15 -0
- package/dist/components/templates/Retail/RetailDashboard.d.ts.map +1 -0
- package/dist/components/templates/Retail/RetailDashboard.js +151 -0
- package/dist/components/templates/Retail/RetailDashboard.js.map +1 -0
- package/dist/components/templates/index.d.ts +14 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/components/templates/index.js +14 -0
- package/dist/components/templates/index.js.map +1 -0
- package/dist/config/chains.d.ts +23 -0
- package/dist/config/chains.d.ts.map +1 -0
- package/dist/config/chains.js +55 -0
- package/dist/config/chains.js.map +1 -0
- package/dist/core/VarityClient.d.ts +76 -0
- package/dist/core/VarityClient.d.ts.map +1 -0
- package/dist/core/VarityClient.js +99 -0
- package/dist/core/VarityClient.js.map +1 -0
- package/dist/core/config.d.ts +136 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +156 -0
- package/dist/core/config.js.map +1 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAnalytics.d.ts +94 -0
- package/dist/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/hooks/useAnalytics.js +116 -0
- package/dist/hooks/useAnalytics.js.map +1 -0
- package/dist/hooks/useAuth.d.ts +71 -0
- package/dist/hooks/useAuth.d.ts.map +1 -0
- package/dist/hooks/useAuth.js +198 -0
- package/dist/hooks/useAuth.js.map +1 -0
- package/dist/hooks/useDashboard.d.ts +110 -0
- package/dist/hooks/useDashboard.d.ts.map +1 -0
- package/dist/hooks/useDashboard.js +201 -0
- package/dist/hooks/useDashboard.js.map +1 -0
- package/dist/hooks/useVarityAPI.d.ts +88 -0
- package/dist/hooks/useVarityAPI.d.ts.map +1 -0
- package/dist/hooks/useVarityAPI.js +138 -0
- package/dist/hooks/useVarityAPI.js.map +1 -0
- package/dist/hooks/useWalletAuth.d.ts +108 -0
- package/dist/hooks/useWalletAuth.d.ts.map +1 -0
- package/dist/hooks/useWalletAuth.js +415 -0
- package/dist/hooks/useWalletAuth.js.map +1 -0
- package/dist/hooks/web3/index.d.ts +5 -0
- package/dist/hooks/web3/index.d.ts.map +1 -0
- package/dist/hooks/web3/index.js +6 -0
- package/dist/hooks/web3/index.js.map +1 -0
- package/dist/hooks/web3/useAddressValidation.d.ts +37 -0
- package/dist/hooks/web3/useAddressValidation.d.ts.map +1 -0
- package/dist/hooks/web3/useAddressValidation.js +59 -0
- package/dist/hooks/web3/useAddressValidation.js.map +1 -0
- package/dist/hooks/web3/useBlockExplorer.d.ts +37 -0
- package/dist/hooks/web3/useBlockExplorer.d.ts.map +1 -0
- package/dist/hooks/web3/useBlockExplorer.js +59 -0
- package/dist/hooks/web3/useBlockExplorer.js.map +1 -0
- package/dist/hooks/web3/useUSDCFormat.d.ts +34 -0
- package/dist/hooks/web3/useUSDCFormat.d.ts.map +1 -0
- package/dist/hooks/web3/useUSDCFormat.js +43 -0
- package/dist/hooks/web3/useUSDCFormat.js.map +1 -0
- package/dist/hooks/web3/useVarityWallet.d.ts +48 -0
- package/dist/hooks/web3/useVarityWallet.d.ts.map +1 -0
- package/dist/hooks/web3/useVarityWallet.js +70 -0
- package/dist/hooks/web3/useVarityWallet.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/analytics/AnalyticsClient.d.ts +72 -0
- package/dist/modules/analytics/AnalyticsClient.d.ts.map +1 -0
- package/dist/modules/analytics/AnalyticsClient.js +56 -0
- package/dist/modules/analytics/AnalyticsClient.js.map +1 -0
- package/dist/modules/analytics/index.d.ts +2 -0
- package/dist/modules/analytics/index.d.ts.map +1 -0
- package/dist/modules/analytics/index.js +2 -0
- package/dist/modules/analytics/index.js.map +1 -0
- package/dist/modules/auth/AuthClient.d.ts +41 -0
- package/dist/modules/auth/AuthClient.d.ts.map +1 -0
- package/dist/modules/auth/AuthClient.js +36 -0
- package/dist/modules/auth/AuthClient.js.map +1 -0
- package/dist/modules/auth/index.d.ts +2 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +2 -0
- package/dist/modules/auth/index.js.map +1 -0
- package/dist/modules/cache/CacheClient.d.ts +48 -0
- package/dist/modules/cache/CacheClient.d.ts.map +1 -0
- package/dist/modules/cache/CacheClient.js +59 -0
- package/dist/modules/cache/CacheClient.js.map +1 -0
- package/dist/modules/cache/index.d.ts +2 -0
- package/dist/modules/cache/index.d.ts.map +1 -0
- package/dist/modules/cache/index.js +2 -0
- package/dist/modules/cache/index.js.map +1 -0
- package/dist/modules/compute/ComputeClient.d.ts +54 -0
- package/dist/modules/compute/ComputeClient.d.ts.map +1 -0
- package/dist/modules/compute/ComputeClient.js +39 -0
- package/dist/modules/compute/ComputeClient.js.map +1 -0
- package/dist/modules/compute/index.d.ts +2 -0
- package/dist/modules/compute/index.d.ts.map +1 -0
- package/dist/modules/compute/index.js +2 -0
- package/dist/modules/compute/index.js.map +1 -0
- package/dist/modules/export/ExportClient.d.ts +56 -0
- package/dist/modules/export/ExportClient.d.ts.map +1 -0
- package/dist/modules/export/ExportClient.js +42 -0
- package/dist/modules/export/ExportClient.js.map +1 -0
- package/dist/modules/export/index.d.ts +2 -0
- package/dist/modules/export/index.d.ts.map +1 -0
- package/dist/modules/export/index.js +2 -0
- package/dist/modules/export/index.js.map +1 -0
- package/dist/modules/forecasting/ForecastingClient.d.ts +112 -0
- package/dist/modules/forecasting/ForecastingClient.d.ts.map +1 -0
- package/dist/modules/forecasting/ForecastingClient.js +48 -0
- package/dist/modules/forecasting/ForecastingClient.js.map +1 -0
- package/dist/modules/forecasting/index.d.ts +2 -0
- package/dist/modules/forecasting/index.d.ts.map +1 -0
- package/dist/modules/forecasting/index.js +2 -0
- package/dist/modules/forecasting/index.js.map +1 -0
- package/dist/modules/monitoring/MonitoringClient.d.ts +67 -0
- package/dist/modules/monitoring/MonitoringClient.d.ts.map +1 -0
- package/dist/modules/monitoring/MonitoringClient.js +48 -0
- package/dist/modules/monitoring/MonitoringClient.js.map +1 -0
- package/dist/modules/monitoring/index.d.ts +2 -0
- package/dist/modules/monitoring/index.d.ts.map +1 -0
- package/dist/modules/monitoring/index.js +2 -0
- package/dist/modules/monitoring/index.js.map +1 -0
- package/dist/modules/notifications/NotificationsClient.d.ts +68 -0
- package/dist/modules/notifications/NotificationsClient.d.ts.map +1 -0
- package/dist/modules/notifications/NotificationsClient.js +50 -0
- package/dist/modules/notifications/NotificationsClient.js.map +1 -0
- package/dist/modules/notifications/index.d.ts +2 -0
- package/dist/modules/notifications/index.d.ts.map +1 -0
- package/dist/modules/notifications/index.js +2 -0
- package/dist/modules/notifications/index.js.map +1 -0
- package/dist/modules/oracle/OracleClient.d.ts +48 -0
- package/dist/modules/oracle/OracleClient.d.ts.map +1 -0
- package/dist/modules/oracle/OracleClient.js +34 -0
- package/dist/modules/oracle/OracleClient.js.map +1 -0
- package/dist/modules/oracle/index.d.ts +2 -0
- package/dist/modules/oracle/index.d.ts.map +1 -0
- package/dist/modules/oracle/index.js +2 -0
- package/dist/modules/oracle/index.js.map +1 -0
- package/dist/modules/storage/StorageClient.d.ts +44 -0
- package/dist/modules/storage/StorageClient.d.ts.map +1 -0
- package/dist/modules/storage/StorageClient.js +43 -0
- package/dist/modules/storage/StorageClient.js.map +1 -0
- package/dist/modules/storage/index.d.ts +2 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +2 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/modules/templates/TemplateDeploymentClient.d.ts +208 -0
- package/dist/modules/templates/TemplateDeploymentClient.d.ts.map +1 -0
- package/dist/modules/templates/TemplateDeploymentClient.js +101 -0
- package/dist/modules/templates/TemplateDeploymentClient.js.map +1 -0
- package/dist/modules/templates/index.d.ts +8 -0
- package/dist/modules/templates/index.d.ts.map +1 -0
- package/dist/modules/templates/index.js +7 -0
- package/dist/modules/templates/index.js.map +1 -0
- package/dist/modules/webhooks/WebhooksClient.d.ts +85 -0
- package/dist/modules/webhooks/WebhooksClient.d.ts.map +1 -0
- package/dist/modules/webhooks/WebhooksClient.js +68 -0
- package/dist/modules/webhooks/WebhooksClient.js.map +1 -0
- package/dist/modules/webhooks/index.d.ts +2 -0
- package/dist/modules/webhooks/index.d.ts.map +1 -0
- package/dist/modules/webhooks/index.js +2 -0
- package/dist/modules/webhooks/index.js.map +1 -0
- package/dist/modules/zk/ZKClient.d.ts +67 -0
- package/dist/modules/zk/ZKClient.d.ts.map +1 -0
- package/dist/modules/zk/ZKClient.js +36 -0
- package/dist/modules/zk/ZKClient.js.map +1 -0
- package/dist/modules/zk/index.d.ts +2 -0
- package/dist/modules/zk/index.d.ts.map +1 -0
- package/dist/modules/zk/index.js +2 -0
- package/dist/modules/zk/index.js.map +1 -0
- package/dist/providers/ChainContext.d.ts +65 -0
- package/dist/providers/ChainContext.d.ts.map +1 -0
- package/dist/providers/ChainContext.js +92 -0
- package/dist/providers/ChainContext.js.map +1 -0
- package/dist/providers/PrivyProvider.d.ts +42 -0
- package/dist/providers/PrivyProvider.d.ts.map +1 -0
- package/dist/providers/PrivyProvider.js +131 -0
- package/dist/providers/PrivyProvider.js.map +1 -0
- package/dist/providers/PrivyStack.d.ts +165 -0
- package/dist/providers/PrivyStack.d.ts.map +1 -0
- package/dist/providers/PrivyStack.js +295 -0
- package/dist/providers/PrivyStack.js.map +1 -0
- package/dist/providers/VarityDashboardProvider.d.ts +90 -0
- package/dist/providers/VarityDashboardProvider.d.ts.map +1 -0
- package/dist/providers/VarityDashboardProvider.js +242 -0
- package/dist/providers/VarityDashboardProvider.js.map +1 -0
- package/dist/providers/VarityProvider.d.ts +32 -0
- package/dist/providers/VarityProvider.d.ts.map +1 -0
- package/dist/providers/VarityProvider.js +56 -0
- package/dist/providers/VarityProvider.js.map +1 -0
- package/dist/providers/WalletContext.d.ts +68 -0
- package/dist/providers/WalletContext.d.ts.map +1 -0
- package/dist/providers/WalletContext.js +98 -0
- package/dist/providers/WalletContext.js.map +1 -0
- package/dist/providers/WalletSyncProvider.d.ts +84 -0
- package/dist/providers/WalletSyncProvider.d.ts.map +1 -0
- package/dist/providers/WalletSyncProvider.js +132 -0
- package/dist/providers/WalletSyncProvider.js.map +1 -0
- package/dist/providers/index.d.ts +47 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +51 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/tests/mocks/httpClient.mock.d.ts +62 -0
- package/dist/tests/mocks/httpClient.mock.d.ts.map +1 -0
- package/dist/tests/mocks/httpClient.mock.js +108 -0
- package/dist/tests/mocks/httpClient.mock.js.map +1 -0
- package/dist/tests/setup.d.ts +6 -0
- package/dist/tests/setup.d.ts.map +1 -0
- package/dist/tests/setup.js +51 -0
- package/dist/tests/setup.js.map +1 -0
- package/dist/types/api-extensions.d.ts +92 -0
- package/dist/types/api-extensions.d.ts.map +1 -0
- package/dist/types/api-extensions.js +7 -0
- package/dist/types/api-extensions.js.map +1 -0
- package/dist/utils/http.d.ts +51 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +104 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/wallets/SimpleSmartWallet.d.ts +68 -0
- package/dist/wallets/SimpleSmartWallet.d.ts.map +1 -0
- package/dist/wallets/SimpleSmartWallet.js +74 -0
- package/dist/wallets/SimpleSmartWallet.js.map +1 -0
- package/dist/wallets/SmartWalletProvider.d.ts +217 -0
- package/dist/wallets/SmartWalletProvider.d.ts.map +1 -0
- package/dist/wallets/SmartWalletProvider.js +366 -0
- package/dist/wallets/SmartWalletProvider.js.map +1 -0
- package/dist/wallets/config.d.ts +199 -0
- package/dist/wallets/config.d.ts.map +1 -0
- package/dist/wallets/config.js +183 -0
- package/dist/wallets/config.js.map +1 -0
- package/dist/wallets/index.d.ts +9 -0
- package/dist/wallets/index.d.ts.map +1 -0
- package/dist/wallets/index.js +9 -0
- package/dist/wallets/index.js.map +1 -0
- package/dist/web3/AddressDisplay/AddressDisplay.d.ts +33 -0
- package/dist/web3/AddressDisplay/AddressDisplay.d.ts.map +1 -0
- package/dist/web3/AddressDisplay/AddressDisplay.js +42 -0
- package/dist/web3/AddressDisplay/AddressDisplay.js.map +1 -0
- package/dist/web3/AddressInput/AddressInput.d.ts +36 -0
- package/dist/web3/AddressInput/AddressInput.d.ts.map +1 -0
- package/dist/web3/AddressInput/AddressInput.js +54 -0
- package/dist/web3/AddressInput/AddressInput.js.map +1 -0
- package/dist/web3/AmountInput/AmountInput.d.ts +41 -0
- package/dist/web3/AmountInput/AmountInput.d.ts.map +1 -0
- package/dist/web3/AmountInput/AmountInput.js +74 -0
- package/dist/web3/AmountInput/AmountInput.js.map +1 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts +30 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts.map +1 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.js +35 -0
- package/dist/web3/BalanceDisplay/BalanceDisplay.js.map +1 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts +41 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts.map +1 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.js +46 -0
- package/dist/web3/BlockExplorerLink/BlockExplorerLink.js.map +1 -0
- package/dist/web3/ConnectWallet/ConnectWallet.d.ts +35 -0
- package/dist/web3/ConnectWallet/ConnectWallet.d.ts.map +1 -0
- package/dist/web3/ConnectWallet/ConnectWallet.js +58 -0
- package/dist/web3/ConnectWallet/ConnectWallet.js.map +1 -0
- package/dist/web3/DisconnectButton/DisconnectButton.d.ts +30 -0
- package/dist/web3/DisconnectButton/DisconnectButton.d.ts.map +1 -0
- package/dist/web3/DisconnectButton/DisconnectButton.js +48 -0
- package/dist/web3/DisconnectButton/DisconnectButton.js.map +1 -0
- package/dist/web3/WalletBalance/WalletBalance.d.ts +27 -0
- package/dist/web3/WalletBalance/WalletBalance.d.ts.map +1 -0
- package/dist/web3/WalletBalance/WalletBalance.js +49 -0
- package/dist/web3/WalletBalance/WalletBalance.js.map +1 -0
- package/dist/web3/WalletDropdown/WalletDropdown.d.ts +29 -0
- package/dist/web3/WalletDropdown/WalletDropdown.d.ts.map +1 -0
- package/dist/web3/WalletDropdown/WalletDropdown.js +93 -0
- package/dist/web3/WalletDropdown/WalletDropdown.js.map +1 -0
- package/dist/web3/WalletInfo/WalletInfo.d.ts +31 -0
- package/dist/web3/WalletInfo/WalletInfo.d.ts.map +1 -0
- package/dist/web3/WalletInfo/WalletInfo.js +41 -0
- package/dist/web3/WalletInfo/WalletInfo.js.map +1 -0
- package/dist/web3/index.d.ts +11 -0
- package/dist/web3/index.d.ts.map +1 -0
- package/dist/web3/index.js +14 -0
- package/dist/web3/index.js.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DashboardLayout - Main layout wrapper for Varity dashboards
|
|
3
|
+
*
|
|
4
|
+
* Provides the primary layout structure with sidebar, header, and content area.
|
|
5
|
+
* Fully customizable through theming system.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ReactNode } from 'react';
|
|
8
|
+
export interface DashboardLayoutProps {
|
|
9
|
+
/** Content to render in the main area */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Whether to show the sidebar (default: true) */
|
|
12
|
+
showSidebar?: boolean;
|
|
13
|
+
/** Whether to show the header (default: true) */
|
|
14
|
+
showHeader?: boolean;
|
|
15
|
+
/** Whether to show the footer (default: true) */
|
|
16
|
+
showFooter?: boolean;
|
|
17
|
+
/** Custom sidebar width in pixels (default: 240) */
|
|
18
|
+
sidebarWidth?: number;
|
|
19
|
+
/** Custom header height in pixels (default: 64) */
|
|
20
|
+
headerHeight?: number;
|
|
21
|
+
/** Company logo URL */
|
|
22
|
+
logoUrl?: string;
|
|
23
|
+
/** Company name */
|
|
24
|
+
companyName?: string;
|
|
25
|
+
/** Navigation items for sidebar */
|
|
26
|
+
navigationItems?: NavigationItem[];
|
|
27
|
+
/** User information for header */
|
|
28
|
+
user?: UserInfo;
|
|
29
|
+
/** Callback when user clicks logout */
|
|
30
|
+
onLogout?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export interface NavigationItem {
|
|
33
|
+
/** Navigation item label */
|
|
34
|
+
label: string;
|
|
35
|
+
/** Navigation item icon (Material Icon name) */
|
|
36
|
+
icon?: string;
|
|
37
|
+
/** Navigation path */
|
|
38
|
+
path: string;
|
|
39
|
+
/** Whether item is active */
|
|
40
|
+
active?: boolean;
|
|
41
|
+
/** Sub-navigation items */
|
|
42
|
+
children?: NavigationItem[];
|
|
43
|
+
}
|
|
44
|
+
export interface UserInfo {
|
|
45
|
+
/** User's display name */
|
|
46
|
+
name: string;
|
|
47
|
+
/** User's wallet address */
|
|
48
|
+
address: string;
|
|
49
|
+
/** User's avatar URL */
|
|
50
|
+
avatarUrl?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* DashboardLayout Component
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <DashboardLayout
|
|
58
|
+
* companyName="Acme Corp"
|
|
59
|
+
* logoUrl="/logo.png"
|
|
60
|
+
* user={{ name: "John Doe", address: "0x..." }}
|
|
61
|
+
* navigationItems={[
|
|
62
|
+
* { label: "Dashboard", icon: "dashboard", path: "/" },
|
|
63
|
+
* { label: "Analytics", icon: "analytics", path: "/analytics" }
|
|
64
|
+
* ]}
|
|
65
|
+
* >
|
|
66
|
+
* <YourDashboardContent />
|
|
67
|
+
* </DashboardLayout>
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const DashboardLayout: React.FC<DashboardLayoutProps>;
|
|
71
|
+
//# sourceMappingURL=DashboardLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/DashboardLayout.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKxC,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,QAAQ,EAAE,SAAS,CAAA;IACnB,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,kCAAkC;IAClC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAA;CAC5B;AAED,MAAM,WAAW,QAAQ;IACvB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+D1D,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DashboardLayout - Main layout wrapper for Varity dashboards
|
|
3
|
+
*
|
|
4
|
+
* Provides the primary layout structure with sidebar, header, and content area.
|
|
5
|
+
* Fully customizable through theming system.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { DashboardHeader } from './DashboardHeader';
|
|
9
|
+
import { DashboardSidebar } from './DashboardSidebar';
|
|
10
|
+
import { DashboardFooter } from './DashboardFooter';
|
|
11
|
+
/**
|
|
12
|
+
* DashboardLayout Component
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <DashboardLayout
|
|
17
|
+
* companyName="Acme Corp"
|
|
18
|
+
* logoUrl="/logo.png"
|
|
19
|
+
* user={{ name: "John Doe", address: "0x..." }}
|
|
20
|
+
* navigationItems={[
|
|
21
|
+
* { label: "Dashboard", icon: "dashboard", path: "/" },
|
|
22
|
+
* { label: "Analytics", icon: "analytics", path: "/analytics" }
|
|
23
|
+
* ]}
|
|
24
|
+
* >
|
|
25
|
+
* <YourDashboardContent />
|
|
26
|
+
* </DashboardLayout>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const DashboardLayout = ({ children, showSidebar = true, showHeader = true, showFooter = true, sidebarWidth = 240, headerHeight = 64, logoUrl, companyName, navigationItems = [], user, onLogout }) => {
|
|
30
|
+
return (React.createElement("div", { className: "varity-dashboard-layout", style: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
minHeight: '100vh',
|
|
33
|
+
backgroundColor: 'var(--varity-bg-primary, #f5f5f5)'
|
|
34
|
+
} },
|
|
35
|
+
showSidebar && (React.createElement(DashboardSidebar, { width: sidebarWidth, logoUrl: logoUrl, companyName: companyName, navigationItems: navigationItems })),
|
|
36
|
+
React.createElement("div", { style: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
marginLeft: showSidebar ? sidebarWidth : 0,
|
|
41
|
+
transition: 'margin-left 0.3s ease'
|
|
42
|
+
} },
|
|
43
|
+
showHeader && (React.createElement(DashboardHeader, { height: headerHeight, user: user, onLogout: onLogout })),
|
|
44
|
+
React.createElement("main", { style: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
padding: '24px',
|
|
47
|
+
marginTop: showHeader ? headerHeight : 0,
|
|
48
|
+
overflow: 'auto'
|
|
49
|
+
} }, children),
|
|
50
|
+
showFooter && (React.createElement(DashboardFooter, { companyName: companyName })))));
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=DashboardLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardLayout.js","sourceRoot":"","sources":["../../../src/components/Dashboard/DashboardLayout.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAiDnD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,WAAW,GAAG,IAAI,EAClB,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,YAAY,GAAG,GAAG,EAClB,YAAY,GAAG,EAAE,EACjB,OAAO,EACP,WAAW,EACX,eAAe,GAAG,EAAE,EACpB,IAAI,EACJ,QAAQ,EACT,EAAE,EAAE;IACH,OAAO,CACL,6BAAK,SAAS,EAAC,yBAAyB,EAAC,KAAK,EAAE;YAC9C,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,OAAO;YAClB,eAAe,EAAE,mCAAmC;SACrD;QAEE,WAAW,IAAI,CACd,oBAAC,gBAAgB,IACf,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,GAChC,CACH;QAGD,6BAAK,KAAK,EAAE;gBACV,IAAI,EAAE,CAAC;gBACP,OAAO,EAAE,MAAM;gBACf,aAAa,EAAE,QAAQ;gBACvB,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBAC1C,UAAU,EAAE,uBAAuB;aACpC;YAEE,UAAU,IAAI,CACb,oBAAC,eAAe,IACd,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,GAClB,CACH;YAGD,8BAAM,KAAK,EAAE;oBACX,IAAI,EAAE,CAAC;oBACP,OAAO,EAAE,MAAM;oBACf,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBACxC,QAAQ,EAAE,MAAM;iBACjB,IACE,QAAQ,CACJ;YAGN,UAAU,IAAI,CACb,oBAAC,eAAe,IAAC,WAAW,EAAE,WAAW,GAAI,CAC9C,CACG,CACF,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DashboardSidebar - Navigation sidebar for Varity dashboards
|
|
3
|
+
*
|
|
4
|
+
* Provides main navigation with collapsible menu items.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { NavigationItem } from './DashboardLayout';
|
|
8
|
+
export interface DashboardSidebarProps {
|
|
9
|
+
/** Sidebar width in pixels */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Company logo URL */
|
|
12
|
+
logoUrl?: string;
|
|
13
|
+
/** Company name */
|
|
14
|
+
companyName?: string;
|
|
15
|
+
/** Navigation items */
|
|
16
|
+
navigationItems?: NavigationItem[];
|
|
17
|
+
/** Callback when navigation item is clicked */
|
|
18
|
+
onNavigate?: (path: string) => void;
|
|
19
|
+
/** Whether sidebar is collapsed */
|
|
20
|
+
collapsed?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* DashboardSidebar Component
|
|
24
|
+
*/
|
|
25
|
+
export declare const DashboardSidebar: React.FC<DashboardSidebarProps>;
|
|
26
|
+
//# sourceMappingURL=DashboardSidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardSidebar.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/DashboardSidebar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uBAAuB;IACvB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwL5D,CAAA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DashboardSidebar - Navigation sidebar for Varity dashboards
|
|
3
|
+
*
|
|
4
|
+
* Provides main navigation with collapsible menu items.
|
|
5
|
+
*/
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
/**
|
|
8
|
+
* DashboardSidebar Component
|
|
9
|
+
*/
|
|
10
|
+
export const DashboardSidebar = ({ width = 240, logoUrl, companyName = 'Dashboard', navigationItems = [], onNavigate, collapsed = false }) => {
|
|
11
|
+
const [expandedItems, setExpandedItems] = useState(new Set());
|
|
12
|
+
const toggleExpand = (label) => {
|
|
13
|
+
const newExpanded = new Set(expandedItems);
|
|
14
|
+
if (newExpanded.has(label)) {
|
|
15
|
+
newExpanded.delete(label);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
newExpanded.add(label);
|
|
19
|
+
}
|
|
20
|
+
setExpandedItems(newExpanded);
|
|
21
|
+
};
|
|
22
|
+
const handleNavigate = (path) => {
|
|
23
|
+
if (onNavigate) {
|
|
24
|
+
onNavigate(path);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const renderNavigationItem = (item, depth = 0) => {
|
|
28
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
29
|
+
const isExpanded = expandedItems.has(item.label);
|
|
30
|
+
return (React.createElement("div", { key: item.path, style: { marginLeft: `${depth * 16}px` } },
|
|
31
|
+
React.createElement("div", { className: `varity-nav-item ${item.active ? 'active' : ''}`, style: {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
padding: '12px 16px',
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
backgroundColor: item.active ? 'var(--varity-primary-color, #1976d2)' : 'transparent',
|
|
37
|
+
color: item.active ? 'white' : 'var(--varity-text-primary, #212121)',
|
|
38
|
+
borderRadius: '8px',
|
|
39
|
+
margin: '4px 8px',
|
|
40
|
+
transition: 'all 0.2s ease',
|
|
41
|
+
fontWeight: item.active ? 600 : 400
|
|
42
|
+
}, onClick: () => {
|
|
43
|
+
if (hasChildren) {
|
|
44
|
+
toggleExpand(item.label);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
handleNavigate(item.path);
|
|
48
|
+
}
|
|
49
|
+
}, onMouseEnter: (e) => {
|
|
50
|
+
if (!item.active) {
|
|
51
|
+
e.currentTarget.style.backgroundColor = 'var(--varity-bg-hover, #f0f0f0)';
|
|
52
|
+
}
|
|
53
|
+
}, onMouseLeave: (e) => {
|
|
54
|
+
if (!item.active) {
|
|
55
|
+
e.currentTarget.style.backgroundColor = 'transparent';
|
|
56
|
+
}
|
|
57
|
+
} },
|
|
58
|
+
item.icon && (React.createElement("span", { style: { marginRight: '12px', fontSize: '20px' } }, getIconForName(item.icon))),
|
|
59
|
+
React.createElement("span", { style: { flex: 1, fontSize: '14px' } }, item.label),
|
|
60
|
+
hasChildren && (React.createElement("span", { style: { fontSize: '12px' } }, isExpanded ? '▼' : '▶'))),
|
|
61
|
+
hasChildren && isExpanded && (React.createElement("div", null, item.children.map((child) => renderNavigationItem(child, depth + 1))))));
|
|
62
|
+
};
|
|
63
|
+
return (React.createElement("aside", { className: "varity-dashboard-sidebar", style: {
|
|
64
|
+
position: 'fixed',
|
|
65
|
+
top: 0,
|
|
66
|
+
left: 0,
|
|
67
|
+
width: collapsed ? '64px' : `${width}px`,
|
|
68
|
+
height: '100vh',
|
|
69
|
+
backgroundColor: 'var(--varity-bg-sidebar, #ffffff)',
|
|
70
|
+
borderRight: '1px solid var(--varity-border-color, #e0e0e0)',
|
|
71
|
+
display: 'flex',
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
transition: 'width 0.3s ease',
|
|
74
|
+
zIndex: 1001,
|
|
75
|
+
overflowY: 'auto',
|
|
76
|
+
overflowX: 'hidden'
|
|
77
|
+
} },
|
|
78
|
+
React.createElement("div", { style: {
|
|
79
|
+
padding: '20px 16px',
|
|
80
|
+
borderBottom: '1px solid var(--varity-border-color, #e0e0e0)',
|
|
81
|
+
display: 'flex',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
gap: '12px'
|
|
84
|
+
} },
|
|
85
|
+
logoUrl && (React.createElement("img", { src: logoUrl, alt: `${companyName} logo`, style: {
|
|
86
|
+
height: '32px',
|
|
87
|
+
width: 'auto',
|
|
88
|
+
maxWidth: collapsed ? '32px' : '100%'
|
|
89
|
+
} })),
|
|
90
|
+
!collapsed && !logoUrl && (React.createElement("h1", { style: {
|
|
91
|
+
margin: 0,
|
|
92
|
+
fontSize: '18px',
|
|
93
|
+
fontWeight: 600,
|
|
94
|
+
color: 'var(--varity-primary-color, #1976d2)'
|
|
95
|
+
} }, companyName))),
|
|
96
|
+
React.createElement("nav", { style: { flex: 1, padding: '16px 0' } }, navigationItems.map((item) => renderNavigationItem(item))),
|
|
97
|
+
!collapsed && (React.createElement("div", { style: {
|
|
98
|
+
padding: '16px',
|
|
99
|
+
borderTop: '1px solid var(--varity-border-color, #e0e0e0)',
|
|
100
|
+
textAlign: 'center'
|
|
101
|
+
} },
|
|
102
|
+
React.createElement("span", { style: {
|
|
103
|
+
fontSize: '12px',
|
|
104
|
+
color: 'var(--varity-text-secondary, #757575)'
|
|
105
|
+
} },
|
|
106
|
+
"Powered by",
|
|
107
|
+
' ',
|
|
108
|
+
React.createElement("a", { href: "https://varity.com", target: "_blank", rel: "noopener noreferrer", style: {
|
|
109
|
+
color: 'var(--varity-primary-color, #1976d2)',
|
|
110
|
+
textDecoration: 'none',
|
|
111
|
+
fontWeight: 600
|
|
112
|
+
} }, "Varity"))))));
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Helper function to get emoji icon for common icon names
|
|
116
|
+
*/
|
|
117
|
+
function getIconForName(iconName) {
|
|
118
|
+
const iconMap = {
|
|
119
|
+
dashboard: '📊',
|
|
120
|
+
analytics: '📈',
|
|
121
|
+
chart: '📉',
|
|
122
|
+
users: '👥',
|
|
123
|
+
settings: '⚙️',
|
|
124
|
+
profile: '👤',
|
|
125
|
+
storage: '💾',
|
|
126
|
+
compute: '🖥️',
|
|
127
|
+
ai: '🤖',
|
|
128
|
+
chat: '💬',
|
|
129
|
+
export: '📤',
|
|
130
|
+
import: '📥',
|
|
131
|
+
notification: '🔔',
|
|
132
|
+
webhook: '🔗',
|
|
133
|
+
oracle: '🔮',
|
|
134
|
+
zk: '🔐',
|
|
135
|
+
cache: '⚡',
|
|
136
|
+
monitoring: '📡',
|
|
137
|
+
forecasting: '🔭',
|
|
138
|
+
home: '🏠',
|
|
139
|
+
folder: '📁',
|
|
140
|
+
file: '📄',
|
|
141
|
+
help: '❓',
|
|
142
|
+
search: '🔍'
|
|
143
|
+
};
|
|
144
|
+
return iconMap[iconName.toLowerCase()] || '•';
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=DashboardSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardSidebar.js","sourceRoot":"","sources":["../../../src/components/Dashboard/DashboardSidebar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAkBvC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,KAAK,GAAG,GAAG,EACX,OAAO,EACP,WAAW,GAAG,WAAW,EACzB,eAAe,GAAG,EAAE,EACpB,UAAU,EACV,SAAS,GAAG,KAAK,EAClB,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAc,IAAI,GAAG,EAAE,CAAC,CAAA;IAE1E,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;QACrC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAA;QAC1C,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC3B,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC;QACD,gBAAgB,CAAC,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;aACpB;YAED,8BACE,KAAK,EAAE;oBACL,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,uCAAuC;iBAC/C;;gBAEU,GAAG;gBACd,2BACE,IAAI,EAAC,oBAAoB,EACzB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,KAAK,EAAE;wBACL,KAAK,EAAE,sCAAsC;wBAC7C,cAAc,EAAE,MAAM;wBACtB,UAAU,EAAE,GAAG;qBAChB,aAGC,CACC,CACH,CACP,CACK,CACT,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,OAAO,GAA2B;QACtC,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK;QACd,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,GAAG;QACV,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,IAAI;KACb,CAAA;IAED,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,CAAA;AAC/C,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface EmptyStateProps {
|
|
3
|
+
/** Title text */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Description text */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Icon to display */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Primary action button */
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
variant?: 'primary' | 'secondary';
|
|
14
|
+
};
|
|
15
|
+
/** Secondary action button */
|
|
16
|
+
secondaryAction?: {
|
|
17
|
+
label: string;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
};
|
|
20
|
+
/** Size variant */
|
|
21
|
+
size?: 'sm' | 'md' | 'lg';
|
|
22
|
+
/** Additional CSS class names */
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* EmptyState - Display when no data is available
|
|
27
|
+
*
|
|
28
|
+
* A component for displaying empty states with optional icons,
|
|
29
|
+
* descriptions, and action buttons. Useful for tables, lists,
|
|
30
|
+
* and other data displays when no data is available.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* import { EmptyState } from '@varity-labs/ui-kit';
|
|
35
|
+
*
|
|
36
|
+
* function DataList() {
|
|
37
|
+
* const { data, loading } = useData();
|
|
38
|
+
*
|
|
39
|
+
* if (!loading && data.length === 0) {
|
|
40
|
+
* return (
|
|
41
|
+
* <EmptyState
|
|
42
|
+
* title="No data found"
|
|
43
|
+
* description="Get started by adding your first item."
|
|
44
|
+
* icon={<FolderIcon />}
|
|
45
|
+
* action={{
|
|
46
|
+
* label: "Add Item",
|
|
47
|
+
* onClick: () => setShowAddModal(true),
|
|
48
|
+
* }}
|
|
49
|
+
* />
|
|
50
|
+
* );
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* return <List data={data} />;
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function EmptyState({ title, description, icon, action, secondaryAction, size, className, }: EmptyStateProps): React.JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* EmptyStatePresets - Common empty state configurations
|
|
60
|
+
*/
|
|
61
|
+
export declare const EmptyStatePresets: {
|
|
62
|
+
/**
|
|
63
|
+
* No search results
|
|
64
|
+
*/
|
|
65
|
+
NoResults: (props: Partial<EmptyStateProps>) => React.JSX.Element;
|
|
66
|
+
/**
|
|
67
|
+
* No data yet
|
|
68
|
+
*/
|
|
69
|
+
NoData: (props: Partial<EmptyStateProps>) => React.JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* No integrations connected
|
|
72
|
+
*/
|
|
73
|
+
NoIntegrations: (props: Partial<EmptyStateProps>) => React.JSX.Element;
|
|
74
|
+
/**
|
|
75
|
+
* Connection required
|
|
76
|
+
*/
|
|
77
|
+
ConnectionRequired: (props: Partial<EmptyStateProps>) => React.JSX.Element;
|
|
78
|
+
/**
|
|
79
|
+
* Coming soon
|
|
80
|
+
*/
|
|
81
|
+
ComingSoon: (props: Partial<EmptyStateProps>) => React.JSX.Element;
|
|
82
|
+
};
|
|
83
|
+
export default EmptyState;
|
|
84
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4BAA4B;IAC5B,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;KACnC,CAAC;IACF,8BAA8B;IAC9B,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,eAAe,EACf,IAAW,EACX,SAAc,GACf,EAAE,eAAe,qBA8EjB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;uBACgB,OAAO,CAAC,eAAe,CAAC;IAQ3C;;OAEG;oBACa,OAAO,CAAC,eAAe,CAAC;IAQxC;;OAEG;4BACqB,OAAO,CAAC,eAAe,CAAC;IAQhD;;OAEG;gCACyB,OAAO,CAAC,eAAe,CAAC;IAQpD;;OAEG;wBACiB,OAAO,CAAC,eAAe,CAAC;CAO7C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* EmptyState - Display when no data is available
|
|
4
|
+
*
|
|
5
|
+
* A component for displaying empty states with optional icons,
|
|
6
|
+
* descriptions, and action buttons. Useful for tables, lists,
|
|
7
|
+
* and other data displays when no data is available.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { EmptyState } from '@varity-labs/ui-kit';
|
|
12
|
+
*
|
|
13
|
+
* function DataList() {
|
|
14
|
+
* const { data, loading } = useData();
|
|
15
|
+
*
|
|
16
|
+
* if (!loading && data.length === 0) {
|
|
17
|
+
* return (
|
|
18
|
+
* <EmptyState
|
|
19
|
+
* title="No data found"
|
|
20
|
+
* description="Get started by adding your first item."
|
|
21
|
+
* icon={<FolderIcon />}
|
|
22
|
+
* action={{
|
|
23
|
+
* label: "Add Item",
|
|
24
|
+
* onClick: () => setShowAddModal(true),
|
|
25
|
+
* }}
|
|
26
|
+
* />
|
|
27
|
+
* );
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* return <List data={data} />;
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export function EmptyState({ title, description, icon, action, secondaryAction, size = 'md', className = '', }) {
|
|
35
|
+
const sizeStyles = {
|
|
36
|
+
sm: {
|
|
37
|
+
container: 'py-6 px-4',
|
|
38
|
+
icon: 'w-10 h-10',
|
|
39
|
+
iconWrapper: 'w-16 h-16',
|
|
40
|
+
title: 'text-base',
|
|
41
|
+
description: 'text-sm',
|
|
42
|
+
button: 'px-3 py-1.5 text-sm',
|
|
43
|
+
},
|
|
44
|
+
md: {
|
|
45
|
+
container: 'py-10 px-6',
|
|
46
|
+
icon: 'w-12 h-12',
|
|
47
|
+
iconWrapper: 'w-20 h-20',
|
|
48
|
+
title: 'text-lg',
|
|
49
|
+
description: 'text-sm',
|
|
50
|
+
button: 'px-4 py-2 text-sm',
|
|
51
|
+
},
|
|
52
|
+
lg: {
|
|
53
|
+
container: 'py-16 px-8',
|
|
54
|
+
icon: 'w-16 h-16',
|
|
55
|
+
iconWrapper: 'w-28 h-28',
|
|
56
|
+
title: 'text-xl',
|
|
57
|
+
description: 'text-base',
|
|
58
|
+
button: 'px-6 py-3 text-base',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
const styles = sizeStyles[size];
|
|
62
|
+
return (React.createElement("div", { className: `flex flex-col items-center justify-center text-center ${styles.container} ${className}` },
|
|
63
|
+
icon && (React.createElement("div", { className: `flex items-center justify-center ${styles.iconWrapper} bg-gray-100 rounded-full mb-4` },
|
|
64
|
+
React.createElement("div", { className: `text-gray-400 ${styles.icon}` }, icon))),
|
|
65
|
+
React.createElement("h3", { className: `font-semibold text-gray-900 ${styles.title}` }, title),
|
|
66
|
+
description && (React.createElement("p", { className: `mt-2 text-gray-500 max-w-sm ${styles.description}` }, description)),
|
|
67
|
+
(action || secondaryAction) && (React.createElement("div", { className: "mt-6 flex items-center gap-3" },
|
|
68
|
+
action && (React.createElement("button", { onClick: action.onClick, className: `${styles.button} font-medium rounded-lg transition-colors ${action.variant === 'secondary'
|
|
69
|
+
? 'bg-gray-100 text-gray-700 hover:bg-gray-200'
|
|
70
|
+
: 'bg-blue-600 text-white hover:bg-blue-700'}` }, action.label)),
|
|
71
|
+
secondaryAction && (React.createElement("button", { onClick: secondaryAction.onClick, className: `${styles.button} font-medium rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200 transition-colors` }, secondaryAction.label))))));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* EmptyStatePresets - Common empty state configurations
|
|
75
|
+
*/
|
|
76
|
+
export const EmptyStatePresets = {
|
|
77
|
+
/**
|
|
78
|
+
* No search results
|
|
79
|
+
*/
|
|
80
|
+
NoResults: (props) => (React.createElement(EmptyState, { title: "No results found", description: "Try adjusting your search or filter to find what you're looking for.", ...props })),
|
|
81
|
+
/**
|
|
82
|
+
* No data yet
|
|
83
|
+
*/
|
|
84
|
+
NoData: (props) => (React.createElement(EmptyState, { title: "No data yet", description: "Data will appear here once available.", ...props })),
|
|
85
|
+
/**
|
|
86
|
+
* No integrations connected
|
|
87
|
+
*/
|
|
88
|
+
NoIntegrations: (props) => (React.createElement(EmptyState, { title: "No integrations connected", description: "Connect your first integration to get started.", ...props })),
|
|
89
|
+
/**
|
|
90
|
+
* Connection required
|
|
91
|
+
*/
|
|
92
|
+
ConnectionRequired: (props) => (React.createElement(EmptyState, { title: "Connection required", description: "Please connect your account to access this data.", ...props })),
|
|
93
|
+
/**
|
|
94
|
+
* Coming soon
|
|
95
|
+
*/
|
|
96
|
+
ComingSoon: (props) => (React.createElement(EmptyState, { title: "Coming Soon", description: "This feature is currently under development.", ...props })),
|
|
97
|
+
};
|
|
98
|
+
export default EmptyState;
|
|
99
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/components/Dashboard/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA0BzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,eAAe,EACf,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,EAAE,GACE;IAChB,MAAM,UAAU,GAAG;QACjB,EAAE,EAAE;YACF,SAAS,EAAE,WAAW;YACtB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,qBAAqB;SAC9B;QACD,EAAE,EAAE;YACF,SAAS,EAAE,YAAY;YACvB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,mBAAmB;SAC5B;QACD,EAAE,EAAE;YACF,SAAS,EAAE,YAAY;YACvB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,WAAW;YACxB,MAAM,EAAE,qBAAqB;SAC9B;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAEhC,OAAO,CACL,6BACE,SAAS,EAAE,yDAAyD,MAAM,CAAC,SAAS,IAAI,SAAS,EAAE;QAElG,IAAI,IAAI,CACP,6BACE,SAAS,EAAE,oCAAoC,MAAM,CAAC,WAAW,gCAAgC;YAEjG,6BAAK,SAAS,EAAE,iBAAiB,MAAM,CAAC,IAAI,EAAE,IAAG,IAAI,CAAO,CACxD,CACP;QAED,4BAAI,SAAS,EAAE,+BAA+B,MAAM,CAAC,KAAK,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,EAC3B,WAAW,EAAC,kDAAkD,KAC1D,KAAK,GACT,CACH;IAED;;OAEG;IACH,UAAU,EAAE,CAAC,KAA+B,EAAE,EAAE,CAAC,CAC/C,oBAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,WAAW,EAAC,8CAA8C,KACtD,KAAK,GACT,CACH;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface KPICardProps {
|
|
3
|
+
/** Title of the KPI */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Main value to display */
|
|
6
|
+
value: string | number;
|
|
7
|
+
/** Optional subtitle or description */
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
/** Optional icon to display */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** Trend indicator (positive, negative, or neutral) */
|
|
12
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
13
|
+
/** Trend value (e.g., "+12%") */
|
|
14
|
+
trendValue?: string;
|
|
15
|
+
/** Whether the card is loading */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Click handler */
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
/** Additional CSS class names */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Card variant */
|
|
22
|
+
variant?: 'default' | 'outlined' | 'filled';
|
|
23
|
+
/** Card size */
|
|
24
|
+
size?: 'sm' | 'md' | 'lg';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* KPICard - Display Key Performance Indicator metrics
|
|
28
|
+
*
|
|
29
|
+
* A card component for displaying business metrics and KPIs with
|
|
30
|
+
* optional trend indicators and icons.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* import { KPICard } from '@varity-labs/ui-kit';
|
|
35
|
+
*
|
|
36
|
+
* function Dashboard() {
|
|
37
|
+
* return (
|
|
38
|
+
* <div className="grid grid-cols-4 gap-4">
|
|
39
|
+
* <KPICard
|
|
40
|
+
* title="Revenue"
|
|
41
|
+
* value="$12,345"
|
|
42
|
+
* trend="up"
|
|
43
|
+
* trendValue="+12%"
|
|
44
|
+
* icon={<DollarIcon />}
|
|
45
|
+
* />
|
|
46
|
+
* <KPICard
|
|
47
|
+
* title="Customers"
|
|
48
|
+
* value={1234}
|
|
49
|
+
* subtitle="Active users"
|
|
50
|
+
* />
|
|
51
|
+
* </div>
|
|
52
|
+
* );
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function KPICard({ title, value, subtitle, icon, trend, trendValue, loading, onClick, className, variant, size, }: KPICardProps): React.JSX.Element;
|
|
57
|
+
export default KPICard;
|
|
58
|
+
//# sourceMappingURL=KPICard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KPICard.d.ts","sourceRoot":"","sources":["../../../src/components/Dashboard/KPICard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC5C,gBAAgB;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,OAAe,EACf,OAAO,EACP,SAAc,EACd,OAAmB,EACnB,IAAW,GACZ,EAAE,YAAY,qBAmFd;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* KPICard - Display Key Performance Indicator metrics
|
|
4
|
+
*
|
|
5
|
+
* A card component for displaying business metrics and KPIs with
|
|
6
|
+
* optional trend indicators and icons.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { KPICard } from '@varity-labs/ui-kit';
|
|
11
|
+
*
|
|
12
|
+
* function Dashboard() {
|
|
13
|
+
* return (
|
|
14
|
+
* <div className="grid grid-cols-4 gap-4">
|
|
15
|
+
* <KPICard
|
|
16
|
+
* title="Revenue"
|
|
17
|
+
* value="$12,345"
|
|
18
|
+
* trend="up"
|
|
19
|
+
* trendValue="+12%"
|
|
20
|
+
* icon={<DollarIcon />}
|
|
21
|
+
* />
|
|
22
|
+
* <KPICard
|
|
23
|
+
* title="Customers"
|
|
24
|
+
* value={1234}
|
|
25
|
+
* subtitle="Active users"
|
|
26
|
+
* />
|
|
27
|
+
* </div>
|
|
28
|
+
* );
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function KPICard({ title, value, subtitle, icon, trend, trendValue, loading = false, onClick, className = '', variant = 'default', size = 'md', }) {
|
|
33
|
+
const baseStyles = 'rounded-lg transition-all duration-200';
|
|
34
|
+
const variantStyles = {
|
|
35
|
+
default: 'bg-white border border-gray-200 shadow-sm',
|
|
36
|
+
outlined: 'bg-transparent border-2 border-gray-300',
|
|
37
|
+
filled: 'bg-gray-50 border border-gray-100',
|
|
38
|
+
};
|
|
39
|
+
const sizeStyles = {
|
|
40
|
+
sm: 'p-3',
|
|
41
|
+
md: 'p-4',
|
|
42
|
+
lg: 'p-6',
|
|
43
|
+
};
|
|
44
|
+
const valueSizeStyles = {
|
|
45
|
+
sm: 'text-xl',
|
|
46
|
+
md: 'text-2xl',
|
|
47
|
+
lg: 'text-3xl',
|
|
48
|
+
};
|
|
49
|
+
const trendColors = {
|
|
50
|
+
up: 'text-green-600 bg-green-50',
|
|
51
|
+
down: 'text-red-600 bg-red-50',
|
|
52
|
+
neutral: 'text-gray-600 bg-gray-100',
|
|
53
|
+
};
|
|
54
|
+
const trendIcons = {
|
|
55
|
+
up: '↑',
|
|
56
|
+
down: '↓',
|
|
57
|
+
neutral: '→',
|
|
58
|
+
};
|
|
59
|
+
const interactiveStyles = onClick
|
|
60
|
+
? 'cursor-pointer hover:shadow-md hover:border-blue-300 active:scale-[0.98]'
|
|
61
|
+
: '';
|
|
62
|
+
if (loading) {
|
|
63
|
+
return (React.createElement("div", { className: `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${className} animate-pulse` },
|
|
64
|
+
React.createElement("div", { className: "flex items-center justify-between mb-2" },
|
|
65
|
+
React.createElement("div", { className: "h-4 bg-gray-200 rounded w-24" }),
|
|
66
|
+
icon && React.createElement("div", { className: "h-8 w-8 bg-gray-200 rounded" })),
|
|
67
|
+
React.createElement("div", { className: "h-8 bg-gray-200 rounded w-32 mb-2" }),
|
|
68
|
+
subtitle && React.createElement("div", { className: "h-3 bg-gray-200 rounded w-20" })));
|
|
69
|
+
}
|
|
70
|
+
return (React.createElement("div", { className: `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${interactiveStyles} ${className}`, onClick: onClick, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined },
|
|
71
|
+
React.createElement("div", { className: "flex items-center justify-between mb-2" },
|
|
72
|
+
React.createElement("h3", { className: "text-sm font-medium text-gray-600" }, title),
|
|
73
|
+
icon && React.createElement("div", { className: "text-gray-400" }, icon)),
|
|
74
|
+
React.createElement("div", { className: "flex items-baseline gap-2" },
|
|
75
|
+
React.createElement("span", { className: `font-bold text-gray-900 ${valueSizeStyles[size]}` }, value),
|
|
76
|
+
trend && trendValue && (React.createElement("span", { className: `inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs font-medium ${trendColors[trend]}` },
|
|
77
|
+
React.createElement("span", null, trendIcons[trend]),
|
|
78
|
+
React.createElement("span", null, trendValue)))),
|
|
79
|
+
subtitle && (React.createElement("p", { className: "mt-1 text-xs text-gray-500" }, subtitle))));
|
|
80
|
+
}
|
|
81
|
+
export default KPICard;
|
|
82
|
+
//# sourceMappingURL=KPICard.js.map
|