@vadimcomanescu/nadicode-design-system 2.0.9 → 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 (136) 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 -0
  124. package/eslint-rules/nadicode/data/catalog-names.json +93 -0
  125. package/eslint-rules/nadicode/index.js +2 -0
  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 -5822
  134. package/contracts/public-surface-registry.schema.json +0 -219
  135. package/contracts/spec-manifest.json +0 -46
  136. package/dist/catalog.json +0 -5221
@@ -1,11 +1,12 @@
1
1
  'use client';
2
- import { useSafeTimeout } from '../../chunk-MDAYDDTC.js';
3
- import { ScrollArea } from '../../chunk-GLU236NN.js';
4
- import { Input } from '../../chunk-AP3XXYAY.js';
2
+ export { ChatLayout } from '../../chunk-WSBLCWY7.js';
3
+ import '../../chunk-MDAYDDTC.js';
4
+ import '../../chunk-GLU236NN.js';
5
+ import '../../chunk-AP3XXYAY.js';
5
6
  import '../../chunk-LIBXYD5Q.js';
6
- import { Avatar, AvatarFallback } from '../../chunk-NAAU5IWU.js';
7
- import { Button } from '../../chunk-7KIDDF3I.js';
8
- import { useMotionConfig, m, motionSpring } from '../../chunk-PD2YEH3H.js';
7
+ import '../../chunk-NAAU5IWU.js';
8
+ import '../../chunk-7KIDDF3I.js';
9
+ import '../../chunk-PD2YEH3H.js';
9
10
  import '../../chunk-CRY67BIF.js';
10
11
  import '../../chunk-HJC6U46F.js';
11
12
  import '../../chunk-GO35FTNJ.js';
@@ -31,7 +32,7 @@ import '../../chunk-E7RBK6ML.js';
31
32
  import '../../chunk-UBIGDGOP.js';
32
33
  import '../../chunk-ALMGJVMT.js';
33
34
  import '../../chunk-QPXTBZWN.js';
34
- import { MicIcon } from '../../chunk-4NXZIMYZ.js';
35
+ import '../../chunk-4NXZIMYZ.js';
35
36
  import '../../chunk-R5XP45PD.js';
36
37
  import '../../chunk-G5EO5FWC.js';
37
38
  import '../../chunk-NCULQXJE.js';
@@ -81,7 +82,7 @@ import '../../chunk-74RKVIBV.js';
81
82
  import '../../chunk-V6WNRZT3.js';
82
83
  import '../../chunk-JBK2LA6U.js';
83
84
  import '../../chunk-55U27XY4.js';
84
- import { BotIcon } from '../../chunk-LSPO6OBI.js';
85
+ import '../../chunk-LSPO6OBI.js';
85
86
  import '../../chunk-Y56WBNCY.js';
86
87
  import '../../chunk-JJTQOH7J.js';
87
88
  import '../../chunk-72X6SXOX.js';
@@ -97,7 +98,7 @@ import '../../chunk-TBKJ34BB.js';
97
98
  import '../../chunk-BRP6D56U.js';
98
99
  import '../../chunk-6G3RRWJT.js';
99
100
  import '../../chunk-ZU2GYVAP.js';
100
- import { SendIcon } from '../../chunk-CRZ2JE24.js';
101
+ import '../../chunk-CRZ2JE24.js';
101
102
  import '../../chunk-PSVQ7ZNX.js';
102
103
  import '../../chunk-WKRIKCJC.js';
103
104
  import '../../chunk-JHQ5NMLZ.js';
@@ -113,126 +114,11 @@ import '../../chunk-P6IRHPFM.js';
113
114
  import '../../chunk-SXHYB7JB.js';
114
115
  import '../../chunk-BFLN54VR.js';
115
116
  import '../../chunk-ONGJ7AC2.js';
116
- import { UserIcon } from '../../chunk-UHXGBV5N.js';
117
+ import '../../chunk-UHXGBV5N.js';
117
118
  import '../../chunk-UIUMTURU.js';
118
119
  import '../../chunk-PRUXIDBD.js';
119
120
  import '../../chunk-NURPUVUV.js';
120
121
  import '../../chunk-TV4RSQH4.js';
121
122
  import '../../chunk-HJBXUXTD.js';
122
123
  import '../../chunk-ASKFAYYR.js';
