@beautinique/frontend-components 1.0.8 → 1.0.9

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 (380) hide show
  1. package/README.md +225 -16
  2. package/dist/auth/SocialAuth.d.cts +33 -0
  3. package/dist/auth/SocialAuth.d.cts.map +1 -0
  4. package/dist/auth/SocialAuth.d.ts +33 -0
  5. package/dist/auth/SocialAuth.d.ts.map +1 -0
  6. package/dist/auth/index.cjs +34 -26
  7. package/dist/auth/index.cjs.map +1 -1
  8. package/dist/auth/index.d.cts +1 -0
  9. package/dist/auth/index.d.cts.map +1 -1
  10. package/dist/auth/index.d.ts +1 -0
  11. package/dist/auth/index.d.ts.map +1 -1
  12. package/dist/auth/index.js +32 -25
  13. package/dist/auth/index.js.map +1 -1
  14. package/dist/breadcrumb/Breadcrumb.d.cts +34 -0
  15. package/dist/breadcrumb/Breadcrumb.d.cts.map +1 -0
  16. package/dist/breadcrumb/Breadcrumb.d.ts +34 -0
  17. package/dist/breadcrumb/Breadcrumb.d.ts.map +1 -0
  18. package/dist/breadcrumb/breadcrumb-icons.d.cts +6 -0
  19. package/dist/breadcrumb/breadcrumb-icons.d.cts.map +1 -0
  20. package/dist/breadcrumb/breadcrumb-icons.d.ts +6 -0
  21. package/dist/breadcrumb/breadcrumb-icons.d.ts.map +1 -0
  22. package/dist/breadcrumb/getBreadcrumbItems.d.cts +16 -0
  23. package/dist/breadcrumb/getBreadcrumbItems.d.cts.map +1 -0
  24. package/dist/breadcrumb/getBreadcrumbItems.d.ts +16 -0
  25. package/dist/breadcrumb/getBreadcrumbItems.d.ts.map +1 -0
  26. package/dist/breadcrumb/index.cjs +110 -0
  27. package/dist/breadcrumb/index.cjs.map +1 -0
  28. package/dist/breadcrumb/index.d.cts +3 -0
  29. package/dist/breadcrumb/index.d.cts.map +1 -0
  30. package/dist/breadcrumb/index.d.ts +3 -0
  31. package/dist/breadcrumb/index.d.ts.map +1 -0
  32. package/dist/breadcrumb/index.js +107 -0
  33. package/dist/breadcrumb/index.js.map +1 -0
  34. package/dist/color-input/ColorInput.d.cts +33 -0
  35. package/dist/color-input/ColorInput.d.cts.map +1 -0
  36. package/dist/color-input/ColorInput.d.ts +33 -0
  37. package/dist/color-input/ColorInput.d.ts.map +1 -0
  38. package/dist/color-input/color-input-icons.d.cts +6 -0
  39. package/dist/color-input/color-input-icons.d.cts.map +1 -0
  40. package/dist/color-input/color-input-icons.d.ts +6 -0
  41. package/dist/color-input/color-input-icons.d.ts.map +1 -0
  42. package/dist/color-input/color.d.cts +10 -0
  43. package/dist/color-input/color.d.cts.map +1 -0
  44. package/dist/color-input/color.d.ts +10 -0
  45. package/dist/color-input/color.d.ts.map +1 -0
  46. package/dist/color-input/index.cjs +375 -0
  47. package/dist/color-input/index.cjs.map +1 -0
  48. package/dist/color-input/index.d.cts +2 -0
  49. package/dist/color-input/index.d.cts.map +1 -0
  50. package/dist/color-input/index.d.ts +2 -0
  51. package/dist/color-input/index.d.ts.map +1 -0
  52. package/dist/color-input/index.js +373 -0
  53. package/dist/color-input/index.js.map +1 -0
  54. package/dist/file-input/FileInput.d.cts +53 -0
  55. package/dist/file-input/FileInput.d.cts.map +1 -0
  56. package/dist/file-input/FileInput.d.ts +53 -0
  57. package/dist/file-input/FileInput.d.ts.map +1 -0
  58. package/dist/file-input/file-input-icons.d.cts +6 -0
  59. package/dist/file-input/file-input-icons.d.cts.map +1 -0
  60. package/dist/file-input/file-input-icons.d.ts +6 -0
  61. package/dist/file-input/file-input-icons.d.ts.map +1 -0
  62. package/dist/file-input/index.cjs +259 -0
  63. package/dist/file-input/index.cjs.map +1 -0
  64. package/dist/file-input/index.d.cts +3 -0
  65. package/dist/file-input/index.d.cts.map +1 -0
  66. package/dist/file-input/index.d.ts +3 -0
  67. package/dist/file-input/index.d.ts.map +1 -0
  68. package/dist/file-input/index.js +256 -0
  69. package/dist/file-input/index.js.map +1 -0
  70. package/dist/file-input/media-type.d.cts +8 -0
  71. package/dist/file-input/media-type.d.cts.map +1 -0
  72. package/dist/file-input/media-type.d.ts +8 -0
  73. package/dist/file-input/media-type.d.ts.map +1 -0
  74. package/dist/file-input/useObjectUrls.d.cts +10 -0
  75. package/dist/file-input/useObjectUrls.d.cts.map +1 -0
  76. package/dist/file-input/useObjectUrls.d.ts +10 -0
  77. package/dist/file-input/useObjectUrls.d.ts.map +1 -0
  78. package/dist/hierarchy-select/HierarchySelect.d.cts +58 -0
  79. package/dist/hierarchy-select/HierarchySelect.d.cts.map +1 -0
  80. package/dist/hierarchy-select/HierarchySelect.d.ts +58 -0
  81. package/dist/hierarchy-select/HierarchySelect.d.ts.map +1 -0
  82. package/dist/hierarchy-select/hierarchy-select-icons.d.cts +6 -0
  83. package/dist/hierarchy-select/hierarchy-select-icons.d.cts.map +1 -0
  84. package/dist/hierarchy-select/hierarchy-select-icons.d.ts +6 -0
  85. package/dist/hierarchy-select/hierarchy-select-icons.d.ts.map +1 -0
  86. package/dist/hierarchy-select/index.cjs +596 -0
  87. package/dist/hierarchy-select/index.cjs.map +1 -0
  88. package/dist/hierarchy-select/index.d.cts +2 -0
  89. package/dist/hierarchy-select/index.d.cts.map +1 -0
  90. package/dist/hierarchy-select/index.d.ts +2 -0
  91. package/dist/hierarchy-select/index.d.ts.map +1 -0
  92. package/dist/hierarchy-select/index.js +594 -0
  93. package/dist/hierarchy-select/index.js.map +1 -0
  94. package/dist/hierarchy-select/tree.d.cts +38 -0
  95. package/dist/hierarchy-select/tree.d.cts.map +1 -0
  96. package/dist/hierarchy-select/tree.d.ts +38 -0
  97. package/dist/hierarchy-select/tree.d.ts.map +1 -0
  98. package/dist/index.cjs +7 -0
  99. package/dist/index.d.cts +1 -0
  100. package/dist/index.d.cts.map +1 -1
  101. package/dist/index.d.ts +1 -0
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +1 -0
  104. package/dist/inputs/Checkbox.d.cts +21 -0
  105. package/dist/inputs/Checkbox.d.cts.map +1 -0
  106. package/dist/inputs/Checkbox.d.ts +21 -0
  107. package/dist/inputs/Checkbox.d.ts.map +1 -0
  108. package/dist/inputs/Input.d.cts +26 -0
  109. package/dist/inputs/Input.d.cts.map +1 -0
  110. package/dist/inputs/Input.d.ts +26 -0
  111. package/dist/inputs/Input.d.ts.map +1 -0
  112. package/dist/inputs/InputError.d.cts +11 -0
  113. package/dist/inputs/InputError.d.cts.map +1 -0
  114. package/dist/inputs/InputError.d.ts +11 -0
  115. package/dist/inputs/InputError.d.ts.map +1 -0
  116. package/dist/inputs/InputIcon.d.cts +9 -0
  117. package/dist/inputs/InputIcon.d.cts.map +1 -0
  118. package/dist/inputs/InputIcon.d.ts +9 -0
  119. package/dist/inputs/InputIcon.d.ts.map +1 -0
  120. package/dist/inputs/InputLabel.d.cts +8 -0
  121. package/dist/inputs/InputLabel.d.cts.map +1 -0
  122. package/dist/inputs/InputLabel.d.ts +8 -0
  123. package/dist/inputs/InputLabel.d.ts.map +1 -0
  124. package/dist/inputs/Radio.d.cts +25 -0
  125. package/dist/inputs/Radio.d.cts.map +1 -0
  126. package/dist/inputs/Radio.d.ts +25 -0
  127. package/dist/inputs/Radio.d.ts.map +1 -0
  128. package/dist/inputs/Select.d.cts +53 -0
  129. package/dist/inputs/Select.d.cts.map +1 -0
  130. package/dist/inputs/Select.d.ts +53 -0
  131. package/dist/inputs/Select.d.ts.map +1 -0
  132. package/dist/inputs/Textarea.d.cts +19 -0
  133. package/dist/inputs/Textarea.d.cts.map +1 -0
  134. package/dist/inputs/Textarea.d.ts +19 -0
  135. package/dist/inputs/Textarea.d.ts.map +1 -0
  136. package/dist/inputs/index.cjs +746 -0
  137. package/dist/inputs/index.cjs.map +1 -0
  138. package/dist/inputs/index.d.cts +10 -0
  139. package/dist/inputs/index.d.cts.map +1 -0
  140. package/dist/inputs/index.d.ts +10 -0
  141. package/dist/inputs/index.d.ts.map +1 -0
  142. package/dist/inputs/index.js +737 -0
  143. package/dist/inputs/index.js.map +1 -0
  144. package/dist/inputs/inputs-icons.d.cts +6 -0
  145. package/dist/inputs/inputs-icons.d.cts.map +1 -0
  146. package/dist/inputs/inputs-icons.d.ts +6 -0
  147. package/dist/inputs/inputs-icons.d.ts.map +1 -0
  148. package/dist/inputs/types.d.cts +48 -0
  149. package/dist/inputs/types.d.cts.map +1 -0
  150. package/dist/inputs/types.d.ts +48 -0
  151. package/dist/inputs/types.d.ts.map +1 -0
  152. package/dist/inputs/useFieldIds.d.cts +24 -0
  153. package/dist/inputs/useFieldIds.d.cts.map +1 -0
  154. package/dist/inputs/useFieldIds.d.ts +24 -0
  155. package/dist/inputs/useFieldIds.d.ts.map +1 -0
  156. package/dist/layout/ApiStatus.d.cts +20 -0
  157. package/dist/layout/ApiStatus.d.cts.map +1 -0
  158. package/dist/layout/ApiStatus.d.ts +20 -0
  159. package/dist/layout/ApiStatus.d.ts.map +1 -0
  160. package/dist/layout/BorderGradient.d.cts +11 -0
  161. package/dist/layout/BorderGradient.d.cts.map +1 -0
  162. package/dist/layout/BorderGradient.d.ts +11 -0
  163. package/dist/layout/BorderGradient.d.ts.map +1 -0
  164. package/dist/layout/ConfirmModal.d.cts +44 -0
  165. package/dist/layout/ConfirmModal.d.cts.map +1 -0
  166. package/dist/layout/ConfirmModal.d.ts +44 -0
  167. package/dist/layout/ConfirmModal.d.ts.map +1 -0
  168. package/dist/layout/Dropdown.d.cts +33 -0
  169. package/dist/layout/Dropdown.d.cts.map +1 -0
  170. package/dist/layout/Dropdown.d.ts +33 -0
  171. package/dist/layout/Dropdown.d.ts.map +1 -0
  172. package/dist/layout/LoadingPage.d.cts +11 -0
  173. package/dist/layout/LoadingPage.d.cts.map +1 -0
  174. package/dist/layout/LoadingPage.d.ts +11 -0
  175. package/dist/layout/LoadingPage.d.ts.map +1 -0
  176. package/dist/layout/LoadingRings.d.cts +12 -0
  177. package/dist/layout/LoadingRings.d.cts.map +1 -0
  178. package/dist/layout/LoadingRings.d.ts +12 -0
  179. package/dist/layout/LoadingRings.d.ts.map +1 -0
  180. package/dist/layout/LoadingText.d.cts +13 -0
  181. package/dist/layout/LoadingText.d.cts.map +1 -0
  182. package/dist/layout/LoadingText.d.ts +13 -0
  183. package/dist/layout/LoadingText.d.ts.map +1 -0
  184. package/dist/layout/ModalWrapper.d.cts +48 -0
  185. package/dist/layout/ModalWrapper.d.cts.map +1 -0
  186. package/dist/layout/ModalWrapper.d.ts +48 -0
  187. package/dist/layout/ModalWrapper.d.ts.map +1 -0
  188. package/dist/layout/NetworkStatusToaster.d.cts +39 -0
  189. package/dist/layout/NetworkStatusToaster.d.cts.map +1 -0
  190. package/dist/layout/NetworkStatusToaster.d.ts +39 -0
  191. package/dist/layout/NetworkStatusToaster.d.ts.map +1 -0
  192. package/dist/layout/ScrollableGradientContainer.d.cts +28 -0
  193. package/dist/layout/ScrollableGradientContainer.d.cts.map +1 -0
  194. package/dist/layout/ScrollableGradientContainer.d.ts +28 -0
  195. package/dist/layout/ScrollableGradientContainer.d.ts.map +1 -0
  196. package/dist/layout/Skeleton.d.cts +9 -0
  197. package/dist/layout/Skeleton.d.cts.map +1 -0
  198. package/dist/layout/Skeleton.d.ts +9 -0
  199. package/dist/layout/Skeleton.d.ts.map +1 -0
  200. package/dist/layout/Table.d.cts +9 -0
  201. package/dist/layout/Table.d.cts.map +1 -0
  202. package/dist/layout/Table.d.ts +9 -0
  203. package/dist/layout/Table.d.ts.map +1 -0
  204. package/dist/layout/index.cjs +743 -3
  205. package/dist/layout/index.cjs.map +1 -1
  206. package/dist/layout/index.d.cts +12 -0
  207. package/dist/layout/index.d.cts.map +1 -1
  208. package/dist/layout/index.d.ts +12 -0
  209. package/dist/layout/index.d.ts.map +1 -1
  210. package/dist/layout/index.js +724 -2
  211. package/dist/layout/index.js.map +1 -1
  212. package/dist/layout/layout-icons.d.cts +6 -0
  213. package/dist/layout/layout-icons.d.cts.map +1 -0
  214. package/dist/layout/layout-icons.d.ts +6 -0
  215. package/dist/layout/layout-icons.d.ts.map +1 -0
  216. package/dist/lib/dropdown-position.d.cts +33 -0
  217. package/dist/lib/dropdown-position.d.cts.map +1 -0
  218. package/dist/lib/dropdown-position.d.ts +33 -0
  219. package/dist/lib/dropdown-position.d.ts.map +1 -0
  220. package/dist/lib/focus.d.cts +3 -0
  221. package/dist/lib/focus.d.cts.map +1 -0
  222. package/dist/lib/focus.d.ts +3 -0
  223. package/dist/lib/focus.d.ts.map +1 -0
  224. package/dist/lib/icon-registry.d.cts +14 -0
  225. package/dist/lib/icon-registry.d.cts.map +1 -0
  226. package/dist/lib/icon-registry.d.ts +14 -0
  227. package/dist/lib/icon-registry.d.ts.map +1 -0
  228. package/dist/lib/mergeRefs.d.cts +10 -0
  229. package/dist/lib/mergeRefs.d.cts.map +1 -0
  230. package/dist/lib/mergeRefs.d.ts +10 -0
  231. package/dist/lib/mergeRefs.d.ts.map +1 -0
  232. package/dist/lib/scrollRowIntoView.d.cts +7 -0
  233. package/dist/lib/scrollRowIntoView.d.cts.map +1 -0
  234. package/dist/lib/scrollRowIntoView.d.ts +7 -0
  235. package/dist/lib/scrollRowIntoView.d.ts.map +1 -0
  236. package/dist/lib/typeahead.d.cts +21 -0
  237. package/dist/lib/typeahead.d.cts.map +1 -0
  238. package/dist/lib/typeahead.d.ts +21 -0
  239. package/dist/lib/typeahead.d.ts.map +1 -0
  240. package/dist/lib/useAnchoredBox.d.cts +26 -0
  241. package/dist/lib/useAnchoredBox.d.cts.map +1 -0
  242. package/dist/lib/useAnchoredBox.d.ts +26 -0
  243. package/dist/lib/useAnchoredBox.d.ts.map +1 -0
  244. package/dist/lib/useDismiss.d.cts +34 -0
  245. package/dist/lib/useDismiss.d.cts.map +1 -0
  246. package/dist/lib/useDismiss.d.ts +34 -0
  247. package/dist/lib/useDismiss.d.ts.map +1 -0
  248. package/dist/lib/useFocusTrap.d.cts +24 -0
  249. package/dist/lib/useFocusTrap.d.cts.map +1 -0
  250. package/dist/lib/useFocusTrap.d.ts +24 -0
  251. package/dist/lib/useFocusTrap.d.ts.map +1 -0
  252. package/dist/lib/useIsClient.d.cts +7 -0
  253. package/dist/lib/useIsClient.d.cts.map +1 -0
  254. package/dist/lib/useIsClient.d.ts +7 -0
  255. package/dist/lib/useIsClient.d.ts.map +1 -0
  256. package/dist/lib/usePrefersReducedMotion.d.cts +7 -0
  257. package/dist/lib/usePrefersReducedMotion.d.cts.map +1 -0
  258. package/dist/lib/usePrefersReducedMotion.d.ts +7 -0
  259. package/dist/lib/usePrefersReducedMotion.d.ts.map +1 -0
  260. package/dist/lib/useScrollLock.d.cts +7 -0
  261. package/dist/lib/useScrollLock.d.cts.map +1 -0
  262. package/dist/lib/useScrollLock.d.ts +7 -0
  263. package/dist/lib/useScrollLock.d.ts.map +1 -0
  264. package/dist/lib/useScrollable.d.cts +17 -0
  265. package/dist/lib/useScrollable.d.cts.map +1 -0
  266. package/dist/lib/useScrollable.d.ts +17 -0
  267. package/dist/lib/useScrollable.d.ts.map +1 -0
  268. package/dist/loading-screen/LoadingScreen.d.cts +21 -0
  269. package/dist/loading-screen/LoadingScreen.d.cts.map +1 -0
  270. package/dist/loading-screen/LoadingScreen.d.ts +21 -0
  271. package/dist/loading-screen/LoadingScreen.d.ts.map +1 -0
  272. package/dist/loading-screen/Teddy.d.cts +10 -0
  273. package/dist/loading-screen/Teddy.d.cts.map +1 -0
  274. package/dist/loading-screen/Teddy.d.ts +10 -0
  275. package/dist/loading-screen/Teddy.d.ts.map +1 -0
  276. package/dist/loading-screen/WakeUpProgress.d.cts +16 -0
  277. package/dist/loading-screen/WakeUpProgress.d.cts.map +1 -0
  278. package/dist/loading-screen/WakeUpProgress.d.ts +16 -0
  279. package/dist/loading-screen/WakeUpProgress.d.ts.map +1 -0
  280. package/dist/loading-screen/beauty-facts.d.cts +4 -0
  281. package/dist/loading-screen/beauty-facts.d.cts.map +1 -0
  282. package/dist/loading-screen/beauty-facts.d.ts +4 -0
  283. package/dist/loading-screen/beauty-facts.d.ts.map +1 -0
  284. package/dist/loading-screen/index.cjs +405 -0
  285. package/dist/loading-screen/index.cjs.map +1 -0
  286. package/dist/loading-screen/index.d.cts +5 -0
  287. package/dist/loading-screen/index.d.cts.map +1 -0
  288. package/dist/loading-screen/index.d.ts +5 -0
  289. package/dist/loading-screen/index.d.ts.map +1 -0
  290. package/dist/loading-screen/index.js +400 -0
  291. package/dist/loading-screen/index.js.map +1 -0
  292. package/dist/loading-screen/loading-screen-icons.d.cts +6 -0
  293. package/dist/loading-screen/loading-screen-icons.d.cts.map +1 -0
  294. package/dist/loading-screen/loading-screen-icons.d.ts +6 -0
  295. package/dist/loading-screen/loading-screen-icons.d.ts.map +1 -0
  296. package/dist/media/MediaCarousel.d.cts +30 -0
  297. package/dist/media/MediaCarousel.d.cts.map +1 -0
  298. package/dist/media/MediaCarousel.d.ts +30 -0
  299. package/dist/media/MediaCarousel.d.ts.map +1 -0
  300. package/dist/media/MediaCarouselWithModal.d.cts +17 -0
  301. package/dist/media/MediaCarouselWithModal.d.cts.map +1 -0
  302. package/dist/media/MediaCarouselWithModal.d.ts +17 -0
  303. package/dist/media/MediaCarouselWithModal.d.ts.map +1 -0
  304. package/dist/media/MediaCarouselWithParentMedia.d.cts +30 -0
  305. package/dist/media/MediaCarouselWithParentMedia.d.cts.map +1 -0
  306. package/dist/media/MediaCarouselWithParentMedia.d.ts +30 -0
  307. package/dist/media/MediaCarouselWithParentMedia.d.ts.map +1 -0
  308. package/dist/media/MediaModal.d.cts +27 -0
  309. package/dist/media/MediaModal.d.cts.map +1 -0
  310. package/dist/media/MediaModal.d.ts +27 -0
  311. package/dist/media/MediaModal.d.ts.map +1 -0
  312. package/dist/media/VideoPlayer.d.cts +37 -0
  313. package/dist/media/VideoPlayer.d.cts.map +1 -0
  314. package/dist/media/VideoPlayer.d.ts +37 -0
  315. package/dist/media/VideoPlayer.d.ts.map +1 -0
  316. package/dist/media/captureVideoPoster.d.cts +20 -0
  317. package/dist/media/captureVideoPoster.d.cts.map +1 -0
  318. package/dist/media/captureVideoPoster.d.ts +20 -0
  319. package/dist/media/captureVideoPoster.d.ts.map +1 -0
  320. package/dist/media/index.cjs +613 -0
  321. package/dist/media/index.cjs.map +1 -0
  322. package/dist/media/index.d.cts +8 -0
  323. package/dist/media/index.d.cts.map +1 -0
  324. package/dist/media/index.d.ts +8 -0
  325. package/dist/media/index.d.ts.map +1 -0
  326. package/dist/media/index.js +605 -0
  327. package/dist/media/index.js.map +1 -0
  328. package/dist/media/labels.d.cts +33 -0
  329. package/dist/media/labels.d.cts.map +1 -0
  330. package/dist/media/labels.d.ts +33 -0
  331. package/dist/media/labels.d.ts.map +1 -0
  332. package/dist/media/media-icons.d.cts +6 -0
  333. package/dist/media/media-icons.d.cts.map +1 -0
  334. package/dist/media/media-icons.d.ts +6 -0
  335. package/dist/media/media-icons.d.ts.map +1 -0
  336. package/dist/media/streaming.d.cts +18 -0
  337. package/dist/media/streaming.d.cts.map +1 -0
  338. package/dist/media/streaming.d.ts +18 -0
  339. package/dist/media/streaming.d.ts.map +1 -0
  340. package/dist/resend/index.cjs +5 -28
  341. package/dist/resend/index.cjs.map +1 -1
  342. package/dist/resend/index.js +1 -24
  343. package/dist/resend/index.js.map +1 -1
  344. package/dist/static-page/StaticPage.d.cts +91 -0
  345. package/dist/static-page/StaticPage.d.cts.map +1 -0
  346. package/dist/static-page/StaticPage.d.ts +91 -0
  347. package/dist/static-page/StaticPage.d.ts.map +1 -0
  348. package/dist/static-page/index.cjs +247 -0
  349. package/dist/static-page/index.cjs.map +1 -0
  350. package/dist/static-page/index.d.cts +2 -0
  351. package/dist/static-page/index.d.cts.map +1 -0
  352. package/dist/static-page/index.d.ts +2 -0
  353. package/dist/static-page/index.d.ts.map +1 -0
  354. package/dist/static-page/index.js +235 -0
  355. package/dist/static-page/index.js.map +1 -0
  356. package/dist/static-page/static-page-icons.d.cts +6 -0
  357. package/dist/static-page/static-page-icons.d.cts.map +1 -0
  358. package/dist/static-page/static-page-icons.d.ts +6 -0
  359. package/dist/static-page/static-page-icons.d.ts.map +1 -0
  360. package/dist/testimonials/TestimonialCarousel.d.cts +40 -0
  361. package/dist/testimonials/TestimonialCarousel.d.cts.map +1 -0
  362. package/dist/testimonials/TestimonialCarousel.d.ts +40 -0
  363. package/dist/testimonials/TestimonialCarousel.d.ts.map +1 -0
  364. package/dist/testimonials/index.cjs +246 -0
  365. package/dist/testimonials/index.cjs.map +1 -0
  366. package/dist/testimonials/index.d.cts +2 -0
  367. package/dist/testimonials/index.d.cts.map +1 -0
  368. package/dist/testimonials/index.d.ts +2 -0
  369. package/dist/testimonials/index.d.ts.map +1 -0
  370. package/dist/testimonials/index.js +244 -0
  371. package/dist/testimonials/index.js.map +1 -0
  372. package/dist/testimonials/testimonials-icons.d.cts +6 -0
  373. package/dist/testimonials/testimonials-icons.d.cts.map +1 -0
  374. package/dist/testimonials/testimonials-icons.d.ts +6 -0
  375. package/dist/testimonials/testimonials-icons.d.ts.map +1 -0
  376. package/dist/toast/index.cjs +2 -38
  377. package/dist/toast/index.cjs.map +1 -1
  378. package/dist/toast/index.js +1 -37
  379. package/dist/toast/index.js.map +1 -1
  380. package/package.json +67 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/dropdown-position.ts","../../src/lib/scrollRowIntoView.ts","../../src/lib/typeahead.ts","../../src/lib/useAnchoredBox.ts","../../src/lib/useDismiss.ts","../../src/lib/icon-registry.ts","../../src/hierarchy-select/hierarchy-select-icons.ts","../../src/hierarchy-select/tree.ts","../../src/hierarchy-select/HierarchySelect.tsx"],"names":["useLayoutEffect","useState","useRef","useEffect"],"mappings":";;;;;;;;;;;AAUO,IAAM,YAAA,GAAe,CAAA;AASrB,IAAM,uCAAuB,MAAA,CAAA,CAAC;AAAA,EACnC,IAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,KAK0B;AACxB,EAAA,MAAM,KAAA,GAAQ,cAAA,GAAiB,IAAA,CAAK,MAAA,GAAS,YAAA;AAC7C,EAAA,MAAM,KAAA,GAAQ,KAAK,GAAA,GAAM,YAA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DAAA;AAAA,gCAEV,QAAA,kBAAA,GAAA;AAAA,kCAAC,IAAA;AAAA,kCAAA;AAAA,oCACC,IAAA,EAAK,qBAAA;AAAA,oCACL,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AACF;AAAA,yBAAA;AAAA,wBA/DG,MAAA,CAAO,GAAA,CAAI,IAAA,CAAK,KAAK;AAAA,uBAiE5B;AAAA,oBAEJ,CAAC;AAAA;AAAA,iBACH,mBAEA,GAAA;AAAA,kBAAC,SAAA;AAAA,kBAAA;AAAA,oBACC,MAAA,EAAO,OAAA;AAAA,oBACP,OAAO,IAAA,CAAK,cAAA;AAAA,oBACZ,aAAa,IAAA,CAAK,oBAAA;AAAA,oBAClB,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA;AAAA,WAEJ;AAAA,UACA,QAAA,CAAS;AAAA;AACX;AAAA;AAAA,GACJ;AAEJ,CAAA,EAna+B,iBAAA","file":"index.js","sourcesContent":["export type TDropdownPlacement = 'top' | 'bottom';\n\nexport interface IDropdownRect {\n top: number;\n bottom: number;\n left: number;\n width: number;\n}\n\n/** The gap between the field and the list. */\nexport const DROPDOWN_GAP = 8;\n\n/**\n * Where a list that opens from a field goes: where the app asked (`desired`), unless that side of the\n * field has not room for the list and the other one has more. A list that fits on neither stays\n * where it was asked to open.\n *\n * @param needed how tall the list is, or the most it can be (its `max-height`).\n */\nexport const getDropdownPlacement = ({\n rect,\n viewportHeight,\n desired,\n needed,\n}: {\n rect: Pick<IDropdownRect, 'top' | 'bottom'>;\n viewportHeight: number;\n desired: TDropdownPlacement;\n needed: number;\n}): TDropdownPlacement => {\n const below = viewportHeight - rect.bottom - DROPDOWN_GAP;\n const above = rect.top - DROPDOWN_GAP;\n const room = desired === 'bottom' ? below : above;\n const other = desired === 'bottom' ? above : below;\n\n if (room >= needed || other <= room) return desired;\n\n return desired === 'bottom' ? 'top' : 'bottom';\n};\n\n/** The `style` of a list that is `position: fixed` under or over the field, as wide as it is. */\nexport const getDropdownStyle = (\n rect: IDropdownRect,\n placement: TDropdownPlacement,\n viewportHeight: number,\n) => ({\n left: rect.left,\n width: rect.width,\n ...(placement === 'top'\n ? { bottom: viewportHeight - rect.top + DROPDOWN_GAP }\n : { top: rect.bottom + DROPDOWN_GAP }),\n});\n","/**\n * Scrolls `list` just enough to show `row` (an element inside it), and nothing else: the page is not\n * moved, as `scrollIntoView()` would do, and it works where that function does not exist. `list`\n * must be the `offsetParent` of the row (give it `position: relative`).\n */\nexport const scrollRowIntoView = (list: HTMLElement, row: HTMLElement) => {\n const top = row.offsetTop;\n const bottom = top + row.offsetHeight;\n\n if (top < list.scrollTop) list.scrollTop = top;\n else if (bottom > list.scrollTop + list.clientHeight) list.scrollTop = bottom - list.clientHeight;\n};\n","/**\n * The option a person reaches by typing, for a list of options (a select, a menu): the next one whose\n * label starts with what was typed, looking from `fromIndex` on and starting over at the top.\n *\n * - Typing a letter that was just typed again (`\"aaa\"`) goes through the options that start with it,\n * one at a time, as pressing the same key does in a native select.\n * - Several different letters (`\"ban\"`) look for an option that starts with all of them, beginning\n * at the current one, so the choice does not leave it while it still matches.\n * - Options that cannot be chosen (`disabled`) are skipped.\n *\n * @returns the index of the option, or -1 when none matches.\n */\nexport const findTypeaheadMatch = (\n options: readonly { label: string; disabled?: boolean }[],\n typed: string,\n fromIndex: number,\n) => {\n const text = typed.toLowerCase();\n\n if (!text || options.length === 0) return -1;\n\n const isRepeat = text.length > 1 && new Set(text).size === 1;\n const query = isRepeat ? text.slice(0, 1) : text;\n // one more letter of the same key: start after the current option, so it is not found again\n const start = isRepeat ? fromIndex + 1 : fromIndex;\n\n for (let step = 0; step < options.length; step += 1) {\n const index = (((start + step) % options.length) + options.length) % options.length;\n const option = options.at(index);\n\n if (option && !option.disabled && option.label.toLowerCase().startsWith(query)) return index;\n }\n\n return -1;\n};\n\n/** The next option that can be chosen from `from` going `step` (1 or -1), or -1 at the end of the list. */\nexport const findEnabledIndex = (\n options: readonly { disabled?: boolean }[],\n from: number,\n step: 1 | -1,\n) => {\n for (let index = from + step; index >= 0 && index < options.length; index += step) {\n if (!options[index]?.disabled) return index;\n }\n\n return -1;\n};\n","import { type RefObject, useLayoutEffect, useState } from 'react';\n\nimport {\n getDropdownPlacement,\n type IDropdownRect,\n type TDropdownPlacement,\n} from './dropdown-position.js';\n\nexport interface IAnchoredBox {\n /** Where the anchor is on the screen. */\n rect: IDropdownRect;\n /** The side of the anchor the box goes on. */\n placement: TDropdownPlacement;\n}\n\nexport interface IAnchoredBoxOptions {\n /** The box is open: it is only measured (and followed) while it is. */\n isOpen: boolean;\n /** The element the box opens from. */\n anchorRef: RefObject<HTMLElement | null>;\n /** The side the app asked for. */\n position: TDropdownPlacement;\n /** How tall the box is, or the most it can be. */\n needed: number;\n}\n\n/**\n * Where a box that opens from an element (a list, a picker) goes: under or over it, on the side with\n * room. It is measured before the browser paints, so the box never shows in the wrong place for a\n * moment, and again whenever the page scrolls or the window is resized. It is `null` until the first\n * measure; use it with `getDropdownStyle()`.\n */\nexport const useAnchoredBox = ({\n isOpen,\n anchorRef,\n position,\n needed,\n}: IAnchoredBoxOptions): IAnchoredBox | null => {\n const [box, setBox] = useState<IAnchoredBox | null>(null);\n\n useLayoutEffect(() => {\n if (!isOpen) return;\n\n const update = () => {\n const anchor = anchorRef.current;\n\n if (!anchor) return;\n\n const rect = anchor.getBoundingClientRect();\n\n setBox({\n rect,\n placement: getDropdownPlacement({\n rect,\n viewportHeight: window.innerHeight,\n desired: position,\n needed,\n }),\n });\n };\n\n update();\n window.addEventListener('scroll', update, true);\n window.addEventListener('resize', update);\n\n return () => {\n window.removeEventListener('scroll', update, true);\n window.removeEventListener('resize', update);\n };\n }, [isOpen, anchorRef, position, needed]);\n\n return box;\n};\n","import { type RefObject, useEffect, useLayoutEffect, useRef } from 'react';\n\nexport type TDismissReason = 'outside' | 'escape';\n\nexport interface IDismissOptions {\n /** Turn the listeners off (e.g. while a popup is closed). @default true */\n enabled?: boolean;\n /**\n * Elements that count as inside although they are not inside the element in the DOM: a popup that\n * is rendered with `createPortal()` into `document.body`. A press on one of them (or on anything in\n * it) is not \"outside\". Refs that are not attached are skipped. The list is read when the press\n * happens, so a new array on every render is fine.\n */\n ignore?: readonly RefObject<Element | null>[];\n /** Dismiss when the user presses outside the element. @default true */\n outside?: boolean;\n /** Dismiss when the user presses Escape. @default true */\n escape?: boolean;\n}\n\n// The popups that are open, the last one on top. Escape closes the one on top only: a select that is\n// open inside a dialog closes first, and the dialog stays until the next Escape.\nconst openStack: symbol[] = [];\n\n/**\n * Closes a popup (a select, a dialog, a menu) the way people expect: a press (mouse, touch or pen)\n * anywhere outside it, or Escape.\n *\n * - The press is listened for on `document` in the capture phase, so an inner `stopPropagation()`\n * cannot hide it, and \"inside\" is decided from the path the event took (`composedPath()`), which\n * stays right when the pressed node is removed by another listener first.\n * - A popup portalled out of the element is not inside it in the DOM: list its ref in `ignore`.\n * - Escape only reaches the popup that opened last, and not an Escape that something else already\n * handled (`defaultPrevented`).\n * - The listeners are added once and only when `enabled` changes: the latest `onDismiss` and `ignore`\n * are used, so passing new ones on every render costs nothing.\n *\n * @returns the ref to put on the popup (or on its trigger, when the popup is portalled).\n */\nexport const useDismiss = <T extends HTMLElement>(\n onDismiss: (reason: TDismissReason, event: Event) => void,\n { enabled = true, ignore, outside = true, escape = true }: IDismissOptions = {},\n): RefObject<T | null> => {\n const ref = useRef<T | null>(null);\n const onDismissRef = useRef(onDismiss);\n const ignoreRef = useRef(ignore);\n\n // Updated as soon as a render commits, so the listeners below never need them as dependencies.\n useLayoutEffect(() => {\n onDismissRef.current = onDismiss;\n ignoreRef.current = ignore;\n });\n\n useEffect(() => {\n if (!enabled) return;\n\n const token = Symbol('dismissable');\n\n // a popup that does not listen for Escape is not in the stack: it must not hide the ones below it\n if (escape) openStack.push(token);\n\n const handlePress = (event: PointerEvent) => {\n const element = ref.current;\n\n if (!outside || !element) return;\n\n const path = event.composedPath();\n const isInside =\n path.includes(element) ||\n (ignoreRef.current ?? []).some(({ current }) => current !== null && path.includes(current));\n\n if (!isInside) onDismissRef.current('outside', event);\n };\n\n const handleKey = (event: KeyboardEvent) => {\n if (!escape || event.key !== 'Escape' || event.defaultPrevented) return;\n if (openStack.at(-1) !== token) return;\n\n onDismissRef.current('escape', event);\n };\n\n document.addEventListener('pointerdown', handlePress, true);\n document.addEventListener('keydown', handleKey);\n\n return () => {\n document.removeEventListener('pointerdown', handlePress, true);\n document.removeEventListener('keydown', handleKey);\n\n const index = openStack.indexOf(token);\n\n if (index !== -1) openStack.splice(index, 1);\n };\n }, [enabled, outside, escape]);\n\n return ref;\n};\n","import { addCollection, type IconifyJSON } from '@iconify/react';\n\n/**\n * Makes the registration of a bundled icon set: `register` puts the sets in Iconify (once, calling it\n * again does nothing) and `names` lists every icon, e.g. `solar:info-circle-linear`.\n *\n * A component calls `register` when it renders, not when its file is imported: an app that never\n * renders the component never runs it, and nothing depends on the bundler keeping an import that is\n * only there for its effect (the build says \"ignored-bare-import\" for those).\n */\nexport const createIconRegistry = (sets: readonly IconifyJSON[]) => {\n let registered = false;\n\n return {\n register: () => {\n if (registered) return;\n\n for (const set of sets) addCollection(set);\n registered = true;\n },\n names: sets.flatMap(({ prefix, icons, aliases }) =>\n [...Object.keys(icons), ...Object.keys(aliases ?? {})].map((name) => `${prefix}:${name}`),\n ),\n };\n};\n","import type { IconifyJSON } from '@iconify/react';\n\nimport { createIconRegistry } from '../lib/icon-registry.js';\n\n/*\n * The icons of the tree of the hierarchy select and its search, bundled so they show without a network and without waiting for the\n * Iconify API (see `toast/toast-icons.ts`). The data is what\n * `https://api.iconify.design/<prefix>.json?icons=<name>` answers.\n */\nconst ICON_SETS: IconifyJSON[] = [\n {\n prefix: 'solar',\n width: 24,\n height: 24,\n icons: {\n 'alt-arrow-down-linear': {\n body: '<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M19 9L12 15L5 9\"/>',\n },\n 'alt-arrow-right-linear': {\n body: '<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M9 5L15 12L9 19\"/>',\n },\n 'folder-open-linear': {\n body: '<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M4 11.5V5.71231C4 5.05041 4 4.71946 4.05548 4.44379C4.29971 3.23023 5.31225 2.28098 6.60671 2.05201C6.90076 2 7.25377 2 7.9598 2C8.26914 2 8.42381 2 8.57246 2.01303C9.21332 2.06921 9.82122 2.30528 10.3168 2.69039C10.4317 2.77971 10.5411 2.88224 10.7598 3.08731L11.2 3.5C11.8526 4.11183 12.1789 4.41775 12.5697 4.62157C12.7844 4.73353 13.012 4.82195 13.2483 4.88508C13.6783 5 14.1398 5 15.0627 5H15.3617C17.4676 5 18.5205 5 19.2049 5.5771C19.2679 5.63018 19.3278 5.68635 19.3844 5.74537C20 6.38701 20 7.37415 20 9.34843V11.5\"/><path d=\"M10 17H14\"/><path d=\"M3.47674 17.4839C2.99958 14.7678 2.761 13.4097 3.33908 12.433C3.4866 12.1838 3.66852 11.9582 3.87908 11.7634C4.7042 11 6.0379 11 8.7053 11H15.2947C17.9621 11 19.2958 11 20.1209 11.7634C20.3315 11.9582 20.5134 12.1838 20.6609 12.433C21.239 13.4097 21.0004 14.7678 20.5233 17.4839C20.1798 19.4391 20.008 20.4167 19.4129 21.0655C19.2585 21.2338 19.0858 21.383 18.8982 21.5101C18.175 22 17.2149 22 15.2947 22H8.70531C6.7851 22 5.825 22 5.10183 21.5101C4.9142 21.383 4.74145 21.2338 4.58706 21.0655C3.99198 20.4167 3.82024 19.4391 3.47674 17.4839Z\"/></g>',\n },\n 'folder-linear': {\n body: '<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M18 10L13 10\"/><path d=\"M2 6.94975C2 6.06722 2 5.62595 2.06935 5.25839C2.37464 3.64031 3.64031 2.37464 5.25839 2.06935C5.62595 2 6.06722 2 6.94975 2C7.33642 2 7.52976 2 7.71557 2.01738C8.51665 2.09229 9.27652 2.40704 9.89594 2.92051C10.0396 3.03961 10.1763 3.17633 10.4497 3.44975L11 4C11.8158 4.81578 12.2237 5.22367 12.7121 5.49543C12.9804 5.64471 13.2651 5.7626 13.5604 5.84678C14.0979 6 14.6747 6 15.8284 6H16.2021C18.8345 6 20.1506 6 21.0062 6.76946C21.0849 6.84024 21.1598 6.91514 21.2305 6.99383C22 7.84935 22 9.16554 22 11.7979V14C22 17.7712 22 19.6569 20.8284 20.8284C19.6569 22 17.7712 22 14 22H10C6.22876 22 4.34315 22 3.17157 20.8284C2 19.6569 2 17.7712 2 14V6.94975Z\"/></g>',\n },\n 'file-linear': {\n body: '<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M13 2.2627V5.0003C13 7.35732 13 8.53583 13.7322 9.26806C14.4645 10.0003 15.643 10.0003 18 10.0003H21.58\"/><path stroke-linejoin=\"round\" d=\"M3.17139 3.17157C4.34296 2 6.23851 2 10.0296 2C11.5546 2 12.3173 2.00011 13.0093 2.26562C13.7012 2.53114 14.2651 3.03857 15.3929 4.05365L19.3516 7.61621C20.6558 8.78998 21.3078 9.3774 21.6538 10.1543C21.9998 10.9312 22 11.8079 22 13.5625V14C22 17.7712 22 19.6566 20.8284 20.8281C19.6569 21.9997 17.7712 22 14 22L9.9969 21.9997C6.22761 21.9997 4.34284 21.9997 3.17157 20.8284C2 19.6569 2 17.7712 2 14V9.9982C2 6.22817 2 4.34296 3.17139 3.17157Z\"/></g>',\n },\n 'unread-linear': {\n body: '<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M7 12.9L10.1429 16.5L18 7.5\"/>',\n },\n 'magnifier-linear': {\n body: '<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"11.5\" cy=\"11.5\" r=\"9.5\"/><path d=\"M18.2173 18.2178L21.9999 22.0004\"/></g>',\n },\n },\n aliases: {\n 'magnifer-linear': { parent: 'magnifier-linear' },\n },\n },\n {\n prefix: 'lucide',\n width: 24,\n height: 24,\n icons: {\n x: {\n body: '<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M18 6L6 18M6 6l12 12\"/>',\n },\n },\n },\n];\n\n/**\n * Registers the icons above with Iconify; the components of this entry call it when they render\n * (calling it again is harmless).\n */\nexport const { register: registerHierarchySelectIcons, names: HIERARCHY_SELECT_ICON_NAMES } =\n createIconRegistry(ICON_SETS);\n","import type { ReactNode } from 'react';\n\nexport type TTreeValue = string | number;\n\n/** What the tree needs of an option; the option of the field has more. */\nexport interface ITreeNode<TNode extends ITreeNode<TNode>> {\n label: ReactNode;\n value: TTreeValue;\n disabled?: boolean;\n searchLabel?: string;\n children?: readonly TNode[];\n}\n\n/** A line of the tree as it is shown: a node with where it is. */\nexport interface ITreeRow<TNode> {\n node: TNode;\n /** 1 for the top of the tree. */\n level: number;\n /** Its place among the nodes that share its parent (from 1) and how many those are. */\n position: number;\n size: number;\n isBranch: boolean;\n isExpanded: boolean;\n parent: TTreeValue | undefined;\n}\n\nconst searchTextOf = (node: { label: ReactNode; value: TTreeValue; searchLabel?: string }) =>\n node.searchLabel ?? (typeof node.label === 'string' ? node.label : String(node.value));\n\n/**\n * The nodes that match `keyword`, and the branches that lead to them. A node that matches keeps all\n * that is under it (the person can browse what they found); a branch that does not match is kept\n * only with the matching nodes under it.\n */\nexport const filterTree = <TNode extends ITreeNode<TNode>>(\n nodes: readonly TNode[],\n keyword: string,\n): readonly TNode[] => {\n const text = keyword.trim().toLowerCase();\n\n if (!text) return nodes;\n\n return nodes.flatMap((node) => {\n if (searchTextOf(node).toLowerCase().includes(text)) return [node];\n\n const children = node.children ? filterTree(node.children, keyword) : [];\n\n return children.length > 0 ? [{ ...node, children }] : [];\n });\n};\n\n/**\n * The lines to draw, from the top: a branch that is expanded (or all of them, with `forceExpanded`) is\n * followed by its own lines.\n */\nexport const buildRows = <TNode extends ITreeNode<TNode>>(\n nodes: readonly TNode[],\n expanded: readonly TTreeValue[],\n forceExpanded: boolean,\n level = 1,\n parent?: TTreeValue,\n): ITreeRow<TNode>[] =>\n nodes.flatMap((node, index) => {\n const isBranch = !!node.children?.length;\n const isExpanded = isBranch && (forceExpanded || expanded.includes(node.value));\n const row: ITreeRow<TNode> = {\n node,\n level,\n position: index + 1,\n size: nodes.length,\n isBranch,\n isExpanded,\n parent,\n };\n\n return isExpanded\n ? [row, ...buildRows(node.children ?? [], expanded, forceExpanded, level + 1, node.value)]\n : [row];\n });\n\n/** The node with this value, wherever it is in the tree. */\nexport const findNode = <TNode extends ITreeNode<TNode>>(\n nodes: readonly TNode[],\n value: TTreeValue,\n): TNode | undefined => {\n for (const node of nodes) {\n if (node.value === value) return node;\n\n const found = node.children ? findNode(node.children, value) : undefined;\n\n if (found) return found;\n }\n\n return undefined;\n};\n\n/** The values of the branches above a node (so they can be opened to show it), or `[]` when it is not in the tree. */\nexport const ancestorsOf = <TNode extends ITreeNode<TNode>>(\n nodes: readonly TNode[],\n value: TTreeValue,\n path: readonly TTreeValue[] = [],\n): readonly TTreeValue[] => {\n for (const node of nodes) {\n if (node.value === value) return path;\n\n const found = node.children ? ancestorsOf(node.children, value, [...path, node.value]) : [];\n\n if (found.length > 0) return found;\n }\n\n return [];\n};\n","import { Icon } from '@iconify/react';\nimport {\n type ChangeEvent,\n type InputHTMLAttributes,\n type KeyboardEvent,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport {\n type IFieldBase,\n Input,\n InputError,\n InputIcon,\n InputLabel,\n type ISelectOption,\n type ISelectProps,\n type TInputIcons,\n} from '../inputs/index.js';\nimport { ApiStatus } from '../layout/index.js';\nimport { getDropdownStyle, type TDropdownPlacement } from '../lib/dropdown-position.js';\nimport { scrollRowIntoView } from '../lib/scrollRowIntoView.js';\nimport { findEnabledIndex } from '../lib/typeahead.js';\nimport { useAnchoredBox } from '../lib/useAnchoredBox.js';\nimport { useDismiss } from '../lib/useDismiss.js';\nimport { registerHierarchySelectIcons } from './hierarchy-select-icons.js';\nimport {\n buildRows,\n filterTree,\n findNode,\n type ITreeRow,\n type TTreeValue,\n ancestorsOf,\n} from './tree.js';\n\nexport interface IHierarchySelectOption extends ISelectOption {\n /**\n * The options under this one. An option that has some is a branch: it opens and closes, and it is\n * not chosen itself; only the options without children are.\n */\n children?: readonly IHierarchySelectOption[];\n}\n\n/** The words the field says to assistive technology and on the screen. English by default. */\nexport interface IHierarchySelectLabels {\n /** The name of the list when the field has no `label`. */\n tree: string;\n /** The name of the field where the person searches. */\n search: string;\n /** What the search field says while it is empty. */\n searchPlaceholder: string;\n /** The button that empties the search. */\n clearSearch: string;\n noResultsTitle: string;\n noResultsDescription: string;\n /** Said when a search changes how many options there are. */\n results: (count: number) => string;\n}\n\nexport interface IHierarchySelect extends IFieldBase {\n selectProps: ISelectProps;\n options: readonly IHierarchySelectOption[];\n /** An icon at each end of the field. One with an `onClick` is a button and needs a `label`. */\n icons?: TInputIcons;\n /** Classes for the box that opens (the search and the options). */\n optionsClassName?: string;\n /** Which side of the field it opens on, unless there is no room there. @default 'bottom' */\n position?: TDropdownPlacement;\n /**\n * Attributes of the search field. With a `value` that is text the search is the app's: it shows\n * that text and says in `onChange` what the person typed (to search on a server, for example).\n */\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n labels?: Partial<IHierarchySelectLabels>;\n}\n\nconst LABELS: IHierarchySelectLabels = {\n tree: 'Options',\n search: 'Search options',\n searchPlaceholder: 'Search here...',\n clearSearch: 'Clear search',\n noResultsTitle: 'No matching options found',\n noResultsDescription: 'Try searching with a different keyword or clear the search.',\n results: (count) => `${String(count)} ${count === 1 ? 'option' : 'options'} found`,\n};\n\n// The tallest the box gets: the search (~60) and the list (`max-h-60`) with their frames.\nconst POPUP_MAX_HEIGHT = 330;\n\ntype TRow = ITreeRow<IHierarchySelectOption>;\n\n/**\n * A field that opens a tree of options (categories with sub-categories) with a search field above\n * it. Only an option without children can be chosen; the ones with children open and close.\n *\n * - The field is a button that opens a box with a search field and the tree. The focus goes to the\n * search field and stays there: the arrow keys move through the tree (assistive technology is told\n * which option is the active one), Right and Left open and close a branch or go to its first\n * option and to its parent, Enter chooses (or opens/closes a branch), Escape closes it and gives\n * the focus back to the field, and Tab closes it too.\n * - A search shows the options that match and the branches that lead to them, all open. An option\n * that matches keeps what is under it.\n * - The box is drawn in `document.body`, so a parent that scrolls or hides what overflows does not\n * cut it; it opens on the other side when there is no room, and follows the field while the page\n * scrolls.\n */\nexport const HierarchySelect = ({\n label = '',\n className = '',\n error = '',\n containerClassName = '',\n optionsClassName = '',\n icons,\n selectProps,\n options,\n position = 'bottom',\n inputProps,\n labels,\n}: IHierarchySelect) => {\n registerHierarchySelectIcons();\n\n const text: IHierarchySelectLabels = {\n tree: labels?.tree ?? LABELS.tree,\n search: labels?.search ?? LABELS.search,\n searchPlaceholder: labels?.searchPlaceholder ?? LABELS.searchPlaceholder,\n clearSearch: labels?.clearSearch ?? LABELS.clearSearch,\n noResultsTitle: labels?.noResultsTitle ?? LABELS.noResultsTitle,\n noResultsDescription: labels?.noResultsDescription ?? LABELS.noResultsDescription,\n results: labels?.results ?? LABELS.results,\n };\n const baseId = useId();\n const triggerId = selectProps.id ?? `${baseId}-field`;\n const popupId = `${baseId}-popup`;\n const treeId = `${baseId}-tree`;\n const errorId = `${baseId}-error`;\n const rowId = (index: number) => `${baseId}-row-${String(index)}`;\n\n const [isOpenState, setIsOpen] = useState(false);\n const [ownSearch, setOwnSearch] = useState('');\n const [expanded, setExpanded] = useState<readonly TTreeValue[]>([]);\n const [activeValue, setActiveValue] = useState<TTreeValue | undefined>(undefined);\n\n const fieldBoxRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const popupRef = useRef<HTMLDivElement | null>(null);\n const listRef = useRef<HTMLUListElement | null>(null);\n const searchRef = useRef<HTMLInputElement | null>(null);\n const activeRowRef = useRef<HTMLLIElement | null>(null);\n\n const isSearchControlled = typeof inputProps?.value === 'string';\n const search = typeof inputProps?.value === 'string' ? inputProps.value : ownSearch;\n const isSearching = search.trim() !== '';\n const canOpen = options.length > 0 && !selectProps.disabled;\n // A field that is disabled (or left without options) while it is open closes, and stays closed\n // when it is enabled again.\n if (isOpenState && !canOpen) setIsOpen(false);\n\n const isOpen = isOpenState && canOpen;\n\n const selected = findNode(options, selectProps.value);\n const hasValue = selected !== undefined && selected.value !== '';\n\n const shown = useMemo(() => filterTree(options, search), [options, search]);\n const rows = useMemo(\n () => buildRows(shown, expanded, isSearching),\n [shown, expanded, isSearching],\n );\n const navigable = rows.map((row) => ({ disabled: row.node.disabled }));\n const foundIndex = rows.findIndex((row) => row.node.value === activeValue);\n // while searching the first option that can be chosen is the active one, so Enter takes it\n const firstChoosable = rows.findIndex((row) => !row.isBranch && !row.node.disabled);\n const activeIndex = foundIndex === -1 && isSearching ? firstChoosable : foundIndex;\n const activeRow = activeIndex === -1 ? undefined : rows.at(activeIndex);\n\n const popup = useAnchoredBox({\n isOpen,\n anchorRef: fieldBoxRef,\n position,\n needed: POPUP_MAX_HEIGHT,\n });\n\n const close = (returnFocus: boolean) => {\n setIsOpen(false);\n\n if (!isSearchControlled) setOwnSearch('');\n\n if (returnFocus) triggerRef.current?.focus();\n };\n\n const containerRef = useDismiss<HTMLDivElement>(\n (reason) => {\n close(reason === 'escape');\n },\n { enabled: isOpen, ignore: [popupRef] },\n );\n\n const open = () => {\n if (!canOpen) return;\n\n // the way to the option that is chosen is open, and the option is the active one\n setExpanded(selected ? ancestorsOf(options, selected.value) : []);\n setActiveValue(selected && !selected.disabled ? selected.value : undefined);\n setIsOpen(true);\n };\n\n const toggle = (value: TTreeValue) => {\n setExpanded((current) =>\n current.includes(value) ? current.filter((item) => item !== value) : [...current, value],\n );\n };\n\n // A press, or Enter: a branch opens or closes, an option is chosen.\n const activate = (row: TRow) => {\n if (row.node.disabled) return;\n\n setActiveValue(row.node.value);\n\n if (row.isBranch) {\n // while searching every branch is open, and stays so\n if (!isSearching) toggle(row.node.value);\n\n return;\n }\n\n selectProps.onChange(row.node.value);\n close(true);\n };\n\n // The active option stays in view while the arrow keys move it.\n useEffect(() => {\n const list = listRef.current;\n const row = activeRowRef.current;\n\n if (isOpen && list && row) scrollRowIntoView(list, row);\n }, [isOpen, activeIndex, popup]);\n\n const handleSearch = (event: ChangeEvent<HTMLInputElement>) => {\n inputProps?.onChange?.(event);\n\n if (!isSearchControlled) setOwnSearch(event.target.value);\n };\n\n // The search is emptied as if the person had deleted the text: the field's own `change` event, so\n // an app that listens to it hears it.\n const clearSearch = () => {\n const input = searchRef.current;\n\n if (!input) return;\n\n Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set?.call(input, '');\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.focus();\n };\n\n const handleSearchKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n inputProps?.onKeyDown?.(event);\n\n if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return;\n\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp': {\n event.preventDefault();\n\n const next =\n activeIndex === -1 && event.key === 'ArrowUp'\n ? findEnabledIndex(navigable, rows.length, -1)\n : findEnabledIndex(navigable, activeIndex, event.key === 'ArrowDown' ? 1 : -1);\n const target = next === -1 ? undefined : rows.at(next);\n\n if (target) setActiveValue(target.node.value);\n\n return;\n }\n\n // Right and Left move the cursor in the text while there is a search: there is nothing to open\n // or close then, because every branch is open\n case 'ArrowRight': {\n if (isSearching || !activeRow?.isBranch) return;\n\n event.preventDefault();\n\n const firstChild = rows.at(activeIndex + 1);\n\n if (!activeRow.isExpanded) toggle(activeRow.node.value);\n else if (firstChild && !firstChild.node.disabled) setActiveValue(firstChild.node.value);\n\n return;\n }\n\n case 'ArrowLeft': {\n if (isSearching || !activeRow) return;\n\n if (activeRow.isExpanded) {\n event.preventDefault();\n toggle(activeRow.node.value);\n } else if (activeRow.parent !== undefined) {\n event.preventDefault();\n setActiveValue(activeRow.parent);\n }\n\n return;\n }\n\n case 'Enter':\n event.preventDefault();\n\n if (activeRow) activate(activeRow);\n\n return;\n\n case 'Tab':\n // the focus goes back to the field and the Tab goes on from there, not from the end of the page\n close(true);\n\n return;\n }\n };\n\n const handleTriggerKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (isOpen || event.altKey || event.ctrlKey || event.metaKey) return;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n open();\n }\n };\n\n return (\n <div\n ref={containerRef}\n className={`flex max-w-full min-w-0 flex-col gap-1.5 ${containerClassName}`}\n >\n <div className=\"relative\" ref={fieldBoxRef}>\n <InputLabel htmlFor={triggerId} className=\"z-2\">\n {label}\n </InputLabel>\n <div\n data-invalid={error ? '' : undefined}\n className={`border-primary/10 bg-smoke-eerie focus-within:border-blue-crayola-c data-invalid:border-red-c flex items-center gap-3 overflow-hidden rounded-lg border px-3 ${className}`}\n >\n <InputIcon icon={icons?.left} />\n <button\n id={triggerId}\n ref={triggerRef}\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n aria-controls={isOpen ? popupId : undefined}\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? errorId : undefined}\n disabled={selectProps.disabled}\n onClick={() => {\n if (isOpen) close(false);\n else open();\n }}\n onKeyDown={handleTriggerKeyDown}\n className={`text-primary flex min-w-0 flex-1 items-center justify-between gap-0.5 truncate border-none bg-transparent text-left text-[13px] outline-hidden ${\n selectProps.disabled ? 'cursor-no-drop' : 'cursor-pointer'\n }`}\n >\n <span\n className={`flex-1 truncate py-2 first-letter:capitalize xl:py-3 ${hasValue ? '' : 'text-primary/30'}`}\n >\n {selected?.label ?? selectProps.placeholder}\n </span>\n <Icon\n icon=\"solar:alt-arrow-down-linear\"\n className={`size-4 transition-transform motion-reduce:transition-none md:size-5 ${\n isOpen ? 'rotate-180' : ''\n } ${hasValue ? 'text-primary' : 'text-primary/30'}`}\n />\n </button>\n <InputIcon icon={icons?.right} />\n </div>\n </div>\n <InputError id={errorId} error={error} />\n {isOpen &&\n popup &&\n createPortal(\n <div\n ref={popupRef}\n id={popupId}\n role=\"dialog\"\n aria-label={label || text.tree}\n className={`border-primary/10 bg-smoke-eerie fixed z-3 overflow-hidden rounded-lg border shadow-md ${optionsClassName}`}\n style={getDropdownStyle(popup.rect, popup.placement, window.innerHeight)}\n >\n <Input\n needRef\n ref={searchRef}\n inputProps={{\n ...inputProps,\n value: search,\n onChange: handleSearch,\n onKeyDown: handleSearchKeyDown,\n placeholder: inputProps?.placeholder ?? text.searchPlaceholder,\n role: 'combobox',\n 'aria-label': inputProps?.['aria-label'] ?? text.search,\n 'aria-expanded': true,\n 'aria-controls': rows.length > 0 ? treeId : undefined,\n 'aria-activedescendant': activeIndex === -1 ? undefined : rowId(activeIndex),\n 'aria-autocomplete': 'list',\n autoComplete: 'off',\n className: `py-2! ${inputProps?.className ?? ''}`,\n }}\n icons={{\n right: search\n ? {\n icon: 'lucide:x',\n label: text.clearSearch,\n className: 'size-4 text-primary',\n onClick: clearSearch,\n }\n : { icon: 'solar:magnifer-linear', className: 'size-4 text-primary opacity-30' },\n }}\n containerClassName=\"p-2 border-b border-b-primary/20\"\n className=\"bg-silver-jet/8!\"\n />\n\n <div role=\"status\" className=\"sr-only\">\n {isSearching && rows.length > 0 ? text.results(rows.length) : ''}\n </div>\n\n {rows.length > 0 ? (\n <ul\n ref={listRef}\n id={treeId}\n role=\"tree\"\n aria-label={label || text.tree}\n // a press on a row must not take the focus from the search field\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n className=\"relative flex max-h-60 flex-col gap-0.5 overflow-auto p-1\"\n >\n {rows.map((row, index) => {\n const isSelected = !row.isBranch && row.node.value === selectProps.value;\n const isActive = index === activeIndex;\n const isDisabled = !!row.node.disabled;\n\n return (\n <li\n key={String(row.node.value)}\n id={rowId(index)}\n ref={isActive ? activeRowRef : null}\n role=\"treeitem\"\n aria-level={row.level}\n aria-posinset={row.position}\n aria-setsize={row.size}\n aria-expanded={row.isBranch ? row.isExpanded : undefined}\n aria-selected={isSelected}\n aria-disabled={isDisabled ? true : undefined}\n style={{ paddingLeft: `${String(8 + (row.level - 1) * 12)}px` }}\n className={`text-tertiary flex items-center gap-2 rounded-sm py-1.5 pr-2 text-[13px] ${\n isDisabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'\n } ${isActive ? 'bg-primary/5' : ''} ${isSelected ? 'bg-primary/8' : ''}`}\n onMouseMove={() => {\n if (!isDisabled && !isActive) setActiveValue(row.node.value);\n }}\n onClick={() => {\n activate(row);\n }}\n >\n <span\n aria-hidden=\"true\"\n className=\"flex size-5 shrink-0 items-center justify-center\"\n >\n {row.isBranch && (\n <Icon\n icon={\n row.isExpanded\n ? 'solar:alt-arrow-down-linear'\n : 'solar:alt-arrow-right-linear'\n }\n className=\"size-4\"\n />\n )}\n </span>\n <span\n aria-hidden=\"true\"\n className=\"flex size-5 shrink-0 items-center justify-center\"\n >\n <Icon\n icon={\n row.isBranch\n ? row.isExpanded\n ? 'solar:folder-open-linear'\n : 'solar:folder-linear'\n : 'solar:file-linear'\n }\n className=\"size-4\"\n />\n </span>\n <span className=\"flex-1 text-left text-[13px] first-letter:capitalize\">\n {row.node.label}\n </span>\n {isSelected && (\n <span\n aria-hidden=\"true\"\n className=\"flex size-5 shrink-0 items-center justify-center\"\n >\n <Icon\n icon=\"solar:unread-linear\"\n className=\"text-primary size-4 md:size-5\"\n />\n </span>\n )}\n </li>\n );\n })}\n </ul>\n ) : (\n <ApiStatus\n status=\"empty\"\n title={text.noResultsTitle}\n description={text.noResultsDescription}\n className=\"min-h-30!\"\n />\n )}\n </div>,\n document.body,\n )}\n </div>\n );\n};\n"]}
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from 'react';
2
+ export type TTreeValue = string | number;
3
+ /** What the tree needs of an option; the option of the field has more. */
4
+ export interface ITreeNode<TNode extends ITreeNode<TNode>> {
5
+ label: ReactNode;
6
+ value: TTreeValue;
7
+ disabled?: boolean;
8
+ searchLabel?: string;
9
+ children?: readonly TNode[];
10
+ }
11
+ /** A line of the tree as it is shown: a node with where it is. */
12
+ export interface ITreeRow<TNode> {
13
+ node: TNode;
14
+ /** 1 for the top of the tree. */
15
+ level: number;
16
+ /** Its place among the nodes that share its parent (from 1) and how many those are. */
17
+ position: number;
18
+ size: number;
19
+ isBranch: boolean;
20
+ isExpanded: boolean;
21
+ parent: TTreeValue | undefined;
22
+ }
23
+ /**
24
+ * The nodes that match `keyword`, and the branches that lead to them. A node that matches keeps all
25
+ * that is under it (the person can browse what they found); a branch that does not match is kept
26
+ * only with the matching nodes under it.
27
+ */
28
+ export declare const filterTree: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], keyword: string) => readonly TNode[];
29
+ /**
30
+ * The lines to draw, from the top: a branch that is expanded (or all of them, with `forceExpanded`) is
31
+ * followed by its own lines.
32
+ */
33
+ export declare const buildRows: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], expanded: readonly TTreeValue[], forceExpanded: boolean, level?: number, parent?: TTreeValue) => ITreeRow<TNode>[];
34
+ /** The node with this value, wherever it is in the tree. */
35
+ export declare const findNode: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], value: TTreeValue) => TNode | undefined;
36
+ /** The values of the branches above a node (so they can be opened to show it), or `[]` when it is not in the tree. */
37
+ export declare const ancestorsOf: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], value: TTreeValue, path?: readonly TTreeValue[]) => readonly TTreeValue[];
38
+ //# sourceMappingURL=tree.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.cts","sourceRoot":"","sources":["../../src/hierarchy-select/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,S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;AACtH,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC,EACxD,OAAO,SAAS,KAAK,EAAE,EACvB,OAAO,UAAU,EACjB,OAAM,SAAS,UAAU,EAAO,KAC/B,SAAS,UAAU,EAUrB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { ReactNode } from 'react';
2
+ export type TTreeValue = string | number;
3
+ /** What the tree needs of an option; the option of the field has more. */
4
+ export interface ITreeNode<TNode extends ITreeNode<TNode>> {
5
+ label: ReactNode;
6
+ value: TTreeValue;
7
+ disabled?: boolean;
8
+ searchLabel?: string;
9
+ children?: readonly TNode[];
10
+ }
11
+ /** A line of the tree as it is shown: a node with where it is. */
12
+ export interface ITreeRow<TNode> {
13
+ node: TNode;
14
+ /** 1 for the top of the tree. */
15
+ level: number;
16
+ /** Its place among the nodes that share its parent (from 1) and how many those are. */
17
+ position: number;
18
+ size: number;
19
+ isBranch: boolean;
20
+ isExpanded: boolean;
21
+ parent: TTreeValue | undefined;
22
+ }
23
+ /**
24
+ * The nodes that match `keyword`, and the branches that lead to them. A node that matches keeps all
25
+ * that is under it (the person can browse what they found); a branch that does not match is kept
26
+ * only with the matching nodes under it.
27
+ */
28
+ export declare const filterTree: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], keyword: string) => readonly TNode[];
29
+ /**
30
+ * The lines to draw, from the top: a branch that is expanded (or all of them, with `forceExpanded`) is
31
+ * followed by its own lines.
32
+ */
33
+ export declare const buildRows: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], expanded: readonly TTreeValue[], forceExpanded: boolean, level?: number, parent?: TTreeValue) => ITreeRow<TNode>[];
34
+ /** The node with this value, wherever it is in the tree. */
35
+ export declare const findNode: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], value: TTreeValue) => TNode | undefined;
36
+ /** The values of the branches above a node (so they can be opened to show it), or `[]` when it is not in the tree. */
37
+ export declare const ancestorsOf: <TNode extends ITreeNode<TNode>>(nodes: readonly TNode[], value: TTreeValue, path?: readonly TTreeValue[]) => readonly TTreeValue[];
38
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/hierarchy-select/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,0EAA0E;AAC1E,MAAM,WAAW,SAAS,CAAC,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC;IACvD,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;CAC7B;AAED,kEAAkE;AAClE,MAAM,WAAW,QAAQ,CAAC,KAAK;IAC7B,IAAI,EAAE,KAAK,CAAC;IACZ,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;CAChC;AAKD;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC,EACvD,OAAO,SAAS,KAAK,EAAE,EACvB,SAAS,MAAM,KACd,SAAS,KAAK,EAYhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC,EACtD,OAAO,SAAS,KAAK,EAAE,EACvB,UAAU,SAAS,UAAU,EAAE,EAC/B,eAAe,OAAO,EACtB,cAAS,EACT,SAAS,UAAU,KAClB,QAAQ,CAAC,KAAK,CAAC,EAiBd,CAAC;AAEL,4DAA4D;AAC5D,eAAO,MAAM,QAAQ,GAAI,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC,EACrD,OAAO,SAAS,KAAK,EAAE,EACvB,OAAO,UAAU,KAChB,KAAK,GAAG,SAUV,CAAC;AAEF,sHAAsH;AACtH,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,SAAS,CAAC,KAAK,CAAC,EACxD,OAAO,SAAS,KAAK,EAAE,EACvB,OAAO,UAAU,EACjB,OAAM,SAAS,UAAU,EAAO,KAC/B,SAAS,UAAU,EAUrB,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var inputs = require('@beautinique/frontend-components/inputs');
3
4
  var layout = require('@beautinique/frontend-components/layout');
