@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
@@ -0,0 +1,269 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function() {
9
+ return _default;
10
+ }
11
+ });
12
+ var _jsxruntime = require("react/jsx-runtime");
13
+ var _tailwindvariants = require("tailwind-variants");
14
+ var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
15
+ var _Card = /*#__PURE__*/ _interop_require_default(require("./Card"));
16
+ var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
17
+ var _Stack = /*#__PURE__*/ _interop_require_default(require("./Stack"));
18
+ var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
19
+ var _Tooltip = /*#__PURE__*/ _interop_require_default(require("./Tooltip"));
20
+ var _polarisicons = require("@shopify/polaris-icons");
21
+ function _interop_require_default(obj) {
22
+ return obj && obj.__esModule ? obj : {
23
+ default: obj
24
+ };
25
+ }
26
+ /**
27
+ * @component AnnouncementCard
28
+ *
29
+ * @description A promotional card that displays a title, description, decorative icon, and action buttons. Used for feature announcements, onboarding prompts, and contextual promotions.
30
+ *
31
+ * @usage
32
+ * - DO: Use for feature announcements, onboarding prompts, or promotional content within a page.
33
+ * - DON'T: Use for alerts or critical messages (use Banner). Don't use for global announcements (use AnnouncementBar).
34
+ *
35
+ * @accessibility
36
+ * - The icon (or image when imageUrl is set) is purely decorative. Title and description convey the full message.
37
+ * - Action buttons are keyboard accessible via the Litho Button component.
38
+ * - Dismiss button includes an aria-label for screen readers.
39
+ *
40
+ * @alternative
41
+ * - If you need a contextual alert with status styling, use `Banner`.
42
+ * - If you need a global top-of-page announcement, use `AnnouncementBar`.
43
+ * - If you need a subtle inline hint, use `Tip`.
44
+ *
45
+ * @param {Object} props - Props for the AnnouncementCard component.
46
+ * @param {string|React.ReactNode} [props.title=null] - The announcement heading.
47
+ * @param {string|React.ReactNode} [props.description=null] - Supporting text below the title.
48
+ * @param {string} [props.imageUrl=null] - Optional image URL. When set, shown in place of the icon with 3/2 aspect ratio. Displayed on md+ screens only.
49
+ * @param {"0"|"1"|"2"|"3"|"4"} [props.imagePadding="0"] - Padding around the image (maps to p-0, p-1, p-2, p-3, p-4). Only applies when imageUrl is set.
50
+ * @param {"cover"|"contain"} [props.imageDisplay="cover"] - How the image fits within its container. Only applies when imageUrl is set.
51
+ * @param {React.ElementType|string} [props.icon=null] - A decorative icon. Pass a Polaris icon (e.g., MagicMajor), a Lucide icon component (e.g., Cable from lucide-react), or a string for dynamic Lucide loading (e.g., "cable"). Icon is automatically colored based on the tint prop. Displayed on md+ screens only. Ignored when imageUrl is set.
52
+ * @param {"info"|"success"|"critical"|"attention"|"warning"|"insight"|"highlight"|"neutral"|string} [props.tint="info"] - Color tint for the icon and image container background. Pass a named variant or a hex color (e.g. "#f0f0f0").
53
+ * @param {Object} [props.primaryAction=null] - Primary action button configuration.
54
+ * @param {string} [props.primaryAction.content] - Button label text.
55
+ * @param {Function} [props.primaryAction.onAction] - Click handler.
56
+ * @param {boolean} [props.primaryAction.loading=false] - Loading state.
57
+ * @param {boolean} [props.primaryAction.disabled=false] - Disabled state.
58
+ * @param {boolean} [props.primaryAction.destructive=false] - Destructive styling.
59
+ * @param {React.Component} [props.primaryAction.icon] - Button icon.
60
+ * @param {string} [props.primaryAction.url] - URL to open on click.
61
+ * @param {boolean} [props.primaryAction.external=false] - Open URL in new tab.
62
+ * @param {Object} [props.secondaryAction=null] - Secondary action button configuration (same shape as primaryAction).
63
+ * @param {Function} [props.onDismiss=null] - Callback when the dismiss button is clicked. When provided, renders a close button.
64
+ * @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip=null] - Tooltip content for the title. When set, shows an info icon next to the title that displays the tooltip on hover.
65
+ * @param {string} [props.tooltipPreferredPosition='above'] - Preferred position for the tooltip.
66
+ * @param {React.ReactNode} [props.children=null] - Optional content rendered below the description. Image and icon are still shown when children are passed.
67
+ * @returns {React.ReactElement} The rendered AnnouncementCard component.
68
+ *
69
+ * @example
70
+ * import { Cable } from "lucide-react";
71
+ * import { MagicMajor } from "@shopify/polaris-icons";
72
+ *
73
+ * // With a Lucide icon
74
+ * <AnnouncementCard
75
+ * title="Try our new feature"
76
+ * description="Get started with the new integration tools."
77
+ * icon={Cable}
78
+ * tint="highlight"
79
+ * primaryAction={{ content: "Learn more", onAction: () => {} }}
80
+ * />
81
+ *
82
+ * // With a Polaris icon
83
+ * <AnnouncementCard
84
+ * title="Try our new feature"
85
+ * icon={MagicMajor}
86
+ * tint="insight"
87
+ * primaryAction={{ content: "Learn more", onAction: () => {} }}
88
+ * />
89
+ *
90
+ * // With a dynamic Lucide string
91
+ * <AnnouncementCard
92
+ * title="Try our new feature"
93
+ * icon="cable"
94
+ * tint="info"
95
+ * primaryAction={{ content: "Learn more", onAction: () => {} }}
96
+ * />
97
+ */ var TINT_BG_CLASSES = {
98
+ info: "bg-info-alt",
99
+ success: "bg-success-alt",
100
+ critical: "bg-critical-alt",
101
+ attention: "bg-attention-alt",
102
+ warning: "bg-attention-alt",
103
+ insight: "bg-insight-alt",
104
+ highlight: "bg-highlight-alt",
105
+ neutral: "bg-neutral-alt",
106
+ custom: ""
107
+ };
108
+ var iconContainerStyles = (0, _tailwindvariants.tv)({
109
+ base: "w-24 h-24 rounded-xl flex items-center justify-center flex-shrink-0",
110
+ variants: {
111
+ tint: TINT_BG_CLASSES
112
+ },
113
+ defaultVariants: {
114
+ tint: "info"
115
+ }
116
+ });
117
+ var imageContainerStyles = (0, _tailwindvariants.tv)({
118
+ base: "aspect-[3/2] rounded-xl overflow-hidden",
119
+ variants: {
120
+ tint: TINT_BG_CLASSES,
121
+ padding: {
122
+ "0": "p-0",
123
+ "1": "p-1",
124
+ "2": "p-2",
125
+ "3": "p-3",
126
+ "4": "p-4"
127
+ }
128
+ },
129
+ defaultVariants: {
130
+ tint: "info",
131
+ padding: "0"
132
+ }
133
+ });
134
+ var IMAGE_DISPLAY_CLASSES = {
135
+ cover: "object-cover",
136
+ contain: "object-contain"
137
+ };
138
+ var TINT_ICON_COLORS = {
139
+ info: "info-alt-icon",
140
+ success: "success-alt-icon",
141
+ critical: "critical-alt-icon",
142
+ attention: "attention-alt-icon",
143
+ warning: "warning-alt-icon",
144
+ insight: "insight-alt-icon",
145
+ highlight: "highlight-alt-icon",
146
+ neutral: "neutral-alt-icon"
147
+ };
148
+ var renderAction = function(action) {
149
+ var plain = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
150
+ if (!action) return null;
151
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
152
+ plain: plain,
153
+ disabled: action.disabled,
154
+ loading: action.loading,
155
+ destructive: action.destructive,
156
+ icon: action.icon,
157
+ url: action.url,
158
+ external: action.external,
159
+ onClick: action.onAction,
160
+ children: action.content
161
+ });
162
+ };
163
+ function AnnouncementCard() {
164
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
165
+ var _props_title = props.title, title = _props_title === void 0 ? null : _props_title, _props_titleGap = props.titleGap, titleGap = _props_titleGap === void 0 ? "xs" : _props_titleGap, _props_description = props.description, description = _props_description === void 0 ? null : _props_description, _props_imageUrl = props.imageUrl, imageUrl = _props_imageUrl === void 0 ? null : _props_imageUrl, _props_imagePadding = props.imagePadding, imagePadding = _props_imagePadding === void 0 ? "0" : _props_imagePadding, _props_imageDisplay = props.imageDisplay, imageDisplay = _props_imageDisplay === void 0 ? "cover" : _props_imageDisplay, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_tint = props.tint, tint = _props_tint === void 0 ? "info" : _props_tint, _props_primaryAction = props.primaryAction, primaryAction = _props_primaryAction === void 0 ? null : _props_primaryAction, _props_secondaryAction = props.secondaryAction, secondaryAction = _props_secondaryAction === void 0 ? null : _props_secondaryAction, _props_onDismiss = props.onDismiss, onDismiss = _props_onDismiss === void 0 ? null : _props_onDismiss, _props_tooltip = props.tooltip, tooltip = _props_tooltip === void 0 ? null : _props_tooltip, _props_tooltipPreferredPosition = props.tooltipPreferredPosition, tooltipPreferredPosition = _props_tooltipPreferredPosition === void 0 ? "above" : _props_tooltipPreferredPosition, _props_children = props.children, children = _props_children === void 0 ? null : _props_children;
166
+ var hasActions = !!(primaryAction || secondaryAction);
167
+ var isTintHex = typeof tint === "string" && tint.startsWith("#");
168
+ var resolvedTint = isTintHex ? "custom" : tint;
169
+ var tintStyle = isTintHex ? {
170
+ backgroundColor: tint
171
+ } : undefined;
172
+ var _IMAGE_DISPLAY_CLASSES_imageDisplay;
173
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
174
+ padded: true,
175
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
176
+ className: "relative group/announcement-card",
177
+ children: [
178
+ onDismiss && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
179
+ className: "absolute top-0 right-0 group-hover/announcement-card:block hidden opacity-70 hover:opacity-100",
180
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
181
+ plain: true,
182
+ icon: _polarisicons.CancelMinor,
183
+ onClick: onDismiss,
184
+ tooltip: "Dismiss",
185
+ "aria-label": "Dismiss",
186
+ size: "small"
187
+ })
188
+ }),
189
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
190
+ horizontal: "md",
191
+ justify: "between",
192
+ align: "stretch",
193
+ gap: "6",
194
+ children: [
195
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
196
+ justify: "between",
197
+ fullWidth: true,
198
+ children: [
199
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
200
+ gap: titleGap,
201
+ children: [
202
+ title != null && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
203
+ className: "flex items-center gap-2",
204
+ children: [
205
+ typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
206
+ variant: "headingMd",
207
+ fontWeight: "medium",
208
+ children: title
209
+ }) : title,
210
+ tooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
211
+ content: tooltip,
212
+ preferredPosition: tooltipPreferredPosition
213
+ })
214
+ ]
215
+ }),
216
+ description != null && (typeof description === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
217
+ color: "subdued",
218
+ children: description
219
+ }) : description),
220
+ children
221
+ ]
222
+ }),
223
+ hasActions && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
224
+ className: "flex gap-2",
225
+ children: [
226
+ renderAction(primaryAction),
227
+ renderAction(secondaryAction, true)
228
+ ]
229
+ })
230
+ ]
231
+ }),
232
+ imageUrl && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
233
+ className: "hidden md:block w-36 flex-shrink-0",
234
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
235
+ className: imageContainerStyles({
236
+ tint: resolvedTint,
237
+ padding: imagePadding
238
+ }),
239
+ style: tintStyle,
240
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("img", {
241
+ src: imageUrl,
242
+ alt: "",
243
+ className: "w-full h-full rounded-xl ".concat((_IMAGE_DISPLAY_CLASSES_imageDisplay = IMAGE_DISPLAY_CLASSES[imageDisplay]) !== null && _IMAGE_DISPLAY_CLASSES_imageDisplay !== void 0 ? _IMAGE_DISPLAY_CLASSES_imageDisplay : IMAGE_DISPLAY_CLASSES.cover)
244
+ })
245
+ })
246
+ }),
247
+ !imageUrl && icon && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
248
+ className: "hidden md:block",
249
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
250
+ className: iconContainerStyles({
251
+ tint: resolvedTint
252
+ }),
253
+ style: tintStyle,
254
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
255
+ source: icon,
256
+ color: TINT_ICON_COLORS[tint] || TINT_ICON_COLORS.info,
257
+ size: 12,
258
+ strokeWidth: 1,
259
+ opacity: 70
260
+ })
261
+ })
262
+ })
263
+ ]
264
+ })
265
+ ]
266
+ })
267
+ });
268
+ }
269
+ var _default = AnnouncementCard;
@@ -150,7 +150,20 @@ var screenSizes = typeof window !== "undefined" ? {
150
150
  "2xl": parseInt(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-2xl"), 10)
151
151
  } : {};
152
152
  /**
153
- * Provider component for managing global application state.
153
+ * @component AppProvider
154
+ *
155
+ * @description The root context provider that initializes dark mode, frame state, and form context for the entire Litho application.
156
+ *
157
+ * @usage
158
+ * - DO: Wrap your entire application to provide dark mode, frame, and form context.
159
+ * - DON'T: Use multiple AppProviders in the same tree.
160
+ *
161
+ * @accessibility
162
+ * - AppProvider manages the `data-theme` attribute on `<html>` for dark mode; ensures consistent theming for all components.
163
+ *
164
+ * @alternative
165
+ * - If you only need toast notifications, use `ToastProvider` independently.
166
+ *
154
167
  * @param {Object} props
155
168
  * @param {React.ReactNode} props.children - The child components.
156
169
  * @param {boolean} props.embedded - Whether the app is embedded.
@@ -244,7 +257,7 @@ var screenSizes = typeof window !== "undefined" ? {
244
257
  setDiscardAction: setDiscardAction
245
258
  },
246
259
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
247
- className: "app-wrapper ".concat(embedded ? "@container" : ""),
260
+ className: "app-wrapper ".concat(embedded ? "@container/main" : ""),
248
261
  children: children
249
262
  })
250
263
  })
@@ -175,42 +175,21 @@ function _unsupported_iterable_to_array(o, minLen) {
175
175
  if (n === "Map" || n === "Set") return Array.from(n);
176
176
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
177
177
  }
178
- var styles = (0, _tailwindvariants.tv)({
179
- base: "Litho-Autocomplete flex flex-col"
180
- });
181
- function attachPropToTextField(children, prop) {
182
- return _react.default.Children.map(children, function(child) {
183
- if (/*#__PURE__*/ (0, _react.isValidElement)(child)) {
184
- var _child_type, _child_props;
185
- if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
186
- return /*#__PURE__*/ (0, _react.cloneElement)(child, prop);
187
- }
188
- if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
189
- return /*#__PURE__*/ (0, _react.cloneElement)(child, {
190
- children: attachPropToTextField(child.props.children, prop)
191
- });
192
- }
193
- }
194
- return child;
195
- });
196
- }
197
178
  /**
198
- * @typedef {Object} AutocompleteOption
199
- * @property {string|React.ReactNode} label - The label to display for the option. Can be a string or a React element (e.g., text with a badge).
200
- * @property {string} value - The value to associate with the option.
201
- * @property {string} [title] - An optional title to display for the option.
202
- * @property {boolean} [allowMultiple] - Whether multiple options can be selected.
203
- * @property {string} [selected] - The value of the option that is currently selected.
204
- * @property {function} [onSelect] - The function to call when the option is selected.
205
- * @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
206
- */ /**
207
- * @typedef {Object} AutocompleteEmptyState
208
- * @property {string} content - The content to display in the empty state.
209
- * @property {React.ReactNode} icon - An optional icon to display in the empty state.
210
- */ /**
211
- * Autocomplete component that provides a flexible dropdown menu with search and selection capabilities.
179
+ * @component Autocomplete
180
+ *
181
+ * @description A searchable text input with a dropdown suggestions list for selecting from filtered options.
182
+ *
183
+ * @usage
184
+ * - DO: Use for selecting from a large list with search/filter capability.
185
+ * - DON'T: Use for short static lists. Instead, use Select (when list is more than 7 items, or dynamic but doesn't need search) or ChoiceList (when list is less than 7 items and static).
186
+ *
187
+ * @accessibility
188
+ * - Implements combobox pattern with `aria-expanded` and `aria-activedescendant`; keyboard navigable.
189
+ *
190
+ * @alternative
191
+ * - If the option list is short and static, use `Select`. If you need a custom dropdown, use `Listbox`.
212
192
  *
213
- * @component
214
193
  * @param {Object} props - The props for the Autocomplete component.
215
194
  * @param {Array<AutocompleteOption>} props.options - The options to display in the dropdown.
216
195
  * @param {Array<string>} props.selected - The currently selected option values.
@@ -240,7 +219,7 @@ function attachPropToTextField(children, prop) {
240
219
  * <Autocomplete
241
220
  * options={[
242
221
  * {
243
- * label: <Stack horizontal gap="xs" blockAlign="center"><span>Premium</span><Badge>New</Badge></Stack>,
222
+ * label: <Stack horizontal gap="xs" align="center"><span>Premium</span><Badge>New</Badge></Stack>,
244
223
  * value: "premium"
245
224
  * }
246
225
  * ]}
@@ -248,7 +227,39 @@ function attachPropToTextField(children, prop) {
248
227
  * onSelect={(selected) => console.log(selected)}
249
228
  * textField={<Autocomplete.TextField placeholder="Search..." />}
250
229
  * />
251
- */ function Autocomplete() {
230
+ */ var styles = (0, _tailwindvariants.tv)({
231
+ base: "Litho-Autocomplete flex flex-col"
232
+ });
233
+ /**
234
+ * @typedef {Object} AutocompleteOption
235
+ * @property {string|React.ReactNode} label - The label to display for the option. Can be a string or a React element (e.g., text with a badge).
236
+ * @property {string} value - The value to associate with the option.
237
+ * @property {string} [title] - An optional title to display for the option.
238
+ * @property {boolean} [allowMultiple] - Whether multiple options can be selected.
239
+ * @property {string} [selected] - The value of the option that is currently selected.
240
+ * @property {function} [onSelect] - The function to call when the option is selected.
241
+ * @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
242
+ */ /**
243
+ * @typedef {Object} AutocompleteEmptyState
244
+ * @property {string} content - The content to display in the empty state.
245
+ * @property {React.ReactNode} icon - An optional icon to display in the empty state.
246
+ */ function attachPropToTextField(children, prop) {
247
+ return _react.default.Children.map(children, function(child) {
248
+ if (/*#__PURE__*/ (0, _react.isValidElement)(child)) {
249
+ var _child_type, _child_props;
250
+ if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
251
+ return /*#__PURE__*/ (0, _react.cloneElement)(child, prop);
252
+ }
253
+ if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
254
+ return /*#__PURE__*/ (0, _react.cloneElement)(child, {
255
+ children: attachPropToTextField(child.props.children, prop)
256
+ });
257
+ }
258
+ }
259
+ return child;
260
+ });
261
+ }
262
+ function Autocomplete() {
252
263
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
253
264
  var options = props.options, selected = props.selected, _props_preferredPosition = props.preferredPosition, preferredPosition = _props_preferredPosition === void 0 ? "below" : _props_preferredPosition, _props_preferredAlignment = props.preferredAlignment, preferredAlignment = _props_preferredAlignment === void 0 ? "left" : _props_preferredAlignment, allowMultiple = props.allowMultiple, loading = props.loading, emptyState = props.emptyState, onSelect = props.onSelect, textField = props.textField, className = props.className, zIndexOverride = props.zIndexOverride;
254
265
  var classes = styles();
@@ -292,6 +303,17 @@ function attachPropToTextField(children, prop) {
292
303
  ]);