123
- import { cn } from '../../chunk-QYZT24TS.js';
124
- import * as React from 'react';
125
- import { useTranslations } from 'next-intl';
126
- import { jsxs, jsx } from 'react/jsx-runtime';
127
-
128
- var defaultInitialMessages = [
129
- {
130
- id: "1",
131
- role: "assistant",
132
- content: "Hello! How can I help you today?"
133
- }
134
- ];
135
- function ChatLayout({
136
- initialMessages = defaultInitialMessages,
137
- assistantName = "AI Assistant",
138
- assistantStatus = "Online",
139
- placeholder = "Type a message...",
140
- className
141
- }) {
142
- const t = useTranslations("blocks.chatLayout");
143
- const motionConfig = useMotionConfig();
144
- const [messages, setMessages] = React.useState(initialMessages);
145
- const [input, setInput] = React.useState("");
146
- const scrollRef = React.useRef(null);
147
- const setSafeTimeout = useSafeTimeout();
148
- const handleSend = () => {
149
- if (!input.trim()) return;
150
- const newMessage = {
151
- id: Date.now().toString(),
152
- role: "user",
153
- content: input
154
- };
155
- setMessages((prev) => [...prev, newMessage]);
156
- setInput("");
157
- setSafeTimeout(() => {
158
- setMessages((prev) => [
159
- ...prev,
160
- {
161
- id: (Date.now() + 1).toString(),
162
- role: "assistant",
163
- content: "This is a simulated response matching the design system."
164
- }
165
- ]);
166
- }, 1e3);
167
- };
168
- React.useEffect(() => {
169
- if (scrollRef.current) {
170
- scrollRef.current.scrollIntoView({ behavior: "smooth" });
171
- }
172
- }, [messages]);
173
- return /* @__PURE__ */ jsxs("div", { className: cn("flex h-[350px] md:h-[500px] w-full flex-col overflow-hidden rounded-lg glass-panel", className), children: [
174
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between border-b border-border/50 p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
175
- /* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-accent text-accent-foreground", children: /* @__PURE__ */ jsx(BotIcon, { size: 16 }) }) }),
176
- /* @__PURE__ */ jsxs("div", { children: [
177
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: assistantName }),
178
- /* @__PURE__ */ jsx("p", { className: "text-xs text-text-tertiary", children: assistantStatus })
179
- ] })
180
- ] }) }),
181
- /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 p-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
182
- messages.map((message, index) => /* @__PURE__ */ jsxs(
183
- m.div,
184
- {
185
- initial: { opacity: 0, y: 8 },
186
- animate: { opacity: 1, y: 0 },
187
- transition: { ...motionSpring.snappy, delay: index * 0.05, ...motionConfig },
188
- className: cn(
189
- "flex w-full gap-2",
190
- message.role === "user" ? "justify-end" : "justify-start"
191
- ),
192
- children: [
193
- message.role !== "user" && /* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8 mt-1.5", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-accent text-accent-foreground", children: /* @__PURE__ */ jsx(BotIcon, { size: 16 }) }) }),
194
- /* @__PURE__ */ jsx(
195
- "div",
196
- {
197
- className: cn(
198
- "max-w-[80%] rounded-lg px-4 py-2 text-sm",
199
- message.role === "user" ? "bg-primary text-primary-foreground" : "bg-surface border border-border"
200
- ),
201
- children: message.content
202
- }
203
- ),
204
- message.role === "user" && /* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8 mt-1.5", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-secondary", children: /* @__PURE__ */ jsx(UserIcon, { size: 16 }) }) })
205
- ]
206
- },
207
- message.id
208
- )),
209
- /* @__PURE__ */ jsx("div", { ref: scrollRef })
210
- ] }) }),
211
- /* @__PURE__ */ jsx("div", { className: "p-4 border-t border-border bg-surface/30", children: /* @__PURE__ */ jsxs(
212
- "form",
213
- {
214
- onSubmit: (e) => {
215
- e.preventDefault();
216
- handleSend();
217
- },
218
- className: "flex items-center gap-2",
219
- children: [
220
- /* @__PURE__ */ jsx(Button, { type: "button", size: "icon", variant: "ghost", "aria-label": t("voiceInput"), children: /* @__PURE__ */ jsx(MicIcon, { size: 16 }) }),
221
- /* @__PURE__ */ jsx(
222
- Input,
223
- {
224
- name: "message",
225
- placeholder,
226
- value: input,
227
- onChange: (e) => setInput(e.target.value),
228
- className: "flex-1"
229
- }
230
- ),
231
- /* @__PURE__ */ jsx(Button, { type: "submit", size: "icon", disabled: !input.trim(), "aria-label": t("sendMessage"), children: /* @__PURE__ */ jsx(SendIcon, { size: 16 }) })
232
- ]
233
- }
234
- ) })
235
- ] });
236
- }
237
-
238
- export { ChatLayout };
124
+ import '../../chunk-QYZT24TS.js';
@@ -1,13 +1,14 @@
1
1
  'use client';
