@forthtilliath/forth-ui 0.3.0 → 0.4.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 (357) hide show
  1. package/README.md +75 -22
  2. package/dist/components/accordion/accordion-items.d.ts +1 -1
  3. package/dist/components/accordion/accordion-items.d.ts.map +1 -1
  4. package/dist/components/accordion/accordion-items.js +3 -2
  5. package/dist/components/accordion/accordion-multiple.d.ts +1 -1
  6. package/dist/components/accordion/accordion-multiple.d.ts.map +1 -1
  7. package/dist/components/accordion/accordion-multiple.js +2 -2
  8. package/dist/components/accordion/accordion-single.d.ts +1 -1
  9. package/dist/components/accordion/accordion-single.d.ts.map +1 -1
  10. package/dist/components/accordion/accordion-single.js +2 -2
  11. package/dist/components/accordion/accordion-trigger.d.ts +15 -0
  12. package/dist/components/accordion/accordion-trigger.d.ts.map +1 -0
  13. package/dist/components/accordion/accordion-trigger.js +25 -0
  14. package/dist/components/accordion/accordion.d.ts +1 -1
  15. package/dist/components/accordion/accordion.d.ts.map +1 -1
  16. package/dist/components/accordion/accordion.js +2 -2
  17. package/dist/components/accordion/index.d.ts +1 -1
  18. package/dist/components/accordion/index.d.ts.map +1 -1
  19. package/dist/components/accordion/index.js +1 -1
  20. package/dist/components/accordion/types.d.ts +1 -1
  21. package/dist/components/accordion/types.d.ts.map +1 -1
  22. package/dist/components/alert/alert.d.ts +8 -2
  23. package/dist/components/alert/alert.d.ts.map +1 -1
  24. package/dist/components/alert/alert.js +5 -3
  25. package/dist/components/alert/index.d.ts +3 -3
  26. package/dist/components/alert/index.d.ts.map +1 -1
  27. package/dist/components/alert/index.js +1 -1
  28. package/dist/components/alert/variants.d.ts.map +1 -1
  29. package/dist/components/alert/variants.js +11 -4
  30. package/dist/components/avatar/avatar-group.d.ts +1 -1
  31. package/dist/components/avatar/avatar-group.d.ts.map +1 -1
  32. package/dist/components/avatar/avatar-group.js +1 -1
  33. package/dist/components/avatar/avatar.d.ts +9 -3
  34. package/dist/components/avatar/avatar.d.ts.map +1 -1
  35. package/dist/components/avatar/avatar.js +7 -4
  36. package/dist/components/avatar/index.d.ts +4 -4
  37. package/dist/components/avatar/index.d.ts.map +1 -1
  38. package/dist/components/avatar/index.js +2 -2
  39. package/dist/components/avatar/variants.d.ts.map +1 -1
  40. package/dist/components/avatar/variants.js +39 -39
  41. package/dist/components/badge/badge.d.ts +8 -2
  42. package/dist/components/badge/badge.d.ts.map +1 -1
  43. package/dist/components/badge/badge.js +5 -3
  44. package/dist/components/badge/index.d.ts +3 -3
  45. package/dist/components/badge/index.d.ts.map +1 -1
  46. package/dist/components/badge/index.js +1 -1
  47. package/dist/components/badge/variants.d.ts.map +1 -1
  48. package/dist/components/badge/variants.js +8 -4
  49. package/dist/components/banner/banner.d.ts +8 -2
  50. package/dist/components/banner/banner.d.ts.map +1 -1
  51. package/dist/components/banner/banner.js +5 -3
  52. package/dist/components/banner/index.d.ts +3 -3
  53. package/dist/components/banner/index.d.ts.map +1 -1
  54. package/dist/components/banner/index.js +1 -1
  55. package/dist/components/bento-grid/index.d.ts +2 -2
  56. package/dist/components/bento-grid/index.d.ts.map +1 -1
  57. package/dist/components/bento-grid/index.js +1 -1
  58. package/dist/components/breadcrumb/breadcrumb.d.ts +8 -2
  59. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  60. package/dist/components/breadcrumb/breadcrumb.js +8 -3
  61. package/dist/components/breadcrumb/index.d.ts +2 -2
  62. package/dist/components/breadcrumb/index.d.ts.map +1 -1
  63. package/dist/components/breadcrumb/index.js +1 -1
  64. package/dist/components/button/button.d.ts +1 -1
  65. package/dist/components/button/button.d.ts.map +1 -1
  66. package/dist/components/button/button.js +1 -1
  67. package/dist/components/button/index.d.ts +5 -5
  68. package/dist/components/button/index.d.ts.map +1 -1
  69. package/dist/components/button/index.js +2 -2
  70. package/dist/components/checkbox/index.d.ts +2 -2
  71. package/dist/components/checkbox/index.d.ts.map +1 -1
  72. package/dist/components/checkbox/index.js +1 -1
  73. package/dist/components/chip/chip.d.ts +2 -2
  74. package/dist/components/chip/chip.d.ts.map +1 -1
  75. package/dist/components/chip/chip.js +2 -2
  76. package/dist/components/chip/index.d.ts +2 -2
  77. package/dist/components/chip/index.d.ts.map +1 -1
  78. package/dist/components/chip/index.js +1 -1
  79. package/dist/components/code-block/code-block.d.ts +7 -1
  80. package/dist/components/code-block/code-block.d.ts.map +1 -1
  81. package/dist/components/code-block/code-block.js +4 -2
  82. package/dist/components/code-block/index.d.ts +2 -2
  83. package/dist/components/code-block/index.d.ts.map +1 -1
  84. package/dist/components/code-block/index.js +1 -1
  85. package/dist/components/collapsible/index.d.ts +6 -6
  86. package/dist/components/collapsible/index.d.ts.map +1 -1
  87. package/dist/components/collapsible/index.js +3 -3
  88. package/dist/components/color-picker/color-picker.d.ts +7 -1
  89. package/dist/components/color-picker/color-picker.d.ts.map +1 -1
  90. package/dist/components/color-picker/color-picker.js +5 -3
  91. package/dist/components/color-picker/index.d.ts +2 -2
  92. package/dist/components/color-picker/index.d.ts.map +1 -1
  93. package/dist/components/color-picker/index.js +1 -1
  94. package/dist/components/column-menu/column-menu.d.ts +1 -1
  95. package/dist/components/column-menu/column-menu.d.ts.map +1 -1
  96. package/dist/components/column-menu/column-menu.js +3 -3
  97. package/dist/components/column-menu/index.d.ts +5 -5
  98. package/dist/components/column-menu/index.d.ts.map +1 -1
  99. package/dist/components/column-menu/index.js +3 -3
  100. package/dist/components/column-menu/sortable-column-row.d.ts +1 -1
  101. package/dist/components/column-menu/sortable-column-row.d.ts.map +1 -1
  102. package/dist/components/column-menu/sortable-column-row.js +1 -1
  103. package/dist/components/combobox/combobox.d.ts +16 -1
  104. package/dist/components/combobox/combobox.d.ts.map +1 -1
  105. package/dist/components/combobox/combobox.js +7 -3
  106. package/dist/components/combobox/index.d.ts +4 -4
  107. package/dist/components/combobox/index.d.ts.map +1 -1
  108. package/dist/components/combobox/index.js +2 -2
  109. package/dist/components/combobox/multi-select.d.ts +17 -2
  110. package/dist/components/combobox/multi-select.d.ts.map +1 -1
  111. package/dist/components/combobox/multi-select.js +8 -4
  112. package/dist/components/command-palette/command-palette.d.ts +7 -1
  113. package/dist/components/command-palette/command-palette.d.ts.map +1 -1
  114. package/dist/components/command-palette/command-palette.js +6 -2
  115. package/dist/components/command-palette/index.d.ts +2 -2
  116. package/dist/components/command-palette/index.d.ts.map +1 -1
  117. package/dist/components/command-palette/index.js +1 -1
  118. package/dist/components/confirm-dialog/confirm-dialog.d.ts +7 -1
  119. package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -1
  120. package/dist/components/confirm-dialog/confirm-dialog.js +12 -6
  121. package/dist/components/confirm-dialog/index.d.ts +3 -3
  122. package/dist/components/confirm-dialog/index.d.ts.map +1 -1
  123. package/dist/components/confirm-dialog/index.js +2 -2
  124. package/dist/components/confirm-dialog/use-confirm.d.ts +1 -1
  125. package/dist/components/confirm-dialog/use-confirm.d.ts.map +1 -1
  126. package/dist/components/confirm-dialog/use-confirm.js +1 -1
  127. package/dist/components/copy-menu-item/copy-menu-item.d.ts +18 -0
  128. package/dist/components/copy-menu-item/copy-menu-item.d.ts.map +1 -0
  129. package/dist/components/copy-menu-item/copy-menu-item.js +23 -0
  130. package/dist/components/copy-menu-item/index.d.ts +3 -0
  131. package/dist/components/copy-menu-item/index.d.ts.map +1 -0
  132. package/dist/components/copy-menu-item/index.js +1 -0
  133. package/dist/components/count-animation/index.d.ts +2 -2
  134. package/dist/components/count-animation/index.d.ts.map +1 -1
  135. package/dist/components/count-animation/index.js +1 -1
  136. package/dist/components/date-picker/date-picker.d.ts +7 -1
  137. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  138. package/dist/components/date-picker/date-picker.js +6 -3
  139. package/dist/components/date-picker/index.d.ts +2 -2
  140. package/dist/components/date-picker/index.d.ts.map +1 -1
  141. package/dist/components/date-picker/index.js +1 -1
  142. package/dist/components/description-list/index.d.ts +1 -1
  143. package/dist/components/description-list/index.d.ts.map +1 -1
  144. package/dist/components/description-list/index.js +1 -1
  145. package/dist/components/dropdrawer/index.d.ts +2 -2
  146. package/dist/components/dropdrawer/index.d.ts.map +1 -1
  147. package/dist/components/dropdrawer/index.js +1 -1
  148. package/dist/components/dropzone/dropzone.d.ts +7 -1
  149. package/dist/components/dropzone/dropzone.d.ts.map +1 -1
  150. package/dist/components/dropzone/dropzone.js +5 -3
  151. package/dist/components/dropzone/index.d.ts +2 -2
  152. package/dist/components/dropzone/index.d.ts.map +1 -1
  153. package/dist/components/dropzone/index.js +1 -1
  154. package/dist/components/field/index.d.ts +2 -2
  155. package/dist/components/field/index.d.ts.map +1 -1
  156. package/dist/components/field/index.js +1 -1
  157. package/dist/components/file-list/file-list.d.ts +4 -1
  158. package/dist/components/file-list/file-list.d.ts.map +1 -1
  159. package/dist/components/file-list/file-list.js +4 -1
  160. package/dist/components/file-list/index.d.ts +2 -2
  161. package/dist/components/file-list/index.d.ts.map +1 -1
  162. package/dist/components/file-list/index.js +1 -1
  163. package/dist/components/gradient-frame/index.d.ts +2 -2
  164. package/dist/components/gradient-frame/index.d.ts.map +1 -1
  165. package/dist/components/gradient-frame/index.js +1 -1
  166. package/dist/components/grid/context.d.ts.map +1 -1
  167. package/dist/components/grid/context.js +1 -0
  168. package/dist/components/grid/grid-item.d.ts +1 -1
  169. package/dist/components/grid/grid-item.d.ts.map +1 -1
  170. package/dist/components/grid/grid-item.js +3 -2
  171. package/dist/components/grid/grid.d.ts +3 -3
  172. package/dist/components/grid/grid.d.ts.map +1 -1
  173. package/dist/components/grid/grid.js +4 -3
  174. package/dist/components/grid/index.d.ts +2 -2
  175. package/dist/components/grid/index.d.ts.map +1 -1
  176. package/dist/components/grid/index.js +2 -2
  177. package/dist/components/grid/variants.d.ts +1 -1
  178. package/dist/components/icon-bubble/icon-bubble.d.ts +1 -1
  179. package/dist/components/icon-bubble/icon-bubble.d.ts.map +1 -1
  180. package/dist/components/icon-bubble/icon-bubble.js +1 -1
  181. package/dist/components/icon-bubble/index.d.ts +3 -3
  182. package/dist/components/icon-bubble/index.d.ts.map +1 -1
  183. package/dist/components/icon-bubble/index.js +1 -1
  184. package/dist/components/image-input/image-input.d.ts +7 -1
  185. package/dist/components/image-input/image-input.d.ts.map +1 -1
  186. package/dist/components/image-input/image-input.js +4 -2
  187. package/dist/components/image-input/index.d.ts +2 -2
  188. package/dist/components/image-input/index.d.ts.map +1 -1
  189. package/dist/components/image-input/index.js +1 -1
  190. package/dist/components/infinite-scroll/index.d.ts +2 -2
  191. package/dist/components/infinite-scroll/index.d.ts.map +1 -1
  192. package/dist/components/infinite-scroll/index.js +1 -1
  193. package/dist/components/kbd/index.d.ts +1 -1
  194. package/dist/components/kbd/index.d.ts.map +1 -1
  195. package/dist/components/kbd/index.js +1 -1
  196. package/dist/components/link/index.d.ts +6 -6
  197. package/dist/components/link/index.d.ts.map +1 -1
  198. package/dist/components/link/index.js +3 -3
  199. package/dist/components/link/link.d.ts +1 -1
  200. package/dist/components/link/link.d.ts.map +1 -1
  201. package/dist/components/link/link.js +1 -1
  202. package/dist/components/marquee/index.d.ts +2 -2
  203. package/dist/components/marquee/index.d.ts.map +1 -1
  204. package/dist/components/marquee/index.js +1 -1
  205. package/dist/components/mode-toggle/index.d.ts +4 -0
  206. package/dist/components/mode-toggle/index.d.ts.map +1 -0
  207. package/dist/components/mode-toggle/index.js +2 -0
  208. package/dist/components/mode-toggle/mode-toggle.d.ts +22 -0
  209. package/dist/components/mode-toggle/mode-toggle.d.ts.map +1 -0
  210. package/dist/components/mode-toggle/mode-toggle.js +26 -0
  211. package/dist/components/mode-toggle/theme-provider.d.ts +13 -0
  212. package/dist/components/mode-toggle/theme-provider.d.ts.map +1 -0
  213. package/dist/components/mode-toggle/theme-provider.js +15 -0
  214. package/dist/components/multi-step-loader/index.d.ts +2 -2
  215. package/dist/components/multi-step-loader/index.d.ts.map +1 -1
  216. package/dist/components/multi-step-loader/index.js +1 -1
  217. package/dist/components/multi-step-loader/multi-step-loader.js +2 -2
  218. package/dist/components/navbar/index.d.ts +4 -4
  219. package/dist/components/navbar/index.d.ts.map +1 -1
  220. package/dist/components/navbar/index.js +2 -2
  221. package/dist/components/navbar/navbar-mobile-menu.d.ts +7 -1
  222. package/dist/components/navbar/navbar-mobile-menu.d.ts.map +1 -1
  223. package/dist/components/navbar/navbar-mobile-menu.js +5 -3
  224. package/dist/components/notification-center/index.d.ts +2 -2
  225. package/dist/components/notification-center/index.d.ts.map +1 -1
  226. package/dist/components/notification-center/index.js +1 -1
  227. package/dist/components/notification-center/notification-center.d.ts +7 -1
  228. package/dist/components/notification-center/notification-center.d.ts.map +1 -1
  229. package/dist/components/notification-center/notification-center.js +7 -4
  230. package/dist/components/number-input/index.d.ts +2 -2
  231. package/dist/components/number-input/index.d.ts.map +1 -1
  232. package/dist/components/number-input/index.js +1 -1
  233. package/dist/components/number-input/number-input.d.ts +7 -1
  234. package/dist/components/number-input/number-input.d.ts.map +1 -1
  235. package/dist/components/number-input/number-input.js +6 -4
  236. package/dist/components/pagination/index.d.ts +4 -4
  237. package/dist/components/pagination/index.d.ts.map +1 -1
  238. package/dist/components/pagination/index.js +2 -2
  239. package/dist/components/pagination/pagination.d.ts +8 -2
  240. package/dist/components/pagination/pagination.d.ts.map +1 -1
  241. package/dist/components/pagination/pagination.js +12 -9
  242. package/dist/components/password-input/index.d.ts +4 -4
  243. package/dist/components/password-input/index.d.ts.map +1 -1
  244. package/dist/components/password-input/index.js +2 -2
  245. package/dist/components/password-input/password-input.d.ts +9 -2
  246. package/dist/components/password-input/password-input.d.ts.map +1 -1
  247. package/dist/components/password-input/password-input.js +4 -2
  248. package/dist/components/progress/index.d.ts +3 -3
  249. package/dist/components/progress/index.d.ts.map +1 -1
  250. package/dist/components/progress/index.js +1 -1
  251. package/dist/components/progress/progress.d.ts +5 -2
  252. package/dist/components/progress/progress.d.ts.map +1 -1
  253. package/dist/components/progress/progress.js +5 -3
  254. package/dist/components/qr-code/index.d.ts +2 -2
  255. package/dist/components/qr-code/index.d.ts.map +1 -1
  256. package/dist/components/qr-code/index.js +1 -1
  257. package/dist/components/qr-code/qr-code.d.ts +7 -1
  258. package/dist/components/qr-code/qr-code.d.ts.map +1 -1
  259. package/dist/components/qr-code/qr-code.js +5 -2
  260. package/dist/components/radio/index.d.ts +2 -2
  261. package/dist/components/radio/index.d.ts.map +1 -1
  262. package/dist/components/radio/index.js +1 -1
  263. package/dist/components/rating/index.d.ts +2 -2
  264. package/dist/components/rating/index.d.ts.map +1 -1
  265. package/dist/components/rating/index.js +1 -1
  266. package/dist/components/rating/rating.d.ts +7 -1
  267. package/dist/components/rating/rating.d.ts.map +1 -1
  268. package/dist/components/rating/rating.js +23 -2
  269. package/dist/components/relative-time/index.d.ts +2 -2
  270. package/dist/components/relative-time/index.d.ts.map +1 -1
  271. package/dist/components/relative-time/index.js +1 -1
  272. package/dist/components/reparent/index.d.ts +2 -2
  273. package/dist/components/reparent/index.d.ts.map +1 -1
  274. package/dist/components/reparent/index.js +1 -1
  275. package/dist/components/repeat/index.d.ts +1 -1
  276. package/dist/components/repeat/index.d.ts.map +1 -1
  277. package/dist/components/repeat/index.js +1 -1
  278. package/dist/components/scroll-progress/index.d.ts +2 -2
  279. package/dist/components/scroll-progress/index.d.ts.map +1 -1
  280. package/dist/components/scroll-progress/index.js +1 -1
  281. package/dist/components/scroll-shadow/index.d.ts +2 -2
  282. package/dist/components/scroll-shadow/index.d.ts.map +1 -1
  283. package/dist/components/scroll-shadow/index.js +1 -1
  284. package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -1
  285. package/dist/components/scroll-shadow/scroll-shadow.js +3 -1
  286. package/dist/components/scrollspy/index.d.ts +2 -2
  287. package/dist/components/scrollspy/index.d.ts.map +1 -1
  288. package/dist/components/scrollspy/index.js +1 -1
  289. package/dist/components/separator/index.d.ts +2 -2
  290. package/dist/components/separator/index.d.ts.map +1 -1
  291. package/dist/components/separator/index.js +1 -1
  292. package/dist/components/snippet/index.d.ts +2 -2
  293. package/dist/components/snippet/index.d.ts.map +1 -1
  294. package/dist/components/snippet/index.js +1 -1
  295. package/dist/components/snippet/snippet.d.ts +7 -1
  296. package/dist/components/snippet/snippet.d.ts.map +1 -1
  297. package/dist/components/snippet/snippet.js +6 -2
  298. package/dist/components/sortable/index.d.ts +2 -2
  299. package/dist/components/sortable/index.d.ts.map +1 -1
  300. package/dist/components/sortable/index.js +1 -1
  301. package/dist/components/spacer/index.d.ts +2 -2
  302. package/dist/components/spacer/index.d.ts.map +1 -1
  303. package/dist/components/spacer/index.js +1 -1
  304. package/dist/components/spinner/index.d.ts +3 -3
  305. package/dist/components/spinner/index.d.ts.map +1 -1
  306. package/dist/components/spinner/index.js +1 -1
  307. package/dist/components/spinner/spinner.d.ts +8 -2
  308. package/dist/components/spinner/spinner.d.ts.map +1 -1
  309. package/dist/components/spinner/spinner.js +6 -3
  310. package/dist/components/stepper/index.d.ts +2 -2
  311. package/dist/components/stepper/index.d.ts.map +1 -1
  312. package/dist/components/stepper/index.js +1 -1
  313. package/dist/components/submit-button/index.d.ts +2 -2
  314. package/dist/components/submit-button/index.d.ts.map +1 -1
  315. package/dist/components/submit-button/index.js +1 -1
  316. package/dist/components/submit-button/submit-button.d.ts +1 -1
  317. package/dist/components/submit-button/submit-button.d.ts.map +1 -1
  318. package/dist/components/submit-button/submit-button.js +1 -1
  319. package/dist/components/tags-input/index.d.ts +2 -2
  320. package/dist/components/tags-input/index.d.ts.map +1 -1
  321. package/dist/components/tags-input/index.js +1 -1
  322. package/dist/components/tags-input/tags-input.d.ts +14 -1
  323. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  324. package/dist/components/tags-input/tags-input.js +7 -4
  325. package/dist/components/theme-image/index.d.ts +3 -0
  326. package/dist/components/theme-image/index.d.ts.map +1 -0
  327. package/dist/components/theme-image/index.js +1 -0
  328. package/dist/components/theme-image/theme-image.d.ts +25 -0
  329. package/dist/components/theme-image/theme-image.d.ts.map +1 -0
  330. package/dist/components/theme-image/theme-image.js +19 -0
  331. package/dist/components/timeline/index.d.ts +2 -2
  332. package/dist/components/timeline/index.d.ts.map +1 -1
  333. package/dist/components/timeline/index.js +1 -1
  334. package/dist/components/toggle-switch/index.d.ts +3 -3
  335. package/dist/components/toggle-switch/index.d.ts.map +1 -1
  336. package/dist/components/toggle-switch/index.js +1 -1
  337. package/dist/components/toggle-switch/toggle-switch.d.ts +1 -1
  338. package/dist/components/toggle-switch/toggle-switch.d.ts.map +1 -1
  339. package/dist/components/toggle-switch/toggle-switch.js +1 -1
  340. package/dist/components/tree/index.d.ts +2 -2
  341. package/dist/components/tree/index.d.ts.map +1 -1
  342. package/dist/components/tree/index.js +1 -1
  343. package/dist/components/tree/tree.js +1 -1
  344. package/dist/globals.css +1188 -72
  345. package/dist/locale/UiLocaleProvider.d.ts +19 -0
  346. package/dist/locale/UiLocaleProvider.d.ts.map +1 -0
  347. package/dist/locale/UiLocaleProvider.js +17 -0
  348. package/dist/locale/index.d.ts +4 -0
  349. package/dist/locale/index.d.ts.map +1 -0
  350. package/dist/locale/index.js +3 -0
  351. package/dist/locale/locale.d.ts +15 -0
  352. package/dist/locale/locale.d.ts.map +1 -0
  353. package/dist/locale/locale.js +19 -0
  354. package/dist/locale/messages.d.ts +98 -0
  355. package/dist/locale/messages.d.ts.map +1 -0
  356. package/dist/locale/messages.js +99 -0
  357. package/package.json +30 -14
