@heymantle/litho 0.0.15 → 0.0.16

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 (371) hide show
  1. package/AI_COMPONENTS_GUIDE.md +28 -15
  2. package/AI_INTEGRATION_GUIDE.md +3 -3
  3. package/AI_PATTERNS_GUIDE.md +59 -25
  4. package/COMPONENT_QUICK_REFERENCE.md +3 -3
  5. package/dist/cjs/components/ActionList.js +33 -25
  6. package/dist/cjs/components/AnnouncementBar.js +115 -18
  7. package/dist/cjs/components/AnnouncementCard.js +269 -0
  8. package/dist/cjs/components/AppProvider.js +15 -2
  9. package/dist/cjs/components/Autocomplete.js +58 -36
  10. package/dist/cjs/components/Badge.js +28 -14
  11. package/dist/cjs/components/Banner.js +37 -27
  12. package/dist/cjs/components/Box.js +50 -38
  13. package/dist/cjs/components/Button.js +338 -109
  14. package/dist/cjs/components/ButtonGroup.js +27 -14
  15. package/dist/cjs/components/Card.js +311 -143
  16. package/dist/cjs/components/Checkbox.js +55 -47
  17. package/dist/cjs/components/CheckboxCard.js +222 -0
  18. package/dist/cjs/components/CheckboxCardGroup.js +384 -0
  19. package/dist/cjs/components/ChoiceList.js +21 -11
  20. package/dist/cjs/components/Code.js +22 -8
  21. package/dist/cjs/components/Collapsible.js +24 -11
  22. package/dist/cjs/components/ColorField.js +163 -38
  23. package/dist/cjs/components/ContextualSaveBar.js +13 -6
  24. package/dist/cjs/components/DatePicker.js +48 -37
  25. package/dist/cjs/components/Disclosure.js +35 -22
  26. package/dist/cjs/components/Divider.js +82 -18
  27. package/dist/cjs/components/DropZone.js +111 -37
  28. package/dist/cjs/components/EmptyState.js +18 -6
  29. package/dist/cjs/components/Filters.js +84 -36
  30. package/dist/cjs/components/FooterHelp.js +14 -4
  31. package/dist/cjs/components/Form.js +13 -2
  32. package/dist/cjs/components/Frame.js +57 -22
  33. package/dist/cjs/components/FrameSaveBar.js +37 -6
  34. package/dist/cjs/components/Grid.js +31 -15
  35. package/dist/cjs/components/HorizontalStack.js +38 -25
  36. package/dist/cjs/components/Icon.js +683 -61
  37. package/dist/cjs/components/Image.js +35 -22
  38. package/dist/cjs/components/InlineError.js +19 -10
  39. package/dist/cjs/components/Label.js +21 -12
  40. package/dist/cjs/components/Layout.js +33 -24
  41. package/dist/cjs/components/LayoutSection.js +84 -22
  42. package/dist/cjs/components/Link.js +35 -22
  43. package/dist/cjs/components/List.js +28 -12
  44. package/dist/cjs/components/Listbox.js +53 -31
  45. package/dist/cjs/components/Loading.js +14 -2
  46. package/dist/cjs/components/Modal.js +22 -40
  47. package/dist/cjs/components/Navigation.js +107 -36
  48. package/dist/cjs/components/Page.js +44 -31
  49. package/dist/cjs/components/Pagination.js +20 -5
  50. package/dist/cjs/components/Pane.js +67 -4
  51. package/dist/cjs/components/Popover.js +37 -21
  52. package/dist/cjs/components/PopoverManager.js +14 -1
  53. package/dist/cjs/components/ProgressBar.js +28 -15
  54. package/dist/cjs/components/RadioButton.js +32 -24
  55. package/dist/cjs/components/RadioButtonCard.js +92 -67
  56. package/dist/cjs/components/RadioButtonCardGroup.js +379 -0
  57. package/dist/cjs/components/RangeSlider.js +34 -26
  58. package/dist/cjs/components/ResourceList.js +28 -14
  59. package/dist/cjs/components/Select.js +38 -26
  60. package/dist/cjs/components/SkeletonText.js +33 -18
  61. package/dist/cjs/components/Spinner.js +24 -12
  62. package/dist/cjs/components/Stack.js +131 -71
  63. package/dist/cjs/components/TabNavigation.js +27 -1
  64. package/dist/cjs/components/Table.js +58 -18
  65. package/dist/cjs/components/Tabs.js +52 -23
  66. package/dist/cjs/components/Tag.js +37 -16
  67. package/dist/cjs/components/Text.js +32 -18
  68. package/dist/cjs/components/TextField.js +119 -69
  69. package/dist/cjs/components/Thumbnail.js +25 -11
  70. package/dist/cjs/components/TimePicker.js +22 -1
  71. package/dist/cjs/components/Tip.js +140 -25
  72. package/dist/cjs/components/ToastNotification.js +107 -34
  73. package/dist/cjs/components/ToastProvider.js +13 -3
  74. package/dist/cjs/components/Tooltip.js +50 -41
  75. package/dist/cjs/components/TopBar.js +83 -9
  76. package/dist/cjs/components/VerticalStack.js +31 -16
  77. package/dist/cjs/index.js +24 -0
  78. package/dist/cjs/stories/Autocomplete.stories.js +10 -10
  79. package/dist/cjs/stories/Checkbox.stories.js +6 -8
  80. package/dist/cjs/stories/CheckboxCardGroup.stories.js +459 -0
  81. package/dist/cjs/stories/Collapsible.stories.js +11 -11
  82. package/dist/cjs/stories/ColorField.stories.js +2 -3
  83. package/dist/cjs/stories/ComplexExamples.stories.js +48 -77
  84. package/dist/cjs/stories/ContextualSaveBar.stories.js +1 -1
  85. package/dist/cjs/stories/Divider.stories.js +15 -16
  86. package/dist/cjs/stories/DropZone.stories.js +3 -3
  87. package/dist/cjs/stories/FooterHelp.stories.js +3 -4
  88. package/dist/cjs/stories/Form.stories.js +2 -4
  89. package/dist/cjs/stories/Grid.stories.js +24 -33
  90. package/dist/cjs/stories/Icon.stories.js +22 -23
  91. package/dist/cjs/stories/Image.stories.js +12 -15
  92. package/dist/cjs/stories/InlineError.stories.js +0 -1
  93. package/dist/cjs/stories/Layout.stories.js +96 -2
  94. package/dist/cjs/stories/LayoutSection.stories.js +13 -18
  95. package/dist/cjs/stories/List.stories.js +24 -28
  96. package/dist/cjs/stories/Listbox.stories.js +2 -2
  97. package/dist/cjs/stories/Loading.stories.js +21 -25
  98. package/dist/cjs/stories/Modal.stories.js +0 -1
  99. package/dist/cjs/stories/Pagination.stories.js +4 -4
  100. package/dist/cjs/stories/Pane.stories.js +10 -18
  101. package/dist/cjs/stories/Popover.stories.js +7 -7
  102. package/dist/cjs/stories/PopoverManager.stories.js +9 -9
  103. package/dist/cjs/stories/ProgressBar.stories.js +8 -8
  104. package/dist/cjs/stories/RadioButton.stories.js +2 -2
  105. package/dist/cjs/stories/RadioButtonCard.stories.js +2 -2
  106. package/dist/cjs/stories/RadioButtonCardGroup.stories.js +502 -0
  107. package/dist/cjs/stories/RangeSlider.stories.js +1 -3
  108. package/dist/cjs/stories/ResourceList.stories.js +13 -13
  109. package/dist/cjs/stories/Spinner.stories.js +9 -9
  110. package/dist/cjs/stories/Stack.stories.js +233 -51
  111. package/dist/cjs/stories/Tabs.stories.js +2 -2
  112. package/dist/cjs/stories/Tag.stories.js +1 -1
  113. package/dist/cjs/stories/Thumbnail.stories.js +17 -18
  114. package/dist/cjs/stories/TimePicker.stories.js +0 -5
  115. package/dist/cjs/stories/Tip.stories.js +1 -1
  116. package/dist/esm/components/ActionList.js +33 -25
  117. package/dist/esm/components/AnnouncementBar.js +115 -18
  118. package/dist/esm/components/AnnouncementCard.js +254 -0
  119. package/dist/esm/components/AppProvider.js +15 -2
  120. package/dist/esm/components/Autocomplete.js +58 -36
  121. package/dist/esm/components/Badge.js +28 -14
  122. package/dist/esm/components/Banner.js +37 -27
  123. package/dist/esm/components/Box.js +50 -38
  124. package/dist/esm/components/Button.js +338 -109
  125. package/dist/esm/components/ButtonGroup.js +27 -14
  126. package/dist/esm/components/Card.js +300 -140
  127. package/dist/esm/components/Checkbox.js +55 -47
  128. package/dist/esm/components/CheckboxCard.js +207 -0
  129. package/dist/esm/components/CheckboxCardGroup.js +370 -0
  130. package/dist/esm/components/ChoiceList.js +21 -11
  131. package/dist/esm/components/Code.js +22 -8
  132. package/dist/esm/components/Collapsible.js +24 -11
  133. package/dist/esm/components/ColorField.js +165 -40
  134. package/dist/esm/components/ContextualSaveBar.js +13 -6
  135. package/dist/esm/components/DatePicker.js +48 -37
  136. package/dist/esm/components/Disclosure.js +35 -22
  137. package/dist/esm/components/Divider.js +78 -20
  138. package/dist/esm/components/DropZone.js +111 -37
  139. package/dist/esm/components/EmptyState.js +18 -6
  140. package/dist/esm/components/Filters.js +84 -36
  141. package/dist/esm/components/FooterHelp.js +14 -4
  142. package/dist/esm/components/Form.js +13 -2
  143. package/dist/esm/components/Frame.js +57 -22
  144. package/dist/esm/components/FrameSaveBar.js +37 -6
  145. package/dist/esm/components/Grid.js +31 -15
  146. package/dist/esm/components/HorizontalStack.js +38 -25
  147. package/dist/esm/components/Icon.js +681 -62
  148. package/dist/esm/components/Image.js +35 -22
  149. package/dist/esm/components/InlineError.js +19 -10
  150. package/dist/esm/components/Label.js +21 -12
  151. package/dist/esm/components/Layout.js +58 -25
  152. package/dist/esm/components/LayoutSection.js +84 -22
  153. package/dist/esm/components/Link.js +35 -22
  154. package/dist/esm/components/List.js +28 -12
  155. package/dist/esm/components/Listbox.js +53 -31
  156. package/dist/esm/components/Loading.js +14 -2
  157. package/dist/esm/components/Modal.js +69 -41
  158. package/dist/esm/components/Navigation.js +107 -36
  159. package/dist/esm/components/Page.js +44 -31
  160. package/dist/esm/components/Pagination.js +20 -5
  161. package/dist/esm/components/Pane.js +67 -4
  162. package/dist/esm/components/Popover.js +37 -21
  163. package/dist/esm/components/PopoverManager.js +14 -1
  164. package/dist/esm/components/ProgressBar.js +28 -15
  165. package/dist/esm/components/RadioButton.js +32 -24
  166. package/dist/esm/components/RadioButtonCard.js +92 -67
  167. package/dist/esm/components/RadioButtonCardGroup.js +364 -0
  168. package/dist/esm/components/RangeSlider.js +34 -26
  169. package/dist/esm/components/ResourceList.js +28 -14
  170. package/dist/esm/components/Select.js +38 -26
  171. package/dist/esm/components/SkeletonText.js +33 -18
  172. package/dist/esm/components/Spinner.js +24 -12
  173. package/dist/esm/components/Stack.js +131 -71
  174. package/dist/esm/components/TabNavigation.js +27 -1
  175. package/dist/esm/components/Table.js +58 -18
  176. package/dist/esm/components/Tabs.js +52 -23
  177. package/dist/esm/components/Tag.js +37 -16
  178. package/dist/esm/components/Text.js +32 -18
  179. package/dist/esm/components/TextField.js +119 -69
  180. package/dist/esm/components/Thumbnail.js +25 -11
  181. package/dist/esm/components/TimePicker.js +22 -1
  182. package/dist/esm/components/Tip.js +140 -25
  183. package/dist/esm/components/ToastNotification.js +107 -34
  184. package/dist/esm/components/ToastProvider.js +13 -3
  185. package/dist/esm/components/Tooltip.js +50 -41
  186. package/dist/esm/components/TopBar.js +83 -9
  187. package/dist/esm/components/VerticalStack.js +31 -16
  188. package/dist/esm/index.js +6 -0
  189. package/dist/esm/stories/Autocomplete.stories.js +10 -10
  190. package/dist/esm/stories/Checkbox.stories.js +6 -8
  191. package/dist/esm/stories/CheckboxCardGroup.stories.js +421 -0
  192. package/dist/esm/stories/Collapsible.stories.js +11 -11
  193. package/dist/esm/stories/ColorField.stories.js +2 -3
  194. package/dist/esm/stories/ComplexExamples.stories.js +48 -77
  195. package/dist/esm/stories/ContextualSaveBar.stories.js +1 -1
  196. package/dist/esm/stories/Divider.stories.js +15 -16
  197. package/dist/esm/stories/DropZone.stories.js +3 -3
  198. package/dist/esm/stories/FooterHelp.stories.js +3 -4
  199. package/dist/esm/stories/Form.stories.js +2 -4
  200. package/dist/esm/stories/Grid.stories.js +24 -33
  201. package/dist/esm/stories/Icon.stories.js +22 -23
  202. package/dist/esm/stories/Image.stories.js +12 -15
  203. package/dist/esm/stories/InlineError.stories.js +0 -1
  204. package/dist/esm/stories/Layout.stories.js +93 -2
  205. package/dist/esm/stories/LayoutSection.stories.js +13 -18
  206. package/dist/esm/stories/List.stories.js +24 -28
  207. package/dist/esm/stories/Listbox.stories.js +2 -2
  208. package/dist/esm/stories/Loading.stories.js +21 -25
  209. package/dist/esm/stories/Modal.stories.js +0 -1
  210. package/dist/esm/stories/Pagination.stories.js +4 -4
  211. package/dist/esm/stories/Pane.stories.js +10 -18
  212. package/dist/esm/stories/Popover.stories.js +7 -7
  213. package/dist/esm/stories/PopoverManager.stories.js +9 -9
  214. package/dist/esm/stories/ProgressBar.stories.js +8 -8
  215. package/dist/esm/stories/RadioButton.stories.js +2 -2
  216. package/dist/esm/stories/RadioButtonCard.stories.js +2 -2
  217. package/dist/esm/stories/RadioButtonCardGroup.stories.js +461 -0
  218. package/dist/esm/stories/RangeSlider.stories.js +1 -3
  219. package/dist/esm/stories/ResourceList.stories.js +13 -13
  220. package/dist/esm/stories/Spinner.stories.js +9 -9
  221. package/dist/esm/stories/Stack.stories.js +224 -51
  222. package/dist/esm/stories/Tabs.stories.js +2 -2
  223. package/dist/esm/stories/Tag.stories.js +1 -1
  224. package/dist/esm/stories/Thumbnail.stories.js +17 -18
  225. package/dist/esm/stories/TimePicker.stories.js +0 -5
  226. package/dist/esm/stories/Tip.stories.js +1 -1
  227. package/dist/types/components/ActionList.d.ts +1 -31
  228. package/dist/types/components/ActionList.d.ts.map +1 -1
  229. package/dist/types/components/AnnouncementBar.d.ts +1 -19
  230. package/dist/types/components/AnnouncementBar.d.ts.map +1 -1
  231. package/dist/types/components/AnnouncementCard.d.ts +3 -0
  232. package/dist/types/components/AnnouncementCard.d.ts.map +1 -0
  233. package/dist/types/components/AppProvider.d.ts +14 -1
  234. package/dist/types/components/AppProvider.d.ts.map +1 -1
  235. package/dist/types/components/Autocomplete.d.ts +1 -71
  236. package/dist/types/components/Autocomplete.d.ts.map +1 -1
  237. package/dist/types/components/Badge.d.ts +1 -19
  238. package/dist/types/components/Badge.d.ts.map +1 -1
  239. package/dist/types/components/Banner.d.ts +1 -37
  240. package/dist/types/components/Banner.d.ts.map +1 -1
  241. package/dist/types/components/Box.d.ts +1 -68
  242. package/dist/types/components/Box.d.ts.map +1 -1
  243. package/dist/types/components/Button.d.ts +1 -131
  244. package/dist/types/components/Button.d.ts.map +1 -1
  245. package/dist/types/components/ButtonGroup.d.ts +1 -22
  246. package/dist/types/components/ButtonGroup.d.ts.map +1 -1
  247. package/dist/types/components/Card.d.ts +54 -59
  248. package/dist/types/components/Card.d.ts.map +1 -1
  249. package/dist/types/components/Checkbox.d.ts +1 -63
  250. package/dist/types/components/Checkbox.d.ts.map +1 -1
  251. package/dist/types/components/CheckboxCard.d.ts +3 -0
  252. package/dist/types/components/CheckboxCard.d.ts.map +1 -0
  253. package/dist/types/components/CheckboxCardGroup.d.ts +3 -0
  254. package/dist/types/components/CheckboxCardGroup.d.ts.map +1 -0
  255. package/dist/types/components/ChoiceList.d.ts +1 -42
  256. package/dist/types/components/ChoiceList.d.ts.map +1 -1
  257. package/dist/types/components/Code.d.ts +1 -26
  258. package/dist/types/components/Code.d.ts.map +1 -1
  259. package/dist/types/components/Collapsible.d.ts +1 -15
  260. package/dist/types/components/Collapsible.d.ts.map +1 -1
  261. package/dist/types/components/ColorField.d.ts +13 -34
  262. package/dist/types/components/ColorField.d.ts.map +1 -1
  263. package/dist/types/components/ContextualSaveBar.d.ts +13 -6
  264. package/dist/types/components/ContextualSaveBar.d.ts.map +1 -1
  265. package/dist/types/components/DatePicker.d.ts +1 -64
  266. package/dist/types/components/DatePicker.d.ts.map +1 -1
  267. package/dist/types/components/Disclosure.d.ts +1 -25
  268. package/dist/types/components/Disclosure.d.ts.map +1 -1
  269. package/dist/types/components/Divider.d.ts +1 -19
  270. package/dist/types/components/Divider.d.ts.map +1 -1
  271. package/dist/types/components/DropZone.d.ts +1 -62
  272. package/dist/types/components/DropZone.d.ts.map +1 -1
  273. package/dist/types/components/EmptyState.d.ts +1 -50
  274. package/dist/types/components/EmptyState.d.ts.map +1 -1
  275. package/dist/types/components/Filters.d.ts +13 -68
  276. package/dist/types/components/Filters.d.ts.map +1 -1
  277. package/dist/types/components/FooterHelp.d.ts +14 -4
  278. package/dist/types/components/FooterHelp.d.ts.map +1 -1
  279. package/dist/types/components/Form.d.ts +13 -2
  280. package/dist/types/components/Form.d.ts.map +1 -1
  281. package/dist/types/components/Frame.d.ts +15 -36
  282. package/dist/types/components/Frame.d.ts.map +1 -1
  283. package/dist/types/components/FrameSaveBar.d.ts +3 -6
  284. package/dist/types/components/FrameSaveBar.d.ts.map +1 -1
  285. package/dist/types/components/Grid.d.ts +5 -21
  286. package/dist/types/components/Grid.d.ts.map +1 -1
  287. package/dist/types/components/HorizontalStack.d.ts +1 -34
  288. package/dist/types/components/HorizontalStack.d.ts.map +1 -1
  289. package/dist/types/components/Icon.d.ts +1 -41
  290. package/dist/types/components/Icon.d.ts.map +1 -1
  291. package/dist/types/components/Image.d.ts +1 -43
  292. package/dist/types/components/Image.d.ts.map +1 -1
  293. package/dist/types/components/InlineError.d.ts +1 -20
  294. package/dist/types/components/InlineError.d.ts.map +1 -1
  295. package/dist/types/components/Label.d.ts +1 -26
  296. package/dist/types/components/Label.d.ts.map +1 -1
  297. package/dist/types/components/Layout.d.ts +24 -15
  298. package/dist/types/components/Layout.d.ts.map +1 -1
  299. package/dist/types/components/LayoutSection.d.ts +1 -19
  300. package/dist/types/components/LayoutSection.d.ts.map +1 -1
  301. package/dist/types/components/Link.d.ts +1 -37
  302. package/dist/types/components/Link.d.ts.map +1 -1
  303. package/dist/types/components/List.d.ts +5 -17
  304. package/dist/types/components/List.d.ts.map +1 -1
  305. package/dist/types/components/Listbox.d.ts +1 -32
  306. package/dist/types/components/Listbox.d.ts.map +1 -1
  307. package/dist/types/components/Loading.d.ts +14 -2
  308. package/dist/types/components/Loading.d.ts.map +1 -1
  309. package/dist/types/components/Modal.d.ts +26 -35
  310. package/dist/types/components/Modal.d.ts.map +1 -1
  311. package/dist/types/components/Navigation.d.ts +1 -25
  312. package/dist/types/components/Navigation.d.ts.map +1 -1
  313. package/dist/types/components/Page.d.ts +1 -57
  314. package/dist/types/components/Page.d.ts.map +1 -1
  315. package/dist/types/components/Pagination.d.ts +13 -3
  316. package/dist/types/components/Pagination.d.ts.map +1 -1
  317. package/dist/types/components/Pane.d.ts +55 -3
  318. package/dist/types/components/Pane.d.ts.map +1 -1
  319. package/dist/types/components/Popover.d.ts +5 -37
  320. package/dist/types/components/Popover.d.ts.map +1 -1
  321. package/dist/types/components/PopoverManager.d.ts.map +1 -1
  322. package/dist/types/components/ProgressBar.d.ts +1 -22
  323. package/dist/types/components/ProgressBar.d.ts.map +1 -1
  324. package/dist/types/components/RadioButton.d.ts +1 -37
  325. package/dist/types/components/RadioButton.d.ts.map +1 -1
  326. package/dist/types/components/RadioButtonCard.d.ts +1 -39
  327. package/dist/types/components/RadioButtonCard.d.ts.map +1 -1
  328. package/dist/types/components/RadioButtonCardGroup.d.ts +3 -0
  329. package/dist/types/components/RadioButtonCardGroup.d.ts.map +1 -0
  330. package/dist/types/components/RangeSlider.d.ts +1 -42
  331. package/dist/types/components/RangeSlider.d.ts.map +1 -1
  332. package/dist/types/components/ResourceList.d.ts +5 -30
  333. package/dist/types/components/ResourceList.d.ts.map +1 -1
  334. package/dist/types/components/Select.d.ts +1 -46
  335. package/dist/types/components/Select.d.ts.map +1 -1
  336. package/dist/types/components/SkeletonText.d.ts +1 -26
  337. package/dist/types/components/SkeletonText.d.ts.map +1 -1
  338. package/dist/types/components/Spinner.d.ts +1 -16
  339. package/dist/types/components/Spinner.d.ts.map +1 -1
  340. package/dist/types/components/Stack.d.ts +1 -47
  341. package/dist/types/components/Stack.d.ts.map +1 -1
  342. package/dist/types/components/TabNavigation.d.ts.map +1 -1
  343. package/dist/types/components/Table.d.ts +13 -58
  344. package/dist/types/components/Table.d.ts.map +1 -1
  345. package/dist/types/components/Tabs.d.ts +3 -41
  346. package/dist/types/components/Tabs.d.ts.map +1 -1
  347. package/dist/types/components/Tag.d.ts +1 -24
  348. package/dist/types/components/Tag.d.ts.map +1 -1
  349. package/dist/types/components/Text.d.ts +1 -30
  350. package/dist/types/components/Text.d.ts.map +1 -1
  351. package/dist/types/components/TextField.d.ts +1 -109
  352. package/dist/types/components/TextField.d.ts.map +1 -1
  353. package/dist/types/components/Thumbnail.d.ts +1 -16
  354. package/dist/types/components/Thumbnail.d.ts.map +1 -1
  355. package/dist/types/components/TimePicker.d.ts +28 -1
  356. package/dist/types/components/TimePicker.d.ts.map +1 -1
  357. package/dist/types/components/Tip.d.ts +1 -21
  358. package/dist/types/components/Tip.d.ts.map +1 -1
  359. package/dist/types/components/ToastNotification.d.ts +1 -34
  360. package/dist/types/components/ToastNotification.d.ts.map +1 -1
  361. package/dist/types/components/ToastProvider.d.ts +13 -3
  362. package/dist/types/components/ToastProvider.d.ts.map +1 -1
  363. package/dist/types/components/Tooltip.d.ts +1 -54
  364. package/dist/types/components/Tooltip.d.ts.map +1 -1
  365. package/dist/types/components/TopBar.d.ts +1 -19
  366. package/dist/types/components/TopBar.d.ts.map +1 -1
  367. package/dist/types/components/VerticalStack.d.ts +1 -25
  368. package/dist/types/components/VerticalStack.d.ts.map +1 -1
  369. package/dist/types/index.d.ts +6 -0
  370. package/index.css +76 -14
  371. package/package.json +4 -3