2
- import { toast } from '../../chunk-5Y4BOIYO.js';
3
- import { Textarea } from '../../chunk-4OBE2FS2.js';
4
- import { StaggerChildren } from '../../chunk-DQPK2XRL.js';
5
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../../chunk-WH62BE24.js';
6
- import { Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage } from '../../chunk-UN2SJ42K.js';
7
- import { Input } from '../../chunk-AP3XXYAY.js';
2
+ export { CreateBlock } from '../../chunk-HFBJ6L6O.js';
3
+ import '../../chunk-5Y4BOIYO.js';
4
+ import '../../chunk-4OBE2FS2.js';
5
+ import '../../chunk-DQPK2XRL.js';
6
+ import '../../chunk-WH62BE24.js';
7
+ import '../../chunk-UN2SJ42K.js';
8
+ import '../../chunk-AP3XXYAY.js';
8
9
  import '../../chunk-LIBXYD5Q.js';
9
- import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '../../chunk-AH6YSYYT.js';
10
- import { Button } from '../../chunk-7KIDDF3I.js';
10
+ import '../../chunk-AH6YSYYT.js';
11
+ import '../../chunk-7KIDDF3I.js';
11
12
  import '../../chunk-PD2YEH3H.js';
12
13
  import '../../chunk-CRY67BIF.js';
13
14
  import '../../chunk-HJC6U46F.js';
@@ -124,99 +125,3 @@ import '../../chunk-TV4RSQH4.js';
124
125
  import '../../chunk-HJBXUXTD.js';
125
126
  import '../../chunk-ASKFAYYR.js';
126
127
  import '../../chunk-QYZT24TS.js';
127
- import { zodResolver } from '@hookform/resolvers/zod';
128
- import { useForm } from 'react-hook-form';
129
- import { z } from 'zod';
130
- import { jsxs, jsx } from 'react/jsx-runtime';
131
-
132
- var profileFormSchema = z.object({
133
- username: z.string().min(2, {
134
- message: "Username must be at least 2 characters."
135
- }).max(30, {
136
- message: "Username must not be longer than 30 characters."
137
- }),
138
- email: z.string({
139
- error: "Please select an email to display."
140
- }).email(),
141
- bio: z.string().max(160).min(4)
142
- });
143
- var defaultFormValues = {
144
- bio: "I own a computer."
145
- };
146
- function CreateBlock({
147
- title = "Create Profile",
148
- description = "Example of a complex form with Zod validation.",
149
- submitLabel = "Update profile",
150
- onSubmit: onSubmitProp,
151
- className
152
- }) {
153
- const form = useForm({
154
- resolver: zodResolver(profileFormSchema),
155
- defaultValues: defaultFormValues,
156
- mode: "onChange"
157
- });
158
- function handleSubmit(data) {
159
- if (onSubmitProp) {
160
- onSubmitProp(data);
161
- return;
162
- }
163
- toast({
164
- title: "You submitted the following values:",
165
- 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) }) })
166
- });
167
- }
168
- return /* @__PURE__ */ jsxs(Card, { className: className ?? "w-full max-w-2xl mx-auto", children: [
169
- /* @__PURE__ */ jsxs(CardHeader, { children: [
170
- /* @__PURE__ */ jsx(CardTitle, { children: title }),
171
- /* @__PURE__ */ jsx(CardDescription, { children: description })
172
- ] }),
173
- /* @__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: [
174
- /* @__PURE__ */ jsx(
175
- FormField,
176
- {
177
- control: form.control,
178
- name: "username",
179
- render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
180
- /* @__PURE__ */ jsx(FormLabel, { children: "Username" }),
181
- /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { placeholder: "shadcn", ...field }) }),
182
- /* @__PURE__ */ jsx(FormDescription, { children: "Public display name." }),
183
- /* @__PURE__ */ jsx(FormMessage, {})
184
- ] })
185
- }
186
- ),
187
- /* @__PURE__ */ jsx(
188
- FormField,
189
- {
190
- control: form.control,
191
- name: "email",
192
- render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
193
- /* @__PURE__ */ jsx(FormLabel, { children: "Email" }),
194
- /* @__PURE__ */ jsxs(Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
195
- /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select email" }) }) }),
196
- /* @__PURE__ */ jsxs(SelectContent, { children: [
197
- /* @__PURE__ */ jsx(SelectItem, { value: "m@example.com", children: "m@example.com" }),
198
- /* @__PURE__ */ jsx(SelectItem, { value: "m@google.com", children: "m@google.com" })
199
- ] })
200
- ] }),
201
- /* @__PURE__ */ jsx(FormMessage, {})
202
- ] })
203
- }
204
- ),
205
- /* @__PURE__ */ jsx(
206
- FormField,
207
- {
208
- control: form.control,
209
- name: "bio",
210
- render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
211
- /* @__PURE__ */ jsx(FormLabel, { children: "Bio" }),
212
- /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Textarea, { placeholder: "Bio...", ...field }) }),
213
- /* @__PURE__ */ jsx(FormMessage, {})
214
- ] })
215
- }
216
- ),
217
- /* @__PURE__ */ jsx(Button, { type: "submit", children: submitLabel })
218
- ] }) }) }) })
219
- ] });
220
- }
221
-
222
- export { CreateBlock };
@@ -1,13 +1,14 @@
1
1
  'use client';