@@ -1,3 +1,3 @@
1
- export type { CodeBlockProps } from "./code-block";
2
- export { CodeBlock } from "./code-block";
1
+ export type { CodeBlockProps } from "./code-block.js";
2
+ export { CodeBlock } from "./code-block.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- export { CodeBlock } from "./code-block";
1
+ export { CodeBlock } from "./code-block.js";
@@ -1,7 +1,7 @@
1
- export type { CollapsibleProps } from "./collapsible";
2
- export type { CollapsibleContentProps } from "./collapsible";
3
- export type { CollapsibleTriggerProps } from "./collapsible";
4
- export { Collapsible } from "./collapsible";
5
- export { CollapsibleContent } from "./collapsible";
6
- export { CollapsibleTrigger } from "./collapsible";
1
+ export type { CollapsibleProps } from "./collapsible.js";
2
+ export type { CollapsibleContentProps } from "./collapsible.js";
3
+ export type { CollapsibleTriggerProps } from "./collapsible.js";
4
+ export { Collapsible } from "./collapsible.js";
5
+ export { CollapsibleContent } from "./collapsible.js";
6
+ export { CollapsibleTrigger } from "./collapsible.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collapsible/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collapsible/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,3 +1,3 @@
1
- export { Collapsible } from "./collapsible";
2
- export { CollapsibleContent } from "./collapsible";
3
- export { CollapsibleTrigger } from "./collapsible";
1
+ export { Collapsible } from "./collapsible.js";
2
+ export { CollapsibleContent } from "./collapsible.js";
3
+ export { CollapsibleTrigger } from "./collapsible.js";
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type UiLocale } from "../../locale/locale.js";
2
3
  export interface ColorPickerProps {
3
4
  value?: string;
4
5
  defaultValue?: string;
@@ -7,6 +8,11 @@ export interface ColorPickerProps {
7
8
  className?: string;
8
9
  /** Accessible name for the color swatch, which otherwise has no visible text. */
9
10
  ariaLabel?: string;
11
+ /**
12
+ * Language of the built-in labels — French by default, or the nearest
13
+ * `UiLocaleProvider`'s. Explicit text props still win.
14
+ */
15
+ locale?: UiLocale;
10
16
  }
11
17
  /**
12
18
  * A color swatch + hex text input, kept in sync — built on the browser's
@@ -22,5 +28,5 @@ export interface ColorPickerProps {
22
28
  * @author Forth
23
29
  * @copyright 2026 Forth
24
30
  */
25
- export declare function ColorPicker({ value, defaultValue, onValueChange, disabled, className, ariaLabel, }: ColorPickerProps): React.JSX.Element;
31
+ export declare function ColorPicker({ value, defaultValue, onValueChange, disabled, className, ariaLabel, locale, }: ColorPickerProps): React.JSX.Element;
26
32
  //# sourceMappingURL=color-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../src/components/color-picker/color-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,YAAwB,EACxB,aAAa,EACb,QAAgB,EAChB,SAAS,EACT,SAA0B,GAC3B,EAAE,gBAAgB,qBAoDlB"}
1
+ {"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../src/components/color-picker/color-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,YAAwB,EACxB,aAAa,EACb,QAAgB,EAChB,SAAS,EACT,SAAS,EACT,MAAM,GACP,EAAE,gBAAgB,qBAsDlB"}
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Input } from "@forthtilliath/shadcn-ui/components/input";
5
5
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
6
+ import { useUiMessages } from "../../locale/locale.js";
6
7
  const HEX_PATTERN = /^#[0-9a-f]{6}$/i;
