@forthtilliath/forth-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 (412) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +279 -0
  3. package/dist/components/accordion/accordion-items.d.ts +3 -0
  4. package/dist/components/accordion/accordion-items.d.ts.map +1 -0
  5. package/dist/components/accordion/accordion-items.js +18 -0
  6. package/dist/components/accordion/accordion-multiple.d.ts +3 -0
  7. package/dist/components/accordion/accordion-multiple.d.ts.map +1 -0
  8. package/dist/components/accordion/accordion-multiple.js +8 -0
  9. package/dist/components/accordion/accordion-single.d.ts +3 -0
  10. package/dist/components/accordion/accordion-single.d.ts.map +1 -0
  11. package/dist/components/accordion/accordion-single.js +8 -0
  12. package/dist/components/accordion/accordion.d.ts +17 -0
  13. package/dist/components/accordion/accordion.d.ts.map +1 -0
  14. package/dist/components/accordion/accordion.js +23 -0
  15. package/dist/components/accordion/index.d.ts +2 -0
  16. package/dist/components/accordion/index.d.ts.map +1 -0
  17. package/dist/components/accordion/index.js +1 -0
  18. package/dist/components/accordion/types.d.ts +100 -0
  19. package/dist/components/accordion/types.d.ts.map +1 -0
  20. package/dist/components/accordion/types.js +1 -0
  21. package/dist/components/accordion/variants.d.ts +25 -0
  22. package/dist/components/accordion/variants.d.ts.map +1 -0
  23. package/dist/components/accordion/variants.js +96 -0
  24. package/dist/components/alert/alert.d.ts +38 -0
  25. package/dist/components/alert/alert.d.ts.map +1 -0
  26. package/dist/components/alert/alert.js +32 -0
  27. package/dist/components/alert/index.d.ts +5 -0
  28. package/dist/components/alert/index.d.ts.map +1 -0
  29. package/dist/components/alert/index.js +4 -0
  30. package/dist/components/alert/variants.d.ts +8 -0
  31. package/dist/components/alert/variants.d.ts.map +1 -0
  32. package/dist/components/alert/variants.js +110 -0
  33. package/dist/components/avatar/avatar-group.d.ts +26 -0
  34. package/dist/components/avatar/avatar-group.d.ts.map +1 -0
  35. package/dist/components/avatar/avatar-group.js +29 -0
  36. package/dist/components/avatar/avatar.d.ts +107 -0
  37. package/dist/components/avatar/avatar.d.ts.map +1 -0
  38. package/dist/components/avatar/avatar.js +26 -0
  39. package/dist/components/avatar/constants.d.ts +13 -0
  40. package/dist/components/avatar/constants.d.ts.map +1 -0
  41. package/dist/components/avatar/constants.js +8 -0
  42. package/dist/components/avatar/index.d.ts +5 -0
  43. package/dist/components/avatar/index.d.ts.map +1 -0
  44. package/dist/components/avatar/index.js +2 -0
  45. package/dist/components/avatar/variants.d.ts +31 -0
  46. package/dist/components/avatar/variants.d.ts.map +1 -0
  47. package/dist/components/avatar/variants.js +147 -0
  48. package/dist/components/badge/badge.d.ts +48 -0
  49. package/dist/components/badge/badge.d.ts.map +1 -0
  50. package/dist/components/badge/badge.js +33 -0
  51. package/dist/components/badge/index.d.ts +4 -0
  52. package/dist/components/badge/index.d.ts.map +1 -0
  53. package/dist/components/badge/index.js +1 -0
  54. package/dist/components/badge/variants.d.ts +12 -0
  55. package/dist/components/badge/variants.d.ts.map +1 -0
  56. package/dist/components/badge/variants.js +134 -0
  57. package/dist/components/banner/banner.d.ts +43 -0
  58. package/dist/components/banner/banner.d.ts.map +1 -0
  59. package/dist/components/banner/banner.js +44 -0
  60. package/dist/components/banner/index.d.ts +4 -0
  61. package/dist/components/banner/index.d.ts.map +1 -0
  62. package/dist/components/banner/index.js +1 -0
  63. package/dist/components/banner/variants.d.ts +9 -0
  64. package/dist/components/banner/variants.d.ts.map +1 -0
  65. package/dist/components/banner/variants.js +111 -0
  66. package/dist/components/bento-grid/bento-grid.d.ts +23 -0
  67. package/dist/components/bento-grid/bento-grid.d.ts.map +1 -0
  68. package/dist/components/bento-grid/bento-grid.js +30 -0
  69. package/dist/components/bento-grid/index.d.ts +3 -0
  70. package/dist/components/bento-grid/index.d.ts.map +1 -0
  71. package/dist/components/bento-grid/index.js +1 -0
  72. package/dist/components/breadcrumb/breadcrumb.d.ts +29 -0
  73. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  74. package/dist/components/breadcrumb/breadcrumb.js +28 -0
  75. package/dist/components/breadcrumb/index.d.ts +3 -0
  76. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  77. package/dist/components/breadcrumb/index.js +1 -0
  78. package/dist/components/button/button-group.d.ts +16 -0
  79. package/dist/components/button/button-group.d.ts.map +1 -0
  80. package/dist/components/button/button-group.js +13 -0
  81. package/dist/components/button/button.d.ts +28 -0
  82. package/dist/components/button/button.d.ts.map +1 -0
  83. package/dist/components/button/button.js +20 -0
  84. package/dist/components/button/index.d.ts +6 -0
  85. package/dist/components/button/index.d.ts.map +1 -0
  86. package/dist/components/button/index.js +2 -0
  87. package/dist/components/button/variants.d.ts +7 -0
  88. package/dist/components/button/variants.d.ts.map +1 -0
  89. package/dist/components/button/variants.js +27 -0
  90. package/dist/components/checkbox/checkbox-group.d.ts +30 -0
  91. package/dist/components/checkbox/checkbox-group.d.ts.map +1 -0
  92. package/dist/components/checkbox/checkbox-group.js +32 -0
  93. package/dist/components/checkbox/index.d.ts +3 -0
  94. package/dist/components/checkbox/index.d.ts.map +1 -0
  95. package/dist/components/checkbox/index.js +1 -0
  96. package/dist/components/chip/chip.d.ts +27 -0
  97. package/dist/components/chip/chip.d.ts.map +1 -0
  98. package/dist/components/chip/chip.js +18 -0
  99. package/dist/components/chip/index.d.ts +3 -0
  100. package/dist/components/chip/index.d.ts.map +1 -0
  101. package/dist/components/chip/index.js +1 -0
  102. package/dist/components/code-block/code-block.d.ts +31 -0
  103. package/dist/components/code-block/code-block.d.ts.map +1 -0
  104. package/dist/components/code-block/code-block.js +57 -0
  105. package/dist/components/code-block/index.d.ts +3 -0
  106. package/dist/components/code-block/index.d.ts.map +1 -0
  107. package/dist/components/code-block/index.js +1 -0
  108. package/dist/components/collapsible/collapsible.d.ts +41 -0
  109. package/dist/components/collapsible/collapsible.d.ts.map +1 -0
  110. package/dist/components/collapsible/collapsible.js +50 -0
  111. package/dist/components/collapsible/index.d.ts +7 -0
  112. package/dist/components/collapsible/index.d.ts.map +1 -0
  113. package/dist/components/collapsible/index.js +3 -0
  114. package/dist/components/color-picker/color-picker.d.ts +24 -0
  115. package/dist/components/color-picker/color-picker.d.ts.map +1 -0
  116. package/dist/components/color-picker/color-picker.js +40 -0
  117. package/dist/components/color-picker/index.d.ts +3 -0
  118. package/dist/components/color-picker/index.d.ts.map +1 -0
  119. package/dist/components/color-picker/index.js +1 -0
  120. package/dist/components/combobox/combobox.d.ts +31 -0
  121. package/dist/components/combobox/combobox.d.ts.map +1 -0
  122. package/dist/components/combobox/combobox.js +30 -0
  123. package/dist/components/combobox/index.d.ts +5 -0
  124. package/dist/components/combobox/index.d.ts.map +1 -0
  125. package/dist/components/combobox/index.js +2 -0
  126. package/dist/components/combobox/multi-select.d.ts +30 -0
  127. package/dist/components/combobox/multi-select.d.ts.map +1 -0
  128. package/dist/components/combobox/multi-select.js +53 -0
  129. package/dist/components/command-palette/command-palette.d.ts +37 -0
  130. package/dist/components/command-palette/command-palette.d.ts.map +1 -0
  131. package/dist/components/command-palette/command-palette.js +46 -0
  132. package/dist/components/command-palette/index.d.ts +3 -0
  133. package/dist/components/command-palette/index.d.ts.map +1 -0
  134. package/dist/components/command-palette/index.js +1 -0
  135. package/dist/components/confirm-dialog/confirm-context.d.ts +15 -0
  136. package/dist/components/confirm-dialog/confirm-context.d.ts.map +1 -0
  137. package/dist/components/confirm-dialog/confirm-context.js +2 -0
  138. package/dist/components/confirm-dialog/confirm-dialog.d.ts +18 -0
  139. package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -0
  140. package/dist/components/confirm-dialog/confirm-dialog.js +40 -0
  141. package/dist/components/confirm-dialog/index.d.ts +4 -0
  142. package/dist/components/confirm-dialog/index.d.ts.map +1 -0
  143. package/dist/components/confirm-dialog/index.js +2 -0
  144. package/dist/components/confirm-dialog/use-confirm.d.ts +4 -0
  145. package/dist/components/confirm-dialog/use-confirm.d.ts.map +1 -0
  146. package/dist/components/confirm-dialog/use-confirm.js +10 -0
  147. package/dist/components/count-animation/count-animation.d.ts +20 -0
  148. package/dist/components/count-animation/count-animation.d.ts.map +1 -0
  149. package/dist/components/count-animation/count-animation.js +42 -0
  150. package/dist/components/count-animation/index.d.ts +3 -0
  151. package/dist/components/count-animation/index.d.ts.map +1 -0
  152. package/dist/components/count-animation/index.js +1 -0
  153. package/dist/components/date-picker/date-picker.d.ts +27 -0
  154. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  155. package/dist/components/date-picker/date-picker.js +37 -0
  156. package/dist/components/date-picker/index.d.ts +3 -0
  157. package/dist/components/date-picker/index.d.ts.map +1 -0
  158. package/dist/components/date-picker/index.js +1 -0
  159. package/dist/components/description-list/description-list.d.ts +16 -0
  160. package/dist/components/description-list/description-list.d.ts.map +1 -0
  161. package/dist/components/description-list/description-list.js +24 -0
  162. package/dist/components/description-list/index.d.ts +2 -0
  163. package/dist/components/description-list/index.d.ts.map +1 -0
  164. package/dist/components/description-list/index.js +1 -0
  165. package/dist/components/dropdrawer/dropdrawer.d.ts +27 -0
  166. package/dist/components/dropdrawer/dropdrawer.d.ts.map +1 -0
  167. package/dist/components/dropdrawer/dropdrawer.js +26 -0
  168. package/dist/components/dropdrawer/index.d.ts +3 -0
  169. package/dist/components/dropdrawer/index.d.ts.map +1 -0
  170. package/dist/components/dropdrawer/index.js +1 -0
  171. package/dist/components/dropzone/dropzone.d.ts +27 -0
  172. package/dist/components/dropzone/dropzone.d.ts.map +1 -0
  173. package/dist/components/dropzone/dropzone.js +83 -0
  174. package/dist/components/dropzone/index.d.ts +3 -0
  175. package/dist/components/dropzone/index.d.ts.map +1 -0
  176. package/dist/components/dropzone/index.js +1 -0
  177. package/dist/components/field/field.d.ts +41 -0
  178. package/dist/components/field/field.d.ts.map +1 -0
  179. package/dist/components/field/field.js +48 -0
  180. package/dist/components/field/index.d.ts +3 -0
  181. package/dist/components/field/index.d.ts.map +1 -0
  182. package/dist/components/field/index.js +1 -0
  183. package/dist/components/file-list/file-list.d.ts +29 -0
  184. package/dist/components/file-list/file-list.d.ts.map +1 -0
  185. package/dist/components/file-list/file-list.js +52 -0
  186. package/dist/components/file-list/index.d.ts +3 -0
  187. package/dist/components/file-list/index.d.ts.map +1 -0
  188. package/dist/components/file-list/index.js +1 -0
  189. package/dist/components/grid/context.d.ts +12 -0
  190. package/dist/components/grid/context.d.ts.map +1 -0
  191. package/dist/components/grid/context.js +5 -0
  192. package/dist/components/grid/grid-item.d.ts +14 -0
  193. package/dist/components/grid/grid-item.d.ts.map +1 -0
  194. package/dist/components/grid/grid-item.js +13 -0
  195. package/dist/components/grid/grid.d.ts +16 -0
  196. package/dist/components/grid/grid.d.ts.map +1 -0
  197. package/dist/components/grid/grid.js +19 -0
  198. package/dist/components/grid/index.d.ts +3 -0
  199. package/dist/components/grid/index.d.ts.map +1 -0
  200. package/dist/components/grid/index.js +2 -0
  201. package/dist/components/grid/variants.d.ts +16 -0
  202. package/dist/components/grid/variants.d.ts.map +1 -0
  203. package/dist/components/grid/variants.js +74 -0
  204. package/dist/components/image-input/image-input.d.ts +21 -0
  205. package/dist/components/image-input/image-input.d.ts.map +1 -0
  206. package/dist/components/image-input/image-input.js +45 -0
  207. package/dist/components/image-input/index.d.ts +3 -0
  208. package/dist/components/image-input/index.d.ts.map +1 -0
  209. package/dist/components/image-input/index.js +1 -0
  210. package/dist/components/infinite-scroll/index.d.ts +3 -0
  211. package/dist/components/infinite-scroll/index.d.ts.map +1 -0
  212. package/dist/components/infinite-scroll/index.js +1 -0
  213. package/dist/components/infinite-scroll/infinite-scroll.d.ts +20 -0
  214. package/dist/components/infinite-scroll/infinite-scroll.d.ts.map +1 -0
  215. package/dist/components/infinite-scroll/infinite-scroll.js +33 -0
  216. package/dist/components/kbd/index.d.ts +2 -0
  217. package/dist/components/kbd/index.d.ts.map +1 -0
  218. package/dist/components/kbd/index.js +1 -0
  219. package/dist/components/kbd/kbd.d.ts +15 -0
  220. package/dist/components/kbd/kbd.d.ts.map +1 -0
  221. package/dist/components/kbd/kbd.js +19 -0
  222. package/dist/components/link/index.d.ts +7 -0
  223. package/dist/components/link/index.d.ts.map +1 -0
  224. package/dist/components/link/index.js +3 -0
  225. package/dist/components/link/link-preview.d.ts +36 -0
  226. package/dist/components/link/link-preview.d.ts.map +1 -0
  227. package/dist/components/link/link-preview.js +27 -0
  228. package/dist/components/link/link.d.ts +27 -0
  229. package/dist/components/link/link.d.ts.map +1 -0
  230. package/dist/components/link/link.js +39 -0
  231. package/dist/components/link/variants.d.ts +8 -0
  232. package/dist/components/link/variants.d.ts.map +1 -0
  233. package/dist/components/link/variants.js +26 -0
  234. package/dist/components/marquee/index.d.ts +3 -0
  235. package/dist/components/marquee/index.d.ts.map +1 -0
  236. package/dist/components/marquee/index.js +1 -0
  237. package/dist/components/marquee/marquee.d.ts +22 -0
  238. package/dist/components/marquee/marquee.d.ts.map +1 -0
  239. package/dist/components/marquee/marquee.js +19 -0
  240. package/dist/components/multi-step-loader/index.d.ts +3 -0
  241. package/dist/components/multi-step-loader/index.d.ts.map +1 -0
  242. package/dist/components/multi-step-loader/index.js +1 -0
  243. package/dist/components/multi-step-loader/multi-step-loader.d.ts +41 -0
  244. package/dist/components/multi-step-loader/multi-step-loader.d.ts.map +1 -0
  245. package/dist/components/multi-step-loader/multi-step-loader.js +53 -0
  246. package/dist/components/navbar/index.d.ts +5 -0
  247. package/dist/components/navbar/index.d.ts.map +1 -0
  248. package/dist/components/navbar/index.js +2 -0
  249. package/dist/components/navbar/navbar-mobile-menu.d.ts +24 -0
  250. package/dist/components/navbar/navbar-mobile-menu.d.ts.map +1 -0
  251. package/dist/components/navbar/navbar-mobile-menu.js +18 -0
  252. package/dist/components/navbar/navbar.d.ts +24 -0
  253. package/dist/components/navbar/navbar.d.ts.map +1 -0
  254. package/dist/components/navbar/navbar.js +33 -0
  255. package/dist/components/notification-center/index.d.ts +3 -0
  256. package/dist/components/notification-center/index.d.ts.map +1 -0
  257. package/dist/components/notification-center/index.js +1 -0
  258. package/dist/components/notification-center/notification-center.d.ts +28 -0
  259. package/dist/components/notification-center/notification-center.d.ts.map +1 -0
  260. package/dist/components/notification-center/notification-center.js +24 -0
  261. package/dist/components/number-input/index.d.ts +3 -0
  262. package/dist/components/number-input/index.d.ts.map +1 -0
  263. package/dist/components/number-input/index.js +1 -0
  264. package/dist/components/number-input/number-input.d.ts +22 -0
  265. package/dist/components/number-input/number-input.d.ts.map +1 -0
  266. package/dist/components/number-input/number-input.js +37 -0
  267. package/dist/components/pagination/index.d.ts +5 -0
  268. package/dist/components/pagination/index.d.ts.map +1 -0
  269. package/dist/components/pagination/index.js +2 -0
  270. package/dist/components/pagination/pagination-range.d.ts +17 -0
  271. package/dist/components/pagination/pagination-range.d.ts.map +1 -0
  272. package/dist/components/pagination/pagination-range.js +30 -0
  273. package/dist/components/pagination/pagination.d.ts +26 -0
  274. package/dist/components/pagination/pagination.d.ts.map +1 -0
  275. package/dist/components/pagination/pagination.js +48 -0
  276. package/dist/components/password-input/index.d.ts +5 -0
  277. package/dist/components/password-input/index.d.ts.map +1 -0
  278. package/dist/components/password-input/index.js +2 -0
  279. package/dist/components/password-input/password-input.d.ts +15 -0
  280. package/dist/components/password-input/password-input.d.ts.map +1 -0
  281. package/dist/components/password-input/password-input.js +23 -0
  282. package/dist/components/password-input/password-strength-meter.d.ts +18 -0
  283. package/dist/components/password-input/password-strength-meter.d.ts.map +1 -0
  284. package/dist/components/password-input/password-strength-meter.js +40 -0
  285. package/dist/components/progress/index.d.ts +4 -0
  286. package/dist/components/progress/index.d.ts.map +1 -0
  287. package/dist/components/progress/index.js +1 -0
  288. package/dist/components/progress/progress.d.ts +25 -0
  289. package/dist/components/progress/progress.d.ts.map +1 -0
  290. package/dist/components/progress/progress.js +23 -0
  291. package/dist/components/progress/variants.d.ts +7 -0
  292. package/dist/components/progress/variants.d.ts.map +1 -0
  293. package/dist/components/progress/variants.js +25 -0
  294. package/dist/components/qr-code/index.d.ts +3 -0
  295. package/dist/components/qr-code/index.d.ts.map +1 -0
  296. package/dist/components/qr-code/index.js +1 -0
  297. package/dist/components/qr-code/qr-code.d.ts +28 -0
  298. package/dist/components/qr-code/qr-code.d.ts.map +1 -0
  299. package/dist/components/qr-code/qr-code.js +27 -0
  300. package/dist/components/radio/index.d.ts +3 -0
  301. package/dist/components/radio/index.d.ts.map +1 -0
  302. package/dist/components/radio/index.js +1 -0
  303. package/dist/components/radio/radio-card.d.ts +25 -0
  304. package/dist/components/radio/radio-card.d.ts.map +1 -0
  305. package/dist/components/radio/radio-card.js +24 -0
  306. package/dist/components/rating/index.d.ts +3 -0
  307. package/dist/components/rating/index.d.ts.map +1 -0
  308. package/dist/components/rating/index.js +1 -0
  309. package/dist/components/rating/rating.d.ts +23 -0
  310. package/dist/components/rating/rating.d.ts.map +1 -0
  311. package/dist/components/rating/rating.js +41 -0
  312. package/dist/components/relative-time/index.d.ts +3 -0
  313. package/dist/components/relative-time/index.d.ts.map +1 -0
  314. package/dist/components/relative-time/index.js +1 -0
  315. package/dist/components/relative-time/relative-time.d.ts +32 -0
  316. package/dist/components/relative-time/relative-time.d.ts.map +1 -0
  317. package/dist/components/relative-time/relative-time.js +62 -0
  318. package/dist/components/reparent/index.d.ts +3 -0
  319. package/dist/components/reparent/index.d.ts.map +1 -0
  320. package/dist/components/reparent/index.js +1 -0
  321. package/dist/components/reparent/reparent.d.ts +31 -0
  322. package/dist/components/reparent/reparent.d.ts.map +1 -0
  323. package/dist/components/reparent/reparent.js +51 -0
  324. package/dist/components/repeat/index.d.ts +2 -0
  325. package/dist/components/repeat/index.d.ts.map +1 -0
  326. package/dist/components/repeat/index.js +1 -0
  327. package/dist/components/repeat/repeat.d.ts +27 -0
  328. package/dist/components/repeat/repeat.d.ts.map +1 -0
  329. package/dist/components/repeat/repeat.js +15 -0
  330. package/dist/components/scroll-progress/index.d.ts +3 -0
  331. package/dist/components/scroll-progress/index.d.ts.map +1 -0
  332. package/dist/components/scroll-progress/index.js +1 -0
  333. package/dist/components/scroll-progress/scroll-progress.d.ts +19 -0
  334. package/dist/components/scroll-progress/scroll-progress.d.ts.map +1 -0
  335. package/dist/components/scroll-progress/scroll-progress.js +36 -0
  336. package/dist/components/scroll-shadow/index.d.ts +3 -0
  337. package/dist/components/scroll-shadow/index.d.ts.map +1 -0
  338. package/dist/components/scroll-shadow/index.js +1 -0
  339. package/dist/components/scroll-shadow/scroll-shadow.d.ts +20 -0
  340. package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -0
  341. package/dist/components/scroll-shadow/scroll-shadow.js +44 -0
  342. package/dist/components/scrollspy/index.d.ts +3 -0
  343. package/dist/components/scrollspy/index.d.ts.map +1 -0
  344. package/dist/components/scrollspy/index.js +1 -0
  345. package/dist/components/scrollspy/use-scrollspy.d.ts +30 -0
  346. package/dist/components/scrollspy/use-scrollspy.d.ts.map +1 -0
  347. package/dist/components/scrollspy/use-scrollspy.js +35 -0
  348. package/dist/components/separator/index.d.ts +3 -0
  349. package/dist/components/separator/index.d.ts.map +1 -0
  350. package/dist/components/separator/index.js +1 -0
  351. package/dist/components/separator/separator.d.ts +22 -0
  352. package/dist/components/separator/separator.d.ts.map +1 -0
  353. package/dist/components/separator/separator.js +21 -0
  354. package/dist/components/snippet/index.d.ts +3 -0
  355. package/dist/components/snippet/index.d.ts.map +1 -0
  356. package/dist/components/snippet/index.js +1 -0
  357. package/dist/components/snippet/snippet.d.ts +25 -0
  358. package/dist/components/snippet/snippet.d.ts.map +1 -0
  359. package/dist/components/snippet/snippet.js +33 -0
  360. package/dist/components/sortable/index.d.ts +3 -0
  361. package/dist/components/sortable/index.d.ts.map +1 -0
  362. package/dist/components/sortable/index.js +1 -0
  363. package/dist/components/sortable/sortable.d.ts +22 -0
  364. package/dist/components/sortable/sortable.d.ts.map +1 -0
  365. package/dist/components/sortable/sortable.js +47 -0
  366. package/dist/components/spacer/index.d.ts +3 -0
  367. package/dist/components/spacer/index.d.ts.map +1 -0
  368. package/dist/components/spacer/index.js +1 -0
  369. package/dist/components/spacer/spacer.d.ts +24 -0
  370. package/dist/components/spacer/spacer.d.ts.map +1 -0
  371. package/dist/components/spacer/spacer.js +23 -0
  372. package/dist/components/spinner/index.d.ts +4 -0
  373. package/dist/components/spinner/index.d.ts.map +1 -0
  374. package/dist/components/spinner/index.js +1 -0
  375. package/dist/components/spinner/spinner.d.ts +22 -0
  376. package/dist/components/spinner/spinner.d.ts.map +1 -0
  377. package/dist/components/spinner/spinner.js +19 -0
  378. package/dist/components/spinner/variants.d.ts +6 -0
  379. package/dist/components/spinner/variants.d.ts.map +1 -0
  380. package/dist/components/spinner/variants.js +13 -0
  381. package/dist/components/stepper/index.d.ts +3 -0
  382. package/dist/components/stepper/index.d.ts.map +1 -0
  383. package/dist/components/stepper/index.js +1 -0
  384. package/dist/components/stepper/stepper.d.ts +26 -0
  385. package/dist/components/stepper/stepper.d.ts.map +1 -0
  386. package/dist/components/stepper/stepper.js +27 -0
  387. package/dist/components/submit-button/index.d.ts +3 -0
  388. package/dist/components/submit-button/index.d.ts.map +1 -0
  389. package/dist/components/submit-button/index.js +1 -0
  390. package/dist/components/submit-button/submit-button.d.ts +19 -0
  391. package/dist/components/submit-button/submit-button.d.ts.map +1 -0
  392. package/dist/components/submit-button/submit-button.js +23 -0
  393. package/dist/components/tags-input/index.d.ts +3 -0
  394. package/dist/components/tags-input/index.d.ts.map +1 -0
  395. package/dist/components/tags-input/index.js +1 -0
  396. package/dist/components/tags-input/tags-input.d.ts +26 -0
  397. package/dist/components/tags-input/tags-input.d.ts.map +1 -0
  398. package/dist/components/tags-input/tags-input.js +61 -0
  399. package/dist/components/timeline/index.d.ts +3 -0
  400. package/dist/components/timeline/index.d.ts.map +1 -0
  401. package/dist/components/timeline/index.js +1 -0
  402. package/dist/components/timeline/timeline.d.ts +24 -0
  403. package/dist/components/timeline/timeline.d.ts.map +1 -0
  404. package/dist/components/timeline/timeline.js +21 -0
  405. package/dist/components/tree/index.d.ts +3 -0
  406. package/dist/components/tree/index.d.ts.map +1 -0
  407. package/dist/components/tree/index.js +1 -0
  408. package/dist/components/tree/tree.d.ts +26 -0
  409. package/dist/components/tree/tree.d.ts.map +1 -0
  410. package/dist/components/tree/tree.js +32 -0
  411. package/dist/globals.css +3004 -0
  412. package/package.json +63 -0
