create-huenei-frontend 0.1.2

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 (222) hide show
  1. package/bin/create-huenei-frontend.js +2 -0
  2. package/dist/index.js +99 -0
  3. package/dist/templates/clean/.cursor/skills/architecture/SKILL.md +26 -0
  4. package/dist/templates/clean/.cursor/skills/components-shadcn/SKILL.md +23 -0
  5. package/dist/templates/clean/.cursor/skills/daisyui/SKILL.md +98 -0
  6. package/dist/templates/clean/.cursor/skills/routing/SKILL.md +32 -0
  7. package/dist/templates/clean/.cursor/skills/testing/SKILL.md +55 -0
  8. package/dist/templates/clean/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
  9. package/dist/templates/clean/.cursor/skills/ui-and-styling/SKILL.md +32 -0
  10. package/dist/templates/clean/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
  11. package/dist/templates/clean/.prettierrc +6 -0
  12. package/dist/templates/clean/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
  13. package/dist/templates/clean/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
  14. package/dist/templates/clean/.vscode/extensions.json +7 -0
  15. package/dist/templates/clean/README.md +75 -0
  16. package/dist/templates/clean/components.json +22 -0
  17. package/dist/templates/clean/eslint.config.js +31 -0
  18. package/dist/templates/clean/index.html +13 -0
  19. package/dist/templates/clean/package.json +62 -0
  20. package/dist/templates/clean/pnpm-lock.yaml +4487 -0
  21. package/dist/templates/clean/pnpm-workspace.yaml +2 -0
  22. package/dist/templates/clean/src/assets/react.svg +1 -0
  23. package/dist/templates/clean/src/components/ui/badge.tsx +37 -0
  24. package/dist/templates/clean/src/components/ui/breadcrumb.tsx +106 -0
  25. package/dist/templates/clean/src/components/ui/button.tsx +58 -0
  26. package/dist/templates/clean/src/components/ui/card.tsx +72 -0
  27. package/dist/templates/clean/src/components/ui/form.tsx +165 -0
  28. package/dist/templates/clean/src/components/ui/input.tsx +22 -0
  29. package/dist/templates/clean/src/components/ui/label.tsx +24 -0
  30. package/dist/templates/clean/src/components/ui/password-input.tsx +41 -0
  31. package/dist/templates/clean/src/components/ui/separator.tsx +28 -0
  32. package/dist/templates/clean/src/components/ui/tabs.tsx +62 -0
  33. package/dist/templates/clean/src/components/ui/textarea.tsx +21 -0
  34. package/dist/templates/clean/src/index.css +104 -0
  35. package/dist/templates/clean/src/lib/queryClient.ts +11 -0
  36. package/dist/templates/clean/src/lib/utils.ts +6 -0
  37. package/dist/templates/clean/src/main.tsx +33 -0
  38. package/dist/templates/clean/src/routeTree.gen.ts +77 -0
  39. package/dist/templates/clean/src/router.tsx +13 -0
  40. package/dist/templates/clean/src/routes/__root.tsx +82 -0
  41. package/dist/templates/clean/src/routes/index.tsx +187 -0
  42. package/dist/templates/clean/src/routes/otra-ruta.tsx +319 -0
  43. package/dist/templates/clean/src/test/setup.ts +1 -0
  44. package/dist/templates/clean/tsconfig.app.json +34 -0
  45. package/dist/templates/clean/tsconfig.json +10 -0
  46. package/dist/templates/clean/tsconfig.node.json +26 -0
  47. package/dist/templates/clean/vite.config.ts +22 -0
  48. package/dist/templates/clean/vitest.config.ts +9 -0
  49. package/dist/templates/help/.cursor/skills/architecture/SKILL.md +26 -0
  50. package/dist/templates/help/.cursor/skills/components-shadcn/SKILL.md +23 -0
  51. package/dist/templates/help/.cursor/skills/daisyui/SKILL.md +98 -0
  52. package/dist/templates/help/.cursor/skills/routing/SKILL.md +32 -0
  53. package/dist/templates/help/.cursor/skills/testing/SKILL.md +55 -0
  54. package/dist/templates/help/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
  55. package/dist/templates/help/.cursor/skills/ui-and-styling/SKILL.md +32 -0
  56. package/dist/templates/help/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
  57. package/dist/templates/help/.prettierrc +6 -0
  58. package/dist/templates/help/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
  59. package/dist/templates/help/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
  60. package/dist/templates/help/.vscode/extensions.json +7 -0
  61. package/dist/templates/help/README.md +75 -0
  62. package/dist/templates/help/components.json +22 -0
  63. package/dist/templates/help/eslint.config.js +31 -0
  64. package/dist/templates/help/index.html +13 -0
  65. package/dist/templates/help/package.json +62 -0
  66. package/dist/templates/help/pnpm-lock.yaml +4487 -0
  67. package/dist/templates/help/pnpm-workspace.yaml +2 -0
  68. package/dist/templates/help/src/assets/react.svg +1 -0
  69. package/dist/templates/help/src/components/documentacion/entorno.tsx +99 -0
  70. package/dist/templates/help/src/components/documentacion/estructura.tsx +100 -0
  71. package/dist/templates/help/src/components/documentacion/figma-mcp.tsx +200 -0
  72. package/dist/templates/help/src/components/documentacion/inicio.tsx +69 -0
  73. package/dist/templates/help/src/components/documentacion/instalacion.tsx +72 -0
  74. package/dist/templates/help/src/components/documentacion/personalizacion.tsx +163 -0
  75. package/dist/templates/help/src/components/documentacion/rutas.tsx +138 -0
  76. package/dist/templates/help/src/components/documentacion/stack.tsx +401 -0
  77. package/dist/templates/help/src/components/ui/badge.tsx +37 -0
  78. package/dist/templates/help/src/components/ui/breadcrumb.tsx +106 -0
  79. package/dist/templates/help/src/components/ui/button.tsx +58 -0
  80. package/dist/templates/help/src/components/ui/card.tsx +72 -0
  81. package/dist/templates/help/src/components/ui/form.tsx +165 -0
  82. package/dist/templates/help/src/components/ui/input.tsx +22 -0
  83. package/dist/templates/help/src/components/ui/label.tsx +24 -0
  84. package/dist/templates/help/src/components/ui/password-input.tsx +41 -0
  85. package/dist/templates/help/src/components/ui/separator.tsx +28 -0
  86. package/dist/templates/help/src/components/ui/tabs.tsx +62 -0
  87. package/dist/templates/help/src/components/ui/textarea.tsx +21 -0
  88. package/dist/templates/help/src/data/proyectos.json +56 -0
  89. package/dist/templates/help/src/index.css +104 -0
  90. package/dist/templates/help/src/lib/queryClient.ts +11 -0
  91. package/dist/templates/help/src/lib/utils.ts +6 -0
  92. package/dist/templates/help/src/main.tsx +33 -0
  93. package/dist/templates/help/src/routeTree.gen.ts +241 -0
  94. package/dist/templates/help/src/router.tsx +13 -0
  95. package/dist/templates/help/src/routes/__root.tsx +92 -0
  96. package/dist/templates/help/src/routes/auth/iniciar-sesion.tsx +139 -0
  97. package/dist/templates/help/src/routes/auth/registro.tsx +205 -0
  98. package/dist/templates/help/src/routes/contacto.tsx +60 -0
  99. package/dist/templates/help/src/routes/dashbord.tsx +9 -0
  100. package/dist/templates/help/src/routes/documentacion.tsx +80 -0
  101. package/dist/templates/help/src/routes/index.test.tsx +42 -0
  102. package/dist/templates/help/src/routes/index.tsx +211 -0
  103. package/dist/templates/help/src/routes/perfil.tsx +9 -0
  104. package/dist/templates/help/src/routes/proyectos.$proyectoId.tsx +156 -0
  105. package/dist/templates/help/src/routes/proyectos.tsx +93 -0
  106. package/dist/templates/help/src/test/setup.ts +1 -0
  107. package/dist/templates/help/tsconfig.app.json +34 -0
  108. package/dist/templates/help/tsconfig.json +10 -0
  109. package/dist/templates/help/tsconfig.node.json +26 -0
  110. package/dist/templates/help/vite.config.ts +22 -0
  111. package/dist/templates/help/vitest.config.ts +9 -0
  112. package/dist/test-cli.js +48 -0
  113. package/package.json +25 -0
  114. package/templates/clean/.cursor/skills/architecture/SKILL.md +26 -0
  115. package/templates/clean/.cursor/skills/components-shadcn/SKILL.md +23 -0
  116. package/templates/clean/.cursor/skills/daisyui/SKILL.md +98 -0
  117. package/templates/clean/.cursor/skills/routing/SKILL.md +32 -0
  118. package/templates/clean/.cursor/skills/testing/SKILL.md +55 -0
  119. package/templates/clean/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
  120. package/templates/clean/.cursor/skills/ui-and-styling/SKILL.md +32 -0
  121. package/templates/clean/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
  122. package/templates/clean/.prettierrc +6 -0
  123. package/templates/clean/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
  124. package/templates/clean/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
  125. package/templates/clean/.vscode/extensions.json +7 -0
  126. package/templates/clean/README.md +75 -0
  127. package/templates/clean/components.json +22 -0
  128. package/templates/clean/eslint.config.js +31 -0
  129. package/templates/clean/index.html +13 -0
  130. package/templates/clean/package.json +62 -0
  131. package/templates/clean/pnpm-lock.yaml +4487 -0
  132. package/templates/clean/pnpm-workspace.yaml +2 -0
  133. package/templates/clean/src/assets/react.svg +1 -0
  134. package/templates/clean/src/components/ui/badge.tsx +37 -0
  135. package/templates/clean/src/components/ui/breadcrumb.tsx +106 -0
  136. package/templates/clean/src/components/ui/button.tsx +58 -0
  137. package/templates/clean/src/components/ui/card.tsx +72 -0
  138. package/templates/clean/src/components/ui/form.tsx +165 -0
  139. package/templates/clean/src/components/ui/input.tsx +22 -0
  140. package/templates/clean/src/components/ui/label.tsx +24 -0
  141. package/templates/clean/src/components/ui/password-input.tsx +41 -0
  142. package/templates/clean/src/components/ui/separator.tsx +28 -0
  143. package/templates/clean/src/components/ui/tabs.tsx +62 -0
  144. package/templates/clean/src/components/ui/textarea.tsx +21 -0
  145. package/templates/clean/src/index.css +104 -0
  146. package/templates/clean/src/lib/queryClient.ts +11 -0
  147. package/templates/clean/src/lib/utils.ts +6 -0
  148. package/templates/clean/src/main.tsx +33 -0
  149. package/templates/clean/src/routeTree.gen.ts +77 -0
  150. package/templates/clean/src/router.tsx +13 -0
  151. package/templates/clean/src/routes/__root.tsx +82 -0
  152. package/templates/clean/src/routes/index.tsx +187 -0
  153. package/templates/clean/src/routes/otra-ruta.tsx +319 -0
  154. package/templates/clean/src/test/setup.ts +1 -0
  155. package/templates/clean/tsconfig.app.json +34 -0
  156. package/templates/clean/tsconfig.json +10 -0
  157. package/templates/clean/tsconfig.node.json +26 -0
  158. package/templates/clean/vite.config.ts +22 -0
  159. package/templates/clean/vitest.config.ts +9 -0
  160. package/templates/help/.cursor/skills/architecture/SKILL.md +26 -0
  161. package/templates/help/.cursor/skills/components-shadcn/SKILL.md +23 -0
  162. package/templates/help/.cursor/skills/daisyui/SKILL.md +98 -0
  163. package/templates/help/.cursor/skills/routing/SKILL.md +32 -0
  164. package/templates/help/.cursor/skills/testing/SKILL.md +55 -0
  165. package/templates/help/.cursor/skills/tooling-and-scripts/SKILL.md +24 -0
  166. package/templates/help/.cursor/skills/ui-and-styling/SKILL.md +32 -0
  167. package/templates/help/.cursor/skills/vibe-and-ia/SKILL.md +23 -0
  168. package/templates/help/.prettierrc +6 -0
  169. package/templates/help/.tanstack/tmp/c28007bb-2319511cf318e28129c8d8eb723db5fd +9 -0
  170. package/templates/help/.tanstack/tmp/c28007bb-bcef89e9e4593777e1c15ec4b4f32eea +9 -0
  171. package/templates/help/.vscode/extensions.json +7 -0
  172. package/templates/help/README.md +75 -0
  173. package/templates/help/components.json +22 -0
  174. package/templates/help/eslint.config.js +31 -0
  175. package/templates/help/index.html +13 -0
  176. package/templates/help/package.json +62 -0
  177. package/templates/help/pnpm-lock.yaml +4487 -0
  178. package/templates/help/pnpm-workspace.yaml +2 -0
  179. package/templates/help/src/assets/react.svg +1 -0
  180. package/templates/help/src/components/documentacion/entorno.tsx +99 -0
  181. package/templates/help/src/components/documentacion/estructura.tsx +100 -0
  182. package/templates/help/src/components/documentacion/figma-mcp.tsx +200 -0
  183. package/templates/help/src/components/documentacion/inicio.tsx +69 -0
  184. package/templates/help/src/components/documentacion/instalacion.tsx +72 -0
  185. package/templates/help/src/components/documentacion/personalizacion.tsx +163 -0
  186. package/templates/help/src/components/documentacion/rutas.tsx +138 -0
  187. package/templates/help/src/components/documentacion/stack.tsx +401 -0
  188. package/templates/help/src/components/ui/badge.tsx +37 -0
  189. package/templates/help/src/components/ui/breadcrumb.tsx +106 -0
  190. package/templates/help/src/components/ui/button.tsx +58 -0
  191. package/templates/help/src/components/ui/card.tsx +72 -0
  192. package/templates/help/src/components/ui/form.tsx +165 -0
  193. package/templates/help/src/components/ui/input.tsx +22 -0
  194. package/templates/help/src/components/ui/label.tsx +24 -0
  195. package/templates/help/src/components/ui/password-input.tsx +41 -0
  196. package/templates/help/src/components/ui/separator.tsx +28 -0
  197. package/templates/help/src/components/ui/tabs.tsx +62 -0
  198. package/templates/help/src/components/ui/textarea.tsx +21 -0
  199. package/templates/help/src/data/proyectos.json +56 -0
  200. package/templates/help/src/index.css +104 -0
  201. package/templates/help/src/lib/queryClient.ts +11 -0
  202. package/templates/help/src/lib/utils.ts +6 -0
  203. package/templates/help/src/main.tsx +33 -0
  204. package/templates/help/src/routeTree.gen.ts +241 -0
  205. package/templates/help/src/router.tsx +13 -0
  206. package/templates/help/src/routes/__root.tsx +92 -0
  207. package/templates/help/src/routes/auth/iniciar-sesion.tsx +139 -0
  208. package/templates/help/src/routes/auth/registro.tsx +205 -0
  209. package/templates/help/src/routes/contacto.tsx +60 -0
  210. package/templates/help/src/routes/dashbord.tsx +9 -0
  211. package/templates/help/src/routes/documentacion.tsx +80 -0
  212. package/templates/help/src/routes/index.test.tsx +42 -0
  213. package/templates/help/src/routes/index.tsx +211 -0
  214. package/templates/help/src/routes/perfil.tsx +9 -0
  215. package/templates/help/src/routes/proyectos.$proyectoId.tsx +156 -0
  216. package/templates/help/src/routes/proyectos.tsx +93 -0
  217. package/templates/help/src/test/setup.ts +1 -0
  218. package/templates/help/tsconfig.app.json +34 -0
  219. package/templates/help/tsconfig.json +10 -0
  220. package/templates/help/tsconfig.node.json +26 -0
  221. package/templates/help/vite.config.ts +22 -0
  222. package/templates/help/vitest.config.ts +9 -0