7
8
  /**
8
9
  * A color swatch + hex text input, kept in sync — built on the browser's
@@ -18,7 +19,8 @@ const HEX_PATTERN = /^#[0-9a-f]{6}$/i;
18
19
  * @author Forth
19
20
  * @copyright 2026 Forth
20
21
  */
21
- export function ColorPicker({ value, defaultValue = "#000000", onValueChange, disabled = false, className, ariaLabel = "Choose color", }) {
22
+ export function ColorPicker({ value, defaultValue = "#000000", onValueChange, disabled = false, className, ariaLabel, locale, }) {
23
+ const messages = useUiMessages(locale);
22
24
  const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue);
23
25
  const [textValue, setTextValue] = React.useState(defaultValue);
24
26
  const color = value ?? uncontrolledValue;
@@ -27,9 +29,9 @@ export function ColorPicker({ value, defaultValue = "#000000", onValueChange, di
27
29
  setTextValue(next);
28
30
  onValueChange?.(next);
29
31
  }
30
- return (_jsxs("div", { "data-slot": "color-picker", className: cn("flex items-center gap-2", className), children: [_jsx("label", { "aria-label": ariaLabel, className: cn("border-input size-9 shrink-0 overflow-hidden rounded-md border shadow-xs", disabled && "pointer-events-none opacity-50"), style: { backgroundColor: color }, children: _jsx("input", { type: "color", value: color, disabled: disabled, onChange: (e) => {
32
+ return (_jsxs("div", { "data-slot": "color-picker", className: cn("flex items-center gap-2", className), children: [_jsx("label", { "aria-label": ariaLabel ?? messages.colorPicker.choose, className: cn("border-input size-9 shrink-0 overflow-hidden rounded-md border shadow-xs", disabled && "pointer-events-none opacity-50"), style: { backgroundColor: color }, children: _jsx("input", { type: "color", value: color, disabled: disabled, onChange: (e) => {
31
33
  commit(e.target.value);
32
- }, className: "size-full cursor-pointer opacity-0" }) }), _jsx(Input, { value: textValue, disabled: disabled, onChange: (e) => {
34
+ }, className: "size-full cursor-pointer opacity-0" }) }), _jsx(Input, { value: textValue, "aria-label": messages.colorPicker.hex, disabled: disabled, onChange: (e) => {
33
35
  setTextValue(e.target.value);
34
36
  if (HEX_PATTERN.test(e.target.value)) {
35
37
  commit(e.target.value);
@@ -1,3 +1,3 @@
1
- export type { ColorPickerProps } from "./color-picker";
2
- export { ColorPicker } from "./color-picker";
1
+ export type { ColorPickerProps } from "./color-picker.js";
2
+ export { ColorPicker } from "./color-picker.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/color-picker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/color-picker/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- export { ColorPicker } from "./color-picker";
1
+ export { ColorPicker } from "./color-picker.js";
@@ -1,4 +1,4 @@
1
- import type { ColumnMenuColumn, ColumnMenuLabels } from "./types";
1
+ import type { ColumnMenuColumn, ColumnMenuLabels } from "./types.js";
2
2
  export interface ColumnMenuProps<C extends ColumnMenuColumn> {
3
3
  columns: C[];
4
4
  /** Restored by the reset button. */
@@ -1 +1 @@
1
- {"version":3,"file":"column-menu.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/column-menu.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,gBAAgB;IACzD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,oCAAoC;IACpC,cAAc,EAAE,CAAC,EAAE,CAAC;IACpB,0EAA0E;IAC1E,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACtD,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnC,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,OAAO,CACjB,MAAM,CACF,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,EACP,MAAM,CACP,CACF,CAAC;CACH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,gBAAgB,EAAE,EACrD,OAAO,EACP,cAAc,EACd,eAAe,EACf,MAAM,EACN,KAAa,EACb,SAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,+BAyJpB"}
1
+ {"version":3,"file":"column-menu.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/column-menu.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIrE,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,gBAAgB;IACzD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,oCAAoC;IACpC,cAAc,EAAE,CAAC,EAAE,CAAC;IACpB,0EAA0E;IAC1E,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACtD,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACnC,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,OAAO,CACjB,MAAM,CACF,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,EACP,MAAM,CACP,CACF,CAAC;CACH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,gBAAgB,EAAE,EACrD,OAAO,EACP,cAAc,EACd,eAAe,EACf,MAAM,EACN,KAAa,EACb,SAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,+BAyJpB"}
@@ -5,9 +5,9 @@ import { closestCenter, DndContext } from "@dnd-kit/core";
5
5
  import { arrayMove, SortableContext, verticalListSortingStrategy, } from "@dnd-kit/sortable";
6
6
  import { ChevronDown, RotateCcw } from "lucide-react";
7
7
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
8
- import { SortableColumnRow } from "./sortable-column-row";
9
- import { DEFAULT_COLUMN_MENU_LABELS } from "./types";
10
- import { useDndSensors } from "./use-dnd-sensors";
8
+ import { SortableColumnRow } from "./sortable-column-row.js";
9
+ import { DEFAULT_COLUMN_MENU_LABELS } from "./types.js";
10
+ import { useDndSensors } from "./use-dnd-sensors.js";
11
11
  /**
12
12
  * A dropdown to show/hide and reorder (drag and drop, touch and keyboard
13
13
  * included) the columns of a table, with a "visible / total" counter and a
@@ -1,6 +1,6 @@
1
- export type { ColumnMenuProps } from "./column-menu";
2
- export { ColumnMenu } from "./column-menu";
3
- export type { ColumnMenuColumn, ColumnMenuLabels } from "./types";
4
- export { DEFAULT_COLUMN_MENU_LABELS } from "./types";
5
- export { useDndSensors } from "./use-dnd-sensors";
1
+ export type { ColumnMenuProps } from "./column-menu.js";
2
+ export { ColumnMenu } from "./column-menu.js";
3
+ export type { ColumnMenuColumn, ColumnMenuLabels } from "./types.js";
4
+ export { DEFAULT_COLUMN_MENU_LABELS } from "./types.js";
5
+ export { useDndSensors } from "./use-dnd-sensors.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
- export { ColumnMenu } from "./column-menu";
2
- export { DEFAULT_COLUMN_MENU_LABELS } from "./types";
3
- export { useDndSensors } from "./use-dnd-sensors";
1
+ export { ColumnMenu } from "./column-menu.js";
2
+ export { DEFAULT_COLUMN_MENU_LABELS } from "./types.js";
3
+ export { useDndSensors } from "./use-dnd-sensors.js";
@@ -1,4 +1,4 @@
1
- import type { ColumnMenuColumn } from "./types";
1
+ import type { ColumnMenuColumn } from "./types.js";
2
2
  export interface SortableColumnRowProps<K extends string> {
3
3
  column: ColumnMenuColumn<K>;
4
4
  index: number;
@@ -1 +1 @@
1
- {"version":3,"file":"sortable-column-row.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/sortable-column-row.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM;IACtD,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,MAAM,EACN,KAAK,EACL,KAAK,EACL,eAAe,EACf,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,CAAC,CAAC,CAAC,+BAuD3B"}
1
+ {"version":3,"file":"sortable-column-row.d.ts","sourceRoot":"","sources":["../../../src/components/column-menu/sortable-column-row.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM;IACtD,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,MAAM,EACN,KAAK,EACL,KAAK,EACL,eAAe,EACf,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,CAAC,CAAC,CAAC,+BAuD3B"}
@@ -4,7 +4,7 @@ import { useSortable } from "@dnd-kit/sortable";
4
4
  import { CSS } from "@dnd-kit/utilities";
5
5
  import { GripVertical } from "lucide-react";
6
6
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
7
- import { ToggleSwitch } from "../toggle-switch";
7
+ import { ToggleSwitch } from "../toggle-switch/index.js";
8
8
  /** One row of `ColumnMenu`: drag handle, visibility switch, position. */
9
9
  export function SortableColumnRow({ column, index, total, dragHandleLabel, onToggle, className, }) {
10
10
  const { attributes, listeners, setNodeRef, transform, transition, isDragging, } = useSortable({ id: column.key });
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type UiLocale } from "../../locale/locale.js";
2
3
  export interface ComboboxOption {
3
4
  label: string;
4
5
  value: string;
@@ -12,6 +13,20 @@ export interface ComboboxProps {
12
13
  emptyMessage?: string;
13
14
  disabled?: boolean;
14
15
  className?: string;
16
+ /** `id` of the trigger — set by `Field`, or for a `<label htmlFor>`. */
17
+ id?: string;
18
+ /**
19
+ * Accessible name of the trigger (a combobox takes no name from its text).
20
+ * Defaults to the placeholder, unless a `<label>` targets `id`.
21
+ */
22
+ ariaLabel?: string;
23
+ "aria-describedby"?: string;
24
+ "aria-invalid"?: boolean;
25
+ /**
26
+ * Language of the built-in labels — French by default, or the nearest
27
+ * `UiLocaleProvider`'s. Explicit text props still win.
28
+ */
29
+ locale?: UiLocale;
15
30
  }
16
31
  /**
17
32
  * An autocomplete/searchable select — shadcn-ui doesn't ship a standalone
@@ -27,5 +42,5 @@ export interface ComboboxProps {
27
42
  * @author Forth
28
43
  * @copyright 2026 Forth
29
44
  */
30
- export declare function Combobox({ options, value, onValueChange, placeholder, emptyMessage, disabled, className, }: ComboboxProps): React.JSX.Element;
45
+ export declare function Combobox({ options, value, onValueChange, placeholder, emptyMessage, disabled, className, locale, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }: ComboboxProps): React.JSX.Element;
31
46
  //# sourceMappingURL=combobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAuB,EACvB,YAAkC,EAClC,QAAgB,EAChB,SAAS,GACV,EAAE,aAAa,qBAkDf"}
1
+ {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAGtE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,QAAgB,EAChB,SAAS,EACT,MAAM,EACN,EAAE,EACF,SAAS,EACT,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,GAC5B,EAAE,aAAa,qBA8Df"}
@@ -5,7 +5,8 @@ import { CheckIcon, ChevronsUpDownIcon } from "lucide-react";
5
5
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "@forthtilliath/shadcn-ui/components/command";
6
6
  import { Popover, PopoverContent, PopoverTrigger, } from "@forthtilliath/shadcn-ui/components/popover";
7
7
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
8
- import { Button } from "../button";
8
+ import { useUiMessages } from "../../locale/locale.js";
9
+ import { Button } from "../button/index.js";
9
10
  /**
10
11
  * An autocomplete/searchable select — shadcn-ui doesn't ship a standalone
11
12
  * Combobox primitive, only a docs recipe combining `Popover` + `Command`
@@ -20,10 +21,13 @@ import { Button } from "../button";
20
21
  * @author Forth
21
22
  * @copyright 2026 Forth
22
23
  */
23
- export function Combobox({ options, value, onValueChange, placeholder = "Select…", emptyMessage = "No results found.", disabled = false, className, }) {
24
+ export function Combobox({ options, value, onValueChange, placeholder, emptyMessage, disabled = false, className, locale, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }) {
25
+ const messages = useUiMessages(locale);
26
+ const emptyMessageText = emptyMessage ?? messages.emptyResults;
27
+ const placeholderText = placeholder ?? messages.combobox.placeholder;
24
28
  const [open, setOpen] = React.useState(false);
25
29
  const selected = options.find((option) => option.value === value);
26
- return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, disabled: disabled, className: cn("w-full justify-between font-normal", className), children: [selected?.label ?? placeholder, _jsx(ChevronsUpDownIcon, { className: "opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-(--radix-popover-trigger-width) p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: placeholder }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessage }), _jsx(CommandGroup, { children: options.map((option) => (_jsxs(CommandItem, { value: option.label, disabled: option.disabled, onSelect: () => {
30
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", id: id, role: "combobox", "aria-expanded": open, "aria-label": ariaLabel ?? (id === undefined ? placeholderText : undefined), "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, disabled: disabled, className: cn("w-full justify-between font-normal", className), children: [selected?.label ?? placeholderText, _jsx(ChevronsUpDownIcon, { className: "opacity-50" })] }) }), _jsx(PopoverContent, { "aria-label": ariaLabel ?? placeholderText, className: "w-(--radix-popover-trigger-width) p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: placeholderText }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessageText }), _jsx(CommandGroup, { children: options.map((option) => (_jsxs(CommandItem, { value: option.label, disabled: option.disabled, onSelect: () => {
27
31
  onValueChange?.(option.value === value ? "" : option.value);
28
32
  setOpen(false);
29
33
  }, children: [_jsx(CheckIcon, { className: cn("size-4", option.value === value ? "opacity-100" : "opacity-0") }), option.label] }, option.value))) })] })] }) })] }));
@@ -1,5 +1,5 @@
1
- export type { ComboboxOption, ComboboxProps } from "./combobox";
2
- export { Combobox } from "./combobox";
3
- export type { MultiSelectOption, MultiSelectProps } from "./multi-select";
4
- export { MultiSelect } from "./multi-select";
1
+ export type { ComboboxOption, ComboboxProps } from "./combobox.js";
2
+ export { Combobox } from "./combobox.js";
3
+ export type { MultiSelectOption, MultiSelectProps } from "./multi-select.js";
4
+ export { MultiSelect } from "./multi-select.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { Combobox } from "./combobox";
2
- export { MultiSelect } from "./multi-select";
1
+ export { Combobox } from "./combobox.js";
2
+ export { MultiSelect } from "./multi-select.js";
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
- import type { ComboboxOption } from "./combobox";
2
+ import { type UiLocale } from "../../locale/locale.js";
3
+ import type { ComboboxOption } from "./combobox.js";
3
4
  export type MultiSelectOption = ComboboxOption;
4
5
  export interface MultiSelectProps {
5
6
  options: MultiSelectOption[];
@@ -10,6 +11,20 @@ export interface MultiSelectProps {
10
11
  emptyMessage?: string;
11
12
  disabled?: boolean;
12
13
  className?: string;
14
+ /** `id` of the trigger — set by `Field`, or for a `<label htmlFor>`. */
15
+ id?: string;
16
+ /**
17
+ * Accessible name of the trigger (a combobox takes no name from its text).
18
+ * Defaults to the placeholder, unless a `<label>` targets `id`.
19
+ */
20
+ ariaLabel?: string;
21
+ "aria-describedby"?: string;
22
+ "aria-invalid"?: boolean;
23
+ /**
24
+ * Language of the built-in labels — French by default, or the nearest
25
+ * `UiLocaleProvider`'s. Explicit text props still win.
26
+ */
27
+ locale?: UiLocale;
13
28
  }
14
29
  /**
15
30
  * `Combobox`'s multi-value sibling — selected options render as removable
@@ -26,5 +41,5 @@ export interface MultiSelectProps {
26
41
  * @author Forth
27
42
  * @copyright 2026 Forth
28
43
  */
29
- export declare function MultiSelect({ options, value, defaultValue, onValueChange, placeholder, emptyMessage, disabled, className, }: MultiSelectProps): React.JSX.Element;
44
+ export declare function MultiSelect({ options, value, defaultValue, onValueChange, placeholder, emptyMessage, disabled, className, locale, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }: MultiSelectProps): React.JSX.Element;
30
45
  //# sourceMappingURL=multi-select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/multi-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,EAAE,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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAAuB,EACvB,YAAkC,EAClC,QAAgB,EAChB,SAAS,GACV,EAAE,gBAAgB,qBAoHlB"}
1
+ {"version":3,"file":"multi-select.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/multi-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,EAAE,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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,QAAgB,EAChB,SAAS,EACT,MAAM,EACN,EAAE,EACF,SAAS,EACT,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,GAC5B,EAAE,gBAAgB,qBA4HlB"}
@@ -6,7 +6,8 @@ import { buttonVariants } from "@forthtilliath/shadcn-ui/components/button";
6
6
  import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "@forthtilliath/shadcn-ui/components/command";
7
7
  import { Popover, PopoverContent, PopoverTrigger, } from "@forthtilliath/shadcn-ui/components/popover";
8
8
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
9
- import { Badge } from "../badge";
9
+ import { useUiMessages } from "../../locale/locale.js";
10
+ import { Badge } from "../badge/index.js";
10
11
  /**
11
12
  * `Combobox`'s multi-value sibling — selected options render as removable
12
13
  * `Badge` chips in the trigger. Fills the same shadcn-ui gap as `Combobox`
@@ -22,7 +23,10 @@ import { Badge } from "../badge";
22
23
  * @author Forth
23
24
  * @copyright 2026 Forth
24
25
  */
25
- export function MultiSelect({ options, value, defaultValue, onValueChange, placeholder = "Select…", emptyMessage = "No results found.", disabled = false, className, }) {
26
+ export function MultiSelect({ options, value, defaultValue, onValueChange, placeholder, emptyMessage, disabled = false, className, locale, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }) {
27
+ const messages = useUiMessages(locale);
28
+ const emptyMessageText = emptyMessage ?? messages.emptyResults;
29
+ const placeholderText = placeholder ?? messages.combobox.placeholder;
26
30
  const listboxId = React.useId();
27
31
  const [open, setOpen] = React.useState(false);
28
32
  const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue ?? []);
@@ -37,7 +41,7 @@ export function MultiSelect({ options, value, defaultValue, onValueChange, place
37
41
  : [...selected, optionValue]);
38
42
  }
39
43
  const selectedOptions = options.filter((option) => selected.includes(option.value));
40
- return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("div", { role: "combobox", tabIndex: disabled ? -1 : 0, "aria-expanded": open, "aria-controls": listboxId, "aria-disabled": disabled, "data-disabled": disabled, onKeyDown: (e) => {
44
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("div", { id: id, role: "combobox", tabIndex: disabled ? -1 : 0, "aria-expanded": open, "aria-label": ariaLabel ?? placeholderText, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-controls": listboxId, "aria-disabled": disabled, "data-disabled": disabled, onKeyDown: (e) => {
41
45
  if (!disabled && (e.key === "Enter" || e.key === " ")) {
42
46
  e.preventDefault();
43
47
  setOpen((prev) => !prev);
@@ -46,7 +50,7 @@ export function MultiSelect({ options, value, defaultValue, onValueChange, place
46
50
  e.stopPropagation();
47
51
  }, onOpenChange: () => {
48
52
  toggle(option.value);
49
- }, children: option.label }, option.value)))) : (_jsx("span", { className: "text-muted-foreground font-normal", children: placeholder })) }), _jsx(ChevronsUpDownIcon, { className: "shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { id: listboxId, className: "w-(--radix-popover-trigger-width) p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: placeholder }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessage }), _jsx(CommandGroup, { children: options.map((option) => (_jsxs(CommandItem, { value: option.label, disabled: option.disabled, onSelect: () => {
53
+ }, children: option.label }, option.value)))) : (_jsx("span", { className: "text-muted-foreground font-normal", children: placeholderText })) }), _jsx(ChevronsUpDownIcon, { className: "shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { id: listboxId, "aria-label": ariaLabel ?? placeholderText, className: "w-(--radix-popover-trigger-width) p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: placeholderText }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessageText }), _jsx(CommandGroup, { children: options.map((option) => (_jsxs(CommandItem, { value: option.label, disabled: option.disabled, onSelect: () => {
50
54
  toggle(option.value);
51
55
  }, children: [_jsx(CheckIcon, { className: cn("size-4", selected.includes(option.value)
52
56
  ? "opacity-100"
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type UiLocale } from "../../locale/locale.js";
2
3
  export interface CommandPaletteItem {
3
4
  label: React.ReactNode;
4
5
  value: string;
@@ -18,6 +19,11 @@ export interface CommandPaletteProps {
18
19
  emptyMessage?: string;
19
20
  /** Key that toggles the palette alongside Cmd/Ctrl. @default "k" */
20
21
  shortcutKey?: string;
22
+ /**
23
+ * Language of the built-in labels — French by default, or the nearest
24
+ * `UiLocaleProvider`'s. Explicit text props still win.
25
+ */
26
+ locale?: UiLocale;
21
27
  }
22
28
  /**
23
29
  * A global command menu (`Cmd/Ctrl+<key>` to open) — wraps shadcn-ui's own
@@ -33,5 +39,5 @@ export interface CommandPaletteProps {
33
39
  * @author Forth
34
40
  * @copyright 2026 Forth
35
41
  */
36
- export declare function CommandPalette({ groups, open, onOpenChange, placeholder, emptyMessage, shortcutKey, }: CommandPaletteProps): React.JSX.Element;
42
+ export declare function CommandPalette({ groups, open, onOpenChange, placeholder, emptyMessage, shortcutKey, locale, }: CommandPaletteProps): React.JSX.Element;
37
43
  //# sourceMappingURL=command-palette.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,WAAyC,EACzC,YAAkC,EAClC,WAAiB,GAClB,EAAE,mBAAmB,qBA4DrB"}
1
+ {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAEtE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAiB,EACjB,MAAM,GACP,EAAE,mBAAmB,qBA+DrB"}
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandShortcut, } from "@forthtilliath/shadcn-ui/components/command";
5
+ import { useUiMessages } from "../../locale/locale.js";
5
6
  /**
6
7
  * A global command menu (`Cmd/Ctrl+<key>` to open) — wraps shadcn-ui's own
7
8
  * `CommandDialog` (which has no keyboard-shortcut wiring of its own) with
@@ -16,7 +17,10 @@ import { CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, C
16
17
  * @author Forth
17
18
  * @copyright 2026 Forth
18
19
  */
19
- export function CommandPalette({ groups, open, onOpenChange, placeholder = "Type a command or search…", emptyMessage = "No results found.", shortcutKey = "k", }) {
20
+ export function CommandPalette({ groups, open, onOpenChange, placeholder, emptyMessage, shortcutKey = "k", locale, }) {
21
+ const messages = useUiMessages(locale);
22
+ const emptyMessageText = emptyMessage ?? messages.emptyResults;
23
+ const placeholderText = placeholder ?? messages.commandPalette.placeholder;
20
24
  const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
21
25
  const isOpen = open ?? uncontrolledOpen;
22
26
  function setOpen(next) {
@@ -37,7 +41,7 @@ export function CommandPalette({ groups, open, onOpenChange, placeholder = "Type
37
41
  };
38
42
  // eslint-disable-next-line @eslint-react/exhaustive-deps -- `setOpen` is a plain function redefined every render; including it would re-register this listener every render instead of only when `isOpen`/`shortcutKey` actually change, which is what its own re-closure over `isOpen` depends on
39
43
  }, [isOpen, shortcutKey]);
40
- return (_jsxs(CommandDialog, { open: isOpen, onOpenChange: setOpen, title: "Command Palette", description: placeholder, children: [_jsx(CommandInput, { placeholder: placeholder }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessage }), groups.map((group, index) => (
44
+ return (_jsxs(CommandDialog, { open: isOpen, onOpenChange: setOpen, title: "Command Palette", description: placeholderText, children: [_jsx(CommandInput, { placeholder: placeholderText }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: emptyMessageText }), groups.map((group, index) => (
41
45
  // eslint-disable-next-line @eslint-react/no-array-index-key -- `heading` is optional and not guaranteed unique
42
46
  _jsx(CommandGroup, { heading: group.heading, children: group.items.map((item) => (_jsxs(CommandItem, { value: item.value, onSelect: () => {
43
47
  item.onSelect();
@@ -1,3 +1,3 @@
1
- export type { CommandPaletteGroup, CommandPaletteItem, CommandPaletteProps, } from "./command-palette";
2
- export { CommandPalette } from "./command-palette";
1
+ export type { CommandPaletteGroup, CommandPaletteItem, CommandPaletteProps, } from "./command-palette.js";
2
+ export { CommandPalette } from "./command-palette.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- export { CommandPalette } from "./command-palette";
1
+ export { CommandPalette } from "./command-palette.js";
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type UiLocale } from "../../locale/locale.js";
2
3
  /**
3
4
  * Provides `useConfirm`, an imperative `await confirm({...})` alternative
4
5
  * to hand-wiring an `AlertDialog`'s open state for every yes/no
@@ -12,7 +13,12 @@ import * as React from "react";
12
13
  * @author Forth
13
14
  * @copyright 2026 Forth
14
15
  */
15
- export declare function ConfirmDialogProvider({ children, }: {
16
+ export declare function ConfirmDialogProvider({ children, locale, }: {
16
17
  children: React.ReactNode;
18
+ /**
19
+ * Language of the built-in labels — French by default, or the nearest
20
+ * `UiLocaleProvider`'s. Explicit text props still win.
21
+ */
22
+ locale?: UiLocale;
17
23
  }): React.JSX.Element;
18
24
  //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAsDA"}
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,wBAAwB,CAAC;AAKtE;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,qBA2DA"}
@@ -4,7 +4,8 @@ import * as React from "react";
4
4
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@forthtilliath/shadcn-ui/components/alert-dialog";
5
5
  import { buttonVariants } from "@forthtilliath/shadcn-ui/components/button";
6
6
  import { cn } from "@forthtilliath/shadcn-ui/lib/utils";
7
- import { ConfirmContext } from "./confirm-context";
7
+ import { useUiMessages } from "../../locale/locale.js";
8
+ import { ConfirmContext } from "./confirm-context.js";
8
9
  /**
9
10
  * Provides `useConfirm`, an imperative `await confirm({...})` alternative
10
11
  * to hand-wiring an `AlertDialog`'s open state for every yes/no
@@ -18,23 +19,28 @@ import { ConfirmContext } from "./confirm-context";
18
19
  * @author Forth
19
20
  * @copyright 2026 Forth
20
21
  */
21
- export function ConfirmDialogProvider({ children, }) {
22
+ export function ConfirmDialogProvider({ children, locale, }) {
23
+ const messages = useUiMessages(locale);
22
24
  const [state, setState] = React.useState(null);
25
+ // Kept apart from `state`, so the last options stay rendered while the
26
+ // dialog animates out (clearing them left an empty, unnamed dialog).
27
+ const [open, setOpen] = React.useState(false);
23
28
  const confirm = React.useCallback((options) => {
24
29
  return new Promise((resolve) => {
25
30
  setState({ ...options, resolve });
31
+ setOpen(true);
26
32
  });
27
33
  }, []);
28
34
  function settle(confirmed) {
29
35
  state?.resolve(confirmed);
30
- setState(null);
36
+ setOpen(false);
31
37
  }
32
- return (_jsxs(ConfirmContext, { value: confirm, children: [children, _jsx(AlertDialog, { open: state !== null, onOpenChange: (open) => {
38
+ return (_jsxs(ConfirmContext, { value: confirm, children: [children, _jsx(AlertDialog, { open: open, onOpenChange: (open) => {
33
39
  if (!open) {
34
40
  settle(false);
35
41
  }
36
- }, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: state?.title }), state?.description !== undefined && (_jsx(AlertDialogDescription, { children: state.description }))] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: state?.cancelLabel ?? "Cancel" }), _jsx(AlertDialogAction, { onClick: () => {
42
+ }, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: state?.title }), state?.description !== undefined && (_jsx(AlertDialogDescription, { children: state.description }))] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: state?.cancelLabel ?? messages.confirmDialog.cancel }), _jsx(AlertDialogAction, { onClick: () => {
37
43
  settle(true);
38
44
  }, className: cn(state?.variant === "destructive" &&
39
- buttonVariants({ variant: "destructive" })), children: state?.confirmLabel ?? "Continue" })] })] }) })] }));
45
+ buttonVariants({ variant: "destructive" })), children: state?.confirmLabel ?? messages.confirmDialog.confirm })] })] }) })] }));
40
46
  }
@@ -1,4 +1,4 @@
1
- export type { ConfirmOptions } from "./confirm-context";
2
- export { ConfirmDialogProvider } from "./confirm-dialog";
3
- export { useConfirm } from "./use-confirm";
1
+ export type { ConfirmOptions } from "./confirm-context.js";
2
+ export { ConfirmDialogProvider } from "./confirm-dialog.js";
3
+ export { useConfirm } from "./use-confirm.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { ConfirmDialogProvider } from "./confirm-dialog";
2
- export { useConfirm } from "./use-confirm";
1
+ export { ConfirmDialogProvider } from "./confirm-dialog.js";
2
+ export { useConfirm } from "./use-confirm.js";
@@ -1,4 +1,4 @@
1
- import type { ConfirmFn } from "./confirm-context";
1
+ import type { ConfirmFn } from "./confirm-context.js";
2
2
  /** Must be called from a descendant of `ConfirmDialogProvider`. */
3
3
  export declare function useConfirm(): ConfirmFn;
4
4
  //# sourceMappingURL=use-confirm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-confirm.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/use-confirm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,mEAAmE;AACnE,wBAAgB,UAAU,IAAI,SAAS,CAMtC"}
1
+ {"version":3,"file":"use-confirm.d.ts","sourceRoot":"","sources":["../../../src/components/confirm-dialog/use-confirm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,mEAAmE;AACnE,wBAAgB,UAAU,IAAI,SAAS,CAMtC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ConfirmContext } from "./confirm-context";
2
+ import { ConfirmContext } from "./confirm-context.js";
3
3
  /** Must be called from a descendant of `ConfirmDialogProvider`. */
4
4
  export function useConfirm() {
5
5
  const confirm = React.use(ConfirmContext);