@vadimcomanescu/nadicode-design-system 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/.agents/skills/seed/SKILL.md +2 -2
  2. package/README.md +1 -1
  3. package/contracts/message-catalog-contract.json +9 -3
  4. package/dist/{TeamPage-OXOXATQO.js → TeamPage-XL574KIF.js} +46 -46
  5. package/dist/catalog/catalog.d.ts +223 -9
  6. package/dist/catalog/catalog.js +10 -10
  7. package/dist/catalog/components.d.ts +14 -14
  8. package/dist/catalog/components.js +45 -45
  9. package/dist/catalog/definitions/blocks-agent.d.ts +35 -2
  10. package/dist/catalog/definitions/blocks-agent.js +1 -1
  11. package/dist/catalog/definitions/blocks-auth.d.ts +40 -0
  12. package/dist/catalog/definitions/blocks-auth.js +1 -1
  13. package/dist/catalog/definitions/blocks-content.d.ts +12 -0
  14. package/dist/catalog/definitions/blocks-content.js +1 -1
  15. package/dist/catalog/definitions/blocks-crud.d.ts +49 -1
  16. package/dist/catalog/definitions/blocks-crud.js +1 -1
  17. package/dist/catalog/definitions/blocks-data.d.ts +54 -2
  18. package/dist/catalog/definitions/blocks-data.js +1 -1
  19. package/dist/catalog/definitions/blocks-marketing.d.ts +29 -4
  20. package/dist/catalog/definitions/blocks-marketing.js +1 -1
  21. package/dist/catalog/definitions/blocks-misc.d.ts +2 -0
  22. package/dist/catalog/definitions/blocks-misc.js +1 -1
  23. package/dist/catalog/definitions/display.d.ts +2 -0
  24. package/dist/catalog/definitions/display.js +1 -1
  25. package/dist/catalog/definitions/index.d.ts +223 -9
  26. package/dist/catalog/definitions/index.js +9 -9
  27. package/dist/catalog/primitives/chat.d.ts +2 -2
  28. package/dist/catalog/primitives/chat.js +1 -1
  29. package/dist/catalog/primitives/display.d.ts +7 -7
  30. package/dist/catalog/primitives/display.js +3 -3
  31. package/dist/catalog/primitives/form.d.ts +1 -1
  32. package/dist/catalog/primitives/form.js +1 -1
  33. package/dist/catalog/primitives/index.d.ts +14 -14
  34. package/dist/catalog/primitives/index.js +9 -9
  35. package/dist/catalog/primitives/layout.d.ts +1 -1
  36. package/dist/catalog/primitives/layout.js +1 -1
  37. package/dist/catalog/primitives/navigation.d.ts +4 -4
  38. package/dist/catalog/primitives/navigation.js +1 -1
  39. package/dist/catalog/primitives/overlay.d.ts +2 -2
  40. package/dist/catalog/primitives/overlay.js +1 -1
  41. package/dist/{chunk-3KEBY2I3.js → chunk-25QQEKGR.js} +6 -6
  42. package/dist/{chunk-XLN4NVKU.js → chunk-2BCMZV5U.js} +17 -10
  43. package/dist/{chunk-HXKCPTY3.js → chunk-2OEVKFZ2.js} +8 -8
  44. package/dist/{chunk-V4NBPGED.js → chunk-2UY4XZC6.js} +3 -1
  45. package/dist/{chunk-P3CGISJM.js → chunk-3MGQGQTS.js} +4 -0
  46. package/dist/{chunk-X5MMPEIL.js → chunk-4BG7ILL5.js} +35 -35
  47. package/dist/{chunk-OWWQP3YW.js → chunk-4DQMGKPG.js} +2 -2
  48. package/dist/{chunk-KUL5OOXZ.js → chunk-4NRASS74.js} +1 -1
  49. package/dist/{chunk-KOJ3X2F3.js → chunk-5HFOPRXI.js} +15 -12
  50. package/dist/{chunk-DSNPOAE6.js → chunk-5S34SGPQ.js} +7 -2
  51. package/dist/{chunk-BVXSAVKY.js → chunk-72EJ2TYY.js} +7 -10
  52. package/dist/{chunk-3BGWXRQC.js → chunk-7U55EQZD.js} +8 -11
  53. package/dist/{chunk-MPVYXUOD.js → chunk-A2IYJPTF.js} +3 -1
  54. package/dist/{chunk-PD6WW7E5.js → chunk-BRESMZ6G.js} +2 -5
  55. package/dist/{chunk-Q4CRHV5T.js → chunk-BVOJIX27.js} +55 -10
  56. package/dist/{chunk-PYRHNONA.js → chunk-CJDVIJEF.js} +6 -5
  57. package/dist/{chunk-FSU7ZM5V.js → chunk-CJT7SZNI.js} +8 -15
  58. package/dist/chunk-DORWHCRI.js +112 -0
  59. package/dist/{chunk-EJQ73FJ5.js → chunk-DW3XHDFX.js} +70 -15
  60. package/dist/{chunk-ZL6BPQNN.js → chunk-EKSXBDOA.js} +23 -11
  61. package/dist/{chunk-UCFR7GLW.js → chunk-EX5AIP2Q.js} +4 -4
  62. package/dist/chunk-F4BPNMAD.js +185 -0
  63. package/dist/{chunk-STNVWBJH.js → chunk-FGGGUS5L.js} +1 -1
  64. package/dist/{chunk-IZ7A62GI.js → chunk-GBKAQWME.js} +23 -23
  65. package/dist/{chunk-XYMFKNKG.js → chunk-GW7A5G4W.js} +26 -5
  66. package/dist/{chunk-PPVSKK77.js → chunk-HBVZYYTD.js} +40 -11
  67. package/dist/{chunk-P5I63ETD.js → chunk-HZ6WO2OD.js} +30 -3
  68. package/dist/{chunk-MOFWXBTK.js → chunk-IWFPYUHD.js} +1 -1
  69. package/dist/{chunk-CQ75K2DH.js → chunk-JA6QAEVX.js} +15 -13
  70. package/dist/{chunk-YEAJLVGB.js → chunk-JYDPEIAA.js} +31 -22
  71. package/dist/chunk-KEQFAIPJ.js +84 -0
  72. package/dist/{chunk-QCFDSOTV.js → chunk-KPRBRDSY.js} +6 -11
  73. package/dist/{chunk-W4KI424V.js → chunk-KRNAMBZZ.js} +5 -3
  74. package/dist/{chunk-WJ7TDY4S.js → chunk-KYLXPIFE.js} +19 -16
  75. package/dist/{chunk-B4373MDA.js → chunk-M4AK7ZXY.js} +8 -1
  76. package/dist/{chunk-KANK5FAG.js → chunk-M5MUMF7S.js} +15 -6
  77. package/dist/{chunk-WAIZR4CR.js → chunk-MIVKO3MG.js} +3 -2
  78. package/dist/{chunk-FX3GYS5O.js → chunk-N3WTIJIB.js} +19 -3
  79. package/dist/{chunk-H3KTAHJP.js → chunk-NPJN6OLX.js} +11 -20
  80. package/dist/{chunk-7AUNUDHM.js → chunk-NPNQGXA7.js} +47 -13
  81. package/dist/{chunk-QMDQVJ4P.js → chunk-OO2K4JUF.js} +24 -3
  82. package/dist/{chunk-3QMHVXSQ.js → chunk-OPX27RJE.js} +12 -2
  83. package/dist/{chunk-KKBTPNXT.js → chunk-QJ5ODJTH.js} +5 -1
  84. package/dist/{chunk-ZKA5X3E4.js → chunk-QLNATCF6.js} +5 -11
  85. package/dist/{chunk-ZU7MDRCI.js → chunk-RI4IK37T.js} +26 -11
  86. package/dist/{chunk-YMAEXGD2.js → chunk-RPUONGMF.js} +7 -2
  87. package/dist/{chunk-JZERLGVV.js → chunk-S4ZZ3SJU.js} +32 -22
  88. package/dist/{chunk-6NL36QN3.js → chunk-T3ASBCI3.js} +8 -2
  89. package/dist/{chunk-R4SBK6Y5.js → chunk-T3J7RZV6.js} +9 -19
  90. package/dist/{chunk-OS2BLQ2G.js → chunk-TYNILBCP.js} +7 -2
  91. package/dist/{chunk-V5RSV4ZV.js → chunk-VTIT5C7L.js} +17 -3
  92. package/dist/{chunk-33UWVOQ6.js → chunk-WS6PKHGX.js} +1 -1
  93. package/dist/chunk-X5BYH7WG.js +27 -0
  94. package/dist/{chunk-FUROL3RA.js → chunk-XMXH63A7.js} +1 -1
  95. package/dist/{chunk-XNTU2I2Y.js → chunk-XVV52J35.js} +13 -2
  96. package/dist/{chunk-OUXJUUCB.js → chunk-XZZVSBPC.js} +34 -3
  97. package/dist/{chunk-UMEBNHKR.js → chunk-YGB5BFFI.js} +4 -2
  98. package/dist/{chunk-6PEJEOX4.js → chunk-Z3NGVHHE.js} +1 -1
  99. package/dist/{chunk-J3CSDFH7.js → chunk-ZCYD22F2.js} +45 -5
  100. package/dist/components/blocks/AgentConversationBlock.d.ts +1 -1
  101. package/dist/components/blocks/AgentConversationBlock.js +107 -1
  102. package/dist/components/blocks/ApiKeysBlock.js +3 -1
  103. package/dist/components/blocks/AuthLayout.js +3 -2
  104. package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
  105. package/dist/components/blocks/CallToActionBlock.js +1 -2
  106. package/dist/components/blocks/ChartCollectionBlock.d.ts +1 -1
  107. package/dist/components/blocks/ChartCollectionBlock.js +2 -1
  108. package/dist/components/blocks/ChatLayout.d.ts +1 -1
  109. package/dist/components/blocks/ChatLayout.js +1 -2
  110. package/dist/components/blocks/CheckEmailBlock.js +2 -1
  111. package/dist/components/blocks/ContactBlock.js +2 -2
  112. package/dist/components/blocks/CreateBlock.js +2 -1
  113. package/dist/components/blocks/CrudListBlock.js +1 -1
  114. package/dist/components/blocks/DashboardBlock.js +2 -2
  115. package/dist/components/blocks/DataGridBlock.d.ts +2 -2
  116. package/dist/components/blocks/DataGridBlock.js +4 -2
  117. package/dist/components/blocks/DirectoryBlock.d.ts +1 -1
  118. package/dist/components/blocks/DirectoryBlock.js +1 -1
  119. package/dist/components/blocks/FAQBlock.d.ts +1 -1
  120. package/dist/components/blocks/FAQBlock.js +1 -1
  121. package/dist/components/blocks/FooterBlock.d.ts +1 -1
  122. package/dist/components/blocks/FooterBlock.js +1 -2
  123. package/dist/components/blocks/FormFieldBlock.d.ts +1 -1
  124. package/dist/components/blocks/FormFieldBlock.js +1 -1
  125. package/dist/components/blocks/GalleryBlock.d.ts +1 -1
  126. package/dist/components/blocks/GalleryBlock.js +1 -1
  127. package/dist/components/blocks/HeaderBlock.d.ts +1 -1
  128. package/dist/components/blocks/HeaderBlock.js +1 -2
  129. package/dist/components/blocks/HeroBlock.js +1 -2
  130. package/dist/components/blocks/IntegrationsBlock.js +1 -1
  131. package/dist/components/blocks/LoginBlock.js +2 -1
  132. package/dist/components/blocks/LogoCloud.js +2 -2
  133. package/dist/components/blocks/NewsletterBlock.js +2 -2
  134. package/dist/components/blocks/OnboardingFlowBlock.js +1 -1
  135. package/dist/components/blocks/PasswordRecoveryBlock.d.ts +3 -1
  136. package/dist/components/blocks/PasswordRecoveryBlock.js +2 -2
  137. package/dist/components/blocks/ResetPasswordBlock.js +1 -1
  138. package/dist/components/blocks/StatsMarketingBlock.js +1 -2
  139. package/dist/components/blocks/TestimonialsBlock.js +2 -2
  140. package/dist/components/blocks/TwoFactorSetupBlock.d.ts +3 -1
  141. package/dist/components/blocks/TwoFactorSetupBlock.js +1 -2
  142. package/dist/components/blocks/WizardBlock.js +1 -1
  143. package/dist/components/blocks/user/InviteUserModal.js +2 -1
  144. package/dist/components/ui/CheckoutForm.js +1 -1
  145. package/dist/components/ui/DataTable.d.ts +4 -2
  146. package/dist/components/ui/DataTable.js +1 -1
  147. package/dist/components/ui/NavUser.d.ts +1 -1
  148. package/dist/components/ui/NavUser.js +1 -1
  149. package/dist/components/ui/SettingsModal.d.ts +2 -1
  150. package/dist/components/ui/SettingsModal.js +1 -1
  151. package/dist/components/ui/WorkspaceSwitcherBlock.js +1 -1
  152. package/dist/lib/json-render/app.js +1 -1
  153. package/dist/lib/json-render/catalog.d.ts +114 -8
  154. package/dist/lib/json-render/catalog.js +11 -11
  155. package/dist/lib/json-render/registry.js +11 -11
  156. package/dist/lib/json-render/showcase-spec.js +1 -1
  157. package/dist/messages/en.js +1 -1
  158. package/dist/messages/it.js +1 -1
  159. package/dist/test/PublicSeedTestProvider.js +2 -2
  160. package/eslint-rules/nadicode/rules/__tests__/require-catalog-import.test.js +0 -5
  161. package/eslint-rules/nadicode/rules/require-catalog-import.js +0 -1
  162. package/package.json +1 -1
  163. package/dist/chunk-6OBT3A5O.js +0 -21
  164. package/dist/chunk-NDQO7AO6.js +0 -105
  165. package/dist/chunk-TTDKPZ75.js +0 -45
  166. package/dist/chunk-YB3J4ZRZ.js +0 -180