2
- import { DataTable } from '../../chunk-PDSQC6VE.js';
2
+ export { DataGridBlock } from '../../chunk-SP7NIZFP.js';
3
+ import '../../chunk-PDSQC6VE.js';
3
4
  import '../../chunk-PXDHNGTG.js';
4
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator } from '../../chunk-CQEUNASC.js';
5
- import { siteConfig } from '../../chunk-A7NUWD76.js';
5
+ import '../../chunk-CQEUNASC.js';
6
+ import '../../chunk-A7NUWD76.js';
6
7
  import '../../chunk-AP3XXYAY.js';
7
8
  import '../../chunk-LIBXYD5Q.js';
8
- import { ScrollFadeIn } from '../../chunk-I23DDSU7.js';
9
- import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '../../chunk-AH6YSYYT.js';
10
- import { Button } from '../../chunk-7KIDDF3I.js';
9
+ import '../../chunk-I23DDSU7.js';
10
+ import '../../chunk-AH6YSYYT.js';
11
+ import '../../chunk-7KIDDF3I.js';
11
12
  import '../../chunk-PD2YEH3H.js';
12
13
  import '../../chunk-CRY67BIF.js';
13
14
  import '../../chunk-HJC6U46F.js';
@@ -69,7 +70,7 @@ import '../../chunk-WA45EC4Y.js';
69
70
  import '../../chunk-2MOEOEOI.js';
70
71
  import '../../chunk-5LCXASRW.js';
71
72
  import '../../chunk-2ZJVU7NV.js';
72
- import { EllipsisIcon } from '../../chunk-5ESF6N36.js';
73
+ import '../../chunk-5ESF6N36.js';
73
74
  import '../../chunk-RBPLOM3A.js';
74
75
  import '../../chunk-6BAV4TZ5.js';
75
76
  import '../../chunk-SW6QPJM4.js';
@@ -120,117 +121,8 @@ import '../../chunk-UHXGBV5N.js';
120
121
  import '../../chunk-UIUMTURU.js';
121
122
  import '../../chunk-PRUXIDBD.js';
122
123
  import '../../chunk-NURPUVUV.js';
123
- import { Badge } from '../../chunk-S4JAHKOP.js';
124
+ import '../../chunk-S4JAHKOP.js';
124
125
  import '../../chunk-TV4RSQH4.js';
125
126
  import '../../chunk-HJBXUXTD.js';
126
127
  import '../../chunk-ASKFAYYR.js';
127
128
  import '../../chunk-QYZT24TS.js';
