@tekton-ui/ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/README.md +1137 -0
  2. package/dist/index.d.mts +719 -0
  3. package/dist/index.mjs +3511 -0
  4. package/dist/src/components/alert-dialog.d.ts +21 -0
  5. package/dist/src/components/alert-dialog.d.ts.map +1 -0
  6. package/dist/src/components/alert-dialog.js +26 -0
  7. package/dist/src/components/alert-dialog.js.map +1 -0
  8. package/dist/src/components/alert-dialog.stories.d.ts +22 -0
  9. package/dist/src/components/alert-dialog.stories.d.ts.map +1 -0
  10. package/dist/src/components/alert-dialog.stories.js +22 -0
  11. package/dist/src/components/alert-dialog.stories.js.map +1 -0
  12. package/dist/src/components/avatar.d.ts +7 -0
  13. package/dist/src/components/avatar.d.ts.map +1 -0
  14. package/dist/src/components/avatar.js +12 -0
  15. package/dist/src/components/avatar.js.map +1 -0
  16. package/dist/src/components/avatar.stories.d.ts +38 -0
  17. package/dist/src/components/avatar.stories.d.ts.map +1 -0
  18. package/dist/src/components/avatar.stories.js +33 -0
  19. package/dist/src/components/avatar.stories.js.map +1 -0
  20. package/dist/src/components/badge.d.ts +10 -0
  21. package/dist/src/components/badge.d.ts.map +1 -0
  22. package/dist/src/components/badge.js +21 -0
  23. package/dist/src/components/badge.js.map +1 -0
  24. package/dist/src/components/badge.stories.d.ts +73 -0
  25. package/dist/src/components/badge.stories.d.ts.map +1 -0
  26. package/dist/src/components/badge.stories.js +60 -0
  27. package/dist/src/components/badge.stories.js.map +1 -0
  28. package/dist/src/components/breadcrumb.d.ts +27 -0
  29. package/dist/src/components/breadcrumb.d.ts.map +1 -0
  30. package/dist/src/components/breadcrumb.js +60 -0
  31. package/dist/src/components/breadcrumb.js.map +1 -0
  32. package/dist/src/components/breadcrumb.stories.d.ts +49 -0
  33. package/dist/src/components/breadcrumb.stories.d.ts.map +1 -0
  34. package/dist/src/components/breadcrumb.stories.js +43 -0
  35. package/dist/src/components/breadcrumb.stories.js.map +1 -0
  36. package/dist/src/components/button.d.ts +12 -0
  37. package/dist/src/components/button.d.ts.map +1 -0
  38. package/dist/src/components/button.js +34 -0
  39. package/dist/src/components/button.js.map +1 -0
  40. package/dist/src/components/button.stories.d.ts +134 -0
  41. package/dist/src/components/button.stories.d.ts.map +1 -0
  42. package/dist/src/components/button.stories.js +101 -0
  43. package/dist/src/components/button.stories.js.map +1 -0
  44. package/dist/src/components/calendar.d.ts +8 -0
  45. package/dist/src/components/calendar.d.ts.map +1 -0
  46. package/dist/src/components/calendar.js +39 -0
  47. package/dist/src/components/calendar.js.map +1 -0
  48. package/dist/src/components/calendar.stories.d.ts +46 -0
  49. package/dist/src/components/calendar.stories.d.ts.map +1 -0
  50. package/dist/src/components/calendar.stories.js +88 -0
  51. package/dist/src/components/calendar.stories.js.map +1 -0
  52. package/dist/src/components/card.d.ts +9 -0
  53. package/dist/src/components/card.d.ts.map +1 -0
  54. package/dist/src/components/card.js +17 -0
  55. package/dist/src/components/card.js.map +1 -0
  56. package/dist/src/components/card.stories.d.ts +46 -0
  57. package/dist/src/components/card.stories.d.ts.map +1 -0
  58. package/dist/src/components/card.stories.js +40 -0
  59. package/dist/src/components/card.stories.js.map +1 -0
  60. package/dist/src/components/checkbox.d.ts +5 -0
  61. package/dist/src/components/checkbox.d.ts.map +1 -0
  62. package/dist/src/components/checkbox.js +9 -0
  63. package/dist/src/components/checkbox.js.map +1 -0
  64. package/dist/src/components/checkbox.stories.d.ts +50 -0
  65. package/dist/src/components/checkbox.stories.d.ts.map +1 -0
  66. package/dist/src/components/checkbox.stories.js +48 -0
  67. package/dist/src/components/checkbox.stories.js.map +1 -0
  68. package/dist/src/components/command.d.ts +81 -0
  69. package/dist/src/components/command.d.ts.map +1 -0
  70. package/dist/src/components/command.js +27 -0
  71. package/dist/src/components/command.js.map +1 -0
  72. package/dist/src/components/command.stories.d.ts +34 -0
  73. package/dist/src/components/command.stories.d.ts.map +1 -0
  74. package/dist/src/components/command.stories.js +44 -0
  75. package/dist/src/components/command.stories.js.map +1 -0
  76. package/dist/src/components/dialog.d.ts +20 -0
  77. package/dist/src/components/dialog.d.ts.map +1 -0
  78. package/dist/src/components/dialog.js +23 -0
  79. package/dist/src/components/dialog.js.map +1 -0
  80. package/dist/src/components/dialog.stories.d.ts +38 -0
  81. package/dist/src/components/dialog.stories.d.ts.map +1 -0
  82. package/dist/src/components/dialog.stories.js +36 -0
  83. package/dist/src/components/dialog.stories.js.map +1 -0
  84. package/dist/src/components/dropdown-menu.d.ts +28 -0
  85. package/dist/src/components/dropdown-menu.d.ts.map +1 -0
  86. package/dist/src/components/dropdown-menu.js +33 -0
  87. package/dist/src/components/dropdown-menu.js.map +1 -0
  88. package/dist/src/components/dropdown-menu.stories.d.ts +30 -0
  89. package/dist/src/components/dropdown-menu.stories.d.ts.map +1 -0
  90. package/dist/src/components/dropdown-menu.stories.js +37 -0
  91. package/dist/src/components/dropdown-menu.stories.js.map +1 -0
  92. package/dist/src/components/form.d.ts +24 -0
  93. package/dist/src/components/form.d.ts.map +1 -0
  94. package/dist/src/components/form.js +62 -0
  95. package/dist/src/components/form.js.map +1 -0
  96. package/dist/src/components/form.stories.d.ts +34 -0
  97. package/dist/src/components/form.stories.d.ts.map +1 -0
  98. package/dist/src/components/form.stories.js +132 -0
  99. package/dist/src/components/form.stories.js.map +1 -0
  100. package/dist/src/components/input.d.ts +5 -0
  101. package/dist/src/components/input.d.ts.map +1 -0
  102. package/dist/src/components/input.js +9 -0
  103. package/dist/src/components/input.js.map +1 -0
  104. package/dist/src/components/input.stories.d.ts +101 -0
  105. package/dist/src/components/input.stories.d.ts.map +1 -0
  106. package/dist/src/components/input.stories.js +79 -0
  107. package/dist/src/components/input.stories.js.map +1 -0
  108. package/dist/src/components/label.d.ts +6 -0
  109. package/dist/src/components/label.d.ts.map +1 -0
  110. package/dist/src/components/label.js +10 -0
  111. package/dist/src/components/label.js.map +1 -0
  112. package/dist/src/components/label.stories.d.ts +34 -0
  113. package/dist/src/components/label.stories.d.ts.map +1 -0
  114. package/dist/src/components/label.stories.js +32 -0
  115. package/dist/src/components/label.stories.js.map +1 -0
  116. package/dist/src/components/navigation-menu.d.ts +13 -0
  117. package/dist/src/components/navigation-menu.d.ts.map +1 -0
  118. package/dist/src/components/navigation-menu.js +22 -0
  119. package/dist/src/components/navigation-menu.js.map +1 -0
  120. package/dist/src/components/navigation-menu.stories.d.ts +26 -0
  121. package/dist/src/components/navigation-menu.stories.d.ts.map +1 -0
  122. package/dist/src/components/navigation-menu.stories.js +30 -0
  123. package/dist/src/components/navigation-menu.stories.js.map +1 -0
  124. package/dist/src/components/popover.d.ts +7 -0
  125. package/dist/src/components/popover.d.ts.map +1 -0
  126. package/dist/src/components/popover.js +10 -0
  127. package/dist/src/components/popover.js.map +1 -0
  128. package/dist/src/components/popover.stories.d.ts +22 -0
  129. package/dist/src/components/popover.stories.d.ts.map +1 -0
  130. package/dist/src/components/popover.stories.js +24 -0
  131. package/dist/src/components/popover.stories.js.map +1 -0
  132. package/dist/src/components/progress.d.ts +5 -0
  133. package/dist/src/components/progress.d.ts.map +1 -0
  134. package/dist/src/components/progress.js +8 -0
  135. package/dist/src/components/progress.js.map +1 -0
  136. package/dist/src/components/progress.stories.d.ts +44 -0
  137. package/dist/src/components/progress.stories.d.ts.map +1 -0
  138. package/dist/src/components/progress.stories.js +63 -0
  139. package/dist/src/components/progress.stories.js.map +1 -0
  140. package/dist/src/components/radio-group.d.ts +6 -0
  141. package/dist/src/components/radio-group.d.ts.map +1 -0
  142. package/dist/src/components/radio-group.js +15 -0
  143. package/dist/src/components/radio-group.js.map +1 -0
  144. package/dist/src/components/radio-group.stories.d.ts +34 -0
  145. package/dist/src/components/radio-group.stories.d.ts.map +1 -0
  146. package/dist/src/components/radio-group.stories.js +31 -0
  147. package/dist/src/components/radio-group.stories.js.map +1 -0
  148. package/dist/src/components/scroll-area.d.ts +6 -0
  149. package/dist/src/components/scroll-area.d.ts.map +1 -0
  150. package/dist/src/components/scroll-area.js +10 -0
  151. package/dist/src/components/scroll-area.js.map +1 -0
  152. package/dist/src/components/scroll-area.stories.d.ts +46 -0
  153. package/dist/src/components/scroll-area.stories.d.ts.map +1 -0
  154. package/dist/src/components/scroll-area.stories.js +44 -0
  155. package/dist/src/components/scroll-area.stories.js.map +1 -0
  156. package/dist/src/components/select.d.ts +14 -0
  157. package/dist/src/components/select.d.ts.map +1 -0
  158. package/dist/src/components/select.js +26 -0
  159. package/dist/src/components/select.js.map +1 -0
  160. package/dist/src/components/select.stories.d.ts +42 -0
  161. package/dist/src/components/select.stories.d.ts.map +1 -0
  162. package/dist/src/components/select.stories.js +37 -0
  163. package/dist/src/components/select.stories.js.map +1 -0
  164. package/dist/src/components/separator.d.ts +5 -0
  165. package/dist/src/components/separator.d.ts.map +1 -0
  166. package/dist/src/components/separator.js +8 -0
  167. package/dist/src/components/separator.js.map +1 -0
  168. package/dist/src/components/separator.stories.d.ts +47 -0
  169. package/dist/src/components/separator.stories.d.ts.map +1 -0
  170. package/dist/src/components/separator.stories.js +41 -0
  171. package/dist/src/components/separator.stories.js.map +1 -0
  172. package/dist/src/components/sheet.d.ts +26 -0
  173. package/dist/src/components/sheet.d.ts.map +1 -0
  174. package/dist/src/components/sheet.js +37 -0
  175. package/dist/src/components/sheet.js.map +1 -0
  176. package/dist/src/components/sheet.stories.d.ts +18 -0
  177. package/dist/src/components/sheet.stories.d.ts.map +1 -0
  178. package/dist/src/components/sheet.stories.js +21 -0
  179. package/dist/src/components/sheet.stories.js.map +1 -0
  180. package/dist/src/components/sidebar.d.ts +40 -0
  181. package/dist/src/components/sidebar.d.ts.map +1 -0
  182. package/dist/src/components/sidebar.js +101 -0
  183. package/dist/src/components/sidebar.js.map +1 -0
  184. package/dist/src/components/sidebar.stories.d.ts +55 -0
  185. package/dist/src/components/sidebar.stories.d.ts.map +1 -0
  186. package/dist/src/components/sidebar.stories.js +51 -0
  187. package/dist/src/components/sidebar.stories.js.map +1 -0
  188. package/dist/src/components/skeleton.d.ts +3 -0
  189. package/dist/src/components/skeleton.d.ts.map +1 -0
  190. package/dist/src/components/skeleton.js +7 -0
  191. package/dist/src/components/skeleton.js.map +1 -0
  192. package/dist/src/components/skeleton.stories.d.ts +50 -0
  193. package/dist/src/components/skeleton.stories.d.ts.map +1 -0
  194. package/dist/src/components/skeleton.stories.js +42 -0
  195. package/dist/src/components/skeleton.stories.js.map +1 -0
  196. package/dist/src/components/switch.d.ts +5 -0
  197. package/dist/src/components/switch.d.ts.map +1 -0
  198. package/dist/src/components/switch.js +8 -0
  199. package/dist/src/components/switch.js.map +1 -0
  200. package/dist/src/components/switch.stories.d.ts +50 -0
  201. package/dist/src/components/switch.stories.d.ts.map +1 -0
  202. package/dist/src/components/switch.stories.js +48 -0
  203. package/dist/src/components/switch.stories.js.map +1 -0
  204. package/dist/src/components/table.d.ts +11 -0
  205. package/dist/src/components/table.d.ts.map +1 -0
  206. package/dist/src/components/table.js +21 -0
  207. package/dist/src/components/table.js.map +1 -0
  208. package/dist/src/components/table.stories.d.ts +26 -0
  209. package/dist/src/components/table.stories.d.ts.map +1 -0
  210. package/dist/src/components/table.stories.js +26 -0
  211. package/dist/src/components/table.stories.js.map +1 -0
  212. package/dist/src/components/tabs.d.ts +8 -0
  213. package/dist/src/components/tabs.d.ts.map +1 -0
  214. package/dist/src/components/tabs.js +13 -0
  215. package/dist/src/components/tabs.js.map +1 -0
  216. package/dist/src/components/tabs.stories.d.ts +22 -0
  217. package/dist/src/components/tabs.stories.d.ts.map +1 -0
  218. package/dist/src/components/tabs.stories.js +25 -0
  219. package/dist/src/components/tabs.stories.js.map +1 -0
  220. package/dist/src/components/textarea.d.ts +5 -0
  221. package/dist/src/components/textarea.d.ts.map +1 -0
  222. package/dist/src/components/textarea.js +9 -0
  223. package/dist/src/components/textarea.js.map +1 -0
  224. package/dist/src/components/textarea.stories.d.ts +64 -0
  225. package/dist/src/components/textarea.stories.d.ts.map +1 -0
  226. package/dist/src/components/textarea.stories.js +60 -0
  227. package/dist/src/components/textarea.stories.js.map +1 -0
  228. package/dist/src/components/toast.d.ts +16 -0
  229. package/dist/src/components/toast.d.ts.map +1 -0
  230. package/dist/src/components/toast.js +34 -0
  231. package/dist/src/components/toast.js.map +1 -0
  232. package/dist/src/components/toast.stories.d.ts +22 -0
  233. package/dist/src/components/toast.stories.d.ts.map +1 -0
  234. package/dist/src/components/toast.stories.js +32 -0
  235. package/dist/src/components/toast.stories.js.map +1 -0
  236. package/dist/src/components/tooltip.d.ts +8 -0
  237. package/dist/src/components/tooltip.d.ts.map +1 -0
  238. package/dist/src/components/tooltip.js +11 -0
  239. package/dist/src/components/tooltip.js.map +1 -0
  240. package/dist/src/components/tooltip.stories.d.ts +26 -0
  241. package/dist/src/components/tooltip.stories.d.ts.map +1 -0
  242. package/dist/src/components/tooltip.stories.js +25 -0
  243. package/dist/src/components/tooltip.stories.js.map +1 -0
  244. package/dist/src/index.d.ts +45 -0
  245. package/dist/src/index.d.ts.map +1 -0
  246. package/dist/src/index.js +36 -0
  247. package/dist/src/index.js.map +1 -0
  248. package/dist/src/lib/motion.d.ts +99 -0
  249. package/dist/src/lib/motion.d.ts.map +1 -0
  250. package/dist/src/lib/motion.js +88 -0
  251. package/dist/src/lib/motion.js.map +1 -0
  252. package/dist/src/lib/theme-loader.d.ts +69 -0
  253. package/dist/src/lib/theme-loader.d.ts.map +1 -0
  254. package/dist/src/lib/theme-loader.js +113 -0
  255. package/dist/src/lib/theme-loader.js.map +1 -0
  256. package/dist/src/lib/tokens.d.ts +50 -0
  257. package/dist/src/lib/tokens.d.ts.map +1 -0
  258. package/dist/src/lib/tokens.js +53 -0
  259. package/dist/src/lib/tokens.js.map +1 -0
  260. package/dist/src/lib/utils.d.ts +3 -0
  261. package/dist/src/lib/utils.d.ts.map +1 -0
  262. package/dist/src/lib/utils.js +6 -0
  263. package/dist/src/lib/utils.js.map +1 -0
  264. package/dist/src/templates/auth/forgot-password.d.ts +4 -0
  265. package/dist/src/templates/auth/forgot-password.d.ts.map +1 -0
  266. package/dist/src/templates/auth/forgot-password.js +47 -0
  267. package/dist/src/templates/auth/forgot-password.js.map +1 -0
  268. package/dist/src/templates/auth/forgot-password.stories.d.ts +14 -0
  269. package/dist/src/templates/auth/forgot-password.stories.d.ts.map +1 -0
  270. package/dist/src/templates/auth/forgot-password.stories.js +14 -0
  271. package/dist/src/templates/auth/forgot-password.stories.js.map +1 -0
  272. package/dist/src/templates/auth/login.d.ts +4 -0
  273. package/dist/src/templates/auth/login.d.ts.map +1 -0
  274. package/dist/src/templates/auth/login.js +50 -0
  275. package/dist/src/templates/auth/login.js.map +1 -0
  276. package/dist/src/templates/auth/login.stories.d.ts +95 -0
  277. package/dist/src/templates/auth/login.stories.d.ts.map +1 -0
  278. package/dist/src/templates/auth/login.stories.js +77 -0
  279. package/dist/src/templates/auth/login.stories.js.map +1 -0
  280. package/dist/src/templates/auth/signup.d.ts +4 -0
  281. package/dist/src/templates/auth/signup.d.ts.map +1 -0
  282. package/dist/src/templates/auth/signup.js +49 -0
  283. package/dist/src/templates/auth/signup.js.map +1 -0
  284. package/dist/src/templates/auth/signup.stories.d.ts +18 -0
  285. package/dist/src/templates/auth/signup.stories.d.ts.map +1 -0
  286. package/dist/src/templates/auth/signup.stories.js +21 -0
  287. package/dist/src/templates/auth/signup.stories.js.map +1 -0
  288. package/dist/src/templates/auth/verification.d.ts +4 -0
  289. package/dist/src/templates/auth/verification.d.ts.map +1 -0
  290. package/dist/src/templates/auth/verification.js +47 -0
  291. package/dist/src/templates/auth/verification.js.map +1 -0
  292. package/dist/src/templates/auth/verification.stories.d.ts +19 -0
  293. package/dist/src/templates/auth/verification.stories.d.ts.map +1 -0
  294. package/dist/src/templates/auth/verification.stories.js +19 -0
  295. package/dist/src/templates/auth/verification.stories.js.map +1 -0
  296. package/dist/src/templates/core/landing.d.ts +4 -0
  297. package/dist/src/templates/core/landing.d.ts.map +1 -0
  298. package/dist/src/templates/core/landing.js +44 -0
  299. package/dist/src/templates/core/landing.js.map +1 -0
  300. package/dist/src/templates/core/landing.stories.d.ts +14 -0
  301. package/dist/src/templates/core/landing.stories.d.ts.map +1 -0
  302. package/dist/src/templates/core/landing.stories.js +14 -0
  303. package/dist/src/templates/core/landing.stories.js.map +1 -0
  304. package/dist/src/templates/core/preferences.d.ts +4 -0
  305. package/dist/src/templates/core/preferences.d.ts.map +1 -0
  306. package/dist/src/templates/core/preferences.js +51 -0
  307. package/dist/src/templates/core/preferences.js.map +1 -0
  308. package/dist/src/templates/core/preferences.stories.d.ts +14 -0
  309. package/dist/src/templates/core/preferences.stories.d.ts.map +1 -0
  310. package/dist/src/templates/core/preferences.stories.js +14 -0
  311. package/dist/src/templates/core/preferences.stories.js.map +1 -0
  312. package/dist/src/templates/core/profile.d.ts +4 -0
  313. package/dist/src/templates/core/profile.d.ts.map +1 -0
  314. package/dist/src/templates/core/profile.js +49 -0
  315. package/dist/src/templates/core/profile.js.map +1 -0
  316. package/dist/src/templates/core/profile.stories.d.ts +19 -0
  317. package/dist/src/templates/core/profile.stories.d.ts.map +1 -0
  318. package/dist/src/templates/core/profile.stories.js +19 -0
  319. package/dist/src/templates/core/profile.stories.js.map +1 -0
  320. package/dist/src/templates/dashboard/overview.d.ts +4 -0
  321. package/dist/src/templates/dashboard/overview.d.ts.map +1 -0
  322. package/dist/src/templates/dashboard/overview.js +65 -0
  323. package/dist/src/templates/dashboard/overview.js.map +1 -0
  324. package/dist/src/templates/dashboard/overview.stories.d.ts +55 -0
  325. package/dist/src/templates/dashboard/overview.stories.d.ts.map +1 -0
  326. package/dist/src/templates/dashboard/overview.stories.js +51 -0
  327. package/dist/src/templates/dashboard/overview.stories.js.map +1 -0
  328. package/dist/src/templates/feedback/confirmation.d.ts +4 -0
  329. package/dist/src/templates/feedback/confirmation.d.ts.map +1 -0
  330. package/dist/src/templates/feedback/confirmation.js +47 -0
  331. package/dist/src/templates/feedback/confirmation.js.map +1 -0
  332. package/dist/src/templates/feedback/confirmation.stories.d.ts +14 -0
  333. package/dist/src/templates/feedback/confirmation.stories.d.ts.map +1 -0
  334. package/dist/src/templates/feedback/confirmation.stories.js +14 -0
  335. package/dist/src/templates/feedback/confirmation.stories.js.map +1 -0
  336. package/dist/src/templates/feedback/empty.d.ts +4 -0
  337. package/dist/src/templates/feedback/empty.d.ts.map +1 -0
  338. package/dist/src/templates/feedback/empty.js +45 -0
  339. package/dist/src/templates/feedback/empty.js.map +1 -0
  340. package/dist/src/templates/feedback/empty.stories.d.ts +14 -0
  341. package/dist/src/templates/feedback/empty.stories.d.ts.map +1 -0
  342. package/dist/src/templates/feedback/empty.stories.js +14 -0
  343. package/dist/src/templates/feedback/empty.stories.js.map +1 -0
  344. package/dist/src/templates/feedback/error.d.ts +4 -0
  345. package/dist/src/templates/feedback/error.d.ts.map +1 -0
  346. package/dist/src/templates/feedback/error.js +45 -0
  347. package/dist/src/templates/feedback/error.js.map +1 -0
  348. package/dist/src/templates/feedback/error.stories.d.ts +14 -0
  349. package/dist/src/templates/feedback/error.stories.d.ts.map +1 -0
  350. package/dist/src/templates/feedback/error.stories.js +14 -0
  351. package/dist/src/templates/feedback/error.stories.js.map +1 -0
  352. package/dist/src/templates/feedback/loading.d.ts +4 -0
  353. package/dist/src/templates/feedback/loading.d.ts.map +1 -0
  354. package/dist/src/templates/feedback/loading.js +42 -0
  355. package/dist/src/templates/feedback/loading.js.map +1 -0
  356. package/dist/src/templates/feedback/loading.stories.d.ts +14 -0
  357. package/dist/src/templates/feedback/loading.stories.d.ts.map +1 -0
  358. package/dist/src/templates/feedback/loading.stories.js +14 -0
  359. package/dist/src/templates/feedback/loading.stories.js.map +1 -0
  360. package/dist/src/templates/feedback/success.d.ts +4 -0
  361. package/dist/src/templates/feedback/success.d.ts.map +1 -0
  362. package/dist/src/templates/feedback/success.js +45 -0
  363. package/dist/src/templates/feedback/success.js.map +1 -0
  364. package/dist/src/templates/feedback/success.stories.d.ts +14 -0
  365. package/dist/src/templates/feedback/success.stories.d.ts.map +1 -0
  366. package/dist/src/templates/feedback/success.stories.js +14 -0
  367. package/dist/src/templates/feedback/success.stories.js.map +1 -0
  368. package/dist/src/templates/index.d.ts +16 -0
  369. package/dist/src/templates/index.d.ts.map +1 -0
  370. package/dist/src/templates/index.js +45 -0
  371. package/dist/src/templates/index.js.map +1 -0
  372. package/dist/src/templates/registry.d.ts +23 -0
  373. package/dist/src/templates/registry.d.ts.map +1 -0
  374. package/dist/src/templates/registry.js +90 -0
  375. package/dist/src/templates/registry.js.map +1 -0
  376. package/dist/src/templates/types.d.ts +78 -0
  377. package/dist/src/templates/types.d.ts.map +1 -0
  378. package/dist/src/templates/types.js +23 -0
  379. package/dist/src/templates/types.js.map +1 -0
  380. package/dist/tsconfig.tsbuildinfo +1 -0
  381. package/package.json +117 -0
  382. package/styles/globals.css +191 -0
  383. package/styles/tokens.css +303 -0
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from './dialog';
3
+ import { Button } from './button';
4
+ import { Input } from './input';
5
+ import { Label } from './label';
6
+ const meta = {
7
+ title: 'Components/Dialog',
8
+ component: Dialog,
9
+ parameters: {
10
+ layout: 'centered',
11
+ },
12
+ tags: ['autodocs'],
13
+ };
14
+ export default meta;
15
+ export const Default = {
16
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Are you absolutely sure?" }), _jsx(DialogDescription, { children: "This action cannot be undone. This will permanently delete your account and remove your data from our servers." })] }), _jsx(DialogFooter, { children: _jsx(Button, { type: "submit", children: "Confirm" }) })] })] })),
17
+ };
18
+ export const WithForm = {
19
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Edit Profile" }) }), _jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Edit profile" }), _jsx(DialogDescription, { children: "Make changes to your profile here. Click save when you're done." })] }), _jsxs("div", { className: "grid gap-4 py-4", children: [_jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [_jsx(Label, { htmlFor: "name", className: "text-right", children: "Name" }), _jsx(Input, { id: "name", defaultValue: "Pedro Duarte", className: "col-span-3" })] }), _jsxs("div", { className: "grid grid-cols-4 items-center gap-4", children: [_jsx(Label, { htmlFor: "username", className: "text-right", children: "Username" }), _jsx(Input, { id: "username", defaultValue: "@peduarte", className: "col-span-3" })] })] }), _jsx(DialogFooter, { children: _jsx(Button, { type: "submit", children: "Save changes" }) })] })] })),
20
+ };
21
+ export const Confirmation = {
22
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "destructive", children: "Delete Account" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Delete Account" }), _jsx(DialogDescription, { children: "Are you sure you want to delete your account? This action cannot be undone." })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Cancel" }), _jsx(Button, { variant: "destructive", children: "Delete" })] })] })] })),
23
+ };
24
+ export const Notification = {
25
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Show Notification" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Success!" }), _jsx(DialogDescription, { children: "Your changes have been saved successfully." })] }), _jsx(DialogFooter, { children: _jsx(Button, { children: "OK" }) })] })] })),
26
+ };
27
+ export const CustomContent = {
28
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "View Details" }) }), _jsxs(DialogContent, { className: "sm:max-w-[600px]", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Project Details" }), _jsx(DialogDescription, { children: "Review the project information below." })] }), _jsxs("div", { className: "grid gap-4 py-4", children: [_jsxs("div", { className: "grid gap-2", children: [_jsx("h4", { className: "font-semibold", children: "Description" }), _jsx("p", { className: "text-sm text-[var(--tekton-bg-muted-foreground)]", children: "This is a comprehensive project management system built with modern technologies." })] }), _jsxs("div", { className: "grid gap-2", children: [_jsx("h4", { className: "font-semibold", children: "Technologies" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("span", { className: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold", children: "React" }), _jsx("span", { className: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold", children: "TypeScript" }), _jsx("span", { className: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold", children: "Tailwind" })] })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Close" }), _jsx(Button, { children: "Learn More" })] })] })] })),
29
+ };
30
+ export const NoDescription = {
31
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Simple Dialog" }) }), _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: "Quick Message" }) }), _jsx("p", { className: "text-sm", children: "This is a simple dialog without a description." }), _jsx(DialogFooter, { children: _jsx(Button, { children: "Close" }) })] })] })),
32
+ };
33
+ export const Scrollable = {
34
+ render: () => (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Terms and Conditions" }) }), _jsxs(DialogContent, { className: "sm:max-w-[600px] max-h-[80vh]", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Terms and Conditions" }), _jsx(DialogDescription, { children: "Please read our terms and conditions carefully." })] }), _jsx("div", { className: "overflow-y-auto max-h-[400px] pr-4", children: Array.from({ length: 10 }).map((_, i) => (_jsx("p", { className: "mb-4 text-sm", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris." }, i))) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Decline" }), _jsx(Button, { children: "Accept" })] })] })] })),
35
+ };
36
+ //# sourceMappingURL=dialog.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.stories.js","sourceRoot":"","sources":["../../../src/components/dialog.stories.jsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,GAAG,MAAM,UAAU,CAAC;AAC7H,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AACF,eAAe,IAAI,CAAC;AAKpB,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAC,MAAM,eACpB,KAAC,aAAa,IAAC,OAAO,kBACpB,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,4BAAqB,GAChC,EAChB,MAAC,aAAa,eACZ,MAAC,YAAY,eACX,KAAC,WAAW,2CAAuC,EACnD,KAAC,iBAAiB,iIAGE,IACP,EACf,KAAC,YAAY,cACX,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,wBAAiB,GACzB,IACD,IACT,CAAC;CACb,CAAC;AAIF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAC,MA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,WAAW,gCAA4B,GAC3B,EACf,YAAG,SAAS,EAAC,SAAS,+DAAmD,EACzE,KAAC,YAAY,cACX,KAAC,MAAM,wBAAe,GACT,IACD,IACT,CAAC;CACb,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAC,MAAM,eACpB,KAAC,aAAa,IAAC,OAAO,kBACpB,KAAC,MAAM,uCAA8B,GACvB,EAChB,MAAC,aAAa,IAAC,SAAS,EAAC,+BAA+B,aACtD,MAAC,YAAY,eACX,KAAC,WAAW,uCAAmC,EAC/C,KAAC,iBAAiB,kEAAoE,IACzE,EACf,cAAK,SAAS,EAAC,oCAAoC,YAChD,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,YAAW,SAAS,EAAC,cAAc,iNAA3B,CAAC,CAI9C,CAAC,CAAC,GACJ,EACN,MAAC,YAAY,eACX,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,wBAAiB,EAC1C,KAAC,MAAM,yBAAgB,IACV,IACD,IACT,CAAC;CACb,CAAC"}
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
28
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAIvE,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAChD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAC1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AACtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AACxD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAClD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAE0D,OAAO;wCAc3F,CAAC;AAGH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAGH,QAAA,MAAM,mBAAmB,0KAevB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAE0D,OAAO;wCAWrF,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAE0D,OAAO;wCAWtF,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAI3F,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
+ import { Check, ChevronRight, Circle } from 'lucide-react';
5
+ import { cn } from '../lib/utils';
6
+ const DropdownMenu = DropdownMenuPrimitive.Root;
7
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
8
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
9
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
10
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
11
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
12
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-[var(--tekton-radius-sm)] px-[var(--tekton-spacing-2)] py-[var(--tekton-spacing-2)] text-sm outline-none focus:bg-[var(--tekton-bg-accent)] data-[state=open]:bg-[var(--tekton-bg-accent)]', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
13
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
14
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-[var(--tekton-radius-md)] border border-[var(--tekton-border-default)] bg-[var(--tekton-bg-popover)] p-1 text-[var(--tekton-bg-popover-foreground)] shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
15
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
16
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-[var(--tekton-radius-md)] border border-[var(--tekton-border-default)] bg-[var(--tekton-bg-popover)] p-1 text-[var(--tekton-bg-popover-foreground)] shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
17
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
18
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-[var(--tekton-radius-sm)] px-[var(--tekton-spacing-2)] py-[var(--tekton-spacing-2)] text-sm outline-none transition-colors focus:bg-[var(--tekton-bg-accent)] focus:text-[var(--tekton-bg-accent-foreground)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
19
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
20
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-[var(--tekton-radius-sm)] py-[var(--tekton-spacing-2)] pl-8 pr-[var(--tekton-spacing-2)] text-sm outline-none transition-colors focus:bg-[var(--tekton-bg-accent)] focus:text-[var(--tekton-bg-accent-foreground)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
21
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
22
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-[var(--tekton-radius-sm)] py-[var(--tekton-spacing-2)] pl-8 pr-[var(--tekton-spacing-2)] text-sm outline-none transition-colors focus:bg-[var(--tekton-bg-accent)] focus:text-[var(--tekton-bg-accent-foreground)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
23
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
24
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-[var(--tekton-spacing-2)] py-[var(--tekton-spacing-2)] text-sm font-semibold', inset && 'pl-8', className), ...props })));
25
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
26
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-[var(--tekton-bg-muted)]', className), ...props })));
27
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
28
+ const DropdownMenuShortcut = ({ className, ...props }) => {
29
+ return (_jsx("span", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));
30
+ };
31
+ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
32
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
33
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/components/dropdown-menu.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAChD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC;AAC1D,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAC;AACtD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAC;AACxD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAC;AAClD,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,UAAU,CAAC;AAEhE,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAG7C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG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GACvB,CAAC"}
@@ -0,0 +1,30 @@
1
+ export default meta;
2
+ export namespace Default {
3
+ function render(): import("react/jsx-runtime").JSX.Element;
4
+ }
5
+ export namespace WithShortcuts {
6
+ export function render_1(): import("react/jsx-runtime").JSX.Element;
7
+ export { render_1 as render };
8
+ }
9
+ export namespace WithCheckboxes {
10
+ export function render_2(): import("react/jsx-runtime").JSX.Element;
11
+ export { render_2 as render };
12
+ }
13
+ export namespace WithRadioGroup {
14
+ export function render_3(): import("react/jsx-runtime").JSX.Element;
15
+ export { render_3 as render };
16
+ }
17
+ export namespace WithSubmenu {
18
+ export function render_4(): import("react/jsx-runtime").JSX.Element;
19
+ export { render_4 as render };
20
+ }
21
+ declare namespace meta {
22
+ export let title: string;
23
+ export { DropdownMenu as component };
24
+ export namespace parameters {
25
+ let layout: string;
26
+ }
27
+ export let tags: string[];
28
+ }
29
+ import { DropdownMenu } from './dropdown-menu';
30
+ //# sourceMappingURL=dropdown-menu.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.stories.jsx"],"names":[],"mappings":";;IAuBY,2DAaQ;;;IAMR,oEA6BQ;;;;IAMR,oEAsBP;;;;IAMO,oEAgBP;;;;IAMO,oEAuBQ;;;;;;;;;;;6BA/ImS,iBAAiB"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, } from './dropdown-menu';
4
+ import { Button } from './button';
5
+ const meta = {
6
+ title: 'Components/DropdownMenu',
7
+ component: DropdownMenu,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ tags: ['autodocs'],
12
+ };
13
+ export default meta;
14
+ export const Default = {
15
+ render: () => (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open" }) }), _jsxs(DropdownMenuContent, { children: [_jsx(DropdownMenuLabel, { children: "My Account" }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { children: "Profile" }), _jsx(DropdownMenuItem, { children: "Settings" }), _jsx(DropdownMenuItem, { children: "Team" }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { children: "Logout" })] })] })),
16
+ };
17
+ export const WithShortcuts = {
18
+ render: () => (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Edit" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "Edit" }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { children: ["Undo", _jsx(DropdownMenuShortcut, { children: "\u2318Z" })] }), _jsxs(DropdownMenuItem, { children: ["Redo", _jsx(DropdownMenuShortcut, { children: "\u2318Y" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { children: ["Cut", _jsx(DropdownMenuShortcut, { children: "\u2318X" })] }), _jsxs(DropdownMenuItem, { children: ["Copy", _jsx(DropdownMenuShortcut, { children: "\u2318C" })] }), _jsxs(DropdownMenuItem, { children: ["Paste", _jsx(DropdownMenuShortcut, { children: "\u2318V" })] })] })] })),
19
+ };
20
+ export const WithCheckboxes = {
21
+ render: () => {
22
+ const [showStatusBar, setShowStatusBar] = React.useState(true);
23
+ const [showActivityBar, setShowActivityBar] = React.useState(false);
24
+ const [showPanel, setShowPanel] = React.useState(false);
25
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "View" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "Appearance" }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuCheckboxItem, { checked: showStatusBar, onCheckedChange: setShowStatusBar, children: "Status Bar" }), _jsx(DropdownMenuCheckboxItem, { checked: showActivityBar, onCheckedChange: setShowActivityBar, children: "Activity Bar" }), _jsx(DropdownMenuCheckboxItem, { checked: showPanel, onCheckedChange: setShowPanel, children: "Panel" })] })] }));
26
+ },
27
+ };
28
+ export const WithRadioGroup = {
29
+ render: () => {
30
+ const [position, setPosition] = React.useState('bottom');
31
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Panel Position" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "Panel Position" }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuRadioGroup, { value: position, onValueChange: setPosition, children: [_jsx(DropdownMenuRadioItem, { value: "top", children: "Top" }), _jsx(DropdownMenuRadioItem, { value: "bottom", children: "Bottom" }), _jsx(DropdownMenuRadioItem, { value: "right", children: "Right" })] })] })] }));
32
+ },
33
+ };
34
+ export const WithSubmenu = {
35
+ render: () => (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "More Options" }) }), _jsxs(DropdownMenuContent, { className: "w-56", children: [_jsx(DropdownMenuLabel, { children: "Options" }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuItem, { children: "Profile" }), _jsx(DropdownMenuItem, { children: "Billing" }), _jsx(DropdownMenuItem, { children: "Settings" }), _jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, { children: "More Tools" }), _jsxs(DropdownMenuSubContent, { children: [_jsx(DropdownMenuItem, { children: "Save Page As..." }), _jsx(DropdownMenuItem, { children: "Create Shortcut..." }), _jsx(DropdownMenuItem, { children: "Name Window..." }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { children: "Developer Tools" })] })] })] })] })] })),
36
+ };
37
+ //# sourceMappingURL=dropdown-menu.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.stories.js","sourceRoot":"","sources":["../../../src/components/dropdown-menu.stories.jsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,GAAG,MAAM,iBAAiB,CAAC;AACzU,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AACF,eAAe,IAAI,CAAC;AAKpB,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,MAAC,YAAY,eAC1B,KAAC,mBAAmB,IAAC,OAAO,kBAC1B,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,qBAAc,GACnB,EACtB,MAAC,mBAAmB,eAClB,KAAC,iBAAiB,6BAA+B,EACjD,KAAC,qBAAqB,KAAG,EACzB,KAAC,gBAAgB,0BAA2B,EAC5C,KAAC,gBAAgB,2BAA4B,EAC7C,KAAC,gBAAgB,uBAAwB,EACzC,KAAC,qBAAqB,KAAG,EACzB,KAAC,gBAAgB,yBAA0B,IACvB,IACT,CAAC;CACnB,CAAC;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,EAAE,GAA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AAgB,2BAA4B,EAC7C,MAAC,eAAe,eACd,KAAC,sBAAsB,6BAAoC,EAC3D,MAAC,sBAAsB,eACrB,KAAC,gBAAgB,kCAAmC,EACpD,KAAC,gBAAgB,qCAAsC,EACvD,KAAC,gBAAgB,iCAAkC,EACnD,KAAC,qBAAqB,KAAG,EACzB,KAAC,gBAAgB,kCAAmC,IAC7B,IACT,IACA,IACA,IACT,CAAC;CACnB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { ControllerProps, FieldPath, FieldValues, FormProviderProps } from 'react-hook-form';
4
+ declare const Form: <TFieldValues extends FieldValues = FieldValues, TContext = unknown>(props: FormProviderProps<TFieldValues, TContext>) => React.ReactElement;
5
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const useFormField: () => {
7
+ invalid: boolean;
8
+ isDirty: boolean;
9
+ isTouched: boolean;
10
+ isValidating: boolean;
11
+ error?: import("react-hook-form").FieldError;
12
+ id: string;
13
+ name: string;
14
+ formItemId: string;
15
+ formDescriptionId: string;
16
+ formMessageId: string;
17
+ };
18
+ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
21
+ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
22
+ declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
24
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/form.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAEX,iBAAiB,EAElB,MAAM,iBAAiB,CAAC;AAIzB,QAAA,MAAM,IAAI,EAAE,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,QAAQ,GAAG,OAAO,EAC7E,KAAK,EAAE,iBAAiB,CAAC,YAAY,EAAE,QAAQ,CAAC,KAC7C,KAAK,CAAC,YAA2B,CAAC;AAWvC,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAQF,QAAA,MAAM,QAAQ,6GAUb,CAAC;AAGF,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAef,CAAC;AAGH,QAAA,MAAM,eAAe,yHAcnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAqBf,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import { Controller, FormProvider, useFormContext, } from 'react-hook-form';
6
+ import { cn } from '../lib/utils';
7
+ import { Label } from './label';
8
+ const Form = FormProvider;
9
+ const FormFieldContext = React.createContext({});
10
+ const FormField = ({ ...props }) => {
11
+ return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
12
+ };
13
+ const useFormField = () => {
14
+ const fieldContext = React.useContext(FormFieldContext);
15
+ const itemContext = React.useContext(FormItemContext);
16
+ const { getFieldState, formState } = useFormContext();
17
+ const fieldState = getFieldState(fieldContext.name, formState);
18
+ if (!fieldContext) {
19
+ throw new Error('useFormField should be used within <FormField>');
20
+ }
21
+ const { id } = itemContext;
22
+ return {
23
+ id,
24
+ name: fieldContext.name,
25
+ formItemId: `${id}-form-item`,
26
+ formDescriptionId: `${id}-form-item-description`,
27
+ formMessageId: `${id}-form-item-message`,
28
+ ...fieldState,
29
+ };
30
+ };
31
+ const FormItemContext = React.createContext({});
32
+ const FormItem = React.forwardRef(({ className, ...props }, ref) => {
33
+ const id = React.useId();
34
+ return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { ref: ref, className: cn('space-y-[var(--tekton-spacing-2)]', className), ...props }) }));
35
+ });
36
+ FormItem.displayName = 'FormItem';
37
+ const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
38
+ const { error, formItemId } = useFormField();
39
+ return (_jsx(Label, { ref: ref, className: cn(error && 'text-[var(--tekton-bg-destructive)]', className), htmlFor: formItemId, ...props }));
40
+ });
41
+ FormLabel.displayName = 'FormLabel';
42
+ const FormControl = React.forwardRef(({ ...props }, ref) => {
43
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
44
+ return (_jsx(Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
45
+ });
46
+ FormControl.displayName = 'FormControl';
47
+ const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
48
+ const { formDescriptionId } = useFormField();
49
+ return (_jsx("p", { ref: ref, id: formDescriptionId, className: cn('text-sm text-[var(--tekton-bg-muted-foreground)]', className), ...props }));
50
+ });
51
+ FormDescription.displayName = 'FormDescription';
52
+ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
53
+ const { error, formMessageId } = useFormField();
54
+ const body = error ? String(error?.message) : children;
55
+ if (!body) {
56
+ return null;
57
+ }
58
+ return (_jsx("p", { ref: ref, id: formMessageId, className: cn('text-sm font-medium text-[var(--tekton-bg-destructive)]', className), ...props, children: body }));
59
+ });
60
+ FormMessage.displayName = 'FormMessage';
61
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
62
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/components/form.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAab,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EACL,UAAU,EAIV,YAAY,EAEZ,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,IAAI,GAEgB,YAAY,CAAC;AASvC,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAwB,EAA2B,CAAC,CAAC;AAEjG,MAAM,SAAS,GAAG,CAGhB,EACA,GAAG,KAAK,EAC6B,EAAE,EAAE;IACzC,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,YACpD,KAAC,UAAU,OAAK,KAAK,GAAI,GACC,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,YAAY,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,GAAG,iBAAiB,CAAC;AAEhD,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3C,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,CAAC;IAChD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,YACE,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,EAAE,CAAC,yDAAyD,EAAE,SAAS,CAAC,KAC/E,KAAK,YAER,IAAI,GACH,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
@@ -0,0 +1,34 @@
1
+ export default meta;
2
+ export namespace Simple {
3
+ function render(): import("react/jsx-runtime").JSX.Element;
4
+ }
5
+ export namespace ProfileForm {
6
+ export function render_1(): import("react/jsx-runtime").JSX.Element;
7
+ export { render_1 as render };
8
+ }
9
+ export namespace WithSelect {
10
+ export function render_2(): import("react/jsx-runtime").JSX.Element;
11
+ export { render_2 as render };
12
+ }
13
+ export namespace WithCheckbox {
14
+ export function render_3(): import("react/jsx-runtime").JSX.Element;
15
+ export { render_3 as render };
16
+ }
17
+ export namespace WithRadioGroup {
18
+ export function render_4(): import("react/jsx-runtime").JSX.Element;
19
+ export { render_4 as render };
20
+ }
21
+ export namespace WithSwitch {
22
+ export function render_5(): import("react/jsx-runtime").JSX.Element;
23
+ export { render_5 as render };
24
+ }
25
+ declare namespace meta {
26
+ export let title: string;
27
+ export { Form as component };
28
+ export namespace parameters {
29
+ let layout: string;
30
+ }
31
+ export let tags: string[];
32
+ }
33
+ import { Form } from './form';
34
+ //# sourceMappingURL=form.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.stories.d.ts","sourceRoot":"","sources":["../../../src/components/form.stories.jsx"],"names":[],"mappings":";;IA+BY,2DA4BP;;;IAMO,oEAkDP;;;;IAMO,oEAmCP;;;;IAMO,oEAgCP;;;;IAMO,oEA6CP;;;;IAMO,oEA0CP;;;;;;;;;;;qBA5R4F,QAAQ"}
@@ -0,0 +1,132 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useForm } from 'react-hook-form';
3
+ import { zodResolver } from '@hookform/resolvers/zod';
4
+ import * as z from 'zod';
5
+ import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from './form';
6
+ import { Input } from './input';
7
+ import { Textarea } from './textarea';
8
+ import { Button } from './button';
9
+ import { Checkbox } from './checkbox';
10
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './select';
11
+ import { RadioGroup, RadioGroupItem } from './radio-group';
12
+ import { Switch } from './switch';
13
+ const meta = {
14
+ title: 'Components/Form',
15
+ component: Form,
16
+ parameters: {
17
+ layout: 'centered',
18
+ },
19
+ tags: ['autodocs'],
20
+ };
21
+ export default meta;
22
+ export const Simple = {
23
+ render: () => {
24
+ const formSchema = z.object({
25
+ username: z.string().min(2, {
26
+ message: 'Username must be at least 2 characters.',
27
+ }),
28
+ });
29
+ const form = useForm({
30
+ resolver: zodResolver(formSchema),
31
+ defaultValues: {
32
+ username: '',
33
+ },
34
+ });
35
+ function onSubmit(values) {
36
+ console.log(values);
37
+ }
38
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-[350px] space-y-6", children: [_jsx(FormField, { control: form.control, name: "username", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "Username" }), _jsx(FormControl, { children: _jsx(Input, { placeholder: "shadcn", ...field }) }), _jsx(FormDescription, { children: "This is your public display name." }), _jsx(FormMessage, {})] })) }), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
39
+ },
40
+ };
41
+ export const ProfileForm = {
42
+ render: () => {
43
+ const formSchema = z.object({
44
+ username: z.string().min(2).max(30),
45
+ email: z.string().email(),
46
+ bio: z.string().max(160).optional(),
47
+ });
48
+ const form = useForm({
49
+ resolver: zodResolver(formSchema),
50
+ defaultValues: {
51
+ username: '',
52
+ email: '',
53
+ bio: '',
54
+ },
55
+ });
56
+ function onSubmit(values) {
57
+ console.log(values);
58
+ }
59
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-[400px] space-y-6", children: [_jsx(FormField, { control: form.control, name: "username", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "Username" }), _jsx(FormControl, { children: _jsx(Input, { placeholder: "johndoe", ...field }) }), _jsx(FormDescription, { children: "This is your public display name. It can be your real name or a pseudonym." }), _jsx(FormMessage, {})] })) }), _jsx(FormField, { control: form.control, name: "email", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "Email" }), _jsx(FormControl, { children: _jsx(Input, { type: "email", placeholder: "john@example.com", ...field }) }), _jsx(FormDescription, { children: "We'll never share your email with anyone." }), _jsx(FormMessage, {})] })) }), _jsx(FormField, { control: form.control, name: "bio", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "Bio" }), _jsx(FormControl, { children: _jsx(Textarea, { placeholder: "Tell us about yourself", ...field }) }), _jsx(FormDescription, { children: "Brief description for your profile. Max 160 characters." }), _jsx(FormMessage, {})] })) }), _jsx(Button, { type: "submit", children: "Update profile" })] }) }));
60
+ },
61
+ };
62
+ export const WithSelect = {
63
+ render: () => {
64
+ const formSchema = z.object({
65
+ country: z.string({
66
+ required_error: 'Please select a country.',
67
+ }),
68
+ });
69
+ const form = useForm({
70
+ resolver: zodResolver(formSchema),
71
+ });
72
+ function onSubmit(values) {
73
+ console.log(values);
74
+ }
75
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-[350px] space-y-6", children: [_jsx(FormField, { control: form.control, name: "country", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "Country" }), _jsxs(Select, { onValueChange: field.onChange, defaultValue: field.value, children: [_jsx(FormControl, { children: _jsx(SelectTrigger, { children: _jsx(SelectValue, { placeholder: "Select a country" }) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "us", children: "United States" }), _jsx(SelectItem, { value: "uk", children: "United Kingdom" }), _jsx(SelectItem, { value: "ca", children: "Canada" }), _jsx(SelectItem, { value: "au", children: "Australia" })] })] }), _jsx(FormDescription, { children: "Select your country of residence." }), _jsx(FormMessage, {})] })) }), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
76
+ },
77
+ };
78
+ export const WithCheckbox = {
79
+ render: () => {
80
+ const formSchema = z.object({
81
+ terms: z.boolean().refine(val => val === true, {
82
+ message: 'You must accept the terms and conditions',
83
+ }),
84
+ });
85
+ const form = useForm({
86
+ resolver: zodResolver(formSchema),
87
+ defaultValues: {
88
+ terms: false,
89
+ },
90
+ });
91
+ function onSubmit(values) {
92
+ console.log(values);
93
+ }
94
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-[350px] space-y-6", children: [_jsx(FormField, { control: form.control, name: "terms", render: ({ field }) => (_jsxs(FormItem, { className: "flex flex-row items-start space-x-3 space-y-0", children: [_jsx(FormControl, { children: _jsx(Checkbox, { checked: field.value, onCheckedChange: field.onChange }) }), _jsxs("div", { className: "space-y-1 leading-none", children: [_jsx(FormLabel, { children: "Accept terms and conditions" }), _jsx(FormDescription, { children: "You agree to our Terms of Service and Privacy Policy." })] })] })) }), _jsx(FormMessage, {}), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
95
+ },
96
+ };
97
+ export const WithRadioGroup = {
98
+ render: () => {
99
+ const formSchema = z.object({
100
+ type: z.enum(['all', 'mentions', 'none'], {
101
+ required_error: 'You need to select a notification type.',
102
+ }),
103
+ });
104
+ const form = useForm({
105
+ resolver: zodResolver(formSchema),
106
+ });
107
+ function onSubmit(values) {
108
+ console.log(values);
109
+ }
110
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-[350px] space-y-6", children: [_jsx(FormField, { control: form.control, name: "type", render: ({ field }) => (_jsxs(FormItem, { className: "space-y-3", children: [_jsx(FormLabel, { children: "Notify me about..." }), _jsx(FormControl, { children: _jsxs(RadioGroup, { onValueChange: field.onChange, defaultValue: field.value, className: "flex flex-col space-y-1", children: [_jsxs(FormItem, { className: "flex items-center space-x-3 space-y-0", children: [_jsx(FormControl, { children: _jsx(RadioGroupItem, { value: "all" }) }), _jsx(FormLabel, { className: "font-normal cursor-pointer", children: "All new messages" })] }), _jsxs(FormItem, { className: "flex items-center space-x-3 space-y-0", children: [_jsx(FormControl, { children: _jsx(RadioGroupItem, { value: "mentions" }) }), _jsx(FormLabel, { className: "font-normal cursor-pointer", children: "Direct messages and mentions" })] }), _jsxs(FormItem, { className: "flex items-center space-x-3 space-y-0", children: [_jsx(FormControl, { children: _jsx(RadioGroupItem, { value: "none" }) }), _jsx(FormLabel, { className: "font-normal cursor-pointer", children: "Nothing" })] })] }) }), _jsx(FormMessage, {})] })) }), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
111
+ },
112
+ };
113
+ export const WithSwitch = {
114
+ render: () => {
115
+ const formSchema = z.object({
116
+ marketing_emails: z.boolean().default(false),
117
+ security_emails: z.boolean(),
118
+ });
119
+ const form = useForm({
120
+ resolver: zodResolver(formSchema),
121
+ defaultValues: {
122
+ marketing_emails: false,
123
+ security_emails: true,
124
+ },
125
+ });
126
+ function onSubmit(values) {
127
+ console.log(values);
128
+ }
129
+ return (_jsx(Form, { ...form, children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "w-full max-w-sm space-y-6", children: [_jsxs("div", { className: "space-y-4", children: [_jsx(FormField, { control: form.control, name: "marketing_emails", render: ({ field }) => (_jsxs(FormItem, { className: "flex flex-row items-center justify-between rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-0.5", children: [_jsx(FormLabel, { className: "text-base", children: "Marketing emails" }), _jsx(FormDescription, { children: "Receive emails about new products and features." })] }), _jsx(FormControl, { children: _jsx(Switch, { checked: field.value, onCheckedChange: field.onChange }) })] })) }), _jsx(FormField, { control: form.control, name: "security_emails", render: ({ field }) => (_jsxs(FormItem, { className: "flex flex-row items-center justify-between rounded-lg border p-4", children: [_jsxs("div", { className: "space-y-0.5", children: [_jsx(FormLabel, { className: "text-base", children: "Security emails" }), _jsx(FormDescription, { children: "Receive emails about your account security." })] }), _jsx(FormControl, { children: _jsx(Switch, { checked: field.value, onCheckedChange: field.onChange }) })] })) })] }), _jsx(Button, { type: "submit", children: "Submit" })] }) }));
130
+ },
131
+ };
132
+ //# sourceMappingURL=form.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.stories.js","sourceRoot":"","sources":["../../../src/components/form.stories.jsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,GAAG,MAAM,QAAQ,CAAC;AAC1G,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAA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AAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,iBAAiB,EAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,MAAC,QAAQ,IAAC,SAAS,EAAC,kEAAkE,aACjK,eAAK,SAAS,EAAC,aAAa,aAC1B,KAAC,SAAS,IAAC,SAAS,EAAC,WAAW,gCAA4B,EAC5D,KAAC,eAAe,8DAA8D,IAC1E,EACN,KAAC,WAAW,cACV,KAAC,MAAM,IAAC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,QAAQ,GAAG,GACpD,IACL,CAAC,GAAG,IACf,EACN,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,uBAAgB,IAChC,GACF,CAAC,CAAC;IACX,CAAC;CACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
3
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
4
+ export { Input };
5
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAErE,QAAA,MAAM,KAAK,qFAcV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from '../lib/utils';
4
+ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
5
+ return (_jsx("input", { type: type, className: cn('flex h-10 w-full rounded-[var(--tekton-radius-md)] border border-[var(--tekton-border-input)] bg-[var(--tekton-bg-background)] px-[var(--tekton-spacing-3)] py-[var(--tekton-spacing-2)] text-sm ring-offset-[var(--tekton-bg-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[var(--tekton-bg-muted-foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tekton-border-ring)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', className), ref: ref, ...props }));
6
+ });
7
+ Input.displayName = 'Input';
8
+ export { Input };
9
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,4gBAA4gB,EAC5gB,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}