@vadimcomanescu/nadicode-design-system 2.0.8 → 4.0.0

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.
Files changed (137) hide show
  1. package/.agents/skills/seed/SKILL.md +19 -10
  2. package/.agents/skills/seed/contract.md +9 -2
  3. package/.agents/skills/seed/references/blocks.md +5 -5
  4. package/.agents/skills/seed/references/components.md +2 -2
  5. package/.agents/skills/seed/references/nextjs.md +2 -2
  6. package/README.md +3 -3
  7. package/contracts/consumer-intent-map.json +1 -2
  8. package/contracts/release-governance-baseline.json +3 -37
  9. package/dist/catalog/catalog.d.ts +2220 -0
  10. package/dist/catalog/catalog.js +1913 -0
  11. package/dist/catalog/components.d.ts +201 -0
  12. package/dist/catalog/components.js +407 -0
  13. package/dist/catalog/types.d.ts +4 -0
  14. package/dist/catalog/types.js +1 -0
  15. package/dist/chunk-224KPIOG.js +60 -0
  16. package/dist/chunk-25BOZMXA.js +169 -0
  17. package/dist/chunk-32OLQ7FC.js +130 -0
  18. package/dist/chunk-3JJBJ4VR.js +47 -0
  19. package/dist/chunk-3U56FXYC.js +30 -0
  20. package/dist/chunk-4MWKE6F5.js +86 -0
  21. package/dist/chunk-6HGSU24S.js +94 -0
  22. package/dist/chunk-7IADIXDV.js +168 -0
  23. package/dist/chunk-7NS3VFD7.js +86 -0
  24. package/dist/chunk-7XLZCXUL.js +175 -0
  25. package/dist/chunk-ALA6OM7K.js +134 -0
  26. package/dist/chunk-AN5TW4AL.js +50 -0
  27. package/dist/chunk-AWZFQQGN.js +167 -0
  28. package/dist/chunk-BRCBJ3S4.js +42 -0
  29. package/dist/chunk-BRICSLHJ.js +30 -0
  30. package/dist/chunk-BYEHHZZN.js +115 -0
  31. package/dist/chunk-C33GUEDY.js +149 -0
  32. package/dist/chunk-CUDMDYKE.js +150 -0
  33. package/dist/chunk-CVTMWSNS.js +145 -0
  34. package/dist/chunk-DEZXWNYF.js +165 -0
  35. package/dist/chunk-DNJEVMDY.js +40 -0
  36. package/dist/chunk-DNJOBML6.js +66 -0
  37. package/dist/chunk-FTGFOK6T.js +69 -0
  38. package/dist/chunk-HFBJ6L6O.js +104 -0
  39. package/dist/chunk-HPTHS7SX.js +52 -0
  40. package/dist/chunk-KNR3WB5C.js +147 -0
  41. package/dist/chunk-KQ7ZC6EM.js +66 -0
  42. package/dist/chunk-LGW7FVG5.js +83 -0
  43. package/dist/chunk-LP6ZZYOQ.js +36 -0
  44. package/dist/chunk-LV4P7WVM.js +54 -0
  45. package/dist/chunk-MGSGCARB.js +164 -0
  46. package/dist/chunk-N3YFYMNZ.js +73 -0
  47. package/dist/chunk-Q5IYBNA7.js +56 -0
  48. package/dist/chunk-QJCE7NZF.js +85 -0
  49. package/dist/chunk-QW5II6YK.js +96 -0
  50. package/dist/chunk-RMGDDOCD.js +138 -0
  51. package/dist/chunk-RNCX4JIE.js +70 -0
  52. package/dist/chunk-RWCL5OPX.js +112 -0
  53. package/dist/chunk-S5OY2B63.js +28 -0
  54. package/dist/chunk-SIQNG72C.js +257 -0
  55. package/dist/chunk-SP7NIZFP.js +117 -0
  56. package/dist/chunk-SWRJWMGG.js +30 -0
  57. package/dist/chunk-TCQIJ3DO.js +85 -0
  58. package/dist/chunk-TPJ6JJ2F.js +290 -0
  59. package/dist/chunk-TUJZMJXW.js +72 -0
  60. package/dist/chunk-UR43ANYS.js +159 -0
  61. package/dist/chunk-VRGPG2YN.js +79 -0
  62. package/dist/chunk-WSBLCWY7.js +126 -0
  63. package/dist/chunk-XKKFSFYO.js +93 -0
  64. package/dist/chunk-XO7TBM47.js +32 -0
  65. package/dist/chunk-YDYDGG5K.js +132 -0
  66. package/dist/chunk-YMJOUYMT.js +171 -0
  67. package/dist/chunk-Z2WION42.js +32 -0
  68. package/dist/chunk-ZFKSVEYW.js +35 -0
  69. package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
  70. package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
  71. package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
  72. package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
  73. package/dist/components/blocks/AuthLayout.js +9 -73
  74. package/dist/components/blocks/BannerBlock.js +8 -66
  75. package/dist/components/blocks/BarChartBlock.js +5 -47
  76. package/dist/components/blocks/ChartBlock.js +7 -54
  77. package/dist/components/blocks/ChartCollectionBlock.js +11 -171
  78. package/dist/components/blocks/ChatLayout.js +12 -126
  79. package/dist/components/blocks/CreateBlock.js +9 -104
  80. package/dist/components/blocks/DataGridBlock.js +9 -117
  81. package/dist/components/blocks/DirectoryBlock.js +12 -85
  82. package/dist/components/blocks/FeatureGridBlock.js +6 -56
  83. package/dist/components/blocks/GalleryBlock.js +6 -69
  84. package/dist/components/blocks/HeroSectionBlock.js +10 -134
  85. package/dist/components/blocks/IntegrationsBlock.js +13 -94
  86. package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
  87. package/dist/components/blocks/KanbanDemoBlock.js +8 -145
  88. package/dist/components/blocks/LogoCloud.js +4 -35
  89. package/dist/components/blocks/NavUser.js +5 -85
  90. package/dist/components/blocks/NotFoundBlock.js +8 -32
  91. package/dist/components/blocks/OnboardingBlock.js +7 -66
  92. package/dist/components/blocks/SettingsLayout.js +13 -86
  93. package/dist/components/blocks/SignUpBlock.js +8 -168
  94. package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
  95. package/dist/components/blocks/StatsBlock.js +6 -60
  96. package/dist/components/blocks/UsageDonutBlock.js +5 -79
  97. package/dist/components/blocks/WizardBlock.js +12 -93
  98. package/dist/components/blocks/user/InviteUserModal.js +10 -132
  99. package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
  100. package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
  101. package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
  102. package/dist/components/page-kits/BlogContentPageKit.js +12 -167
  103. package/dist/components/page-kits/CheckoutPageKit.js +9 -83
  104. package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
  105. package/dist/components/page-kits/DashboardPageKit.js +11 -149
  106. package/dist/components/page-kits/ErrorPageKit.js +5 -52
  107. package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
  108. package/dist/components/page-kits/LandingPageKit.js +11 -72
  109. package/dist/components/page-kits/LoginPageKit.js +3 -32
  110. package/dist/components/page-kits/OnboardingPageKit.js +6 -115
  111. package/dist/components/page-kits/PricingPageKit.js +12 -138
  112. package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
  113. package/dist/components/page-kits/RecoveryPageKit.js +3 -42
  114. package/dist/components/page-kits/ResetPageKit.js +3 -36
  115. package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
  116. package/dist/components/page-kits/SignupPageKit.js +3 -30
  117. package/dist/components/page-kits/SuccessPageKit.js +4 -30
  118. package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
  119. package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
  120. package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
  121. package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
  122. package/dist/components/ui/CheckoutForm.js +5 -70
  123. package/eslint-rules/nadicode/config.js +1 -1
  124. package/eslint-rules/nadicode/data/catalog-names.json +93 -0
  125. package/eslint-rules/nadicode/index.js +2 -2
  126. package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
  127. package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
  128. package/package.json +18 -25
  129. package/contracts/block-props-schemas.json +0 -2186
  130. package/contracts/component-props-schemas.json +0 -8322
  131. package/contracts/consumer-contract.json +0 -178
  132. package/contracts/page-kit-props-schemas.json +0 -1894
  133. package/contracts/public-surface-registry.json +0 -6162
  134. package/contracts/public-surface-registry.schema.json +0 -227
  135. package/contracts/spec-manifest.json +0 -46
  136. package/dist/catalog.json +0 -5221
  137. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +0 -99