128
- import { useMemo } from 'react';
129
- import { useTranslations } from 'next-intl';
130
- import { jsx, jsxs } from 'react/jsx-runtime';
131
-
132
- var USD_FORMAT = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" });
133
- function createColumns(t) {
134
- return [
135
- {
136
- accessorKey: "status",
137
- header: t("statusHeader"),
138
- cell: ({ row }) => {
139
- const status = row.getValue("status");
140
- const variant = status === "success" ? "outline" : status === "processing" ? "accent" : status === "failed" ? "destructive" : "secondary";
141
- return /* @__PURE__ */ jsx(Badge, { variant, children: status });
142
- }
143
- },
144
- {
145
- accessorKey: "email",
146
- header: t("emailHeader"),
147
- cell: ({ row }) => /* @__PURE__ */ jsx("div", { className: "lowercase text-text-secondary", children: row.getValue("email") })
148
- },
149
- {
150
- accessorKey: "amount",
151
- header: () => /* @__PURE__ */ jsx("div", { className: "text-right", children: t("amountHeader") }),
152
- cell: ({ row }) => {
153
- const amount = parseFloat(row.getValue("amount"));
154
- const formatted = USD_FORMAT.format(amount);
155
- return /* @__PURE__ */ jsx("div", { className: "text-right font-medium font-mono text-text-primary", children: formatted });
156
- }
157
- },
158
- {
159
- id: "actions",
160
- header: () => /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("actionsHeader") }),
161
- cell: ({ row }) => {
162
- const payment = row.original;
163
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
164
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "p-0", children: [
165
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("openMenu") }),
166
- /* @__PURE__ */ jsx(EllipsisIcon, { size: 16 })
167
- ] }) }),
168
- /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
169
- /* @__PURE__ */ jsx(DropdownMenuLabel, { children: t("actionsHeader") }),
170
- /* @__PURE__ */ jsx(
171
- DropdownMenuItem,
172
- {
173
- onClick: () => navigator.clipboard.writeText(payment.id),
174
- children: t("copyPaymentId")
175
- }
176
- ),
177
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
178
- /* @__PURE__ */ jsx(DropdownMenuItem, { children: t("viewCustomer") }),
179
- /* @__PURE__ */ jsx(DropdownMenuItem, { children: t("viewPaymentDetails") })
180
- ] })
181
- ] });
182
- }
183
- }
184
- ];
185
- }
186
- var defaultData = [
187
- {
188
- id: "728ed52f",
189
- amount: 100,
190
- status: "pending",
191
- email: "m@example.com"
192
- },
193
- {
194
- id: "489e1d42",
195
- amount: 125,
196
- status: "processing",
197
- email: "example@gmail.com"
198
- },
199
- {
200
- id: "123e1d42",
201
- amount: 550,
202
- status: "success",
203
- email: `corporate@${siteConfig.name.toLowerCase()}.inc`
204
- },
205
- {
206
- id: "999e1d42",
207
- amount: 25,
208
- status: "failed",
209
- email: "user@domain.com"
210
- },
211
- {
212
- id: "444e1d42",
213
- amount: 300,
214
- status: "success",
215
- email: "sales@company.com"
216
- }
217
- ];
218
- function DataGridBlock({
219
- data = defaultData,
220
- columns: columnDefs,
221
- title = "Recent Transactions",
222
- description = "A sophisticated data grid with filtering and actions.",
223
- className
224
- }) {
225
- const t = useTranslations("blocks.dataGridBlock");
226
- const defaultColumns = useMemo(() => createColumns(t), [t]);
227
- return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs(Card, { className: className ?? "w-full", children: [
228
- /* @__PURE__ */ jsxs(CardHeader, { children: [
229
- /* @__PURE__ */ jsx(CardTitle, { children: title }),
230
- /* @__PURE__ */ jsx(CardDescription, { children: description })
231
- ] }),
232
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(DataTable, { columns: columnDefs ?? defaultColumns, data, searchKey: "email" }) })
233
- ] }) });
234
- }
235
-
236
- export { DataGridBlock };
@@ -1,14 +1,15 @@
1
1
  'use client';
2
- import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction } from '../../chunk-J2DCQDXO.js';
2
+ export { DirectoryBlock } from '../../chunk-TCQIJ3DO.js';
3
+ import '../../chunk-J2DCQDXO.js';
3
4
  import '../../chunk-C4SNHMYC.js';
4
5
  import '../../chunk-B5QL76GA.js';
5
6
  import '../../chunk-HOWTYZL5.js';
6
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from '../../chunk-CQEUNASC.js';
7
+ import '../../chunk-CQEUNASC.js';
7
8
  import '../../chunk-CUZJIDU7.js';
8
9
  import '../../chunk-AP3XXYAY.js';
