@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,94 @@
|
|
|
1
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
2
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
3
|
+
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-PXDHNGTG.js';
|
|
4
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
5
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
6
|
+
import { XIcon } from './chunk-UIUMTURU.js';
|
|
7
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
8
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var defaultPlans = [
|
|
12
|
+
{
|
|
13
|
+
name: "Starter",
|
|
14
|
+
features: {
|
|
15
|
+
"Components": "50+",
|
|
16
|
+
"Design Tokens": true,
|
|
17
|
+
"Dark Mode": true,
|
|
18
|
+
"TypeScript": true,
|
|
19
|
+
"Priority Support": false,
|
|
20
|
+
"Custom Branding": false,
|
|
21
|
+
"SSO / SAML": false,
|
|
22
|
+
"SLA Guarantee": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "Pro",
|
|
27
|
+
featured: true,
|
|
28
|
+
features: {
|
|
29
|
+
"Components": "100+",
|
|
30
|
+
"Design Tokens": true,
|
|
31
|
+
"Dark Mode": true,
|
|
32
|
+
"TypeScript": true,
|
|
33
|
+
"Priority Support": true,
|
|
34
|
+
"Custom Branding": true,
|
|
35
|
+
"SSO / SAML": false,
|
|
36
|
+
"SLA Guarantee": false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "Enterprise",
|
|
41
|
+
features: {
|
|
42
|
+
"Components": "100+",
|
|
43
|
+
"Design Tokens": true,
|
|
44
|
+
"Dark Mode": true,
|
|
45
|
+
"TypeScript": true,
|
|
46
|
+
"Priority Support": true,
|
|
47
|
+
"Custom Branding": true,
|
|
48
|
+
"SSO / SAML": true,
|
|
49
|
+
"SLA Guarantee": true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
function ComparisonBlock({
|
|
54
|
+
plans = defaultPlans,
|
|
55
|
+
title = "Compare plans",
|
|
56
|
+
description = "See which plan is right for your team.",
|
|
57
|
+
className
|
|
58
|
+
}) {
|
|
59
|
+
const featureNames = plans.length > 0 ? Object.keys(plans[0].features) : [];
|
|
60
|
+
return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-6", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "mb-12 text-center", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-text-primary", children: title }),
|
|
63
|
+
!!description && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-4 text-text-secondary", children: description })
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ jsx(ScrollFadeIn, { delay: 0.1, children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
66
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
67
|
+
/* @__PURE__ */ jsx(TableHead, { className: "w-[200px] text-text-primary font-semibold", children: "Feature" }),
|
|
68
|
+
plans.map((plan) => /* @__PURE__ */ jsx(
|
|
69
|
+
TableHead,
|
|
70
|
+
{
|
|
71
|
+
className: cn(
|
|
72
|
+
"text-center font-semibold",
|
|
73
|
+
plan.featured && "text-accent"
|
|
74
|
+
),
|
|
75
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1.5", children: [
|
|
76
|
+
plan.name,
|
|
77
|
+
plan.featured && /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "text-[10px]", children: "Popular" })
|
|
78
|
+
] })
|
|
79
|
+
},
|
|
80
|
+
plan.name
|
|
81
|
+
))
|
|
82
|
+
] }) }),
|
|
83
|
+
/* @__PURE__ */ jsx(TableBody, { children: featureNames.map((feature) => /* @__PURE__ */ jsxs(TableRow, { className: "transition-colors hover:bg-surface-active/50", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(TableCell, { className: "font-medium text-text-primary", children: feature }),
|
|
85
|
+
plans.map((plan) => {
|
|
86
|
+
const value = plan.features[feature];
|
|
87
|
+
return /* @__PURE__ */ jsx(TableCell, { className: "text-center", children: typeof value === "boolean" ? value ? /* @__PURE__ */ jsx(CheckIcon, { size: 16, className: "mx-auto text-success" }) : /* @__PURE__ */ jsx(XIcon, { size: 16, className: "mx-auto text-text-tertiary" }) : /* @__PURE__ */ jsx("span", { className: "text-sm text-text-primary", children: value }) }, plan.name);
|
|
88
|
+
})
|
|
89
|
+
] }, feature)) })
|
|
90
|
+
] }) }) })
|
|
91
|
+
] }) });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { ComparisonBlock };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { InputOTP, InputOTPGroup, InputOTPSlot } from './chunk-WN5ONOHC.js';
|
|
2
|
+
import { Separator } from './chunk-CUZJIDU7.js';
|
|
3
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
|
|
4
|
+
import { Alert, AlertDescription } from './chunk-GJUR6HT3.js';
|
|
5
|
+
import { m, scaleIn } from './chunk-PD2YEH3H.js';
|
|
6
|
+
import { bezier } from './chunk-CRY67BIF.js';
|
|
7
|
+
import { ShieldCheckIcon } from './chunk-BFLN54VR.js';
|
|
8
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var SHAKE_TRANSITION = { duration: 0.3, ease: bezier["out-cubic"] };
|
|
13
|
+
function TwoFactorChallengeBlock({
|
|
14
|
+
className,
|
|
15
|
+
onVerify,
|
|
16
|
+
onUseBackupCode,
|
|
17
|
+
onBackToLogin,
|
|
18
|
+
error,
|
|
19
|
+
title = "Two-factor authentication",
|
|
20
|
+
description = "Enter the 6-digit code from your authenticator app",
|
|
21
|
+
backupCodeLabel = "Use a backup code"
|
|
22
|
+
}) {
|
|
23
|
+
const [code, setCode] = React.useState("");
|
|
24
|
+
const [shake, setShake] = React.useState(false);
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (error) {
|
|
27
|
+
setShake(true);
|
|
28
|
+
setCode("");
|
|
29
|
+
const timeout = setTimeout(() => setShake(false), 300);
|
|
30
|
+
return () => clearTimeout(timeout);
|
|
31
|
+
}
|
|
32
|
+
}, [error]);
|
|
33
|
+
const handleComplete = (value) => {
|
|
34
|
+
setCode(value);
|
|
35
|
+
if (value.length === 6) {
|
|
36
|
+
onVerify?.(value);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ jsx(m.div, { ...scaleIn, className: cn("w-full max-w-sm mx-auto", className), children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
40
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-2", children: /* @__PURE__ */ jsx(ShieldCheckIcon, { size: 32, className: "text-text-secondary" }) }),
|
|
42
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-2xl", children: title }),
|
|
43
|
+
/* @__PURE__ */ jsx(CardDescription, { children: description })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "grid gap-4", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
m.div,
|
|
48
|
+
{
|
|
49
|
+
className: "flex justify-center",
|
|
50
|
+
animate: shake ? { x: [-4, 4, -4, 4, 0] } : {},
|
|
51
|
+
transition: SHAKE_TRANSITION,
|
|
52
|
+
children: /* @__PURE__ */ jsx(
|
|
53
|
+
InputOTP,
|
|
54
|
+
{
|
|
55
|
+
maxLength: 6,
|
|
56
|
+
value: code,
|
|
57
|
+
onChange: handleComplete,
|
|
58
|
+
children: /* @__PURE__ */ jsxs(InputOTPGroup, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 0 }),
|
|
60
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 1 }),
|
|
61
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 2 }),
|
|
62
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 3 }),
|
|
63
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 4 }),
|
|
64
|
+
/* @__PURE__ */ jsx(InputOTPSlot, { index: 5 })
|
|
65
|
+
] })
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
!!error && /* @__PURE__ */ jsx(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }),
|
|
71
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
72
|
+
/* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: onUseBackupCode,
|
|
77
|
+
className: "text-sm text-accent hover:text-accent/80 transition-colors",
|
|
78
|
+
children: backupCodeLabel
|
|
79
|
+
}
|
|
80
|
+
) })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsx(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
onClick: onBackToLogin,
|
|
87
|
+
className: "text-sm text-text-tertiary hover:text-text-primary transition-colors",
|
|
88
|
+
children: "Back to login"
|
|
89
|
+
}
|
|
90
|
+
) })
|
|
91
|
+
] }) });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { TwoFactorChallengeBlock };
|
|
@@ -5,26 +5,26 @@ import { Button } from './chunk-7KIDDF3I.js';
|
|
|
5
5
|
import { MenuIcon } from './chunk-JMCSAGZ3.js';
|
|
6
6
|
import { XIcon } from './chunk-UIUMTURU.js';
|
|
7
7
|
import { useTranslations } from 'next-intl';
|
|
8
|
-
import
|
|
8
|
+
import { useState, useRef } from 'react';
|
|
9
9
|
import { useScroll, useMotionValueEvent } from 'motion/react';
|
|
10
10
|
import Link from 'next/link';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
var defaultMenuItems = siteConfig.nav.header;
|
|
14
|
-
|
|
14
|
+
function HeaderBlock({
|
|
15
15
|
menuItems = defaultMenuItems,
|
|
16
16
|
loginLabel = "Login",
|
|
17
17
|
signUpLabel = "Sign Up",
|
|
18
18
|
loginHref = "#",
|
|
19
19
|
signUpHref = "#",
|
|
20
20
|
className
|
|
21
|
-
})
|
|
21
|
+
}) {
|
|
22
22
|
const t = useTranslations("blocks.headerBlock");
|
|
23
|
-
const [mobileOpen, setMobileOpen] =
|
|
24
|
-
const navBarRef =
|
|
25
|
-
const innerRef =
|
|
26
|
-
const logoRef =
|
|
27
|
-
const wasScrolledRef =
|
|
23
|
+
const [mobileOpen, setMobileOpen] = useState(false);
|
|
24
|
+
const navBarRef = useRef(null);
|
|
25
|
+
const innerRef = useRef(null);
|
|
26
|
+
const logoRef = useRef(null);
|
|
27
|
+
const wasScrolledRef = useRef(false);
|
|
28
28
|
const { scrollYProgress } = useScroll();
|
|
29
29
|
useMotionValueEvent(scrollYProgress, "change", (latest) => {
|
|
30
30
|
const scrolled = latest > 0.05;
|
|
@@ -143,6 +143,6 @@ var HeroHeader = ({
|
|
|
143
143
|
)
|
|
144
144
|
}
|
|
145
145
|
) });
|
|
146
|
-
}
|
|
146
|
+
}
|
|
147
147
|
|
|
148
|
-
export {
|
|
148
|
+
export { HeaderBlock };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { formatDistanceToNow } from 'date-fns';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var TICK_INTERVAL_MS = 3e4;
|
|
7
|
+
var listeners = [];
|
|
8
|
+
var tick = 0;
|
|
9
|
+
var intervalId = null;
|
|
10
|
+
function subscribe(callback) {
|
|
11
|
+
listeners = [...listeners, callback];
|
|
12
|
+
if (listeners.length === 1) {
|
|
13
|
+
intervalId = setInterval(() => {
|
|
14
|
+
tick++;
|
|
15
|
+
listeners.forEach((l) => l());
|
|
16
|
+
}, TICK_INTERVAL_MS);
|
|
17
|
+
}
|
|
18
|
+
return () => {
|
|
19
|
+
listeners = listeners.filter((l) => l !== callback);
|
|
20
|
+
if (listeners.length === 0 && intervalId !== null) {
|
|
21
|
+
clearInterval(intervalId);
|
|
22
|
+
intervalId = null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function getSnapshot() {
|
|
27
|
+
return tick;
|
|
28
|
+
}
|
|
29
|
+
function getServerSnapshot() {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
function DataFreshness({
|
|
33
|
+
lastUpdated,
|
|
34
|
+
isLive = false,
|
|
35
|
+
staleThresholdMs = 3e5,
|
|
36
|
+
className,
|
|
37
|
+
ref
|
|
38
|
+
}) {
|
|
39
|
+
React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
40
|
+
const elapsedMs = Date.now() - lastUpdated.getTime();
|
|
41
|
+
const isStale = elapsedMs > staleThresholdMs;
|
|
42
|
+
const relativeTime = formatDistanceToNow(lastUpdated, { addSuffix: true });
|
|
43
|
+
let statusText;
|
|
44
|
+
if (isLive && !isStale) {
|
|
45
|
+
statusText = "Live";
|
|
46
|
+
} else if (isLive && isStale) {
|
|
47
|
+
statusText = `Stale \u2013 Updated ${relativeTime}`;
|
|
48
|
+
} else {
|
|
49
|
+
statusText = `Updated ${relativeTime}`;
|
|
50
|
+
}
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("flex items-center gap-2", className),
|
|
56
|
+
children: [
|
|
57
|
+
isLive && /* @__PURE__ */ jsx(
|
|
58
|
+
"span",
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "freshness-dot",
|
|
61
|
+
className: cn(
|
|
62
|
+
"size-2 shrink-0 rounded-full motion-reduce:animate-none",
|
|
63
|
+
isStale ? "bg-warning" : "bg-success animate-pulse"
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-text-tertiary", children: statusText })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { DataFreshness };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Spinner } from './chunk-ZLSWCV55.js';
|
|
2
|
+
import { PasswordInput } from './chunk-UJDEGCCZ.js';
|
|
3
|
+
import { Field, FieldLabel } from './chunk-RX5EUODB.js';
|
|
4
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
|
|
5
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
6
|
+
import { m, scaleIn } from './chunk-PD2YEH3H.js';
|
|
7
|
+
import { KeyIcon } from './chunk-QSU23VYZ.js';
|
|
8
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
9
|
+
import { XIcon } from './chunk-UIUMTURU.js';
|
|
10
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { useTranslations } from 'next-intl';
|
|
13
|
+
import { useReducedMotion } from 'motion/react';
|
|
14
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
var RULE_TESTS = [
|
|
17
|
+
{ key: "minLength", test: (v) => v.length >= 8 },
|
|
18
|
+
{ key: "uppercase", test: (v) => /[A-Z]/.test(v) },
|
|
19
|
+
{ key: "number", test: (v) => /\d/.test(v) },
|
|
20
|
+
{ key: "special", test: (v) => /[^A-Za-z0-9]/.test(v) }
|
|
21
|
+
];
|
|
22
|
+
function ResetPasswordBlock({
|
|
23
|
+
className,
|
|
24
|
+
onSubmit,
|
|
25
|
+
onBackToLogin,
|
|
26
|
+
title,
|
|
27
|
+
description
|
|
28
|
+
}) {
|
|
29
|
+
const prefersReduced = useReducedMotion();
|
|
30
|
+
const t = useTranslations("auth.reset");
|
|
31
|
+
const [password, setPassword] = React.useState("");
|
|
32
|
+
const [confirm, setConfirm] = React.useState("");
|
|
33
|
+
const [loading, setLoading] = React.useState(false);
|
|
34
|
+
const [error, setError] = React.useState("");
|
|
35
|
+
const resolvedTitle = title ?? t("title");
|
|
36
|
+
const resolvedDescription = description ?? t("description");
|
|
37
|
+
const rules = React.useMemo(() => RULE_TESTS.map((r) => ({ label: t(`rules.${r.key}`), test: r.test })), [t]);
|
|
38
|
+
const allRulesPass = rules.every((r) => r.test(password));
|
|
39
|
+
const passwordsMatch = password === confirm && confirm.length > 0;
|
|
40
|
+
const handleSubmit = (e) => {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
if (!allRulesPass) return;
|
|
43
|
+
if (!passwordsMatch) {
|
|
44
|
+
setError(t("passwordMismatch"));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
setError("");
|
|
48
|
+
setLoading(true);
|
|
49
|
+
onSubmit?.(password);
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ jsx(m.div, { ...prefersReduced ? {} : scaleIn, className: cn("w-full max-w-sm mx-auto", className), children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
52
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-2", children: /* @__PURE__ */ jsx(KeyIcon, { size: 32, className: "text-text-secondary" }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-2xl", children: resolvedTitle }),
|
|
55
|
+
/* @__PURE__ */ jsx(CardDescription, { children: resolvedDescription })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: handleSubmit, className: "grid gap-4", children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(FieldLabel, { htmlFor: "new-password", children: t("newPassword") }),
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
PasswordInput,
|
|
62
|
+
{
|
|
63
|
+
name: "password",
|
|
64
|
+
id: "new-password",
|
|
65
|
+
value: password,
|
|
66
|
+
onChange: (e) => setPassword(e.target.value),
|
|
67
|
+
placeholder: t("newPasswordPlaceholder"),
|
|
68
|
+
autoComplete: "new-password"
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx(FieldLabel, { htmlFor: "confirm-password", children: t("confirmPassword") }),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
PasswordInput,
|
|
76
|
+
{
|
|
77
|
+
name: "confirmPassword",
|
|
78
|
+
id: "confirm-password",
|
|
79
|
+
value: confirm,
|
|
80
|
+
onChange: (e) => setConfirm(e.target.value),
|
|
81
|
+
placeholder: t("confirmPasswordPlaceholder"),
|
|
82
|
+
autoComplete: "new-password"
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsxs("ul", { className: "space-y-1.5 text-xs", "aria-label": "Password requirements", children: [
|
|
87
|
+
rules.map((rule) => {
|
|
88
|
+
const pass = rule.test(password);
|
|
89
|
+
return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
|
|
90
|
+
pass ? /* @__PURE__ */ jsx(CheckIcon, { size: 14, className: "text-success shrink-0" }) : /* @__PURE__ */ jsx(XIcon, { size: 14, className: "text-text-tertiary shrink-0" }),
|
|
91
|
+
/* @__PURE__ */ jsx("span", { className: pass ? "text-success" : "text-text-tertiary", children: rule.label })
|
|
92
|
+
] }, rule.label);
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
|
|
95
|
+
passwordsMatch ? /* @__PURE__ */ jsx(CheckIcon, { size: 14, className: "text-success shrink-0" }) : /* @__PURE__ */ jsx(XIcon, { size: 14, className: "text-text-tertiary shrink-0" }),
|
|
96
|
+
/* @__PURE__ */ jsx("span", { className: passwordsMatch ? "text-success" : "text-text-tertiary", children: t("rules.match") })
|
|
97
|
+
] })
|
|
98
|
+
] }),
|
|
99
|
+
!!error && /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-destructive", children: error }),
|
|
100
|
+
/* @__PURE__ */ jsx(
|
|
101
|
+
Button,
|
|
102
|
+
{
|
|
103
|
+
variant: "accent",
|
|
104
|
+
className: "w-full",
|
|
105
|
+
disabled: loading || !allRulesPass || !passwordsMatch,
|
|
106
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
|
|
108
|
+
t("pending")
|
|
109
|
+
] }) : t("submit")
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) }),
|
|
113
|
+
/* @__PURE__ */ jsx(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsx(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
type: "button",
|
|
117
|
+
onClick: onBackToLogin,
|
|
118
|
+
className: "text-sm text-text-tertiary hover:text-text-primary transition-colors",
|
|
119
|
+
children: t("backToLogin")
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }) });
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { ResetPasswordBlock };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useSafeTimeout } from './chunk-MDAYDDTC.js';
|
|
2
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
3
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
4
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
5
|
+
import { CopyIcon } from './chunk-TV4RSQH4.js';
|
|
6
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import Prism from 'prismjs';
|
|
9
|
+
import 'prismjs/themes/prism-tomorrow.css';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
function CodeBlock({
|
|
13
|
+
code,
|
|
14
|
+
language = "javascript",
|
|
15
|
+
filename,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
const [copied, setCopied] = React.useState(false);
|
|
20
|
+
const setSafeTimeout = useSafeTimeout();
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
Prism.highlightAll();
|
|
23
|
+
}, [code, language]);
|
|
24
|
+
const onCopy = () => {
|
|
25
|
+
navigator.clipboard.writeText(code);
|
|
26
|
+
setCopied(true);
|
|
27
|
+
setSafeTimeout(() => setCopied(false), 2e3);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: cn(
|
|
33
|
+
"relative overflow-hidden rounded-lg glass-panel",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
!!filename && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between border-b border-border/30 bg-surface-hover px-4 py-2 text-xs text-text-tertiary", children: /* @__PURE__ */ jsx("span", { children: filename }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs(
|
|
41
|
+
Button,
|
|
42
|
+
{
|
|
43
|
+
size: "icon",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
className: "absolute right-1 top-1 text-text-tertiary hover:bg-surface-hover hover:text-text-secondary",
|
|
46
|
+
onClick: onCopy,
|
|
47
|
+
children: [
|
|
48
|
+
copied ? /* @__PURE__ */ jsx(CheckIcon, { size: 14 }) : /* @__PURE__ */ jsx(CopyIcon, { size: 14 }),
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Copy code" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto p-4", children: /* @__PURE__ */ jsx("pre", { className: "!m-0 !bg-transparent !p-0", children: /* @__PURE__ */ jsx("code", { className: `language-${language}`, children: code }) }) })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { CodeBlock };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HeaderBlock } from './chunk-WOYBVPXK.js';
|
|
2
|
+
import { FooterBlock } from './chunk-AYWL4IYM.js';
|
|
3
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function MarketingShellPageKit({
|
|
7
|
+
navigationItems,
|
|
8
|
+
primaryAction,
|
|
9
|
+
secondaryAction,
|
|
10
|
+
announcement,
|
|
11
|
+
footerProps,
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
contentClassName
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("min-h-dvh bg-background text-text-primary", className), children: [
|
|
17
|
+
announcement ? /* @__PURE__ */ jsx("div", { className: "border-b border-border/70 bg-surface/60 px-4 py-2 text-center text-sm text-text-secondary", children: announcement }) : null,
|
|
18
|
+
/* @__PURE__ */ jsx(
|
|
19
|
+
HeaderBlock,
|
|
20
|
+
{
|
|
21
|
+
menuItems: navigationItems,
|
|
22
|
+
loginLabel: secondaryAction?.label,
|
|
23
|
+
loginHref: secondaryAction?.href,
|
|
24
|
+
signUpLabel: primaryAction?.label,
|
|
25
|
+
signUpHref: primaryAction?.href
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx("main", { className: cn("pt-28 md:pt-32", contentClassName), children }),
|
|
29
|
+
/* @__PURE__ */ jsx(FooterBlock, { ...footerProps })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { MarketingShellPageKit };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { SidebarProvider, Sidebar, SidebarHeader, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarSeparator, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenuBadge, SidebarInset, SidebarTrigger } from './chunk-J2DCQDXO.js';
|
|
2
|
+
import { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbPage, BreadcrumbLink, BreadcrumbSeparator } from './chunk-35EX5FP5.js';
|
|
3
|
+
import { Avatar, AvatarFallback } from './chunk-NAAU5IWU.js';
|
|
4
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
5
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
6
|
+
import { useMemo, Fragment } from 'react';
|
|
7
|
+
import Link from 'next/link';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var EMPTY_BREADCRUMBS = [];
|
|
11
|
+
function filterItemsByRole(items, currentRole) {
|
|
12
|
+
return items.filter((item) => {
|
|
13
|
+
if (!item.roles || item.roles.length === 0) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
if (!currentRole) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return item.roles.includes(currentRole);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function deriveAvatarFallback(workspaceName) {
|
|
23
|
+
const initials = workspaceName.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part.charAt(0).toUpperCase()).join("");
|
|
24
|
+
return initials || "WS";
|
|
25
|
+
}
|
|
26
|
+
function NavigationShellPageKit({
|
|
27
|
+
workspaceName,
|
|
28
|
+
workspaceHref = "#",
|
|
29
|
+
navigationGroups,
|
|
30
|
+
currentRole,
|
|
31
|
+
activeHref,
|
|
32
|
+
sidebarOpen,
|
|
33
|
+
onSidebarOpenChange,
|
|
34
|
+
defaultSidebarOpen = true,
|
|
35
|
+
breadcrumbs = EMPTY_BREADCRUMBS,
|
|
36
|
+
headerSearch,
|
|
37
|
+
headerNotifications,
|
|
38
|
+
headerActions,
|
|
39
|
+
user,
|
|
40
|
+
emptyNavigationMessage = "No navigation items",
|
|
41
|
+
children,
|
|
42
|
+
className
|
|
43
|
+
}) {
|
|
44
|
+
const visibleGroups = useMemo(
|
|
45
|
+
() => navigationGroups.map((group) => ({
|
|
46
|
+
...group,
|
|
47
|
+
items: filterItemsByRole(group.items, currentRole)
|
|
48
|
+
})).filter((group) => group.items.length > 0),
|
|
49
|
+
[currentRole, navigationGroups]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
SidebarProvider,
|
|
53
|
+
{
|
|
54
|
+
className: cn("min-h-[640px] w-full", className),
|
|
55
|
+
open: sidebarOpen,
|
|
56
|
+
onOpenChange: onSidebarOpenChange,
|
|
57
|
+
defaultOpen: defaultSidebarOpen,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsxs(Sidebar, { variant: "inset", collapsible: "icon", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, size: "lg", isActive: true, children: /* @__PURE__ */ jsxs(Link, { href: workspaceHref, children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8", children: /* @__PURE__ */ jsx(AvatarFallback, { children: deriveAvatarFallback(workspaceName) }) }),
|
|
62
|
+
/* @__PURE__ */ jsx("span", { className: "truncate font-semibold", children: workspaceName })
|
|
63
|
+
] }) }) }) }) }),
|
|
64
|
+
/* @__PURE__ */ jsx(SidebarSeparator, {}),
|
|
65
|
+
/* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx("nav", { "aria-label": "Application navigation", children: visibleGroups.length === 0 ? /* @__PURE__ */ jsxs(SidebarGroup, { children: [
|
|
66
|
+
/* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Navigation" }),
|
|
67
|
+
/* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx("p", { className: "px-2 py-2 text-xs text-text-tertiary", children: emptyNavigationMessage }) })
|
|
68
|
+
] }) : visibleGroups.map((group) => /* @__PURE__ */ jsxs(SidebarGroup, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx(SidebarGroupLabel, { children: group.label }),
|
|
70
|
+
/* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: group.items.map((item) => /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, isActive: item.isActive ?? activeHref === item.href, children: /* @__PURE__ */ jsxs(Link, { href: item.href, children: [
|
|
72
|
+
item.icon ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.icon }) : null,
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
|
|
74
|
+
] }) }),
|
|
75
|
+
item.badge ? /* @__PURE__ */ jsx(SidebarMenuBadge, { children: item.badge }) : null
|
|
76
|
+
] }, item.label)) }) })
|
|
77
|
+
] }, group.label)) }) })
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ jsxs(SidebarInset, { children: [
|
|
80
|
+
/* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 border-b border-border/70 bg-background/95", children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-14 items-center gap-2 px-4 md:px-6", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(SidebarTrigger, {}),
|
|
82
|
+
breadcrumbs.length > 0 ? /* @__PURE__ */ jsx(Breadcrumb, { className: "hidden md:block", children: /* @__PURE__ */ jsx(BreadcrumbList, { children: breadcrumbs.map((item, index) => {
|
|
83
|
+
const isLast = index === breadcrumbs.length - 1;
|
|
84
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85
|
+
/* @__PURE__ */ jsx(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link, { href: item.href, children: item.label }) }) }),
|
|
86
|
+
!isLast ? /* @__PURE__ */ jsx(BreadcrumbSeparator, {}) : null
|
|
87
|
+
] }, `${item.label}-${index}`);
|
|
88
|
+
}) }) }) : null,
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
90
|
+
headerSearch ? /* @__PURE__ */ jsx("div", { className: "hidden sm:flex", children: headerSearch }) : null,
|
|
91
|
+
headerNotifications,
|
|
92
|
+
headerActions,
|
|
93
|
+
user ? /* @__PURE__ */ jsxs("div", { className: "hidden items-center gap-2 rounded-md border border-border/60 px-2 py-1 md:flex", children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Avatar, { className: "h-7 w-7", children: /* @__PURE__ */ jsx(AvatarFallback, { children: user.avatarFallback ?? user.name.slice(0, 2).toUpperCase() }) }),
|
|
95
|
+
/* @__PURE__ */ jsxs("div", { className: "leading-tight", children: [
|
|
96
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-text-primary", children: user.name }),
|
|
97
|
+
user.email ? /* @__PURE__ */ jsx("p", { className: "text-xs text-text-tertiary", children: user.email }) : null
|
|
98
|
+
] })
|
|
99
|
+
] }) : null,
|
|
100
|
+
currentRole ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: currentRole }) : null
|
|
101
|
+
] })
|
|
102
|
+
] }) }),
|
|
103
|
+
/* @__PURE__ */ jsx("main", { className: "flex-1 p-4 md:p-6", children })
|
|
104
|
+
] })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { NavigationShellPageKit };
|