@bodhan-ai/react 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/LICENSE +5 -0
  2. package/README.md +73 -2
  3. package/dist/components/Accordion/Accordion.d.ts +56 -0
  4. package/dist/components/Accordion/Accordion.js +91 -0
  5. package/dist/components/Accordion/Accordion.js.map +1 -0
  6. package/dist/components/Account/Account.d.ts +20 -0
  7. package/dist/components/Account/Account.js +39 -0
  8. package/dist/components/Account/Account.js.map +1 -0
  9. package/dist/components/ActionSheet/ActionSheet.d.ts +36 -0
  10. package/dist/components/ActionSheet/ActionSheet.js +93 -0
  11. package/dist/components/ActionSheet/ActionSheet.js.map +1 -0
  12. package/dist/components/ActivityPill/ActivityPill.d.ts +27 -0
  13. package/dist/components/ActivityPill/ActivityPill.js +75 -0
  14. package/dist/components/ActivityPill/ActivityPill.js.map +1 -0
  15. package/dist/components/AgentStatus/AgentStatus.d.ts +23 -0
  16. package/dist/components/AgentStatus/AgentStatus.js +83 -0
  17. package/dist/components/AgentStatus/AgentStatus.js.map +1 -0
  18. package/dist/components/AgentTask/AgentTask.d.ts +41 -0
  19. package/dist/components/AgentTask/AgentTask.js +159 -0
  20. package/dist/components/AgentTask/AgentTask.js.map +1 -0
  21. package/dist/components/Alert/Alert.d.ts +34 -0
  22. package/dist/components/Alert/Alert.js +83 -0
  23. package/dist/components/Alert/Alert.js.map +1 -0
  24. package/dist/components/AnswerOption/AnswerOption.d.ts +26 -0
  25. package/dist/components/AnswerOption/AnswerOption.js +57 -0
  26. package/dist/components/AnswerOption/AnswerOption.js.map +1 -0
  27. package/dist/components/AudioPlayer/AudioPlayer.d.ts +39 -0
  28. package/dist/components/AudioPlayer/AudioPlayer.js +172 -0
  29. package/dist/components/AudioPlayer/AudioPlayer.js.map +1 -0
  30. package/dist/components/Avatar/Avatar.d.ts +34 -0
  31. package/dist/components/Avatar/Avatar.js +133 -0
  32. package/dist/components/Avatar/Avatar.js.map +1 -0
  33. package/dist/components/AvatarGroup/AvatarGroup.d.ts +24 -0
  34. package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
  35. package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -0
  36. package/dist/components/Badge/Badge.d.ts +22 -0
  37. package/dist/components/Badge/Badge.js +23 -0
  38. package/dist/components/Badge/Badge.js.map +1 -0
  39. package/dist/components/Banner/Banner.d.ts +36 -0
  40. package/dist/components/Banner/Banner.js +81 -0
  41. package/dist/components/Banner/Banner.js.map +1 -0
  42. package/dist/components/BarChart/BarChart.d.ts +42 -0
  43. package/dist/components/BarChart/BarChart.js +221 -0
  44. package/dist/components/BarChart/BarChart.js.map +1 -0
  45. package/dist/components/BodhanLogo/BodhanLogo.d.ts +17 -0
  46. package/dist/components/BodhanLogo/BodhanLogo.js +32 -0
  47. package/dist/components/BodhanLogo/BodhanLogo.js.map +1 -0
  48. package/dist/components/BodhanLogo/logos.d.ts +5 -0
  49. package/dist/components/BodhanLogo/logos.js +31 -0
  50. package/dist/components/BodhanLogo/logos.js.map +1 -0
  51. package/dist/components/BottomAppBar/BottomAppBar.d.ts +33 -0
  52. package/dist/components/BottomAppBar/BottomAppBar.js +86 -0
  53. package/dist/components/BottomAppBar/BottomAppBar.js.map +1 -0
  54. package/dist/components/BottomSheet/BottomSheet.d.ts +66 -0
  55. package/dist/components/BottomSheet/BottomSheet.js +165 -0
  56. package/dist/components/BottomSheet/BottomSheet.js.map +1 -0
  57. package/dist/components/Breadcrumb/Breadcrumb.d.ts +47 -0
  58. package/dist/components/Breadcrumb/Breadcrumb.js +102 -0
  59. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  60. package/dist/components/Button/Button.d.ts +30 -0
  61. package/dist/components/Button/Button.js +40 -0
  62. package/dist/components/Button/Button.js.map +1 -0
  63. package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
  64. package/dist/components/ButtonGroup/ButtonGroup.js +47 -0
  65. package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -0
  66. package/dist/components/Calendar/Calendar.d.ts +111 -0
  67. package/dist/components/Calendar/Calendar.js +338 -0
  68. package/dist/components/Calendar/Calendar.js.map +1 -0
  69. package/dist/components/CameraCapture/CameraCapture.d.ts +22 -0
  70. package/dist/components/CameraCapture/CameraCapture.js +155 -0
  71. package/dist/components/CameraCapture/CameraCapture.js.map +1 -0
  72. package/dist/components/Card/Card.d.ts +50 -0
  73. package/dist/components/Card/Card.js +120 -0
  74. package/dist/components/Card/Card.js.map +1 -0
  75. package/dist/components/Carousel/Carousel.d.ts +51 -0
  76. package/dist/components/Carousel/Carousel.js +152 -0
  77. package/dist/components/Carousel/Carousel.js.map +1 -0
  78. package/dist/components/Celebration/Celebration.d.ts +23 -0
  79. package/dist/components/Celebration/Celebration.js +93 -0
  80. package/dist/components/Celebration/Celebration.js.map +1 -0
  81. package/dist/components/ChartStatus/ChartStatus.d.ts +54 -0
  82. package/dist/components/ChartStatus/ChartStatus.js +144 -0
  83. package/dist/components/ChartStatus/ChartStatus.js.map +1 -0
  84. package/dist/components/ChatArtifact/ChatArtifact.d.ts +23 -0
  85. package/dist/components/ChatArtifact/ChatArtifact.js +91 -0
  86. package/dist/components/ChatArtifact/ChatArtifact.js.map +1 -0
  87. package/dist/components/ChatBubble/ChatBubble.d.ts +26 -0
  88. package/dist/components/ChatBubble/ChatBubble.js +57 -0
  89. package/dist/components/ChatBubble/ChatBubble.js.map +1 -0
  90. package/dist/components/ChatContent/ChatContent.d.ts +23 -0
  91. package/dist/components/ChatContent/ChatContent.js +333 -0
  92. package/dist/components/ChatContent/ChatContent.js.map +1 -0
  93. package/dist/components/Checkbox/Checkbox.d.ts +29 -0
  94. package/dist/components/Checkbox/Checkbox.js +58 -0
  95. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  96. package/dist/components/Chip/Chip.d.ts +28 -0
  97. package/dist/components/Chip/Chip.js +48 -0
  98. package/dist/components/Chip/Chip.js.map +1 -0
  99. package/dist/components/CircularLoader/CircularLoader.d.ts +12 -0
  100. package/dist/components/CircularLoader/CircularLoader.js +36 -0
  101. package/dist/components/CircularLoader/CircularLoader.js.map +1 -0
  102. package/dist/components/ColorSwatch/ColorSwatch.d.ts +14 -0
  103. package/dist/components/ColorSwatch/ColorSwatch.js +30 -0
  104. package/dist/components/ColorSwatch/ColorSwatch.js.map +1 -0
  105. package/dist/components/Combobox/Combobox.d.ts +40 -0
  106. package/dist/components/Combobox/Combobox.js +167 -0
  107. package/dist/components/Combobox/Combobox.js.map +1 -0
  108. package/dist/components/CommandPalette/CommandPalette.d.ts +48 -0
  109. package/dist/components/CommandPalette/CommandPalette.js +235 -0
  110. package/dist/components/CommandPalette/CommandPalette.js.map +1 -0
  111. package/dist/components/ContextMenu/ContextMenu.d.ts +31 -0
  112. package/dist/components/ContextMenu/ContextMenu.js +138 -0
  113. package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
  114. package/dist/components/DateField/DateField.d.ts +28 -0
  115. package/dist/components/DateField/DateField.js +134 -0
  116. package/dist/components/DateField/DateField.js.map +1 -0
  117. package/dist/components/DigitField/DigitField.d.ts +16 -0
  118. package/dist/components/DigitField/DigitField.js +27 -0
  119. package/dist/components/DigitField/DigitField.js.map +1 -0
  120. package/dist/components/Divider/Divider.d.ts +19 -0
  121. package/dist/components/Divider/Divider.js +22 -0
  122. package/dist/components/Divider/Divider.js.map +1 -0
  123. package/dist/components/DottedLoader/DottedLoader.d.ts +15 -0
  124. package/dist/components/DottedLoader/DottedLoader.js +36 -0
  125. package/dist/components/DottedLoader/DottedLoader.js.map +1 -0
  126. package/dist/components/DoughnutChart/DoughnutChart.d.ts +16 -0
  127. package/dist/components/DoughnutChart/DoughnutChart.js +31 -0
  128. package/dist/components/DoughnutChart/DoughnutChart.js.map +1 -0
  129. package/dist/components/Drawer/Drawer.d.ts +39 -0
  130. package/dist/components/Drawer/Drawer.js +109 -0
  131. package/dist/components/Drawer/Drawer.js.map +1 -0
  132. package/dist/components/DropdownMenu/DropdownMenu.d.ts +79 -0
  133. package/dist/components/DropdownMenu/DropdownMenu.js +262 -0
  134. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  135. package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.d.ts +46 -0
  136. package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.js +75 -0
  137. package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.js.map +1 -0
  138. package/dist/components/EmptyState/EmptyState.d.ts +34 -0
  139. package/dist/components/EmptyState/EmptyState.js +53 -0
  140. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  141. package/dist/components/FAB/FAB.d.ts +19 -0
  142. package/dist/components/FAB/FAB.js +27 -0
  143. package/dist/components/FAB/FAB.js.map +1 -0
  144. package/dist/components/FABMenu/FABMenu.d.ts +25 -0
  145. package/dist/components/FABMenu/FABMenu.js +95 -0
  146. package/dist/components/FABMenu/FABMenu.js.map +1 -0
  147. package/dist/components/FeedbackReasons/FeedbackReasons.d.ts +19 -0
  148. package/dist/components/FeedbackReasons/FeedbackReasons.js +62 -0
  149. package/dist/components/FeedbackReasons/FeedbackReasons.js.map +1 -0
  150. package/dist/components/FileUpload/FileUpload.d.ts +88 -0
  151. package/dist/components/FileUpload/FileUpload.js +199 -0
  152. package/dist/components/FileUpload/FileUpload.js.map +1 -0
  153. package/dist/components/FlashcardStack/FlashcardStack.d.ts +37 -0
  154. package/dist/components/FlashcardStack/FlashcardStack.js +237 -0
  155. package/dist/components/FlashcardStack/FlashcardStack.js.map +1 -0
  156. package/dist/components/HandoffCard/HandoffCard.d.ts +25 -0
  157. package/dist/components/HandoffCard/HandoffCard.js +80 -0
  158. package/dist/components/HandoffCard/HandoffCard.js.map +1 -0
  159. package/dist/components/HomeIndicator/HomeIndicator.d.ts +12 -0
  160. package/dist/components/HomeIndicator/HomeIndicator.js +20 -0
  161. package/dist/components/HomeIndicator/HomeIndicator.js.map +1 -0
  162. package/dist/components/Icon/Icon.d.ts +15 -0
  163. package/dist/components/Icon/Icon.js +24 -0
  164. package/dist/components/Icon/Icon.js.map +1 -0
  165. package/dist/components/IconButton/IconButton.d.ts +29 -0
  166. package/dist/components/IconButton/IconButton.js +33 -0
  167. package/dist/components/IconButton/IconButton.js.map +1 -0
  168. package/dist/components/Illustration/Illustration.d.ts +22 -0
  169. package/dist/components/Illustration/Illustration.js +37 -0
  170. package/dist/components/Illustration/Illustration.js.map +1 -0
  171. package/dist/components/Illustration/illustrations.d.ts +5 -0
  172. package/dist/components/Illustration/illustrations.js +266 -0
  173. package/dist/components/Illustration/illustrations.js.map +1 -0
  174. package/dist/components/ImageViewer/ImageViewer.d.ts +31 -0
  175. package/dist/components/ImageViewer/ImageViewer.js +132 -0
  176. package/dist/components/ImageViewer/ImageViewer.js.map +1 -0
  177. package/dist/components/InkPad/InkPad.d.ts +27 -0
  178. package/dist/components/InkPad/InkPad.js +205 -0
  179. package/dist/components/InkPad/InkPad.js.map +1 -0
  180. package/dist/components/Input/Input.d.ts +42 -0
  181. package/dist/components/Input/Input.js +104 -0
  182. package/dist/components/Input/Input.js.map +1 -0
  183. package/dist/components/LearningCard/LearningCard.d.ts +32 -0
  184. package/dist/components/LearningCard/LearningCard.js +116 -0
  185. package/dist/components/LearningCard/LearningCard.js.map +1 -0
  186. package/dist/components/Legend/Legend.d.ts +30 -0
  187. package/dist/components/Legend/Legend.js +48 -0
  188. package/dist/components/Legend/Legend.js.map +1 -0
  189. package/dist/components/LineChart/LineChart.d.ts +33 -0
  190. package/dist/components/LineChart/LineChart.js +139 -0
  191. package/dist/components/LineChart/LineChart.js.map +1 -0
  192. package/dist/components/Link/Link.d.ts +16 -0
  193. package/dist/components/Link/Link.js +30 -0
  194. package/dist/components/Link/Link.js.map +1 -0
  195. package/dist/components/ListGroup/ListGroup.d.ts +18 -0
  196. package/dist/components/ListGroup/ListGroup.js +42 -0
  197. package/dist/components/ListGroup/ListGroup.js.map +1 -0
  198. package/dist/components/ListItem/ListItem.d.ts +40 -0
  199. package/dist/components/ListItem/ListItem.js +132 -0
  200. package/dist/components/ListItem/ListItem.js.map +1 -0
  201. package/dist/components/MascotBodhanBird/MascotBodhanBird.d.ts +14 -0
  202. package/dist/components/MascotBodhanBird/MascotBodhanBird.js +124 -0
  203. package/dist/components/MascotBodhanBird/MascotBodhanBird.js.map +1 -0
  204. package/dist/components/Message/Message.d.ts +15 -0
  205. package/dist/components/Message/Message.js +52 -0
  206. package/dist/components/Message/Message.js.map +1 -0
  207. package/dist/components/Modal/Modal.d.ts +54 -0
  208. package/dist/components/Modal/Modal.js +152 -0
  209. package/dist/components/Modal/Modal.js.map +1 -0
  210. package/dist/components/MultiSelect/MultiSelect.d.ts +62 -0
  211. package/dist/components/MultiSelect/MultiSelect.js +282 -0
  212. package/dist/components/MultiSelect/MultiSelect.js.map +1 -0
  213. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +35 -0
  214. package/dist/components/NavigationDrawer/NavigationDrawer.js +107 -0
  215. package/dist/components/NavigationDrawer/NavigationDrawer.js.map +1 -0
  216. package/dist/components/NavigationItem/NavigationItem.d.ts +16 -0
  217. package/dist/components/NavigationItem/NavigationItem.js +34 -0
  218. package/dist/components/NavigationItem/NavigationItem.js.map +1 -0
  219. package/dist/components/NavigationRail/NavigationRail.d.ts +39 -0
  220. package/dist/components/NavigationRail/NavigationRail.js +100 -0
  221. package/dist/components/NavigationRail/NavigationRail.js.map +1 -0
  222. package/dist/components/NumberStepper/NumberStepper.d.ts +23 -0
  223. package/dist/components/NumberStepper/NumberStepper.js +84 -0
  224. package/dist/components/NumberStepper/NumberStepper.js.map +1 -0
  225. package/dist/components/OTPInput/OTPInput.d.ts +42 -0
  226. package/dist/components/OTPInput/OTPInput.js +122 -0
  227. package/dist/components/OTPInput/OTPInput.js.map +1 -0
  228. package/dist/components/Pagination/Pagination.d.ts +50 -0
  229. package/dist/components/Pagination/Pagination.js +122 -0
  230. package/dist/components/Pagination/Pagination.js.map +1 -0
  231. package/dist/components/PermissionSheet/PermissionSheet.d.ts +31 -0
  232. package/dist/components/PermissionSheet/PermissionSheet.js +113 -0
  233. package/dist/components/PermissionSheet/PermissionSheet.js.map +1 -0
  234. package/dist/components/PieChart/PieChart.d.ts +9 -0
  235. package/dist/components/PieChart/PieChart.js +19 -0
  236. package/dist/components/PieChart/PieChart.js.map +1 -0
  237. package/dist/components/PieChart/PieCore.d.ts +35 -0
  238. package/dist/components/PieChart/PieCore.js +128 -0
  239. package/dist/components/PieChart/PieCore.js.map +1 -0
  240. package/dist/components/Popover/Popover.d.ts +94 -0
  241. package/dist/components/Popover/Popover.js +324 -0
  242. package/dist/components/Popover/Popover.js.map +1 -0
  243. package/dist/components/Progress/Progress.d.ts +27 -0
  244. package/dist/components/Progress/Progress.js +77 -0
  245. package/dist/components/Progress/Progress.js.map +1 -0
  246. package/dist/components/PromptStarter/PromptStarter.d.ts +16 -0
  247. package/dist/components/PromptStarter/PromptStarter.js +33 -0
  248. package/dist/components/PromptStarter/PromptStarter.js.map +1 -0
  249. package/dist/components/Promptbox/Promptbox.d.ts +109 -0
  250. package/dist/components/Promptbox/Promptbox.js +469 -0
  251. package/dist/components/Promptbox/Promptbox.js.map +1 -0
  252. package/dist/components/Question/Question.d.ts +55 -0
  253. package/dist/components/Question/Question.js +161 -0
  254. package/dist/components/Question/Question.js.map +1 -0
  255. package/dist/components/RadioButton/RadioButton.d.ts +28 -0
  256. package/dist/components/RadioButton/RadioButton.js +43 -0
  257. package/dist/components/RadioButton/RadioButton.js.map +1 -0
  258. package/dist/components/Rating/Rating.d.ts +25 -0
  259. package/dist/components/Rating/Rating.js +79 -0
  260. package/dist/components/Rating/Rating.js.map +1 -0
  261. package/dist/components/ReadAloud/ReadAloud.d.ts +24 -0
  262. package/dist/components/ReadAloud/ReadAloud.js +76 -0
  263. package/dist/components/ReadAloud/ReadAloud.js.map +1 -0
  264. package/dist/components/RecommendationCard/RecommendationCard.d.ts +28 -0
  265. package/dist/components/RecommendationCard/RecommendationCard.js +78 -0
  266. package/dist/components/RecommendationCard/RecommendationCard.js.map +1 -0
  267. package/dist/components/ResizablePanel/ResizablePanel.d.ts +32 -0
  268. package/dist/components/ResizablePanel/ResizablePanel.js +102 -0
  269. package/dist/components/ResizablePanel/ResizablePanel.js.map +1 -0
  270. package/dist/components/ResizeHandle/ResizeHandle.d.ts +32 -0
  271. package/dist/components/ResizeHandle/ResizeHandle.js +61 -0
  272. package/dist/components/ResizeHandle/ResizeHandle.js.map +1 -0
  273. package/dist/components/ResultsSummary/ResultsSummary.d.ts +37 -0
  274. package/dist/components/ResultsSummary/ResultsSummary.js +121 -0
  275. package/dist/components/ResultsSummary/ResultsSummary.js.map +1 -0
  276. package/dist/components/ScoreCounter/ScoreCounter.d.ts +18 -0
  277. package/dist/components/ScoreCounter/ScoreCounter.js +78 -0
  278. package/dist/components/ScoreCounter/ScoreCounter.js.map +1 -0
  279. package/dist/components/ScreenTemplate/ScreenTemplate.d.ts +30 -0
  280. package/dist/components/ScreenTemplate/ScreenTemplate.js +88 -0
  281. package/dist/components/ScreenTemplate/ScreenTemplate.js.map +1 -0
  282. package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.d.ts +15 -0
  283. package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.js +20 -0
  284. package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.js.map +1 -0
  285. package/dist/components/Search/Search.d.ts +33 -0
  286. package/dist/components/Search/Search.js +74 -0
  287. package/dist/components/Search/Search.js.map +1 -0
  288. package/dist/components/SearchView/SearchView.d.ts +36 -0
  289. package/dist/components/SearchView/SearchView.js +124 -0
  290. package/dist/components/SearchView/SearchView.js.map +1 -0
  291. package/dist/components/SegmentedControl/SegmentedControl.d.ts +63 -0
  292. package/dist/components/SegmentedControl/SegmentedControl.js +164 -0
  293. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  294. package/dist/components/Select/Select.d.ts +49 -0
  295. package/dist/components/Select/Select.js +143 -0
  296. package/dist/components/Select/Select.js.map +1 -0
  297. package/dist/components/Sidebar/Sidebar.d.ts +78 -0
  298. package/dist/components/Sidebar/Sidebar.js +167 -0
  299. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  300. package/dist/components/Skeleton/Skeleton.d.ts +25 -0
  301. package/dist/components/Skeleton/Skeleton.js +26 -0
  302. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  303. package/dist/components/Slider/Slider.d.ts +39 -0
  304. package/dist/components/Slider/Slider.js +83 -0
  305. package/dist/components/Slider/Slider.js.map +1 -0
  306. package/dist/components/Snackbar/Snackbar.d.ts +38 -0
  307. package/dist/components/Snackbar/Snackbar.js +103 -0
  308. package/dist/components/Snackbar/Snackbar.js.map +1 -0
  309. package/dist/components/SourcePanel/SourcePanel.d.ts +20 -0
  310. package/dist/components/SourcePanel/SourcePanel.js +82 -0
  311. package/dist/components/SourcePanel/SourcePanel.js.map +1 -0
  312. package/dist/components/StatTile/StatTile.d.ts +22 -0
  313. package/dist/components/StatTile/StatTile.js +71 -0
  314. package/dist/components/StatTile/StatTile.js.map +1 -0
  315. package/dist/components/StatusBar/StatusBar.d.ts +18 -0
  316. package/dist/components/StatusBar/StatusBar.js +131 -0
  317. package/dist/components/StatusBar/StatusBar.js.map +1 -0
  318. package/dist/components/Stepper/Stepper.d.ts +50 -0
  319. package/dist/components/Stepper/Stepper.js +99 -0
  320. package/dist/components/Stepper/Stepper.js.map +1 -0
  321. package/dist/components/SuggestionCard/SuggestionCard.d.ts +22 -0
  322. package/dist/components/SuggestionCard/SuggestionCard.js +74 -0
  323. package/dist/components/SuggestionCard/SuggestionCard.js.map +1 -0
  324. package/dist/components/Switch/Switch.d.ts +35 -0
  325. package/dist/components/Switch/Switch.js +54 -0
  326. package/dist/components/Switch/Switch.js.map +1 -0
  327. package/dist/components/SystemNavigationBar/SystemNavigationBar.d.ts +16 -0
  328. package/dist/components/SystemNavigationBar/SystemNavigationBar.js +54 -0
  329. package/dist/components/SystemNavigationBar/SystemNavigationBar.js.map +1 -0
  330. package/dist/components/TabBar/TabBar.d.ts +101 -0
  331. package/dist/components/TabBar/TabBar.js +287 -0
  332. package/dist/components/TabBar/TabBar.js.map +1 -0
  333. package/dist/components/Table/Table.d.ts +135 -0
  334. package/dist/components/Table/Table.js +323 -0
  335. package/dist/components/Table/Table.js.map +1 -0
  336. package/dist/components/Tabs/Tabs.d.ts +61 -0
  337. package/dist/components/Tabs/Tabs.js +179 -0
  338. package/dist/components/Tabs/Tabs.js.map +1 -0
  339. package/dist/components/Tag/Tag.d.ts +37 -0
  340. package/dist/components/Tag/Tag.js +56 -0
  341. package/dist/components/Tag/Tag.js.map +1 -0
  342. package/dist/components/Textarea/Textarea.d.ts +37 -0
  343. package/dist/components/Textarea/Textarea.js +77 -0
  344. package/dist/components/Textarea/Textarea.js.map +1 -0
  345. package/dist/components/Tile/Tile.d.ts +31 -0
  346. package/dist/components/Tile/Tile.js +70 -0
  347. package/dist/components/Tile/Tile.js.map +1 -0
  348. package/dist/components/TimePicker/TimePicker.d.ts +43 -0
  349. package/dist/components/TimePicker/TimePicker.js +186 -0
  350. package/dist/components/TimePicker/TimePicker.js.map +1 -0
  351. package/dist/components/Toast/Toast.d.ts +42 -0
  352. package/dist/components/Toast/Toast.js +115 -0
  353. package/dist/components/Toast/Toast.js.map +1 -0
  354. package/dist/components/Toolbar/Toolbar.d.ts +22 -0
  355. package/dist/components/Toolbar/Toolbar.js +52 -0
  356. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  357. package/dist/components/Tooltip/Tooltip.d.ts +28 -0
  358. package/dist/components/Tooltip/Tooltip.js +101 -0
  359. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  360. package/dist/components/TopAppBar/TopAppBar.d.ts +36 -0
  361. package/dist/components/TopAppBar/TopAppBar.js +70 -0
  362. package/dist/components/TopAppBar/TopAppBar.js.map +1 -0
  363. package/dist/components/Topbar/Topbar.d.ts +28 -0
  364. package/dist/components/Topbar/Topbar.js +63 -0
  365. package/dist/components/Topbar/Topbar.js.map +1 -0
  366. package/dist/components/Topbar/TopbarLogo.d.ts +2 -0
  367. package/dist/components/Topbar/TopbarLogo.js +98 -0
  368. package/dist/components/Topbar/TopbarLogo.js.map +1 -0
  369. package/dist/components/TreeItem/TreeItem.d.ts +38 -0
  370. package/dist/components/TreeItem/TreeItem.js +126 -0
  371. package/dist/components/TreeItem/TreeItem.js.map +1 -0
  372. package/dist/components/VersionSwitcher/VersionSwitcher.d.ts +13 -0
  373. package/dist/components/VersionSwitcher/VersionSwitcher.js +43 -0
  374. package/dist/components/VersionSwitcher/VersionSwitcher.js.map +1 -0
  375. package/dist/components/VideoPlayer/VideoPlayer.d.ts +28 -0
  376. package/dist/components/VideoPlayer/VideoPlayer.js +160 -0
  377. package/dist/components/VideoPlayer/VideoPlayer.js.map +1 -0
  378. package/dist/components/VoiceMode/VoiceMode.d.ts +27 -0
  379. package/dist/components/VoiceMode/VoiceMode.js +123 -0
  380. package/dist/components/VoiceMode/VoiceMode.js.map +1 -0
  381. package/dist/components/WebScreenTemplate/WebScreenTemplate.d.ts +36 -0
  382. package/dist/components/WebScreenTemplate/WebScreenTemplate.js +66 -0
  383. package/dist/components/WebScreenTemplate/WebScreenTemplate.js.map +1 -0
  384. package/dist/components/WhyThisSheet/WhyThisSheet.d.ts +23 -0
  385. package/dist/components/WhyThisSheet/WhyThisSheet.js +73 -0
  386. package/dist/components/WhyThisSheet/WhyThisSheet.js.map +1 -0
  387. package/dist/index.d.ts +124 -0
  388. package/dist/index.js +125 -0
  389. package/dist/styles.css +5637 -0
  390. package/dist/tokens.css +2338 -0
  391. package/package.json +50 -4
