@vadimcomanescu/nadicode-design-system 2.0.9 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/seed/SKILL.md +24 -14
- package/.agents/skills/seed/contract.md +19 -6
- package/.agents/skills/seed/recipes/agency-home.md +5 -5
- package/.agents/skills/seed/recipes/auth.md +3 -3
- package/.agents/skills/seed/recipes/blog-content.md +2 -2
- package/.agents/skills/seed/recipes/company-about.md +3 -3
- package/.agents/skills/seed/recipes/company-contact.md +3 -3
- package/.agents/skills/seed/recipes/digital-workers.md +3 -3
- package/.agents/skills/seed/recipes/marketing-landing.md +8 -8
- package/.agents/skills/seed/recipes/marketing-shell.md +4 -4
- package/.agents/skills/seed/recipes/navigation-shell.md +3 -2
- package/.agents/skills/seed/recipes/pricing.md +4 -4
- package/.agents/skills/seed/recipes/service-detail.md +3 -3
- package/.agents/skills/seed/references/blocks.md +5 -5
- package/.agents/skills/seed/references/components.md +2 -2
- package/.agents/skills/seed/references/nextjs.md +2 -2
- package/README.md +3 -3
- package/contracts/consumer-intent-map.json +1 -2
- package/contracts/release-governance-baseline.json +3 -37
- package/dist/catalog/catalog.d.ts +2220 -0
- package/dist/catalog/catalog.js +1913 -0
- package/dist/catalog/components.d.ts +201 -0
- package/dist/catalog/components.js +407 -0
- package/dist/catalog/types.d.ts +4 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chunk-224KPIOG.js +60 -0
- package/dist/chunk-25BOZMXA.js +169 -0
- package/dist/chunk-32OLQ7FC.js +130 -0
- package/dist/chunk-3JJBJ4VR.js +47 -0
- package/dist/chunk-3U56FXYC.js +30 -0
- package/dist/chunk-4MWKE6F5.js +86 -0
- package/dist/chunk-6HGSU24S.js +94 -0
- package/dist/chunk-7IADIXDV.js +168 -0
- package/dist/chunk-7NS3VFD7.js +86 -0
- package/dist/chunk-ALA6OM7K.js +134 -0
- package/dist/chunk-AN5TW4AL.js +50 -0
- package/dist/chunk-AWZFQQGN.js +167 -0
- package/dist/chunk-BRCBJ3S4.js +42 -0
- package/dist/chunk-BRICSLHJ.js +30 -0
- package/dist/chunk-BYEHHZZN.js +115 -0
- package/dist/chunk-C33GUEDY.js +149 -0
- package/dist/chunk-CUDMDYKE.js +150 -0
- package/dist/chunk-CVTMWSNS.js +145 -0
- package/dist/chunk-DEZXWNYF.js +165 -0
- package/dist/chunk-DNJEVMDY.js +40 -0
- package/dist/chunk-DNJOBML6.js +66 -0
- package/dist/chunk-FTGFOK6T.js +69 -0
- package/dist/{chunk-7A2RXKGH.js → chunk-GJ557DGH.js} +1 -1
- package/dist/chunk-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -0
- package/dist/chunk-K4U67BVG.js +175 -0
- package/dist/chunk-KNR3WB5C.js +147 -0
- package/dist/chunk-KQ7ZC6EM.js +66 -0
- package/dist/chunk-LGW7FVG5.js +83 -0
- package/dist/chunk-LK2L3C7D.js +72 -0
- package/dist/chunk-LP6ZZYOQ.js +36 -0
- package/dist/chunk-LV4P7WVM.js +54 -0
- package/dist/chunk-MGSGCARB.js +164 -0
- package/dist/chunk-N3YFYMNZ.js +73 -0
- package/dist/{chunk-DSMGCFMJ.js → chunk-POFFOUQW.js} +2 -5
- package/dist/chunk-Q5IYBNA7.js +56 -0
- package/dist/chunk-QJCE7NZF.js +85 -0
- package/dist/chunk-QW5II6YK.js +96 -0
- package/dist/chunk-RMGDDOCD.js +138 -0
- package/dist/chunk-RNCX4JIE.js +70 -0
- package/dist/chunk-RWCL5OPX.js +112 -0
- package/dist/chunk-S5OY2B63.js +28 -0
- package/dist/chunk-SIQNG72C.js +257 -0
- package/dist/chunk-SP7NIZFP.js +117 -0
- package/dist/chunk-SWRJWMGG.js +30 -0
- package/dist/chunk-TCQIJ3DO.js +85 -0
- package/dist/chunk-TPJ6JJ2F.js +290 -0
- package/dist/chunk-UR43ANYS.js +159 -0
- package/dist/chunk-VRGPG2YN.js +79 -0
- package/dist/chunk-WSBLCWY7.js +126 -0
- package/dist/chunk-XKKFSFYO.js +93 -0
- package/dist/chunk-XO7TBM47.js +32 -0
- package/dist/chunk-YDYDGG5K.js +132 -0
- package/dist/chunk-YMJOUYMT.js +171 -0
- package/dist/chunk-Z2WION42.js +32 -0
- package/dist/chunk-ZFKSVEYW.js +35 -0
- package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
- package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
- package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
- package/dist/components/blocks/AuthLayout.js +9 -73
- package/dist/components/blocks/BannerBlock.js +8 -66
- package/dist/components/blocks/BarChartBlock.js +5 -47
- package/dist/components/blocks/ChartBlock.js +7 -54
- package/dist/components/blocks/ChartCollectionBlock.js +11 -171
- package/dist/components/blocks/ChatLayout.js +12 -126
- package/dist/components/blocks/CreateBlock.js +9 -104
- package/dist/components/blocks/DataGridBlock.js +9 -117
- package/dist/components/blocks/DirectoryBlock.js +12 -85
- package/dist/components/blocks/FeatureGridBlock.js +6 -56
- package/dist/components/blocks/GalleryBlock.js +6 -69
- package/dist/components/blocks/HeroBlock.js +2 -2
- package/dist/components/blocks/HeroSectionBlock.js +10 -134
- package/dist/components/blocks/IntegrationsBlock.js +13 -94
- package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
- package/dist/components/blocks/KanbanDemoBlock.js +8 -145
- package/dist/components/blocks/LogoCloud.js +4 -35
- package/dist/components/blocks/NavUser.js +5 -85
- package/dist/components/blocks/NotFoundBlock.js +8 -32
- package/dist/components/blocks/OnboardingBlock.js +7 -66
- package/dist/components/blocks/SettingsLayout.js +13 -86
- package/dist/components/blocks/SignUpBlock.js +8 -168
- package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
- package/dist/components/blocks/StatsBlock.js +6 -60
- package/dist/components/blocks/UsageDonutBlock.js +5 -79
- package/dist/components/blocks/WizardBlock.js +12 -93
- package/dist/components/blocks/user/InviteUserModal.js +10 -132
- package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
- package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
- package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
- package/dist/components/page-kits/BlogContentPageKit.js +12 -167
- package/dist/components/page-kits/CheckoutPageKit.js +9 -83
- package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
- package/dist/components/page-kits/DashboardPageKit.js +11 -149
- package/dist/components/page-kits/ErrorPageKit.js +5 -52
- package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
- package/dist/components/page-kits/LandingPageKit.js +12 -73
- package/dist/components/page-kits/LoginPageKit.js +3 -32
- package/dist/components/page-kits/OnboardingPageKit.js +6 -115
- package/dist/components/page-kits/PricingPageKit.js +12 -138
- package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
- package/dist/components/page-kits/RecoveryPageKit.js +3 -42
- package/dist/components/page-kits/ResetPageKit.js +3 -36
- package/dist/components/page-kits/ServiceSuitePageKit.js +11 -176
- package/dist/components/page-kits/SignupPageKit.js +3 -30
- package/dist/components/page-kits/SuccessPageKit.js +4 -30
- package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
- package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
- package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
- package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
- package/dist/components/ui/AvatarUpload.js +1 -1
- package/dist/components/ui/CheckoutForm.js +5 -70
- package/dist/components/ui/MouseEffect.js +1 -1
- package/eslint-rules/nadicode/config.js +2 -0
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +4 -0
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-import.test.js +111 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/eslint-rules/nadicode/rules/require-catalog-import.js +59 -0
- package/package.json +15 -358
- package/contracts/block-props-schemas.json +0 -2186
- package/contracts/component-props-schemas.json +0 -8322
- package/contracts/consumer-contract.json +0 -178
- package/contracts/page-kit-props-schemas.json +0 -1894
- package/contracts/public-surface-registry.json +0 -5822
- package/contracts/public-surface-registry.schema.json +0 -219
- package/contracts/spec-manifest.json +0 -46
- package/dist/catalog.json +0 -5221
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { CrudListDetailPageKit } from './chunk-OJ7OO3QB.js';
|
|
2
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
3
|
+
import { RoleBadge } from './chunk-OHCQPI3W.js';
|
|
4
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from './chunk-CQEUNASC.js';
|
|
5
|
+
import { Avatar, AvatarImage, AvatarFallback } from './chunk-NAAU5IWU.js';
|
|
6
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
7
|
+
import { EllipsisIcon } from './chunk-5ESF6N36.js';
|
|
8
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var EMPTY_MEMBER_ACTIONS = [];
|
|
13
|
+
function statusBadge(status) {
|
|
14
|
+
switch (status) {
|
|
15
|
+
case "active":
|
|
16
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "border-success/20 bg-success/10 text-success", children: "Active" });
|
|
17
|
+
case "invited":
|
|
18
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "border-warning/20 bg-warning/10 text-warning", children: "Invited" });
|
|
19
|
+
case "suspended":
|
|
20
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "border-destructive/20 bg-destructive/10 text-destructive", children: "Suspended" });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function mapState(state) {
|
|
24
|
+
switch (state) {
|
|
25
|
+
case void 0:
|
|
26
|
+
return void 0;
|
|
27
|
+
case "invited-member":
|
|
28
|
+
case "active-member":
|
|
29
|
+
return "selected-row";
|
|
30
|
+
case "saving":
|
|
31
|
+
return "loading";
|
|
32
|
+
case "fatal-error":
|
|
33
|
+
return "error";
|
|
34
|
+
default:
|
|
35
|
+
return state;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function TeamSettingsPageKit({
|
|
39
|
+
shell,
|
|
40
|
+
state,
|
|
41
|
+
members,
|
|
42
|
+
seatSummary,
|
|
43
|
+
search,
|
|
44
|
+
inviteAction,
|
|
45
|
+
memberActions = EMPTY_MEMBER_ACTIONS,
|
|
46
|
+
onMemberAction,
|
|
47
|
+
selectedMemberId = null,
|
|
48
|
+
onSelectedMemberChange,
|
|
49
|
+
errorMessage,
|
|
50
|
+
className
|
|
51
|
+
}) {
|
|
52
|
+
const membersById = useMemo(
|
|
53
|
+
() => new Map(members.map((member) => [member.id, member])),
|
|
54
|
+
[members]
|
|
55
|
+
);
|
|
56
|
+
const mappedRows = useMemo(
|
|
57
|
+
() => members.map((member) => ({
|
|
58
|
+
id: member.id,
|
|
59
|
+
summaryLabel: member.name,
|
|
60
|
+
cells: {
|
|
61
|
+
member: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
62
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "h-9 w-9 border border-border-subtle", children: [
|
|
63
|
+
member.avatarUrl ? /* @__PURE__ */ jsx(AvatarImage, { src: member.avatarUrl, alt: member.name }) : null,
|
|
64
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: member.avatarFallback ?? member.name.slice(0, 1).toUpperCase() })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
67
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium text-text-primary", children: member.name }),
|
|
68
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs text-text-secondary", children: member.email })
|
|
69
|
+
] })
|
|
70
|
+
] }),
|
|
71
|
+
role: /* @__PURE__ */ jsx(RoleBadge, { role: member.role }),
|
|
72
|
+
status: statusBadge(member.status),
|
|
73
|
+
joined: member.joinedLabel ?? "-",
|
|
74
|
+
actions: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", "aria-label": `Actions for ${member.name}`, children: /* @__PURE__ */ jsx(EllipsisIcon, { size: 16 }) }) }),
|
|
76
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: memberActions.map((action) => /* @__PURE__ */ jsx(
|
|
77
|
+
DropdownMenuItem,
|
|
78
|
+
{
|
|
79
|
+
className: action.tone === "destructive" ? "text-destructive focus:text-destructive" : void 0,
|
|
80
|
+
onClick: () => onMemberAction?.(member.id, action.id),
|
|
81
|
+
children: action.label
|
|
82
|
+
},
|
|
83
|
+
action.id
|
|
84
|
+
)) })
|
|
85
|
+
] })
|
|
86
|
+
}
|
|
87
|
+
})),
|
|
88
|
+
[memberActions, members, onMemberAction]
|
|
89
|
+
);
|
|
90
|
+
const inviteDisabled = inviteAction.canInvite === false;
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
CrudListDetailPageKit,
|
|
93
|
+
{
|
|
94
|
+
shell,
|
|
95
|
+
title: "Team settings",
|
|
96
|
+
description: "Manage members, roles, and seat usage through a consistent workspace roster contract.",
|
|
97
|
+
state: mapState(state),
|
|
98
|
+
columns: [
|
|
99
|
+
{ id: "member", header: "Member" },
|
|
100
|
+
{ id: "role", header: "Role" },
|
|
101
|
+
{ id: "status", header: "Status" },
|
|
102
|
+
{ id: "joined", header: "Joined" },
|
|
103
|
+
{ id: "actions", header: "Actions", headerClassName: "w-[80px]" }
|
|
104
|
+
],
|
|
105
|
+
rows: mappedRows,
|
|
106
|
+
filterControls: [
|
|
107
|
+
{
|
|
108
|
+
id: "team-search",
|
|
109
|
+
label: search.label ?? "Search members",
|
|
110
|
+
value: search.value,
|
|
111
|
+
onChange: search.onChange,
|
|
112
|
+
placeholder: search.placeholder
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
selectedRowId: selectedMemberId,
|
|
116
|
+
onRowSelect: onSelectedMemberChange,
|
|
117
|
+
detailPanel: {
|
|
118
|
+
title: "Member detail",
|
|
119
|
+
description: "Inspect role, status, and contact details for the selected member.",
|
|
120
|
+
mode: "inline",
|
|
121
|
+
renderDetail: (row) => {
|
|
122
|
+
const member = membersById.get(row.id);
|
|
123
|
+
if (!member) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2 text-sm", children: [
|
|
127
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: member.email }),
|
|
128
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(RoleBadge, { role: member.role }),
|
|
130
|
+
statusBadge(member.status)
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-secondary", children: [
|
|
133
|
+
"Joined ",
|
|
134
|
+
member.joinedLabel ?? "-"
|
|
135
|
+
] })
|
|
136
|
+
] });
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
emptyState: {
|
|
140
|
+
title: "No team members",
|
|
141
|
+
description: "Invite your first member to start collaborating."
|
|
142
|
+
},
|
|
143
|
+
pagination: {
|
|
144
|
+
page: 1,
|
|
145
|
+
totalPages: 1,
|
|
146
|
+
onPageChange: () => {
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
errorMessage: errorMessage ?? "Team settings are unavailable. Retry shortly.",
|
|
150
|
+
headerActions: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end gap-1", children: [
|
|
151
|
+
/* @__PURE__ */ jsx(Button, { onClick: inviteAction.onInvite, disabled: inviteDisabled, children: inviteAction.label }),
|
|
152
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-text-secondary", children: [
|
|
153
|
+
seatSummary.usedSeats,
|
|
154
|
+
" of ",
|
|
155
|
+
seatSummary.totalSeats,
|
|
156
|
+
" seats used"
|
|
157
|
+
] }),
|
|
158
|
+
inviteDisabled && inviteAction.disabledReason ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-warning", children: inviteAction.disabledReason }) : null
|
|
159
|
+
] }),
|
|
160
|
+
className
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export { TeamSettingsPageKit };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AccountLockedBlock } from './chunk-FX23F33E.js';
|
|
2
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function AccountLockedPageKit({
|
|
6
|
+
reason = "too_many_attempts",
|
|
7
|
+
unlockMinutes,
|
|
8
|
+
onContactSupport,
|
|
9
|
+
onBackToLogin,
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
errorMessage,
|
|
13
|
+
className,
|
|
14
|
+
cardClassName
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsx("section", { className: cn("min-h-dvh w-full bg-background px-4 py-12 md:px-8 md:py-20", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-5xl flex-col items-center justify-center gap-4", children: [
|
|
17
|
+
errorMessage ? /* @__PURE__ */ jsx(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
role: "alert",
|
|
21
|
+
className: "w-full max-w-sm rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
22
|
+
children: errorMessage
|
|
23
|
+
}
|
|
24
|
+
) : null,
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
AccountLockedBlock,
|
|
27
|
+
{
|
|
28
|
+
className: cn("w-full", cardClassName),
|
|
29
|
+
reason,
|
|
30
|
+
unlockMinutes,
|
|
31
|
+
onContactSupport,
|
|
32
|
+
onBackToLogin,
|
|
33
|
+
title,
|
|
34
|
+
description
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }) });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { AccountLockedPageKit };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
2
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
3
|
+
import { useMotionConfig, m, motionSpring } from './chunk-PD2YEH3H.js';
|
|
4
|
+
import { InfoIcon } from './chunk-W3B3UOEG.js';
|
|
5
|
+
import { AlertTriangleIcon } from './chunk-SXHYB7JB.js';
|
|
6
|
+
import { XIcon } from './chunk-UIUMTURU.js';
|
|
7
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
8
|
+
import { useState } from 'react';
|
|
9
|
+
import { AnimatePresence } from 'motion/react';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var variantStyles = {
|
|
13
|
+
info: "border-info/30 bg-info/5 text-info",
|
|
14
|
+
warning: "border-warning/30 bg-warning/5 text-warning",
|
|
15
|
+
accent: "border-accent/30 bg-accent/5 text-accent"
|
|
16
|
+
};
|
|
17
|
+
var variantIcons = {
|
|
18
|
+
info: /* @__PURE__ */ jsx(InfoIcon, { size: 16, className: "shrink-0" }),
|
|
19
|
+
warning: /* @__PURE__ */ jsx(AlertTriangleIcon, { size: 16, className: "shrink-0" }),
|
|
20
|
+
accent: /* @__PURE__ */ jsx(InfoIcon, { size: 16, className: "shrink-0" })
|
|
21
|
+
};
|
|
22
|
+
function BannerBlock({
|
|
23
|
+
children,
|
|
24
|
+
variant = "info",
|
|
25
|
+
dismissible = true,
|
|
26
|
+
onDismiss,
|
|
27
|
+
className
|
|
28
|
+
}) {
|
|
29
|
+
const motionConfig = useMotionConfig();
|
|
30
|
+
const [visible, setVisible] = useState(true);
|
|
31
|
+
const handleDismiss = () => {
|
|
32
|
+
setVisible(false);
|
|
33
|
+
onDismiss?.();
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: !!visible && /* @__PURE__ */ jsxs(
|
|
36
|
+
m.div,
|
|
37
|
+
{
|
|
38
|
+
initial: { opacity: 0, y: -12 },
|
|
39
|
+
animate: { opacity: 1, y: 0 },
|
|
40
|
+
exit: { opacity: 0, y: -12 },
|
|
41
|
+
transition: { ...motionSpring.snappy, ...motionConfig },
|
|
42
|
+
className: cn(
|
|
43
|
+
"flex items-center gap-4 rounded-lg border px-4 py-4",
|
|
44
|
+
variantStyles[variant],
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
children: [
|
|
48
|
+
variantIcons[variant],
|
|
49
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 font-medium", children }),
|
|
50
|
+
!!dismissible && /* @__PURE__ */ jsx(
|
|
51
|
+
Button,
|
|
52
|
+
{
|
|
53
|
+
variant: "ghost",
|
|
54
|
+
size: "icon",
|
|
55
|
+
className: "shrink-0 hover:bg-transparent",
|
|
56
|
+
onClick: handleDismiss,
|
|
57
|
+
"aria-label": "Dismiss",
|
|
58
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: 14 })
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { BannerBlock };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
2
|
+
import { Heading } from './chunk-WI547C47.js';
|
|
3
|
+
import { Dialog, DialogTrigger, DialogContent } from './chunk-W73JAOHW.js';
|
|
4
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
5
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var defaultImages = [
|
|
10
|
+
{ src: "https://picsum.photos/seed/a/600/400", alt: "Abstract gradient", caption: "Design exploration #1" },
|
|
11
|
+
{ src: "https://picsum.photos/seed/b/600/600", alt: "Dark interface", caption: "Dashboard concept" },
|
|
12
|
+
{ src: "https://picsum.photos/seed/c/600/400", alt: "Color study", caption: "Arctic Glow palette study" },
|
|
13
|
+
{ src: "https://picsum.photos/seed/d/600/500", alt: "Typography layout", caption: "Type specimen" },
|
|
14
|
+
{ src: "https://picsum.photos/seed/e/600/400", alt: "Component grid", caption: "Component inventory" },
|
|
15
|
+
{ src: "https://picsum.photos/seed/f/600/600", alt: "Icon set", caption: "Animated icons showcase" }
|
|
16
|
+
];
|
|
17
|
+
function GalleryBlock({
|
|
18
|
+
images = defaultImages,
|
|
19
|
+
columns = 3,
|
|
20
|
+
title = "Gallery",
|
|
21
|
+
className
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-6xl px-6", children: [
|
|
24
|
+
!!title && /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "mb-8 text-text-primary", children: title }) }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: "grid gap-4",
|
|
29
|
+
style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` },
|
|
30
|
+
children: images.map((image, index) => /* @__PURE__ */ jsx(ScrollFadeIn, { delay: index * 0.05, children: /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
31
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
className: "group relative w-full overflow-hidden rounded-lg border border-border bg-surface focus-visible:ring-1 focus-visible:ring-accent focus-visible:outline-none",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
37
|
+
Image,
|
|
38
|
+
{
|
|
39
|
+
src: image.src,
|
|
40
|
+
alt: image.alt,
|
|
41
|
+
className: "h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",
|
|
42
|
+
fill: true,
|
|
43
|
+
sizes: "(max-width: 768px) 100vw, 33vw"
|
|
44
|
+
}
|
|
45
|
+
) }),
|
|
46
|
+
image.caption && /* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-overlay/80 to-transparent px-4 py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-overlay-foreground", children: image.caption }) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ jsxs(DialogContent, { className: "max-w-3xl p-0 overflow-hidden", children: [
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
Image,
|
|
53
|
+
{
|
|
54
|
+
src: image.src,
|
|
55
|
+
alt: image.alt,
|
|
56
|
+
className: "w-full",
|
|
57
|
+
width: 600,
|
|
58
|
+
height: 400
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
image.caption && /* @__PURE__ */ jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-text-primary", children: image.caption }) })
|
|
62
|
+
] })
|
|
63
|
+
] }) }, index))
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }) });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { GalleryBlock };
|
|
@@ -3,7 +3,7 @@ import { AnimatedGradientText } from './chunk-XZ3A33GP.js';
|
|
|
3
3
|
import { Heading } from './chunk-WI547C47.js';
|
|
4
4
|
import { siteConfig } from './chunk-A7NUWD76.js';
|
|
5
5
|
import { Card, CardHeader, CardContent } from './chunk-AH6YSYYT.js';
|
|
6
|
-
import { MouseGlow } from './chunk-
|
|
6
|
+
import { MouseGlow } from './chunk-POFFOUQW.js';
|
|
7
7
|
import { Button } from './chunk-7KIDDF3I.js';
|
|
8
8
|
import { m, heroStagger } from './chunk-PD2YEH3H.js';
|
|
9
9
|
import { ZapIcon } from './chunk-FLF5AMNO.js';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { toast } from './chunk-5Y4BOIYO.js';
|
|
2
|
+
import { Textarea } from './chunk-4OBE2FS2.js';
|
|
3
|
+
import { StaggerChildren } from './chunk-DQPK2XRL.js';
|
|
4
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-WH62BE24.js';
|
|
5
|
+
import { Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage } from './chunk-UN2SJ42K.js';
|
|
6
|
+
import { Input } from './chunk-AP3XXYAY.js';
|
|
7
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-AH6YSYYT.js';
|
|
8
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
9
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
10
|
+
import { useForm } from 'react-hook-form';
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var profileFormSchema = z.object({
|
|
15
|
+
username: z.string().min(2, {
|
|
16
|
+
message: "Username must be at least 2 characters."
|
|
17
|
+
}).max(30, {
|
|
18
|
+
message: "Username must not be longer than 30 characters."
|
|
19
|
+
}),
|
|
20
|
+
email: z.string({
|
|
21
|
+
error: "Please select an email to display."
|
|
22
|
+
}).email(),
|
|
23
|
+
bio: z.string().max(160).min(4)
|
|
24
|
+
});
|
|
25
|
+
var defaultFormValues = {
|
|
26
|
+
bio: "I own a computer."
|
|
27
|
+
};
|
|
28
|
+
function CreateBlock({
|
|
29
|
+
title = "Create Profile",
|
|
30
|
+
description = "Example of a complex form with Zod validation.",
|
|
31
|
+
submitLabel = "Update profile",
|
|
32
|
+
onSubmit: onSubmitProp,
|
|
33
|
+
className
|
|
34
|
+
}) {
|
|
35
|
+
const form = useForm({
|
|
36
|
+
resolver: zodResolver(profileFormSchema),
|
|
37
|
+
defaultValues: defaultFormValues,
|
|
38
|
+
mode: "onChange"
|
|
39
|
+
});
|
|
40
|
+
function handleSubmit(data) {
|
|
41
|
+
if (onSubmitProp) {
|
|
42
|
+
onSubmitProp(data);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
toast({
|
|
46
|
+
title: "You submitted the following values:",
|
|
47
|
+
description: /* @__PURE__ */ jsx("pre", { className: "mt-2 w-full max-w-[340px] overflow-x-auto rounded-md bg-surface-active p-4", children: /* @__PURE__ */ jsx("code", { className: "text-text-primary", children: JSON.stringify(data, null, 2) }) })
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ jsxs(Card, { className: className ?? "w-full max-w-2xl mx-auto", children: [
|
|
51
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
53
|
+
/* @__PURE__ */ jsx(CardDescription, { children: description })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 60, className: "space-y-8 text-text-primary", children: /* @__PURE__ */ jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "contents", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
FormField,
|
|
58
|
+
{
|
|
59
|
+
control: form.control,
|
|
60
|
+
name: "username",
|
|
61
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Username" }),
|
|
63
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { placeholder: "shadcn", ...field }) }),
|
|
64
|
+
/* @__PURE__ */ jsx(FormDescription, { children: "Public display name." }),
|
|
65
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
66
|
+
] })
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
FormField,
|
|
71
|
+
{
|
|
72
|
+
control: form.control,
|
|
73
|
+
name: "email",
|
|
74
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Email" }),
|
|
76
|
+
/* @__PURE__ */ jsxs(Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
|
|
77
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select email" }) }) }),
|
|
78
|
+
/* @__PURE__ */ jsxs(SelectContent, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "m@example.com", children: "m@example.com" }),
|
|
80
|
+
/* @__PURE__ */ jsx(SelectItem, { value: "m@google.com", children: "m@google.com" })
|
|
81
|
+
] })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
84
|
+
] })
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ jsx(
|
|
88
|
+
FormField,
|
|
89
|
+
{
|
|
90
|
+
control: form.control,
|
|
91
|
+
name: "bio",
|
|
92
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Bio" }),
|
|
94
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Textarea, { placeholder: "Bio...", ...field }) }),
|
|
95
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
96
|
+
] })
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", children: submitLabel })
|
|
100
|
+
] }) }) }) })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { CreateBlock };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Typography } from './chunk-N53OMWW2.js';
|
|
2
|
+
import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
|
|
3
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
4
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function variantLabel(variant) {
|
|
8
|
+
switch (variant) {
|
|
9
|
+
case "not-found":
|
|
10
|
+
return "Not found";
|
|
11
|
+
case "server-error":
|
|
12
|
+
return "Server error";
|
|
13
|
+
case "generic-fallback":
|
|
14
|
+
return "Fallback";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function ErrorPageKit({
|
|
18
|
+
variant,
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
metadata,
|
|
22
|
+
primaryAction,
|
|
23
|
+
secondaryAction,
|
|
24
|
+
supportContent,
|
|
25
|
+
className
|
|
26
|
+
}) {
|
|
27
|
+
const metadataEntries = [
|
|
28
|
+
...metadata?.statusCode ? [["Status", metadata.statusCode]] : [],
|
|
29
|
+
...metadata?.errorCode ? [["Error code", metadata.errorCode]] : [],
|
|
30
|
+
...metadata?.incidentId ? [["Incident", metadata.incidentId]] : []
|
|
31
|
+
];
|
|
32
|
+
return /* @__PURE__ */ jsx("section", { className: cn("min-h-[70dvh] bg-background px-6 py-12 text-text-primary", className), children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-2xl flex-col items-center justify-center", children: /* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
|
|
33
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "space-y-3", children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "uppercase tracking-[0.18em] text-text-tertiary", children: variantLabel(variant) }),
|
|
35
|
+
/* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
36
|
+
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-5", children: [
|
|
39
|
+
metadataEntries.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid gap-2 rounded-md border border-border/70 bg-surface/40 p-3 text-sm", children: metadataEntries.map(([label, value]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: label }),
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-text-primary", children: value })
|
|
42
|
+
] }, label)) }) : null,
|
|
43
|
+
supportContent ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border/60 bg-surface/30 px-3 py-2 text-sm text-text-secondary", children: supportContent }) : null,
|
|
44
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
45
|
+
primaryAction ? /* @__PURE__ */ jsx(Button, { type: "button", onClick: primaryAction.onAction, children: primaryAction.label }) : null,
|
|
46
|
+
secondaryAction ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: secondaryAction.onAction, children: secondaryAction.label }) : null
|
|
47
|
+
] }) : null
|
|
48
|
+
] })
|
|
49
|
+
] }) }) });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { ErrorPageKit };
|