@mihcm/ui 0.14.1

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 (737) hide show
  1. package/README.md +138 -0
  2. package/dist/AccessLevelGroup.d.ts +37 -0
  3. package/dist/AccessLevelGroup.d.ts.map +1 -0
  4. package/dist/AccessLevelGroup.js +39 -0
  5. package/dist/AccessLevelGroup.js.map +1 -0
  6. package/dist/AccessLevelGroup.native.d.ts +18 -0
  7. package/dist/AccessLevelGroup.native.d.ts.map +1 -0
  8. package/dist/AccessLevelGroup.native.js +40 -0
  9. package/dist/AccessLevelGroup.native.js.map +1 -0
  10. package/dist/Accordion.d.ts +52 -0
  11. package/dist/Accordion.d.ts.map +1 -0
  12. package/dist/Accordion.js +90 -0
  13. package/dist/Accordion.js.map +1 -0
  14. package/dist/Accordion.native.d.ts +36 -0
  15. package/dist/Accordion.native.d.ts.map +1 -0
  16. package/dist/Accordion.native.js +86 -0
  17. package/dist/Accordion.native.js.map +1 -0
  18. package/dist/Alert.d.ts +33 -0
  19. package/dist/Alert.d.ts.map +1 -0
  20. package/dist/Alert.js +45 -0
  21. package/dist/Alert.js.map +1 -0
  22. package/dist/Alert.native.d.ts +26 -0
  23. package/dist/Alert.native.d.ts.map +1 -0
  24. package/dist/Alert.native.js +41 -0
  25. package/dist/Alert.native.js.map +1 -0
  26. package/dist/AlertDialog.d.ts +57 -0
  27. package/dist/AlertDialog.d.ts.map +1 -0
  28. package/dist/AlertDialog.js +91 -0
  29. package/dist/AlertDialog.js.map +1 -0
  30. package/dist/AlertDialog.native.d.ts +66 -0
  31. package/dist/AlertDialog.native.d.ts.map +1 -0
  32. package/dist/AlertDialog.native.js +71 -0
  33. package/dist/AlertDialog.native.js.map +1 -0
  34. package/dist/AspectRatio.d.ts +18 -0
  35. package/dist/AspectRatio.d.ts.map +1 -0
  36. package/dist/AspectRatio.js +19 -0
  37. package/dist/AspectRatio.js.map +1 -0
  38. package/dist/AspectRatio.native.d.ts +7 -0
  39. package/dist/AspectRatio.native.d.ts.map +1 -0
  40. package/dist/AspectRatio.native.js +13 -0
  41. package/dist/AspectRatio.native.js.map +1 -0
  42. package/dist/Avatar.d.ts +45 -0
  43. package/dist/Avatar.d.ts.map +1 -0
  44. package/dist/Avatar.js +69 -0
  45. package/dist/Avatar.js.map +1 -0
  46. package/dist/Avatar.native.d.ts +38 -0
  47. package/dist/Avatar.native.d.ts.map +1 -0
  48. package/dist/Avatar.native.js +56 -0
  49. package/dist/Avatar.native.js.map +1 -0
  50. package/dist/AvatarGroup.d.ts +32 -0
  51. package/dist/AvatarGroup.d.ts.map +1 -0
  52. package/dist/AvatarGroup.js +45 -0
  53. package/dist/AvatarGroup.js.map +1 -0
  54. package/dist/AvatarGroup.native.d.ts +18 -0
  55. package/dist/AvatarGroup.native.d.ts.map +1 -0
  56. package/dist/AvatarGroup.native.js +35 -0
  57. package/dist/AvatarGroup.native.js.map +1 -0
  58. package/dist/Badge.d.ts +26 -0
  59. package/dist/Badge.d.ts.map +1 -0
  60. package/dist/Badge.js +44 -0
  61. package/dist/Badge.js.map +1 -0
  62. package/dist/Badge.native.d.ts +23 -0
  63. package/dist/Badge.native.d.ts.map +1 -0
  64. package/dist/Badge.native.js +49 -0
  65. package/dist/Badge.native.js.map +1 -0
  66. package/dist/Banner.d.ts +27 -0
  67. package/dist/Banner.d.ts.map +1 -0
  68. package/dist/Banner.js +41 -0
  69. package/dist/Banner.js.map +1 -0
  70. package/dist/Banner.native.d.ts +24 -0
  71. package/dist/Banner.native.d.ts.map +1 -0
  72. package/dist/Banner.native.js +39 -0
  73. package/dist/Banner.native.js.map +1 -0
  74. package/dist/BarList.d.ts +27 -0
  75. package/dist/BarList.d.ts.map +1 -0
  76. package/dist/BarList.js +25 -0
  77. package/dist/BarList.js.map +1 -0
  78. package/dist/Breadcrumb.d.ts +67 -0
  79. package/dist/Breadcrumb.d.ts.map +1 -0
  80. package/dist/Breadcrumb.js +63 -0
  81. package/dist/Breadcrumb.js.map +1 -0
  82. package/dist/Breadcrumb.native.d.ts +64 -0
  83. package/dist/Breadcrumb.native.d.ts.map +1 -0
  84. package/dist/Breadcrumb.native.js +50 -0
  85. package/dist/Breadcrumb.native.js.map +1 -0
  86. package/dist/Button.d.ts +42 -0
  87. package/dist/Button.d.ts.map +1 -0
  88. package/dist/Button.js +68 -0
  89. package/dist/Button.js.map +1 -0
  90. package/dist/Button.native.d.ts +38 -0
  91. package/dist/Button.native.d.ts.map +1 -0
  92. package/dist/Button.native.js +51 -0
  93. package/dist/Button.native.js.map +1 -0
  94. package/dist/Calendar.d.ts +16 -0
  95. package/dist/Calendar.d.ts.map +1 -0
  96. package/dist/Calendar.js +94 -0
  97. package/dist/Calendar.js.map +1 -0
  98. package/dist/Calendar.native.d.ts +21 -0
  99. package/dist/Calendar.native.d.ts.map +1 -0
  100. package/dist/Calendar.native.js +15 -0
  101. package/dist/Calendar.native.js.map +1 -0
  102. package/dist/Card.d.ts +29 -0
  103. package/dist/Card.d.ts.map +1 -0
  104. package/dist/Card.js +44 -0
  105. package/dist/Card.js.map +1 -0
  106. package/dist/Card.native.d.ts +20 -0
  107. package/dist/Card.native.d.ts.map +1 -0
  108. package/dist/Card.native.js +32 -0
  109. package/dist/Card.native.js.map +1 -0
  110. package/dist/Carousel.d.ts +46 -0
  111. package/dist/Carousel.d.ts.map +1 -0
  112. package/dist/Carousel.js +115 -0
  113. package/dist/Carousel.js.map +1 -0
  114. package/dist/Carousel.native.d.ts +59 -0
  115. package/dist/Carousel.native.d.ts.map +1 -0
  116. package/dist/Carousel.native.js +93 -0
  117. package/dist/Carousel.native.js.map +1 -0
  118. package/dist/CategoryBar.d.ts +22 -0
  119. package/dist/CategoryBar.d.ts.map +1 -0
  120. package/dist/CategoryBar.js +27 -0
  121. package/dist/CategoryBar.js.map +1 -0
  122. package/dist/Chart.d.ts +77 -0
  123. package/dist/Chart.d.ts.map +1 -0
  124. package/dist/Chart.js +197 -0
  125. package/dist/Chart.js.map +1 -0
  126. package/dist/Checkbox.d.ts +28 -0
  127. package/dist/Checkbox.d.ts.map +1 -0
  128. package/dist/Checkbox.js +44 -0
  129. package/dist/Checkbox.js.map +1 -0
  130. package/dist/Checkbox.native.d.ts +13 -0
  131. package/dist/Checkbox.native.d.ts.map +1 -0
  132. package/dist/Checkbox.native.js +34 -0
  133. package/dist/Checkbox.native.js.map +1 -0
  134. package/dist/CheckboxGrid.d.ts +49 -0
  135. package/dist/CheckboxGrid.d.ts.map +1 -0
  136. package/dist/CheckboxGrid.js +79 -0
  137. package/dist/CheckboxGrid.js.map +1 -0
  138. package/dist/CheckboxGrid.native.d.ts +14 -0
  139. package/dist/CheckboxGrid.native.d.ts.map +1 -0
  140. package/dist/CheckboxGrid.native.js +47 -0
  141. package/dist/CheckboxGrid.native.js.map +1 -0
  142. package/dist/Collapsible.d.ts +51 -0
  143. package/dist/Collapsible.d.ts.map +1 -0
  144. package/dist/Collapsible.js +101 -0
  145. package/dist/Collapsible.js.map +1 -0
  146. package/dist/Collapsible.native.d.ts +53 -0
  147. package/dist/Collapsible.native.d.ts.map +1 -0
  148. package/dist/Collapsible.native.js +109 -0
  149. package/dist/Collapsible.native.js.map +1 -0
  150. package/dist/Combobox.d.ts +42 -0
  151. package/dist/Combobox.d.ts.map +1 -0
  152. package/dist/Combobox.js +96 -0
  153. package/dist/Combobox.js.map +1 -0
  154. package/dist/Combobox.native.d.ts +21 -0
  155. package/dist/Combobox.native.d.ts.map +1 -0
  156. package/dist/Combobox.native.js +28 -0
  157. package/dist/Combobox.native.js.map +1 -0
  158. package/dist/Command.d.ts +107 -0
  159. package/dist/Command.d.ts.map +1 -0
  160. package/dist/Command.js +68 -0
  161. package/dist/Command.js.map +1 -0
  162. package/dist/Command.native.d.ts +41 -0
  163. package/dist/Command.native.d.ts.map +1 -0
  164. package/dist/Command.native.js +31 -0
  165. package/dist/Command.native.js.map +1 -0
  166. package/dist/ContextMenu.d.ts +48 -0
  167. package/dist/ContextMenu.d.ts.map +1 -0
  168. package/dist/ContextMenu.js +79 -0
  169. package/dist/ContextMenu.js.map +1 -0
  170. package/dist/ContextMenu.native.d.ts +81 -0
  171. package/dist/ContextMenu.native.d.ts.map +1 -0
  172. package/dist/ContextMenu.native.js +82 -0
  173. package/dist/ContextMenu.native.js.map +1 -0
  174. package/dist/DataTable.d.ts +98 -0
  175. package/dist/DataTable.d.ts.map +1 -0
  176. package/dist/DataTable.js +291 -0
  177. package/dist/DataTable.js.map +1 -0
  178. package/dist/DataTable.native.d.ts +31 -0
  179. package/dist/DataTable.native.d.ts.map +1 -0
  180. package/dist/DataTable.native.js +22 -0
  181. package/dist/DataTable.native.js.map +1 -0
  182. package/dist/DatePicker.d.ts +63 -0
  183. package/dist/DatePicker.d.ts.map +1 -0
  184. package/dist/DatePicker.js +106 -0
  185. package/dist/DatePicker.js.map +1 -0
  186. package/dist/DatePicker.native.d.ts +21 -0
  187. package/dist/DatePicker.native.d.ts.map +1 -0
  188. package/dist/DatePicker.native.js +15 -0
  189. package/dist/DatePicker.native.js.map +1 -0
  190. package/dist/Dialog.d.ts +52 -0
  191. package/dist/Dialog.d.ts.map +1 -0
  192. package/dist/Dialog.js +93 -0
  193. package/dist/Dialog.js.map +1 -0
  194. package/dist/Dialog.native.d.ts +57 -0
  195. package/dist/Dialog.native.d.ts.map +1 -0
  196. package/dist/Dialog.native.js +62 -0
  197. package/dist/Dialog.native.js.map +1 -0
  198. package/dist/Drawer.d.ts +36 -0
  199. package/dist/Drawer.d.ts.map +1 -0
  200. package/dist/Drawer.js +57 -0
  201. package/dist/Drawer.js.map +1 -0
  202. package/dist/Drawer.native.d.ts +50 -0
  203. package/dist/Drawer.native.d.ts.map +1 -0
  204. package/dist/Drawer.native.js +43 -0
  205. package/dist/Drawer.native.js.map +1 -0
  206. package/dist/DropdownMenu.d.ts +57 -0
  207. package/dist/DropdownMenu.d.ts.map +1 -0
  208. package/dist/DropdownMenu.js +192 -0
  209. package/dist/DropdownMenu.js.map +1 -0
  210. package/dist/DropdownMenu.native.d.ts +53 -0
  211. package/dist/DropdownMenu.native.d.ts.map +1 -0
  212. package/dist/DropdownMenu.native.js +71 -0
  213. package/dist/DropdownMenu.native.js.map +1 -0
  214. package/dist/Dropzone.d.ts +27 -0
  215. package/dist/Dropzone.d.ts.map +1 -0
  216. package/dist/Dropzone.js +33 -0
  217. package/dist/Dropzone.js.map +1 -0
  218. package/dist/EmptyState.d.ts +21 -0
  219. package/dist/EmptyState.d.ts.map +1 -0
  220. package/dist/EmptyState.js +16 -0
  221. package/dist/EmptyState.js.map +1 -0
  222. package/dist/EmptyState.native.d.ts +19 -0
  223. package/dist/EmptyState.native.d.ts.map +1 -0
  224. package/dist/EmptyState.native.js +16 -0
  225. package/dist/EmptyState.native.js.map +1 -0
  226. package/dist/Form.d.ts +310 -0
  227. package/dist/Form.d.ts.map +1 -0
  228. package/dist/Form.js +260 -0
  229. package/dist/Form.js.map +1 -0
  230. package/dist/Form.native.d.ts +36 -0
  231. package/dist/Form.native.d.ts.map +1 -0
  232. package/dist/Form.native.js +33 -0
  233. package/dist/Form.native.js.map +1 -0
  234. package/dist/HoverCard.d.ts +47 -0
  235. package/dist/HoverCard.d.ts.map +1 -0
  236. package/dist/HoverCard.js +86 -0
  237. package/dist/HoverCard.js.map +1 -0
  238. package/dist/HoverCard.native.d.ts +48 -0
  239. package/dist/HoverCard.native.d.ts.map +1 -0
  240. package/dist/HoverCard.native.js +19 -0
  241. package/dist/HoverCard.native.js.map +1 -0
  242. package/dist/IconSidebar.d.ts +50 -0
  243. package/dist/IconSidebar.d.ts.map +1 -0
  244. package/dist/IconSidebar.js +121 -0
  245. package/dist/IconSidebar.js.map +1 -0
  246. package/dist/IconSidebar.native.d.ts +40 -0
  247. package/dist/IconSidebar.native.d.ts.map +1 -0
  248. package/dist/IconSidebar.native.js +24 -0
  249. package/dist/IconSidebar.native.js.map +1 -0
  250. package/dist/Input.d.ts +52 -0
  251. package/dist/Input.d.ts.map +1 -0
  252. package/dist/Input.js +57 -0
  253. package/dist/Input.js.map +1 -0
  254. package/dist/Input.native.d.ts +37 -0
  255. package/dist/Input.native.d.ts.map +1 -0
  256. package/dist/Input.native.js +39 -0
  257. package/dist/Input.native.js.map +1 -0
  258. package/dist/InputOTP.d.ts +30 -0
  259. package/dist/InputOTP.d.ts.map +1 -0
  260. package/dist/InputOTP.js +47 -0
  261. package/dist/InputOTP.js.map +1 -0
  262. package/dist/InputOTP.native.d.ts +32 -0
  263. package/dist/InputOTP.native.d.ts.map +1 -0
  264. package/dist/InputOTP.native.js +48 -0
  265. package/dist/InputOTP.native.js.map +1 -0
  266. package/dist/Label.d.ts +26 -0
  267. package/dist/Label.d.ts.map +1 -0
  268. package/dist/Label.js +35 -0
  269. package/dist/Label.js.map +1 -0
  270. package/dist/Label.native.d.ts +26 -0
  271. package/dist/Label.native.d.ts.map +1 -0
  272. package/dist/Label.native.js +30 -0
  273. package/dist/Label.native.js.map +1 -0
  274. package/dist/Link.d.ts +21 -0
  275. package/dist/Link.d.ts.map +1 -0
  276. package/dist/Link.js +46 -0
  277. package/dist/Link.js.map +1 -0
  278. package/dist/Link.native.d.ts +23 -0
  279. package/dist/Link.native.d.ts.map +1 -0
  280. package/dist/Link.native.js +59 -0
  281. package/dist/Link.native.js.map +1 -0
  282. package/dist/Logo.d.ts +25 -0
  283. package/dist/Logo.d.ts.map +1 -0
  284. package/dist/Logo.js +58 -0
  285. package/dist/Logo.js.map +1 -0
  286. package/dist/Logo.native.d.ts +22 -0
  287. package/dist/Logo.native.d.ts.map +1 -0
  288. package/dist/Logo.native.js +46 -0
  289. package/dist/Logo.native.js.map +1 -0
  290. package/dist/MainSidebar.d.ts +2 -0
  291. package/dist/MainSidebar.d.ts.map +1 -0
  292. package/dist/MainSidebar.js +3 -0
  293. package/dist/MainSidebar.js.map +1 -0
  294. package/dist/MainSidebar.native.d.ts +2 -0
  295. package/dist/MainSidebar.native.d.ts.map +1 -0
  296. package/dist/MainSidebar.native.js +2 -0
  297. package/dist/MainSidebar.native.js.map +1 -0
  298. package/dist/Menubar.d.ts +70 -0
  299. package/dist/Menubar.d.ts.map +1 -0
  300. package/dist/Menubar.js +142 -0
  301. package/dist/Menubar.js.map +1 -0
  302. package/dist/NavigationMenu.d.ts +12 -0
  303. package/dist/NavigationMenu.d.ts.map +1 -0
  304. package/dist/NavigationMenu.js +63 -0
  305. package/dist/NavigationMenu.js.map +1 -0
  306. package/dist/NavigationMenu.native.d.ts +44 -0
  307. package/dist/NavigationMenu.native.d.ts.map +1 -0
  308. package/dist/NavigationMenu.native.js +43 -0
  309. package/dist/NavigationMenu.native.js.map +1 -0
  310. package/dist/NotificationBadge.d.ts +33 -0
  311. package/dist/NotificationBadge.d.ts.map +1 -0
  312. package/dist/NotificationBadge.js +49 -0
  313. package/dist/NotificationBadge.js.map +1 -0
  314. package/dist/NotificationBadge.native.d.ts +25 -0
  315. package/dist/NotificationBadge.native.d.ts.map +1 -0
  316. package/dist/NotificationBadge.native.js +41 -0
  317. package/dist/NotificationBadge.native.js.map +1 -0
  318. package/dist/PageShell.d.ts +24 -0
  319. package/dist/PageShell.d.ts.map +1 -0
  320. package/dist/PageShell.js +24 -0
  321. package/dist/PageShell.js.map +1 -0
  322. package/dist/PageShell.native.d.ts +21 -0
  323. package/dist/PageShell.native.d.ts.map +1 -0
  324. package/dist/PageShell.native.js +19 -0
  325. package/dist/PageShell.native.js.map +1 -0
  326. package/dist/Pagination.d.ts +53 -0
  327. package/dist/Pagination.d.ts.map +1 -0
  328. package/dist/Pagination.js +79 -0
  329. package/dist/Pagination.js.map +1 -0
  330. package/dist/Pagination.native.d.ts +48 -0
  331. package/dist/Pagination.native.d.ts.map +1 -0
  332. package/dist/Pagination.native.js +55 -0
  333. package/dist/Pagination.native.js.map +1 -0
  334. package/dist/Popover.d.ts +57 -0
  335. package/dist/Popover.d.ts.map +1 -0
  336. package/dist/Popover.js +71 -0
  337. package/dist/Popover.js.map +1 -0
  338. package/dist/Popover.native.d.ts +48 -0
  339. package/dist/Popover.native.d.ts.map +1 -0
  340. package/dist/Popover.native.js +65 -0
  341. package/dist/Popover.native.js.map +1 -0
  342. package/dist/Popper.d.ts +54 -0
  343. package/dist/Popper.d.ts.map +1 -0
  344. package/dist/Popper.js +219 -0
  345. package/dist/Popper.js.map +1 -0
  346. package/dist/Progress.d.ts +79 -0
  347. package/dist/Progress.d.ts.map +1 -0
  348. package/dist/Progress.js +110 -0
  349. package/dist/Progress.js.map +1 -0
  350. package/dist/Progress.native.d.ts +42 -0
  351. package/dist/Progress.native.d.ts.map +1 -0
  352. package/dist/Progress.native.js +91 -0
  353. package/dist/Progress.native.js.map +1 -0
  354. package/dist/ProgressCircle.d.ts +69 -0
  355. package/dist/ProgressCircle.d.ts.map +1 -0
  356. package/dist/ProgressCircle.js +78 -0
  357. package/dist/ProgressCircle.js.map +1 -0
  358. package/dist/RadioCardGroup.d.ts +26 -0
  359. package/dist/RadioCardGroup.d.ts.map +1 -0
  360. package/dist/RadioCardGroup.js +26 -0
  361. package/dist/RadioCardGroup.js.map +1 -0
  362. package/dist/RadioGroup.d.ts +35 -0
  363. package/dist/RadioGroup.d.ts.map +1 -0
  364. package/dist/RadioGroup.js +68 -0
  365. package/dist/RadioGroup.js.map +1 -0
  366. package/dist/RadioGroup.native.d.ts +33 -0
  367. package/dist/RadioGroup.native.d.ts.map +1 -0
  368. package/dist/RadioGroup.native.js +55 -0
  369. package/dist/RadioGroup.native.js.map +1 -0
  370. package/dist/Resizable.d.ts +32 -0
  371. package/dist/Resizable.d.ts.map +1 -0
  372. package/dist/Resizable.js +31 -0
  373. package/dist/Resizable.js.map +1 -0
  374. package/dist/Resizable.native.d.ts +32 -0
  375. package/dist/Resizable.native.d.ts.map +1 -0
  376. package/dist/Resizable.native.js +23 -0
  377. package/dist/Resizable.native.js.map +1 -0
  378. package/dist/RichTextEditor.d.ts +38 -0
  379. package/dist/RichTextEditor.d.ts.map +1 -0
  380. package/dist/RichTextEditor.js +218 -0
  381. package/dist/RichTextEditor.js.map +1 -0
  382. package/dist/ScrollArea.d.ts +4 -0
  383. package/dist/ScrollArea.d.ts.map +1 -0
  384. package/dist/ScrollArea.js +26 -0
  385. package/dist/ScrollArea.js.map +1 -0
  386. package/dist/ScrollArea.native.d.ts +19 -0
  387. package/dist/ScrollArea.native.d.ts.map +1 -0
  388. package/dist/ScrollArea.native.js +19 -0
  389. package/dist/ScrollArea.native.js.map +1 -0
  390. package/dist/SearchField.d.ts +43 -0
  391. package/dist/SearchField.d.ts.map +1 -0
  392. package/dist/SearchField.js +34 -0
  393. package/dist/SearchField.js.map +1 -0
  394. package/dist/SearchField.native.d.ts +31 -0
  395. package/dist/SearchField.native.d.ts.map +1 -0
  396. package/dist/SearchField.native.js +30 -0
  397. package/dist/SearchField.native.js.map +1 -0
  398. package/dist/SectionHeader.d.ts +58 -0
  399. package/dist/SectionHeader.d.ts.map +1 -0
  400. package/dist/SectionHeader.js +95 -0
  401. package/dist/SectionHeader.js.map +1 -0
  402. package/dist/SectionHeader.native.d.ts +45 -0
  403. package/dist/SectionHeader.native.d.ts.map +1 -0
  404. package/dist/SectionHeader.native.js +92 -0
  405. package/dist/SectionHeader.native.js.map +1 -0
  406. package/dist/Select.d.ts +78 -0
  407. package/dist/Select.d.ts.map +1 -0
  408. package/dist/Select.js +310 -0
  409. package/dist/Select.js.map +1 -0
  410. package/dist/Select.native.d.ts +53 -0
  411. package/dist/Select.native.d.ts.map +1 -0
  412. package/dist/Select.native.js +86 -0
  413. package/dist/Select.native.js.map +1 -0
  414. package/dist/Separator.d.ts +20 -0
  415. package/dist/Separator.d.ts.map +1 -0
  416. package/dist/Separator.js +20 -0
  417. package/dist/Separator.js.map +1 -0
  418. package/dist/Separator.native.d.ts +8 -0
  419. package/dist/Separator.native.d.ts.map +1 -0
  420. package/dist/Separator.native.js +17 -0
  421. package/dist/Separator.native.js.map +1 -0
  422. package/dist/Sheet.d.ts +54 -0
  423. package/dist/Sheet.d.ts.map +1 -0
  424. package/dist/Sheet.js +191 -0
  425. package/dist/Sheet.js.map +1 -0
  426. package/dist/Sheet.native.d.ts +55 -0
  427. package/dist/Sheet.native.d.ts.map +1 -0
  428. package/dist/Sheet.native.js +112 -0
  429. package/dist/Sheet.native.js.map +1 -0
  430. package/dist/Sidebar.d.ts +131 -0
  431. package/dist/Sidebar.d.ts.map +1 -0
  432. package/dist/Sidebar.js +328 -0
  433. package/dist/Sidebar.js.map +1 -0
  434. package/dist/Skeleton.d.ts +14 -0
  435. package/dist/Skeleton.d.ts.map +1 -0
  436. package/dist/Skeleton.js +17 -0
  437. package/dist/Skeleton.js.map +1 -0
  438. package/dist/Skeleton.native.d.ts +6 -0
  439. package/dist/Skeleton.native.d.ts.map +1 -0
  440. package/dist/Skeleton.native.js +26 -0
  441. package/dist/Skeleton.native.js.map +1 -0
  442. package/dist/Slider.d.ts +63 -0
  443. package/dist/Slider.d.ts.map +1 -0
  444. package/dist/Slider.js +109 -0
  445. package/dist/Slider.js.map +1 -0
  446. package/dist/Slider.native.d.ts +38 -0
  447. package/dist/Slider.native.d.ts.map +1 -0
  448. package/dist/Slider.native.js +18 -0
  449. package/dist/Slider.native.js.map +1 -0
  450. package/dist/SortableList.d.ts +26 -0
  451. package/dist/SortableList.d.ts.map +1 -0
  452. package/dist/SortableList.js +44 -0
  453. package/dist/SortableList.js.map +1 -0
  454. package/dist/SparkChart.d.ts +34 -0
  455. package/dist/SparkChart.d.ts.map +1 -0
  456. package/dist/SparkChart.js +55 -0
  457. package/dist/SparkChart.js.map +1 -0
  458. package/dist/StatCard.d.ts +35 -0
  459. package/dist/StatCard.d.ts.map +1 -0
  460. package/dist/StatCard.js +37 -0
  461. package/dist/StatCard.js.map +1 -0
  462. package/dist/StatCard.native.d.ts +28 -0
  463. package/dist/StatCard.native.d.ts.map +1 -0
  464. package/dist/StatCard.native.js +31 -0
  465. package/dist/StatCard.native.js.map +1 -0
  466. package/dist/StatusBadge.d.ts +23 -0
  467. package/dist/StatusBadge.d.ts.map +1 -0
  468. package/dist/StatusBadge.js +33 -0
  469. package/dist/StatusBadge.js.map +1 -0
  470. package/dist/StatusBadge.native.d.ts +21 -0
  471. package/dist/StatusBadge.native.d.ts.map +1 -0
  472. package/dist/StatusBadge.native.js +37 -0
  473. package/dist/StatusBadge.native.js.map +1 -0
  474. package/dist/Switch.d.ts +31 -0
  475. package/dist/Switch.d.ts.map +1 -0
  476. package/dist/Switch.js +46 -0
  477. package/dist/Switch.js.map +1 -0
  478. package/dist/Switch.native.d.ts +16 -0
  479. package/dist/Switch.native.d.ts.map +1 -0
  480. package/dist/Switch.native.js +41 -0
  481. package/dist/Switch.native.js.map +1 -0
  482. package/dist/TabNavigation.d.ts +49 -0
  483. package/dist/TabNavigation.d.ts.map +1 -0
  484. package/dist/TabNavigation.js +121 -0
  485. package/dist/TabNavigation.js.map +1 -0
  486. package/dist/Table.d.ts +54 -0
  487. package/dist/Table.d.ts.map +1 -0
  488. package/dist/Table.js +96 -0
  489. package/dist/Table.js.map +1 -0
  490. package/dist/Table.native.d.ts +37 -0
  491. package/dist/Table.native.d.ts.map +1 -0
  492. package/dist/Table.native.js +37 -0
  493. package/dist/Table.native.js.map +1 -0
  494. package/dist/Tabs.d.ts +45 -0
  495. package/dist/Tabs.d.ts.map +1 -0
  496. package/dist/Tabs.js +94 -0
  497. package/dist/Tabs.js.map +1 -0
  498. package/dist/Tabs.native.d.ts +47 -0
  499. package/dist/Tabs.native.d.ts.map +1 -0
  500. package/dist/Tabs.native.js +57 -0
  501. package/dist/Tabs.native.js.map +1 -0
  502. package/dist/Tag.d.ts +24 -0
  503. package/dist/Tag.d.ts.map +1 -0
  504. package/dist/Tag.js +41 -0
  505. package/dist/Tag.js.map +1 -0
  506. package/dist/Tag.native.d.ts +23 -0
  507. package/dist/Tag.native.d.ts.map +1 -0
  508. package/dist/Tag.native.js +55 -0
  509. package/dist/Tag.native.js.map +1 -0
  510. package/dist/Text.d.ts +26 -0
  511. package/dist/Text.d.ts.map +1 -0
  512. package/dist/Text.js +63 -0
  513. package/dist/Text.js.map +1 -0
  514. package/dist/Text.native.d.ts +18 -0
  515. package/dist/Text.native.d.ts.map +1 -0
  516. package/dist/Text.native.js +58 -0
  517. package/dist/Text.native.js.map +1 -0
  518. package/dist/Textarea.d.ts +23 -0
  519. package/dist/Textarea.d.ts.map +1 -0
  520. package/dist/Textarea.js +39 -0
  521. package/dist/Textarea.js.map +1 -0
  522. package/dist/Textarea.native.d.ts +16 -0
  523. package/dist/Textarea.native.d.ts.map +1 -0
  524. package/dist/Textarea.native.js +30 -0
  525. package/dist/Textarea.native.js.map +1 -0
  526. package/dist/TiptapEditor.d.ts +24 -0
  527. package/dist/TiptapEditor.d.ts.map +1 -0
  528. package/dist/TiptapEditor.js +84 -0
  529. package/dist/TiptapEditor.js.map +1 -0
  530. package/dist/TitleBar.d.ts +31 -0
  531. package/dist/TitleBar.d.ts.map +1 -0
  532. package/dist/TitleBar.js +27 -0
  533. package/dist/TitleBar.js.map +1 -0
  534. package/dist/TitleBar.native.d.ts +19 -0
  535. package/dist/TitleBar.native.d.ts.map +1 -0
  536. package/dist/TitleBar.native.js +16 -0
  537. package/dist/TitleBar.native.js.map +1 -0
  538. package/dist/Toast.d.ts +72 -0
  539. package/dist/Toast.d.ts.map +1 -0
  540. package/dist/Toast.js +194 -0
  541. package/dist/Toast.js.map +1 -0
  542. package/dist/Toast.native.d.ts +65 -0
  543. package/dist/Toast.native.d.ts.map +1 -0
  544. package/dist/Toast.native.js +182 -0
  545. package/dist/Toast.native.js.map +1 -0
  546. package/dist/Toggle.d.ts +46 -0
  547. package/dist/Toggle.d.ts.map +1 -0
  548. package/dist/Toggle.js +70 -0
  549. package/dist/Toggle.js.map +1 -0
  550. package/dist/Toggle.native.d.ts +42 -0
  551. package/dist/Toggle.native.d.ts.map +1 -0
  552. package/dist/Toggle.native.js +56 -0
  553. package/dist/Toggle.native.js.map +1 -0
  554. package/dist/Tooltip.d.ts +32 -0
  555. package/dist/Tooltip.d.ts.map +1 -0
  556. package/dist/Tooltip.js +43 -0
  557. package/dist/Tooltip.js.map +1 -0
  558. package/dist/Tooltip.native.d.ts +25 -0
  559. package/dist/Tooltip.native.d.ts.map +1 -0
  560. package/dist/Tooltip.native.js +25 -0
  561. package/dist/Tooltip.native.js.map +1 -0
  562. package/dist/TopBar.d.ts +105 -0
  563. package/dist/TopBar.d.ts.map +1 -0
  564. package/dist/TopBar.js +90 -0
  565. package/dist/TopBar.js.map +1 -0
  566. package/dist/TopBar.native.d.ts +67 -0
  567. package/dist/TopBar.native.d.ts.map +1 -0
  568. package/dist/TopBar.native.js +41 -0
  569. package/dist/TopBar.native.js.map +1 -0
  570. package/dist/Tracker.d.ts +44 -0
  571. package/dist/Tracker.d.ts.map +1 -0
  572. package/dist/Tracker.js +92 -0
  573. package/dist/Tracker.js.map +1 -0
  574. package/dist/TransferList.d.ts +51 -0
  575. package/dist/TransferList.d.ts.map +1 -0
  576. package/dist/TransferList.js +107 -0
  577. package/dist/TransferList.js.map +1 -0
  578. package/dist/TransferList.native.d.ts +14 -0
  579. package/dist/TransferList.native.d.ts.map +1 -0
  580. package/dist/TransferList.native.js +57 -0
  581. package/dist/TransferList.native.js.map +1 -0
  582. package/dist/index.d.ts +78 -0
  583. package/dist/index.d.ts.map +1 -0
  584. package/dist/index.js +79 -0
  585. package/dist/index.js.map +1 -0
  586. package/dist/internal/cn.d.ts +7 -0
  587. package/dist/internal/cn.d.ts.map +1 -0
  588. package/dist/internal/cn.js +30 -0
  589. package/dist/internal/cn.js.map +1 -0
  590. package/package.json +499 -0
  591. package/src/AccessLevelGroup.native.tsx +103 -0
  592. package/src/AccessLevelGroup.tsx +103 -0
  593. package/src/Accordion.native.tsx +199 -0
  594. package/src/Accordion.tsx +279 -0
  595. package/src/Alert.native.tsx +100 -0
  596. package/src/Alert.tsx +101 -0
  597. package/src/AlertDialog.native.tsx +189 -0
  598. package/src/AlertDialog.tsx +194 -0
  599. package/src/AspectRatio.native.tsx +28 -0
  600. package/src/AspectRatio.tsx +35 -0
  601. package/src/Avatar.native.tsx +142 -0
  602. package/src/Avatar.tsx +155 -0
  603. package/src/AvatarGroup.native.tsx +81 -0
  604. package/src/AvatarGroup.tsx +114 -0
  605. package/src/Badge.native.tsx +85 -0
  606. package/src/Badge.tsx +93 -0
  607. package/src/Banner.native.tsx +77 -0
  608. package/src/Banner.tsx +95 -0
  609. package/src/BarList.tsx +102 -0
  610. package/src/Breadcrumb.native.tsx +238 -0
  611. package/src/Breadcrumb.tsx +258 -0
  612. package/src/Button.native.tsx +123 -0
  613. package/src/Button.tsx +153 -0
  614. package/src/Calendar.native.tsx +28 -0
  615. package/src/Calendar.tsx +211 -0
  616. package/src/Card.native.tsx +82 -0
  617. package/src/Card.tsx +94 -0
  618. package/src/Carousel.native.tsx +224 -0
  619. package/src/Carousel.tsx +292 -0
  620. package/src/CategoryBar.tsx +85 -0
  621. package/src/Chart.tsx +467 -0
  622. package/src/Checkbox.native.tsx +69 -0
  623. package/src/Checkbox.tsx +108 -0
  624. package/src/CheckboxGrid.native.tsx +160 -0
  625. package/src/CheckboxGrid.tsx +262 -0
  626. package/src/Collapsible.native.tsx +240 -0
  627. package/src/Collapsible.tsx +241 -0
  628. package/src/Combobox.native.tsx +171 -0
  629. package/src/Combobox.tsx +272 -0
  630. package/src/Command.native.tsx +71 -0
  631. package/src/Command.tsx +203 -0
  632. package/src/ContextMenu.native.tsx +313 -0
  633. package/src/ContextMenu.tsx +238 -0
  634. package/src/DataTable.native.tsx +70 -0
  635. package/src/DataTable.tsx +989 -0
  636. package/src/DatePicker.native.tsx +46 -0
  637. package/src/DatePicker.tsx +357 -0
  638. package/src/Dialog.native.tsx +181 -0
  639. package/src/Dialog.tsx +224 -0
  640. package/src/Drawer.native.tsx +134 -0
  641. package/src/Drawer.tsx +119 -0
  642. package/src/DropdownMenu.native.tsx +258 -0
  643. package/src/DropdownMenu.tsx +387 -0
  644. package/src/Dropzone.tsx +95 -0
  645. package/src/EmptyState.native.tsx +43 -0
  646. package/src/EmptyState.tsx +52 -0
  647. package/src/Form.native.tsx +94 -0
  648. package/src/Form.tsx +1324 -0
  649. package/src/HoverCard.native.tsx +63 -0
  650. package/src/HoverCard.tsx +181 -0
  651. package/src/IconSidebar.native.tsx +94 -0
  652. package/src/IconSidebar.tsx +448 -0
  653. package/src/Input.native.tsx +99 -0
  654. package/src/Input.tsx +132 -0
  655. package/src/InputOTP.native.tsx +154 -0
  656. package/src/InputOTP.tsx +119 -0
  657. package/src/Label.native.tsx +55 -0
  658. package/src/Label.tsx +60 -0
  659. package/src/Link.native.tsx +89 -0
  660. package/src/Link.tsx +85 -0
  661. package/src/Logo.native.tsx +114 -0
  662. package/src/Logo.tsx +153 -0
  663. package/src/MainSidebar.native.tsx +8 -0
  664. package/src/MainSidebar.tsx +10 -0
  665. package/src/Menubar.tsx +485 -0
  666. package/src/NavigationMenu.native.tsx +136 -0
  667. package/src/NavigationMenu.tsx +180 -0
  668. package/src/NotificationBadge.native.tsx +80 -0
  669. package/src/NotificationBadge.tsx +91 -0
  670. package/src/PageShell.native.tsx +43 -0
  671. package/src/PageShell.tsx +50 -0
  672. package/src/Pagination.native.tsx +217 -0
  673. package/src/Pagination.tsx +250 -0
  674. package/src/Popover.native.tsx +139 -0
  675. package/src/Popover.tsx +175 -0
  676. package/src/Popper.tsx +399 -0
  677. package/src/Progress.native.tsx +197 -0
  678. package/src/Progress.tsx +286 -0
  679. package/src/ProgressCircle.tsx +200 -0
  680. package/src/RadioCardGroup.tsx +97 -0
  681. package/src/RadioGroup.native.tsx +153 -0
  682. package/src/RadioGroup.tsx +201 -0
  683. package/src/Resizable.native.tsx +76 -0
  684. package/src/Resizable.tsx +88 -0
  685. package/src/RichTextEditor.tsx +513 -0
  686. package/src/ScrollArea.native.tsx +36 -0
  687. package/src/ScrollArea.tsx +62 -0
  688. package/src/SearchField.native.tsx +104 -0
  689. package/src/SearchField.tsx +136 -0
  690. package/src/SectionHeader.native.tsx +226 -0
  691. package/src/SectionHeader.tsx +250 -0
  692. package/src/Select.native.tsx +299 -0
  693. package/src/Select.tsx +710 -0
  694. package/src/Separator.native.tsx +38 -0
  695. package/src/Separator.tsx +43 -0
  696. package/src/Sheet.native.tsx +233 -0
  697. package/src/Sheet.tsx +329 -0
  698. package/src/Sidebar.tsx +956 -0
  699. package/src/Skeleton.native.tsx +47 -0
  700. package/src/Skeleton.tsx +29 -0
  701. package/src/Slider.native.tsx +64 -0
  702. package/src/Slider.tsx +284 -0
  703. package/src/SortableList.tsx +158 -0
  704. package/src/SparkChart.tsx +143 -0
  705. package/src/StatCard.native.tsx +64 -0
  706. package/src/StatCard.tsx +75 -0
  707. package/src/StatusBadge.native.tsx +57 -0
  708. package/src/StatusBadge.tsx +52 -0
  709. package/src/Switch.native.tsx +78 -0
  710. package/src/Switch.tsx +94 -0
  711. package/src/TabNavigation.tsx +329 -0
  712. package/src/Table.native.tsx +183 -0
  713. package/src/Table.tsx +260 -0
  714. package/src/Tabs.native.tsx +139 -0
  715. package/src/Tabs.tsx +216 -0
  716. package/src/Tag.native.tsx +87 -0
  717. package/src/Tag.tsx +93 -0
  718. package/src/Text.native.tsx +95 -0
  719. package/src/Text.tsx +93 -0
  720. package/src/Textarea.native.tsx +64 -0
  721. package/src/Textarea.tsx +66 -0
  722. package/src/TitleBar.native.tsx +46 -0
  723. package/src/TitleBar.tsx +64 -0
  724. package/src/Toast.native.tsx +366 -0
  725. package/src/Toast.tsx +408 -0
  726. package/src/Toggle.native.tsx +162 -0
  727. package/src/Toggle.tsx +169 -0
  728. package/src/Tooltip.native.tsx +62 -0
  729. package/src/Tooltip.tsx +88 -0
  730. package/src/TopBar.native.tsx +223 -0
  731. package/src/TopBar.tsx +436 -0
  732. package/src/Tracker.tsx +244 -0
  733. package/src/TransferList.native.tsx +180 -0
  734. package/src/TransferList.tsx +297 -0
  735. package/src/globals.d.ts +1 -0
  736. package/src/index.ts +502 -0
  737. package/src/internal/cn.ts +31 -0
