@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
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Separator (React Native variant).
3
+ *
4
+ * A styled `<View>` with `accessibilityRole="none"` when decorative
5
+ * (the default) so screen readers skip it.
6
+ *
7
+ * Wiki: docs/components/Separator.md
8
+ */
9
+ import { forwardRef } from 'react';
10
+ import { View, type ViewProps } from 'react-native';
11
+ import { cn } from './internal/cn.js';
12
+
13
+ export interface SeparatorProps extends ViewProps {
14
+ orientation?: 'horizontal' | 'vertical';
15
+ decorative?: boolean;
16
+ className?: string;
17
+ }
18
+
19
+ export const Separator = forwardRef<View, SeparatorProps>(function Separator(
20
+ { className, orientation = 'horizontal', decorative = true, ...props },
21
+ ref,
22
+ ) {
23
+ const isHorizontal = orientation === 'horizontal';
24
+ return (
25
+ <View
26
+ ref={ref}
27
+ accessibilityRole={decorative ? 'none' : 'none'}
28
+ accessibilityElementsHidden={decorative}
29
+ importantForAccessibility={decorative ? 'no-hide-descendants' : 'auto'}
30
+ className={cn(
31
+ 'shrink-0 bg-border',
32
+ isHorizontal ? 'h-px w-full' : 'h-full w-px',
33
+ className,
34
+ )}
35
+ {...props}
36
+ />
37
+ );
38
+ });
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Separator (web variant — React DOM).
5
+ *
6
+ * A semantic divider. `decorative={true}` (the default) hides it from
7
+ * the accessibility tree because the surrounding visual layout already
8
+ * implies the boundary. Pass `decorative={false}` only when the rule
9
+ * separates two genuinely independent sections (e.g., between an
10
+ * article and a related-items panel) — then it gets `role="separator"`.
11
+ *
12
+ * Wiki: docs/components/Separator.md
13
+ */
14
+ import { forwardRef, type HTMLAttributes } from 'react';
15
+ import { cn } from './internal/cn.js';
16
+
17
+ export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
18
+ /** Defaults to `horizontal`. */
19
+ orientation?: 'horizontal' | 'vertical';
20
+ /** Hidden from a11y tree when true (default). */
21
+ decorative?: boolean;
22
+ }
23
+
24
+ export const Separator = forwardRef<HTMLDivElement, SeparatorProps>(function Separator(
25
+ { className, orientation = 'horizontal', decorative = true, ...props },
26
+ ref,
27
+ ) {
28
+ const isHorizontal = orientation === 'horizontal';
29
+ return (
30
+ <div
31
+ ref={ref}
32
+ role={decorative ? undefined : 'separator'}
33
+ aria-orientation={decorative ? undefined : orientation}
34
+ aria-hidden={decorative || undefined}
35
+ className={cn(
36
+ 'shrink-0 bg-border',
37
+ isHorizontal ? 'h-px w-full' : 'h-full w-px',
38
+ className,
39
+ )}
40
+ {...props}
41
+ />
42
+ );
43
+ });
@@ -0,0 +1,233 @@
1
+ /* eslint-disable react-hooks/refs, react-hooks/purity -- RN Animated API reads refs during render */
2
+ /**
3
+ * Sheet (React Native variant).
4
+ *
5
+ * Uses RN `<Modal>` with `Animated` for slide transitions. Same
6
+ * composable API as web:
7
+ *
8
+ * <Sheet open={open} onOpenChange={setOpen}>
9
+ * <SheetContent side="right">
10
+ * <SheetHeader>
11
+ * <SheetTitle>Settings</SheetTitle>
12
+ * <SheetDescription>Adjust your preferences.</SheetDescription>
13
+ * </SheetHeader>
14
+ * <SheetFooter>…</SheetFooter>
15
+ * </SheetContent>
16
+ * </Sheet>
17
+ *
18
+ * Wiki: docs/components/Sheet.md
19
+ */
20
+ import {
21
+ forwardRef,
22
+ useEffect,
23
+ useRef,
24
+ type ReactNode,
25
+ } from 'react';
26
+ import {
27
+ Animated,
28
+ Dimensions,
29
+ Modal,
30
+ Pressable,
31
+ Text,
32
+ View,
33
+ type TextProps,
34
+ type ViewProps,
35
+ } from 'react-native';
36
+ import { cva, type VariantProps } from 'class-variance-authority';
37
+ import { cn } from './internal/cn.js';
38
+
39
+ type ClassedViewProps = Omit<ViewProps, 'style'> & { className?: string };
40
+ type ClassedTextProps = Omit<TextProps, 'style'> & { className?: string };
41
+
42
+ /* ── Root ───────────────────────────────────────────────────────────── */
43
+
44
+ export interface SheetProps {
45
+ open: boolean;
46
+ onOpenChange: (open: boolean) => void;
47
+ children: ReactNode;
48
+ }
49
+
50
+ export function Sheet({ open, onOpenChange, children }: SheetProps) {
51
+ return (
52
+ <Modal
53
+ visible={open}
54
+ transparent
55
+ animationType="fade"
56
+ onRequestClose={() => onOpenChange(false)}
57
+ statusBarTranslucent
58
+ >
59
+ <Pressable
60
+ onPress={() => onOpenChange(false)}
61
+ className="flex-1 bg-black/50"
62
+ accessibilityRole="none"
63
+ >
64
+ <Pressable onPress={(e) => e.stopPropagation()} className="flex-1">
65
+ {children}
66
+ </Pressable>
67
+ </Pressable>
68
+ </Modal>
69
+ );
70
+ }
71
+
72
+ /* ── Content panel ──────────────────────────────────────────────────── */
73
+
74
+ export const sheetContentVariants = cva(
75
+ 'absolute border border-border bg-card',
76
+ {
77
+ variants: {
78
+ side: {
79
+ right: 'right-0 top-0 bottom-0 border-l',
80
+ left: 'left-0 top-0 bottom-0 border-r',
81
+ top: 'top-0 left-0 right-0 border-b',
82
+ bottom: 'bottom-0 left-0 right-0 border-t',
83
+ },
84
+ size: {
85
+ sm: '',
86
+ md: '',
87
+ lg: '',
88
+ xl: '',
89
+ full: '',
90
+ },
91
+ },
92
+ compoundVariants: [
93
+ { side: 'right', size: 'sm', className: 'w-72' },
94
+ { side: 'right', size: 'md', className: 'w-96' },
95
+ { side: 'right', size: 'lg', className: 'w-[480px]' },
96
+ { side: 'right', size: 'xl', className: 'w-[600px]' },
97
+ { side: 'right', size: 'full', className: 'w-full' },
98
+ { side: 'left', size: 'sm', className: 'w-72' },
99
+ { side: 'left', size: 'md', className: 'w-96' },
100
+ { side: 'left', size: 'lg', className: 'w-[480px]' },
101
+ { side: 'left', size: 'xl', className: 'w-[600px]' },
102
+ { side: 'left', size: 'full', className: 'w-full' },
103
+ { side: 'top', size: 'sm', className: 'h-48' },
104
+ { side: 'top', size: 'md', className: 'h-72' },
105
+ { side: 'top', size: 'lg', className: 'h-96' },
106
+ { side: 'top', size: 'xl', className: 'h-[480px]' },
107
+ { side: 'top', size: 'full', className: 'h-full' },
108
+ { side: 'bottom', size: 'sm', className: 'h-48' },
109
+ { side: 'bottom', size: 'md', className: 'h-72' },
110
+ { side: 'bottom', size: 'lg', className: 'h-96' },
111
+ { side: 'bottom', size: 'xl', className: 'h-[480px]' },
112
+ { side: 'bottom', size: 'full', className: 'h-full' },
113
+ ],
114
+ defaultVariants: { side: 'right', size: 'md' },
115
+ },
116
+ );
117
+
118
+ export interface SheetContentProps
119
+ extends ClassedViewProps,
120
+ VariantProps<typeof sheetContentVariants> {}
121
+
122
+ export const SheetContent = forwardRef<View, SheetContentProps>(
123
+ function SheetContent({ className, side, size, ...props }, ref) {
124
+ const { width, height } = Dimensions.get('window');
125
+ const slideAnim = useRef(new Animated.Value(1)).current;
126
+
127
+ useEffect(() => {
128
+ Animated.timing(slideAnim, {
129
+ toValue: 0,
130
+ duration: 250,
131
+ useNativeDriver: true,
132
+ }).start();
133
+ }, [slideAnim]);
134
+
135
+ const getTransform = () => {
136
+ const s = side ?? 'right';
137
+ switch (s) {
138
+ case 'right':
139
+ return { translateX: slideAnim.interpolate({ inputRange: [0, 1], outputRange: [0, width] }) };
140
+ case 'left':
141
+ return { translateX: slideAnim.interpolate({ inputRange: [0, 1], outputRange: [0, -width] }) };
142
+ case 'top':
143
+ return { translateY: slideAnim.interpolate({ inputRange: [0, 1], outputRange: [0, -height] }) };
144
+ case 'bottom':
145
+ return { translateY: slideAnim.interpolate({ inputRange: [0, 1], outputRange: [0, height] }) };
146
+ default:
147
+ return { translateX: slideAnim.interpolate({ inputRange: [0, 1], outputRange: [0, width] }) };
148
+ }
149
+ };
150
+
151
+ return (
152
+ <Animated.View
153
+ style={{ transform: [getTransform()] }}
154
+ >
155
+ <View
156
+ ref={ref}
157
+ className={cn(sheetContentVariants({ side, size }), className)}
158
+ {...props}
159
+ />
160
+ </Animated.View>
161
+ );
162
+ },
163
+ );
164
+
165
+ /* ── Close button ──────────────────────────────────────────────────── */
166
+
167
+ export interface SheetCloseProps extends ClassedViewProps {
168
+ onClose?: () => void;
169
+ }
170
+
171
+ export const SheetClose = forwardRef<View, SheetCloseProps>(
172
+ function SheetClose({ className, onClose, ...props }, ref) {
173
+ return (
174
+ <Pressable
175
+ ref={ref as never}
176
+ onPress={onClose}
177
+ accessibilityRole="button"
178
+ accessibilityLabel="Close"
179
+ className={cn('absolute right-4 top-4 p-1 opacity-60', className)}
180
+ {...props}
181
+ >
182
+ <Text className="text-foreground text-base">✕</Text>
183
+ </Pressable>
184
+ );
185
+ },
186
+ );
187
+
188
+ /* ── Layout helpers ─────────────────────────────────────────────────── */
189
+
190
+ export const SheetHeader = forwardRef<View, ClassedViewProps>(
191
+ function SheetHeader({ className, ...props }, ref) {
192
+ return (
193
+ <View ref={ref} className={cn('gap-1.5 p-6 pb-0', className)} {...props} />
194
+ );
195
+ },
196
+ );
197
+
198
+ export const SheetFooter = forwardRef<View, ClassedViewProps>(
199
+ function SheetFooter({ className, ...props }, ref) {
200
+ return (
201
+ <View
202
+ ref={ref}
203
+ className={cn('flex-row items-center justify-end gap-2 p-6 pt-0', className)}
204
+ {...props}
205
+ />
206
+ );
207
+ },
208
+ );
209
+
210
+ export const SheetTitle = forwardRef<Text, ClassedTextProps>(
211
+ function SheetTitle({ className, ...props }, ref) {
212
+ return (
213
+ <Text
214
+ ref={ref}
215
+ accessibilityRole="header"
216
+ className={cn('text-lg font-semibold leading-tight text-foreground', className)}
217
+ {...props}
218
+ />
219
+ );
220
+ },
221
+ );
222
+
223
+ export const SheetDescription = forwardRef<Text, ClassedTextProps>(
224
+ function SheetDescription({ className, ...props }, ref) {
225
+ return (
226
+ <Text
227
+ ref={ref}
228
+ className={cn('text-sm text-muted-foreground', className)}
229
+ {...props}
230
+ />
231
+ );
232
+ },
233
+ );
package/src/Sheet.tsx ADDED
@@ -0,0 +1,329 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * Sheet (web variant — React DOM).
5
+ *
6
+ * A slide-out panel from a screen edge, extending the Dialog pattern.
7
+ * Composable sub-components:
8
+ *
9
+ * <Sheet open={open} onOpenChange={setOpen}>
10
+ * <SheetContent side="right">
11
+ * <SheetHeader>
12
+ * <SheetTitle>Settings</SheetTitle>
13
+ * <SheetDescription>Adjust your preferences.</SheetDescription>
14
+ * </SheetHeader>
15
+ * ... body content ...
16
+ * <SheetFooter>
17
+ * <Button onClick={() => setOpen(false)}>Done</Button>
18
+ * </SheetFooter>
19
+ * </SheetContent>
20
+ * </Sheet>
21
+ *
22
+ * Controlled-only: pass `open` and `onOpenChange`.
23
+ * Dismisses on backdrop click and Escape (unlike AlertDialog).
24
+ *
25
+ * Wiki: docs/components/Sheet.md
26
+ */
27
+ import {
28
+ createContext,
29
+ forwardRef,
30
+ useContext,
31
+ useCallback,
32
+ useEffect,
33
+ useLayoutEffect,
34
+ useRef,
35
+ useState,
36
+ type HTMLAttributes,
37
+ type MouseEvent,
38
+ type ReactNode,
39
+ } from 'react';
40
+ import { cva, type VariantProps } from 'class-variance-authority';
41
+ import { cn } from './internal/cn.js';
42
+
43
+ type SheetState = 'open' | 'closed';
44
+
45
+ const SHEET_MOTION_MS = 500;
46
+
47
+ const SheetStateContext = createContext<SheetState>('closed');
48
+ const useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect;
49
+
50
+ function requestSheetFrame(callback: FrameRequestCallback) {
51
+ if (typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function') {
52
+ return window.requestAnimationFrame(callback);
53
+ }
54
+ return setTimeout(() => callback(typeof performance === 'undefined' ? Date.now() : performance.now()), 16) as unknown as number;
55
+ }
56
+
57
+ function cancelSheetFrame(id: number) {
58
+ if (typeof window !== 'undefined' && typeof window.cancelAnimationFrame === 'function') {
59
+ window.cancelAnimationFrame(id);
60
+ return;
61
+ }
62
+ clearTimeout(id);
63
+ }
64
+
65
+ /* ── Root ───────────────────────────────────────────────────────────── */
66
+
67
+ export interface SheetProps {
68
+ open: boolean;
69
+ onOpenChange: (open: boolean) => void;
70
+ children: ReactNode;
71
+ className?: string;
72
+ }
73
+
74
+ /**
75
+ * Root provider. Renders a native `<dialog>` and manages its
76
+ * `showModal()` / `close()` lifecycle. Dismisses on backdrop click
77
+ * and Escape key.
78
+ */
79
+ export function Sheet({ open, onOpenChange, children, className }: SheetProps) {
80
+ const dialogRef = useRef<HTMLDialogElement>(null);
81
+ const closeTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
82
+ const animationFrameRef = useRef<number | null>(null);
83
+ const [state, setState] = useState<SheetState>(open ? 'open' : 'closed');
84
+
85
+ useIsomorphicLayoutEffect(() => {
86
+ const el = dialogRef.current;
87
+ if (!el) return;
88
+
89
+ if (closeTimerRef.current) {
90
+ clearTimeout(closeTimerRef.current);
91
+ closeTimerRef.current = null;
92
+ }
93
+ if (animationFrameRef.current !== null) {
94
+ cancelSheetFrame(animationFrameRef.current);
95
+ animationFrameRef.current = null;
96
+ }
97
+
98
+ if (open && !el.open) {
99
+ setState('closed');
100
+ el.showModal();
101
+ animationFrameRef.current = requestSheetFrame(() => {
102
+ animationFrameRef.current = null;
103
+ setState('open');
104
+ });
105
+ } else if (open) {
106
+ setState('open');
107
+ } else if (!open && el.open) {
108
+ setState('closed');
109
+ closeTimerRef.current = setTimeout(() => {
110
+ if (el.open) el.close();
111
+ }, SHEET_MOTION_MS);
112
+ } else {
113
+ setState('closed');
114
+ }
115
+
116
+ return () => {
117
+ if (animationFrameRef.current !== null) {
118
+ cancelSheetFrame(animationFrameRef.current);
119
+ animationFrameRef.current = null;
120
+ }
121
+ if (closeTimerRef.current) {
122
+ clearTimeout(closeTimerRef.current);
123
+ closeTimerRef.current = null;
124
+ }
125
+ };
126
+ }, [open]);
127
+
128
+ const handleCancel = useCallback(
129
+ (e: React.SyntheticEvent<HTMLDialogElement>) => {
130
+ e.preventDefault();
131
+ onOpenChange(false);
132
+ },
133
+ [onOpenChange],
134
+ );
135
+
136
+ const handleBackdropClick = useCallback(
137
+ (e: MouseEvent<HTMLDialogElement>) => {
138
+ if (e.target === dialogRef.current) {
139
+ onOpenChange(false);
140
+ }
141
+ },
142
+ [onOpenChange],
143
+ );
144
+
145
+ return (
146
+ <dialog
147
+ ref={dialogRef}
148
+ onCancel={handleCancel}
149
+ onClick={handleBackdropClick}
150
+ data-state={state}
151
+ className={cn(
152
+ 'fixed inset-0 z-50 m-0 h-dvh w-dvw max-h-dvh max-w-none',
153
+ 'bg-transparent p-0',
154
+ 'backdrop:bg-black/50 backdrop:backdrop-blur-sm',
155
+ 'opacity-0 transition-opacity duration-[500ms] ease-[cubic-bezier(0.32,0.72,0,1)]',
156
+ 'data-[state=open]:opacity-100 data-[state=closed]:opacity-0',
157
+ className,
158
+ )}
159
+ >
160
+ <SheetStateContext.Provider value={state}>
161
+ {children}
162
+ </SheetStateContext.Provider>
163
+ </dialog>
164
+ );
165
+ }
166
+
167
+ /* ── Content panel ──────────────────────────────────────────────────── */
168
+
169
+ export const sheetContentVariants = cva(
170
+ [
171
+ 'fixed flex flex-col border border-border bg-card text-card-foreground shadow-lg',
172
+ 'will-change-transform transform-gpu transition-transform duration-[500ms] ease-[cubic-bezier(0.32,0.72,0,1)]',
173
+ 'motion-reduce:transition-none',
174
+ ].join(' '),
175
+ {
176
+ variants: {
177
+ side: {
178
+ right: [
179
+ 'inset-y-0 right-0 h-full border-l',
180
+ 'data-[state=open]:translate-x-0 data-[state=closed]:translate-x-full',
181
+ ].join(' '),
182
+ left: [
183
+ 'inset-y-0 left-0 h-full border-r',
184
+ 'data-[state=open]:translate-x-0 data-[state=closed]:-translate-x-full',
185
+ ].join(' '),
186
+ top: [
187
+ 'inset-x-0 top-0 w-full border-b',
188
+ 'data-[state=open]:translate-y-0 data-[state=closed]:-translate-y-full',
189
+ ].join(' '),
190
+ bottom: [
191
+ 'inset-x-0 bottom-0 w-full border-t',
192
+ 'data-[state=open]:translate-y-0 data-[state=closed]:translate-y-full',
193
+ ].join(' '),
194
+ },
195
+ size: {
196
+ sm: '',
197
+ md: '',
198
+ lg: '',
199
+ xl: '',
200
+ full: '',
201
+ },
202
+ },
203
+ compoundVariants: [
204
+ /* Horizontal sheets (left/right) — size controls width */
205
+ { side: 'right', size: 'sm', className: 'w-72' },
206
+ { side: 'right', size: 'md', className: 'w-96' },
207
+ { side: 'right', size: 'lg', className: 'w-[32rem]' },
208
+ { side: 'right', size: 'xl', className: 'w-[48rem]' },
209
+ { side: 'right', size: 'full', className: 'w-dvw' },
210
+ { side: 'left', size: 'sm', className: 'w-72' },
211
+ { side: 'left', size: 'md', className: 'w-96' },
212
+ { side: 'left', size: 'lg', className: 'w-[32rem]' },
213
+ { side: 'left', size: 'xl', className: 'w-[48rem]' },
214
+ { side: 'left', size: 'full', className: 'w-dvw' },
215
+ /* Vertical sheets (top/bottom) — size controls height */
216
+ { side: 'top', size: 'sm', className: 'h-48' },
217
+ { side: 'top', size: 'md', className: 'h-72' },
218
+ { side: 'top', size: 'lg', className: 'h-96' },
219
+ { side: 'top', size: 'xl', className: 'h-[32rem]' },
220
+ { side: 'top', size: 'full', className: 'h-dvh' },
221
+ { side: 'bottom', size: 'sm', className: 'h-48' },
222
+ { side: 'bottom', size: 'md', className: 'h-72' },
223
+ { side: 'bottom', size: 'lg', className: 'h-96' },
224
+ { side: 'bottom', size: 'xl', className: 'h-[32rem]' },
225
+ { side: 'bottom', size: 'full', className: 'h-dvh' },
226
+ ],
227
+ defaultVariants: { side: 'right', size: 'md' },
228
+ },
229
+ );
230
+
231
+ export interface SheetContentProps
232
+ extends HTMLAttributes<HTMLDivElement>,
233
+ VariantProps<typeof sheetContentVariants> {}
234
+
235
+ export const SheetContent = forwardRef<HTMLDivElement, SheetContentProps>(
236
+ function SheetContent({ className, side, size, ...props }, ref) {
237
+ const state = useContext(SheetStateContext);
238
+ const resolvedSide = side ?? 'right';
239
+ return (
240
+ <div
241
+ ref={ref}
242
+ role="document"
243
+ data-state={state}
244
+ data-side={resolvedSide}
245
+ className={cn(sheetContentVariants({ side: resolvedSide, size }), className)}
246
+ {...props}
247
+ />
248
+ );
249
+ },
250
+ );
251
+
252
+ /* ── Close button ──────────────────────────────────────────────────── */
253
+
254
+ export interface SheetCloseProps extends HTMLAttributes<HTMLButtonElement> {
255
+ onClose?: () => void;
256
+ }
257
+
258
+ export const SheetClose = forwardRef<HTMLButtonElement, SheetCloseProps>(
259
+ function SheetClose({ className, onClose, ...props }, ref) {
260
+ return (
261
+ <button
262
+ ref={ref}
263
+ type="button"
264
+ aria-label="Close"
265
+ onClick={onClose}
266
+ className={cn(
267
+ 'absolute right-4 top-4 rounded-sm p-1 opacity-60 transition-opacity duration-150',
268
+ 'hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
269
+ className,
270
+ )}
271
+ {...props}
272
+ >
273
+ <svg aria-hidden viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth={2} className="h-4 w-4">
274
+ <path strokeLinecap="round" d="M4 12L12 4M4 4l8 8" />
275
+ </svg>
276
+ </button>
277
+ );
278
+ },
279
+ );
280
+
281
+ /* ── Layout helpers ─────────────────────────────────────────────────── */
282
+
283
+ export const SheetHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
284
+ function SheetHeader({ className, ...props }, ref) {
285
+ return (
286
+ <div
287
+ ref={ref}
288
+ className={cn('flex flex-col gap-1.5 p-6 pb-0', className)}
289
+ {...props}
290
+ />
291
+ );
292
+ },
293
+ );
294
+
295
+ export const SheetFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
296
+ function SheetFooter({ className, ...props }, ref) {
297
+ return (
298
+ <div
299
+ ref={ref}
300
+ className={cn('flex items-center justify-end gap-2 p-6 pt-0', className)}
301
+ {...props}
302
+ />
303
+ );
304
+ },
305
+ );
306
+
307
+ export const SheetTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(
308
+ function SheetTitle({ className, ...props }, ref) {
309
+ return (
310
+ <h2
311
+ ref={ref}
312
+ className={cn('text-lg font-semibold leading-tight', className)}
313
+ {...props}
314
+ />
315
+ );
316
+ },
317
+ );
318
+
319
+ export const SheetDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
320
+ function SheetDescription({ className, ...props }, ref) {
321
+ return (
322
+ <p
323
+ ref={ref}
324
+ className={cn('text-sm text-muted-foreground', className)}
325
+ {...props}
326
+ />
327
+ );
328
+ },
329
+ );