@vadimcomanescu/nadicode-design-system 2.0.5 → 2.0.7
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/contract.md +1 -0
- 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 +25 -24
- package/.agents/skills/seed/references/brand-override.md +3 -1
- package/css/tokens.css +300 -122
- package/dist/catalog.json +1926 -125
- package/dist/chunk-2BADJLMV.js +117 -0
- package/dist/chunk-35EX5FP5.js +106 -0
- package/dist/chunk-5PORR6LE.js +60 -0
- package/dist/chunk-5PZ4VR2D.js +142 -0
- package/dist/chunk-5UESKK6S.js +76 -0
- package/dist/chunk-6N6CSJVE.js +269 -0
- package/dist/chunk-AURJQZC4.js +110 -0
- package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
- package/dist/chunk-AYWL4IYM.js +67 -0
- package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
- package/dist/chunk-E4L6LR6P.js +33 -0
- package/dist/chunk-EJNF6JLL.js +105 -0
- package/dist/chunk-FX23F33E.js +57 -0
- package/dist/chunk-GJPTPLCQ.js +52 -0
- package/dist/chunk-GV4PKHG4.js +147 -0
- package/dist/chunk-HJ3A2YNO.js +163 -0
- package/dist/chunk-HJZRSPWB.js +38 -0
- package/dist/chunk-IDKZEPWK.js +133 -0
- package/dist/chunk-K7NQ6ZAW.js +84 -0
- package/dist/chunk-LCKLZ4XK.js +60 -0
- package/dist/chunk-MX5FUFQR.js +205 -0
- package/dist/chunk-NEHCPO53.js +44 -0
- package/dist/chunk-OHOOQUVJ.js +113 -0
- package/dist/chunk-QIHA7S3A.js +36 -0
- package/dist/chunk-RKQPU75I.js +126 -0
- package/dist/chunk-RMLS2QUC.js +77 -0
- package/dist/chunk-TS2JSPQR.js +120 -0
- package/dist/chunk-TUKZKU72.js +110 -0
- package/dist/chunk-TZXZFSD2.js +33 -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-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
- package/dist/chunk-VZCB4APK.js +94 -0
- package/dist/chunk-W7FXDRQJ.js +94 -0
- package/dist/chunk-WAVU744B.js +183 -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-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.js +5 -33
- package/dist/components/blocks/AudioVisualizerBlock.d.ts +1 -1
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
- package/dist/components/blocks/AuthSuccessBlock.js +5 -60
- 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 +6 -52
- package/dist/components/blocks/ChangelogBlock.js +8 -105
- package/dist/components/blocks/ChartCollectionBlock.js +2 -2
- 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/FAQBlock.js +6 -44
- package/dist/components/blocks/FeatureBlock.d.ts +10 -14
- package/dist/components/blocks/FeatureBlock.js +17 -159
- 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/HeaderBlock.d.ts +2 -2
- package/dist/components/blocks/HeaderBlock.js +1 -1
- 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 +16 -199
- package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
- package/dist/components/blocks/HeroSectionBlock.js +4 -4
- package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
- package/dist/components/blocks/IntegrationsBlock.js +4 -4
- package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
- package/dist/components/blocks/InteractiveAreaChartBlock.js +2 -2
- package/dist/components/blocks/NewsletterBlock.js +11 -84
- package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
- package/dist/components/blocks/PricingBlock.d.ts +1 -1
- package/dist/components/blocks/PricingBlock.js +11 -110
- package/dist/components/blocks/ProcessFlowBlock.js +10 -77
- package/dist/components/blocks/ResetPasswordBlock.js +11 -125
- package/dist/components/blocks/SignUpBlock.d.ts +1 -1
- package/dist/components/blocks/SignUpBlock.js +2 -2
- package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
- package/dist/components/blocks/SocialProofBlock.js +8 -107
- package/dist/components/blocks/StatsBlock.d.ts +1 -1
- package/dist/components/blocks/StatsBlock.js +2 -2
- package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
- package/dist/components/blocks/StatsMarketingBlock.js +5 -36
- 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 +4 -133
- package/dist/components/blocks/TwoFactorChallengeBlock.js +9 -94
- package/dist/components/blocks/TwoFactorSetupBlock.js +16 -183
- package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
- package/dist/components/blocks/UsageDonutBlock.js +2 -2
- 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 +289 -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 +221 -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 +320 -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 +246 -0
- package/dist/components/ui/AudioWaveform.js +2 -76
- package/dist/components/ui/AvatarUpload.js +1 -1
- package/dist/components/ui/Breadcrumb.js +4 -106
- package/dist/components/ui/ChartCard.js +5 -38
- package/dist/components/ui/CheckoutFormDemo.js +5 -6
- package/dist/components/ui/DataFreshness.js +2 -73
- package/dist/components/ui/MouseEffect.js +1 -1
- package/dist/components/ui/NativeSelect.js +2 -18
- package/dist/components/ui/Pagination.js +6 -117
- package/dist/components/ui/ShaderBackground.js +2 -2
- package/dist/hooks/use-shader-preset.js +2 -2
- package/dist/lib/shader-presets.js +1 -1
- package/dist/lib/tokens.config.d.ts +19 -0
- package/package.json +793 -681
- package/scripts/ds-check.mjs +10 -2
- package/src/lib/tokens.config.js +63 -41
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { NavigationShellPageKit } from '../../chunk-TUKZKU72.js';
|
|
2
|
+
import { Typography } from '../../chunk-N53OMWW2.js';
|
|
3
|
+
import '../../chunk-4HRVRW2X.js';
|
|
4
|
+
import '../../chunk-C4SNHMYC.js';
|
|
5
|
+
import '../../chunk-MJ4CB6ZL.js';
|
|
6
|
+
import '../../chunk-B5QL76GA.js';
|
|
7
|
+
import '../../chunk-HOWTYZL5.js';
|
|
8
|
+
import { NativeSelect } from '../../chunk-UGV45DH3.js';
|
|
9
|
+
import { Heading } from '../../chunk-WI547C47.js';
|
|
10
|
+
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '../../chunk-PXDHNGTG.js';
|
|
11
|
+
import { ChartCard } from '../../chunk-HJZRSPWB.js';
|
|
12
|
+
import '../../chunk-RASEB2XI.js';
|
|
13
|
+
import { Empty, EmptyTitle, EmptyDescription } from '../../chunk-55HD4L6G.js';
|
|
14
|
+
import '../../chunk-CUZJIDU7.js';
|
|
15
|
+
import '../../chunk-AP3XXYAY.js';
|
|
16
|
+
import '../../chunk-LIBXYD5Q.js';
|
|
17
|
+
import '../../chunk-35EX5FP5.js';
|
|
18
|
+
import { Card, CardHeader, CardTitle, CardContent, CardDescription } from '../../chunk-AH6YSYYT.js';
|
|
19
|
+
import '../../chunk-NAAU5IWU.js';
|
|
20
|
+
import { Button } from '../../chunk-7KIDDF3I.js';
|
|
21
|
+
import '../../chunk-6FOHUNXR.js';
|
|
22
|
+
import '../../chunk-PD2YEH3H.js';
|
|
23
|
+
import '../../chunk-CRY67BIF.js';
|
|
24
|
+
import '../../chunk-HJC6U46F.js';
|
|
25
|
+
import '../../chunk-GO35FTNJ.js';
|
|
26
|
+
import '../../chunk-PSVQ7ZNX.js';
|
|
27
|
+
import '../../chunk-FLF5AMNO.js';
|
|
28
|
+
import '../../chunk-WFJQ43SM.js';
|
|
29
|
+
import '../../chunk-S4GKGKON.js';
|
|
30
|
+
import '../../chunk-LCDDAE7J.js';
|
|
31
|
+
import '../../chunk-R674XI7C.js';
|
|
32
|
+
import '../../chunk-WUO7OONN.js';
|
|
33
|
+
import '../../chunk-BPCCTJSK.js';
|
|
34
|
+
import '../../chunk-CGUCH322.js';
|
|
35
|
+
import '../../chunk-ELKIUARM.js';
|
|
36
|
+
import '../../chunk-ZU2GYVAP.js';
|
|
37
|
+
import '../../chunk-KSHJQ2VT.js';
|
|
38
|
+
import '../../chunk-3CLXYQKB.js';
|
|
39
|
+
import '../../chunk-JHQ5NMLZ.js';
|
|
40
|
+
import '../../chunk-CRZ2JE24.js';
|
|
41
|
+
import '../../chunk-TXGANOAX.js';
|
|
42
|
+
import '../../chunk-OITJWGFV.js';
|
|
43
|
+
import '../../chunk-Z74D6D2W.js';
|
|
44
|
+
import '../../chunk-HNY45VUQ.js';
|
|
45
|
+
import '../../chunk-IJJI4RQU.js';
|
|
46
|
+
import '../../chunk-E7RBK6ML.js';
|
|
47
|
+
import '../../chunk-UBIGDGOP.js';
|
|
48
|
+
import '../../chunk-Q7LVUGFL.js';
|
|
49
|
+
import '../../chunk-ALMGJVMT.js';
|
|
50
|
+
import '../../chunk-QPXTBZWN.js';
|
|
51
|
+
import '../../chunk-GAKU7DFY.js';
|
|
52
|
+
import '../../chunk-T6BRD7TS.js';
|
|
53
|
+
import '../../chunk-R5XP45PD.js';
|
|
54
|
+
import '../../chunk-G5EO5FWC.js';
|
|
55
|
+
import '../../chunk-NCULQXJE.js';
|
|
56
|
+
import '../../chunk-VDYPDMYR.js';
|
|
57
|
+
import '../../chunk-WDGIQDQG.js';
|
|
58
|
+
import '../../chunk-WKRIKCJC.js';
|
|
59
|
+
import '../../chunk-7WDT2PRI.js';
|
|
60
|
+
import '../../chunk-AP5Y5M3R.js';
|
|
61
|
+
import '../../chunk-JZ4G2SJH.js';
|
|
62
|
+
import '../../chunk-KYGKJ553.js';
|
|
63
|
+
import '../../chunk-M7YSMMAC.js';
|
|
64
|
+
import '../../chunk-XQ2UDMPO.js';
|
|
65
|
+
import '../../chunk-JMCSAGZ3.js';
|
|
66
|
+
import '../../chunk-QUKDUSHD.js';
|
|
67
|
+
import '../../chunk-4NXZIMYZ.js';
|
|
68
|
+
import '../../chunk-TBKJ34BB.js';
|
|
69
|
+
import '../../chunk-2IZC7HSV.js';
|
|
70
|
+
import '../../chunk-2SDZMTB2.js';
|
|
71
|
+
import '../../chunk-R3AO6AZM.js';
|
|
72
|
+
import '../../chunk-RYOTIXZO.js';
|
|
73
|
+
import '../../chunk-W3B3UOEG.js';
|
|
74
|
+
import '../../chunk-ACRVOD7W.js';
|
|
75
|
+
import '../../chunk-QSU23VYZ.js';
|
|
76
|
+
import '../../chunk-BJYCQ2NV.js';
|
|
77
|
+
import '../../chunk-VM462WZC.js';
|
|
78
|
+
import '../../chunk-O74AEVHW.js';
|
|
79
|
+
import '../../chunk-ZUHIWALK.js';
|
|
80
|
+
import '../../chunk-5UZDOF6V.js';
|
|
81
|
+
import '../../chunk-PKVTEDKO.js';
|
|
82
|
+
import '../../chunk-I3TH7PIB.js';
|
|
83
|
+
import '../../chunk-WGPK3FQ7.js';
|
|
84
|
+
import '../../chunk-JL4MVVFH.js';
|
|
85
|
+
import '../../chunk-IQEBXXB5.js';
|
|
86
|
+
import '../../chunk-AZUJNRQU.js';
|
|
87
|
+
import '../../chunk-WA45EC4Y.js';
|
|
88
|
+
import '../../chunk-2MOEOEOI.js';
|
|
89
|
+
import '../../chunk-5LCXASRW.js';
|
|
90
|
+
import '../../chunk-2ZJVU7NV.js';
|
|
91
|
+
import '../../chunk-5ESF6N36.js';
|
|
92
|
+
import '../../chunk-RBPLOM3A.js';
|
|
93
|
+
import '../../chunk-GCUTJI7M.js';
|
|
94
|
+
import '../../chunk-2NT57K4U.js';
|
|
95
|
+
import '../../chunk-6G3RRWJT.js';
|
|
96
|
+
import '../../chunk-JRJGSNI4.js';
|
|
97
|
+
import '../../chunk-RF6ECFS5.js';
|
|
98
|
+
import '../../chunk-TV4RSQH4.js';
|
|
99
|
+
import '../../chunk-4FEAWXJD.js';
|
|
100
|
+
import '../../chunk-JHQTKMKG.js';
|
|
101
|
+
import '../../chunk-CI7GPGCJ.js';
|
|
102
|
+
import '../../chunk-226EBOTK.js';
|
|
103
|
+
import '../../chunk-G5YLGJXR.js';
|
|
104
|
+
import '../../chunk-G24VV5NO.js';
|
|
105
|
+
import '../../chunk-6BAV4TZ5.js';
|
|
106
|
+
import '../../chunk-SW6QPJM4.js';
|
|
107
|
+
import '../../chunk-V6WNRZT3.js';
|
|
108
|
+
import '../../chunk-JBK2LA6U.js';
|
|
109
|
+
import '../../chunk-55U27XY4.js';
|
|
110
|
+
import '../../chunk-LSPO6OBI.js';
|
|
111
|
+
import '../../chunk-Y56WBNCY.js';
|
|
112
|
+
import '../../chunk-KYZT3RNW.js';
|
|
113
|
+
import '../../chunk-UEG2LI7Z.js';
|
|
114
|
+
import '../../chunk-JJTQOH7J.js';
|
|
115
|
+
import '../../chunk-72X6SXOX.js';
|
|
116
|
+
import '../../chunk-SR5U52V3.js';
|
|
117
|
+
import '../../chunk-74RKVIBV.js';
|
|
118
|
+
import '../../chunk-AWIJHDNK.js';
|
|
119
|
+
import '../../chunk-BRP6D56U.js';
|
|
120
|
+
import '../../chunk-S733NAYS.js';
|
|
121
|
+
import '../../chunk-MAUTIHQG.js';
|
|
122
|
+
import '../../chunk-666N6OTL.js';
|
|
123
|
+
import '../../chunk-FMH55OKV.js';
|
|
124
|
+
import '../../chunk-WXVNTJIB.js';
|
|
125
|
+
import '../../chunk-CXACRCZ4.js';
|
|
126
|
+
import '../../chunk-T7H53CK2.js';
|
|
127
|
+
import '../../chunk-BFLN54VR.js';
|
|
128
|
+
import '../../chunk-P6IRHPFM.js';
|
|
129
|
+
import '../../chunk-SXHYB7JB.js';
|
|
130
|
+
import '../../chunk-ONGJ7AC2.js';
|
|
131
|
+
import '../../chunk-UHXGBV5N.js';
|
|
132
|
+
import '../../chunk-UIUMTURU.js';
|
|
133
|
+
import '../../chunk-PRUXIDBD.js';
|
|
134
|
+
import '../../chunk-NURPUVUV.js';
|
|
135
|
+
import { Badge } from '../../chunk-S4JAHKOP.js';
|
|
136
|
+
import '../../chunk-HJBXUXTD.js';
|
|
137
|
+
import '../../chunk-ASKFAYYR.js';
|
|
138
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
139
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
140
|
+
|
|
141
|
+
function deriveState(state, data) {
|
|
142
|
+
if (state) {
|
|
143
|
+
return state;
|
|
144
|
+
}
|
|
145
|
+
if (!data || data.length === 0) {
|
|
146
|
+
return "empty";
|
|
147
|
+
}
|
|
148
|
+
return "has-data";
|
|
149
|
+
}
|
|
150
|
+
function renderGridRegion(region) {
|
|
151
|
+
const state = deriveState(region.state, region.rows);
|
|
152
|
+
const isFilteredState = state === "filtered";
|
|
153
|
+
const isPartialDataState = state === "partial-data";
|
|
154
|
+
if (state === "loading") {
|
|
155
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
156
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
|
|
157
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading analytics table" }) })
|
|
158
|
+
] }, region.id);
|
|
159
|
+
}
|
|
160
|
+
if (state === "error") {
|
|
161
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
162
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
|
|
163
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
role: "alert",
|
|
167
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
168
|
+
children: region.errorMessage ?? "Analytics table is unavailable."
|
|
169
|
+
}
|
|
170
|
+
) })
|
|
171
|
+
] }, region.id);
|
|
172
|
+
}
|
|
173
|
+
if (state === "empty" || isFilteredState) {
|
|
174
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
175
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
176
|
+
/* @__PURE__ */ jsx(CardTitle, { children: region.title }),
|
|
177
|
+
region.description ? /* @__PURE__ */ jsx(CardDescription, { children: region.description }) : null
|
|
178
|
+
] }),
|
|
179
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Empty, { children: [
|
|
180
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: region.emptyTitle ?? (isFilteredState ? "No rows for selected filters" : "No matching rows") }),
|
|
181
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: region.emptyDescription ?? (isFilteredState ? "Broaden filters or date range to restore table results." : "Adjust filters or date range to load analytics records.") })
|
|
182
|
+
] }) })
|
|
183
|
+
] }, region.id);
|
|
184
|
+
}
|
|
185
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
186
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
187
|
+
/* @__PURE__ */ jsx(CardTitle, { children: region.title }),
|
|
188
|
+
region.description ? /* @__PURE__ */ jsx(CardDescription, { children: region.description }) : null
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
191
|
+
isPartialDataState ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mb-3 text-text-secondary", children: "Showing available rows while some analytics dimensions are still syncing." }) : null,
|
|
192
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
193
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: region.columns.map((column) => /* @__PURE__ */ jsx(TableHead, { children: column }, `${region.id}-${column}`)) }) }),
|
|
194
|
+
/* @__PURE__ */ jsx(TableBody, { children: region.rows.map((row, rowIndex) => /* @__PURE__ */ jsx(TableRow, { children: region.columns.map((column) => /* @__PURE__ */ jsx(TableCell, { children: row[column] ?? "-" }, `${region.id}-row-${rowIndex}-${column}`)) }, `${region.id}-row-${rowIndex}`)) })
|
|
195
|
+
] }) })
|
|
196
|
+
] })
|
|
197
|
+
] }, region.id);
|
|
198
|
+
}
|
|
199
|
+
function AnalyticsPageKit({
|
|
200
|
+
shell,
|
|
201
|
+
title = "Analytics reporting",
|
|
202
|
+
description = "Coordinate filters, chart surfaces, and tabular analysis from one stable page-kit contract.",
|
|
203
|
+
filters,
|
|
204
|
+
chartRegions,
|
|
205
|
+
gridRegions,
|
|
206
|
+
comparisonLabel,
|
|
207
|
+
onResetFilters,
|
|
208
|
+
className
|
|
209
|
+
}) {
|
|
210
|
+
return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
|
|
211
|
+
/* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
|
|
212
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
|
|
213
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
"section",
|
|
217
|
+
{
|
|
218
|
+
"aria-label": "Analytics filters",
|
|
219
|
+
className: "rounded-lg border border-border/70 bg-surface/60 p-4",
|
|
220
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-4", children: [
|
|
221
|
+
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "min-w-[180px] flex-1 space-y-2", children: [
|
|
222
|
+
/* @__PURE__ */ jsx("label", { htmlFor: `analytics-filter-${filter.id}`, className: "text-sm font-medium text-text-primary", children: filter.label }),
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
NativeSelect,
|
|
225
|
+
{
|
|
226
|
+
id: `analytics-filter-${filter.id}`,
|
|
227
|
+
"aria-label": filter.label,
|
|
228
|
+
value: filter.value,
|
|
229
|
+
onChange: (event) => filter.onChange?.(event.target.value),
|
|
230
|
+
children: filter.options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.label }, `${filter.id}-${option.value}`))
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
] }, filter.id)),
|
|
234
|
+
comparisonLabel ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: comparisonLabel }) : null,
|
|
235
|
+
onResetFilters ? /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: onResetFilters, children: "Reset filters" }) : null
|
|
236
|
+
] })
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ jsx("section", { className: "grid gap-4 xl:grid-cols-2", children: chartRegions.map((region) => {
|
|
240
|
+
const state = deriveState(region.state, region.data);
|
|
241
|
+
const isFilteredState = state === "filtered";
|
|
242
|
+
const isPartialDataState = state === "partial-data";
|
|
243
|
+
if (state === "error") {
|
|
244
|
+
return /* @__PURE__ */ jsxs(Card, { className: region.className, children: [
|
|
245
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: region.title }) }),
|
|
246
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
role: "alert",
|
|
250
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
251
|
+
children: region.errorMessage ?? "Analytics chart is unavailable."
|
|
252
|
+
}
|
|
253
|
+
) })
|
|
254
|
+
] }, region.id);
|
|
255
|
+
}
|
|
256
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
257
|
+
isPartialDataState ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Showing available chart data while some series are still syncing." }) : null,
|
|
258
|
+
/* @__PURE__ */ jsx(
|
|
259
|
+
ChartCard,
|
|
260
|
+
{
|
|
261
|
+
className: region.className,
|
|
262
|
+
title: region.title,
|
|
263
|
+
description: region.description,
|
|
264
|
+
chart: region.chart,
|
|
265
|
+
data: state === "empty" || isFilteredState ? [] : region.data,
|
|
266
|
+
loading: state === "loading",
|
|
267
|
+
emptyTitle: region.emptyTitle ?? (isFilteredState ? "No chart points for selected filters" : "No chart points"),
|
|
268
|
+
emptyDescription: region.emptyDescription ?? "Try adjusting filters to broaden the results."
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
] }, region.id);
|
|
272
|
+
}) }),
|
|
273
|
+
/* @__PURE__ */ jsx("section", { className: "grid gap-4 xl:grid-cols-2", children: gridRegions.map((region) => renderGridRegion(region)) })
|
|
274
|
+
] }) });
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export { AnalyticsPageKit };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChangelogBlock } from "../blocks/ChangelogBlock";
|
|
3
|
+
import { NewsletterBlock } from "../blocks/NewsletterBlock";
|
|
4
|
+
import { type MarketingShellPageKitProps } from "./MarketingShellPageKit";
|
|
5
|
+
export type BlogContentPageKitState = "loading" | "has-data" | "filtered" | "paginated" | "empty";
|
|
6
|
+
export type BlogContentPageKitVariant = "content-index" | "content-detail" | "changelog";
|
|
7
|
+
export interface BlogContentPageKitCategory {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
count?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface BlogContentPageKitArticle {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
excerpt: string;
|
|
16
|
+
category: string;
|
|
17
|
+
authorName: string;
|
|
18
|
+
authorFallback?: string;
|
|
19
|
+
readTimeLabel?: string;
|
|
20
|
+
publishedAt: string;
|
|
21
|
+
onOpen?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface BlogContentPageKitCodeExample {
|
|
24
|
+
id: string;
|
|
25
|
+
filename?: string;
|
|
26
|
+
language?: string;
|
|
27
|
+
code: string;
|
|
28
|
+
}
|
|
29
|
+
export interface BlogContentPageKitDetail {
|
|
30
|
+
title: string;
|
|
31
|
+
excerpt?: string;
|
|
32
|
+
authorName: string;
|
|
33
|
+
authorFallback?: string;
|
|
34
|
+
publishedAt: string;
|
|
35
|
+
readTimeLabel?: string;
|
|
36
|
+
content: React.ReactNode;
|
|
37
|
+
codeExamples?: BlogContentPageKitCodeExample[];
|
|
38
|
+
}
|
|
39
|
+
export interface BlogContentPageKitPagination {
|
|
40
|
+
page: number;
|
|
41
|
+
totalPages: number;
|
|
42
|
+
onPageChange: (nextPage: number) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface BlogContentPageKitEmptyState {
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
47
|
+
}
|
|
48
|
+
export interface BlogContentPageKitProps {
|
|
49
|
+
shell: Omit<MarketingShellPageKitProps, "children">;
|
|
50
|
+
state?: BlogContentPageKitState;
|
|
51
|
+
variant?: BlogContentPageKitVariant;
|
|
52
|
+
categories?: BlogContentPageKitCategory[];
|
|
53
|
+
activeCategoryId?: string | null;
|
|
54
|
+
onCategoryChange?: (categoryId: string | null) => void;
|
|
55
|
+
articles?: BlogContentPageKitArticle[];
|
|
56
|
+
detail?: BlogContentPageKitDetail;
|
|
57
|
+
changelog?: React.ComponentProps<typeof ChangelogBlock> | null;
|
|
58
|
+
pagination?: BlogContentPageKitPagination;
|
|
59
|
+
newsletter?: React.ComponentProps<typeof NewsletterBlock> | null;
|
|
60
|
+
loadingMessage?: string;
|
|
61
|
+
emptyState?: BlogContentPageKitEmptyState;
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function BlogContentPageKit({ shell, state, variant, categories, activeCategoryId, onCategoryChange, articles, detail, changelog, pagination, newsletter, loadingMessage, emptyState, className, }: BlogContentPageKitProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { MarketingShellPageKit } from '../../chunk-E4L6LR6P.js';
|
|
2
|
+
import { NewsletterBlock } from '../../chunk-K7NQ6ZAW.js';
|
|
3
|
+
import '../../chunk-DARC2ACH.js';
|
|
4
|
+
import '../../chunk-AYWL4IYM.js';
|
|
5
|
+
import '../../chunk-WOYBVPXK.js';
|
|
6
|
+
import { ChangelogBlock } from '../../chunk-EJNF6JLL.js';
|
|
7
|
+
import { CodeBlock } from '../../chunk-5PORR6LE.js';
|
|
8
|
+
import '../../chunk-MDAYDDTC.js';
|
|
9
|
+
import { Typography } from '../../chunk-N53OMWW2.js';
|
|
10
|
+
import '../../chunk-ZLSWCV55.js';
|
|
11
|
+
import '../../chunk-DQPK2XRL.js';
|
|
12
|
+
import '../../chunk-HOWTYZL5.js';
|
|
13
|
+
import '../../chunk-GHIBG7OM.js';
|
|
14
|
+
import { Heading } from '../../chunk-WI547C47.js';
|
|
15
|
+
import '../../chunk-A7NUWD76.js';
|
|
16
|
+
import '../../chunk-CUZJIDU7.js';
|
|
17
|
+
import '../../chunk-AP3XXYAY.js';
|
|
18
|
+
import '../../chunk-LIBXYD5Q.js';
|
|
19
|
+
import '../../chunk-I23DDSU7.js';
|
|
20
|
+
import { Card, CardHeader, CardTitle, CardContent } from '../../chunk-AH6YSYYT.js';
|
|
21
|
+
import { Avatar, AvatarFallback } from '../../chunk-NAAU5IWU.js';
|
|
22
|
+
import { Button } from '../../chunk-7KIDDF3I.js';
|
|
23
|
+
import '../../chunk-6FOHUNXR.js';
|
|
24
|
+
import '../../chunk-PD2YEH3H.js';
|
|
25
|
+
import '../../chunk-CRY67BIF.js';
|
|
26
|
+
import '../../chunk-HJC6U46F.js';
|
|
27
|
+
import '../../chunk-GO35FTNJ.js';
|
|
28
|
+
import '../../chunk-PSVQ7ZNX.js';
|
|
29
|
+
import '../../chunk-FLF5AMNO.js';
|
|
30
|
+
import '../../chunk-WFJQ43SM.js';
|
|
31
|
+
import '../../chunk-S4GKGKON.js';
|
|
32
|
+
import '../../chunk-LCDDAE7J.js';
|
|
33
|
+
import '../../chunk-R674XI7C.js';
|
|
34
|
+
import '../../chunk-WUO7OONN.js';
|
|
35
|
+
import '../../chunk-BPCCTJSK.js';
|
|
36
|
+
import '../../chunk-CGUCH322.js';
|
|
37
|
+
import '../../chunk-ELKIUARM.js';
|
|
38
|
+
import '../../chunk-ZU2GYVAP.js';
|
|
39
|
+
import '../../chunk-KSHJQ2VT.js';
|
|
40
|
+
import '../../chunk-3CLXYQKB.js';
|
|
41
|
+
import '../../chunk-JHQ5NMLZ.js';
|
|
42
|
+
import '../../chunk-CRZ2JE24.js';
|
|
43
|
+
import '../../chunk-TXGANOAX.js';
|
|
44
|
+
import '../../chunk-OITJWGFV.js';
|
|
45
|
+
import '../../chunk-Z74D6D2W.js';
|
|
46
|
+
import '../../chunk-HNY45VUQ.js';
|
|
47
|
+
import '../../chunk-IJJI4RQU.js';
|
|
48
|
+
import '../../chunk-E7RBK6ML.js';
|
|
49
|
+
import '../../chunk-UBIGDGOP.js';
|
|
50
|
+
import '../../chunk-Q7LVUGFL.js';
|
|
51
|
+
import '../../chunk-ALMGJVMT.js';
|
|
52
|
+
import '../../chunk-QPXTBZWN.js';
|
|
53
|
+
import '../../chunk-GAKU7DFY.js';
|
|
54
|
+
import '../../chunk-T6BRD7TS.js';
|
|
55
|
+
import '../../chunk-R5XP45PD.js';
|
|
56
|
+
import '../../chunk-G5EO5FWC.js';
|
|
57
|
+
import '../../chunk-NCULQXJE.js';
|
|
58
|
+
import '../../chunk-VDYPDMYR.js';
|
|
59
|
+
import '../../chunk-WDGIQDQG.js';
|
|
60
|
+
import '../../chunk-WKRIKCJC.js';
|
|
61
|
+
import '../../chunk-7WDT2PRI.js';
|
|
62
|
+
import '../../chunk-AP5Y5M3R.js';
|
|
63
|
+
import '../../chunk-JZ4G2SJH.js';
|
|
64
|
+
import '../../chunk-KYGKJ553.js';
|
|
65
|
+
import '../../chunk-M7YSMMAC.js';
|
|
66
|
+
import '../../chunk-XQ2UDMPO.js';
|
|
67
|
+
import '../../chunk-JMCSAGZ3.js';
|
|
68
|
+
import '../../chunk-QUKDUSHD.js';
|
|
69
|
+
import '../../chunk-4NXZIMYZ.js';
|
|
70
|
+
import '../../chunk-TBKJ34BB.js';
|
|
71
|
+
import '../../chunk-2IZC7HSV.js';
|
|
72
|
+
import '../../chunk-2SDZMTB2.js';
|
|
73
|
+
import '../../chunk-R3AO6AZM.js';
|
|
74
|
+
import '../../chunk-RYOTIXZO.js';
|
|
75
|
+
import '../../chunk-W3B3UOEG.js';
|
|
76
|
+
import '../../chunk-ACRVOD7W.js';
|
|
77
|
+
import '../../chunk-QSU23VYZ.js';
|
|
78
|
+
import '../../chunk-BJYCQ2NV.js';
|
|
79
|
+
import '../../chunk-VM462WZC.js';
|
|
80
|
+
import '../../chunk-O74AEVHW.js';
|
|
81
|
+
import '../../chunk-ZUHIWALK.js';
|
|
82
|
+
import '../../chunk-5UZDOF6V.js';
|
|
83
|
+
import '../../chunk-PKVTEDKO.js';
|
|
84
|
+
import '../../chunk-I3TH7PIB.js';
|
|
85
|
+
import '../../chunk-WGPK3FQ7.js';
|
|
86
|
+
import '../../chunk-JL4MVVFH.js';
|
|
87
|
+
import '../../chunk-IQEBXXB5.js';
|
|
88
|
+
import '../../chunk-AZUJNRQU.js';
|
|
89
|
+
import '../../chunk-WA45EC4Y.js';
|
|
90
|
+
import '../../chunk-2MOEOEOI.js';
|
|
91
|
+
import '../../chunk-5LCXASRW.js';
|
|
92
|
+
import '../../chunk-2ZJVU7NV.js';
|
|
93
|
+
import '../../chunk-5ESF6N36.js';
|
|
94
|
+
import '../../chunk-RBPLOM3A.js';
|
|
95
|
+
import '../../chunk-GCUTJI7M.js';
|
|
96
|
+
import '../../chunk-2NT57K4U.js';
|
|
97
|
+
import '../../chunk-6G3RRWJT.js';
|
|
98
|
+
import '../../chunk-JRJGSNI4.js';
|
|
99
|
+
import '../../chunk-RF6ECFS5.js';
|
|
100
|
+
import '../../chunk-TV4RSQH4.js';
|
|
101
|
+
import '../../chunk-4FEAWXJD.js';
|
|
102
|
+
import '../../chunk-JHQTKMKG.js';
|
|
103
|
+
import '../../chunk-CI7GPGCJ.js';
|
|
104
|
+
import '../../chunk-226EBOTK.js';
|
|
105
|
+
import '../../chunk-G5YLGJXR.js';
|
|
106
|
+
import '../../chunk-G24VV5NO.js';
|
|
107
|
+
import '../../chunk-6BAV4TZ5.js';
|
|
108
|
+
import '../../chunk-SW6QPJM4.js';
|
|
109
|
+
import '../../chunk-V6WNRZT3.js';
|
|
110
|
+
import '../../chunk-JBK2LA6U.js';
|
|
111
|
+
import '../../chunk-55U27XY4.js';
|
|
112
|
+
import '../../chunk-LSPO6OBI.js';
|
|
113
|
+
import '../../chunk-Y56WBNCY.js';
|
|
114
|
+
import '../../chunk-KYZT3RNW.js';
|
|
115
|
+
import '../../chunk-UEG2LI7Z.js';
|
|
116
|
+
import '../../chunk-JJTQOH7J.js';
|
|
117
|
+
import '../../chunk-72X6SXOX.js';
|
|
118
|
+
import '../../chunk-SR5U52V3.js';
|
|
119
|
+
import '../../chunk-74RKVIBV.js';
|
|
120
|
+
import '../../chunk-AWIJHDNK.js';
|
|
121
|
+
import '../../chunk-BRP6D56U.js';
|
|
122
|
+
import '../../chunk-S733NAYS.js';
|
|
123
|
+
import '../../chunk-MAUTIHQG.js';
|
|
124
|
+
import '../../chunk-666N6OTL.js';
|
|
125
|
+
import '../../chunk-FMH55OKV.js';
|
|
126
|
+
import '../../chunk-WXVNTJIB.js';
|
|
127
|
+
import '../../chunk-CXACRCZ4.js';
|
|
128
|
+
import '../../chunk-T7H53CK2.js';
|
|
129
|
+
import '../../chunk-BFLN54VR.js';
|
|
130
|
+
import '../../chunk-P6IRHPFM.js';
|
|
131
|
+
import '../../chunk-SXHYB7JB.js';
|
|
132
|
+
import '../../chunk-ONGJ7AC2.js';
|
|
133
|
+
import '../../chunk-UHXGBV5N.js';
|
|
134
|
+
import '../../chunk-UIUMTURU.js';
|
|
135
|
+
import '../../chunk-PRUXIDBD.js';
|
|
136
|
+
import '../../chunk-NURPUVUV.js';
|
|
137
|
+
import { Badge } from '../../chunk-S4JAHKOP.js';
|
|
138
|
+
import '../../chunk-HJBXUXTD.js';
|
|
139
|
+
import '../../chunk-ASKFAYYR.js';
|
|
140
|
+
import { cn } from '../../chunk-QYZT24TS.js';
|
|
141
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
142
|
+
|
|
143
|
+
var EMPTY_CATEGORIES = [];
|
|
144
|
+
var EMPTY_ARTICLES = [];
|
|
145
|
+
var DEFAULT_CHANGELOG = {};
|
|
146
|
+
var DEFAULT_NEWSLETTER = {};
|
|
147
|
+
var DEFAULT_EMPTY_STATE = {
|
|
148
|
+
title: "No content available",
|
|
149
|
+
description: "Add content entries to populate this route."
|
|
150
|
+
};
|
|
151
|
+
function BlogContentPageKit({
|
|
152
|
+
shell,
|
|
153
|
+
state = "has-data",
|
|
154
|
+
variant = "content-index",
|
|
155
|
+
categories = EMPTY_CATEGORIES,
|
|
156
|
+
activeCategoryId = null,
|
|
157
|
+
onCategoryChange,
|
|
158
|
+
articles = EMPTY_ARTICLES,
|
|
159
|
+
detail,
|
|
160
|
+
changelog = DEFAULT_CHANGELOG,
|
|
161
|
+
pagination,
|
|
162
|
+
newsletter = DEFAULT_NEWSLETTER,
|
|
163
|
+
loadingMessage = "Loading content...",
|
|
164
|
+
emptyState = DEFAULT_EMPTY_STATE,
|
|
165
|
+
className
|
|
166
|
+
}) {
|
|
167
|
+
const shouldRenderLoading = state === "loading";
|
|
168
|
+
const shouldRenderEmpty = state === "empty" || (state === "filtered" || state === "has-data" || state === "paginated") && variant === "content-index" && articles.length === 0;
|
|
169
|
+
let content = null;
|
|
170
|
+
if (shouldRenderLoading) {
|
|
171
|
+
content = /* @__PURE__ */ jsx("div", { role: "status", className: "rounded-md border border-border/70 bg-surface/70 px-4 py-3 text-sm text-text-secondary", children: loadingMessage });
|
|
172
|
+
} else if (variant === "changelog") {
|
|
173
|
+
content = changelog === null ? null : /* @__PURE__ */ jsx(ChangelogBlock, { ...changelog });
|
|
174
|
+
} else if (variant === "content-detail") {
|
|
175
|
+
content = detail ? /* @__PURE__ */ jsxs("article", { className: "space-y-6", children: [
|
|
176
|
+
/* @__PURE__ */ jsxs("header", { className: "space-y-4", children: [
|
|
177
|
+
/* @__PURE__ */ jsx(Heading, { level: 2, children: detail.title }),
|
|
178
|
+
detail.excerpt ? /* @__PURE__ */ jsx(Typography, { variant: "muted", children: detail.excerpt }) : null,
|
|
179
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 border-y border-border/70 py-3", children: [
|
|
180
|
+
/* @__PURE__ */ jsx(Avatar, { className: "h-9 w-9", children: /* @__PURE__ */ jsx(AvatarFallback, { children: detail.authorFallback ?? detail.authorName.slice(0, 2).toUpperCase() }) }),
|
|
181
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
182
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium text-text-primary", children: detail.authorName }),
|
|
183
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-secondary", children: [
|
|
184
|
+
detail.publishedAt,
|
|
185
|
+
detail.readTimeLabel ? ` \xB7 ${detail.readTimeLabel}` : ""
|
|
186
|
+
] })
|
|
187
|
+
] })
|
|
188
|
+
] })
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-6", children: detail.content }),
|
|
191
|
+
detail.codeExamples && detail.codeExamples.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
|
|
192
|
+
/* @__PURE__ */ jsx(Heading, { level: 4, children: "Code examples" }),
|
|
193
|
+
detail.codeExamples.map((example) => /* @__PURE__ */ jsx(
|
|
194
|
+
CodeBlock,
|
|
195
|
+
{
|
|
196
|
+
filename: example.filename,
|
|
197
|
+
language: example.language,
|
|
198
|
+
code: example.code
|
|
199
|
+
},
|
|
200
|
+
example.id
|
|
201
|
+
))
|
|
202
|
+
] }) : null
|
|
203
|
+
] }) : /* @__PURE__ */ jsxs(Card, { children: [
|
|
204
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: emptyState.title }) }),
|
|
205
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "muted", children: emptyState.description }) })
|
|
206
|
+
] });
|
|
207
|
+
} else {
|
|
208
|
+
content = /* @__PURE__ */ jsxs("div", { "data-testid": "blog-index-view", className: "space-y-6", children: [
|
|
209
|
+
categories.length > 0 ? /* @__PURE__ */ jsxs("div", { "data-testid": "blog-category-controls", className: "flex flex-wrap items-center gap-2", children: [
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
Button,
|
|
212
|
+
{
|
|
213
|
+
type: "button",
|
|
214
|
+
variant: activeCategoryId === null ? "primary" : "outline",
|
|
215
|
+
size: "sm",
|
|
216
|
+
onClick: () => onCategoryChange?.(null),
|
|
217
|
+
children: "All"
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
categories.map((category) => /* @__PURE__ */ jsxs(
|
|
221
|
+
Button,
|
|
222
|
+
{
|
|
223
|
+
type: "button",
|
|
224
|
+
variant: activeCategoryId === category.id ? "primary" : "outline",
|
|
225
|
+
size: "sm",
|
|
226
|
+
onClick: () => onCategoryChange?.(category.id),
|
|
227
|
+
children: [
|
|
228
|
+
category.label,
|
|
229
|
+
typeof category.count === "number" ? ` (${category.count})` : ""
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
category.id
|
|
233
|
+
))
|
|
234
|
+
] }) : null,
|
|
235
|
+
shouldRenderEmpty ? /* @__PURE__ */ jsxs(Card, { "data-testid": "blog-empty-state", children: [
|
|
236
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: emptyState.title }) }),
|
|
237
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "muted", children: emptyState.description }) })
|
|
238
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "grid gap-4", children: articles.map((article) => /* @__PURE__ */ jsxs(Card, { children: [
|
|
239
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "space-y-3", children: [
|
|
240
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
241
|
+
/* @__PURE__ */ jsx(Badge, { variant: "outline", children: article.category }),
|
|
242
|
+
article.readTimeLabel ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-tertiary", children: article.readTimeLabel }) : null
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ jsx(CardTitle, { children: article.title }),
|
|
245
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: article.excerpt })
|
|
246
|
+
] }),
|
|
247
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
248
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-secondary", children: [
|
|
249
|
+
article.authorName,
|
|
250
|
+
" \xB7 ",
|
|
251
|
+
article.publishedAt
|
|
252
|
+
] }),
|
|
253
|
+
article.onOpen ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: article.onOpen, children: "Open" }) : null
|
|
254
|
+
] })
|
|
255
|
+
] }, article.id)) }),
|
|
256
|
+
pagination ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
257
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-secondary", children: [
|
|
258
|
+
"Page ",
|
|
259
|
+
pagination.page,
|
|
260
|
+
" of ",
|
|
261
|
+
pagination.totalPages
|
|
262
|
+
] }),
|
|
263
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
264
|
+
/* @__PURE__ */ jsx(
|
|
265
|
+
Button,
|
|
266
|
+
{
|
|
267
|
+
type: "button",
|
|
268
|
+
size: "sm",
|
|
269
|
+
variant: "outline",
|
|
270
|
+
disabled: pagination.page <= 1,
|
|
271
|
+
onClick: () => pagination.onPageChange(Math.max(1, pagination.page - 1)),
|
|
272
|
+
children: "Previous page"
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
/* @__PURE__ */ jsx(
|
|
276
|
+
Button,
|
|
277
|
+
{
|
|
278
|
+
type: "button",
|
|
279
|
+
size: "sm",
|
|
280
|
+
variant: "outline",
|
|
281
|
+
disabled: pagination.page >= pagination.totalPages,
|
|
282
|
+
onClick: () => pagination.onPageChange(Math.min(pagination.totalPages, pagination.page + 1)),
|
|
283
|
+
children: "Next page"
|
|
284
|
+
}
|
|
285
|
+
)
|
|
286
|
+
] })
|
|
287
|
+
] }) : null
|
|
288
|
+
] });
|
|
289
|
+
}
|
|
290
|
+
return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("mx-auto w-full max-w-5xl space-y-8 px-6 pb-16", className), children: [
|
|
291
|
+
content,
|
|
292
|
+
newsletter === null ? null : /* @__PURE__ */ jsx(NewsletterBlock, { ...newsletter })
|
|
293
|
+
] }) });
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export { BlogContentPageKit };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type MarketingShellPageKitProps } from "./MarketingShellPageKit";
|
|
2
|
+
export type CheckoutPageKitState = "default" | "submitting" | "processing" | "error" | "success";
|
|
3
|
+
export interface CheckoutPageKitSummaryLineItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CheckoutPageKitSummary {
|
|
9
|
+
title: string;
|
|
10
|
+
amountLabel: string;
|
|
11
|
+
lineItems: CheckoutPageKitSummaryLineItem[];
|
|
12
|
+
}
|
|
13
|
+
export interface CheckoutPageKitBillingField {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
type?: "text" | "email" | "tel";
|
|
19
|
+
required?: boolean;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CheckoutPageKitProps {
|
|
23
|
+
shell: Omit<MarketingShellPageKitProps, "children">;
|
|
24
|
+
state?: CheckoutPageKitState;
|
|
25
|
+
summary: CheckoutPageKitSummary;
|
|
26
|
+
billingFields: CheckoutPageKitBillingField[];
|
|
27
|
+
onBillingFieldChange?: (fieldId: string, value: string) => void;
|
|
28
|
+
onSubmit?: () => void;
|
|
29
|
+
onRetry?: () => void;
|
|
30
|
+
onContinue?: () => void;
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
successMessage?: string;
|
|
33
|
+
processingMessage?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function CheckoutPageKit({ shell, state, summary, billingFields, onBillingFieldChange, onSubmit, onRetry, onContinue, errorMessage, successMessage, processingMessage, className, }: CheckoutPageKitProps): import("react/jsx-runtime").JSX.Element;
|