package/src/Dialog.tsx ADDED
@@ -0,0 +1,224 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Dialog (web variant — React DOM).
5
+ *
6
+ * Accessible modal dialog built from a `<dialog>` element. Composable
7
+ * pieces mirror Card:
8
+ *
9
+ * <Dialog open={open} onOpenChange={setOpen}>
10
+ * <DialogContent>
11
+ * <DialogHeader>
12
+ * <DialogTitle>Edit profile</DialogTitle>
13
+ * <DialogDescription>Make changes…</DialogDescription>
14
+ * </DialogHeader>
15
+ * <DialogBody>…</DialogBody>
16
+ * <DialogFooter>
17
+ * <Button onClick={() => setOpen(false)}>Save</Button>
18
+ * </DialogFooter>
19
+ * </DialogContent>
20
+ * </Dialog>
21
+ *
22
+ * Controlled-only: pass `open` and `onOpenChange`.
23
+ *
24
+ * Wiki: docs/components/Dialog.md
25
+ */
26
+ import {
27
+ forwardRef,
28
+ useCallback,
29
+ useEffect,
30
+ useRef,
31
+ type HTMLAttributes,
32
+ type MouseEvent,
33
+ type ReactNode,
34
+ } from 'react';
35
+ import { cva, type VariantProps } from 'class-variance-authority';
36
+ import { cn } from './internal/cn.js';
37
+
38
+ /* ── Root ───────────────────────────────────────────────────────────── */
39
+
40
+ export interface DialogProps {
41
+ open: boolean;
42
+ onOpenChange: (open: boolean) => void;
43
+ children: ReactNode;
44
+ className?: string;
45
+ }
46
+
47
+ /**
48
+ * Root provider. Renders a native `<dialog>` and manages its
49
+ * `showModal()` / `close()` lifecycle.
50
+ */
51
+ export function Dialog({ open, onOpenChange, children, className }: DialogProps) {
52
+ const dialogRef = useRef<HTMLDialogElement>(null);
53
+
54
+ useEffect(() => {
55
+ const el = dialogRef.current;
56
+ if (!el) return;
57
+ if (open && !el.open) {
58
+ el.showModal();
59
+ } else if (!open && el.open) {
60
+ el.close();
61
+ }
62
+ }, [open]);
63
+
64
+ const handleCancel = useCallback(
65
+ (e: React.SyntheticEvent<HTMLDialogElement>) => {
66
+ e.preventDefault();
67
+ onOpenChange(false);
68
+ },
69
+ [onOpenChange],
70
+ );
71
+
72
+ const handleBackdropClick = useCallback(
73
+ (e: MouseEvent<HTMLDialogElement>) => {
74
+ if (e.target === dialogRef.current) {
75
+ onOpenChange(false);
76
+ }
77
+ },
78
+ [onOpenChange],
79
+ );
80
+
81
+ return (
82
+ <dialog
83
+ ref={dialogRef}
84
+ onCancel={handleCancel}
85
+ onClick={handleBackdropClick}
86
+ className={cn(
87
+ 'fixed inset-0 z-50 m-0 h-dvh w-dvw max-h-dvh max-w-none',
88
+ 'bg-transparent p-0',
89
+ 'backdrop:bg-black/50 backdrop:backdrop-blur-sm',
90
+ 'open:flex open:items-center open:justify-center',
91
+ className,
92
+ )}
93
+ >
94
+ {children}
95
+ </dialog>
96
+ );
97
+ }
98
+
99
+ /* ── Content panel ──────────────────────────────────────────────────── */
100
+
101
+ export const dialogContentVariants = cva(
102
+ 'relative mx-auto flex flex-col rounded-xl border border-border bg-card text-card-foreground shadow-lg ' +
103
+ 'animate-dialog-in',
104
+ {
105
+ variants: {
106
+ size: {
107
+ sm: 'w-full max-w-sm',
108
+ md: 'w-full max-w-lg',
109
+ lg: 'w-full max-w-2xl',
110
+ xl: 'w-full max-w-4xl',
111
+ full: 'w-[calc(100%-2rem)] max-w-none h-[calc(100%-2rem)]',
112
+ },
113
+ },
114
+ defaultVariants: { size: 'md' },
115
+ },
116
+ );
117
+
118
+ export interface DialogContentProps
119
+ extends HTMLAttributes<HTMLDivElement>,
120
+ VariantProps<typeof dialogContentVariants> {}
121
+
122
+ export const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(
123
+ function DialogContent({ className, size, ...props }, ref) {
124
+ return (
125
+ <div
126
+ ref={ref}
127
+ role="document"
128
+ className={cn(dialogContentVariants({ size }), className)}
129
+ {...props}
130
+ />
131
+ );
132
+ },
133
+ );
134
+
135
+ /* ── Close button ───────────────────────────────────────────────────── */
136
+
137
+ export interface DialogCloseProps extends HTMLAttributes<HTMLButtonElement> {
138
+ onClose?: () => void;
139
+ }
140
+
141
+ export const DialogClose = forwardRef<HTMLButtonElement, DialogCloseProps>(
142
+ function DialogClose({ className, onClose, ...props }, ref) {
143
+ return (
144
+ <button
145
+ ref={ref}
146
+ type="button"
147
+ aria-label="Close"
148
+ onClick={onClose}
149
+ className={cn(
150
+ 'absolute right-4 top-4 rounded-sm p-1 opacity-60 transition-opacity duration-150',
151
+ 'hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
152
+ className,
153
+ )}
154
+ {...props}
155
+ >
156
+ <svg aria-hidden viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth={2} className="h-4 w-4">
157
+ <path strokeLinecap="round" d="M4 12L12 4M4 4l8 8" />
158
+ </svg>
159
+ </button>
160
+ );
161
+ },
162
+ );
163
+
164
+ /* ── Layout helpers ─────────────────────────────────────────────────── */
165
+
166
+ export const DialogHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
167
+ function DialogHeader({ className, ...props }, ref) {
168
+ return (
169
+ <div
170
+ ref={ref}
171
+ className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}
172
+ {...props}
173
+ />
174
+ );
175
+ },
176
+ );
177
+
178
+ export const DialogBody = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
179
+ function DialogBody({ className, ...props }, ref) {
180
+ return (
181
+ <div
182
+ ref={ref}
183
+ className={cn('flex-1 overflow-y-auto p-6', className)}
184
+ {...props}
185
+ />
186
+ );
187
+ },
188
+ );
189
+
190
+ export const DialogFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
191
+ function DialogFooter({ className, ...props }, ref) {
192
+ return (
193
+ <div
194
+ ref={ref}
195
+ className={cn('flex items-center justify-end gap-2 p-6 pt-0', className)}
196
+ {...props}
197
+ />
198
+ );
199
+ },
200
+ );
201
+
202
+ export const DialogTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(
203
+ function DialogTitle({ className, ...props }, ref) {
204
+ return (
205
+ <h2
206
+ ref={ref}
207
+ className={cn('text-lg font-semibold leading-tight', className)}
208
+ {...props}
209
+ />
210
+ );
211
+ },
212
+ );
213
+
214
+ export const DialogDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
215
+ function DialogDescription({ className, ...props }, ref) {
216
+ return (
217
+ <p
218
+ ref={ref}
219
+ className={cn('text-sm text-muted-foreground', className)}
220
+ {...props}
221
+ />
222
+ );
223
+ },
224
+ );
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Drawer (React Native variant).
3
+ *
4
+ * A bottom-sheet style drawer using Modal + animated slide-up.
5
+ * Same composable API as the web variant.
6
+ *
7
+ * Wiki: docs/components/Drawer.md
8
+ */
9
+ import { forwardRef, type ReactNode } from 'react';
10
+ import {
11
+ Modal,
12
+ Pressable,
13
+ Text,
14
+ View,
15
+ type ViewProps,
16
+ type TextProps,
17
+ } from 'react-native';
18
+ import { cn } from './internal/cn.js';
19
+
20
+ type ClassedViewProps = Omit<ViewProps, 'style'> & { className?: string };
21
+ type ClassedTextProps = Omit<TextProps, 'style'> & { className?: string };
22
+
23
+ /* ── Root ──────────────────────────────────────────────────────────── */
24
+
25
+ export interface DrawerProps {
26
+ open?: boolean;
27
+ onOpenChange?: (open: boolean) => void;
28
+ children: ReactNode;
29
+ }
30
+
31
+ export function Drawer({ open, onOpenChange, children }: DrawerProps) {
32
+ return (
33
+ <Modal
34
+ visible={open}
35
+ transparent
36
+ animationType="slide"
37
+ onRequestClose={() => onOpenChange?.(false)}
38
+ statusBarTranslucent
39
+ >
40
+ <Pressable
41
+ onPress={() => onOpenChange?.(false)}
42
+ className="flex-1 justify-end bg-black/50"
43
+ accessibilityRole="none"
44
+ >
45
+ <Pressable onPress={(e) => e.stopPropagation()}>
46
+ {children}
47
+ </Pressable>
48
+ </Pressable>
49
+ </Modal>
50
+ );
51
+ }
52
+
53
+ /* ── Trigger (passthrough on native) ──────────────────────────────── */
54
+
55
+ export const DrawerTrigger = forwardRef<View, ClassedViewProps & { asChild?: boolean; children: ReactNode }>(
56
+ function DrawerTrigger({ className, children, ...props }, ref) {
57
+ return (
58
+ <View ref={ref} className={cn(className)} {...props}>
59
+ {children}
60
+ </View>
61
+ );
62
+ },
63
+ );
64
+
65
+ export const DrawerClose = DrawerTrigger;
66
+ export const DrawerPortal = ({ children }: { children: ReactNode }) => <>{children}</>;
67
+
68
+ /* ── Content ──────────────────────────────────────────────────────── */
69
+
70
+ export const DrawerContent = forwardRef<View, ClassedViewProps>(
71
+ function DrawerContent({ className, children, ...props }, ref) {
72
+ return (
73
+ <View
74
+ ref={ref}
75
+ className={cn(
76
+ 'rounded-t-2xl border border-border bg-card pb-8',
77
+ className,
78
+ )}
79
+ {...props}
80
+ >
81
+ {/* Drag handle */}
82
+ <View className="mx-auto mt-3 h-1.5 w-16 rounded-full bg-muted" />
83
+ {children}
84
+ </View>
85
+ );
86
+ },
87
+ );
88
+
89
+ /* ── Overlay ──────────────────────────────────────────────────────── */
90
+
91
+ export const DrawerOverlay = forwardRef<View, ClassedViewProps>(
92
+ function DrawerOverlay(props, ref) {
93
+ return <View ref={ref} {...props} />;
94
+ },
95
+ );
96
+
97
+ /* ── Layout helpers ───────────────────────────────────────────────── */
98
+
99
+ export const DrawerHeader = forwardRef<View, ClassedViewProps>(
100
+ function DrawerHeader({ className, ...props }, ref) {
101
+ return <View ref={ref} className={cn('gap-1.5 p-4', className)} {...props} />;
102
+ },
103
+ );
104
+
105
+ export const DrawerFooter = forwardRef<View, ClassedViewProps>(
106
+ function DrawerFooter({ className, ...props }, ref) {
107
+ return <View ref={ref} className={cn('gap-2 p-4', className)} {...props} />;
108
+ },
109
+ );
110
+
111
+ export const DrawerTitle = forwardRef<Text, ClassedTextProps>(
112
+ function DrawerTitle({ className, ...props }, ref) {
113
+ return (
114
+ <Text
115
+ ref={ref}
116
+ accessibilityRole="header"
117
+ className={cn('text-lg font-semibold text-foreground', className)}
118
+ {...props}
119
+ />
120
+ );
121
+ },
122
+ );
123
+
124
+ export const DrawerDescription = forwardRef<Text, ClassedTextProps>(
125
+ function DrawerDescription({ className, ...props }, ref) {
126
+ return (
127
+ <Text
128
+ ref={ref}
129
+ className={cn('text-sm text-muted-foreground', className)}
130
+ {...props}
131
+ />
132
+ );
133
+ },
134
+ );
package/src/Drawer.tsx ADDED
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Drawer (web variant — React DOM).
5
+ *
6
+ * A mobile-friendly bottom sheet / drawer powered by `vaul`.
7
+ *
8
+ * <Drawer open={open} onOpenChange={setOpen}>
9
+ * <DrawerTrigger asChild>
10
+ * <Button>Open</Button>
11
+ * </DrawerTrigger>
12
+ * <DrawerContent>
13
+ * <DrawerHeader>
14
+ * <DrawerTitle>Settings</DrawerTitle>
15
+ * <DrawerDescription>Adjust preferences.</DrawerDescription>
16
+ * </DrawerHeader>
17
+ * <div className="p-4">…body…</div>
18
+ * <DrawerFooter>
19
+ * <Button onClick={() => setOpen(false)}>Done</Button>
20
+ * </DrawerFooter>
21
+ * </DrawerContent>
22
+ * </Drawer>
23
+ *
24
+ * Wiki: docs/components/Drawer.md
25
+ */
26
+ import { type ComponentPropsWithoutRef } from 'react';
27
+ import { Drawer as DrawerPrimitive } from 'vaul';
28
+ import { cn } from './internal/cn.js';
29
+
30
+ /* ── Root + composable re-exports ─────────────────────────────────── */
31
+
32
+ export function Drawer({
33
+ shouldScaleBackground = true,
34
+ ...props
35
+ }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Root>) {
36
+ return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;
37
+ }
38
+
39
+ export const DrawerTrigger: typeof DrawerPrimitive.Trigger = DrawerPrimitive.Trigger;
40
+ export const DrawerPortal: typeof DrawerPrimitive.Portal = DrawerPrimitive.Portal;
41
+ export const DrawerClose: typeof DrawerPrimitive.Close = DrawerPrimitive.Close;
42
+
43
+ /* ── Overlay ──────────────────────────────────────────────────────── */
44
+
45
+ export function DrawerOverlay({
46
+ className,
47
+ ...props
48
+ }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>) {
49
+ return (
50
+ <DrawerPrimitive.Overlay
51
+ className={cn('fixed inset-0 z-50 bg-black/80 animate-in fade-in-0', className)}
52
+ {...props}
53
+ />
54
+ );
55
+ }
56
+
57
+ /* ── Content ──────────────────────────────────────────────────────── */
58
+
59
+ export function DrawerContent({
60
+ className,
61
+ children,
62
+ ...props
63
+ }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>) {
64
+ return (
65
+ <DrawerPortal>
66
+ <DrawerOverlay />
67
+ <DrawerPrimitive.Content
68
+ className={cn(
69
+ 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col',
70
+ 'rounded-t-xl border border-border bg-card',
71
+ className,
72
+ )}
73
+ {...props}
74
+ >
75
+ {/* Drag handle — visual affordance only, interaction handled by vaul */}
76
+ <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" aria-hidden="true" />
77
+ {children}
78
+ </DrawerPrimitive.Content>
79
+ </DrawerPortal>
80
+ );
81
+ }
82
+
83
+ /* ── Layout helpers ───────────────────────────────────────────────── */
84
+
85
+ export function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
86
+ return (
87
+ <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />
88
+ );
89
+ }
90
+
91
+ export function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
92
+ return (
93
+ <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />
94
+ );
95
+ }
96
+
97
+ export function DrawerTitle({
98
+ className,
99
+ ...props
100
+ }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>) {
101
+ return (
102
+ <DrawerPrimitive.Title
103
+ className={cn('text-lg font-semibold leading-none tracking-tight text-foreground', className)}
104
+ {...props}
105
+ />
106
+ );
107
+ }
108
+
109
+ export function DrawerDescription({
110
+ className,
111
+ ...props
112
+ }: ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>) {
113
+ return (
114
+ <DrawerPrimitive.Description
115
+ className={cn('text-sm text-muted-foreground', className)}
116
+ {...props}
117
+ />
118
+ );
119
+ }