@@ -95,6 +95,6 @@ BRAND_LOGO_TEMPLATES.slice(0, 8).map((template, index) => ({
95
95
  alt: `${template.label} Logo`,
96
96
  height: String([20, 16, 16, 20, 20, 16, 28, 24][index])
97
97
  }));
98
- var LOCAL_NIKE_LOGO_SRC = createLogoDataUri(BRAND_LOGO_TEMPLATES[3]);
98
+ createLogoDataUri(BRAND_LOGO_TEMPLATES[3]);
99
99
 
100
- export { LOCAL_CLOUD_LOGOS, LOCAL_NIKE_LOGO_SRC, createAvatarDataUri };
100
+ export { LOCAL_CLOUD_LOGOS, createAvatarDataUri };
@@ -1,4 +1,4 @@
1
- import { seedComponentDefinitions } from './chunk-6PEJEOX4.js';
1
+ import { seedComponentDefinitions } from './chunk-Z3NGVHHE.js';
2
2
  import { defineCatalog } from '@json-render/core';
3
3
  import { schema } from '@json-render/next/server';
4
4
  import { z } from 'zod';
@@ -40,7 +40,7 @@ var ROUTE_TREES = {
40
40
  root: "shell",
41
41
  elements: {
42
42
  shell: { type: "PageShell", props: { className: null }, children: ["header", "changelog", "footer"] },
43
- header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null, loginHref: null, signUpHref: null } },
43
+ header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null } },
44
44
  changelog: {
45
45
  type: "ChangelogBlock",
46
46
  props: {
@@ -50,31 +50,31 @@ var ROUTE_TREES = {
50
50
  entries: null
51
51
  }
52
52
  },
53
- footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
53
+ footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, email: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
54
54
  }