@@ -125,7 +125,35 @@ function _unsupported_iterable_to_array(o, minLen) {
125
125
  if (n === "Map" || n === "Set") return Array.from(n);
126
126
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
127
127
  }
128
- // Reference counter for pane open state (shared across all Pane components)
128
+ /**
129
+ * @component Pane
130
+ *
131
+ * @description A slide-in side panel overlay for displaying supplementary content, detail views, or multi-tab workflows alongside the main page.
132
+ *
133
+ * @usage
134
+ * - DO: Use for secondary content panels that slide in from the side without blocking the main page.
135
+ * - DON'T: Use for focused tasks requiring full attention (use Modal).
136
+ *
137
+ * @accessibility
138
+ * - Manages focus within the pane when open; supports keyboard dismissal via Escape key. Ensure title provides context.
139
+ *
140
+ * @alternative
141
+ * - If you need a blocking dialog, use `Modal`. If you need inline expandable content, use `Collapsible`.
142
+ *
143
+ * @param {Object} props - Component properties.
144
+ * @param {boolean} props.open - Whether the pane is open.
145
+ * @param {Function} [props.onClose] - Callback fired when the pane is closed.
146
+ * @param {Function} [props.onOpen] - Callback fired when the pane should be opened (for auto-open functionality).
147
+ * @param {React.ReactNode} props.children - Content to render inside the pane.
148
+ * @param {Object} [props.tabStorage] - Shared tab storage object for managing pane tabs.
149
+ * @param {Function} [props.onTabRemove] - Callback when a tab is removed, receives (tabId, tab).
150
+ * @param {Object} [props.onExpandRef] - Ref to expose the expand function to the parent.
151
+ * @param {string} [props.tabId] - Optional tab ID; if provided, will reuse an existing tab with this ID.
152
+ * @param {string} [props.tabTitle] - Tab title to display.
153
+ * @param {string} [props.tabKey] - Optional stable key for tab deduplication.
154
+ * @param {string} [props.orgId] - Optional organization ID to scope the pane state.
155
+ * @returns {JSX.Element|null} The rendered Pane component, or null if not open.
156
+ */ // Reference counter for pane open state (shared across all Pane components)
129
157
  var paneOpenCount = 0;