@@ -0,0 +1,138 @@
1
+ import { DropdownMenu, DropdownMenuDivider, DropdownMenuItem } from "../DropdownMenu/DropdownMenu.js";
2
+ import { floatingAttrs, focusableIn, useDismiss, usePresence, useTopLayer } from "../Popover/Popover.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
5
+ // src/components/ContextMenu/ContextMenu.tsx
6
+ /** A row of the Context Menu: `Dropdown Menu / Item` with the icon trailing, as on iOS. */
7
+ function ContextMenuItem({ destructive, className, ...rest }) {
8
+ return /* @__PURE__ */ jsx(DropdownMenuItem, {
9
+ className: ["bodhan-context-menu-item", className].filter(Boolean).join(" "),
10
+ "data-destructive": destructive || void 0,
11
+ ...rest
12
+ });
13
+ }
14
+ var DEFAULT_ITEMS = /* @__PURE__ */ jsxs(Fragment, { children: [
15
+ /* @__PURE__ */ jsx(ContextMenuItem, {
16
+ label: "Copy",
17
+ trailingIcon: "folder_copy"
18
+ }),
19
+ /* @__PURE__ */ jsx(ContextMenuItem, {
20
+ label: "Share",
21
+ trailingIcon: "ios_share"
22
+ }),
23
+ /* @__PURE__ */ jsx(ContextMenuItem, {
24
+ label: "Edit",
25
+ trailingIcon: "edit"
26
+ }),
27
+ /* @__PURE__ */ jsx(DropdownMenuDivider, {}),
28
+ /* @__PURE__ */ jsx(ContextMenuItem, {
29
+ label: "Delete",
30
+ trailingIcon: "delete",
31
+ destructive: true
32
+ })
33
+ ] });
34
+ /**
35
+ * Bodhan Context Menu — the iOS context menu (long-press on touch, secondary click or Shift+F10 / Menu key with a
36
+ * keyboard). Liquid Glass surface (dropdown/radius 26 on iOS), 44 pt rows from `Dropdown Menu / Item`, icons trailing,
37
+ * destructive action last in Error colour. iOS only: the `06 Platform` mode is pinned to iOS — on Web and Android use
38
+ * Dropdown Menu. WAI-ARIA menu: arrows / Home / End / type-ahead move, Enter selects, Esc closes and returns focus.
39
+ * Springs in from the pressed point (fade only with reduced motion). SwiftUI: .contextMenu { Button(…) }
40
+ */
41
+ function ContextMenu({ children, items = DEFAULT_ITEMS, label = "Actions", open, onOpenChange, longPressDelay = 500, inline, className, ...rest }) {
42
+ const [inner, setInner] = useState(false);
43
+ const isOpen = open ?? inner;
44
+ const setOpen = (o) => {
45
+ if (open === void 0) setInner(o);
46
+ onOpenChange?.(o);
47
+ };
48
+ const targetRef = useRef(null);
49
+ const layerRef = useRef(null);
50
+ const point = useRef({
51
+ x: 0,
52
+ y: 0
53
+ });
54
+ const timer = useRef(0);
55
+ const { mounted, state } = usePresence(isOpen && !inline, layerRef);
56
+ useTopLayer(layerRef, mounted && !inline);
57
+ const close = (refocus = true) => {
58
+ setOpen(false);
59
+ if (refocus) (focusableIn(targetRef.current) ?? targetRef.current)?.focus({ preventScroll: true });
60
+ };
61
+ useDismiss(isOpen && !inline, [layerRef], (r) => close(r === "escape"));
62
+ useLayoutEffect(() => {
63
+ const f = layerRef.current;
64
+ if (!mounted || !f) return;
65
+ const m = 8, { x, y } = point.current;
66
+ const left = Math.max(m, Math.min(x, window.innerWidth - f.offsetWidth - m));
67
+ const top = Math.max(m, Math.min(y, window.innerHeight - f.offsetHeight - m));
68
+ f.style.left = `${Math.round(left)}px`;
69
+ f.style.top = `${Math.round(top)}px`;
70
+ f.style.setProperty("--bodhan-origin-x", `${Math.round(x - left)}px`);
71
+ f.style.setProperty("--bodhan-origin-y", `${Math.round(y - top)}px`);
72
+ }, [mounted]);
73
+ useEffect(() => {
74
+ if (isOpen && mounted) layerRef.current?.querySelector("[role^=\"menuitem\"]:not([aria-disabled=\"true\"])")?.focus({ preventScroll: true });
75
+ }, [isOpen, mounted]);
76
+ const openAt = (x, y) => {
77
+ point.current = {
78
+ x,
79
+ y
80
+ };
81
+ setOpen(true);
82
+ };
83
+ const onContextMenu = (e) => {
84
+ e.preventDefault();
85
+ openAt(e.clientX, e.clientY);
86
+ };
87
+ const onPointerDown = (e) => {
88
+ if (e.pointerType !== "touch") return;
89
+ const { clientX, clientY } = e;
90
+ timer.current = window.setTimeout(() => openAt(clientX, clientY), longPressDelay);
91
+ };
92
+ const cancelPress = () => window.clearTimeout(timer.current);
93
+ const onKeyDown = (e) => {
94
+ if (e.key === "ContextMenu" || e.key === "F10" && e.shiftKey) {
95
+ e.preventDefault();
96
+ const r = e.target.getBoundingClientRect();
97
+ openAt(r.left, r.bottom + 4);
98
+ }
99
+ };
100
+ const menu = /* @__PURE__ */ jsx(DropdownMenu, {
101
+ inline: true,
102
+ open: true,
103
+ onOpenChange: (o) => {
104
+ if (!o) close();
105
+ },
106
+ label,
107
+ className: "bodhan-context-menu__surface",
108
+ children: items
109
+ });
110
+ if (inline) return /* @__PURE__ */ jsx("div", {
111
+ className: ["bodhan-context-menu", className].filter(Boolean).join(" "),
112
+ "data-platform": "ios",
113
+ ...rest,
114
+ children: menu
115
+ });
116
+ return /* @__PURE__ */ jsxs("div", {
117
+ ref: targetRef,
118
+ className: ["bodhan-context-menu-target", className].filter(Boolean).join(" "),
119
+ onContextMenu,
120
+ onPointerDown,
121
+ onPointerUp: cancelPress,
122
+ onPointerLeave: cancelPress,
123
+ onPointerCancel: cancelPress,
124
+ onKeyDown,
125
+ ...rest,
126
+ children: [children, mounted && /* @__PURE__ */ jsx("div", {
127
+ ref: layerRef,
128
+ className: "bodhan-context-menu bodhan-context-menu-layer",
129
+ "data-platform": "ios",
130
+ "data-state": state,
131
+ ...floatingAttrs(),
132
+ children: menu
133
+ })]
134
+ });
135
+ }
136
+ export { ContextMenu, ContextMenuItem };
137
+
138
+ //# sourceMappingURL=ContextMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.js","names":["_Fragment"],"sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import {\n useEffect, useLayoutEffect, useRef, useState, type HTMLAttributes, type KeyboardEvent, type MouseEvent,\n type PointerEvent, type ReactNode,\n} from 'react';\nimport { DropdownMenu, DropdownMenuDivider, DropdownMenuItem, type DropdownMenuItemProps } from '../DropdownMenu/DropdownMenu';\nimport { floatingAttrs, focusableIn, useDismiss, usePresence, useTopLayer } from '../Popover/Popover';\n\nexport interface ContextMenuItemProps extends DropdownMenuItemProps {\n /** Destructive action (Error/Strong label). Put it last, after a divider. */\n destructive?: boolean;\n}\n\n/** A row of the Context Menu: `Dropdown Menu / Item` with the icon trailing, as on iOS. */\nexport function ContextMenuItem({ destructive, className, ...rest }: ContextMenuItemProps) {\n return (\n <DropdownMenuItem\n className={['bodhan-context-menu-item', className].filter(Boolean).join(' ')}\n data-destructive={destructive || undefined} {...rest}\n />\n );\n}\n\nconst DEFAULT_ITEMS = (\n <>\n <ContextMenuItem label=\"Copy\" trailingIcon=\"folder_copy\" />\n <ContextMenuItem label=\"Share\" trailingIcon=\"ios_share\" />\n <ContextMenuItem label=\"Edit\" trailingIcon=\"edit\" />\n <DropdownMenuDivider />\n <ContextMenuItem label=\"Delete\" trailingIcon=\"delete\" destructive />\n </>\n);\n\nexport interface ContextMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** The element the menu belongs to (long-press / secondary click / Shift+F10 on it opens the menu). */\n children?: ReactNode;\n /** Rows: `ContextMenuItem` and `DropdownMenuDivider`. Defaults to the Figma rows (Copy, Share, Edit, Delete). */\n items?: ReactNode;\n /** Accessible name of the menu. */\n label?: string;\n /** Controlled open state. */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Long-press duration for touch, in ms. */\n longPressDelay?: number;\n /** Render the open menu in normal flow without a target (docs, Figma check). */\n inline?: boolean;\n}\n\n/**\n * Bodhan Context Menu — the iOS context menu (long-press on touch, secondary click or Shift+F10 / Menu key with a\n * keyboard). Liquid Glass surface (dropdown/radius 26 on iOS), 44 pt rows from `Dropdown Menu / Item`, icons trailing,\n * destructive action last in Error colour. iOS only: the `06 Platform` mode is pinned to iOS — on Web and Android use\n * Dropdown Menu. WAI-ARIA menu: arrows / Home / End / type-ahead move, Enter selects, Esc closes and returns focus.\n * Springs in from the pressed point (fade only with reduced motion). SwiftUI: .contextMenu { Button(…) }\n */\nexport function ContextMenu({\n children, items = DEFAULT_ITEMS, label = 'Actions', open, onOpenChange, longPressDelay = 500, inline, className, ...rest\n}: ContextMenuProps) {\n const [inner, setInner] = useState(false);\n const isOpen = open ?? inner;\n const setOpen = (o: boolean) => { if (open === undefined) setInner(o); onOpenChange?.(o); };\n const targetRef = useRef<HTMLDivElement>(null);\n const layerRef = useRef<HTMLDivElement>(null);\n const point = useRef({ x: 0, y: 0 });\n const timer = useRef(0);\n const { mounted, state } = usePresence(isOpen && !inline, layerRef);\n useTopLayer(layerRef, mounted && !inline);\n\n const close = (refocus = true) => {\n setOpen(false);\n if (refocus) (focusableIn(targetRef.current) ?? targetRef.current)?.focus({ preventScroll: true });\n };\n useDismiss(isOpen && !inline, [layerRef], (r) => close(r === 'escape'));\n\n // place at the pressed point, clamped to the viewport; the menu scales from that point\n useLayoutEffect(() => {\n const f = layerRef.current;\n if (!mounted || !f) return;\n const m = 8, { x, y } = point.current;\n const left = Math.max(m, Math.min(x, window.innerWidth - f.offsetWidth - m));\n const top = Math.max(m, Math.min(y, window.innerHeight - f.offsetHeight - m));\n f.style.left = `${Math.round(left)}px`;\n f.style.top = `${Math.round(top)}px`;\n f.style.setProperty('--bodhan-origin-x', `${Math.round(x - left)}px`);\n f.style.setProperty('--bodhan-origin-y', `${Math.round(y - top)}px`);\n }, [mounted]);\n // focus the first row once open\n useEffect(() => {\n if (isOpen && mounted) layerRef.current?.querySelector<HTMLElement>('[role^=\"menuitem\"]:not([aria-disabled=\"true\"])')?.focus({ preventScroll: true });\n }, [isOpen, mounted]);\n\n const openAt = (x: number, y: number) => { point.current = { x, y }; setOpen(true); };\n const onContextMenu = (e: MouseEvent<HTMLDivElement>) => { e.preventDefault(); openAt(e.clientX, e.clientY); };\n const onPointerDown = (e: PointerEvent<HTMLDivElement>) => {\n if (e.pointerType !== 'touch') return;\n const { clientX, clientY } = e;\n timer.current = window.setTimeout(() => openAt(clientX, clientY), longPressDelay);\n };\n const cancelPress = () => window.clearTimeout(timer.current);\n const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'ContextMenu' || (e.key === 'F10' && e.shiftKey)) {\n e.preventDefault();\n const r = (e.target as HTMLElement).getBoundingClientRect();\n openAt(r.left, r.bottom + 4);\n }\n };\n\n const menu = (\n <DropdownMenu inline open onOpenChange={(o) => { if (!o) close(); }} label={label} className=\"bodhan-context-menu__surface\">\n {items}\n </DropdownMenu>\n );\n\n if (inline) {\n return <div className={['bodhan-context-menu', className].filter(Boolean).join(' ')} data-platform=\"ios\" {...rest}>{menu}</div>;\n }\n return (\n <div\n ref={targetRef} className={['bodhan-context-menu-target', className].filter(Boolean).join(' ')}\n onContextMenu={onContextMenu} onPointerDown={onPointerDown} onPointerUp={cancelPress} onPointerLeave={cancelPress}\n onPointerCancel={cancelPress} onKeyDown={onKeyDown} {...rest}\n >\n {children}\n {mounted && (\n <div ref={layerRef} className=\"bodhan-context-menu bodhan-context-menu-layer\" data-platform=\"ios\" data-state={state} {...floatingAttrs()}>\n {menu}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAaA,SAAgB,gBAAgB,EAAE,aAAa,WAAW,GAAG,QAA8B;CACzF,OACE,oBAAC,kBAAD;EACE,WAAW,CAAC,4BAA4B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC3E,oBAAkB,eAAe,KAAA;EAAW,GAAI;CACjD,CAAA;AAEL;AAEA,IAAM,gBACJ,qBAAAA,UAAA,EAAA,UAAA;CACE,oBAAC,iBAAD;EAAiB,OAAM;EAAO,cAAa;CAAe,CAAA;CAC1D,oBAAC,iBAAD;EAAiB,OAAM;EAAQ,cAAa;CAAa,CAAA;CACzD,oBAAC,iBAAD;EAAiB,OAAM;EAAO,cAAa;CAAQ,CAAA;CACnD,oBAAC,qBAAD,CAAsB,CAAA;CACtB,oBAAC,iBAAD;EAAiB,OAAM;EAAS,cAAa;EAAS,aAAA;CAAa,CAAA;AACnE,EAAA,CAAA;;;;;;;;AA0BJ,SAAgB,YAAY,EAC1B,UAAU,QAAQ,eAAe,QAAQ,WAAW,MAAM,cAAc,iBAAiB,KAAK,QAAQ,WAAW,GAAG,QACjG;CACnB,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CACxC,MAAM,SAAS,QAAQ;CACvB,MAAM,WAAW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U,WAAU;GAAgD,iBAAc;GAAM,cAAY;GAAO,GAAI,cAAc;GACpI,UAAA;EACE,CAAA,CAEJ;;AAET"}
@@ -0,0 +1,28 @@
1
+ import { type InputProps } from '../Input/Input';
2
+ /** Default display format: "12 Nov 2026". */
3
+ export declare const formatDateField: (iso: string, locale?: string) => string;
4
+ /** Loose parse (Postel): "2026-11-12", "12/11/2026", "12.11.26", "12 Nov 2026", "Nov 12 2026". Returns ISO or null. */
5
+ export declare function parseDateField(text: string): string | null;
6
+ export interface DateFieldProps extends Omit<InputProps, 'value' | 'defaultValue' | 'onValueChange' | 'size' | 'trailingIcon' | 'type' | 'min' | 'max'> {
7
+ /** Selected date, ISO `YYYY-MM-DD` (controlled). `''` = none. */
8
+ value?: string;
9
+ /** Uncontrolled initial date (ISO). Figma `Selected Date`. */
10
+ defaultValue?: string;
11
+ /** Called with the ISO date (or `''` when cleared). */
12
+ onValueChange?: (iso: string) => void;
13
+ /** Earliest / latest selectable date (ISO). */
14
+ min?: string;
15
+ max?: string;
16
+ /** Figma `Calendar Icon`. */
17
+ calendarIcon?: string;
18
+ /** Display formatter (default "12 Nov 2026"). */
19
+ format?: (iso: string) => string;
20
+ }
21
+ /**
22
+ * Bodhan Date Field: the Bodhan field (Input, size Medium) with a calendar button. Typing is never blocked:
23
+ * loose dates are accepted and normalised on blur (invalid text keeps the field in error). The calendar button,
24
+ * Alt+↓ or a tap on touch platforms opens the platform's own date picker (native `<input type="date">`), as the
25
+ * Figma guidance asks — iOS DatePicker / Android DatePickerDialog, never a redrawn picker.
26
+ * Platform (height 40 / 52 / 56, radius, type) comes from `data-platform` on an ancestor.
27
+ */
28
+ export declare function DateField({ label, placeholder, value, defaultValue, onValueChange, min, max, calendarIcon, format, error, errorMessage, disabled, readOnly, onBlur, onKeyDown, className, ...rest }: DateFieldProps): import("react").JSX.Element;
@@ -0,0 +1,134 @@
1
+ import { Icon } from "../Icon/Icon.js";
2
+ import { Input } from "../Input/Input.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useEffect, useRef, useState } from "react";
5
+ // src/components/DateField/DateField.tsx
6
+ var pad = (n) => String(n).padStart(2, "0");
7
+ var toIso = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
8
+ var fromIso = (iso) => {
9
+ const [y, m, d] = iso.split("-").map(Number);
10
+ return new Date(y, m - 1, d);
11
+ };
12
+ /** Default display format: "12 Nov 2026". */
13
+ var formatDateField = (iso, locale = "en-GB") => iso ? new Intl.DateTimeFormat(locale, {
14
+ day: "numeric",
15
+ month: "short",
16
+ year: "numeric"
17
+ }).format(fromIso(iso)) : "";
18
+ /** Loose parse (Postel): "2026-11-12", "12/11/2026", "12.11.26", "12 Nov 2026", "Nov 12 2026". Returns ISO or null. */
19
+ function parseDateField(text) {
20
+ const t = text.trim();
21
+ if (!t) return null;
22
+ let m = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(t);
23
+ if (m) return toIso(new Date(+m[1], +m[2] - 1, +m[3]));
24
+ m = /^(\d{1,2})[/.\-\s](\d{1,2})[/.\-\s](\d{2}|\d{4})$/.exec(t);
25
+ if (m) {
26
+ const y = m[3].length === 2 ? 2e3 + +m[3] : +m[3];
27
+ const d = new Date(y, +m[2] - 1, +m[1]);
28
+ return d.getMonth() === +m[2] - 1 ? toIso(d) : null;
29
+ }
30
+ const p = Date.parse(t);
31
+ return Number.isNaN(p) ? null : toIso(new Date(p));
32
+ }
33
+ /**
34
+ * Bodhan Date Field: the Bodhan field (Input, size Medium) with a calendar button. Typing is never blocked:
35
+ * loose dates are accepted and normalised on blur (invalid text keeps the field in error). The calendar button,
36
+ * Alt+↓ or a tap on touch platforms opens the platform's own date picker (native `<input type="date">`), as the
37
+ * Figma guidance asks — iOS DatePicker / Android DatePickerDialog, never a redrawn picker.
38
+ * Platform (height 40 / 52 / 56, radius, type) comes from `data-platform` on an ancestor.
39
+ */
40
+ function DateField({ label = "Label", placeholder = "Select a date", value, defaultValue = "", onValueChange, min, max, calendarIcon = "calendar_month", format = formatDateField, error, errorMessage = "Invalid date", disabled, readOnly, onBlur, onKeyDown, className, ...rest }) {
41
+ const [inner, setInner] = useState(defaultValue);
42
+ const iso = value ?? inner;
43
+ const [text, setText] = useState(format(iso));
44
+ const [invalid, setInvalid] = useState(false);
45
+ const native = useRef(null);
46
+ useEffect(() => {
47
+ setText(format(iso));
48
+ setInvalid(false);
49
+ }, [iso]);
50
+ const set = (next) => {
51
+ if (value === void 0) setInner(next);
52
+ if (next !== iso) onValueChange?.(next);
53
+ setText(format(next));
54
+ setInvalid(false);
55
+ };
56
+ const openPicker = () => {
57
+ const el = native.current;
58
+ if (!el || disabled || readOnly) return;
59
+ try {
60
+ el.showPicker();
61
+ } catch {
62
+ el.focus();
63
+ el.click();
64
+ }
65
+ };
66
+ const commitText = () => {
67
+ if (!text.trim()) {
68
+ set("");
69
+ return;
70
+ }
71
+ const p = parseDateField(text);
72
+ if (p && (!min || p >= min) && (!max || p <= max)) set(p);
73
+ else setInvalid(true);
74
+ };
75
+ return /* @__PURE__ */ jsx(Input, {
76
+ ...rest,
77
+ className: ["bodhan-date-field", className].filter(Boolean).join(" "),
78
+ size: "medium",
79
+ label,
80
+ placeholder,
81
+ value: text,
82
+ inputMode: "text",
83
+ autoComplete: "off",
84
+ disabled,
85
+ readOnly,
86
+ error: error || invalid,
87
+ errorMessage,
88
+ onValueChange: (t) => {
89
+ setText(t);
90
+ if (!t) set("");
91
+ },
92
+ onBlur: (e) => {
93
+ commitText();
94
+ onBlur?.(e);
95
+ },
96
+ onKeyDown: (e) => {
97
+ if (e.altKey && e.key === "ArrowDown") {
98
+ e.preventDefault();
99
+ openPicker();
100
+ }
101
+ if (e.key === "Enter") commitText();
102
+ onKeyDown?.(e);
103
+ },
104
+ trailingIcon: /* @__PURE__ */ jsxs("span", {
105
+ className: "bodhan-date-field__trigger-wrap",
106
+ children: [/* @__PURE__ */ jsx("button", {
107
+ type: "button",
108
+ className: "bodhan-date-field__trigger",
109
+ "aria-label": "Choose date",
110
+ "aria-haspopup": "dialog",
111
+ disabled: disabled || readOnly,
112
+ onClick: openPicker,
113
+ children: /* @__PURE__ */ jsx(Icon, {
114
+ name: calendarIcon,
115
+ filled: true
116
+ })
117
+ }), /* @__PURE__ */ jsx("input", {
118
+ ref: native,
119
+ type: "date",
120
+ className: "bodhan-date-field__native",
121
+ tabIndex: -1,
122
+ "aria-hidden": "true",
123
+ value: iso,
124
+ min,
125
+ max,
126
+ disabled: disabled || readOnly,
127
+ onChange: (e) => set(e.target.value)
128
+ })]
129
+ })
130
+ });
131
+ }
132
+ export { DateField, formatDateField, parseDateField };
133
+
134
+ //# sourceMappingURL=DateField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateField.js","names":[],"sources":["../../../src/components/DateField/DateField.tsx"],"sourcesContent":["import { useEffect, useRef, useState, type KeyboardEvent } from 'react';\nimport { Icon } from '../Icon/Icon';\nimport { Input, type InputProps } from '../Input/Input';\n\nconst pad = (n: number) => String(n).padStart(2, '0');\nconst toIso = (d: Date) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\nconst fromIso = (iso: string) => { const [y, m, d] = iso.split('-').map(Number); return new Date(y, m - 1, d); };\n\n/** Default display format: \"12 Nov 2026\". */\nexport const formatDateField = (iso: string, locale = 'en-GB') =>\n iso ? new Intl.DateTimeFormat(locale, { day: 'numeric', month: 'short', year: 'numeric' }).format(fromIso(iso)) : '';\n\n/** Loose parse (Postel): \"2026-11-12\", \"12/11/2026\", \"12.11.26\", \"12 Nov 2026\", \"Nov 12 2026\". Returns ISO or null. */\nexport function parseDateField(text: string): string | null {\n const t = text.trim(); if (!t) return null;\n let m = /^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/.exec(t);\n if (m) return toIso(new Date(+m[1], +m[2] - 1, +m[3]));\n m = /^(\\d{1,2})[/.\\-\\s](\\d{1,2})[/.\\-\\s](\\d{2}|\\d{4})$/.exec(t);\n if (m) {\n const y = m[3].length === 2 ? 2000 + +m[3] : +m[3]; const d = new Date(y, +m[2] - 1, +m[1]);\n return d.getMonth() === +m[2] - 1 ? toIso(d) : null;\n }\n const p = Date.parse(t);\n return Number.isNaN(p) ? null : toIso(new Date(p));\n}\n\nexport interface DateFieldProps extends Omit<InputProps, 'value' | 'defaultValue' | 'onValueChange' | 'size' | 'trailingIcon' | 'type' | 'min' | 'max'> {\n /** Selected date, ISO `YYYY-MM-DD` (controlled). `''` = none. */\n value?: string;\n /** Uncontrolled initial date (ISO). Figma `Selected Date`. */\n defaultValue?: string;\n /** Called with the ISO date (or `''` when cleared). */\n onValueChange?: (iso: string) => void;\n /** Earliest / latest selectable date (ISO). */\n min?: string;\n max?: string;\n /** Figma `Calendar Icon`. */\n calendarIcon?: string;\n /** Display formatter (default \"12 Nov 2026\"). */\n format?: (iso: string) => string;\n}\n\n/**\n * Bodhan Date Field: the Bodhan field (Input, size Medium) with a calendar button. Typing is never blocked:\n * loose dates are accepted and normalised on blur (invalid text keeps the field in error). The calendar button,\n * Alt+↓ or a tap on touch platforms opens the platform's own date picker (native `<input type=\"date\">`), as the\n * Figma guidance asks — iOS DatePicker / Android DatePickerDialog, never a redrawn picker.\n * Platform (height 40 / 52 / 56, radius, type) comes from `data-platform` on an ancestor.\n */\nexport function DateField({\n label = 'Label', placeholder = 'Select a date', value, defaultValue = '', onValueChange, min, max,\n calendarIcon = 'calendar_month', format = formatDateField, error, errorMessage = 'Invalid date', disabled, readOnly,\n onBlur, onKeyDown, className, ...rest\n}: DateFieldProps) {\n const [inner, setInner] = useState(defaultValue);\n const iso = value ?? inner;\n const [text, setText] = useState(format(iso));\n const [invalid, setInvalid] = useState(false);\n const native = useRef<HTMLInputElement>(null);\n useEffect(() => { setText(format(iso)); setInvalid(false); }, [iso]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const set = (next: string) => {\n if (value === undefined) setInner(next);\n if (next !== iso) onValueChange?.(next);\n setText(format(next)); setInvalid(false);\n };\n const openPicker = () => {\n const el = native.current; if (!el || disabled || readOnly) return;\n try { el.showPicker(); } catch { el.focus(); el.click(); }\n };\n const commitText = () => {\n if (!text.trim()) { set(''); return; }\n const p = parseDateField(text);\n if (p && (!min || p >= min) && (!max || p <= max)) set(p); else setInvalid(true);\n };\n\n return (\n <Input\n {...rest}\n className={['bodhan-date-field', className].filter(Boolean).join(' ')}\n size=\"medium\"\n label={label}\n placeholder={placeholder}\n value={text}\n inputMode=\"text\"\n autoComplete=\"off\"\n disabled={disabled}\n readOnly={readOnly}\n error={error || invalid}\n errorMessage={errorMessage}\n onValueChange={(t) => { setText(t); if (!t) set(''); }}\n onBlur={(e) => { commitText(); onBlur?.(e); }}\n onKeyDown={(e: KeyboardEvent<HTMLInputElement>) => {\n if (e.altKey && e.key === 'ArrowDown') { e.preventDefault(); openPicker(); }\n if (e.key === 'Enter') commitText();\n onKeyDown?.(e);\n }}\n trailingIcon={\n <span className=\"bodhan-date-field__trigger-wrap\">\n <button type=\"button\" className=\"bodhan-date-field__trigger\" aria-label=\"Choose date\" aria-haspopup=\"dialog\"\n disabled={disabled || readOnly} onClick={openPicker}>\n <Icon name={calendarIcon} filled />\n </button>\n <input ref={native} type=\"date\" className=\"bodhan-date-field__native\" tabIndex={-1} aria-hidden=\"true\"\n value={iso} min={min} max={max} disabled={disabled || readOnly} onChange={(e) => set(e.target.value)} />\n </span>\n }\n />\n );\n}\n"],"mappings":";;;;;AAIA,IAAM,OAAO,MAAc,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;AACpD,IAAM,SAAS,MAAY,GAAG,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,SAAS,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,CAAC;AACzF,IAAM,WAAW,QAAgB;CAAE,MAAM,CAAC,GAAG,GAAG,KAAK,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CAAG,OAAO,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC;AAAG;;AAG/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G,UAAU,YAAY;IAAU,SAAS;IACzC,UAAA,oBAAC,MAAD;KAAM,MAAM;KAAc,QAAA;IAAQ,CAAA;GAC5B,CAAA,GACR,oBAAC,SAAD;IAAO,KAAK;IAAQ,MAAK;IAAO,WAAU;IAA4B,UAAU;IAAI,eAAY;IAC9F,OAAO;IAAU;IAAU;IAAK,UAAU,YAAY;IAAU,WAAW,MAAM,IAAI,EAAE,OAAO,KAAK;GAAI,CAAA,CACrG;;CAET,CAAA;AAEL"}
@@ -0,0 +1,16 @@
1
+ import { type InputHTMLAttributes } from 'react';
2
+ export interface DigitFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ /** Figma `State=Error`: red border, aria-invalid. */
4
+ error?: boolean;
5
+ /** Figma `State=Success`: green border and digit (code verified). */
6
+ success?: boolean;
7
+ /** Docs only: force `State=Focus`. */
8
+ forceState?: 'focus';
9
+ }
10
+ /**
11
+ * Bodhan Digit Field: one 48 × 48 cell holding a single character (building block of OTP Input).
12
+ * Numeric keyboard, one character, centred Heading-size digit. Shape follows `input/radius` from the
13
+ * 06 Platform mode: Web 8 · iOS round · Android 4.
14
+ * Android: BasicTextField · iOS: TextField(.oneTimeCode)
15
+ */
16
+ export declare const DigitField: import("react").ForwardRefExoticComponent<DigitFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ // src/components/DigitField/DigitField.tsx
4
+ /**
5
+ * Bodhan Digit Field: one 48 × 48 cell holding a single character (building block of OTP Input).
6
+ * Numeric keyboard, one character, centred Heading-size digit. Shape follows `input/radius` from the
7
+ * 06 Platform mode: Web 8 · iOS round · Android 4.
8
+ * Android: BasicTextField · iOS: TextField(.oneTimeCode)
9
+ */
10
+ var DigitField = forwardRef(function DigitField({ error, success, forceState, className, maxLength = 1, inputMode = "numeric", ...rest }, ref) {
11
+ return /* @__PURE__ */ jsx("input", {
12
+ ref,
13
+ type: "text",
14
+ inputMode,
15
+ maxLength,
16
+ autoComplete: "off",
17
+ "aria-invalid": error || void 0,
18
+ className: ["bodhan-digit-field", className].filter(Boolean).join(" "),
19
+ "data-state": forceState,
20
+ "data-error": error || void 0,
21
+ "data-success": success || void 0,
22
+ ...rest
23
+ });
24
+ });
25
+ export { DigitField };
26
+
27
+ //# sourceMappingURL=DigitField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DigitField.js","names":[],"sources":["../../../src/components/DigitField/DigitField.tsx"],"sourcesContent":["import { forwardRef, type InputHTMLAttributes } from 'react';\n\nexport interface DigitFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /** Figma `State=Error`: red border, aria-invalid. */\n error?: boolean;\n /** Figma `State=Success`: green border and digit (code verified). */\n success?: boolean;\n /** Docs only: force `State=Focus`. */\n forceState?: 'focus';\n}\n\n/**\n * Bodhan Digit Field: one 48 × 48 cell holding a single character (building block of OTP Input).\n * Numeric keyboard, one character, centred Heading-size digit. Shape follows `input/radius` from the\n * 06 Platform mode: Web 8 · iOS round · Android 4.\n * Android: BasicTextField · iOS: TextField(.oneTimeCode)\n */\nexport const DigitField = forwardRef<HTMLInputElement, DigitFieldProps>(function DigitField(\n { error, success, forceState, className, maxLength = 1, inputMode = 'numeric', ...rest }, ref,\n) {\n return (\n <input\n ref={ref}\n type=\"text\"\n inputMode={inputMode}\n maxLength={maxLength}\n autoComplete=\"off\"\n aria-invalid={error || undefined}\n className={['bodhan-digit-field', className].filter(Boolean).join(' ')}\n data-state={forceState}\n data-error={error || undefined}\n data-success={success || undefined}\n {...rest}\n />\n );\n});\n"],"mappings":";;;;;;;;;AAiBA,IAAa,aAAa,WAA8C,SAAS,WAC/E,EAAE,OAAO,SAAS,YAAY,WAAW,YAAY,GAAG,YAAY,WAAW,GAAG,QAAQ,KAC1F;CACA,OACE,oBAAC,SAAD;EACO;EACL,MAAK;EACM;EACA;EACX,cAAa;EACb,gBAAc,SAAS,KAAA;EACvB,WAAW,CAAC,sBAAsB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACrE,cAAY;EACZ,cAAY,SAAS,KAAA;EACrB,gBAAc,WAAW,KAAA;EACzB,GAAI;CACL,CAAA;AAEL,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type DividerOrientation = 'horizontal' | 'vertical';
3
+ export type DividerInset = 'none' | 'start';
4
+ export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
5
+ /** Figma `Orientation`. Horizontal between sections; Vertical between toolbar groups (stretches to the row height). */
6
+ orientation?: DividerOrientation;
7
+ /** Figma `Inset`. Start indents 16 to align with list text after a leading icon/avatar. */
8
+ inset?: DividerInset;
9
+ /**
10
+ * Purely visual (default): hidden from assistive tech. Set false when it separates meaningful groups
11
+ * (then it is announced as `role="separator"`).
12
+ */
13
+ decorative?: boolean;
14
+ }
15
+ /**
16
+ * Bodhan Divider: 1px hairline in Divider/Default. Prefer spacing over dividers; iOS inset-grouped lists draw
17
+ * their own separators. Android: HorizontalDivider / VerticalDivider · iOS: Divider()
18
+ */
19
+ export declare function Divider({ orientation, inset, decorative, className, ...rest }: DividerProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ // src/components/Divider/Divider.tsx
3
+ /**
4
+ * Bodhan Divider: 1px hairline in Divider/Default. Prefer spacing over dividers; iOS inset-grouped lists draw
5
+ * their own separators. Android: HorizontalDivider / VerticalDivider · iOS: Divider()
6
+ */
7
+ function Divider({ orientation = "horizontal", inset = "none", decorative = true, className, ...rest }) {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ className: ["bodhan-divider", className].filter(Boolean).join(" "),
10
+ "data-orientation": orientation,
11
+ "data-inset": inset,
12
+ ...decorative ? { "aria-hidden": true } : {
13
+ role: "separator",
14
+ "aria-orientation": orientation
15
+ },
16
+ ...rest,
17
+ children: /* @__PURE__ */ jsx("span", { className: "bodhan-divider__line" })
18
+ });
19
+ }
20
+ export { Divider };
21
+
22
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.js","names":[],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nexport type DividerOrientation = 'horizontal' | 'vertical';\nexport type DividerInset = 'none' | 'start';\n\nexport interface DividerProps extends HTMLAttributes<HTMLDivElement> {\n /** Figma `Orientation`. Horizontal between sections; Vertical between toolbar groups (stretches to the row height). */\n orientation?: DividerOrientation;\n /** Figma `Inset`. Start indents 16 to align with list text after a leading icon/avatar. */\n inset?: DividerInset;\n /**\n * Purely visual (default): hidden from assistive tech. Set false when it separates meaningful groups\n * (then it is announced as `role=\"separator\"`).\n */\n decorative?: boolean;\n}\n\n/**\n * Bodhan Divider: 1px hairline in Divider/Default. Prefer spacing over dividers; iOS inset-grouped lists draw\n * their own separators. Android: HorizontalDivider / VerticalDivider · iOS: Divider()\n */\nexport function Divider({ orientation = 'horizontal', inset = 'none', decorative = true, className, ...rest }: DividerProps) {\n return (\n <div\n className={['bodhan-divider', className].filter(Boolean).join(' ')}\n data-orientation={orientation} data-inset={inset}\n {...(decorative ? { 'aria-hidden': true } : { role: 'separator', 'aria-orientation': orientation })}\n {...rest}\n >\n <span className=\"bodhan-divider__line\" />\n </div>\n );\n}\n"],"mappings":";;;;;;AAqBA,SAAgB,QAAQ,EAAE,cAAc,cAAc,QAAQ,QAAQ,aAAa,MAAM,WAAW,GAAG,QAAsB;CAC3H,OACE,oBAAC,OAAD;EACE,WAAW,CAAC,kBAAkB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACjE,oBAAkB;EAAa,cAAY;EAC3C,GAAK,aAAa,EAAE,eAAe,KAAK,IAAI;GAAE,MAAM;GAAa,oBAAoB;EAAY;EACjG,GAAI;EAEJ,UAAA,oBAAC,QAAD,EAAM,WAAU,uBAAwB,CAAA;CACrC,CAAA;AAET"}
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface DottedLoaderProps extends HTMLAttributes<HTMLSpanElement> {
3
+ /** Text announced to assistive tech (live `role="status"` region), e.g. "Bodhan is typing". */
4
+ label?: string;
5
+ /**
6
+ * Freeze on one Figma `Frame` (1 · 2 · 3) — for docs only. Product code leaves it unset: the loader cycles
7
+ * through the three frames by itself (Figma: "don't expose Frame as a prop" in native code).
8
+ */
9
+ frame?: 1 | 2 | 3;
10
+ }
11
+ /**
12
+ * Bodhan Dotted Loader — three 12 px dots whose Light / Mid / Strong shades rotate (Frame 1 → 2 → 3).
13
+ * For inline waits and chat typing indicators. Shared on every platform. Reduced motion: static Frame 1.
14
+ */
15
+ export declare function DottedLoader({ label, frame, className, ...rest }: DottedLoaderProps): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ // src/components/DottedLoader/DottedLoader.tsx
3
+ /**
4
+ * Bodhan Dotted Loader — three 12 px dots whose Light / Mid / Strong shades rotate (Frame 1 → 2 → 3).
5
+ * For inline waits and chat typing indicators. Shared on every platform. Reduced motion: static Frame 1.
6
+ */
7
+ function DottedLoader({ label = "Loading", frame, className, ...rest }) {
8
+ return /* @__PURE__ */ jsxs("span", {
9
+ className: ["bodhan-dotted-loader", className].filter(Boolean).join(" "),
10
+ "data-frame": frame,
11
+ role: "status",
12
+ "aria-busy": "true",
13
+ ...rest,
14
+ children: [
15
+ /* @__PURE__ */ jsx("span", {
16
+ className: "bodhan-dotted-loader__dot",
17
+ "aria-hidden": "true"
18
+ }),
19
+ /* @__PURE__ */ jsx("span", {
20
+ className: "bodhan-dotted-loader__dot",
21
+ "aria-hidden": "true"
22
+ }),
23
+ /* @__PURE__ */ jsx("span", {
24
+ className: "bodhan-dotted-loader__dot",
25
+ "aria-hidden": "true"
26
+ }),
27
+ /* @__PURE__ */ jsx("span", {
28
+ className: "bodhan-dotted-loader__label",
29
+ children: label
30
+ })
31
+ ]
32
+ });
33
+ }
34
+ export { DottedLoader };
35
+
36
+ //# sourceMappingURL=DottedLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DottedLoader.js","names":[],"sources":["../../../src/components/DottedLoader/DottedLoader.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nexport interface DottedLoaderProps extends HTMLAttributes<HTMLSpanElement> {\n /** Text announced to assistive tech (live `role=\"status\"` region), e.g. \"Bodhan is typing\". */\n label?: string;\n /**\n * Freeze on one Figma `Frame` (1 · 2 · 3) — for docs only. Product code leaves it unset: the loader cycles\n * through the three frames by itself (Figma: \"don't expose Frame as a prop\" in native code).\n */\n frame?: 1 | 2 | 3;\n}\n\n/**\n * Bodhan Dotted Loader — three 12 px dots whose Light / Mid / Strong shades rotate (Frame 1 → 2 → 3).\n * For inline waits and chat typing indicators. Shared on every platform. Reduced motion: static Frame 1.\n */\nexport function DottedLoader({ label = 'Loading', frame, className, ...rest }: DottedLoaderProps) {\n return (\n <span\n className={['bodhan-dotted-loader', className].filter(Boolean).join(' ')}\n data-frame={frame}\n role=\"status\"\n aria-busy=\"true\"\n {...rest}\n >\n <span className=\"bodhan-dotted-loader__dot\" aria-hidden=\"true\" />\n <span className=\"bodhan-dotted-loader__dot\" aria-hidden=\"true\" />\n <span className=\"bodhan-dotted-loader__dot\" aria-hidden=\"true\" />\n <span className=\"bodhan-dotted-loader__label\">{label}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAgBA,SAAgB,aAAa,EAAE,QAAQ,WAAW,OAAO,WAAW,GAAG,QAA2B;CAChG,OACE,qBAAC,QAAD;EACE,WAAW,CAAC,wBAAwB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACvE,cAAY;EACZ,MAAK;EACL,aAAU;EACV,GAAI;EALN,UAAA;GAOE,oBAAC,QAAD;IAAM,WAAU;IAA4B,eAAY;GAAQ,CAAA;GAChE,oBAAC,QAAD;IAAM,WAAU;IAA4B,eAAY;GAAQ,CAAA;GAChE,oBAAC,QAAD;IAAM,WAAU;IAA4B,eAAY;GAAQ,CAAA;GAChE,oBAAC,QAAD;IAAM,WAAU;IAA+B,UAAA;GAAY,CAAA;EACvD;;AAEV"}
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type PieBaseProps } from '../PieChart/PieCore';
3
+ export interface DoughnutChartProps extends PieBaseProps {
4
+ /** Figma `Show Center Content`. */
5
+ showCenterContent?: boolean;
6
+ /** Figma `Center Value` — the one number that matters. Keep it short. */
7
+ centerValue?: ReactNode;
8
+ /** Figma `Center Label`. */
9
+ centerLabel?: ReactNode;
10
+ }
11
+ /**
12
+ * Bodhan Doughnut Chart — part-to-whole ring with a centre summary (Heading/S value + Body/S label).
13
+ * Plain SVG driven by `data`; `role="img"` + hidden data table. Shared on every platform.
14
+ * Android: custom composable (Canvas drawArc, stroke) · iOS: Swift Charts SectorMark(innerRadius:).
15
+ */
16
+ export declare function DoughnutChart({ title, subtitle, showCenterContent, centerValue, centerLabel, summary, ...p }: DoughnutChartProps): import("react").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { PieCore } from "../PieChart/PieCore.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ // src/components/DoughnutChart/DoughnutChart.tsx
4
+ /**
5
+ * Bodhan Doughnut Chart — part-to-whole ring with a centre summary (Heading/S value + Body/S label).
6
+ * Plain SVG driven by `data`; `role="img"` + hidden data table. Shared on every platform.
7
+ * Android: custom composable (Canvas drawArc, stroke) · iOS: Swift Charts SectorMark(innerRadius:).
8
+ */
9
+ function DoughnutChart({ title = "Course Completion", subtitle = "Across all enrolled students", showCenterContent = true, centerValue = "72%", centerLabel = "Completion", summary, ...p }) {
10
+ const center = showCenterContent ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
11
+ className: "bodhan-doughnut__value",
12
+ children: centerValue
13
+ }), centerLabel && /* @__PURE__ */ jsx("span", {
14
+ className: "bodhan-doughnut__label",
15
+ children: centerLabel
16
+ })] }) : void 0;
17
+ const centerText = showCenterContent && typeof centerValue === "string" ? `${centerValue}${typeof centerLabel === "string" ? " " + centerLabel : ""}` : void 0;
18
+ return /* @__PURE__ */ jsx(PieCore, {
19
+ kind: "doughnut",
20
+ inner: .62,
21
+ center,
22
+ centerText,
23
+ title,
24
+ subtitle,
25
+ summary,
26
+ ...p
27
+ });
28
+ }
29
+ export { DoughnutChart };
30
+
31
+ //# sourceMappingURL=DoughnutChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DoughnutChart.js","names":["_Fragment"],"sources":["../../../src/components/DoughnutChart/DoughnutChart.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { PieCore, type PieBaseProps } from '../PieChart/PieCore';\n\nexport interface DoughnutChartProps extends PieBaseProps {\n /** Figma `Show Center Content`. */\n showCenterContent?: boolean;\n /** Figma `Center Value` — the one number that matters. Keep it short. */\n centerValue?: ReactNode;\n /** Figma `Center Label`. */\n centerLabel?: ReactNode;\n}\n\n/**\n * Bodhan Doughnut Chart — part-to-whole ring with a centre summary (Heading/S value + Body/S label).\n * Plain SVG driven by `data`; `role=\"img\"` + hidden data table. Shared on every platform.\n * Android: custom composable (Canvas drawArc, stroke) · iOS: Swift Charts SectorMark(innerRadius:).\n */\nexport function DoughnutChart({\n title = 'Course Completion', subtitle = 'Across all enrolled students', showCenterContent = true, centerValue = '72%',\n centerLabel = 'Completion', summary, ...p\n}: DoughnutChartProps) {\n const center = showCenterContent ? (\n <>\n <span className=\"bodhan-doughnut__value\">{centerValue}</span>\n {centerLabel && <span className=\"bodhan-doughnut__label\">{centerLabel}</span>}\n </>\n ) : undefined;\n const centerText = showCenterContent && typeof centerValue === 'string'\n ? `${centerValue}${typeof centerLabel === 'string' ? ' ' + centerLabel : ''}` : undefined;\n return <PieCore kind=\"doughnut\" inner={0.62} center={center} centerText={centerText} title={title} subtitle={subtitle} summary={summary} {...p} />;\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgB,cAAc,EAC5B,QAAQ,qBAAqB,WAAW,gCAAgC,oBAAoB,MAAM,cAAc,OAChH,cAAc,cAAc,SAAS,GAAG,KACnB;CACrB,MAAM,SAAS,oBACb,qBAAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EAAM,WAAU;EAA0B,UAAA;CAAkB,CAAA,GAC3D,eAAe,oBAAC,QAAD;EAAM,WAAU;EAA0B,UAAA;CAAkB,CAAA,CAC5E,EAAA,CAAA,IACA,KAAA;CACJ,MAAM,aAAa,qBAAqB,OAAO,gBAAgB,WAC3D,GAAG,cAAc,OAAO,gBAAgB,WAAW,MAAM,cAAc,OAAO,KAAA;CAClF,OAAO,oBAAC,SAAD;EAAS,MAAK;EAAW,OAAO;EAAc;EAAoB;EAAmB;EAAiB;EAAmB;EAAS,GAAI;CAAI,CAAA;AACnJ"}
@@ -0,0 +1,39 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ export type DrawerPosition = 'left' | 'right';
3
+ export interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
4
+ /** Open state. */
5
+ open?: boolean;
6
+ /** Called by close, Esc, scrim click and the footer buttons. Set `open` to false in it. */
7
+ onClose?: () => void;
8
+ /** Figma `Heading`. */
9
+ heading?: ReactNode;
10
+ /** Figma `Show Subtitle`. */
11
+ showSubtitle?: boolean;
12
+ /** Figma `Subtitle`. */
13
+ subtitle?: ReactNode;
14
+ /** Figma `Show Save Button`. */
15
+ showSaveButton?: boolean;
16
+ /** Figma `Show Cancel Button`. */
17
+ showCancelButton?: boolean;
18
+ /** Save label / handler. */
19
+ saveLabel?: ReactNode;
20
+ onSave?: () => void;
21
+ /** Cancel label. */
22
+ cancelLabel?: ReactNode;
23
+ /** Figma `Position`: the edge the drawer slides in from. */
24
+ position?: DrawerPosition;
25
+ /** Esc and scrim click close the drawer. */
26
+ dismissible?: boolean;
27
+ /** Render scrim + panel in normal flow, filling the parent (docs, Figma check). No top layer, no focus trap. */
28
+ inline?: boolean;
29
+ /** Accessible name of the close button. */
30
+ closeLabel?: string;
31
+ /** Body (Figma content slot). Defaults to the two example fields from Figma. */
32
+ children?: ReactNode;
33
+ }
34
+ /**
35
+ * Bodhan Drawer — side sheet over a scrim (native `<dialog>`, focus trapped, Esc / scrim close, focus restored).
36
+ * Platform look from `data-platform`: Web Surface/Elevated + Elevation/5 · iOS glass shadow, Mobile type ·
37
+ * Android M3 Surface/ContainerLow, no shadow. Android: ModalNavigationDrawer / side sheet · iOS: .inspector.
38
+ */
39
+ export declare function Drawer({ open, onClose, heading, showSubtitle, subtitle, showSaveButton, showCancelButton, saveLabel, onSave, cancelLabel, position, dismissible, inline, closeLabel, children, className, id, ...rest }: DrawerProps): import("react").JSX.Element | null;