@@ -0,0 +1,13 @@
1
+ import { cva } from "class-variance-authority";
2
+ export const spinnerSizeVariants = cva("shrink-0", {
3
+ variants: {
4
+ size: {
5
+ sm: "size-4",
6
+ default: "size-5",
7
+ lg: "size-6",
8
+ },
9
+ },
10
+ defaultVariants: {
11
+ size: "default",
12
+ },
13
+ });
@@ -0,0 +1,3 @@
1
+ export type { StepperProps, StepperStep } from "./stepper";
2
+ export { Stepper } from "./stepper";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export { Stepper } from "./stepper";
@@ -0,0 +1,26 @@
1
+ import type React from "react";
2
+ export interface StepperStep {
3
+ label: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ }
6
+ export interface StepperProps {
7
+ steps: StepperStep[];
8
+ /** The current step, 0-indexed. Steps before it are complete. */
9
+ value: number;
10
+ orientation?: "horizontal" | "vertical";
11
+ className?: string;
12
+ }
13
+ /**
14
+ * A numbered sequence of steps for a multi-stage flow (checkout, onboarding,
15
+ * setup wizards), showing completed/current/upcoming state.
16
+ *
17
+ * _Inspired from multiple sources, to make a consistent and reusable component._
18
+ * @see https://originui.com/stepper
19
+ * @see https://ktui.io/docs/stepper
20
+ *
21
+ * @version 0.1.0
22
+ * @author Forth
23
+ * @copyright 2026 Forth
24
+ */
25
+ export declare function Stepper({ steps, value, orientation, className, }: StepperProps): React.JSX.Element;
26
+ //# sourceMappingURL=stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,WAA0B,EAC1B,SAAS,GACV,EAAE,YAAY,qBAkFd"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CheckIcon } from "lucide-react";
3
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
4
+ /**
5
+ * A numbered sequence of steps for a multi-stage flow (checkout, onboarding,
6
+ * setup wizards), showing completed/current/upcoming state.
7
+ *
8
+ * _Inspired from multiple sources, to make a consistent and reusable component._
9
+ * @see https://originui.com/stepper
10
+ * @see https://ktui.io/docs/stepper
11
+ *
12
+ * @version 0.1.0
13
+ * @author Forth
14
+ * @copyright 2026 Forth
15
+ */
16
+ export function Stepper({ steps, value, orientation = "horizontal", className, }) {
17
+ return (_jsx("ol", { "data-slot": "stepper", className: cn("flex", orientation === "horizontal" ? "w-full flex-row" : "flex-col", className), children: steps.map((step, index) => {
18
+ const isComplete = index < value;
19
+ const isCurrent = index === value;
20
+ const isLast = index === steps.length - 1;
21
+ return (_jsxs("li", { className: cn("flex", orientation === "horizontal"
22
+ ? "flex-1 flex-col items-center"
23
+ : "flex-row gap-3", !isLast && orientation === "horizontal" && "relative"), children: [_jsxs("div", { className: cn("flex items-center", orientation === "horizontal" ? "w-full" : "flex-col"), children: [_jsx("span", { "data-state": isComplete ? "complete" : isCurrent ? "current" : "upcoming", className: cn("border-input text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-full border text-sm font-medium", "data-[state=complete]:bg-primary data-[state=complete]:border-primary data-[state=complete]:text-primary-foreground", "data-[state=current]:border-primary data-[state=current]:text-primary"), children: isComplete ? _jsx(CheckIcon, { className: "size-4" }) : index + 1 }), !isLast && (_jsx("span", { "aria-hidden": "true", "data-state": isComplete ? "complete" : "upcoming", className: cn("bg-border data-[state=complete]:bg-primary shrink-0", orientation === "horizontal"
24
+ ? "mx-2 h-px flex-1"
25
+ : "my-1 ml-4 h-6 w-px") }))] }), _jsxs("div", { className: cn(orientation === "horizontal" ? "mt-2 text-center" : "pb-6"), children: [_jsx("p", { className: cn("text-sm font-medium", isCurrent ? "text-foreground" : "text-muted-foreground"), children: step.label }), step.description !== undefined && (_jsx("p", { className: "text-muted-foreground text-xs", children: step.description }))] })] }, index));
26
+ }) }));
27
+ }
@@ -0,0 +1,3 @@
1
+ export type { SubmitButtonProps } from "./submit-button";
2
+ export { SubmitButton } from "./submit-button";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/submit-button/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ export { SubmitButton } from "./submit-button";
@@ -0,0 +1,19 @@
1
+ import type { ButtonProps } from "../button";
2
+ export type SubmitButtonProps = Omit<ButtonProps, "type" | "loading">;
3
+ /**
4
+ * A submit `Button` that shows its own loading state automatically while
5
+ * its parent `<form>` is submitting — via React's `useFormStatus`, so no
6
+ * manual pending-state prop drilling is needed (unlike `Button`'s own
7
+ * `loading`, which the caller controls explicitly).
8
+ *
9
+ * Must be rendered as a descendant of a `<form>` — `useFormStatus` reads
10
+ * that nearest parent form's pending state.
11
+ *
12
+ * @see https://shuip.xyz/components/submit-button
13
+ *
14
+ * @version 0.1.0
15
+ * @author Forth
16
+ * @copyright 2026 Forth
17
+ */
18
+ export declare function SubmitButton(props: SubmitButtonProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=submit-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submit-button.d.ts","sourceRoot":"","sources":["../../../src/components/submit-button/submit-button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAGpD"}
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useFormStatus } from "react-dom";
4
+ import { Button } from "../button";
5
+ /**
6
+ * A submit `Button` that shows its own loading state automatically while
7
+ * its parent `<form>` is submitting — via React's `useFormStatus`, so no
8
+ * manual pending-state prop drilling is needed (unlike `Button`'s own
9
+ * `loading`, which the caller controls explicitly).
10
+ *
11
+ * Must be rendered as a descendant of a `<form>` — `useFormStatus` reads
12
+ * that nearest parent form's pending state.
13
+ *
14
+ * @see https://shuip.xyz/components/submit-button
15
+ *
16
+ * @version 0.1.0
17
+ * @author Forth
18
+ * @copyright 2026 Forth
19
+ */
20
+ export function SubmitButton(props) {
21
+ const { pending } = useFormStatus();
22
+ return _jsx(Button, { type: "submit", loading: pending, ...props });
23
+ }
@@ -0,0 +1,3 @@
1
+ export type { TagsInputProps } from "./tags-input";
2
+ export { TagsInput } from "./tags-input";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tags-input/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export { TagsInput } from "./tags-input";
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ export interface TagsInputProps {
3
+ value?: string[];
4
+ defaultValue?: string[];
5
+ onValueChange?: (value: string[]) => void;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ /** Maximum number of tags allowed. */
9
+ max?: number;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * A flexible input for adding/removing multiple tags — `Enter`/`,` commits
14
+ * the current text as a tag, `Backspace` on an empty input removes the
15
+ * last one. Renders tags as forth-ui's own dismissible `Badge`.
16
+ *
17
+ * _Inspired from multiple sources, to make a consistent and reusable component._
18
+ * @see https://www.hextaui.com/docs/ui/components/tag-input
19
+ * @see https://www.kibo-ui.com/components/tags
20
+ *
21
+ * @version 0.1.0
22
+ * @author Forth
23
+ * @copyright 2026 Forth
24
+ */
25
+ export declare function TagsInput({ value, defaultValue, onValueChange, placeholder, disabled, max, className, }: TagsInputProps): React.JSX.Element;
26
+ //# sourceMappingURL=tags-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags-input.d.ts","sourceRoot":"","sources":["../../../src/components/tags-input/tags-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAAwB,EACxB,QAAgB,EAChB,GAAG,EACH,SAAS,GACV,EAAE,cAAc,qBA+EhB"}
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
5
+ import { Badge } from "../badge";
6
+ /**
7
+ * A flexible input for adding/removing multiple tags — `Enter`/`,` commits
8
+ * the current text as a tag, `Backspace` on an empty input removes the
9
+ * last one. Renders tags as forth-ui's own dismissible `Badge`.
10
+ *
11
+ * _Inspired from multiple sources, to make a consistent and reusable component._
12
+ * @see https://www.hextaui.com/docs/ui/components/tag-input
13
+ * @see https://www.kibo-ui.com/components/tags
14
+ *
15
+ * @version 0.1.0
16
+ * @author Forth
17
+ * @copyright 2026 Forth
18
+ */
19
+ export function TagsInput({ value, defaultValue, onValueChange, placeholder = "Add tag…", disabled = false, max, className, }) {
20
+ const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue ?? []);
21
+ const [inputValue, setInputValue] = React.useState("");
22
+ const tags = value ?? uncontrolledValue;
23
+ function update(next) {
24
+ setUncontrolledValue(next);
25
+ onValueChange?.(next);
26
+ }
27
+ function addTag(tag) {
28
+ const trimmed = tag.trim();
29
+ if (trimmed.length === 0 || tags.includes(trimmed)) {
30
+ return;
31
+ }
32
+ if (max !== undefined && tags.length >= max) {
33
+ return;
34
+ }
35
+ update([...tags, trimmed]);
36
+ setInputValue("");
37
+ }
38
+ function removeTag(tag) {
39
+ update(tags.filter((t) => t !== tag));
40
+ }
41
+ function handleKeyDown(e) {
42
+ if (e.key === "Enter" || e.key === ",") {
43
+ e.preventDefault();
44
+ addTag(inputValue);
45
+ return;
46
+ }
47
+ if (e.key === "Backspace" && inputValue.length === 0) {
48
+ const lastTag = tags.at(-1);
49
+ if (lastTag !== undefined) {
50
+ removeTag(lastTag);
51
+ }
52
+ }
53
+ }
54
+ return (_jsxs("div", { "data-slot": "tags-input", className: cn("border-input focus-within:border-ring focus-within:ring-ring/50 flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-transparent px-3 py-1.5 shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]", disabled && "pointer-events-none cursor-not-allowed opacity-50", className), children: [tags.map((tag) => (_jsx(Badge, { variant: "secondary", dismissible: true, open: true, onOpenChange: () => {
55
+ removeTag(tag);
56
+ }, children: tag }, tag))), _jsx("input", { value: inputValue, onChange: (e) => {
57
+ setInputValue(e.target.value);
58
+ }, onKeyDown: handleKeyDown, onBlur: () => {
59
+ addTag(inputValue);
60
+ }, placeholder: tags.length === 0 ? placeholder : undefined, disabled: disabled, className: "placeholder:text-muted-foreground min-w-24 flex-1 bg-transparent text-sm outline-none disabled:cursor-not-allowed" })] }));
61
+ }
@@ -0,0 +1,3 @@
1
+ export type { TimelineItemData, TimelineProps } from "./timeline";
2
+ export { Timeline } from "./timeline";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export { Timeline } from "./timeline";
@@ -0,0 +1,24 @@
1
+ import type React from "react";
2
+ export interface TimelineItemData {
3
+ title: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ date?: React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ }
8
+ export interface TimelineProps {
9
+ items: TimelineItemData[];
10
+ className?: string;
11
+ }
12
+ /**
13
+ * A vertical sequence of dated events, connected by a line.
14
+ *
15
+ * _Inspired from multiple sources, to make a consistent and reusable component._
16
+ * @see https://originui.com/timeline
17
+ * @see https://ui.aceternity.com/components/timeline
18
+ *
19
+ * @version 0.1.0
20
+ * @author Forth
21
+ * @copyright 2026 Forth
22
+ */
23
+ export declare function Timeline({ items, className }: TimelineProps): React.JSX.Element;
24
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,aAAa,qBAiC3D"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
3
+ /**
4
+ * A vertical sequence of dated events, connected by a line.
5
+ *
6
+ * _Inspired from multiple sources, to make a consistent and reusable component._
7
+ * @see https://originui.com/timeline
8
+ * @see https://ui.aceternity.com/components/timeline
9
+ *
10
+ * @version 0.1.0
11
+ * @author Forth
12
+ * @copyright 2026 Forth
13
+ */
14
+ export function Timeline({ items, className }) {
15
+ return (_jsx("ol", { "data-slot": "timeline", className: cn("grid", className), children: items.map((item, index) => {
16
+ const isLast = index === items.length - 1;
17
+ return (
18
+ // eslint-disable-next-line @eslint-react/no-array-index-key -- `title` is an arbitrary ReactNode with no guaranteed unique field
19
+ _jsxs("li", { className: "grid grid-cols-[2rem_1fr] gap-x-3", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("span", { className: "border-primary bg-background text-primary flex size-8 shrink-0 items-center justify-center rounded-full border [&>svg]:size-4", children: item.icon }), !isLast && (_jsx("span", { "aria-hidden": "true", className: "bg-border w-px flex-1" }))] }), _jsxs("div", { className: cn("grid gap-1", !isLast && "pb-6"), children: [item.date !== undefined && (_jsx("p", { className: "text-muted-foreground text-xs", children: item.date })), _jsx("p", { className: "text-sm font-medium", children: item.title }), item.description !== undefined && (_jsx("p", { className: "text-muted-foreground text-sm", children: item.description }))] })] }, index));
20
+ }) }));
21
+ }
@@ -0,0 +1,3 @@
1
+ export type { TreeNode, TreeProps } from "./tree";
2
+ export { Tree } from "./tree";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tree/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1 @@
1
+ export { Tree } from "./tree";
@@ -0,0 +1,26 @@
1
+ import type React from "react";
2
+ export interface TreeNode {
3
+ label: React.ReactNode;
4
+ icon?: React.ReactNode;
5
+ children?: TreeNode[];
6
+ }
7
+ export interface TreeProps {
8
+ data: TreeNode[];
9
+ defaultExpanded?: boolean;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * A hierarchical, expandable/collapsible list of nodes (file explorer,
14
+ * nested categories) — built on forth-ui's own `Collapsible` for each
15
+ * branch's expand animation rather than reimplementing it.
16
+ *
17
+ * _Inspired from multiple sources, to make a consistent and reusable component._
18
+ * @see https://originui.com/tree
19
+ * @see https://www.hextaui.com/docs/ui/components/tree
20
+ *
21
+ * @version 0.1.0
22
+ * @author Forth
23
+ * @copyright 2026 Forth
24
+ */
25
+ export declare function Tree({ data, defaultExpanded, className }: TreeProps): React.JSX.Element;
26
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/components/tree/tree.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,eAAuB,EAAE,SAAS,EAAE,EAAE,SAAS,qBAS3E"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ChevronRightIcon, FileIcon, FolderIcon } from "lucide-react";
4
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
5
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "../collapsible";
6
+ /**
7
+ * A hierarchical, expandable/collapsible list of nodes (file explorer,
8
+ * nested categories) — built on forth-ui's own `Collapsible` for each
9
+ * branch's expand animation rather than reimplementing it.
10
+ *
11
+ * _Inspired from multiple sources, to make a consistent and reusable component._
12
+ * @see https://originui.com/tree
13
+ * @see https://www.hextaui.com/docs/ui/components/tree
14
+ *
15
+ * @version 0.1.0
16
+ * @author Forth
17
+ * @copyright 2026 Forth
18
+ */
19
+ export function Tree({ data, defaultExpanded = false, className }) {
20
+ return (_jsx("ul", { "data-slot": "tree", className: cn("grid gap-0.5 text-sm", className), children: data.map((node, index) => (
21
+ // eslint-disable-next-line @eslint-react/no-array-index-key -- `label` is an arbitrary ReactNode with no guaranteed unique field
22
+ _jsx(TreeItem, { node: node, defaultExpanded: defaultExpanded }, index))) }));
23
+ }
24
+ function TreeItem({ node, defaultExpanded, }) {
25
+ const hasChildren = node.children !== undefined && node.children.length > 0;
26
+ if (!hasChildren) {
27
+ return (_jsxs("li", { className: "hover:bg-accent flex items-center gap-1.5 rounded-md px-2 py-1 pl-7", children: [node.icon ?? _jsx(FileIcon, { className: "text-muted-foreground size-4" }), node.label] }));
28
+ }
29
+ return (_jsx("li", { children: _jsxs(Collapsible, { defaultOpen: defaultExpanded, children: [_jsxs(CollapsibleTrigger, { hideChevron: true, className: "hover:bg-accent flex w-full items-center gap-1.5 rounded-md px-2 py-1 [&>svg:first-child]:transition-transform [&[data-state=open]>svg:first-child]:rotate-90", children: [_jsx(ChevronRightIcon, { className: "size-4 shrink-0" }), node.icon ?? _jsx(FolderIcon, { className: "text-muted-foreground size-4" }), node.label] }), _jsx(CollapsibleContent, { className: "pl-4", children: _jsx("ul", { className: "grid gap-0.5", children: node.children?.map((child, index) => (_jsx(TreeItem
30
+ // eslint-disable-next-line @eslint-react/no-array-index-key -- see above
31
+ , { node: child, defaultExpanded: defaultExpanded }, index))) }) })] }) }));
32
+ }