@vadimcomanescu/nadicode-design-system 2.0.6 → 2.0.8
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/.agents/skills/seed/SKILL.md +17 -8
- package/.agents/skills/seed/contract.md +5 -4
- package/.agents/skills/seed/intent-map.md +3 -3
- package/.agents/skills/seed/recipes/agents-chat.md +44 -20
- package/.agents/skills/seed/recipes/marketing-shell.md +10 -19
- package/.agents/skills/seed/recipes/navigation-shell.md +5 -5
- package/.agents/skills/seed/recipes/service-detail.md +1 -1
- package/.agents/skills/seed/references/blocks.md +30 -26
- package/.agents/skills/seed/references/brand-override.md +3 -1
- package/.agents/skills/seed/references/components.md +22 -2
- package/.agents/skills/seed/references/dashboard-patterns.md +12 -12
- package/.agents/skills/seed/references/nextjs.md +20 -80
- package/.agents/skills/seed/references/tokens.md +57 -248
- package/README.md +43 -215
- package/contracts/block-props-schemas.json +2186 -0
- package/contracts/component-props-schemas.json +8322 -0
- package/contracts/consumer-contract.json +178 -0
- package/contracts/consumer-intent-map.json +707 -0
- package/contracts/message-catalog-contract.json +820 -0
- package/contracts/page-kit-props-schemas.json +1894 -0
- package/contracts/public-surface-registry.json +6162 -0
- package/contracts/public-surface-registry.schema.json +227 -0
- package/contracts/release-governance-baseline.json +850 -0
- package/contracts/spec-manifest.json +46 -0
- package/css/tokens.css +300 -122
- package/dist/catalog.json +2166 -162
- package/dist/chunk-2BADJLMV.js +117 -0
- package/dist/chunk-35EX5FP5.js +106 -0
- package/dist/chunk-4IGBBIYW.js +47 -0
- package/dist/chunk-4WPZ6T7V.js +186 -0
- package/dist/chunk-5PZ4VR2D.js +142 -0
- package/dist/chunk-5UESKK6S.js +76 -0
- package/dist/chunk-7A2RXKGH.js +205 -0
- package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
- package/dist/chunk-AYWL4IYM.js +67 -0
- package/dist/chunk-C7WHMSF3.js +114 -0
- package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
- package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
- package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
- package/dist/chunk-FV2G6SAF.js +134 -0
- package/dist/chunk-FX23F33E.js +57 -0
- package/dist/chunk-GJPTPLCQ.js +52 -0
- package/dist/chunk-HJ3A2YNO.js +163 -0
- package/dist/chunk-HJZRSPWB.js +38 -0
- package/dist/chunk-HWHJ6IRQ.js +78 -0
- package/dist/chunk-HZERHGBT.js +77 -0
- package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
- package/dist/chunk-IXQGKJU4.js +183 -0
- package/dist/chunk-JDJY4ABS.js +60 -0
- package/dist/chunk-K7NQ6ZAW.js +84 -0
- package/dist/chunk-KWILREVQ.js +147 -0
- package/dist/chunk-LCKLZ4XK.js +60 -0
- package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
- package/dist/chunk-NEHCPO53.js +44 -0
- package/dist/chunk-OJ7OO3QB.js +269 -0
- package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
- package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
- package/dist/chunk-QIHA7S3A.js +36 -0
- package/dist/chunk-QQOWC53X.js +98 -0
- package/dist/chunk-RKQPU75I.js +126 -0
- package/dist/chunk-U4GYSYGN.js +120 -0
- package/dist/chunk-UGV45DH3.js +18 -0
- package/dist/chunk-VBZQ4DBE.js +52 -0
- package/dist/{chunk-LQLFA2EL.js → chunk-VDONTZZX.js} +2 -2
- package/dist/chunk-VEO56RH4.js +105 -0
- package/dist/chunk-VJ5VD4UT.js +91 -0
- package/dist/{chunk-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
- package/dist/chunk-VNNAL4A6.js +110 -0
- package/dist/chunk-VZCB4APK.js +94 -0
- package/dist/chunk-W7FXDRQJ.js +94 -0
- package/dist/{chunk-5I3FWRC5.js → chunk-WOYBVPXK.js} +10 -10
- package/dist/chunk-WST5NLLC.js +73 -0
- package/dist/chunk-X6VXWEDO.js +125 -0
- package/dist/chunk-XTASI4IY.js +60 -0
- package/dist/chunk-Z233ZQZE.js +33 -0
- package/dist/chunk-ZKLB5N3Q.js +110 -0
- package/dist/chunk-ZM2NODUK.js +39 -0
- package/dist/components/blocks/AccountLockedBlock.js +7 -57
- package/dist/components/blocks/ActivityFeedBlock.js +6 -39
- package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
- package/dist/components/blocks/AgentConversationBlock.js +45 -71
- package/dist/components/blocks/AgentRunOverviewBlock.js +1 -1
- package/dist/components/blocks/AgentWorkbenchBlock.d.ts +5 -1
- package/dist/components/blocks/AgentWorkbenchBlock.js +47 -46
- package/dist/components/blocks/AudioVisualizerBlock.d.ts +1 -1
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
- package/dist/components/blocks/AuthLayout.js +2 -2
- package/dist/components/blocks/AuthSuccessBlock.js +5 -60
- package/dist/components/blocks/BannerBlock.js +38 -38
- package/dist/components/blocks/BarChartBlock.d.ts +1 -1
- package/dist/components/blocks/BarChartBlock.js +2 -2
- package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
- package/dist/components/blocks/CallToActionBlock.js +7 -53
- package/dist/components/blocks/ChangelogBlock.js +45 -142
- package/dist/components/blocks/ChartBlock.js +38 -38
- package/dist/components/blocks/ChartCollectionBlock.js +3 -3
- package/dist/components/blocks/ChatLayout.d.ts +4 -1
- package/dist/components/blocks/ChatLayout.js +39 -39
- package/dist/components/blocks/CodeBlock.js +7 -60
- package/dist/components/blocks/ComparisonBlock.js +9 -94
- package/dist/components/blocks/ContactBlock.js +11 -120
- package/dist/components/blocks/CreateBlock.js +39 -39
- package/dist/components/blocks/DataGridBlock.js +40 -40
- package/dist/components/blocks/DirectoryBlock.js +43 -43
- package/dist/components/blocks/FAQBlock.js +44 -82
- package/dist/components/blocks/FeatureBlock.d.ts +10 -14
- package/dist/components/blocks/FeatureBlock.js +54 -196
- package/dist/components/blocks/FeatureGridBlock.d.ts +1 -1
- package/dist/components/blocks/FeatureGridBlock.js +2 -2
- package/dist/components/blocks/FooterBlock.d.ts +2 -2
- package/dist/components/blocks/FooterBlock.js +11 -67
- package/dist/components/blocks/GalleryBlock.js +38 -38
- package/dist/components/blocks/HeaderBlock.d.ts +2 -2
- package/dist/components/blocks/HeaderBlock.js +39 -39
- package/dist/components/blocks/HeatmapChartBlock.d.ts +1 -1
- package/dist/components/blocks/HeatmapChartBlock.js +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +6 -3
- package/dist/components/blocks/HeroBlock.js +53 -236
- package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
- package/dist/components/blocks/HeroSectionBlock.js +59 -63
- package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
- package/dist/components/blocks/IntegrationsBlock.js +42 -42
- package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
- package/dist/components/blocks/InteractiveAreaChartBlock.js +40 -40
- package/dist/components/blocks/KanbanDemoBlock.js +3 -3
- package/dist/components/blocks/LoginBlock.js +2 -2
- package/dist/components/blocks/LogoCloud.js +2 -13
- package/dist/components/blocks/NavUser.js +42 -42
- package/dist/components/blocks/NewsletterBlock.js +11 -84
- package/dist/components/blocks/NotFoundBlock.js +41 -41
- package/dist/components/blocks/OnboardingBlock.js +38 -38
- package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
- package/dist/components/blocks/PricingBlock.d.ts +1 -1
- package/dist/components/blocks/PricingBlock.js +13 -112
- package/dist/components/blocks/ProcessFlowBlock.js +10 -77
- package/dist/components/blocks/ResetPasswordBlock.js +11 -125
- package/dist/components/blocks/SettingsLayout.js +42 -42
- package/dist/components/blocks/SignUpBlock.d.ts +1 -1
- package/dist/components/blocks/SignUpBlock.js +3 -3
- package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
- package/dist/components/blocks/SocialProofBlock.js +10 -108
- package/dist/components/blocks/StatsBlock.d.ts +1 -1
- package/dist/components/blocks/StatsBlock.js +40 -40
- package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
- package/dist/components/blocks/StatsMarketingBlock.js +7 -38
- package/dist/components/blocks/TeamBlock.d.ts +1 -1
- package/dist/components/blocks/TeamBlock.js +4 -52
- package/dist/components/blocks/TestimonialsBlock.d.ts +1 -1
- package/dist/components/blocks/TestimonialsBlock.js +5 -133
- package/dist/components/blocks/TwoFactorChallengeBlock.js +46 -131
- package/dist/components/blocks/TwoFactorSetupBlock.js +53 -220
- package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
- package/dist/components/blocks/UsageDonutBlock.js +2 -2
- package/dist/components/blocks/VoiceAgentCard.d.ts +3 -1
- package/dist/components/blocks/VoiceAgentCard.js +7 -76
- package/dist/components/blocks/WizardBlock.js +39 -39
- package/dist/components/blocks/user/InviteUserModal.js +38 -38
- package/dist/components/logos/index.js +2 -2
- package/dist/components/page-kits/AccountLockedPageKit.d.ts +10 -0
- package/dist/components/page-kits/AccountLockedPageKit.js +48 -0
- package/dist/components/page-kits/AgentsChatPageKit.d.ts +46 -0
- package/dist/components/page-kits/AgentsChatPageKit.js +290 -0
- package/dist/components/page-kits/AnalyticsPageKit.d.ts +49 -0
- package/dist/components/page-kits/AnalyticsPageKit.js +277 -0
- package/dist/components/page-kits/BlogContentPageKit.d.ts +64 -0
- package/dist/components/page-kits/BlogContentPageKit.js +296 -0
- package/dist/components/page-kits/CheckoutPageKit.d.ts +36 -0
- package/dist/components/page-kits/CheckoutPageKit.js +209 -0
- package/dist/components/page-kits/CompanySuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/CompanySuitePageKit.js +240 -0
- package/dist/components/page-kits/CrudFormPageKit.d.ts +54 -0
- package/dist/components/page-kits/CrudFormPageKit.js +138 -0
- package/dist/components/page-kits/CrudListDetailPageKit.d.ts +70 -0
- package/dist/components/page-kits/CrudListDetailPageKit.js +138 -0
- package/dist/components/page-kits/DashboardPageKit.d.ts +39 -0
- package/dist/components/page-kits/DashboardPageKit.js +284 -0
- package/dist/components/page-kits/ErrorPageKit.d.ts +22 -0
- package/dist/components/page-kits/ErrorPageKit.js +55 -0
- package/dist/components/page-kits/KanbanBoardPageKit.d.ts +31 -0
- package/dist/components/page-kits/KanbanBoardPageKit.js +305 -0
- package/dist/components/page-kits/LandingPageKit.d.ts +29 -0
- package/dist/components/page-kits/LandingPageKit.js +222 -0
- package/dist/components/page-kits/LoginPageKit.d.ts +16 -0
- package/dist/components/page-kits/LoginPageKit.js +43 -0
- package/dist/components/page-kits/MarketingShellPageKit.d.ts +21 -0
- package/dist/components/page-kits/MarketingShellPageKit.js +131 -0
- package/dist/components/page-kits/NavigationShellPageKit.d.ts +41 -0
- package/dist/components/page-kits/NavigationShellPageKit.js +132 -0
- package/dist/components/page-kits/OnboardingPageKit.d.ts +26 -0
- package/dist/components/page-kits/OnboardingPageKit.js +248 -0
- package/dist/components/page-kits/PricingPageKit.d.ts +41 -0
- package/dist/components/page-kits/PricingPageKit.js +279 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.js +171 -0
- package/dist/components/page-kits/RecoveryPageKit.d.ts +17 -0
- package/dist/components/page-kits/RecoveryPageKit.js +58 -0
- package/dist/components/page-kits/ResetPageKit.d.ts +14 -0
- package/dist/components/page-kits/ResetPageKit.js +52 -0
- package/dist/components/page-kits/ServiceSuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/ServiceSuitePageKit.js +321 -0
- package/dist/components/page-kits/SettingsPageKit.d.ts +27 -0
- package/dist/components/page-kits/SettingsPageKit.js +11 -0
- package/dist/components/page-kits/SignupPageKit.d.ts +15 -0
- package/dist/components/page-kits/SignupPageKit.js +41 -0
- package/dist/components/page-kits/SuccessPageKit.d.ts +15 -0
- package/dist/components/page-kits/SuccessPageKit.js +146 -0
- package/dist/components/page-kits/TeamSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/TeamSettingsPageKit.js +297 -0
- package/dist/components/page-kits/TwoFactorPageKit.d.ts +16 -0
- package/dist/components/page-kits/TwoFactorPageKit.js +156 -0
- package/dist/components/page-kits/VerifyEmailPageKit.d.ts +15 -0
- package/dist/components/page-kits/VerifyEmailPageKit.js +146 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.d.ts +35 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.js +250 -0
- package/dist/components/ui/Accordion.js +38 -38
- package/dist/components/ui/AgentMessageBubble.d.ts +20 -4
- package/dist/components/ui/AgentMessageBubble.js +39 -39
- package/dist/components/ui/AgentStatus.d.ts +1 -1
- package/dist/components/ui/AgentStatus.js +5 -10
- package/dist/components/ui/AgentTerminal.d.ts +4 -1
- package/dist/components/ui/AgentTerminal.js +3 -1
- package/dist/components/ui/AgentTimeline.d.ts +2 -2
- package/dist/components/ui/AgentTimeline.js +15 -6
- package/dist/components/ui/AnimatedDialog.js +38 -38
- package/dist/components/ui/AnimatedSheet.js +38 -38
- package/dist/components/ui/ApprovalCard.js +1 -1
- package/dist/components/ui/AudioWaveform.js +2 -76
- package/dist/components/ui/AvatarUpload.js +1 -1
- package/dist/components/ui/Breadcrumb.js +41 -143
- package/dist/components/ui/Calendar.js +38 -38
- package/dist/components/ui/Carousel.js +38 -38
- package/dist/components/ui/ChartCard.js +5 -38
- package/dist/components/ui/ChatActions.d.ts +14 -0
- package/dist/components/ui/ChatActions.js +52 -0
- package/dist/components/ui/ChatBranch.d.ts +18 -0
- package/dist/components/ui/ChatBranch.js +84 -0
- package/dist/components/ui/ChatChainOfThought.d.ts +25 -0
- package/dist/components/ui/ChatChainOfThought.js +99 -0
- package/dist/components/ui/ChatConfirmation.d.ts +37 -0
- package/dist/components/ui/ChatConfirmation.js +115 -0
- package/dist/components/ui/ChatGreeting.d.ts +18 -0
- package/dist/components/ui/ChatGreeting.js +80 -0
- package/dist/components/ui/ChatMessage.d.ts +40 -0
- package/dist/components/ui/ChatMessage.js +96 -0
- package/dist/components/ui/ChatPlan.d.ts +29 -0
- package/dist/components/ui/ChatPlan.js +86 -0
- package/dist/components/ui/ChatPromptInput.d.ts +32 -0
- package/dist/components/ui/ChatPromptInput.js +193 -0
- package/dist/components/ui/ChatPromptInputAttachments.d.ts +9 -0
- package/dist/components/ui/ChatPromptInputAttachments.js +145 -0
- package/dist/components/ui/ChatQueue.d.ts +32 -0
- package/dist/components/ui/ChatQueue.js +93 -0
- package/dist/components/ui/ChatReasoning.d.ts +20 -0
- package/dist/components/ui/ChatReasoning.js +91 -0
- package/dist/components/ui/ChatResponse.d.ts +14 -0
- package/dist/components/ui/ChatResponse.js +25 -0
- package/dist/components/ui/ChatShimmer.d.ts +23 -0
- package/dist/components/ui/ChatShimmer.js +6 -0
- package/dist/components/ui/ChatSources.d.ts +30 -0
- package/dist/components/ui/ChatSources.js +113 -0
- package/dist/components/ui/ChatSuggestion.d.ts +13 -0
- package/dist/components/ui/ChatSuggestion.js +41 -0
- package/dist/components/ui/ChatThinkingMessage.d.ts +12 -0
- package/dist/components/ui/ChatThinkingMessage.js +55 -0
- package/dist/components/ui/ChatToolCall.d.ts +41 -0
- package/dist/components/ui/ChatToolCall.js +192 -0
- package/dist/components/ui/CheckStatus.d.ts +1 -1
- package/dist/components/ui/Checkbox.js +38 -38
- package/dist/components/ui/CheckoutForm.js +38 -38
- package/dist/components/ui/CheckoutFormDemo.js +43 -44
- package/dist/components/ui/Combobox.js +38 -38
- package/dist/components/ui/Command.js +38 -38
- package/dist/components/ui/ContextMenu.js +38 -38
- package/dist/components/ui/Conversation.d.ts +21 -0
- package/dist/components/ui/Conversation.js +196 -0
- package/dist/components/ui/ConversationThread.d.ts +8 -2
- package/dist/components/ui/ConversationThread.js +34 -16
- package/dist/components/ui/DataFreshness.js +2 -73
- package/dist/components/ui/DataTable.js +40 -40
- package/dist/components/ui/DatePicker.js +38 -38
- package/dist/components/ui/DateRangePicker.js +38 -38
- package/dist/components/ui/Dialog.js +38 -38
- package/dist/components/ui/DropdownMenu.js +39 -39
- package/dist/components/ui/FileUpload.js +38 -38
- package/dist/components/ui/InputOTP.js +38 -38
- package/dist/components/ui/KanbanBoard.js +2 -2
- package/dist/components/ui/LanguageSwitcher.js +38 -38
- package/dist/components/ui/Menubar.js +38 -38
- package/dist/components/ui/MouseEffect.js +1 -1
- package/dist/components/ui/NativeSelect.js +2 -18
- package/dist/components/ui/NavigationMenu.js +38 -38
- package/dist/components/ui/NotificationCenter.js +38 -38
- package/dist/components/ui/Pagination.js +42 -153
- package/dist/components/ui/RadioGroup.js +38 -38
- package/dist/components/ui/Resizable.js +38 -38
- package/dist/components/ui/SearchCommand.js +38 -38
- package/dist/components/ui/Select.js +38 -38
- package/dist/components/ui/SettingsModal.js +38 -38
- package/dist/components/ui/ShaderBackground.js +2 -2
- package/dist/components/ui/Sheet.js +38 -38
- package/dist/components/ui/Sidebar.js +41 -41
- package/dist/components/ui/StyleToggle.js +1 -1
- package/dist/components/ui/TagInput.js +38 -38
- package/dist/components/ui/ThemeToggle.js +39 -39
- package/dist/components/ui/ThinkingIndicator.d.ts +3 -1
- package/dist/components/ui/ThinkingIndicator.js +2 -1
- package/dist/components/ui/Toast.js +38 -38
- package/dist/components/ui/Toaster.js +38 -38
- package/dist/components/ui/ToolCallCard.d.ts +1 -1
- package/dist/components/ui/ToolCallCard.js +5 -1
- package/dist/components/ui/TreeView.js +38 -38
- package/dist/components/ui/charts/index.js +1 -1
- package/dist/components/ui/icons/index.js +38 -38
- package/dist/components/ui/text-effects/index.js +2 -2
- package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
- package/dist/hooks/use-scroll-to-bottom.js +2 -0
- package/dist/hooks/use-shader-preset.js +2 -2
- package/dist/index.js +43 -43
- package/dist/internal/local-image-assets.d.ts +12 -0
- package/dist/lib/shader-presets.js +1 -1
- package/dist/lib/tokens.config.d.ts +19 -0
- package/dist/messages/en.js +1 -1
- package/dist/messages/it.js +1 -1
- package/dist/test/PublicSeedTestProvider.js +2 -2
- package/dist/test/simulate-ime-composition.d.ts +54 -0
- package/dist/test/simulate-ime-composition.js +55 -0
- package/eslint-rules/nadicode/config.js +2 -0
- package/eslint-rules/nadicode/index.js +4 -0
- package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
- package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +99 -0
- package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
- package/package.json +895 -686
- package/scripts/ds-check.mjs +102 -73
- package/src/lib/tokens.config.js +63 -41
- package/dist/chunk-MLUSJTS2.js +0 -107
- package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
- package/dist/{chunk-4HRVRW2X.js → chunk-J2DCQDXO.js} +2 -2
- package/dist/{chunk-6MFAZU4B.js → chunk-RGE5OQMZ.js} +1 -1
- package/dist/{chunk-PJNHVPHF.js → chunk-TYP2MR3Q.js} +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ActivityFeedBlock } from "../blocks/ActivityFeedBlock";
|
|
3
|
+
import { type MetricCardProps } from "../ui/MetricCard";
|
|
4
|
+
import { type NavigationShellPageKitProps } from "./NavigationShellPageKit";
|
|
5
|
+
export type DashboardPageKitRegionState = "loading" | "empty" | "error" | "has-data" | "partial-data";
|
|
6
|
+
export interface DashboardPageKitChartRegion {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
data: unknown[];
|
|
11
|
+
chart: React.ReactNode;
|
|
12
|
+
state?: DashboardPageKitRegionState;
|
|
13
|
+
emptyTitle?: string;
|
|
14
|
+
emptyDescription?: string;
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
type ActivityFeedItems = React.ComponentProps<typeof ActivityFeedBlock>["activities"];
|
|
19
|
+
export interface DashboardPageKitActivityRegion {
|
|
20
|
+
title?: string;
|
|
21
|
+
items?: ActivityFeedItems;
|
|
22
|
+
state?: DashboardPageKitRegionState;
|
|
23
|
+
emptyTitle?: string;
|
|
24
|
+
emptyDescription?: string;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface DashboardPageKitProps {
|
|
28
|
+
shell: Omit<NavigationShellPageKitProps, "children">;
|
|
29
|
+
title?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
kpis?: MetricCardProps[];
|
|
32
|
+
kpiState?: DashboardPageKitRegionState;
|
|
33
|
+
chartRegions?: DashboardPageKitChartRegion[];
|
|
34
|
+
activityRegion?: DashboardPageKitActivityRegion;
|
|
35
|
+
lastUpdated?: Date;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function DashboardPageKit({ shell, title, description, kpis, kpiState, chartRegions, activityRegion, lastUpdated, className, }: DashboardPageKitProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { NavigationShellPageKit } from '../../chunk-ZKLB5N3Q.js';
|
|
2
|
+
import { ActivityFeedBlock } from '../../chunk-ZM2NODUK.js';
|
|
3
|
+
import { Typography } from '../../chunk-N53OMWW2.js';
|
|
4
|
+
import '../../chunk-YQIABLDO.js';
|
|
5
|
+
import '../../chunk-J2DCQDXO.js';
|
|
6
|
+
import '../../chunk-C4SNHMYC.js';
|
|
7
|
+
import '../../chunk-B5QL76GA.js';
|
|
8
|
+
import '../../chunk-HOWTYZL5.js';
|
|
9
|
+
import { MetricCard } from '../../chunk-BRXNGF5W.js';
|
|
10
|
+
import '../../chunk-ULLTRLBD.js';
|
|
11
|
+
import '../../chunk-RHEF3WH6.js';
|
|
12
|
+
import '../../chunk-3R2VLZUR.js';
|
|
13
|
+
import '../../chunk-4O6L5YWT.js';
|
|
14
|
+
import { Heading } from '../../chunk-WI547C47.js';
|
|
15
|
+
import { DataFreshness } from '../../chunk-WST5NLLC.js';
|
|
16
|
+
import '../../chunk-CUZJIDU7.js';
|
|
17
|
+
import '../../chunk-AP3XXYAY.js';
|
|
18
|
+
import '../../chunk-LIBXYD5Q.js';
|
|
19
|
+
import { ChartCard } from '../../chunk-HJZRSPWB.js';
|
|
20
|
+
import '../../chunk-RASEB2XI.js';
|
|
21
|
+
import { Empty, EmptyTitle, EmptyDescription } from '../../chunk-55HD4L6G.js';
|
|
22
|
+
import '../../chunk-MJ4CB6ZL.js';
|
|
23
|
+
import '../../chunk-I23DDSU7.js';
|
|
24
|
+
import '../../chunk-35EX5FP5.js';
|
|
25
|
+
import { Card, CardHeader, CardTitle, CardContent } from '../../chunk-AH6YSYYT.js';
|
|
26
|
+
import '../../chunk-NAAU5IWU.js';
|
|
27
|
+
import '../../chunk-7KIDDF3I.js';
|
|
28
|
+
import '../../chunk-6FOHUNXR.js';
|
|
29
|
+
import '../../chunk-PD2YEH3H.js';
|
|
30
|
+
import '../../chunk-CRY67BIF.js';
|
|
31
|
+
import '../../chunk-HJC6U46F.js';
|
|
32
|
+
import '../../chunk-GO35FTNJ.js';
|
|
33
|
+
import '../../chunk-WUO7OONN.js';
|
|
34
|
+
import '../../chunk-FLF5AMNO.js';
|
|
35
|
+
import '../../chunk-3CLXYQKB.js';
|
|
36
|
+
import '../../chunk-S4GKGKON.js';
|
|
37
|
+
import '../../chunk-LCDDAE7J.js';
|
|
38
|
+
import '../../chunk-R674XI7C.js';
|
|
39
|
+
import '../../chunk-HNY45VUQ.js';
|
|
40
|
+
import '../../chunk-BPCCTJSK.js';
|
|
41
|
+
import '../../chunk-CGUCH322.js';
|
|
42
|
+
import '../../chunk-ELKIUARM.js';
|
|
43
|
+
import '../../chunk-KSHJQ2VT.js';
|
|
44
|
+
import '../../chunk-GAKU7DFY.js';
|
|
45
|
+
import '../../chunk-T6BRD7TS.js';
|
|
46
|
+
import '../../chunk-TXGANOAX.js';
|
|
47
|
+
import '../../chunk-OITJWGFV.js';
|
|
48
|
+
import '../../chunk-Z74D6D2W.js';
|
|
49
|
+
import '../../chunk-7WDT2PRI.js';
|
|
50
|
+
import '../../chunk-IJJI4RQU.js';
|
|
51
|
+
import '../../chunk-E7RBK6ML.js';
|
|
52
|
+
import '../../chunk-UBIGDGOP.js';
|
|
53
|
+
import '../../chunk-ALMGJVMT.js';
|
|
54
|
+
import '../../chunk-QPXTBZWN.js';
|
|
55
|
+
import '../../chunk-4NXZIMYZ.js';
|
|
56
|
+
import '../../chunk-R5XP45PD.js';
|
|
57
|
+
import '../../chunk-G5EO5FWC.js';
|
|
58
|
+
import '../../chunk-NCULQXJE.js';
|
|
59
|
+
import '../../chunk-VDYPDMYR.js';
|
|
60
|
+
import '../../chunk-WDGIQDQG.js';
|
|
61
|
+
import '../../chunk-RYOTIXZO.js';
|
|
62
|
+
import '../../chunk-JZ4G2SJH.js';
|
|
63
|
+
import '../../chunk-KYGKJ553.js';
|
|
64
|
+
import '../../chunk-M7YSMMAC.js';
|
|
65
|
+
import '../../chunk-XQ2UDMPO.js';
|
|
66
|
+
import '../../chunk-JMCSAGZ3.js';
|
|
67
|
+
import '../../chunk-QUKDUSHD.js';
|
|
68
|
+
import '../../chunk-O74AEVHW.js';
|
|
69
|
+
import '../../chunk-ZUHIWALK.js';
|
|
70
|
+
import '../../chunk-2IZC7HSV.js';
|
|
71
|
+
import '../../chunk-2SDZMTB2.js';
|
|
72
|
+
import '../../chunk-IQEBXXB5.js';
|
|
73
|
+
import '../../chunk-AZUJNRQU.js';
|
|
74
|
+
import '../../chunk-W3B3UOEG.js';
|
|
75
|
+
import '../../chunk-ACRVOD7W.js';
|
|
76
|
+
import '../../chunk-QSU23VYZ.js';
|
|
77
|
+
import '../../chunk-BJYCQ2NV.js';
|
|
78
|
+
import '../../chunk-VM462WZC.js';
|
|
79
|
+
import '../../chunk-5UZDOF6V.js';
|
|
80
|
+
import '../../chunk-PKVTEDKO.js';
|
|
81
|
+
import '../../chunk-I3TH7PIB.js';
|
|
82
|
+
import '../../chunk-WGPK3FQ7.js';
|
|
83
|
+
import '../../chunk-JL4MVVFH.js';
|
|
84
|
+
import '../../chunk-4FEAWXJD.js';
|
|
85
|
+
import '../../chunk-JHQTKMKG.js';
|
|
86
|
+
import '../../chunk-WA45EC4Y.js';
|
|
87
|
+
import '../../chunk-2MOEOEOI.js';
|
|
88
|
+
import '../../chunk-5LCXASRW.js';
|
|
89
|
+
import '../../chunk-2ZJVU7NV.js';
|
|
90
|
+
import '../../chunk-5ESF6N36.js';
|
|
91
|
+
import '../../chunk-RBPLOM3A.js';
|
|
92
|
+
import '../../chunk-6BAV4TZ5.js';
|
|
93
|
+
import '../../chunk-SW6QPJM4.js';
|
|
94
|
+
import '../../chunk-2NT57K4U.js';
|
|
95
|
+
import '../../chunk-JRJGSNI4.js';
|
|
96
|
+
import '../../chunk-RF6ECFS5.js';
|
|
97
|
+
import '../../chunk-KYZT3RNW.js';
|
|
98
|
+
import '../../chunk-UEG2LI7Z.js';
|
|
99
|
+
import '../../chunk-CI7GPGCJ.js';
|
|
100
|
+
import '../../chunk-226EBOTK.js';
|
|
101
|
+
import '../../chunk-74RKVIBV.js';
|
|
102
|
+
import '../../chunk-V6WNRZT3.js';
|
|
103
|
+
import '../../chunk-JBK2LA6U.js';
|
|
104
|
+
import '../../chunk-55U27XY4.js';
|
|
105
|
+
import '../../chunk-LSPO6OBI.js';
|
|
106
|
+
import '../../chunk-Y56WBNCY.js';
|
|
107
|
+
import '../../chunk-JJTQOH7J.js';
|
|
108
|
+
import '../../chunk-72X6SXOX.js';
|
|
109
|
+
import '../../chunk-SR5U52V3.js';
|
|
110
|
+
import '../../chunk-AWIJHDNK.js';
|
|
111
|
+
import '../../chunk-MAUTIHQG.js';
|
|
112
|
+
import '../../chunk-S733NAYS.js';
|
|
113
|
+
import '../../chunk-666N6OTL.js';
|
|
114
|
+
import '../../chunk-FMH55OKV.js';
|
|
115
|
+
import '../../chunk-WXVNTJIB.js';
|
|
116
|
+
import '../../chunk-T7H53CK2.js';
|
|
117
|
+
import '../../chunk-TBKJ34BB.js';
|
|
118
|
+
import '../../chunk-BRP6D56U.js';
|
|
119
|
+
import '../../chunk-6G3RRWJT.js';
|
|
120
|
+
import '../../chunk-ZU2GYVAP.js';
|
|
121
|
+
import '../../chunk-CRZ2JE24.js';
|
|
122
|
+
import '../../chunk-PSVQ7ZNX.js';
|
|
123
|
+
import '../../chunk-WKRIKCJC.js';
|
|
124
|
+
import '../../chunk-JHQ5NMLZ.js';
|
|
125
|
+
import '../../chunk-WFJQ43SM.js';
|
|
126
|
+
import '../../chunk-AP5Y5M3R.js';
|
|
127
|
+
import '../../chunk-Q7LVUGFL.js';
|
|
128
|
+
import '../../chunk-G5YLGJXR.js';
|
|
129
|
+
import '../../chunk-G24VV5NO.js';
|
|
130
|
+
import '../../chunk-R3AO6AZM.js';
|
|
131
|
+
import '../../chunk-GCUTJI7M.js';
|
|
132
|
+
import '../../chunk-CXACRCZ4.js';
|
|
133
|
+
import '../../chunk-P6IRHPFM.js';
|
|
134
|
+
import '../../chunk-SXHYB7JB.js';
|
|
135
|
+
import '../../chunk-BFLN54VR.js';
|
|
136
|
+
import '../../chunk-ONGJ7AC2.js';
|
|
137
|
+
import '../../chunk-UHXGBV5N.js';
|
|
138
|
+
import '../../chunk-UIUMTURU.js';
|
|
139
|
+
import '../../chunk-PRUXIDBD.js';
|
|
140
|
+
import '../../chunk-NURPUVUV.js';
|
|
141
|
+
import '../../chunk-S4JAHKOP.js';
|
|
142
|
+
import '../../chunk-TV4RSQH4.js';
|
|
143
|
+
import '../../chunk-HJBXUXTD.js';
|
|
144
|
+
import '../../chunk-ASKFAYYR.js';
|
|
145
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
146
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
147
|
+
|
|
148
|
+
var EMPTY_KPIS = [];
|
|
149
|
+
var EMPTY_CHART_REGIONS = [];
|
|
150
|
+
var EMPTY_ACTIVITY_ITEMS = [];
|
|
151
|
+
function deriveRegionState(state, data) {
|
|
152
|
+
if (state) {
|
|
153
|
+
return state;
|
|
154
|
+
}
|
|
155
|
+
if (!data || data.length === 0) {
|
|
156
|
+
return "empty";
|
|
157
|
+
}
|
|
158
|
+
return "has-data";
|
|
159
|
+
}
|
|
160
|
+
function renderChartRegion(region) {
|
|
161
|
+
const state = deriveRegionState(region.state, region.data);
|
|
162
|
+
const isPartialDataState = state === "partial-data";
|
|
163
|
+
if (state === "error") {
|
|
164
|
+
return /* @__PURE__ */ jsxs(Card, { className: region.className, children: [
|
|
165
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
|
|
166
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
role: "alert",
|
|
170
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
171
|
+
children: region.errorMessage ?? "Chart region is unavailable."
|
|
172
|
+
}
|
|
173
|
+
) })
|
|
174
|
+
] }, region.id);
|
|
175
|
+
}
|
|
176
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", region.className), children: [
|
|
177
|
+
isPartialDataState ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Some chart points are still loading, available data remains visible." }) : null,
|
|
178
|
+
/* @__PURE__ */ jsx(
|
|
179
|
+
ChartCard,
|
|
180
|
+
{
|
|
181
|
+
title: region.title,
|
|
182
|
+
description: region.description,
|
|
183
|
+
chart: region.chart,
|
|
184
|
+
data: state === "empty" ? [] : region.data,
|
|
185
|
+
loading: state === "loading",
|
|
186
|
+
emptyTitle: region.emptyTitle ?? "No chart data",
|
|
187
|
+
emptyDescription: region.emptyDescription ?? "This chart will populate once data is available."
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] }, region.id);
|
|
191
|
+
}
|
|
192
|
+
function DashboardPageKit({
|
|
193
|
+
shell,
|
|
194
|
+
title = "Dashboard overview",
|
|
195
|
+
description = "Track KPI performance, chart health, and recent activity from one route-level contract.",
|
|
196
|
+
kpis = EMPTY_KPIS,
|
|
197
|
+
kpiState,
|
|
198
|
+
chartRegions = EMPTY_CHART_REGIONS,
|
|
199
|
+
activityRegion,
|
|
200
|
+
lastUpdated,
|
|
201
|
+
className
|
|
202
|
+
}) {
|
|
203
|
+
const freshnessTimestamp = lastUpdated ?? /* @__PURE__ */ new Date();
|
|
204
|
+
const resolvedKpiState = deriveRegionState(kpiState, kpis);
|
|
205
|
+
const resolvedActivityState = deriveRegionState(activityRegion?.state, activityRegion?.items ?? EMPTY_ACTIVITY_ITEMS);
|
|
206
|
+
const hasLoadingCharts = chartRegions.some((region) => deriveRegionState(region.state, region.data) === "loading");
|
|
207
|
+
const loadingKpis = Array.from({ length: Math.max(kpis.length, 4) }, (_, index) => /* @__PURE__ */ jsx(
|
|
208
|
+
MetricCard,
|
|
209
|
+
{
|
|
210
|
+
label: `Loading metric ${index + 1}`,
|
|
211
|
+
value: 0,
|
|
212
|
+
loading: true
|
|
213
|
+
},
|
|
214
|
+
`loading-kpi-${index}`
|
|
215
|
+
));
|
|
216
|
+
return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
|
|
217
|
+
/* @__PURE__ */ jsxs("header", { className: "flex flex-wrap items-center gap-3", children: [
|
|
218
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
219
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
|
|
220
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
221
|
+
] }),
|
|
222
|
+
/* @__PURE__ */ jsx(DataFreshness, { lastUpdated: freshnessTimestamp, isLive: true })
|
|
223
|
+
] }),
|
|
224
|
+
/* @__PURE__ */ jsxs("section", { "aria-label": "Dashboard KPI region", className: "space-y-3", children: [
|
|
225
|
+
resolvedKpiState === "loading" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading KPI metrics" }),
|
|
227
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-4", children: loadingKpis })
|
|
228
|
+
] }) : null,
|
|
229
|
+
resolvedKpiState === "error" ? /* @__PURE__ */ jsx(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
role: "alert",
|
|
233
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
234
|
+
children: "KPI metrics are currently unavailable."
|
|
235
|
+
}
|
|
236
|
+
) : null,
|
|
237
|
+
resolvedKpiState === "empty" ? /* @__PURE__ */ jsxs(Empty, { children: [
|
|
238
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: "No KPI data" }),
|
|
239
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: "Connect your data source to populate KPI cards." })
|
|
240
|
+
] }) : null,
|
|
241
|
+
resolvedKpiState === "partial-data" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Some KPI metrics are temporarily unavailable." }) : null,
|
|
242
|
+
resolvedKpiState === "has-data" || resolvedKpiState === "partial-data" ? /* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-4", children: kpis.map((kpi) => /* @__PURE__ */ jsx(
|
|
243
|
+
MetricCard,
|
|
244
|
+
{
|
|
245
|
+
...kpi
|
|
246
|
+
},
|
|
247
|
+
`${kpi.label}-${String(kpi.value)}`
|
|
248
|
+
)) }) : null
|
|
249
|
+
] }),
|
|
250
|
+
/* @__PURE__ */ jsxs("section", { "aria-label": "Dashboard chart regions", className: "grid gap-4 xl:grid-cols-2", children: [
|
|
251
|
+
hasLoadingCharts ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary xl:col-span-2", children: "Loading chart data" }) : null,
|
|
252
|
+
chartRegions.map((region) => renderChartRegion(region))
|
|
253
|
+
] }),
|
|
254
|
+
/* @__PURE__ */ jsxs("section", { "aria-label": "Dashboard activity region", children: [
|
|
255
|
+
resolvedActivityState === "loading" ? /* @__PURE__ */ jsxs(Card, { children: [
|
|
256
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: activityRegion?.title ?? "Recent activity" }) }),
|
|
257
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading activity feed" }) })
|
|
258
|
+
] }) : null,
|
|
259
|
+
resolvedActivityState === "error" ? /* @__PURE__ */ jsx(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
role: "alert",
|
|
263
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
264
|
+
children: activityRegion?.errorMessage ?? "Activity feed is unavailable."
|
|
265
|
+
}
|
|
266
|
+
) : null,
|
|
267
|
+
resolvedActivityState === "empty" ? /* @__PURE__ */ jsxs(Empty, { children: [
|
|
268
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: activityRegion?.emptyTitle ?? "No activity yet" }),
|
|
269
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: activityRegion?.emptyDescription ?? "Recent updates will appear once your team starts making changes." })
|
|
270
|
+
] }) : null,
|
|
271
|
+
resolvedActivityState === "partial-data" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Recent activity is partially available while remaining events sync." }) : null,
|
|
272
|
+
resolvedActivityState === "has-data" || resolvedActivityState === "partial-data" ? /* @__PURE__ */ jsx(
|
|
273
|
+
ActivityFeedBlock,
|
|
274
|
+
{
|
|
275
|
+
title: activityRegion?.title ?? "Recent activity",
|
|
276
|
+
activities: activityRegion?.items,
|
|
277
|
+
className: "py-4 md:py-6"
|
|
278
|
+
}
|
|
279
|
+
) : null
|
|
280
|
+
] })
|
|
281
|
+
] }) });
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export { DashboardPageKit };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ErrorPageKitVariant = "not-found" | "server-error" | "generic-fallback";
|
|
3
|
+
export interface ErrorPageKitAction {
|
|
4
|
+
label: string;
|
|
5
|
+
onAction: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface ErrorPageKitMetadata {
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
errorCode?: string;
|
|
10
|
+
incidentId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ErrorPageKitProps {
|
|
13
|
+
variant: ErrorPageKitVariant;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
metadata?: ErrorPageKitMetadata;
|
|
17
|
+
primaryAction?: ErrorPageKitAction;
|
|
18
|
+
secondaryAction?: ErrorPageKitAction;
|
|
19
|
+
supportContent?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function ErrorPageKit({ variant, title, description, metadata, primaryAction, secondaryAction, supportContent, className, }: ErrorPageKitProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Typography } from '../../chunk-N53OMWW2.js';
|
|
2
|
+
import { Card, CardHeader, CardTitle, CardContent } from '../../chunk-AH6YSYYT.js';
|
|
3
|
+
import { Button } from '../../chunk-7KIDDF3I.js';
|
|
4
|
+
import '../../chunk-PD2YEH3H.js';
|
|
5
|
+
import '../../chunk-CRY67BIF.js';
|
|
6
|
+
import '../../chunk-HJC6U46F.js';
|
|
7
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function variantLabel(variant) {
|
|
11
|
+
switch (variant) {
|
|
12
|
+
case "not-found":
|
|
13
|
+
return "Not found";
|
|
14
|
+
case "server-error":
|
|
15
|
+
return "Server error";
|
|
16
|
+
case "generic-fallback":
|
|
17
|
+
return "Fallback";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function ErrorPageKit({
|
|
21
|
+
variant,
|
|
22
|
+
title,
|
|
23
|
+
description,
|
|
24
|
+
metadata,
|
|
25
|
+
primaryAction,
|
|
26
|
+
secondaryAction,
|
|
27
|
+
supportContent,
|
|
28
|
+
className
|
|
29
|
+
}) {
|
|
30
|
+
const metadataEntries = [
|
|
31
|
+
...metadata?.statusCode ? [["Status", metadata.statusCode]] : [],
|
|
32
|
+
...metadata?.errorCode ? [["Error code", metadata.errorCode]] : [],
|
|
33
|
+
...metadata?.incidentId ? [["Incident", metadata.incidentId]] : []
|
|
34
|
+
];
|
|
35
|
+
return /* @__PURE__ */ jsx("section", { className: cn("min-h-[70dvh] bg-background px-6 py-12 text-text-primary", className), children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center justify-center", children: /* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "space-y-3", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "uppercase tracking-[0.18em] text-text-tertiary", children: variantLabel(variant) }),
|
|
38
|
+
/* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
39
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-5", children: [
|
|
42
|
+
metadataEntries.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid gap-2 rounded-md border border-border/70 bg-surface/40 p-3 text-sm", children: metadataEntries.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: label }),
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-text-primary", children: value })
|
|
45
|
+
] }, label)) }) : null,
|
|
46
|
+
supportContent ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border/60 bg-surface/30 px-3 py-2 text-sm text-text-secondary", children: supportContent }) : null,
|
|
47
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
48
|
+
primaryAction ? /* @__PURE__ */ jsx(Button, { type: "button", onClick: primaryAction.onAction, children: primaryAction.label }) : null,
|
|
49
|
+
secondaryAction ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: secondaryAction.onAction, children: secondaryAction.label }) : null
|
|
50
|
+
] }) : null
|
|
51
|
+
] })
|
|
52
|
+
] }) }) });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { ErrorPageKit };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { NavigationShellPageKitProps } from "./NavigationShellPageKit";
|
|
3
|
+
import { type KanbanColumnState, type KanbanMoveMeta } from "../ui/KanbanBoard";
|
|
4
|
+
export type KanbanBoardPageKitState = "loading" | "empty" | "dragging" | "move-failed" | "has-data";
|
|
5
|
+
export interface KanbanBoardPageKitItem {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
badgeLabel?: string;
|
|
10
|
+
assigneeLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface KanbanBoardPageKitColumn<TItem extends KanbanBoardPageKitItem = KanbanBoardPageKitItem> {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
items: TItem[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface KanbanBoardPageKitProps<TItem extends KanbanBoardPageKitItem = KanbanBoardPageKitItem> {
|
|
19
|
+
shell: Omit<NavigationShellPageKitProps, "children">;
|
|
20
|
+
state?: KanbanBoardPageKitState;
|
|
21
|
+
columns: KanbanBoardPageKitColumn<TItem>[];
|
|
22
|
+
getItemId: (item: TItem) => string | number;
|
|
23
|
+
onMove: (next: readonly KanbanColumnState<TItem, string>[], meta: KanbanMoveMeta<TItem, string>) => void;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
moveErrorMessage?: string;
|
|
28
|
+
activityRegion?: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function KanbanBoardPageKit<TItem extends KanbanBoardPageKitItem = KanbanBoardPageKitItem>({ shell, state, columns, getItemId, onMove, readOnly, title, description, moveErrorMessage, activityRegion, className, }: KanbanBoardPageKitProps<TItem>): import("react/jsx-runtime").JSX.Element;
|