@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Forthtilliath
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,279 @@
1
+ # @forthtilliath/forth-ui
2
+
3
+ Higher-level, opinionated React components built on top of
4
+ [`@forthtilliath/shadcn-ui`](../shadcn-ui) primitives. Where shadcn-ui gives
5
+ you the building blocks (`Button`, `Popover`, `Command`, ...), forth-ui
6
+ assembles them into complete, batteries-included patterns — a `Combobox`
7
+ built from `Popover` + `Command`, a `PasswordInput` with a strength meter, a
8
+ `Dropdrawer` that's a `DropdownMenu` on desktop and a `Drawer` on mobile —
9
+ so you don't have to wire the same recipe from scratch in every project.
10
+
11
+ 58 components across 8 categories, styled with Tailwind CSS and
12
+ `class-variance-authority`, fully typed, and browsable in Storybook
13
+ (`pnpm run dev:sb` from the repo root).
14
+
15
+ ## Table of contents
16
+
17
+ - [Why forth-ui](#why-forth-ui)
18
+ - [Installation](#installation)
19
+ - [Usage](#usage)
20
+ - [Components](#components)
21
+ - [Conventions](#conventions)
22
+ - [Theming](#theming)
23
+ - [Development](#development)
24
+ - [License](#license)
25
+
26
+ ## Why forth-ui
27
+
28
+ - **Complete patterns, not just primitives.** Every component solves a
29
+ whole problem — form field wiring (`Field`), file upload with previews
30
+ (`Dropzone`, `ImageInput`), an imperative confirm dialog
31
+ (`useConfirm`) — instead of leaving the composition to each consumer.
32
+ - **Consistent variants.** Every component that has visual variants uses
33
+ the same `class-variance-authority` shape (`variant`, `size`, `look`,
34
+ `shape`, ...), so once you've learned one component's API, the others
35
+ feel familiar.
36
+ - **One folder, one subpath import.** No barrel file dragging in the whole
37
+ library — `import { Combobox } from "@forthtilliath/forth-ui/components/combobox"`
38
+ pulls in exactly that component's code.
39
+ - **Distributable like shadcn.** Every component (but `Grid`, see
40
+ [Registry](#registry)) is also published as a
41
+ [shadcn-compatible registry item](../../../apps/shadweb/registry/forth-ui),
42
+ so it can be vendored source-first into a consuming project instead of
43
+ installed as an opaque `node_modules` dependency.
44
+
45
+ ## Installation
46
+
47
+ ### As a workspace package (this monorepo)
48
+
49
+ `forth-ui` is `private: true` and consumed internally via the pnpm
50
+ workspace:
51
+
52
+ ```json
53
+ {
54
+ "dependencies": {
55
+ "@forthtilliath/forth-ui": "workspace:*"
56
+ }
57
+ }
58
+ ```
59
+
60
+ Import the compiled stylesheet once, alongside your component imports:
61
+
62
+ ```ts
63
+ import "@forthtilliath/forth-ui/styles/globals.css";
64
+ ```
65
+
66
+ Components are built to `dist/` (`./components/*` →
67
+ `./dist/components/*/index.js`), so run `pnpm run build` (or `dev`) in
68
+ this package after source changes for consumers to pick them up.
69
+
70
+ ### Via the shadcn registry
71
+
72
+ Every component also ships as a
73
+ [shadcn registry item](https://ui.shadcn.com/docs/registry) — the source
74
+ files land directly in _your_ project (`components/forth-ui/<name>/`),
75
+ import-rewritten to your own `components.json` aliases, exactly like
76
+ `npx shadcn add button` does for the official shadcn/ui components:
77
+
78
+ ```bash
79
+ npx shadcn add <registry-url>/combobox.json
80
+ ```
81
+
82
+ Add `forth-ui` as a named registry in your `components.json` to use the
83
+ short form instead:
84
+
85
+ ```json
86
+ {
87
+ "registries": {
88
+ "@forth-ui": "<registry-url>/{name}.json"
89
+ }
90
+ }
91
+ ```
92
+
93
+ ```bash
94
+ npx shadcn add @forth-ui/combobox
95
+ ```
96
+
97
+ Cross-component dependencies (e.g. `Combobox` depending on another
98
+ forth-ui component) and shadcn primitives (e.g. `Popover`) are declared as
99
+ `registryDependencies` and resolve automatically — `shadcn add` cascades
100
+ and installs everything the component needs. See
101
+ [apps/shadweb](../../../apps/shadweb) for how the registry itself is built.
102
+
103
+ ## Usage
104
+
105
+ ```tsx
106
+ import { Field } from "@forthtilliath/forth-ui/components/field";
107
+ import { Combobox } from "@forthtilliath/forth-ui/components/combobox";
108
+
109
+ function Example() {
110
+ return (
111
+ <Field label="Framework" description="Pick the one you use most.">
112
+ <Combobox
113
+ options={[
114
+ { value: "react", label: "React" },
115
+ { value: "vue", label: "Vue" },
116
+ ]}
117
+ placeholder="Select a framework..."
118
+ />
119
+ </Field>
120
+ );
121
+ }
122
+ ```
123
+
124
+ ## Components
125
+
126
+ Grouped the same way as the Storybook sidebar (`forth-ui/<Category>/...`).
127
+
128
+ ### Layout
129
+
130
+ | Component | Import | Description |
131
+ | ------------------- | ---------------------------- | ----------------------------------------------------------------------------- |
132
+ | `Accordion` | `components/accordion` | A vertically stacked set of interactive headings that each reveal a section. |
133
+ | `BentoGrid` | `components/bento-grid` | A CSS-grid layout for unevenly-sized cards ("bento box" layouts). |
134
+ | `Collapsible` | `components/collapsible` | An interactive component which expands/collapses a single panel. |
135
+ | `Grid`, `Grid.Item` | `components/grid` | CSS-grid layout helpers with a built-in debug overlay. |
136
+ | `InfiniteScroll` | `components/infinite-scroll` | Calls `onLoadMore` once a sentinel scrolls into view. |
137
+ | `Marquee` | `components/marquee` | Infinitely scrolls its children (a logo wall, a ticker). |
138
+ | `Reparent` | `components/reparent` | Moves children between different container elements at different breakpoints. |
139
+ | `Repeat` | `components/repeat` | Repeats a component a specified number of times. |
140
+ | `ScrollShadow` | `components/scroll-shadow` | A vertically-scrollable container with fade-out edge shadows. |
141
+ | `Separator` | `components/separator` | Visually or semantically separates content. |
142
+ | `Spacer` | `components/spacer` | Adds space between components — a flexible filler or a fixed gap. |
143
+ | `Stepper` | `components/stepper` | A numbered sequence of steps for a multi-stage flow. |
144
+
145
+ ### Navigation
146
+
147
+ | Component | Import | Description |
148
+ | ---------------------------- | ----------------------- | ------------------------------------------------------------------------- |
149
+ | `Breadcrumb` | `components/breadcrumb` | Displays the path to the current resource using a hierarchy of links. |
150
+ | `Link`, `LinkPreview` | `components/link` | A styled hyperlink, plus a hover-triggered metadata preview card. |
151
+ | `Navbar` | `components/navbar` | A fixed, floating page header that shrinks on scroll, plus a mobile menu. |
152
+ | `Pagination` | `components/pagination` | Navigates between pages, computing visible page numbers and ellipses. |
153
+ | `Scrollspy` (`useScrollspy`) | `components/scrollspy` | Tracks which element id is currently scrolled into view. |
154
+
155
+ ### Buttons & Actions
156
+
157
+ | Component | Import | Description |
158
+ | ----------------------- | ------------------- | ------------------------------------------------------------------------------ |
159
+ | `Button`, `ButtonGroup` | `components/button` | A button, or a component that looks like one, plus joined button rows/columns. |
160
+ | `Chip` | `components/chip` | A compact, interactive element for status, categories, or filters. |
161
+
162
+ ### Forms
163
+
164
+ | Component | Import | Description |
165
+ | ------------------------- | --------------------------- | ------------------------------------------------------------------------ |
166
+ | `CheckboxGroup` | `components/checkbox` | A group of checkboxes sharing a single array value. |
167
+ | `ColorPicker` | `components/color-picker` | A color swatch + hex input, synced with the native color picker. |
168
+ | `Combobox`, `MultiSelect` | `components/combobox` | An autocomplete/searchable select, and its multi-value variant. |
169
+ | `DatePicker` | `components/date-picker` | A single-date picker built on a `Popover` + `Calendar` recipe. |
170
+ | `Dropzone` | `components/dropzone` | A drag-and-drop file upload zone, listing accepted files below. |
171
+ | `Field` | `components/field` | Wires a label, description and error message to a single form control. |
172
+ | `ImageInput` | `components/image-input` | A click-to-upload image picker with a live preview. |
173
+ | `NumberInput` | `components/number-input` | A numeric input with increment/decrement stepper buttons. |
174
+ | `PasswordInput` | `components/password-input` | A password `Input` with a show/hide toggle, plus a strength meter. |
175
+ | `RadioCard` | `components/radio` | A card-style `RadioGroup` item — the whole card is the clickable target. |
176
+ | `Rating` | `components/rating` | A star rating control with keyboard navigation and hover preview. |
177
+ | `SubmitButton` | `components/submit-button` | A submit `Button` that shows its own loading state via `useFormStatus`. |
178
+ | `TagsInput` | `components/tags-input` | A flexible input for adding/removing multiple tags. |
179
+
180
+ ### Feedback
181
+
182
+ | Component | Import | Description |
183
+ | -------------------- | -------------------------------- | ----------------------------------------------------------------------- |
184
+ | `Alert` | `components/alert` | Displays a callout for user attention. |
185
+ | `Badge` | `components/badge` | Displays a badge or a component that looks like a badge. |
186
+ | `Banner` | `components/banner` | A full-width, page-level announcement bar. |
187
+ | `CountAnimation` | `components/count-animation` | Animates a number counting up (or down) to a value whenever it changes. |
188
+ | `MultiStepLoader` | `components/multi-step-loader` | A full-screen overlay stepping through loading messages. |
189
+ | `NotificationCenter` | `components/notification-center` | A bell-icon trigger with an unread badge, opening a notification list. |
190
+ | `Progress` | `components/progress` | Displays an indicator showing the completion progress of a task. |
191
+ | `ScrollProgress` | `components/scroll-progress` | A fixed bar tracking scroll percentage of the page or a container. |
192
+ | `Spinner` | `components/spinner` | An accessible loading indicator, in one of a few visual styles. |
193
+
194
+ ### Overlays
195
+
196
+ | Component | Import | Description |
197
+ | ---------------- | ---------------------------- | ----------------------------------------------------------------------------------- |
198
+ | `CommandPalette` | `components/command-palette` | A global command menu (Cmd/Ctrl+K to open). |
199
+ | `useConfirm` | `components/confirm-dialog` | An imperative `await confirm({...})` alternative to hand-wiring an `AlertDialog`. |
200
+ | `Dropdrawer` | `components/dropdrawer` | A menu that renders as a `DropdownMenu` on desktop and a bottom `Drawer` on mobile. |
201
+
202
+ ### Data Display
203
+
204
+ | Component | Import | Description |
205
+ | ----------------------- | ----------------------------- | ------------------------------------------------------------------------ |
206
+ | `Avatar`, `AvatarGroup` | `components/avatar` | An image with a fallback, status/badge indicators, and stacked grouping. |
207
+ | `DescriptionList` | `components/description-list` | A description list, with terms and descriptions. |
208
+ | `FileList` | `components/file-list` | Displays a list of files with name, size, and upload progress. |
209
+ | `Kbd` | `components/kbd` | Displays which key or combination of keys performs a given action. |
210
+ | `QrCode` | `components/qr-code` | Generates a QR code from a string, rendered as inline SVG. |
211
+ | `RelativeTime` | `components/relative-time` | Displays a live-updating time, defaulting to the local timezone. |
212
+ | `Sortable` | `components/sortable` | A drag-to-reorder list built on native HTML5 drag events. |
213
+ | `Timeline` | `components/timeline` | A vertical sequence of dated events, connected by a line. |
214
+ | `Tree` | `components/tree` | A hierarchical, expandable/collapsible list of nodes. |
215
+
216
+ ### Code & Content
217
+
218
+ | Component | Import | Description |
219
+ | ----------- | ----------------------- | ---------------------------------------------------------------- |
220
+ | `CodeBlock` | `components/code-block` | A syntax-highlighted code block with a copy-to-clipboard button. |
221
+ | `Snippet` | `components/snippet` | Displays and copies code in a tabbed interface. |
222
+
223
+ ## Conventions
224
+
225
+ - **One folder per component**, matching the `exports: "./components/*"`
226
+ map — folders that export more than one related component (`Avatar` +
227
+ `AvatarGroup`, `Combobox` + `MultiSelect`, `Button` + `ButtonGroup`,
228
+ `Link` + `LinkPreview`) still ship as a single import path.
229
+ - **Variants via `class-variance-authority`.** Components with visual
230
+ variants keep them in a co-located `variants.ts`, exporting both the
231
+ `cva()` call and its `VariantProps` type (e.g. `BadgeVariants`).
232
+ - **Multi-part `className`.** Components with more than one internal
233
+ element accept `className` as an object instead of a string, keyed by
234
+ part (`{ root?, trigger?, content?, ... }`), so you can target exactly
235
+ the part you need without fighting specificity.
236
+ - **`fallback`/`children`-first fallbacks**, not silent empty states —
237
+ e.g. `Avatar`'s `fallback` prop is required, not optional.
238
+
239
+ ## Theming
240
+
241
+ forth-ui has no styles of its own beyond Tailwind utility classes and the
242
+ CSS variables (`--primary`, `--muted`, `--border`, ...) already defined by
243
+ [`@forthtilliath/shadcn-ui`](../shadcn-ui)'s theme. Theming forth-ui means
244
+ theming shadcn-ui — swap the CSS variables (or the whole theme preset) and
245
+ every forth-ui component follows.
246
+
247
+ ## Development
248
+
249
+ ```bash
250
+ pnpm run dev # concurrently: tsc --watch + tailwind --watch
251
+ pnpm run build # tsc + tailwind build -> dist/
252
+ pnpm run check-types # tsc --noEmit
253
+ pnpm run lint # eslint
254
+ ```
255
+
256
+ Every component has a matching Storybook story under
257
+ [`apps/react-sb/src/stories/forth-ui`](../../../apps/react-sb/src/stories/forth-ui) —
258
+ run `pnpm run dev:sb` from the repo root to browse them all, organized into
259
+ the same 8 categories as this README.
260
+
261
+ ### Registry
262
+
263
+ [`apps/shadweb/scripts/generate-forth-ui-registry.ts`](../../../apps/shadweb/scripts/generate-forth-ui-registry.ts)
264
+ regenerates the registry from this package's source — never hand-edit
265
+ `apps/shadweb/registry/forth-ui/**` directly. From `apps/shadweb`:
266
+
267
+ ```bash
268
+ pnpm run registry:generate # source -> apps/shadweb/registry/forth-ui + registry.json
269
+ pnpm run registry:build # registry.json -> public/r/*.json (shadcn build)
270
+ pnpm run registry:sync # both, in order
271
+ ```
272
+
273
+ `Grid` is intentionally excluded — it depends on two private, unpublished
274
+ monorepo packages (`@forthtilliath/react-hooks`, `@forthtilliath/types`)
275
+ that aren't inlined into the registry item yet.
276
+
277
+ ## License
278
+
279
+ MIT
@@ -0,0 +1,3 @@
1
+ import type { AccordionProps } from "./types";
2
+ export declare function Items({ hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, variant, size, generateId, }: Omit<AccordionProps, "multiple" | "className">): import("react").JSX.Element[];
3
+ //# sourceMappingURL=accordion-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-items.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion-items.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAO9C,wBAAgB,KAAK,CAAC,EACpB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,IAAI,EACJ,UAA+C,GAChD,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,WAAW,CAAC,iCAuEhD"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AccordionContent, AccordionItem, AccordionTrigger, } from "@forthtilliath/shadcn-ui/components/accordion";
3
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
4
+ import { accordionContentVariants, accordionItemVariants, accordionTriggerVariants, } from "./variants";
5
+ export function Items({ hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, variant, size, generateId = (index) => `item-${String(index)}`, }) {
6
+ return items.map(({ title, subtitle, content, disabled, ...props }, index) => {
7
+ let iconItem = icon;
8
+ if ("icon" in props)
9
+ iconItem = props.icon;
10
+ const triggerItem = (_jsxs("div", { className: "flex-1 flex flex-col text-start", children: [_jsx("span", { "data-slot": "title", className: "group-hover:underline [&_svg]:-order-1", children: title }), !!subtitle && (_jsx("span", { "data-slot": "subtitle", className: "text-muted-foreground font-normal", children: subtitle }))] }));
11
+ return (_jsxs(AccordionItem, { value: generateId(index), className: cn(accordionItemVariants({ variant, size }), classNameItem), children: [_jsx(AccordionTrigger, { disabled: disabled, hideChevron: hideChevron, customChevron: customChevron, className: cn(accordionTriggerVariants({
12
+ variant,
13
+ size,
14
+ disabled,
15
+ chevronAlignment,
16
+ }), classNameTrigger), children: iconItem ? (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { "data-slot": "icon", className: "shrink-0", children: iconItem }), triggerItem] })) : (triggerItem) }), _jsx(AccordionContent, { className: cn(accordionContentVariants({ variant, size }), classNameContent), children: content })] }, generateId(index)));
17
+ });
18
+ }
@@ -0,0 +1,3 @@
1
+ import type { MultipleProps } from "./types";
2
+ export declare function AccordionMultiple({ className, variant, size, hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, generateId, ...props }: MultipleProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=accordion-multiple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-multiple.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion-multiple.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,OAAO,EACP,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,+BAsBf"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Accordion as AccordionPrimitive } from "@forthtilliath/shadcn-ui/components/accordion";
3
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
4
+ import { Items } from "./accordion-items";
5
+ import { accordionRootVariants } from "./variants";
6
+ export function AccordionMultiple({ className, variant, size, hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, generateId, ...props }) {
7
+ return (_jsx(AccordionPrimitive, { type: "multiple", className: cn(accordionRootVariants({ variant, size }), className), ...props, children: _jsx(Items, { variant: variant, size: size, hideChevron: hideChevron, chevronAlignment: chevronAlignment, customChevron: customChevron, items: items, icon: icon, classNameItem: classNameItem, classNameTrigger: classNameTrigger, classNameContent: classNameContent, generateId: generateId }) }));
8
+ }
@@ -0,0 +1,3 @@
1
+ import type { SingleProps } from "./types";
2
+ export declare function AccordionSingle({ className, variant, size, hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, generateId, ...props }: SingleProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=accordion-single.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-single.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion-single.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,WAAW,+BAsBb"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Accordion as AccordionPrimitive } from "@forthtilliath/shadcn-ui/components/accordion";
3
+ import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
4
+ import { Items } from "./accordion-items";
5
+ import { accordionRootVariants } from "./variants";
6
+ export function AccordionSingle({ className, variant, size, hideChevron, chevronAlignment, customChevron, items, icon, classNameItem, classNameTrigger, classNameContent, generateId, ...props }) {
7
+ return (_jsx(AccordionPrimitive, { type: "single", className: cn(accordionRootVariants({ variant, size }), className), ...props, children: _jsx(Items, { variant: variant, size: size, hideChevron: hideChevron, chevronAlignment: chevronAlignment, customChevron: customChevron, items: items, icon: icon, classNameItem: classNameItem, classNameTrigger: classNameTrigger, classNameContent: classNameContent, generateId: generateId }) }));
8
+ }
@@ -0,0 +1,17 @@
1
+ import type { AccordionProps } from "./types";
2
+ /**
3
+ * A vertically stacked set of interactive headings that each reveal a section of content.
4
+ *
5
+ * _Inspired from multiple sources, to make a consistent and reusable component._
6
+ * @version 0.1.0
7
+ * @author Forth
8
+ * @copyright 2025 Forth
9
+ *
10
+ * @see https://ui.shadcn.com/docs/components/accordion
11
+ * @see https://motion-primitives.com/docs/accordion
12
+ * @see https://originui.com/accordion
13
+ * @see https://www.hextaui.com/docs/ui/components/accordion
14
+ * @see https://www.shadcnui-blocks.com/components/accordion
15
+ */
16
+ export declare function Accordion({ multiple, ...props }: AccordionProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAA8B,MAAM,SAAS,CAAC;AAE1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAU/D"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AccordionMultiple } from "./accordion-multiple";
3
+ import { AccordionSingle } from "./accordion-single";
4
+ /**
5
+ * A vertically stacked set of interactive headings that each reveal a section of content.
6
+ *
7
+ * _Inspired from multiple sources, to make a consistent and reusable component._
8
+ * @version 0.1.0
9
+ * @author Forth
10
+ * @copyright 2025 Forth
11
+ *
12
+ * @see https://ui.shadcn.com/docs/components/accordion
13
+ * @see https://motion-primitives.com/docs/accordion
14
+ * @see https://originui.com/accordion
15
+ * @see https://www.hextaui.com/docs/ui/components/accordion
16
+ * @see https://www.shadcnui-blocks.com/components/accordion
17
+ */
18
+ export function Accordion({ multiple, ...props }) {
19
+ if (props.icon && props.items.some((item) => "icon" in item && item.icon)) {
20
+ throw new Error("You can't use both icon and items.icon");
21
+ }
22
+ return multiple ? (_jsx(AccordionMultiple, { ...props })) : (_jsx(AccordionSingle, { ...props }));
23
+ }
@@ -0,0 +1,2 @@
1
+ export { Accordion } from "./accordion";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export { Accordion } from "./accordion";
@@ -0,0 +1,100 @@
1
+ import type React from "react";
2
+ import { type AccordionMultipleProps, type AccordionSingleProps } from "@radix-ui/react-accordion";
3
+ import type { LucideProps } from "lucide-react";
4
+ import type { AccordionTriggerVariants } from "./variants";
5
+ type AccordionVariantType = "default" | "outline" | "box" | "contained" | "box-contained" | "tabs" | "highlight-active";
6
+ type AccordionSizeType = "sm" | "default" | "lg";
7
+ interface Item {
8
+ title: React.ReactNode;
9
+ subtitle?: React.ReactNode;
10
+ content: React.ReactNode;
11
+ disabled?: boolean;
12
+ }
13
+ interface ItemWithIcon extends Item {
14
+ icon: React.ReactNode;
15
+ }
16
+ interface BaseProps {
17
+ /**
18
+ * The items to render in the accordion.
19
+ */
20
+ items: Item[] | ItemWithIcon[];
21
+ /**
22
+ * The icon displayed next to the title is the same for all items.
23
+ *
24
+ * Additionally, using both ItemWithIcon and icon will throw an error.
25
+ */
26
+ icon?: React.ReactNode;
27
+ /**
28
+ * Hide the chevron icon.
29
+ * @default false
30
+ */
31
+ hideChevron?: boolean;
32
+ /**
33
+ * The alignment of the chevron icon.
34
+ * @default "right"
35
+ */
36
+ chevronAlignment?: AccordionTriggerVariants["chevronAlignment"];
37
+ /**
38
+ * Custom chevron icon.
39
+ */
40
+ customChevron?: React.ReactElement<LucideProps>;
41
+ /**
42
+ * Style the accordion.
43
+ */
44
+ className?: string;
45
+ /**
46
+ * Style the accordion item.
47
+ */
48
+ classNameItem?: string;
49
+ /**
50
+ * Style the accordion trigger.
51
+ */
52
+ classNameTrigger?: string;
53
+ /**
54
+ * Style the accordion content.
55
+ */
56
+ classNameContent?: string;
57
+ /**
58
+ * The variant of the accordion.
59
+ * @default "default"
60
+ */
61
+ variant?: AccordionVariantType;
62
+ /**
63
+ * The size of the accordion.
64
+ * @default "default"
65
+ */
66
+ size?: AccordionSizeType;
67
+ /**
68
+ * Generate a unique id for each item.
69
+ * @default `item-{index}`
70
+ */
71
+ generateId?: (index: number) => string;
72
+ }
73
+ type OmittedProps = "type" | "defaultValue" | "collapsible";
74
+ export type SingleProps = BaseProps & Omit<AccordionSingleProps, OmittedProps> & {
75
+ /**
76
+ * Set the ``type`` prop to ``multiple`` to enable opening multiple items at once.
77
+ * @default false
78
+ */
79
+ multiple?: false;
80
+ /** Set the default open item */
81
+ defaultValue?: string;
82
+ /**
83
+ * Use the ``collapsible`` prop to allow all items to close.
84
+ * @default false
85
+ */
86
+ collapsible?: boolean;
87
+ };
88
+ export type MultipleProps = BaseProps & Omit<AccordionMultipleProps, OmittedProps> & {
89
+ multiple: true;
90
+ /** Set the default open items */
91
+ defaultValue?: string[];
92
+ /**
93
+ * Use the ``collapsible`` prop to allow all items to close.
94
+ * @default true
95
+ */
96
+ collapsible?: true;
97
+ };
98
+ export type AccordionProps = SingleProps | MultipleProps;
99
+ export {};
100
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,KAAK,oBAAoB,GACrB,SAAS,GACT,SAAS,GACT,KAAK,GACL,WAAW,GACX,eAAe,GACf,MAAM,GACN,kBAAkB,CAAC;AAEvB,KAAK,iBAAiB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjD,UAAU,IAAI;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,YAAa,SAAQ,IAAI;IACjC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB;AAED,UAAU,SAAS;IACjB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAChE;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAChD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACxC;AAGD,KAAK,YAAY,GAAG,MAAM,GAAG,cAAc,GAAG,aAAa,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,SAAS,GACjC,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AACJ,MAAM,MAAM,aAAa,GAAG,SAAS,GACnC,IAAI,CAAC,sBAAsB,EAAE,YAAY,CAAC,GAAG;IAC3C,QAAQ,EAAE,IAAI,CAAC;IACf,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ export declare const accordionRootVariants: (props?: ({
3
+ variant?: "default" | "outline" | "box" | "contained" | "box-contained" | "tabs" | "highlight-active" | null | undefined;
4
+ size?: "default" | "sm" | "lg" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export declare const accordionItemVariants: (props?: ({
7
+ variant?: "default" | "outline" | "box" | "contained" | "box-contained" | "tabs" | "highlight-active" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ export declare const accordionTriggerVariants: (props?: ({
11
+ variant?: "default" | "outline" | "box" | "contained" | "box-contained" | "tabs" | "highlight-active" | null | undefined;
12
+ size?: "default" | "sm" | "lg" | null | undefined;
13
+ disabled?: boolean | null | undefined;
14
+ chevronAlignment?: "right" | "left" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ export declare const accordionContentVariants: (props?: ({
17
+ variant?: "default" | "outline" | "box" | "contained" | "box-contained" | "tabs" | "highlight-active" | null | undefined;
18
+ size?: "default" | "sm" | "lg" | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ type AccordionVariants = VariantProps<typeof accordionRootVariants>;
21
+ type AccordionItemVariants = VariantProps<typeof accordionItemVariants>;
22
+ type AccordionTriggerVariants = VariantProps<typeof accordionTriggerVariants>;
23
+ type AccordionContentVariants = VariantProps<typeof accordionContentVariants>;
24
+ export type { AccordionContentVariants, AccordionItemVariants, AccordionTriggerVariants, AccordionVariants, };
25
+ //# sourceMappingURL=variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,eAAO,MAAM,qBAAqB;;;8EAwBjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;8EAwBhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;8EAmCpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;8EAkBnC,CAAC;AAEH,KAAK,iBAAiB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,KAAK,qBAAqB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACxE,KAAK,wBAAwB,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC9E,KAAK,wBAAwB,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE9E,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,GAClB,CAAC"}