55
55
  },
56
56
  "/landing": {
57
57
  root: "shell",
58
58
  elements: {
59
59
  shell: { type: "PageShell", props: { className: null }, children: ["header", "hero", "logoCloud", "features", "stats", "pricing", "testimonials", "cta", "faq", "newsletter", "footer"] },
60
- header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null, loginHref: null, signUpHref: null } },
60
+ header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null } },
61
61
  hero: { type: "HeroBlock", props: { variant: null, headline: null, subheadline: null, primaryAction: null, secondaryAction: null, announcement: null }, on: { primaryAction: { action: "noop" }, secondaryAction: { action: "noop" } } },
62
62
  logoCloud: { type: "LogoCloud", props: { title: null, logos: null, className: null } },
63
63
  features: { type: "FeatureBlock", props: { variant: null, badge: null, title: null, description: null, features: null } },
64
64
  stats: { type: "StatsMarketingBlock", props: { title: null, description: null, stats: null } },
65
65
  pricing: { type: "PricingBlock", props: { title: null, description: null, showBillingToggle: null, selectedPlanName: null, isYearly: null, plans: null }, on: { selectPlan: { action: "noop" } } },
66
- testimonials: { type: "TestimonialsBlock", props: { title: null, description: null, testimonials: null } },
66
+ testimonials: { type: "TestimonialsBlock", props: { title: null, description: null, featuredCompanyLogo: null, testimonials: null } },
67
67
  cta: { type: "CallToActionBlock", props: { title: null, description: null, primaryAction: null, secondaryAction: null } },
68
- faq: { type: "FAQBlock", props: { title: null, description: null, items: null }, on: { expand: { action: "noop" } } },
69
- newsletter: { type: "NewsletterBlock", props: { title: null, description: null, email: null }, on: { subscribe: { action: "noop" } } },
70
- footer: { type: "FooterBlock", props: { brandDescription: null, brandName: null, socialLinks: null, newsletterPlaceholder: null, productLinks: null, companyLinks: null, legalLinks: null } }
68
+ faq: { type: "FAQBlock", props: { title: null, description: null, items: null, selectedQuestion: null }, on: { expand: { action: "noop" } } },
69
+ newsletter: { type: "NewsletterBlock", props: { title: null, description: null, email: null, state: null, error: null }, on: { subscribe: { action: "noop" } } },
70
+ footer: { type: "FooterBlock", props: { brandDescription: null, brandName: null, socialLinks: null, newsletterPlaceholder: null, email: null, productLinks: null, companyLinks: null, legalLinks: null } }
71
71
  }