4
5
  var theme = require('@beautinique/frontend-components/theme');
5
6
  var toast = require('@beautinique/frontend-components/toast');
@@ -7,6 +8,12 @@ var ui = require('@beautinique/frontend-components/ui');
7
8
 
8
9
 
9
10
 
11
+ Object.keys(inputs).forEach(function (k) {
12
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
13
+ enumerable: true,
14
+ get: function () { return inputs[k]; }
15
+ });
16
+ });
10
17
  Object.keys(layout).forEach(function (k) {
11
18
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
12
19
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './inputs/index.js';
1
2
  export * from './layout/index.js';
2
3
  export * from './theme/index.js';
3
4
  export * from './toast/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,eAAe,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './inputs/index.js';
1
2
  export * from './layout/index.js';
2
3
  export * from './theme/index.js';
3
4
  export * from './toast/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from '@beautinique/frontend-components/inputs';
1
2
  export * from '@beautinique/frontend-components/layout';
2
3
  export * from '@beautinique/frontend-components/theme';
3
4
  export * from '@beautinique/frontend-components/toast';
@@ -0,0 +1,21 @@
1
+ import { type InputHTMLAttributes, type ReactNode, type Ref } from 'react';
2
+ import type { ITooltip } from '../types/component.js';
3
+ import type { IFieldBase, IFieldRegistration } from './types.js';
4
+ export interface ICheckbox extends Omit<IFieldBase, 'label'> {
5
+ /** The words next to the switch. They are its label: pressing them switches it, a screen reader reads them. */
6
+ content?: ReactNode;
7
+ /** Any attribute of the `<input>` except `type`: `name`, `checked`, `onChange`, `disabled`... */
8
+ checkboxProps: Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>;
9
+ /** What `register('name')` of React Hook Form gives back. */
10
+ register?: IFieldRegistration;
11
+ /** A tooltip on the switch (it shows when `required` is true). */
12
+ tooltip?: Pick<ITooltip, 'required' | 'description' | 'title' | 'placement'>;
13
+ /** The `<input>` itself, e.g. to move the focus to it. */
14
+ ref?: Ref<HTMLInputElement>;
15
+ }
16
+ /**
17
+ * An on / off switch with the words that say what it is for. It is a real checkbox (`role="switch"`),
18
+ * so it works with the keyboard (Space) and with a form, and a screen reader says "on" or "off".
19
+ */
20
+ export declare const Checkbox: ({ register, className, content, checkboxProps, containerClassName, error, tooltip, ref, }: ICheckbox) => import("react").JSX.Element;
21
+ //# sourceMappingURL=Checkbox.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.cts","sourceRoot":"","sources":["../../src/inputs/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGjE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IAC1D,+GAA+G;IAC/G,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iGAAiG;IACjG,aAAa,EAAE,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;IACnE,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,kEAAkE;IAClE,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC;IAC7E,0DAA0D;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,2FAStB,SAAS,gCAiEX,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type InputHTMLAttributes, type ReactNode, type Ref } from 'react';
2
+ import type { ITooltip } from '../types/component.js';
3
+ import type { IFieldBase, IFieldRegistration } from './types.js';
4
+ export interface ICheckbox extends Omit<IFieldBase, 'label'> {
5
+ /** The words next to the switch. They are its label: pressing them switches it, a screen reader reads them. */
6
+ content?: ReactNode;
7
+ /** Any attribute of the `<input>` except `type`: `name`, `checked`, `onChange`, `disabled`... */
8
+ checkboxProps: Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>;
9
+ /** What `register('name')` of React Hook Form gives back. */
10
+ register?: IFieldRegistration;
11
+ /** A tooltip on the switch (it shows when `required` is true). */
12
+ tooltip?: Pick<ITooltip, 'required' | 'description' | 'title' | 'placement'>;
13
+ /** The `<input>` itself, e.g. to move the focus to it. */
14
+ ref?: Ref<HTMLInputElement>;
15
+ }
16
+ /**
17
+ * An on / off switch with the words that say what it is for. It is a real checkbox (`role="switch"`),
18
+ * so it works with the keyboard (Space) and with a form, and a screen reader says "on" or "off".
19
+ */
20
+ export declare const Checkbox: ({ register, className, content, checkboxProps, containerClassName, error, tooltip, ref, }: ICheckbox) => import("react").JSX.Element;
21
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/inputs/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGjE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IAC1D,+GAA+G;IAC/G,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iGAAiG;IACjG,aAAa,EAAE,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;IACnE,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,kEAAkE;IAClE,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC;IAC7E,0DAA0D;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,2FAStB,SAAS,gCAiEX,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type InputHTMLAttributes, type Ref } from 'react';
2
+ import type { IFieldBase, IFieldRegistration, TInputIcons } from './types.js';
3
+ export interface IInput extends IFieldBase {
4
+ /** Any attribute of an `<input>`: `type`, `name`, `value`, `onChange`, `placeholder`, `disabled`... */
5
+ inputProps: InputHTMLAttributes<HTMLInputElement>;
6
+ /** An icon at each end of the field. One with an `onClick` is a button and needs a `label`. */
7
+ icons?: TInputIcons;
8
+ /** What `register('name')` of React Hook Form gives back. */
9
+ register?: IFieldRegistration;
10
+ /** Puts the cursor in the field when it is shown. */
11
+ needRef?: boolean;
12
+ /** The `<input>` itself, e.g. to move the focus to it. */
13
+ ref?: Ref<HTMLInputElement>;
14
+ }
15
+ /**
16
+ * A text field (any `type` of `<input>`) with its label on the top border, a message under it, and an
17
+ * icon at each end.
18
+ *
19
+ * - The label is the name of the field: it is tied to it through `id` (the `id` of `inputProps`, or
20
+ * its `name`, or one made here), so pressing the label focuses the field and a screen reader reads it.
21
+ * - While there is an `error` the field is `aria-invalid` and described by the message, which is
22
+ * said as soon as it shows up.
23
+ * - Both `inputProps` and `register` are heard: `onChange` and `onBlur` of each are called.
24
+ */
25
+ export declare const Input: ({ label, register, className, error, containerClassName, icons, inputProps, needRef, ref, }: IInput) => import("react").JSX.Element;
26
+ //# sourceMappingURL=Input.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../src/inputs/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,GAAG,EAIT,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9E,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,uGAAuG;IACvG,UAAU,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAClD,+FAA+F;IAC/F,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAAI,6FAUnB,MAAM,gCA4DR,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type InputHTMLAttributes, type Ref } from 'react';
2
+ import type { IFieldBase, IFieldRegistration, TInputIcons } from './types.js';
3
+ export interface IInput extends IFieldBase {
4
+ /** Any attribute of an `<input>`: `type`, `name`, `value`, `onChange`, `placeholder`, `disabled`... */
5
+ inputProps: InputHTMLAttributes<HTMLInputElement>;
6
+ /** An icon at each end of the field. One with an `onClick` is a button and needs a `label`. */
7
+ icons?: TInputIcons;
8
+ /** What `register('name')` of React Hook Form gives back. */
9
+ register?: IFieldRegistration;
10
+ /** Puts the cursor in the field when it is shown. */
11
+ needRef?: boolean;
12
+ /** The `<input>` itself, e.g. to move the focus to it. */
13
+ ref?: Ref<HTMLInputElement>;
14
+ }
15
+ /**
16
+ * A text field (any `type` of `<input>`) with its label on the top border, a message under it, and an
17
+ * icon at each end.
18
+ *
19
+ * - The label is the name of the field: it is tied to it through `id` (the `id` of `inputProps`, or
20
+ * its `name`, or one made here), so pressing the label focuses the field and a screen reader reads it.
21
+ * - While there is an `error` the field is `aria-invalid` and described by the message, which is
22
+ * said as soon as it shows up.
23
+ * - Both `inputProps` and `register` are heard: `onChange` and `onBlur` of each are called.
24
+ */
25
+ export declare const Input: ({ label, register, className, error, containerClassName, icons, inputProps, needRef, ref, }: IInput) => import("react").JSX.Element;
26
+ //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/inputs/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,GAAG,EAIT,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9E,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,uGAAuG;IACvG,UAAU,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAClD,+FAA+F;IAC/F,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAAI,6FAUnB,MAAM,gCA4DR,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ComponentProps } from 'react';
2
+ export interface IInputError extends Omit<ComponentProps<'p'>, 'children'> {
3
+ /** The message. Nothing is drawn while it is empty. */
4
+ error?: string;
5
+ }
6
+ /**
7
+ * The message under a field. It is an alert: a screen reader says it as soon as it appears. Give it an
8
+ * `id` and put that id in the `aria-describedby` of the field, so the message is read with the field.
9
+ */
10
+ export declare const InputError: ({ error, className, ...pProps }: IInputError) => import("react").JSX.Element | null;
11
+ //# sourceMappingURL=InputError.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputError.d.cts","sourceRoot":"","sources":["../../src/inputs/InputError.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;IACxE,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,iCAA2C,WAAW,uCAiBhF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ComponentProps } from 'react';
2
+ export interface IInputError extends Omit<ComponentProps<'p'>, 'children'> {
3
+ /** The message. Nothing is drawn while it is empty. */
4
+ error?: string;
5
+ }
6
+ /**
7
+ * The message under a field. It is an alert: a screen reader says it as soon as it appears. Give it an
8
+ * `id` and put that id in the `aria-describedby` of the field, so the message is read with the field.
9
+ */
10
+ export declare const InputError: ({ error, className, ...pProps }: IInputError) => import("react").JSX.Element | null;
11
+ //# sourceMappingURL=InputError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputError.d.ts","sourceRoot":"","sources":["../../src/inputs/InputError.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;IACxE,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,iCAA2C,WAAW,uCAiBhF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TInputIcon } from './types.js';
2
+ /**
3
+ * An icon at one end of a field. An element is drawn as it is. An icon of Iconify is drawn as a
4
+ * picture, or, when it has an `onClick`, inside a `<button>` that has the `label` as its name.
5
+ */
6
+ export declare const InputIcon: ({ icon }: {
7
+ icon?: TInputIcon;
8
+ }) => import("react").JSX.Element | null;
9
+ //# sourceMappingURL=InputIcon.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputIcon.d.cts","sourceRoot":"","sources":["../../src/inputs/InputIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAK7C;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,UAAU,CAAA;CAAE,uCAwBxD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TInputIcon } from './types.js';
2
+ /**
3
+ * An icon at one end of a field. An element is drawn as it is. An icon of Iconify is drawn as a
4
+ * picture, or, when it has an `onClick`, inside a `<button>` that has the `label` as its name.
5
+ */
6
+ export declare const InputIcon: ({ icon }: {
7
+ icon?: TInputIcon;
8
+ }) => import("react").JSX.Element | null;
9
+ //# sourceMappingURL=InputIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputIcon.d.ts","sourceRoot":"","sources":["../../src/inputs/InputIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAK7C;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,UAAU,CAAA;CAAE,uCAwBxD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ComponentProps } from 'react';
2
+ /**
3
+ * The label that sits on the top border of a field. It draws nothing when it has no text. Give it
4
+ * `htmlFor` (the `id` of the field) so that pressing it focuses the field and a screen reader reads it
5
+ * as the name of the field.
6
+ */
7
+ export declare const InputLabel: ({ children, className, htmlFor, ...labelProps }: ComponentProps<"label">) => import("react").JSX.Element | null;
8
+ //# sourceMappingURL=InputLabel.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputLabel.d.cts","sourceRoot":"","sources":["../../src/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,iDAKxB,cAAc,CAAC,OAAO,CAAC,uCAShB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ComponentProps } from 'react';
2
+ /**
3
+ * The label that sits on the top border of a field. It draws nothing when it has no text. Give it
4
+ * `htmlFor` (the `id` of the field) so that pressing it focuses the field and a screen reader reads it
5
+ * as the name of the field.
6
+ */
7
+ export declare const InputLabel: ({ children, className, htmlFor, ...labelProps }: ComponentProps<"label">) => import("react").JSX.Element | null;
8
+ //# sourceMappingURL=InputLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../src/inputs/InputLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,iDAKxB,cAAc,CAAC,OAAO,CAAC,uCAShB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { IClassName, IContainerClassName } from '../types/component.js';
3
+ import type { IFieldBase } from './types.js';
4
+ export interface IRadioOption {
5
+ label: ReactNode;
6
+ value: string;
7
+ }
8
+ export interface IRadio extends IClassName, IContainerClassName, Pick<IFieldBase, 'error'> {
9
+ /** The value of the chosen option. A value that is not one of the options chooses none. */
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ options: IRadioOption[];
13
+ /** Names the group for assistive technology ("Gender"): the options are its only visible text. */
14
+ label?: string;
15
+ /** Groups the radios; one is made when it is not given. */
16
+ name?: string;
17
+ disabled?: boolean;
18
+ }
19
+ /**
20
+ * A group of options of which one is chosen, drawn as a bar with a marker that slides to the chosen
21
+ * one. It is a real radio group: the arrow keys move the choice, Tab leaves the group, and the
22
+ * message under it is read with it.
23
+ */
24
+ export declare const Radio: ({ value, onChange, options, className, containerClassName, error, label, name, disabled, }: IRadio) => import("react").JSX.Element;
25
+ //# sourceMappingURL=Radio.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.d.cts","sourceRoot":"","sources":["../../src/inputs/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU,EAAE,mBAAmB,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IACxF,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,4FAUnB,MAAM,gCA0DR,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { IClassName, IContainerClassName } from '../types/component.js';
3
+ import type { IFieldBase } from './types.js';
4
+ export interface IRadioOption {
5
+ label: ReactNode;
6
+ value: string;
7
+ }
8
+ export interface IRadio extends IClassName, IContainerClassName, Pick<IFieldBase, 'error'> {
9
+ /** The value of the chosen option. A value that is not one of the options chooses none. */
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ options: IRadioOption[];
13
+ /** Names the group for assistive technology ("Gender"): the options are its only visible text. */
14
+ label?: string;
15
+ /** Groups the radios; one is made when it is not given. */
16
+ name?: string;
17
+ disabled?: boolean;
18
+ }
19
+ /**
20
+ * A group of options of which one is chosen, drawn as a bar with a marker that slides to the chosen
21
+ * one. It is a real radio group: the arrow keys move the choice, Tab leaves the group, and the
22
+ * message under it is read with it.
23
+ */
24
+ export declare const Radio: ({ value, onChange, options, className, containerClassName, error, label, name, disabled, }: IRadio) => import("react").JSX.Element;
25
+ //# sourceMappingURL=Radio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../src/inputs/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU,EAAE,mBAAmB,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IACxF,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,4FAUnB,MAAM,gCA0DR,CAAC"}