@@ -0,0 +1,145 @@
1
+ import { Typography } from './chunk-N53OMWW2.js';
2
+ import { Heading } from './chunk-WI547C47.js';
3
+ import { KanbanBoard, KanbanColumn, KanbanColumnHeader, KanbanItem, KanbanHandle } from './chunk-TYP2MR3Q.js';
4
+ import { Empty, EmptyDescription } from './chunk-55HD4L6G.js';
5
+ import { Avatar, AvatarFallback } from './chunk-NAAU5IWU.js';
6
+ import { Badge } from './chunk-S4JAHKOP.js';
7
+ import { cn } from './chunk-QYZT24TS.js';
8
+ import { useState } from 'react';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var PRIORITY_STYLES = {
12
+ low: { dot: "bg-success", badge: "bg-success/10 text-success" },
13
+ medium: { dot: "bg-warning", badge: "bg-warning/10 text-warning" },
14
+ high: { dot: "bg-destructive", badge: "bg-destructive/10 text-destructive" },
15
+ critical: { dot: "bg-destructive", badge: "bg-destructive/20 text-destructive" }
16
+ };
17
+ var COLUMN_META = {
18
+ backlog: { label: "Backlog", color: "bg-text-tertiary" },
19
+ todo: { label: "To Do", color: "bg-accent" },
20
+ "in-progress": { label: "In Progress", color: "bg-warning" },
21
+ review: { label: "Review", color: "bg-info" },
22
+ done: { label: "Done", color: "bg-success" }
23
+ };
24
+ var INITIAL_COLUMNS = [
25
+ {
26
+ id: "backlog",
27
+ items: [
28
+ { id: "t1", title: "Design token audit", description: "Review all semantic tokens for contrast compliance", priority: "medium", assignee: "AK", tags: ["tokens", "a11y"] },
29
+ { id: "t2", title: "Update changelog", description: "Document v2.0 breaking changes", priority: "low", assignee: "VM", tags: ["docs"] },
30
+ { id: "t3", title: "Virtualized list primitive", description: "Research windowing for large data tables", priority: "low", assignee: "JR", tags: ["perf", "research"] }
31
+ ]
32
+ },
33
+ {
34
+ id: "todo",
35
+ items: [
36
+ { id: "t4", title: "Date range picker a11y", description: "Fix keyboard navigation between months", priority: "high", assignee: "AK", tags: ["a11y", "datepicker"] },
37
+ { id: "t5", title: "Carousel keyboard nav", description: "Arrow keys should cycle through slides", priority: "high", assignee: "VM", tags: ["a11y", "carousel"] }
38
+ ]
39
+ },
40
+ {
41
+ id: "in-progress",
42
+ items: [
43
+ { id: "t6", title: "Kanban board primitive", description: "dnd-kit compound component with glass styling", priority: "critical", assignee: "VM", tags: ["dnd", "new"] },
44
+ { id: "t7", title: "Bloom theme spring tuning", description: "Adjust bloom spring presets for more playful overshoot", priority: "medium", assignee: "JR", tags: ["motion", "bloom"] }
45
+ ]
46
+ },
47
+ {
48
+ id: "review",
49
+ items: [
50
+ { id: "t8", title: "Form wizard validation", description: "Zod schema per step with async validation support", priority: "high", assignee: "AK", tags: ["forms", "zod"] }
51
+ ]
52
+ },
53
+ {
54
+ id: "done",
55
+ items: [
56
+ { id: "t9", title: "Dark mode polish", description: "Fix washed-out glass panels in dark mode", priority: "medium", assignee: "VM", tags: ["theme", "glass"] },
57
+ { id: "t10", title: "Icon animation system", description: "77 animated icons with imperative handles", priority: "low", assignee: "JR", tags: ["icons", "motion"] }
58
+ ]
59
+ }
60
+ ];
61
+ function TaskCard({ task, compact = false }) {
62
+ const ps = PRIORITY_STYLES[task.priority];
63
+ const content = /* @__PURE__ */ jsxs("div", { className: cn("min-w-0 flex-1 space-y-2", compact && "w-[260px] p-3"), children: [
64
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
65
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-text-primary leading-snug", children: task.title }),
66
+ !compact && /* @__PURE__ */ jsx("div", { className: cn("mt-0.5 h-2 w-2 shrink-0 rounded-full", ps.dot) })
67
+ ] }),
68
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary line-clamp-2", children: task.description }),
69
+ !compact && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: task.tags.map((tag) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "rounded bg-surface-secondary px-1.5 text-[10px] font-medium text-text-tertiary", children: tag }, tag)) }),
70
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pt-1", children: [
71
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: cn("rounded px-1.5 text-[10px] uppercase tracking-wider", ps.badge), children: task.priority }),
72
+ !compact && /* @__PURE__ */ jsx(Avatar, { className: "h-5 w-5 text-[10px]", children: /* @__PURE__ */ jsx(AvatarFallback, { children: task.assignee }) })
73
+ ] })
74
+ ] });
75
+ if (compact) return content;
76
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
77
+ /* @__PURE__ */ jsx(KanbanHandle, { "aria-label": `Move ${task.title}` }),
78
+ content
79
+ ] });
80
+ }
81
+ var getTaskId = (task) => task.id;
82
+ var getTaskLabel = (task) => task.title;
83
+ var renderOverlay = (task) => /* @__PURE__ */ jsx(TaskCard, { task, compact: true });
84
+ function KanbanDemoBlock({ className }) {
85
+ const [columns, setColumns] = useState(INITIAL_COLUMNS);
86
+ const [moveLog, setMoveLog] = useState([]);
87
+ function handleMove(next, meta) {
88
+ setColumns([...next]);
89
+ const entry = `${meta.item.title}: ${meta.fromColumnId} \u2192 ${meta.toColumnId} (pos ${meta.toIndex})`;
90
+ setMoveLog((prev) => [entry, ...prev].slice(0, 10));
91
+ }
92
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-6", className), children: [
93
+ /* @__PURE__ */ jsxs("div", { children: [
94
+ /* @__PURE__ */ jsx(Heading, { level: 1, size: "display", children: "Kanban Board" }),
95
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-1 text-text-secondary", children: "Drag tasks between columns. Uses handle-only drag with keyboard support." })
96
+ ] }),
97
+ /* @__PURE__ */ jsx(
98
+ KanbanBoard,
99
+ {
100
+ value: columns,
101
+ onValueChange: handleMove,
102
+ getItemId: getTaskId,
103
+ getItemLabel: getTaskLabel,
104
+ renderOverlay,
105
+ className: "pb-4",
106
+ children: columns.map((col) => {
107
+ const colMeta = COLUMN_META[col.id] ?? { label: col.id, color: "bg-accent" };
108
+ return /* @__PURE__ */ jsxs(
109
+ KanbanColumn,
110
+ {
111
+ id: col.id,
112
+ items: col.items,
113
+ "aria-label": colMeta.label,
114
+ className: "w-[280px] shrink-0",
115
+ children: [
116
+ /* @__PURE__ */ jsxs(KanbanColumnHeader, { children: [
117
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
118
+ /* @__PURE__ */ jsx("div", { className: cn("h-2 w-2 rounded-full", colMeta.color) }),
119
+ /* @__PURE__ */ jsx("span", { children: colMeta.label })
120
+ ] }),
121
+ /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs tabular-nums", children: col.items.length })
122
+ ] }),
123
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: col.items.map((task) => /* @__PURE__ */ jsx(KanbanItem, { value: task, children: /* @__PURE__ */ jsx(TaskCard, { task }) }, task.id)) }),
124
+ col.items.length === 0 && /* @__PURE__ */ jsx(Empty, { className: "h-24 p-4", children: /* @__PURE__ */ jsx(EmptyDescription, { className: "text-xs", children: "Drop tasks here" }) })
125
+ ]
126
+ },
127
+ col.id
128
+ );
129
+ })
130
+ }
131
+ ),
132
+ moveLog.length > 0 && /* @__PURE__ */ jsxs("div", { className: "glass-panel rounded-lg p-4", children: [
133
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "mb-2", children: "Move Log" }),
134
+ /* @__PURE__ */ jsx("div", { className: "space-y-1 font-mono text-xs text-text-secondary", children: moveLog.map((entry, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
135
+ /* @__PURE__ */ jsxs("span", { className: "text-text-tertiary", children: [
136
+ moveLog.length - i,
137
+ "."
138
+ ] }),
139
+ /* @__PURE__ */ jsx("span", { children: entry })
140
+ ] }, i)) })
141
+ ] })
142
+ ] });
143
+ }
144
+
145
+ export { KanbanDemoBlock };
@@ -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 };
@@ -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 };