72
72
  },
73
73
  "/pricing": {
74
74
  root: "shell",
75
75
  elements: {
76
76
  shell: { type: "PageShell", props: { className: null }, children: ["header", "pricing", "comparison", "faq", "footer"] },
77
- header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null, loginHref: null, signUpHref: null } },
77
+ header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null } },
78
78
  pricing: {
79
79
  type: "PricingBlock",
80
80
  props: {
@@ -100,6 +100,7 @@ var ROUTE_TREES = {
100
100
  props: {
101
101
  title: "Pricing FAQ",
102
102
  description: null,
103
+ selectedQuestion: null,
103
104
  items: [
104
105
  { question: "Can I switch plans later?", answer: "Yes, you can upgrade or downgrade at any time. When upgrading, you\u2019ll be charged the prorated difference. Downgrades take effect at the end of your billing cycle." },
105
106
  { question: "Do you offer refunds?", answer: "We offer a 14-day money-back guarantee on all paid plans. If you\u2019re not satisfied, contact support for a full refund." },
@@ -109,14 +110,14 @@ var ROUTE_TREES = {
109
110
  },
110
111
  on: { expand: { action: "noop" } }
111
112
  },
112
- footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
113
+ footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, email: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
113
114
  }
114
115
  },
115
116
  "/blog/example": {
116
117
  root: "shell",
117
118
  elements: {
118
119
  shell: { type: "PageShell", props: { className: null }, children: ["header", "blog", "newsletter", "footer"] },
119
- header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null, loginHref: null, signUpHref: null } },
120
+ header: { type: "HeaderBlock", props: { menuItems: null, loginLabel: null, signUpLabel: null } },
120
121
  blog: {
121
122
  type: "BlogDetailBlock",
122
123
  on: { backToIndex: { action: "noop" } },
@@ -155,11 +156,13 @@ var ROUTE_TREES = {
155
156
  props: {
156
157
  title: "Enjoyed this article?",
157
158
  description: "Get more design system insights delivered to your inbox.",
158
- email: null
159
+ email: null,
160
+ state: null,
161
+ error: null
159
162
  },
160
163
  on: { subscribe: { action: "noop" } }
161
164
  },
162
- footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
165
+ footer: { type: "FooterBlock", props: { brandName: null, brandDescription: null, newsletterPlaceholder: null, email: null, productLinks: null, companyLinks: null, legalLinks: null, socialLinks: null } }
163
166
  }
164
167
  },
165
168
  "/onboarding": {
@@ -2,6 +2,7 @@ import { Typography } from './chunk-Q7PCHHVJ.js';
2
2
  import { Heading } from './chunk-UXX6HHPS.js';
3
3
  import { ScrollFadeIn } from './chunk-I23DDSU7.js';
4
4
  import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './chunk-W4YX7N46.js';
5
+ import { useBoundProp } from '@json-render/react';
5
6
  import { jsx, jsxs } from 'react/jsx-runtime';
6
7
 
7
8
  var defaultItems = [
@@ -22,16 +23,20 @@ var defaultItems = [
22
23
  answer: "Community support is available on GitHub Discussions. Pro and Enterprise plans include priority email and dedicated Slack channels."
23
24
  }
24
25
  ];
25
- function FAQBlock({ props, emit }) {
26
+ function FAQBlock({ props, emit, bindings }) {
26
27
  const items = props.items ?? defaultItems;
27
28
  const title = props.title ?? "Frequently asked questions";
28
29
  const description = props.description;
30
+ const [, setBoundQuestion] = useBoundProp(void 0, bindings?.selectedQuestion);
29
31
  return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl px-6", children: [
30
32
  /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "mb-12 text-center", children: [
31
33
  /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-text-primary", children: title }),
32
34
  !!description && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-4 text-text-secondary", children: description })
33
35
  ] }) }),