@@ -0,0 +1,2 @@
1
+ ignoredBuiltDependencies:
2
+ - esbuild
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ const badgeVariants = cva(
8
+ "badge inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none transition-colors overflow-hidden",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "badge-primary",
13
+ secondary: "badge-secondary",
14
+ destructive: "badge-error",
15
+ outline: "badge-outline",
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ variant: "default",
20
+ },
21
+ }
22
+ );
23
+
24
+ function Badge({
25
+ className,
26
+ variant,
27
+ asChild = false,
28
+ ...props
29
+ }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
30
+ const Comp = asChild ? Slot : "span";
31
+
32
+ return (
33
+ <Comp data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props} />
34
+ );
35
+ }
36
+
37
+ export { Badge, badgeVariants };
@@ -0,0 +1,106 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
8
+ return (
9
+ <nav
10
+ aria-label="breadcrumb"
11
+ data-slot="breadcrumb"
12
+ className={cn("breadcrumbs text-sm", className)}
13
+ {...props}
14
+ />
15
+ );
16
+ }
17
+
18
+ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
19
+ return (
20
+ <ol
21
+ data-slot="breadcrumb-list"
22
+ className={cn("flex flex-wrap items-center gap-1.5 wrap-break-words sm:gap-2.5", className)}
23
+ {...props}
24
+ />
25
+ );
26
+ }
27
+
28
+ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
29
+ return (
30
+ <li
31
+ data-slot="breadcrumb-item"
32
+ className={cn("inline-flex items-center gap-1.5", className)}
33
+ {...props}
34
+ />
35
+ );
36
+ }
37
+
38
+ function BreadcrumbLink({
39
+ asChild,
40
+ className,
41
+ ...props
42
+ }: React.ComponentProps<"a"> & {
43
+ asChild?: boolean;
44
+ }) {
45
+ const Comp = asChild ? Slot : "a";
46
+
47
+ return (
48
+ <Comp
49
+ data-slot="breadcrumb-link"
50
+ className={cn("hover:text-base-content transition-colors", className)}
51
+ {...props}
52
+ />
53
+ );
54
+ }
55
+
56
+ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
57
+ return (
58
+ <span
59
+ data-slot="breadcrumb-page"
60
+ role="link"
61
+ aria-disabled="true"
62
+ aria-current="page"
63
+ className={cn("text-base-content font-normal", className)}
64
+ {...props}
65
+ />
66
+ );
67
+ }
68
+
69
+ function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">) {
70
+ return (
71
+ <li
72
+ data-slot="breadcrumb-separator"
73
+ role="presentation"
74
+ aria-hidden="true"
75
+ className={cn("[&>svg]:size-3.5", className)}
76
+ {...props}
77
+ >
78
+ {children ?? <ChevronRight />}
79
+ </li>
80
+ );
81
+ }
82
+
83
+ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">) {
84
+ return (
85
+ <span
86
+ data-slot="breadcrumb-ellipsis"
87
+ role="presentation"
88
+ aria-hidden="true"
89
+ className={cn("flex size-9 items-center justify-center", className)}
90
+ {...props}
91
+ >
92
+ <MoreHorizontal className="size-4" />
93
+ <span className="sr-only">More</span>
94
+ </span>
95
+ );
96
+ }
97
+
98
+ export {
99
+ Breadcrumb,
100
+ BreadcrumbList,
101
+ BreadcrumbItem,
102
+ BreadcrumbLink,
103
+ BreadcrumbPage,
104
+ BreadcrumbSeparator,
105
+ BreadcrumbEllipsis,
106
+ };
@@ -0,0 +1,58 @@
1
+ import * as React from "react"
2
+ import { Slot } from "@radix-ui/react-slot"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ const buttonVariants = cva(
8
+ "btn inline-flex items-center justify-center gap-2 whitespace-nowrap [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none disabled:pointer-events-none disabled:opacity-50",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "btn-primary",
13
+ destructive: "btn-error",
14
+ outline: "btn-outline btn-primary",
15
+ secondary: "btn-secondary",
16
+ ghost: "btn-ghost",
17
+ link: "btn-link",
18
+ },
19
+ size: {
20
+ default: "btn-md",
21
+ sm: "btn-sm",
22
+ lg: "btn-lg",
23
+ icon: "btn-square",
24
+ "icon-sm": "btn-square btn-sm",
25
+ "icon-lg": "btn-square btn-lg",
26
+ },
27
+ },
28
+ defaultVariants: {
29
+ variant: "default",
30
+ size: "default",
31
+ },
32
+ }
33
+ )
34
+
35
+ function Button({
36
+ className,
37
+ variant = "default",
38
+ size = "default",
39
+ asChild = false,
40
+ ...props
41
+ }: React.ComponentProps<"button"> &
42
+ VariantProps<typeof buttonVariants> & {
43
+ asChild?: boolean
44
+ }) {
45
+ const Comp = asChild ? Slot : "button"
46
+
47
+ return (
48
+ <Comp
49
+ data-slot="button"
50
+ data-variant={variant}
51
+ data-size={size}
52
+ className={cn(buttonVariants({ variant, size, className }))}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+
58
+ export { Button, buttonVariants }
@@ -0,0 +1,72 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "@/lib/utils";
4
+
5
+ function Card({ className, ...props }: React.ComponentProps<"div">) {
6
+ return (
7
+ <div
8
+ data-slot="card"
9
+ className={cn("card bg-base-100 shadow-sm border border-base-300 px-4 py-6", className)}
10
+ {...props}
11
+ />
12
+ );
13
+ }
14
+
15
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
16
+ return (
17
+ <div
18
+ data-slot="card-header"
19
+ className={cn(
20
+ "card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ );
26
+ }
27
+
28
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
29
+ return (
30
+ <div
31
+ data-slot="card-title"
32
+ className={cn("card-title leading-none font-semibold", className)}
33
+ {...props}
34
+ />
35
+ );
36
+ }
37
+
38
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
39
+ return (
40
+ <div
41
+ data-slot="card-description"
42
+ className={cn("text-base-content/70 text-sm", className)}
43
+ {...props}
44
+ />
45
+ );
46
+ }
47
+
48
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
49
+ return (
50
+ <div
51
+ data-slot="card-action"
52
+ className={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
53
+ {...props}
54
+ />
55
+ );
56
+ }
57
+
58
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
59
+ return <div data-slot="card-content" className={cn("card-body px-6", className)} {...props} />;
60
+ }
61
+
62
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
63
+ return (
64
+ <div
65
+ data-slot="card-footer"
66
+ className={cn("card-actions flex items-center px-6 [.border-t]:pt-6", className)}
67
+ {...props}
68
+ />
69
+ );
70
+ }
71
+
72
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
@@ -0,0 +1,165 @@
1
+ import * as React from "react"
2
+ import type * as LabelPrimitive from "@radix-ui/react-label"
3
+ import { Slot } from "@radix-ui/react-slot"
4
+ import {
5
+ Controller,
6
+ FormProvider,
7
+ useFormContext,
8
+ useFormState,
9
+ type ControllerProps,
10
+ type FieldPath,
11
+ type FieldValues,
12
+ } from "react-hook-form"
13
+
14
+ import { cn } from "@/lib/utils"
15
+ import { Label } from "@/components/ui/label"
16
+
17
+ const Form = FormProvider
18
+
19
+ type FormFieldContextValue<
20
+ TFieldValues extends FieldValues = FieldValues,
21
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
22
+ > = {
23
+ name: TName
24
+ }
25
+
26
+ const FormFieldContext = React.createContext<FormFieldContextValue>(
27
+ {} as FormFieldContextValue
28
+ )
29
+
30
+ const FormField = <
31
+ TFieldValues extends FieldValues = FieldValues,
32
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
33
+ >({
34
+ ...props
35
+ }: ControllerProps<TFieldValues, TName>) => {
36
+ return (
37
+ <FormFieldContext.Provider value={{ name: props.name }}>
38
+ <Controller {...props} />
39
+ </FormFieldContext.Provider>
40
+ )
41
+ }
42
+
43
+ const useFormField = () => {
44
+ const fieldContext = React.useContext(FormFieldContext)
45
+ const itemContext = React.useContext(FormItemContext)
46
+ const { getFieldState } = useFormContext()
47
+ const formState = useFormState({ name: fieldContext.name })
48
+ const fieldState = getFieldState(fieldContext.name, formState)
49
+
50
+ if (!fieldContext) {
51
+ throw new Error("useFormField should be used within <FormField>")
52
+ }
53
+
54
+ const { id } = itemContext
55
+
56
+ return {
57
+ id,
58
+ name: fieldContext.name,
59
+ formItemId: `${id}-form-item`,
60
+ formDescriptionId: `${id}-form-item-description`,
61
+ formMessageId: `${id}-form-item-message`,
62
+ ...fieldState,
63
+ }
64
+ }
65
+
66
+ type FormItemContextValue = {
67
+ id: string
68
+ }
69
+
70
+ const FormItemContext = React.createContext<FormItemContextValue>(
71
+ {} as FormItemContextValue
72
+ )
73
+
74
+ function FormItem({ className, ...props }: React.ComponentProps<"div">) {
75
+ const id = React.useId()
76
+
77
+ return (
78
+ <FormItemContext.Provider value={{ id }}>
79
+ <div
80
+ data-slot="form-item"
81
+ className={cn("grid gap-2", className)}
82
+ {...props}
83
+ />
84
+ </FormItemContext.Provider>
85
+ )
86
+ }
87
+
88
+ function FormLabel({
89
+ className,
90
+ ...props
91
+ }: React.ComponentProps<typeof LabelPrimitive.Root>) {
92
+ const { error, formItemId } = useFormField()
93
+
94
+ return (
95
+ <Label
96
+ data-slot="form-label"
97
+ data-error={!!error}
98
+ className={cn("data-[error=true]:text-error", className)}
99
+ htmlFor={formItemId}
100
+ {...props}
101
+ />
102
+ )
103
+ }
104
+
105
+ function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
106
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
107
+
108
+ return (
109
+ <Slot
110
+ data-slot="form-control"
111
+ id={formItemId}
112
+ aria-describedby={
113
+ !error
114
+ ? `${formDescriptionId}`
115
+ : `${formDescriptionId} ${formMessageId}`
116
+ }
117
+ aria-invalid={!!error}
118
+ {...props}
119
+ />
120
+ )
121
+ }
122
+
123
+ function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
124
+ const { formDescriptionId } = useFormField()
125
+
126
+ return (
127
+ <p
128
+ data-slot="form-description"
129
+ id={formDescriptionId}
130
+ className={cn("text-base-content/70 text-sm", className)}
131
+ {...props}
132
+ />
133
+ )
134
+ }
135
+
136
+ function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
137
+ const { error, formMessageId } = useFormField()
138
+ const body = error ? String(error?.message ?? "") : props.children
139
+
140
+ if (!body) {
141
+ return null
142
+ }
143
+
144
+ return (
145
+ <p
146
+ data-slot="form-message"
147
+ id={formMessageId}
148
+ className={cn("text-error text-sm", className)}
149
+ {...props}
150
+ >
151
+ {body}
152
+ </p>
153
+ )
154
+ }
155
+
156
+ export {
157
+ useFormField,
158
+ Form,
159
+ FormItem,
160
+ FormLabel,
161
+ FormControl,
162
+ FormDescription,
163
+ FormMessage,
164
+ FormField,
165
+ }
@@ -0,0 +1,22 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ "input input-bordered w-full",
12
+ "file:text-base-content placeholder:text-base-content/50",
13
+ "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
14
+ "aria-invalid:input-error",
15
+ className
16
+ )}
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+
22
+ export { Input }
@@ -0,0 +1,24 @@
1
+ import * as React from "react"
2
+ import * as LabelPrimitive from "@radix-ui/react-label"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Label({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<typeof LabelPrimitive.Root>) {
10
+ return (
11
+ <LabelPrimitive.Root
12
+ data-slot="label"
13
+ className={cn(
14
+ "label flex items-center gap-2 text-sm leading-none font-medium select-none",
15
+ "group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
16
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ )
22
+ }
23
+
24
+ export { Label }
@@ -0,0 +1,41 @@
1
+ import * as React from "react"
2
+ import { Eye, EyeOff } from "lucide-react"
3
+ import { Input } from "@/components/ui/input"
4
+ import { Button } from "@/components/ui/button"
5
+ import { cn } from "@/lib/utils"
6
+
7
+ type PasswordInputProps = React.ComponentProps<"input">
8
+
9
+ const PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(
10
+ ({ className, ...props }, ref) => {
11
+ const [showPassword, setShowPassword] = React.useState(false)
12
+
13
+ return (
14
+ <div className="relative">
15
+ <Input
16
+ type={showPassword ? "text" : "password"}
17
+ className={cn("pr-10", className)}
18
+ ref={ref}
19
+ {...props}
20
+ />
21
+ <Button
22
+ type="button"
23
+ variant="ghost"
24
+ size="icon-sm"
25
+ className="absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 p-0 hover:bg-transparent"
26
+ onClick={() => setShowPassword((prev) => !prev)}
27
+ aria-label={showPassword ? "Ocultar contraseña" : "Mostrar contraseña"}
28
+ >
29
+ {showPassword ? (
30
+ <EyeOff className="h-4 w-4 text-muted-foreground" />
31
+ ) : (
32
+ <Eye className="h-4 w-4 text-muted-foreground" />
33
+ )}
34
+ </Button>
35
+ </div>
36
+ )
37
+ }
38
+ )
39
+ PasswordInput.displayName = "PasswordInput"
40
+
41
+ export { PasswordInput }
@@ -0,0 +1,28 @@
1
+ import * as React from "react"
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
+ return (
13
+ <SeparatorPrimitive.Root
14
+ data-slot="separator"
15
+ decorative={decorative}
16
+ orientation={orientation}
17
+ className={cn(
18
+ "bg-base-300 shrink-0",
19
+ "data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
20
+ "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ )
26
+ }
27
+
28
+ export { Separator }
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+
4
+ import { cn } from "@/lib/utils";
5
+
6
+ function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {
7
+ return (
8
+ <TabsPrimitive.Root
9
+ data-slot="tabs"
10
+ className={cn("flex flex-col gap-2", className)}
11
+ {...props}
12
+ />
13
+ );
14
+ }
15
+
16
+ function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {
17
+ return (
18
+ <TabsPrimitive.List
19
+ data-slot="tabs-list"
20
+ role="tablist"
21
+ className={cn(
22
+ "tabs tabs-box bg-base-200 inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
23
+ className
24
+ )}
25
+ {...props}
26
+ />
27
+ );
28
+ }
29
+
30
+ function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
31
+ return (
32
+ <TabsPrimitive.Trigger
33
+ data-slot="tabs-trigger"
34
+ role="tab"
35
+ className={cn(
36
+ "tab inline-flex flex-1 items-center justify-center gap-1.5 px-2 py-1 text-sm font-medium whitespace-nowrap transition-colors",
37
+ "data-[state=active]:tab-active",
38
+ "disabled:pointer-events-none disabled:opacity-50",
39
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
40
+ "hover:cursor-pointer",
41
+ className
42
+ )}
43
+ {...props}
44
+ />
45
+ );
46
+ }
47
+
48
+ function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {
49
+ return (
50
+ <TabsPrimitive.Content
51
+ data-slot="tabs-content"
52
+ className={cn(
53
+ "tab-content flex-1 outline-none",
54
+ "data-[state=active]:block data-[state=inactive]:hidden",
55
+ className
56
+ )}
57
+ {...props}
58
+ />
59
+ );
60
+ }
61
+
62
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,21 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
+ return (
7
+ <textarea
8
+ data-slot="textarea"
9
+ className={cn(
10
+ "textarea textarea-bordered w-full min-h-16 field-sizing-content",
11
+ "placeholder:text-base-content/50",
12
+ "disabled:cursor-not-allowed disabled:opacity-50",
13
+ "aria-invalid:textarea-error",
14
+ className
15
+ )}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+
21
+ export { Textarea }