9
10
  import '../../chunk-LIBXYD5Q.js';
10
11
  import '../../chunk-RASEB2XI.js';
11
- import { Empty, EmptyDescription } from '../../chunk-55HD4L6G.js';
12
+ import '../../chunk-55HD4L6G.js';
12
13
  import '../../chunk-MJ4CB6ZL.js';
13
14
  import '../../chunk-7KIDDF3I.js';
14
15
  import '../../chunk-6FOHUNXR.js';
@@ -16,21 +17,21 @@ import '../../chunk-PD2YEH3H.js';
16
17
  import '../../chunk-CRY67BIF.js';
17
18
  import '../../chunk-HJC6U46F.js';
18
19
  import '../../chunk-GO35FTNJ.js';
19
- import { UsersIcon } from '../../chunk-WUO7OONN.js';
20
+ import '../../chunk-WUO7OONN.js';
20
21
  import '../../chunk-FLF5AMNO.js';
21
22
  import '../../chunk-3CLXYQKB.js';
22
- import { Trash2Icon } from '../../chunk-S4GKGKON.js';
23
+ import '../../chunk-S4GKGKON.js';
23
24
  import '../../chunk-LCDDAE7J.js';
24
25
  import '../../chunk-R674XI7C.js';
25
26
  import '../../chunk-HNY45VUQ.js';
26
27
  import '../../chunk-BPCCTJSK.js';
27
28
  import '../../chunk-CGUCH322.js';
28
- import { StarIcon } from '../../chunk-ELKIUARM.js';
29
+ import '../../chunk-ELKIUARM.js';
29
30
  import '../../chunk-KSHJQ2VT.js';
30
31
  import '../../chunk-GAKU7DFY.js';
31
32
  import '../../chunk-T6BRD7TS.js';
32
33
  import '../../chunk-TXGANOAX.js';
33
- import { SettingsIcon } from '../../chunk-OITJWGFV.js';
34
+ import '../../chunk-OITJWGFV.js';
34
35
  import '../../chunk-Z74D6D2W.js';
35
36
  import '../../chunk-7WDT2PRI.js';
36
37
  import '../../chunk-IJJI4RQU.js';
@@ -51,11 +52,11 @@ import '../../chunk-M7YSMMAC.js';
51
52
  import '../../chunk-XQ2UDMPO.js';
52
53
  import '../../chunk-JMCSAGZ3.js';
53
54
  import '../../chunk-QUKDUSHD.js';
54
- import { LayoutDashboardIcon } from '../../chunk-O74AEVHW.js';
55
+ import '../../chunk-O74AEVHW.js';
55
56
  import '../../chunk-ZUHIWALK.js';
56
57
  import '../../chunk-2IZC7HSV.js';
57
58
  import '../../chunk-2SDZMTB2.js';
58
- import { HomeIcon } from '../../chunk-IQEBXXB5.js';
59
+ import '../../chunk-IQEBXXB5.js';
59
60
  import '../../chunk-AZUJNRQU.js';
60
61
  import '../../chunk-W3B3UOEG.js';
61
62
  import '../../chunk-ACRVOD7W.js';
@@ -64,7 +65,7 @@ import '../../chunk-BJYCQ2NV.js';
64
65
  import '../../chunk-VM462WZC.js';
65
66
  import '../../chunk-5UZDOF6V.js';
66
67
  import '../../chunk-PKVTEDKO.js';
67
- import { FolderIcon } from '../../chunk-I3TH7PIB.js';
68
+ import '../../chunk-I3TH7PIB.js';
68
69
  import '../../chunk-WGPK3FQ7.js';
69
70
  import '../../chunk-JL4MVVFH.js';
70
71
  import '../../chunk-4FEAWXJD.js';
@@ -73,7 +74,7 @@ import '../../chunk-WA45EC4Y.js';
73
74
  import '../../chunk-2MOEOEOI.js';
74
75
  import '../../chunk-5LCXASRW.js';
75
76
  import '../../chunk-2ZJVU7NV.js';
76
- import { EllipsisIcon } from '../../chunk-5ESF6N36.js';
77
+ import '../../chunk-5ESF6N36.js';
77
78
  import '../../chunk-RBPLOM3A.js';
78
79
  import '../../chunk-6BAV4TZ5.js';
79
80
  import '../../chunk-SW6QPJM4.js';