34
- /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "w-full", onValueChange: () => emit("expand"), children: items.map((item, index) => /* @__PURE__ */ jsx(ScrollFadeIn, { delay: index * 0.05, children: /* @__PURE__ */ jsxs(AccordionItem, { value: `faq-${index}`, children: [
36
+ /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "w-full", onValueChange: (value) => {
37
+ setBoundQuestion(value);
38
+ emit("expand");
39
+ }, children: items.map((item, index) => /* @__PURE__ */ jsx(ScrollFadeIn, { delay: index * 0.05, children: /* @__PURE__ */ jsxs(AccordionItem, { value: `faq-${index}`, children: [
35
40
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "text-left text-base font-medium text-text-primary", children: item.question }),
36
41
  /* @__PURE__ */ jsx(AccordionContent, { className: "text-text-secondary leading-relaxed", children: item.answer })
37
42
  ] }) }, index)) })
@@ -5,8 +5,8 @@ import { Button } from './chunk-7KIDDF3I.js';
5
5
  import { m, fadeInUp } from './chunk-PD2YEH3H.js';
6
6
  import { MailIcon } from './chunk-XQ2UDMPO.js';
7
7
  import { Badge } from './chunk-S4JAHKOP.js';
8
+ import { Alert, AlertDescription } from './chunk-6CLSVCWP.js';
8
9
  import { cn } from './chunk-QYZT24TS.js';
9
- import * as React from 'react';
10
10
  import { jsx, jsxs } from 'react/jsx-runtime';
11
11
 
12
12
  var titleMap = {
@@ -21,14 +21,10 @@ var descMap = {
21
21
  };
22
22
  function CheckEmailBlock({ props, emit }) {
23
23
  const type = props.type ?? "verification";
24
- const [resendState, setResendState] = React.useState("idle");
24
+ const state = props.state ?? "idle";
25
+ const error = props.error ?? null;
25
26
  const handleResend = () => {
26
- setResendState("sending");
27
27
  emit("resend");
28
- setTimeout(() => {
29
- setResendState("sent");
30
- setTimeout(() => setResendState("idle"), 3e3);
31
- }, 1e3);
32
28
  };
33
29
  return /* @__PURE__ */ jsx(m.div, { ...fadeInUp, className: cn("w-full max-w-md mx-auto"), children: /* @__PURE__ */ jsxs(Card, { children: [
34
30
  /* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
@@ -47,6 +43,7 @@ function CheckEmailBlock({ props, emit }) {
47
43
  /* @__PURE__ */ jsx("span", { children: step })
48
44
  ] }, i)) }),
49
45
  /* @__PURE__ */ jsx(Separator, {}),
46
+ !!error && /* @__PURE__ */ jsx(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }),
50
47
  /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
51
48
  /* @__PURE__ */ jsxs("p", { className: "text-sm text-text-tertiary", children: [
52
49
  "Didn",
@@ -59,10 +56,10 @@ function CheckEmailBlock({ props, emit }) {
59
56
  variant: "outline",
60
57
  size: "sm",
61
58
  onClick: handleResend,
62
- disabled: resendState === "sending",
59
+ disabled: state === "loading",
63
60
  children: [
64
- resendState === "sending" && /* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
65
- resendState === "sent" ? "Email resent!" : "Resend email"
61
+ state === "loading" && /* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
62
+ state === "sent" ? "Email resent!" : "Resend email"
66
63
  ]
67
64
  }
68
65
  )
@@ -1,17 +1,14 @@
1
1
  import { ShimmeringText } from './chunk-SGI25ZJ6.js';
2
2
  import { StaggerChildren } from './chunk-DQPK2XRL.js';
3
3
  import { Heading } from './chunk-UXX6HHPS.js';
4
- import { siteConfig } from './chunk-A7NUWD76.js';
5
4
  import { Button } from './chunk-7KIDDF3I.js';
6
- import Link from 'next/link';
7
5
  import { jsx, jsxs } from 'react/jsx-runtime';
8
6
 
9
- var defaultDescription = `Join thousands of developers building premium interfaces with ${siteConfig.name}.`;
10
- var defaultPrimaryAction = { label: "Get Started", href: "#" };
11
- var defaultSecondaryAction = { label: "Book Demo", href: "#" };
12
- function CallToActionBlock({ props }) {
7
+ var defaultPrimaryAction = { label: "Get Started"};
8
+ var defaultSecondaryAction = { label: "Book Demo"};
9
+ function CallToActionBlock({ props, emit }) {
13
10
  const title = props.title ?? "Start Building";
14
- const description = props.description ?? defaultDescription;
11
+ const description = props.description ?? "Join thousands of developers building premium interfaces.";
15
12
  const primaryAction = props.primaryAction ?? defaultPrimaryAction;
16
13
  const secondaryAction = props.secondaryAction ?? defaultSecondaryAction;
17
14
  return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24", children: /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-5xl px-6", children: /* @__PURE__ */ jsxs(StaggerChildren, { staggerMs: 100, className: "text-center", children: [
@@ -29,18 +26,18 @@ function CallToActionBlock({ props }) {
29
26
  /* @__PURE__ */ jsx(
30
27
  Button,
31
28
  {
32
- asChild: true,
33
29
  size: "lg",
34
- children: /* @__PURE__ */ jsx(Link, { href: primaryAction.href, children: /* @__PURE__ */ jsx("span", { children: primaryAction.label }) })
30
+ onClick: () => emit("primaryAction"),
31
+ children: /* @__PURE__ */ jsx("span", { children: primaryAction.label })
35
32
  }
36
33
  ),
37
34
  /* @__PURE__ */ jsx(
38
35
  Button,
39
36
  {
40
- asChild: true,
41
37
  size: "lg",
42
38
  variant: "outline",
43
- children: /* @__PURE__ */ jsx(Link, { href: secondaryAction.href, children: /* @__PURE__ */ jsx("span", { children: secondaryAction.label }) })
39
+ onClick: () => emit("secondaryAction"),
40
+ children: /* @__PURE__ */ jsx("span", { children: secondaryAction.label })
44
41
  }
45
42
  )
46
43
  ] })
@@ -160,7 +160,9 @@ var seedMessagesIt = {
160
160
  "agentTeam": "Team agente"
161
161
  },
162
162
  "agentConversationBlock": {
163
- "noMessages": "Nessun messaggio"
163
+ "noMessages": "Nessun messaggio",
164
+ "inputPlaceholder": "Scrivi un messaggio...",
165
+ "sendMessage": "Invia messaggio"
164
166
  },
165
167
  "agentStatus": {
166
168
  "idle": "Inattivo",
@@ -1,7 +1,6 @@
1
1
  import { CountingNumber } from './chunk-F3T2U7YL.js';
2
2
  import { StaggerChildren } from './chunk-DQPK2XRL.js';
3
3
  import { Heading } from './chunk-UXX6HHPS.js';
4
- import { siteConfig } from './chunk-A7NUWD76.js';
5
4
  import { jsx, jsxs } from 'react/jsx-runtime';
6
5
 
7
6
  var defaultStats = [
@@ -9,11 +8,9 @@ var defaultStats = [
9
8
  { value: 22, label: "Active Users", suffix: " Million", prefix: null },
10
9
  { value: 500, label: "Powered Apps", prefix: "+", suffix: null }
11
10
  ];
12
- var defaultTitle = `${siteConfig.name} in numbers`;
13
- var defaultDescription = `The numbers speak for themselves. ${siteConfig.name} powers the next generation of AI interfaces with premium design tokens, glass effects, and accessible components.`;
14
11
  function StatsMarketingBlock({ props }) {
15
- const title = props.title ?? defaultTitle;
16
- const description = props.description ?? defaultDescription;
12
+ const title = props.title ?? "Your Platform in numbers";
13
+ const description = props.description ?? "The numbers speak for themselves. Premium design tokens, glass effects, and accessible components powering the next generation of interfaces.";
17
14
  const stats = props.stats ?? defaultStats;
18
15
  return /* @__PURE__ */ jsx("section", { className: "py-12 md:py-16", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl space-y-8 px-6 md:space-y-16", children: [
19
16
  /* @__PURE__ */ jsxs("div", { className: "relative z-10 mx-auto max-w-xl space-y-6 text-center", children: [
@@ -1,6 +1,5 @@
1
1
  import { StaggerChildren } from './chunk-DQPK2XRL.js';
2
2
  import { Heading } from './chunk-UXX6HHPS.js';
3
- import { siteConfig } from './chunk-A7NUWD76.js';
4
3
  import { Separator } from './chunk-CUZJIDU7.js';
5
4
  import { Input } from './chunk-AP3XXYAY.js';
6
5
  import { ScrollFadeIn } from './chunk-I23DDSU7.js';
@@ -8,8 +7,10 @@ import { Button } from './chunk-7KIDDF3I.js';
8
7
  import { TwitterIcon } from './chunk-LCDDAE7J.js';
9
8
  import { LinkedinIcon } from './chunk-2IZC7HSV.js';
10
9
  import { GithubIcon } from './chunk-WGPK3FQ7.js';
10
+ import { useState } from 'react';
11
11
  import { useTranslations } from 'next-intl';
12
12
  import Link from 'next/link';
13
+ import { useBoundProp } from '@json-render/react';
13
14
  import { jsx, jsxs } from 'react/jsx-runtime';
14
15
 
15
16
  var CURRENT_YEAR = (/* @__PURE__ */ new Date()).getFullYear();
@@ -18,19 +19,41 @@ var SOCIAL_ICON_MAP = {
18
19
  github: { icon: /* @__PURE__ */ jsx(GithubIcon, { size: 16 }), label: "GitHub" },
19
20
  linkedin: { icon: /* @__PURE__ */ jsx(LinkedinIcon, { size: 16 }), label: "LinkedIn" }
20
21
  };
22
+ var defaultProductLinks = [
23
+ { name: "Components", href: "#" },
24
+ { name: "Blocks", href: "#" },
25
+ { name: "Themes", href: "#" },
26
+ { name: "Showcase", href: "#" }
27
+ ];
28
+ var defaultCompanyLinks = [
29
+ { name: "About", href: "#" },
30
+ { name: "Blog", href: "#" },
31
+ { name: "Careers", href: "#" },
32
+ { name: "Contact", href: "#" }
33
+ ];
34
+ var defaultLegalLinks = [
35
+ { name: "Privacy", href: "#" },
36
+ { name: "Terms", href: "#" },
37
+ { name: "License", href: "#" }
38
+ ];
21
39
  var defaultSocialLinks = [
22
40
  { platform: "twitter", href: "#" },
23
41
  { platform: "github", href: "#" },
24
42
  { platform: "linkedin", href: "#" }
25
43
  ];
26
- function FooterBlock({ props }) {
27
- const brandName = props.brandName ?? siteConfig.name;
44
+ function FooterBlock({ props, bindings, emit }) {
45
+ const brandName = props.brandName ?? "Your Brand";
28
46
  const brandDescription = props.brandDescription ?? "The ultimate design system for building futuristic, high-contrast AI interfaces.";
29
47
  const newsletterPlaceholder = props.newsletterPlaceholder ?? "Enter your email";
30
- const productLinks = props.productLinks ?? siteConfig.nav.footer.product;
31
- const companyLinks = props.companyLinks ?? siteConfig.nav.footer.company;
32
- const legalLinks = props.legalLinks ?? siteConfig.nav.footer.legal;
48
+ const productLinks = props.productLinks ?? defaultProductLinks;
49
+ const companyLinks = props.companyLinks ?? defaultCompanyLinks;
50
+ const legalLinks = props.legalLinks ?? defaultLegalLinks;
33
51
  const socialLinks = props.socialLinks ?? defaultSocialLinks;
52
+ const [boundEmail, setBoundEmail] = useBoundProp(props.email, bindings?.email);
53
+ const [localEmail, setLocalEmail] = useState("");
54
+ const isEmailBound = !!bindings?.email;
55
+ const newsletterEmail = isEmailBound ? boundEmail ?? "" : localEmail;
56
+ const setNewsletterEmail = isEmailBound ? setBoundEmail : setLocalEmail;
34
57
  const t = useTranslations("blocks.footerBlock");
35
58
  return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("footer", { className: "bg-background py-12 lg:py-16 border-t border-border/50", children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-6 lg:px-8", children: [
36
59
  /* @__PURE__ */ jsxs("div", { className: "grid gap-12 lg:grid-cols-4", children: [
@@ -40,10 +63,32 @@ function FooterBlock({ props }) {
40
63
  /* @__PURE__ */ jsx("span", { className: "text-xl font-semibold text-text-primary", children: brandName })
41
64
  ] }),
42
65
  /* @__PURE__ */ jsx("p", { className: "max-w-xs text-text-secondary", children: brandDescription }),
43
- /* @__PURE__ */ jsxs("div", { className: "flex max-w-sm flex-col gap-2 sm:flex-row", children: [
44
- /* @__PURE__ */ jsx(Input, { placeholder: newsletterPlaceholder, type: "email", className: "bg-surface/50 border-border/50" }),
45
- /* @__PURE__ */ jsx(Button, { variant: "primary", children: t("subscribe") })
46
- ] })
66
+ /* @__PURE__ */ jsxs(
67
+ "form",
68
+ {
69
+ onSubmit: (e) => {
70
+ e.preventDefault();
71
+ if (!newsletterEmail.trim()) return;
72
+ emit("subscribe");
73
+ },
74
+ className: "flex max-w-sm flex-col gap-2 sm:flex-row",
75
+ children: [
76
+ /* @__PURE__ */ jsx(
77
+ Input,
78
+ {
79
+ name: "email",
80
+ placeholder: newsletterPlaceholder,
81
+ type: "email",
82
+ value: newsletterEmail,
83
+ onChange: (e) => setNewsletterEmail(e.target.value),
84
+ required: true,
85
+ className: "bg-surface/50 border-border/50"
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", children: t("subscribe") })
89
+ ]
90
+ }
91
+ )
47
92
  ] }),
48
93
  /* @__PURE__ */ jsxs(StaggerChildren, { staggerMs: 60, className: "grid grid-cols-2 gap-8 lg:col-span-2 sm:grid-cols-3", children: [
49
94
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
@@ -1,4 +1,4 @@
1
- import { createAvatarDataUri, LOCAL_NIKE_LOGO_SRC } from './chunk-OWWQP3YW.js';
1
+ import { createAvatarDataUri } from './chunk-4DQMGKPG.js';
2
2
  import { Shine } from './chunk-DARC2ACH.js';
3
3
  import { ShimmeringText } from './chunk-SGI25ZJ6.js';
4
4
  import { StaggerChildren } from './chunk-DQPK2XRL.js';
@@ -42,6 +42,7 @@ function TestimonialsBlock({ props }) {
42
42
  const title = props.title ?? "Build by makers, loved by thousand developers";
43
43
  const description = props.description ?? "Gemini is evolving to be more than just the models. It supports an entire to the APIs and platforms helping developers and businesses innovate.";
44
44
  const testimonials = props.testimonials ?? defaultTestimonials;
45
+ const featuredCompanyLogo = props.featuredCompanyLogo ?? null;
45
46
  const featured = React.useMemo(() => testimonials.find((t) => t.featured) ?? testimonials[0], [testimonials]);
46
47
  const rest = React.useMemo(() => testimonials.filter((t) => t !== featured), [testimonials, featured]);
47
48
  return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-32", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-6xl space-y-8 px-6 md:space-y-16", children: [
@@ -59,16 +60,16 @@ function TestimonialsBlock({ props }) {
59
60
  ] }),
60
61
  /* @__PURE__ */ jsxs(StaggerChildren, { staggerMs: 80, direction: "up", distance: 16, className: "grid gap-4 sm:grid-cols-2 md:grid-cols-4 lg:grid-rows-2", children: [
61
62
  !!featured && /* @__PURE__ */ jsx(Shine, { enableOnHover: true, loop: true, loopDelay: 200, color: "var(--color-accent)", opacity: 0.12, className: "sm:col-span-2 lg:row-span-2", children: /* @__PURE__ */ jsxs(Card, { className: "grid grid-rows-[auto_1fr] gap-8 h-full sm:p-6", children: [
62
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(
63
+ featuredCompanyLogo ? /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(
63
64
  "img",
64
65
  {
65
66
  className: "h-6 w-fit dark:invert",
66
- src: LOCAL_NIKE_LOGO_SRC,
67
- alt: "Nike Logo",
67
+ src: featuredCompanyLogo,
68
+ alt: "Company Logo",
68
69
  height: "24",
69
70
  width: "auto"
70
71
  }
71
- ) }),
72
+ ) }) : null,
72
73
  /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("blockquote", { className: "grid h-full grid-rows-[1fr_auto] gap-6", children: [
73
74
  /* @__PURE__ */ jsx("p", { className: "text-xl font-medium", children: featured.quote }),
74
75
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[auto_1fr] items-center gap-4", children: [
@@ -3,10 +3,10 @@ import { Typography } from './chunk-Q7PCHHVJ.js';
3
3
  import { Spinner } from './chunk-ZLSWCV55.js';
4
4
  import { Heading } from './chunk-UXX6HHPS.js';
5
5
  import { Input } from './chunk-AP3XXYAY.js';
6
- import { useSafeTimeout } from './chunk-MDAYDDTC.js';
7
6
  import { ScrollFadeIn } from './chunk-I23DDSU7.js';
8
7
  import { Button } from './chunk-7KIDDF3I.js';
9
8
  import { CheckIcon } from './chunk-CXACRCZ4.js';
9
+ import { Alert, AlertDescription } from './chunk-6CLSVCWP.js';
10
10
  import { cn } from './chunk-QYZT24TS.js';
11
11
  import { useState } from 'react';
12
12
  import { useBoundProp } from '@json-render/react';
@@ -15,30 +15,22 @@ import { jsx, jsxs } from 'react/jsx-runtime';
15
15
  function NewsletterBlock({ props, bindings, emit }) {
16
16
  const title = props.title ?? "Stay in the loop";
17
17
  const description = props.description ?? "Get notified about new components, updates, and design system tips. No spam.";
18
+ const state = props.state ?? "idle";
19
+ const error = props.error ?? null;
18
20
  const [boundEmail, setBoundEmail] = useBoundProp(props.email, bindings?.email);
19
21
  const [localEmail, setLocalEmail] = useState("");
20
22
  const isEmailBound = !!bindings?.email;
21
23
  const email = isEmailBound ? boundEmail ?? "" : localEmail;
22
24
  const setEmail = isEmailBound ? setBoundEmail : setLocalEmail;
23
- const [status, setStatus] = useState("idle");
24
- const setSafeTimeout = useSafeTimeout();
25
- const handleSubmit = async (e) => {
25
+ const handleSubmit = (e) => {
26
26
  e.preventDefault();
27
27
  if (!email.trim()) return;
28
- setStatus("loading");
29
28
  emit("subscribe");
30
- setSafeTimeout(() => {
31
- setStatus("success");
32
- setSafeTimeout(() => {
33
- setStatus("idle");
34
- setEmail("");
35
- }, 3e3);
36
- }, 600);
37
29
  };
38
30
  return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24"), children: /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-xl px-6", children: /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx(Shine, { enableOnHover: true, loop: true, loopDelay: 300, color: "var(--color-accent)", opacity: 0.1, children: /* @__PURE__ */ jsxs("div", { className: "glass-panel rounded-2xl border border-border/50 p-8 text-center sm:p-12", children: [
39
31
  /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-text-primary", children: title }),
40
32
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-4 text-text-secondary", children: description }),
41
- status === "success" ? /* @__PURE__ */ jsxs("div", { className: "mt-8 flex items-center justify-center gap-2 text-success", children: [
33
+ state === "success" ? /* @__PURE__ */ jsxs("div", { className: "mt-8 flex items-center justify-center gap-2 text-success", children: [
42
34
  /* @__PURE__ */ jsx(CheckIcon, { size: 20 }),
43
35
  /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium", children: [
44
36
  "You",
@@ -68,14 +60,15 @@ function NewsletterBlock({ props, bindings, emit }) {
68
60
  {
69
61
  type: "submit",
70
62
  variant: "accent",
71
- disabled: status === "loading",
63
+ disabled: state === "loading",
72
64
  className: "shrink-0",
73
- children: status === "loading" ? /* @__PURE__ */ jsx(Spinner, { className: "h-4 w-4" }) : "Subscribe"
65
+ children: state === "loading" ? /* @__PURE__ */ jsx(Spinner, { className: "h-4 w-4" }) : "Subscribe"
74
66
  }
75
67
  )
76
68
  ]
77
69
  }
78
70
  ),
71
+ !!error && /* @__PURE__ */ jsx(Alert, { variant: "destructive", className: "mt-4", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }),
79
72
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-4 text-text-tertiary", children: "Unsubscribe anytime. We respect your inbox." })
80
73
  ] }) }) }) }) });
81
74
  }
@@ -0,0 +1,112 @@
1
+ import { Textarea } from './chunk-4OBE2FS2.js';
2
+ import { StaggerChildren } from './chunk-DQPK2XRL.js';
3
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-WH62BE24.js';
4
+ import { Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage } from './chunk-UN2SJ42K.js';
5
+ import { Input } from './chunk-AP3XXYAY.js';
6
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './chunk-7UY24UWL.js';
7
+ import { Button } from './chunk-7KIDDF3I.js';
8
+ import { Alert, AlertDescription } from './chunk-6CLSVCWP.js';
9
+ import { zodResolver } from '@hookform/resolvers/zod';
10
+ import { useForm } from 'react-hook-form';
11
+ import { z } from 'zod';
12
+ import { useBoundProp } from '@json-render/react';
13
+ import { jsxs, jsx } from 'react/jsx-runtime';
14
+
15
+ var profileFormSchema = z.object({
16
+ username: z.string().min(2, {
17
+ message: "Username must be at least 2 characters."
18
+ }).max(30, {
19
+ message: "Username must not be longer than 30 characters."
20
+ }),
21
+ email: z.string({
22
+ error: "Please select an email to display."
23
+ }).email(),
24
+ bio: z.string().max(160).min(4)
25
+ });
26
+ var defaultFormValues = {
27
+ bio: "I own a computer."
28
+ };
29
+ var DEFAULT_EMAIL_OPTIONS = [
30
+ { value: "user@example.com", label: "user@example.com" }
31
+ ];
32
+ function CreateBlock({ props, emit, bindings }) {
33
+ const title = props.title ?? "Create Profile";
34
+ const description = props.description ?? "Example of a complex form with Zod validation.";
35
+ const submitLabel = props.submitLabel ?? "Update profile";
36
+ const state = props.state ?? "idle";
37
+ const error = props.error ?? null;
38
+ const emailOptions = props.emailOptions ?? DEFAULT_EMAIL_OPTIONS;
39
+ const [, setBoundUsername] = useBoundProp(props.username, bindings?.username);
40
+ const [, setBoundEmail] = useBoundProp(props.email, bindings?.email);
41
+ const [, setBoundBio] = useBoundProp(props.bio, bindings?.bio);
42
+ const form = useForm({
43
+ resolver: zodResolver(profileFormSchema),
44
+ defaultValues: {
45
+ ...defaultFormValues,
46
+ ...props.username ? { username: props.username } : {},
47
+ ...props.email ? { email: props.email } : {},
48
+ ...props.bio ? { bio: props.bio } : {}
49
+ },
50
+ mode: "onChange"
51
+ });
52
+ function handleSubmit(data) {
53
+ setBoundUsername(data.username);
54
+ setBoundEmail(data.email);
55
+ setBoundBio(data.bio);
56
+ emit("submit");
57
+ }
58
+ return /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-2xl mx-auto", children: [
59
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
60
+ /* @__PURE__ */ jsx(CardTitle, { children: title }),
61
+ /* @__PURE__ */ jsx(CardDescription, { children: description })
62
+ ] }),
63
+ /* @__PURE__ */ jsxs(CardContent, { children: [
64
+ !!error && /* @__PURE__ */ jsx(Alert, { variant: "destructive", className: "mb-4", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }),
65
+ /* @__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: [
66
+ /* @__PURE__ */ jsx(
67
+ FormField,
68
+ {
69
+ control: form.control,
70
+ name: "username",
71
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
72
+ /* @__PURE__ */ jsx(FormLabel, { children: "Username" }),
73
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { placeholder: "shadcn", ...field }) }),
74
+ /* @__PURE__ */ jsx(FormDescription, { children: "Public display name." }),
75
+ /* @__PURE__ */ jsx(FormMessage, {})
76
+ ] })
77
+ }
78
+ ),
79
+ /* @__PURE__ */ jsx(
80
+ FormField,
81
+ {
82
+ control: form.control,
83
+ name: "email",
84
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
85
+ /* @__PURE__ */ jsx(FormLabel, { children: "Email" }),
86
+ /* @__PURE__ */ jsxs(Select, { onValueChange: field.onChange, defaultValue: field.value, children: [
87
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select email" }) }) }),
88
+ /* @__PURE__ */ jsx(SelectContent, { children: emailOptions.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
89
+ ] }),
90
+ /* @__PURE__ */ jsx(FormMessage, {})
91
+ ] })
92
+ }
93
+ ),
94
+ /* @__PURE__ */ jsx(
95
+ FormField,
96
+ {
97
+ control: form.control,
98
+ name: "bio",
99
+ render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
100
+ /* @__PURE__ */ jsx(FormLabel, { children: "Bio" }),
101
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Textarea, { placeholder: "Bio...", ...field }) }),
102
+ /* @__PURE__ */ jsx(FormMessage, {})
103
+ ] })
104
+ }
105
+ ),
106
+ /* @__PURE__ */ jsx(Button, { type: "submit", disabled: state === "submitting", children: state === "submitting" ? "Submitting..." : submitLabel })
107
+ ] }) }) })
108
+ ] })
109
+ ] });
110
+ }
111
+
112
+ export { CreateBlock };