130
158
  var MIN_PANE_WIDTH = 360;
131
159
  var MAX_PANE_WIDTH = 800;
@@ -727,7 +755,21 @@ function Pane() {
727
755
  })
728
756
  });
729
757
  }
730
- function Header() {
758
+ /**
759
+ * @component Pane.Header
760
+ *
761
+ * @usage
762
+ * - DO: Provide title and close action for the pane.
763
+ *
764
+ * @param {Object} props - Component properties.
765
+ * @param {string|React.ReactNode} [props.title] - Title text or custom element for the header.
766
+ * @param {string|React.ReactNode} [props.subtitle] - Subtitle text or custom element.
767
+ * @param {Array<Object>} [props.actions=[]] - Array of action button configurations.
768
+ * @param {boolean} [props.bottomBorder=true] - Whether to show a bottom border.
769
+ * @param {React.ReactNode} [props.subHeader] - Additional content rendered below the header row.
770
+ * @param {Object} [props.backAction] - Back navigation action with onAction callback and accessibilityLabel.
771
+ * @returns {JSX.Element} The rendered Pane.Header component.
772
+ */ function Header() {
731
773
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
732
774
  var title = props.title, subtitle = props.subtitle, _props_actions = props.actions, actions = _props_actions === void 0 ? [] : _props_actions, _props_bottomBorder = props.bottomBorder, bottomBorder = _props_bottomBorder === void 0 ? true : _props_bottomBorder, subHeader = props.subHeader, tmp = props.backAction, _backAction = tmp === void 0 ? null : tmp;
733
775
  var _useState = _sliced_to_array((0, _react.useState)(null), 2), showActionsPopover = _useState[0], setShowActionsPopover = _useState[1];
@@ -819,7 +861,18 @@ function Header() {
819
861
  });
820
862
  }
