@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.
- package/.agents/skills/seed/SKILL.md +19 -10
- package/.agents/skills/seed/contract.md +9 -2
- 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-7XLZCXUL.js +175 -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-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -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-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-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-TUJZMJXW.js +72 -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/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 +11 -72
- 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 +10 -175
- 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/CheckoutForm.js +5 -70
- package/eslint-rules/nadicode/config.js +1 -0
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +2 -0
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/package.json +18 -25
- 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
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
|
|
10
|
-
import
|
|
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
|
-
|
|
2
|
+
export { DataGridBlock } from '../../chunk-SP7NIZFP.js';
|
|
3
|
+
import '../../chunk-PDSQC6VE.js';
|
|
3
4
|
import '../../chunk-PXDHNGTG.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
5
|
+
import '../../chunk-CQEUNASC.js';
|
|
6
|
+
import '../../chunk-A7NUWD76.js';
|
|
6
7
|
import '../../chunk-AP3XXYAY.js';
|
|
7
8
|
import '../../chunk-LIBXYD5Q.js';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
20
|
+
import '../../chunk-WUO7OONN.js';
|
|
20
21
|
import '../../chunk-FLF5AMNO.js';
|
|
21
22
|
import '../../chunk-3CLXYQKB.js';
|
|
22
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 };
|