@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,269 @@
|
|
|
1
|
+
import { NavigationShellPageKit } from './chunk-TUKZKU72.js';
|
|
2
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
3
|
+
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from './chunk-HOWTYZL5.js';
|
|
4
|
+
import { Pagination, PaginationContent, PaginationItem, PaginationPrevious, PaginationLink, PaginationNext } from './chunk-2BADJLMV.js';
|
|
5
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
6
|
+
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-PXDHNGTG.js';
|
|
7
|
+
import { Empty, EmptyTitle, EmptyDescription } from './chunk-55HD4L6G.js';
|
|
8
|
+
import { Input } from './chunk-AP3XXYAY.js';
|
|
9
|
+
import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
|
|
10
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
11
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
12
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
var EMPTY_FILTER_CONTROLS = [];
|
|
17
|
+
var EMPTY_SELECTED_ROW_IDS = [];
|
|
18
|
+
var EMPTY_BULK_ACTIONS = [];
|
|
19
|
+
function toPlainText(value) {
|
|
20
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
21
|
+
return String(value);
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function deriveRowLabel(row, columns) {
|
|
26
|
+
if (row.summaryLabel) {
|
|
27
|
+
return row.summaryLabel;
|
|
28
|
+
}
|
|
29
|
+
const firstColumn = columns[0];
|
|
30
|
+
if (!firstColumn) {
|
|
31
|
+
return row.id;
|
|
32
|
+
}
|
|
33
|
+
const firstCellValue = row.cells[firstColumn.id];
|
|
34
|
+
return toPlainText(firstCellValue) ?? row.id;
|
|
35
|
+
}
|
|
36
|
+
function deriveState(state, rows, selectedRowId) {
|
|
37
|
+
if (state) {
|
|
38
|
+
return state;
|
|
39
|
+
}
|
|
40
|
+
if (rows.length === 0) {
|
|
41
|
+
return "empty";
|
|
42
|
+
}
|
|
43
|
+
if (selectedRowId) {
|
|
44
|
+
return "selected-row";
|
|
45
|
+
}
|
|
46
|
+
return "has-data";
|
|
47
|
+
}
|
|
48
|
+
function clampPage(value, min, max) {
|
|
49
|
+
return Math.min(Math.max(value, min), max);
|
|
50
|
+
}
|
|
51
|
+
function CrudListDetailPageKit({
|
|
52
|
+
shell,
|
|
53
|
+
title = "CRUD list detail",
|
|
54
|
+
description = "Browse records, apply filters, and inspect row details without rebuilding route scaffolding.",
|
|
55
|
+
state,
|
|
56
|
+
columns,
|
|
57
|
+
rows,
|
|
58
|
+
filterControls = EMPTY_FILTER_CONTROLS,
|
|
59
|
+
selectedRowId = null,
|
|
60
|
+
selectedRowIds = EMPTY_SELECTED_ROW_IDS,
|
|
61
|
+
onRowSelect,
|
|
62
|
+
bulkActions = EMPTY_BULK_ACTIONS,
|
|
63
|
+
detailPanel,
|
|
64
|
+
emptyState,
|
|
65
|
+
pagination,
|
|
66
|
+
errorMessage,
|
|
67
|
+
listAriaLabel = "CRUD list region",
|
|
68
|
+
headerActions,
|
|
69
|
+
renderCollection,
|
|
70
|
+
className
|
|
71
|
+
}) {
|
|
72
|
+
const selectedRow = useMemo(
|
|
73
|
+
() => selectedRowId ? rows.find((row) => row.id === selectedRowId) ?? null : null,
|
|
74
|
+
[rows, selectedRowId]
|
|
75
|
+
);
|
|
76
|
+
const resolvedState = deriveState(state, rows, selectedRowId);
|
|
77
|
+
const detailMode = detailPanel?.mode ?? "inline";
|
|
78
|
+
const computedSelectedRowIds = useMemo(() => {
|
|
79
|
+
if (selectedRowIds.length > 0) {
|
|
80
|
+
return selectedRowIds;
|
|
81
|
+
}
|
|
82
|
+
if (selectedRowId) {
|
|
83
|
+
return [selectedRowId];
|
|
84
|
+
}
|
|
85
|
+
return EMPTY_SELECTED_ROW_IDS;
|
|
86
|
+
}, [selectedRowId, selectedRowIds]);
|
|
87
|
+
const pages = useMemo(() => {
|
|
88
|
+
const totalPages = Math.max(1, pagination.totalPages);
|
|
89
|
+
const currentPage = clampPage(pagination.page, 1, totalPages);
|
|
90
|
+
const visible = 5;
|
|
91
|
+
const half = Math.floor(visible / 2);
|
|
92
|
+
let start = Math.max(1, currentPage - half);
|
|
93
|
+
const end = Math.min(totalPages, start + visible - 1);
|
|
94
|
+
if (end - start < visible - 1) {
|
|
95
|
+
start = Math.max(1, end - visible + 1);
|
|
96
|
+
}
|
|
97
|
+
return Array.from({ length: end - start + 1 }, (_, index) => start + index);
|
|
98
|
+
}, [pagination.page, pagination.totalPages]);
|
|
99
|
+
const showInlineDetail = Boolean(detailPanel && detailMode === "inline" && selectedRow);
|
|
100
|
+
const showSheetDetail = Boolean(detailPanel && detailMode === "sheet" && selectedRow);
|
|
101
|
+
return /* @__PURE__ */ jsx(NavigationShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
|
|
102
|
+
/* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
|
|
103
|
+
/* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
|
|
104
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
108
|
+
computedSelectedRowIds.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
|
|
109
|
+
computedSelectedRowIds.length,
|
|
110
|
+
" selected"
|
|
111
|
+
] }) : null,
|
|
112
|
+
resolvedState === "loading" ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Loading" }) : null,
|
|
113
|
+
resolvedState === "filtered" ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Filtered results" }) : null,
|
|
114
|
+
resolvedState === "error" ? /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: "Error" }) : null
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
117
|
+
bulkActions.map((action) => /* @__PURE__ */ jsx(
|
|
118
|
+
Button,
|
|
119
|
+
{
|
|
120
|
+
variant: "secondary",
|
|
121
|
+
disabled: action.disabled || computedSelectedRowIds.length === 0,
|
|
122
|
+
onClick: () => action.onAction(computedSelectedRowIds, rows),
|
|
123
|
+
children: action.label
|
|
124
|
+
},
|
|
125
|
+
action.id
|
|
126
|
+
)),
|
|
127
|
+
headerActions
|
|
128
|
+
] })
|
|
129
|
+
] }),
|
|
130
|
+
filterControls.length > 0 ? /* @__PURE__ */ jsxs(Card, { children: [
|
|
131
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Filters" }) }),
|
|
132
|
+
/* @__PURE__ */ jsx(CardContent, { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: filterControls.map((filter) => /* @__PURE__ */ jsxs("label", { className: "space-y-1", children: [
|
|
133
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: filter.label }),
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
Input,
|
|
136
|
+
{
|
|
137
|
+
"aria-label": filter.label,
|
|
138
|
+
value: filter.value,
|
|
139
|
+
placeholder: filter.placeholder,
|
|
140
|
+
onChange: (event) => filter.onChange(event.target.value)
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] }, filter.id)) })
|
|
144
|
+
] }) : null,
|
|
145
|
+
/* @__PURE__ */ jsxs("div", { className: cn("grid gap-4", showInlineDetail ? "xl:grid-cols-[minmax(0,1fr)_340px]" : "grid-cols-1"), children: [
|
|
146
|
+
/* @__PURE__ */ jsxs("section", { "aria-label": listAriaLabel, className: "space-y-3", children: [
|
|
147
|
+
resolvedState === "loading" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading list data" }) : null,
|
|
148
|
+
resolvedState === "error" ? /* @__PURE__ */ jsx(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
role: "alert",
|
|
152
|
+
className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
153
|
+
children: errorMessage ?? "The list is unavailable. Retry once the data source recovers."
|
|
154
|
+
}
|
|
155
|
+
) : null,
|
|
156
|
+
(resolvedState === "empty" || resolvedState === "filtered") && rows.length === 0 ? /* @__PURE__ */ jsxs(Empty, { children: [
|
|
157
|
+
/* @__PURE__ */ jsx(EmptyTitle, { children: emptyState?.title ?? "No rows to display" }),
|
|
158
|
+
/* @__PURE__ */ jsx(EmptyDescription, { children: emptyState?.description ?? "Adjust your filters or create a new record to populate this table." })
|
|
159
|
+
] }) : null,
|
|
160
|
+
resolvedState !== "loading" && resolvedState !== "error" && rows.length > 0 ? renderCollection ? renderCollection({
|
|
161
|
+
rows,
|
|
162
|
+
columns,
|
|
163
|
+
selectedRowId,
|
|
164
|
+
onRowSelect
|
|
165
|
+
}) : /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-0", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs(Table, { children: [
|
|
166
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx(TableHead, { className: column.headerClassName, children: column.header }, column.id)) }) }),
|
|
167
|
+
/* @__PURE__ */ jsx(TableBody, { children: rows.map((row) => {
|
|
168
|
+
const rowLabel = deriveRowLabel(row, columns);
|
|
169
|
+
return /* @__PURE__ */ jsx(
|
|
170
|
+
TableRow,
|
|
171
|
+
{
|
|
172
|
+
className: cn(
|
|
173
|
+
selectedRowId === row.id ? "bg-surface-secondary/70" : void 0
|
|
174
|
+
),
|
|
175
|
+
children: columns.map((column, columnIndex) => {
|
|
176
|
+
const cell = row.cells[column.id] ?? "-";
|
|
177
|
+
if (columnIndex === 0) {
|
|
178
|
+
return /* @__PURE__ */ jsx(TableCell, { className: column.cellClassName, children: /* @__PURE__ */ jsx(
|
|
179
|
+
Button,
|
|
180
|
+
{
|
|
181
|
+
variant: "ghost",
|
|
182
|
+
className: "h-auto w-full justify-start px-0 text-left",
|
|
183
|
+
"aria-label": `Select row ${rowLabel}`,
|
|
184
|
+
onClick: () => onRowSelect?.(row.id),
|
|
185
|
+
children: cell
|
|
186
|
+
}
|
|
187
|
+
) }, column.id);
|
|
188
|
+
}
|
|
189
|
+
return /* @__PURE__ */ jsx(TableCell, { className: column.cellClassName, children: cell }, column.id);
|
|
190
|
+
})
|
|
191
|
+
},
|
|
192
|
+
row.id
|
|
193
|
+
);
|
|
194
|
+
}) })
|
|
195
|
+
] }) }) }) }) : null,
|
|
196
|
+
/* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
|
|
197
|
+
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
198
|
+
PaginationPrevious,
|
|
199
|
+
{
|
|
200
|
+
href: "#",
|
|
201
|
+
onClick: (event) => {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
if (pagination.page > 1) {
|
|
204
|
+
pagination.onPageChange(pagination.page - 1);
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"aria-disabled": pagination.page <= 1,
|
|
208
|
+
className: pagination.page <= 1 ? "pointer-events-none opacity-50" : void 0
|
|
209
|
+
}
|
|
210
|
+
) }),
|
|
211
|
+
pages.map((page) => /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
212
|
+
PaginationLink,
|
|
213
|
+
{
|
|
214
|
+
href: "#",
|
|
215
|
+
isActive: page === pagination.page,
|
|
216
|
+
onClick: (event) => {
|
|
217
|
+
event.preventDefault();
|
|
218
|
+
pagination.onPageChange(page);
|
|
219
|
+
},
|
|
220
|
+
children: page
|
|
221
|
+
}
|
|
222
|
+
) }, page)),
|
|
223
|
+
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
224
|
+
PaginationNext,
|
|
225
|
+
{
|
|
226
|
+
href: "#",
|
|
227
|
+
onClick: (event) => {
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
if (pagination.page < pagination.totalPages) {
|
|
230
|
+
pagination.onPageChange(pagination.page + 1);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"aria-disabled": pagination.page >= pagination.totalPages,
|
|
234
|
+
className: pagination.page >= pagination.totalPages ? "pointer-events-none opacity-50" : void 0
|
|
235
|
+
}
|
|
236
|
+
) })
|
|
237
|
+
] }) })
|
|
238
|
+
] }),
|
|
239
|
+
showInlineDetail && detailPanel ? /* @__PURE__ */ jsx("aside", { "aria-label": detailPanel.title ?? "Detail panel", children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
240
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
241
|
+
/* @__PURE__ */ jsx(CardTitle, { children: detailPanel.title ?? "Detail" }),
|
|
242
|
+
detailPanel.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: detailPanel.description }) : null
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ jsx(CardContent, { children: selectedRow ? detailPanel.renderDetail(selectedRow) : null })
|
|
245
|
+
] }) }) : null
|
|
246
|
+
] }),
|
|
247
|
+
showSheetDetail && detailPanel && selectedRow ? /* @__PURE__ */ jsx(
|
|
248
|
+
Sheet,
|
|
249
|
+
{
|
|
250
|
+
open: showSheetDetail,
|
|
251
|
+
onOpenChange: (open) => {
|
|
252
|
+
detailPanel.onOpenChange?.(open);
|
|
253
|
+
if (!open) {
|
|
254
|
+
onRowSelect?.(null);
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
children: /* @__PURE__ */ jsxs(SheetContent, { side: "right", children: [
|
|
258
|
+
/* @__PURE__ */ jsxs(SheetHeader, { children: [
|
|
259
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: detailPanel.title ?? "Detail" }),
|
|
260
|
+
detailPanel.description ? /* @__PURE__ */ jsx(SheetDescription, { children: detailPanel.description }) : null
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4", children: detailPanel.renderDetail(selectedRow) })
|
|
263
|
+
] })
|
|
264
|
+
}
|
|
265
|
+
) : null
|
|
266
|
+
] }) });
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export { CrudListDetailPageKit };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Shine } from './chunk-DARC2ACH.js';
|
|
2
|
+
import { CountingNumber } from './chunk-F3T2U7YL.js';
|
|
3
|
+
import { Switch } from './chunk-R7N7YLFT.js';
|
|
4
|
+
import { StaggerChildren } from './chunk-DQPK2XRL.js';
|
|
5
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
6
|
+
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
|
|
7
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
8
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
9
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
10
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
11
|
+
import { useTranslations } from 'next-intl';
|
|
12
|
+
import { useState } from 'react';
|
|
13
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var defaultPlans = [
|
|
16
|
+
{
|
|
17
|
+
name: "Starter",
|
|
18
|
+
description: "Perfect for hobbyists and side projects.",
|
|
19
|
+
price: "$0",
|
|
20
|
+
period: "/forever",
|
|
21
|
+
features: ["1,000 requests/mo", "Community support", "1 project", "Basic analytics"],
|
|
22
|
+
action: "Get Started",
|
|
23
|
+
variant: "outline"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "Pro",
|
|
27
|
+
description: "For professional developers and small teams.",
|
|
28
|
+
price: (isYearly) => isYearly ? "$29" : "$39",
|
|
29
|
+
period: "/month",
|
|
30
|
+
features: ["100,000 requests/mo", "Priority support", "Unlimited projects", "Advanced analytics", "Custom domains"],
|
|
31
|
+
action: "Upgrade to Pro",
|
|
32
|
+
variant: "accent",
|
|
33
|
+
popular: true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "Enterprise",
|
|
37
|
+
description: "Custom solutions for large organizations.",
|
|
38
|
+
price: "Custom",
|
|
39
|
+
period: "",
|
|
40
|
+
features: ["Unlimited requests", "24/7 Dedicated support", "SSO & Audit logs", "SLA guarantees", "On-premise deployment"],
|
|
41
|
+
action: "Contact Sales",
|
|
42
|
+
variant: "outline"
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
function resolvePrice(price, isYearly) {
|
|
46
|
+
return typeof price === "function" ? price(isYearly) : price;
|
|
47
|
+
}
|
|
48
|
+
function PricingBlock({
|
|
49
|
+
title = "Simple, transparent pricing",
|
|
50
|
+
description = "Choose the plan that's right for you. Change or cancel anytime.",
|
|
51
|
+
plans = defaultPlans,
|
|
52
|
+
showBillingToggle = true,
|
|
53
|
+
className
|
|
54
|
+
}) {
|
|
55
|
+
const t = useTranslations("blocks.pricingBlock");
|
|
56
|
+
const [isYearly, setIsYearly] = useState(false);
|
|
57
|
+
return /* @__PURE__ */ jsx("section", { className: className ?? "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-6 lg:px-8", children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-12 text-center", children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "mb-4 sm:text-4xl", children: title }),
|
|
60
|
+
/* @__PURE__ */ jsx("p", { className: "mb-8 text-lg text-text-secondary", children: description }),
|
|
61
|
+
!!showBillingToggle && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
|
|
62
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-sm font-medium", !isYearly ? "text-text-primary" : "text-text-tertiary"), children: t("monthly") }),
|
|
63
|
+
/* @__PURE__ */ jsx(Switch, { checked: isYearly, onCheckedChange: setIsYearly, "aria-label": t("toggleYearlyBilling") }),
|
|
64
|
+
/* @__PURE__ */ jsxs("span", { className: cn("text-sm font-medium", isYearly ? "text-text-primary" : "text-text-tertiary"), children: [
|
|
65
|
+
t("yearly"),
|
|
66
|
+
" ",
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5 text-accent", children: t("savePercent") })
|
|
68
|
+
] })
|
|
69
|
+
] })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 120, className: "grid gap-8 md:grid-cols-3", children: plans.map((plan) => {
|
|
72
|
+
const priceStr = resolvePrice(plan.price, isYearly);
|
|
73
|
+
const card = /* @__PURE__ */ jsxs(
|
|
74
|
+
Card,
|
|
75
|
+
{
|
|
76
|
+
interactive: true,
|
|
77
|
+
className: cn(
|
|
78
|
+
"flex flex-col relative overflow-hidden transition-all duration-300",
|
|
79
|
+
plan.popular ? "border-accent shadow-lg shadow-accent/5 z-10" : "border-border/50 hover:border-border"
|
|
80
|
+
),
|
|
81
|
+
children: [
|
|
82
|
+
plan.popular && /* @__PURE__ */ jsx("div", { className: "absolute -top-4 left-0 ring-0 w-full flex justify-center", children: /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "shadow-lg", children: t("mostPopular") }) }),
|
|
83
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "pb-8 pt-8", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-xl font-semibold text-text-primary", children: plan.name }),
|
|
85
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-text-secondary", children: plan.description })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "flex-1", children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-8 flex items-baseline", children: [
|
|
89
|
+
priceStr === "Custom" ? /* @__PURE__ */ jsx("span", { className: "text-4xl font-extrabold text-text-primary", children: priceStr }) : /* @__PURE__ */ jsxs("span", { className: "text-4xl font-extrabold text-text-primary tabular-nums", children: [
|
|
90
|
+
"$",
|
|
91
|
+
/* @__PURE__ */ jsx(CountingNumber, { number: parseInt(priceStr.slice(1), 10), inViewOnce: true })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: "ml-1.5 text-text-tertiary", children: plan.period })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-4", children: plan.features.map((feature) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-4 text-sm text-text-secondary", children: [
|
|
96
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex h-5 w-5 items-center justify-center rounded-full bg-primary/10 text-primary"), children: /* @__PURE__ */ jsx(CheckIcon, { size: 12 }) }),
|
|
97
|
+
feature
|
|
98
|
+
] }, feature)) })
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, { className: "w-full", variant: plan.variant, children: plan.action }) })
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
plan.name
|
|
104
|
+
);
|
|
105
|
+
return plan.popular ? /* @__PURE__ */ jsx(Shine, { enable: true, loop: true, loopDelay: 3e3, color: "var(--color-accent)", opacity: 0.12, duration: 1500, children: card }, plan.name) : /* @__PURE__ */ jsx("div", { children: card }, plan.name);
|
|
106
|
+
}) })
|
|
107
|
+
] }) });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { PricingBlock };
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
var PALETTE = {
|
|
3
3
|
"arctic-light": {
|
|
4
4
|
bg: "#f7f7f8",
|
|
5
|
-
c1: "#
|
|
5
|
+
c1: "#e8f5f0",
|
|
6
6
|
c2: "#dee1e3",
|
|
7
|
-
c3: "#
|
|
7
|
+
c3: "#d4ede5",
|
|
8
8
|
c4: "#ecedee",
|
|
9
|
-
accent: "#
|
|
9
|
+
accent: "#059669"
|
|
10
10
|
},
|
|
11
11
|
"arctic-dark": {
|
|
12
|
-
bg: "#
|
|
13
|
-
c1: "#
|
|
14
|
-
c2: "#
|
|
15
|
-
c3: "#
|
|
16
|
-
c4: "#
|
|
17
|
-
accent: "#
|
|
12
|
+
bg: "#000000",
|
|
13
|
+
c1: "#06130e",
|
|
14
|
+
c2: "#0e1411",
|
|
15
|
+
c3: "#081a12",
|
|
16
|
+
c4: "#080c0a",
|
|
17
|
+
accent: "#0a9e6f"
|
|
18
18
|
},
|
|
19
19
|
bloom: {
|
|
20
20
|
bg: "#fefdfb",
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { StaggerChildren } from './chunk-DQPK2XRL.js';
|
|
2
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
3
|
+
import { siteConfig } from './chunk-A7NUWD76.js';
|
|
4
|
+
import { Separator } from './chunk-CUZJIDU7.js';
|
|
5
|
+
import { Input } from './chunk-AP3XXYAY.js';
|
|
6
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
7
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
8
|
+
import { TwitterIcon } from './chunk-LCDDAE7J.js';
|
|
9
|
+
import { LinkedinIcon } from './chunk-2IZC7HSV.js';
|
|
10
|
+
import { GithubIcon } from './chunk-WGPK3FQ7.js';
|
|
11
|
+
import { useTranslations } from 'next-intl';
|
|
12
|
+
import Link from 'next/link';
|
|
13
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
var CURRENT_YEAR = (/* @__PURE__ */ new Date()).getFullYear();
|
|
16
|
+
var defaultSocialIcons = [
|
|
17
|
+
{ icon: /* @__PURE__ */ jsx(TwitterIcon, { size: 16 }, "twitter"), label: "Twitter" },
|
|
18
|
+
{ icon: /* @__PURE__ */ jsx(GithubIcon, { size: 16 }, "github"), label: "GitHub" },
|
|
19
|
+
{ icon: /* @__PURE__ */ jsx(LinkedinIcon, { size: 16 }, "linkedin"), label: "LinkedIn" }
|
|
20
|
+
];
|
|
21
|
+
function FooterBlock({
|
|
22
|
+
brandDescription = "The ultimate design system for building futuristic, high-contrast AI interfaces.",
|
|
23
|
+
newsletterPlaceholder = "Enter your email",
|
|
24
|
+
productLinks = siteConfig.nav.footer.product,
|
|
25
|
+
companyLinks = siteConfig.nav.footer.company,
|
|
26
|
+
legalLinks = siteConfig.nav.footer.legal,
|
|
27
|
+
socialIcons = defaultSocialIcons,
|
|
28
|
+
className
|
|
29
|
+
}) {
|
|
30
|
+
const t = useTranslations("blocks.footerBlock");
|
|
31
|
+
return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("footer", { className: className ?? "bg-background py-12 lg:py-16 border-t border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-6 lg:px-8", children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-12 lg:grid-cols-4", children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "lg:col-span-2 space-y-6", children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-primary/20 flex items-center justify-center border border-primary/50 text-primary font-bold", children: "S" }),
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "text-xl font-bold text-text-primary", children: siteConfig.name })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-xs text-text-secondary", children: brandDescription }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "flex max-w-sm flex-col gap-2 sm:flex-row", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Input, { placeholder: newsletterPlaceholder, type: "email", className: "bg-surface/50 border-border/50" }),
|
|
41
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", children: t("subscribe") })
|
|
42
|
+
] })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsxs(StaggerChildren, { staggerMs: 60, className: "grid grid-cols-2 gap-8 lg:col-span-2 sm:grid-cols-3", children: [
|
|
45
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "text-sm text-text-primary uppercase tracking-wider", children: t("product") }),
|
|
47
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-2 text-sm text-text-secondary", children: productLinks.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: item.href, className: "hover:text-primary transition-colors", children: item.name }) }, item.name)) })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "text-sm text-text-primary uppercase tracking-wider", children: t("company") }),
|
|
51
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-2 text-sm text-text-secondary", children: companyLinks.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: item.href, className: "hover:text-primary transition-colors", children: item.name }) }, item.name)) })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "text-sm text-text-primary uppercase tracking-wider", children: t("legal") }),
|
|
55
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-2 text-sm text-text-secondary", children: legalLinks.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: item.href, className: "hover:text-primary transition-colors", children: item.name }) }, item.name)) })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ jsx(Separator, { className: "my-12 bg-border/50" }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-between gap-6 sm:flex-row", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: t("allRightsReserved", { year: CURRENT_YEAR, name: siteConfig.name }) }),
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-4", children: socialIcons.map((social, index) => /* @__PURE__ */ jsx(Button, { size: "icon", variant: "ghost", "aria-label": social.label, className: "rounded-full text-text-secondary hover:text-primary hover:bg-surface-hover hover:scale-110 transition-transform duration-fast", children: social.icon }, index)) })
|
|
63
|
+
] })
|
|
64
|
+
] }) }) });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { FooterBlock };
|
|
@@ -5,10 +5,14 @@ import { createPortal } from 'react-dom';
|
|
|
5
5
|
import { useReducedMotion, useMotionValue, useMotionTemplate } from 'motion/react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
function getAccentColor() {
|
|
9
|
+
if (typeof window === "undefined") return "10 158 111";
|
|
10
|
+
return getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim() || "10 158 111";
|
|
11
|
+
}
|
|
8
12
|
function MouseGlow({
|
|
9
13
|
className,
|
|
10
14
|
dotColor = "rgba(255, 255, 255, 0.5)",
|
|
11
|
-
overlayColor
|
|
15
|
+
overlayColor,
|
|
12
16
|
gap = 24,
|
|
13
17
|
maskRadius = 300,
|
|
14
18
|
overlayRadius = 260
|
|
@@ -16,6 +20,7 @@ function MouseGlow({
|
|
|
16
20
|
const containerRef = React.useRef(null);
|
|
17
21
|
const overlayRef = React.useRef(null);
|
|
18
22
|
const [mounted, setMounted] = React.useState(false);
|
|
23
|
+
const resolvedOverlayColor = overlayColor ?? `rgba(${getAccentColor().replace(/ /g, ", ")}, 0.95)`;
|
|
19
24
|
React.useEffect(() => {
|
|
20
25
|
setMounted(true);
|
|
21
26
|
const handleMouseMove = (e) => {
|
|
@@ -79,7 +84,7 @@ function MouseGlow({
|
|
|
79
84
|
style: {
|
|
80
85
|
position: "absolute",
|
|
81
86
|
inset: 0,
|
|
82
|
-
backgroundImage: `radial-gradient(${
|
|
87
|
+
backgroundImage: `radial-gradient(${resolvedOverlayColor} 1px, transparent 0)`,
|
|
83
88
|
backgroundSize: `${gapPx} ${gapPx}`,
|
|
84
89
|
backgroundRepeat: "repeat",
|
|
85
90
|
maskImage: `radial-gradient(circle ${overlayRadius}px at var(--mx, -9999px) var(--my, -9999px), black 0%, transparent 100%)`,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FooterBlock } from './chunk-AYWL4IYM.js';
|
|
2
|
+
import { HeaderBlock } from './chunk-WOYBVPXK.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,105 @@
|
|
|
1
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
2
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
3
|
+
import { PlusIcon } from './chunk-E7RBK6ML.js';
|
|
4
|
+
import { RefreshCWIcon } from './chunk-Q7LVUGFL.js';
|
|
5
|
+
import { WrenchIcon } from './chunk-AWIJHDNK.js';
|
|
6
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
7
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var typeConfig = {
|
|
11
|
+
added: {
|
|
12
|
+
icon: /* @__PURE__ */ jsx(PlusIcon, { size: 12 }),
|
|
13
|
+
label: "Added",
|
|
14
|
+
color: "text-success bg-success/10"
|
|
15
|
+
},
|
|
16
|
+
fixed: {
|
|
17
|
+
icon: /* @__PURE__ */ jsx(WrenchIcon, { size: 12 }),
|
|
18
|
+
label: "Fixed",
|
|
19
|
+
color: "text-info bg-info/10"
|
|
20
|
+
},
|
|
21
|
+
changed: {
|
|
22
|
+
icon: /* @__PURE__ */ jsx(RefreshCWIcon, { size: 12 }),
|
|
23
|
+
label: "Changed",
|
|
24
|
+
color: "text-warning bg-warning/10"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var defaultEntries = [
|
|
28
|
+
{
|
|
29
|
+
version: "2.1.0",
|
|
30
|
+
date: "Feb 9, 2026",
|
|
31
|
+
changes: [
|
|
32
|
+
{ type: "added", text: "ScrollFadeIn, MeteorShower, and AuroraEffect animation components" },
|
|
33
|
+
{ type: "added", text: "FAQ, Comparison, Contact, and Newsletter blocks" },
|
|
34
|
+
{ type: "changed", text: "Upgraded motion library to v12 with new easing tokens" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
version: "2.0.0",
|
|
39
|
+
date: "Feb 1, 2026",
|
|
40
|
+
changes: [
|
|
41
|
+
{ type: "added", text: "Arctic Glow palette replacing Synthetic Coral" },
|
|
42
|
+
{ type: "added", text: "Light and dark theme support via CSS custom properties" },
|
|
43
|
+
{ type: "fixed", text: "WCAG contrast ratios for all semantic colors" },
|
|
44
|
+
{ type: "changed", text: "Migrated from Tailwind CSS 3 to 4" }
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
version: "1.5.0",
|
|
49
|
+
date: "Jan 15, 2026",
|
|
50
|
+
changes: [
|
|
51
|
+
{ type: "added", text: "Dashboard page with chart collection" },
|
|
52
|
+
{ type: "fixed", text: "Dialog focus trap on mobile Safari" }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
function ChangelogBlock({
|
|
57
|
+
entries = defaultEntries,
|
|
58
|
+
title = "Changelog",
|
|
59
|
+
className
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl px-6", children: [
|
|
62
|
+
!!title && /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "mb-12 text-text-primary", children: title }) }),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
64
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-4 top-2 bottom-0 w-px bg-border" }),
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-12", children: entries.map((entry, entryIndex) => /* @__PURE__ */ jsx(ScrollFadeIn, { delay: entryIndex * 0.08, children: /* @__PURE__ */ jsxs("div", { className: "relative flex gap-6", children: [
|
|
66
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full glass-panel", children: /* @__PURE__ */ jsx("div", { className: "h-2.5 w-2.5 rounded-full bg-primary" }) }),
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 pt-0.5", children: [
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4 mb-4", children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(Badge, { variant: "primary", className: "font-mono text-xs", children: [
|
|
70
|
+
"v",
|
|
71
|
+
entry.version
|
|
72
|
+
] }),
|
|
73
|
+
entryIndex === 0 && /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "text-[10px]", children: "Latest" }),
|
|
74
|
+
/* @__PURE__ */ jsx("time", { className: "text-xs text-text-tertiary", children: entry.date })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-2", children: entry.changes.map((change, changeIndex) => {
|
|
77
|
+
const config = typeConfig[change.type];
|
|
78
|
+
return /* @__PURE__ */ jsxs(
|
|
79
|
+
"li",
|
|
80
|
+
{
|
|
81
|
+
className: "flex items-start gap-2 text-sm text-text-secondary",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"span",
|
|
85
|
+
{
|
|
86
|
+
className: cn(
|
|
87
|
+
"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded",
|
|
88
|
+
config.color
|
|
89
|
+
),
|
|
90
|
+
children: config.icon
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx("span", { children: change.text })
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
changeIndex
|
|
97
|
+
);
|
|
98
|
+
}) })
|
|
99
|
+
] })
|
|
100
|
+
] }) }, entry.version)) })
|
|
101
|
+
] })
|
|
102
|
+
] }) });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { ChangelogBlock };
|