821
863
  Pane.Header = Header;
822
- function Content() {
864
+ /**
865
+ * @component Pane.Content
866
+ *
867
+ * @usage
868
+ * - DO: Wrap scrollable content within the pane.
869
+ *
870
+ * @param {Object} props - Component properties.
871
+ * @param {React.ReactNode} props.children - Content to render inside the pane body.
872
+ * @param {boolean} [props.padded=true] - Whether to apply padding to the content area.
873
+ * @param {string} [props.className] - Additional CSS class names.
874
+ * @returns {JSX.Element} The rendered Pane.Content component.
875
+ */ function Content() {
823
876
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
824
877
  var children = props.children, _props_padded = props.padded, padded = _props_padded === void 0 ? true : _props_padded, className = props.className;
825
878
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
@@ -828,7 +881,17 @@ function Content() {
828
881
  });
829
882
  }
830
883
  Pane.Content = Content;
831
- function Footer() {
884
+ /**
885
+ * @component Pane.Footer
886
+ *
887
+ * @usage
888
+ * - DO: Place action buttons at the bottom of the pane.
889
+ *
890
+ * @param {Object} props - Component properties.
891
+ * @param {React.ReactNode} props.children - Content to render inside the footer.
892
+ * @param {boolean} [props.topBorder=true] - Whether to show a top border.
893
+ * @returns {JSX.Element} The rendered Pane.Footer component.
894
+ */ function Footer() {
832
895
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
833
896
  var children = props.children, _props_topBorder = props.topBorder, topBorder = _props_topBorder === void 0 ? true : _props_topBorder;
834
897
  var isMobile = (0, _useMobile.useMobile)(MOBILE_BREAKPOINT);
@@ -158,24 +158,21 @@ function _unsupported_iterable_to_array(o, minLen) {
158
158
  if (n === "Map" || n === "Set") return Array.from(n);
159
159
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
160
160
  }
161
- var TOP_SPACING = 4;
162
- var EDGE_SPACING = 16;
163
- var styles = (0, _tailwindvariants.tv)({
164
- base: "Litho-Popover bg-surface-highest rounded-sm max-h-100 overflow-y-auto overflow-x-hidden shadow-popover dark:shadow-popover-dark outline outline-tint-3 min-w-32 overscroll-contain dark:outline-hidden dark:border-t dark:border-tint-alt-2",
165
- variants: {
166
- maxWidth: {
167
- default: "max-w-80",
168
- datePicker: "max-w-75 @sm:max-w-full",
169
- none: ""
170
- },
171
- sectioned: {
172
- true: "Litho-Popover--Sectioned p-4",
173
- false: ""
174
- }
175
- }
176
- });
177
161
  /**
178
- * Popover component for displaying an overlay near an activator.
162
+ * @component Popover
163
+ *
164
+ * @description An anchored floating panel that displays interactive content like menus, forms, or action lists when triggered.
165
+ *
166
+ * @usage
167
+ * - DO: Display interactive content (menus, forms, pickers) anchored to a trigger.
168
+ * - DON'T: Use for simple text hints (use Tooltip).
169
+ *
170
+ * @accessibility
171
+ * - Manages focus trap and keyboard dismissal (Escape key); ensure the trigger has `aria-expanded` and `aria-haspopup`.
172
+ *
173
+ * @alternative
174
+ * - If you need non-interactive supplementary text, use `Tooltip`.
175
+ * - If you need a full dialog, use `Modal`.
179
176
  *
180
177
  * @param {Object} props - The component props.
181
178
  * @param {string|React.ComponentType} [props.activatorWrapper="div"] - The wrapper element for the activator.
@@ -193,7 +190,23 @@ var styles = (0, _tailwindvariants.tv)({
193
190
  * @param {string} [props.className] - Additional class name for the popover.
194
191
  * @param {string} [props.containerClassName] - Additional class name for the popover container.
195
192
  * @returns {JSX.Element} The rendered popover component.
196
- */ function Popover() {
193
+ */ var TOP_SPACING = 4;
194
+ var EDGE_SPACING = 16;
195
+ var styles = (0, _tailwindvariants.tv)({
196
+ base: "Litho-Popover bg-surface-highest rounded-sm max-h-100 overflow-y-auto overflow-x-hidden shadow-popover dark:shadow-popover-dark outline outline-tint-3 min-w-32 overscroll-contain dark:outline-hidden dark:border-t dark:border-tint-alt-2",
197
+ variants: {
198
+ maxWidth: {
199
+ default: "max-w-80",
200
+ datePicker: "max-w-75 @sm:max-w-full",
201
+ none: ""
202
+ },
203
+ sectioned: {
204
+ true: "Litho-Popover--Sectioned p-4",
205
+ false: ""
206
+ }
207
+ }
208
+ });
209
+ function Popover() {
197
210
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
198
211
  var activatorWrapper = props.activatorWrapper, _props_activatorDisplayType = props.activatorDisplayType, activatorDisplayType = _props_activatorDisplayType === void 0 ? "inline-block" : _props_activatorDisplayType, activator = props.activator, children = props.children, onClose = props.onClose, activeProp = props.active, fixed = props.fixed, zIndexOverride = props.zIndexOverride, _props_sectioned = props.sectioned, sectioned = _props_sectioned === void 0 ? false : _props_sectioned, _props_preferredAlignment = props.preferredAlignment, preferredAlignment = _props_preferredAlignment === void 0 ? "center" : _props_preferredAlignment, _props_preferredPosition = props.preferredPosition, preferredPosition = _props_preferredPosition === void 0 ? "below" : _props_preferredPosition, _props_horizontalOffset = props.horizontalOffset, horizontalOffset = _props_horizontalOffset === void 0 ? 0 : _props_horizontalOffset, _props_matchActivatorWidth = props.matchActivatorWidth, matchActivatorWidth = _props_matchActivatorWidth === void 0 ? false : _props_matchActivatorWidth, _props_maxWidth = props.maxWidth, maxWidth = _props_maxWidth === void 0 ? "default" : _props_maxWidth, className = props.className, containerClassName = props.containerClassName, _props_closeOnResize = props.closeOnResize, closeOnResize = _props_closeOnResize === void 0 ? true : _props_closeOnResize, _props_debounceResizeObserver = props.debounceResizeObserver, debounceResizeObserver = _props_debounceResizeObserver === void 0 ? false : _props_debounceResizeObserver, _props_usePortal = props.usePortal, usePortal = _props_usePortal === void 0 ? true : _props_usePortal;
199
212
  var ActivatorWrapper = activatorWrapper || "div";
@@ -465,7 +478,7 @@ var styles = (0, _tailwindvariants.tv)({
465
478
  children: memoizedActivator
466
479
  }),
467
480
  active && typeof children !== "undefined" && (usePortal ? /*#__PURE__*/ (0, _reactdom.createPortal)(/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
468
- className: "@container",
481
+ className: "@container/main",
469
482
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
470
483
  ref: popoverRef,
471
484
  style: popoverStyle,
@@ -473,7 +486,7 @@ var styles = (0, _tailwindvariants.tv)({
473
486
  children: children
474
487
  })
475
488
  }), document.body) : /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
476
- className: "@container",
489
+ className: "@container/main",
477
490
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
478
491
  ref: popoverRef,
479
492
  style: popoverStyle,
@@ -498,7 +511,10 @@ var sectionStyles = (0, _tailwindvariants.tv)({
498
511
  }
499
512
  });
500
513
  /**
501
- * Section component for use within the Popover.
514
+ * @component Popover.Section
515
+ *
516
+ * @usage
517
+ * - DO: Use to divide Popover content into logical segments with borders.
502
518
  *
503
519
  * @param {Object} props - The component props.
504
520
  * @param {React.ReactNode} [props.children] - The content of the section.
@@ -1,4 +1,17 @@
1
- "use strict";
1
+ /**
2
+ * @component PopoverManager
3
+ *
4
+ * @description An internal event-based coordination utility that tracks active popovers and emits change events to manage open/close state.
5
+ *
6
+ * @usage
7
+ * - DO: Use to coordinate popover open/close state across multiple Popover instances.
8
+ * - DON'T: Import directly in most cases; Popover uses it internally.
9
+ *
10
+ * @alternative
11
+ * - If you need to render a popover, use `Popover` directly. PopoverManager is an internal coordination utility.
12
+ *
13
+ * @module PopoverManager
14
+ */ "use strict";
2
15
  Object.defineProperty(exports, "__esModule", {
3
16
  value: true
4
17
  });
@@ -10,7 +10,33 @@ Object.defineProperty(exports, "default", {
10
10
  });
11
11
  var _jsxruntime = require("react/jsx-runtime");
12
12
  var _tailwindvariants = require("tailwind-variants");
13
- var styles = (0, _tailwindvariants.tv)({
13
+ /**
14
+ * @component ProgressBar
15
+ *
16
+ * @description A horizontal bar that visually represents completion progress as a percentage with configurable size and color.
17
+ *
18
+ * @usage
19
+ * - DO: Show completion percentage or progress of a task.
20
+ * - DON'T: Use for indeterminate loading (use Spinner or Loading).
21
+ *
22
+ * @accessibility
23
+ * - Include an accessible label describing the progress context.
24
+ * - Consider adding visible percentage text.
25
+ *
26
+ * @alternative
27
+ * - If you need an indeterminate loading indicator, use `Spinner`.
28
+ * - If you need a status label, use `Badge`.
29
+ *
30
+ * @param {Object} props - Properties to configure the progress bar.
31
+ * @param {number} [props.progress=0] - The progress percentage (0-100).
32
+ * @param {number} [props.previousProgress] - The previous period's progress percentage (0-100).
33
+ * @param {boolean} [props.comparisonMode=false] - Whether to show comparison between current and previous period.
34
+ * @param {("small"|"medium"|"large")} [props.size="medium"] - The size of the progress bar.
35
+ * @param {("attention"|"highlight"|"success"|"warning"|"critical"|"neutral"|"positive"|"negative")} [props.color="attention"] - The color of the progress indicator.
36
+ * @param {boolean} [props.animated=true] - Whether the progress bar should animate width changes.
37
+ *
38
+ * @returns {JSX.Element} The rendered progress bar component.
39
+ */ var styles = (0, _tailwindvariants.tv)({
14
40
  base: "Litho-ProgressBar relative bg-tint-2 dark:bg-tint-alt-2 rounded-full overflow-hidden min-w-12",
15
41
  variants: {
16
42
  size: {
@@ -49,20 +75,7 @@ var barStyles = (0, _tailwindvariants.tv)({
49
75
  animated: true
50
76
  }
51
77
  });
52
- /**
53
- * A progress bar component with configurable size, color, and animation.
54
- * Can be used in single or comparison mode to show progress changes.
55
- *
56
- * @param {Object} props - Properties to configure the progress bar.
57
- * @param {number} [props.progress=0] - The progress percentage (0-100).
58
- * @param {number} [props.previousProgress] - The previous period's progress percentage (0-100).
59
- * @param {boolean} [props.comparisonMode=false] - Whether to show comparison between current and previous period.
60
- * @param {("small"|"medium"|"large")} [props.size="medium"] - The size of the progress bar.
61
- * @param {("attention"|"highlight"|"success"|"warning"|"critical"|"neutral"|"positive"|"negative")} [props.color="attention"] - The color of the progress indicator.
62
- * @param {boolean} [props.animated=true] - Whether the progress bar should animate width changes.
63
- *
64
- * @returns {JSX.Element} The rendered progress bar component.
65
- */ function ProgressBar() {
78
+ function ProgressBar() {
66
79
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
67
80
  var _props_progress = props.progress, progress = _props_progress === void 0 ? 0 : _props_progress, previousProgress = props.previousProgress, _props_comparisonMode = props.comparisonMode, comparisonMode = _props_comparisonMode === void 0 ? false : _props_comparisonMode, _props_size = props.size, size = _props_size === void 0 ? "medium" : _props_size, _props_color = props.color, color = _props_color === void 0 ? "attention" : _props_color, _props_animated = props.animated, animated = _props_animated === void 0 ? true : _props_animated, className = props.className;
68
81
  var classes = styles({
@@ -17,7 +17,37 @@ function _interop_require_default(obj) {
17
17
  default: obj
18
18
  };
19
19
  }
20
- var styles = (0, _tailwindvariants.tv)({
20
+ /**
21
+ * @component RadioButton
22
+ *
23
+ * @description A single radio input for selecting one option from a mutually exclusive group.
24
+ *
25
+ * @usage
26
+ * - DO: Use for selecting one option from a mutually exclusive group.
27
+ * - DON'T: Use for multi-select (use Checkbox).
28
+ *
29
+ * @accessibility
30
+ * - Group radio buttons with a shared `name` prop; ensure each has a descriptive `label`.
31
+ *
32
+ * @alternative
33
+ * - If you need a rich card-style radio, use `RadioButtonCard`. If you need grouped options with a label, use `ChoiceList`.
34
+ *
35
+ * @param {Object} props - Props for the RadioButton component.
36
+ * @param {string} [props.label] - The text label for the radio button.
37
+ * @param {boolean} [props.labelHidden=false] - If true, hides the label visually but keeps it available for screen readers.
38
+ * @param {string} [props.id] - The unique identifier for the radio input.
39
+ * @param {string} [props.name] - The name attribute for the radio input (must be the same for grouped buttons).
40
+ * @param {string} [props.value] - The value attribute for the radio input.
41
+ * @param {string} [props.error] - An error message associated with the radio button, if any.
42
+ * @param {boolean} [props.checked=false] - Indicates whether the radio button is checked.
43
+ * @param {boolean} [props.disabled=false] - Indicates whether the radio button is disabled.
44
+ * @param {string} [props.helpText] - Additional descriptive text for the radio button.
45
+ * @param {function} [props.onChange] - Callback function called when the radio button state changes.
46
+ * @param {function} [props.onFocus] - Callback function called when the radio button gains focus.
47
+ * @param {function} [props.onBlur] - Callback function called when the radio button loses focus.
48
+ *
49
+ * @returns {JSX.Element} The rendered RadioButton component.
50
+ */ var styles = (0, _tailwindvariants.tv)({
21
51
  base: "Litho-RadioButton group flex gap-2",
22
52
  variants: {
23
53
  disabled: {
@@ -66,29 +96,7 @@ var radioStyles = (0, _tailwindvariants.tv)({
66
96
  }
67
97
  ]
68
98
  });
69
- /**
70
- * RadioButton Component
71
- *
72
- * A custom radio button component with support for labels, help text, and extensive styling using Tailwind Variants (tv).
73
- *
74
- * @component
75
- *
76
- * @param {Object} props - Props for the RadioButton component.
77
- * @param {string} [props.label] - The text label for the radio button.
78
- * @param {boolean} [props.labelHidden=false] - If true, hides the label visually but keeps it available for screen readers.
79
- * @param {string} [props.id] - The unique identifier for the radio input.
80
- * @param {string} [props.name] - The name attribute for the radio input (must be the same for grouped buttons).
81
- * @param {string} [props.value] - The value attribute for the radio input.
82
- * @param {string} [props.error] - An error message associated with the radio button, if any.
83
- * @param {boolean} [props.checked=false] - Indicates whether the radio button is checked.
84
- * @param {boolean} [props.disabled=false] - Indicates whether the radio button is disabled.
85
- * @param {string} [props.helpText] - Additional descriptive text for the radio button.
86
- * @param {function} [props.onChange] - Callback function called when the radio button state changes.
87
- * @param {function} [props.onFocus] - Callback function called when the radio button gains focus.
88
- * @param {function} [props.onBlur] - Callback function called when the radio button loses focus.
89
- *
90
- * @returns {JSX.Element} The rendered RadioButton component.
91
- */ function RadioButton() {
99
+ function RadioButton() {
92
100
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
93
101
  var label = props.label, tooltip = props.tooltip, labelHidden = props.labelHidden, id = props.id, name = props.name, value = props.value, error = props.error, _props_checked = props.checked, checked = _props_checked === void 0 ? false : _props_checked, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, helpText = props.helpText, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, _props_alignItems = props.alignItems, alignItems = _props_alignItems === void 0 ? "stretch" : _props_alignItems;
94
102
  var hasError = !!error;
@@ -17,8 +17,42 @@ function _interop_require_default(obj) {
17
17
  default: obj
18
18
  };
19
19
  }
20
- var styles = (0, _tailwindvariants.tv)({
21
- base: "Litho-RadioButtonCardContainer border border-transparent rounded-lg p-3 pl-4 flex justify-between gap-2",
20
+ /**
21
+ * @component RadioButtonCard
22
+ *
23
+ * @description A card-styled radio input that displays a title and description within a selectable card container.
24
+ *
25
+ * @usage
26
+ * - DO: Use for visually prominent single-choice selections with descriptive content.
27
+ * - DON'T: Use for simple inline radio inputs (use RadioButton).
28
+ *
29
+ * @accessibility
30
+ * - The entire card is clickable and keyboard accessible; ensure title clearly describes the option.
31
+ *
32
+ * @alternative
33
+ * - If you need a simple inline radio button, use `RadioButton`. If you need a checkbox-style card, use `CheckboxCard`.
34
+ *
35
+ * @param {Object} props - Props for the RadioButtonCard component.
36
+ * @param {string} [props.label] - The text label for the radio button.
37
+ * @param {boolean} [props.labelHidden=false] - If true, hides the label visually but keeps it available for screen readers.
38
+ * @param {string} [props.id] - The unique identifier for the radio input.
39
+ * @param {string} [props.name] - The name attribute for the radio input (must be the same for grouped buttons).
40
+ * @param {string} [props.description] - A description of the radio button.
41
+ * @param {string} [props.value] - The value attribute for the radio input.
42
+ * @param {string} [props.error] - An error message associated with the radio button, if any.
43
+ * @param {boolean} [props.checked=false] - Indicates whether the radio button is checked.
44
+ * @param {boolean} [props.disabled=false] - Indicates whether the radio button is disabled.
45
+ * @param {string} [props.helpText] - Additional descriptive text for the radio button.
46
+ * @param {function} [props.onChange] - Callback function called when the radio button state changes.
47
+ * @param {function} [props.onFocus] - Callback function called when the radio button gains focus.
48
+ * @param {function} [props.onBlur] - Callback function called when the radio button loses focus.
49
+ * @param {boolean} [props.hideRadioButton=false] - When true, hides the visual radio button control.
50
+ * @param {React.ReactNode} [props.icon=null] - Optional icon JSX to display in the card.
51
+ * @param {boolean} [props.allowDeselect=true] - When true, clicking an already-selected card deselects it by calling onChange with a synthetic event where target.value is null.
52
+ *
53
+ * @returns {JSX.Element} The rendered RadioButton component.
54
+ */ var styles = (0, _tailwindvariants.tv)({
55
+ base: "Litho-RadioButtonCardContainer border border-transparent rounded-lg p-3 pl-4 flex justify-between gap-2 hover:border-form-border-focus hover:ring hover:ring-form-focus",
22
56
  variants: {
23
57
  disabled: {
24
58
  true: "bg-tint-1",
@@ -33,12 +67,12 @@ var styles = (0, _tailwindvariants.tv)({
33
67
  {
34
68
  disabled: false,
35
69
  checked: true,
36
- class: "border-form-border-focus ring-1 ring-inset ring-form-border-focus"
70
+ class: "border-form-border-focus bg-surface-selected"
37
71
  },
38
72
  {
39
73
  disabled: false,
40
74
  checked: false,
41
- class: "hover:border-edge-default"
75
+ class: ""
42
76
  }
43
77
  ]
44
78
  });
@@ -76,32 +110,9 @@ var radioStyles = (0, _tailwindvariants.tv)({
76
110
  }
77
111
  ]
78
112
  });
79
- /**
80
- * RadioButton Component
81
- *
82
- * A custom radio button component with support for labels, help text, and extensive styling using Tailwind Variants (tv).
83
- *
84
- * @component
85
- *
86
- * @param {Object} props - Props for the RadioButton component.
87
- * @param {string} [props.label] - The text label for the radio button.
88
- * @param {boolean} [props.labelHidden=false] - If true, hides the label visually but keeps it available for screen readers.
89
- * @param {string} [props.id] - The unique identifier for the radio input.
90
- * @param {string} [props.name] - The name attribute for the radio input (must be the same for grouped buttons).
91
- * @param {string} [props.description] - A description of the radio button.
92
- * @param {string} [props.value] - The value attribute for the radio input.
93
- * @param {string} [props.error] - An error message associated with the radio button, if any.
94
- * @param {boolean} [props.checked=false] - Indicates whether the radio button is checked.
95
- * @param {boolean} [props.disabled=false] - Indicates whether the radio button is disabled.
96
- * @param {string} [props.helpText] - Additional descriptive text for the radio button.
97
- * @param {function} [props.onChange] - Callback function called when the radio button state changes.
98
- * @param {function} [props.onFocus] - Callback function called when the radio button gains focus.
99
- * @param {function} [props.onBlur] - Callback function called when the radio button loses focus.
100
- *
101
- * @returns {JSX.Element} The rendered RadioButton component.
102
- */ function RadioButtonCard() {
113
+ function RadioButtonCard() {
103
114
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
104
- var label = props.label, tooltip = props.tooltip, labelHidden = props.labelHidden, id = props.id, name = props.name, description = props.description, value = props.value, error = props.error, _props_checked = props.checked, checked = _props_checked === void 0 ? false : _props_checked, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, helpText = props.helpText, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur;
115
+ var label = props.label, tooltip = props.tooltip, labelHidden = props.labelHidden, id = props.id, name = props.name, description = props.description, value = props.value, error = props.error, _props_checked = props.checked, checked = _props_checked === void 0 ? false : _props_checked, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, helpText = props.helpText, _props_hideRadioButton = props.hideRadioButton, hideRadioButton = _props_hideRadioButton === void 0 ? false : _props_hideRadioButton, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_allowDeselect = props.allowDeselect, allowDeselect = _props_allowDeselect === void 0 ? true : _props_allowDeselect, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, _props_labelFontWeight = props.labelFontWeight, labelFontWeight = _props_labelFontWeight === void 0 ? "semibold" : _props_labelFontWeight;
105
116
  var hasError = !!error;
106
117
  var classes = styles({
107
118
  checked: checked,
@@ -128,57 +139,71 @@ var radioStyles = (0, _tailwindvariants.tv)({
128
139
  onBlur(event);
129
140
  }
130
141
  };
142
+ var handleLabelClick = function() {
143
+ if (allowDeselect && checked && !disabled) {
144
+ onChange === null || onChange === void 0 ? void 0 : onChange({
145
+ target: {
146
+ value: null
147
+ }
148
+ });
149
+ }
150
+ };
131
151
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
132
152
  className: "flex flex-col gap-1",
133
153
  children: [
134
154
  /*#__PURE__*/ (0, _jsxruntime.jsxs)("label", {
135
155
  className: classes,
156
+ onClick: handleLabelClick,
136
157
  children: [
137
158
  /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
138
- className: "flex flex-col gap-1",
159
+ className: "flex items-center gap-4",
139
160
  children: [
140
- label && !labelHidden && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.default, {
141
- tooltip: tooltip,
142
- disabled: disabled,
143
- fontWeight: "semibold",
144
- as: "p",
145
- children: label
161
+ icon && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
162
+ className: "flex-shrink-0",
163
+ children: icon
146
164
  }),
147
- description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
148
- color: disabled ? "disabled" : "subdued",
149
- children: description
165
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
166
+ children: [
167
+ label && !labelHidden && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.default, {
168
+ tooltip: tooltip,
169
+ disabled: disabled,
170
+ fontWeight: labelFontWeight,
171
+ as: "p",
172
+ children: label
173
+ }),
174
+ description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
175
+ color: disabled ? "disabled" : "subdued",
176
+ children: description
177
+ })
178
+ ]
150
179
  })
151
180
  ]
152
181
  }),
153
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
154
- children: [
155
- /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
156
- type: "radio",
157
- id: id,
158
- name: name,
159
- value: value,
160
- checked: checked,
161
- disabled: disabled,
162
- onChange: handleChange,
163
- onFocus: handleFocus,
164
- onBlur: handleBlur,
165
- className: "sr-only"
166
- }),
167
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
168
- className: "Litho-RadioButton__ControlContainer w-5 h-5 flex items-center",
169
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
170
- className: radioClasses,
171
- children: [
172
- checked && !hasError && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
173
- className: "rounded-full w-1.5 h-1.5 ".concat(disabled ? "bg-form-input-fg-disabled" : "bg-form-input-fg-light")
174
- }),
175
- checked && hasError && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
176
- className: "rounded-full w-1.5 h-1.5 ".concat(disabled ? "bg-form-input-fg-disabled" : "bg-form-bg")
177
- })
178
- ]
182
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
183
+ type: "radio",
184
+ id: id,
185
+ name: name,
186
+ value: value,
187
+ checked: checked,
188
+ disabled: disabled,
189
+ onChange: handleChange,
190
+ onFocus: handleFocus,
191
+ onBlur: handleBlur,
192
+ className: "sr-only"
193
+ }),
194
+ !hideRadioButton && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
195
+ className: "Litho-RadioButton__ControlContainer w-5 h-5 flex items-center",
196
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
197
+ className: radioClasses,
198
+ children: [
199
+ checked && !hasError && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
200
+ className: "rounded-full w-1.5 h-1.5 ".concat(disabled ? "bg-form-input-fg-disabled" : "bg-form-input-fg-light")
201
+ }),
202
+ checked && hasError && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
203
+ className: "rounded-full w-1.5 h-1.5 ".concat(disabled ? "bg-form-input-fg-disabled" : "bg-form-bg")
179
204
  })
180
- })
181
- ]
205
+ ]
206
+ })
182
207
  })
183
208
  ]
184
209
  }),