@@ -128,77 +129,3 @@ import '../../chunk-TV4RSQH4.js';
128
129
  import '../../chunk-HJBXUXTD.js';
129
130
  import '../../chunk-ASKFAYYR.js';
130
131
  import '../../chunk-QYZT24TS.js';
131
- import { useTranslations } from 'next-intl';
132
- import Link from 'next/link';
133
- import { jsxs, jsx } from 'react/jsx-runtime';
134
-
135
- var defaultNavItems = [
136
- { name: "Home", icon: /* @__PURE__ */ jsx(HomeIcon, { size: 16 }), isActive: true },
137
- { name: "Dashboard", icon: /* @__PURE__ */ jsx(LayoutDashboardIcon, { size: 16 }) },
138
- { name: "Team", icon: /* @__PURE__ */ jsx(UsersIcon, { size: 16 }) },
139
- { name: "Settings", icon: /* @__PURE__ */ jsx(SettingsIcon, { size: 16 }) }
140
- ];
141
- var defaultProjects = [
142
- { name: "Design Engineering", url: "#" },
143
- { name: "Sales & Marketing", url: "#" },
144
- { name: "Travel", url: "#" }
145
- ];
146
- function DirectoryBlock({
147
- navItems = defaultNavItems,
148
- projects = defaultProjects,
149
- className
150
- }) {
151
- const t = useTranslations("blocks.directoryBlock");
152
- return /* @__PURE__ */ jsxs("div", { className: className ?? "h-[500px] border border-border rounded-lg overflow-hidden flex bg-surface text-text-primary", children: [
153
- /* @__PURE__ */ jsx(SidebarProvider, { className: "h-full", children: /* @__PURE__ */ jsx(Sidebar, { collapsible: "none", className: "h-full border-r border-border", children: /* @__PURE__ */ jsxs(SidebarContent, { children: [
154
- /* @__PURE__ */ jsxs(SidebarGroup, { children: [
155
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: t("platform") }),
156
- /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: navItems.map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(SidebarMenuButton, { isActive: item.isActive, children: [
157
- item.icon,
158
- /* @__PURE__ */ jsx("span", { children: item.name })
159
- ] }) }, item.name)) }) })
160
- ] }),
161
- /* @__PURE__ */ jsxs(SidebarGroup, { children: [
162
- /* @__PURE__ */ jsx(SidebarGroupLabel, { children: t("projects") }),
163
- /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: projects.map((item) => /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [
164
- /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, children: /* @__PURE__ */ jsxs(Link, { href: item.url, children: [
165
- /* @__PURE__ */ jsx(FolderIcon, { size: 16 }),
166
- /* @__PURE__ */ jsx("span", { children: item.name })
167
- ] }) }),
168
- /* @__PURE__ */ jsxs(DropdownMenu, { children: [
169
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(SidebarMenuAction, { showOnHover: true, children: [
170
- /* @__PURE__ */ jsx(EllipsisIcon, { size: 16 }),
171
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("more") })
172
- ] }) }),
173
- /* @__PURE__ */ jsxs(
174
- DropdownMenuContent,
175
- {
176
- className: "w-48 rounded-lg",
177
- side: "bottom",
178
- align: "end",
179
- children: [
180
- /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
181
- /* @__PURE__ */ jsx(FolderIcon, { size: 16, className: "text-text-tertiary" }),
182
- /* @__PURE__ */ jsx("span", { children: t("viewProject") })
183
- ] }),
184
- /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
185
- /* @__PURE__ */ jsx(StarIcon, { size: 16, className: "text-text-tertiary" }),
186
- /* @__PURE__ */ jsx("span", { children: t("addToFavorites") })
187
- ] }),
188
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
189
- /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
190
- /* @__PURE__ */ jsx(Trash2Icon, { size: 16, className: "text-text-tertiary" }),
191
- /* @__PURE__ */ jsx("span", { children: t("deleteProject") })
192
- ] })
193
- ]
194
- }
195
- )
196
- ] })
197
- ] }, item.name)) }) })
198
- ] })
199
- ] }) }) }),
200
- /* @__PURE__ */ jsx("div", { className: "flex-1 p-8 bg-background", children: /* @__PURE__ */ jsx(Empty, { className: "h-full", children: /* @__PURE__ */ jsx(EmptyDescription, { children: t("selectProject") }) }) })
201
- ] });
202
- }
203
-
204
- export { DirectoryBlock };