293
304
  setShowOptionsPopover && setShowOptionsPopover(false);
294
305
  },
306
+ role: "option",
307
+ tabIndex: 0,
308
+ onKeyDown: function(e) {
309
+ if (e.key === "Enter" || e.key === " ") {
310
+ e.preventDefault();
311
+ onSelect([
312
+ option.value
313
+ ]);
314
+ setShowOptionsPopover && setShowOptionsPopover(false);
315
+ }
316
+ },
295
317
  children: option.label
296
318
  });
297
319
  };
@@ -10,8 +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)({
14
- base: "Litho-Badge inline-flex items-center gap-1.5 text-sm rounded-full leading-normal min-h-5.5",
13
+ /**
14
+ * @component Badge
15
+ *
16
+ * @description A small status indicator that displays a short label with a color-coded background to convey state like success, warning, or attention.
17
+ *
18
+ * @usage
19
+ * - DO: Convey status (success, warning, critical) on list items or table rows.
20
+ * - DON'T: Use for interactive or clickable elements (use Button or Tag).
21
+ * - DON'T: Overuse. Badges have a lot of visual weight, so use them sparingly. Consider using a Text component if content doesn't need to be prioritized over other content.
22
+ *
23
+ * @accessibility
24
+ * - Badge content is read as inline text; ensure status text is descriptive.
25
+ * - Do not rely on color alone to convey meaning.
26
+ *
27
+ * @alternative
28
+ * - If you need a removable label, use `Tag`.
29
+ * - If you need a full-sentence status message, use `Banner`.
30
+ *
31
+ * @param {object} props - Component properties.
32
+ * @param {React.ReactNode} props.children - Content to display within the badge.
33
+ * @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
34
+ * @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
35
+ * @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
36
+ * @param {string} [props.className] - Additional CSS classes to apply to the badge.
37
+ * @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
38
+ */ var styles = (0, _tailwindvariants.tv)({
39
+ base: "Litho-Badge inline-flex items-center gap-1.5 text-sm rounded-full leading-normal min-h-5",
15
40
  variants: {
16
41
  status: {
17
42
  info: "bg-info-alt text-info-alt-fg",
@@ -196,18 +221,7 @@ var progressBadgeStyles = (0, _tailwindvariants.tv)({
196
221
  progress: "null"
197
222
  }
198
223
  });
199
- /**
200
- * A Badge component that renders a small, colored label with a status or progress indicator. The badge can be configured with different statuses, progress states, and sizes.
201
- *
202
- * @component
203
- * @param {object} props - Component properties.
204
- * @param {React.ReactNode} props.children - Content to display within the badge.
205
- * @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
206
- * @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
207
- * @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
208
- * @param {string} [props.className] - Additional CSS classes to apply to the badge.
209
- * @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
210
- */ function Badge() {
224
+ function Badge() {
211
225
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
212
226
  var children = props.children, progress = props.progress, status = props.status, capitalize = props.capitalize, className = props.className;
213
227
  var classes = styles({
@@ -21,7 +21,43 @@ function _interop_require_default(obj) {
21
21
  default: obj
22
22
  };
23
23
  }
24
- var styles = (0, _tailwindvariants.tv)({
24
+ /**
25
+ * @component Banner
26
+ *
27
+ * @description A contextual message bar that displays informational, success, warning, or critical notices with optional actions and dismiss functionality.
28
+ *
29
+ * @usage
30
+ * - DO: Display important contextual messages at the top of a page or section (info, success, warning, critical).
31
+ * - DON'T: Use for transient notifications (use ToastNotification).
32
+ *
33
+ * @accessibility
34
+ * - Banner uses `role="status"` or appropriate ARIA role based on status; ensure the message text is descriptive.
35
+ *
36
+ * @alternative
37
+ * - If you need a brief, auto-dismissing notification, use `ToastNotification`.
38
+ * - If you need a contextual hint, use `Tip`.
39
+ *
40
+ * @param {Object} props - The properties for configuring the Banner component.
41
+ * @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
42
+ * @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
43
+ * @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
44
+ * @param {React.ReactNode} [props.children] - Additional content to display within the banner.
45
+ * @param {BannerAction} [props.action] - Primary action configuration object
46
+ * @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
47
+ * @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
48
+ * @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
49
+ *
50
+ * @returns {JSX.Element} The rendered Banner component.
51
+ *
52
+ * @example
53
+ * <Banner
54
+ * title="Warning"
55
+ * status="warning"
56
+ * onDismiss={() => console.log('Dismissed')}
57
+ * action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
58
+ * secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
59
+ * />
60
+ */ var styles = (0, _tailwindvariants.tv)({
25
61
  base: "Litho-Banner relative rounded-md shadow-card bg-surface-highest outline outline-tint-3"
26
62
  });
27
63
  var headerStyles = (0, _tailwindvariants.tv)({
@@ -112,32 +148,6 @@ var STATUS_STYLES = {
112
148
  * @property {boolean} [loading=false] - Whether to show a loading state
113
149
  * @property {Function} [onAction] - Click handler for the action
114
150
  * @property {string} [url] - URL to navigate to when clicked (opens in new tab)
115
- */ /**
116
- * A Banner component that displays a styled banner with customizable title, status, icon, actions, and dismiss functionality.
117
- * The banner style and content change based on the provided props, allowing for various statuses and themes.
118
- *
119
- * @component
120
- *
121
- * @param {Object} props - The properties for configuring the Banner component.
122
- * @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
123
- * @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
124
- * @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
125
- * @param {React.ReactNode} [props.children] - Additional content to display within the banner.
126
- * @param {BannerAction} [props.action] - Primary action configuration object
127
- * @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
128
- * @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
129
- * @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
130
- *
131
- * @returns {JSX.Element} The rendered Banner component.
132
- *
133
- * @example
134
- * <Banner
135
- * title="Warning"
136
- * status="warning"
137
- * onDismiss={() => console.log('Dismissed')}
138
- * action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
139
- * secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
140
- * />
141
151
  */ function Banner() {
142
152
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
143
153
  var _props_title = props.title, title = _props_title === void 0 ? null : _props_title, _props_status = props.status, status = _props_status === void 0 ? "neutral" : _props_status, _props_onDismiss = props.onDismiss, onDismiss = _props_onDismiss === void 0 ? null : _props_onDismiss, _props_children = props.children, children = _props_children === void 0 ? null : _props_children, _props_action = props.action, action = _props_action === void 0 ? null : _props_action, _props_secondaryAction = props.secondaryAction, secondaryAction = _props_secondaryAction === void 0 ? null : _props_secondaryAction, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_spinner = props.spinner, spinner = _props_spinner === void 0 ? false : _props_spinner;