@heymantle/litho 0.0.14 → 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 (381) 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/README.md +52 -0
  6. package/dist/cjs/components/ActionList.js +33 -25
  7. package/dist/cjs/components/AnnouncementBar.js +115 -18
  8. package/dist/cjs/components/AnnouncementCard.js +269 -0
  9. package/dist/cjs/components/AppProvider.js +15 -2
  10. package/dist/cjs/components/Autocomplete.js +58 -36
  11. package/dist/cjs/components/Badge.js +28 -14
  12. package/dist/cjs/components/Banner.js +37 -27
  13. package/dist/cjs/components/Box.js +50 -38
  14. package/dist/cjs/components/Button.js +338 -109
  15. package/dist/cjs/components/ButtonGroup.js +27 -14
  16. package/dist/cjs/components/Card.js +311 -143
  17. package/dist/cjs/components/Checkbox.js +55 -47
  18. package/dist/cjs/components/CheckboxCard.js +222 -0
  19. package/dist/cjs/components/CheckboxCardGroup.js +384 -0
  20. package/dist/cjs/components/ChoiceList.js +21 -11
  21. package/dist/cjs/components/Code.js +22 -8
  22. package/dist/cjs/components/Collapsible.js +24 -11
  23. package/dist/cjs/components/ColorField.js +163 -38
  24. package/dist/cjs/components/ContextualSaveBar.js +13 -6
  25. package/dist/cjs/components/DatePicker.js +48 -37
  26. package/dist/cjs/components/Disclosure.js +57 -13
  27. package/dist/cjs/components/Divider.js +82 -18
  28. package/dist/cjs/components/DropZone.js +194 -68
  29. package/dist/cjs/components/EmptyState.js +18 -6
  30. package/dist/cjs/components/Filters.js +84 -36
  31. package/dist/cjs/components/FooterHelp.js +14 -4
  32. package/dist/cjs/components/Form.js +13 -2
  33. package/dist/cjs/components/Frame.js +57 -22
  34. package/dist/cjs/components/FrameSaveBar.js +37 -6
  35. package/dist/cjs/components/Grid.js +31 -15
  36. package/dist/cjs/components/HorizontalStack.js +38 -25
  37. package/dist/cjs/components/Icon.js +683 -61
  38. package/dist/cjs/components/Image.js +35 -22
  39. package/dist/cjs/components/InlineError.js +19 -10
  40. package/dist/cjs/components/Label.js +21 -12
  41. package/dist/cjs/components/Layout.js +37 -26
  42. package/dist/cjs/components/LayoutSection.js +84 -22
  43. package/dist/cjs/components/Link.js +35 -22
  44. package/dist/cjs/components/List.js +28 -12
  45. package/dist/cjs/components/Listbox.js +53 -31
  46. package/dist/cjs/components/Loading.js +14 -2
  47. package/dist/cjs/components/Modal.js +32 -39
  48. package/dist/cjs/components/Navigation.js +107 -36
  49. package/dist/cjs/components/Page.js +44 -31
  50. package/dist/cjs/components/Pagination.js +20 -5
  51. package/dist/cjs/components/Pane.js +67 -4
  52. package/dist/cjs/components/Popover.js +63 -30
  53. package/dist/cjs/components/PopoverManager.js +14 -1
  54. package/dist/cjs/components/ProgressBar.js +28 -15
  55. package/dist/cjs/components/RadioButton.js +32 -24
  56. package/dist/cjs/components/RadioButtonCard.js +92 -67
  57. package/dist/cjs/components/RadioButtonCardGroup.js +379 -0
  58. package/dist/cjs/components/RangeSlider.js +34 -26
  59. package/dist/cjs/components/ResourceList.js +28 -14
  60. package/dist/cjs/components/Select.js +38 -26
  61. package/dist/cjs/components/SkeletonText.js +33 -18
  62. package/dist/cjs/components/Spinner.js +24 -12
  63. package/dist/cjs/components/Stack.js +131 -71
  64. package/dist/cjs/components/TabNavigation.js +27 -1
  65. package/dist/cjs/components/Table.js +85 -29
  66. package/dist/cjs/components/Tabs.js +84 -24
  67. package/dist/cjs/components/Tag.js +37 -16
  68. package/dist/cjs/components/Text.js +32 -18
  69. package/dist/cjs/components/TextField.js +119 -69
  70. package/dist/cjs/components/Thumbnail.js +25 -11
  71. package/dist/cjs/components/TimePicker.js +22 -1
  72. package/dist/cjs/components/Tip.js +140 -25
  73. package/dist/cjs/components/ToastNotification.js +107 -34
  74. package/dist/cjs/components/ToastProvider.js +13 -3
  75. package/dist/cjs/components/Tooltip.js +50 -41
  76. package/dist/cjs/components/TopBar.js +83 -9
  77. package/dist/cjs/components/VerticalStack.js +31 -16
  78. package/dist/cjs/index.js +24 -0
  79. package/dist/cjs/playwright.config.js +114 -0
  80. package/dist/cjs/stories/Autocomplete.stories.js +10 -10
  81. package/dist/cjs/stories/Checkbox.stories.js +6 -8
  82. package/dist/cjs/stories/CheckboxCardGroup.stories.js +459 -0
  83. package/dist/cjs/stories/Collapsible.stories.js +11 -11
  84. package/dist/cjs/stories/ColorField.stories.js +2 -3
  85. package/dist/cjs/stories/ComplexExamples.stories.js +48 -77
  86. package/dist/cjs/stories/ContextualSaveBar.stories.js +1 -1
  87. package/dist/cjs/stories/Divider.stories.js +15 -16
  88. package/dist/cjs/stories/DropZone.stories.js +3 -3
  89. package/dist/cjs/stories/FooterHelp.stories.js +3 -4
  90. package/dist/cjs/stories/Form.stories.js +2 -4
  91. package/dist/cjs/stories/Grid.stories.js +24 -33
  92. package/dist/cjs/stories/Icon.stories.js +22 -23
  93. package/dist/cjs/stories/Image.stories.js +12 -15
  94. package/dist/cjs/stories/InlineError.stories.js +0 -1
  95. package/dist/cjs/stories/Layout.stories.js +96 -2
  96. package/dist/cjs/stories/LayoutSection.stories.js +13 -18
  97. package/dist/cjs/stories/List.stories.js +24 -28
  98. package/dist/cjs/stories/Listbox.stories.js +2 -2
  99. package/dist/cjs/stories/Loading.stories.js +21 -25
  100. package/dist/cjs/stories/Modal.stories.js +0 -1
  101. package/dist/cjs/stories/Pagination.stories.js +4 -4
  102. package/dist/cjs/stories/Pane.stories.js +10 -18
  103. package/dist/cjs/stories/Popover.stories.js +7 -7
  104. package/dist/cjs/stories/PopoverManager.stories.js +9 -9
  105. package/dist/cjs/stories/ProgressBar.stories.js +8 -8
  106. package/dist/cjs/stories/RadioButton.stories.js +2 -2
  107. package/dist/cjs/stories/RadioButtonCard.stories.js +2 -2
  108. package/dist/cjs/stories/RadioButtonCardGroup.stories.js +502 -0
  109. package/dist/cjs/stories/RangeSlider.stories.js +1 -3
  110. package/dist/cjs/stories/ResourceList.stories.js +13 -13
  111. package/dist/cjs/stories/Spinner.stories.js +9 -9
  112. package/dist/cjs/stories/Stack.stories.js +233 -51
  113. package/dist/cjs/stories/Tabs.stories.js +2 -2
  114. package/dist/cjs/stories/Tag.stories.js +1 -1
  115. package/dist/cjs/stories/Thumbnail.stories.js +17 -18
  116. package/dist/cjs/stories/TimePicker.stories.js +0 -5
  117. package/dist/cjs/stories/Tip.stories.js +1 -1
  118. package/dist/cjs/styles/Table.js +2 -7
  119. package/dist/cjs/tests/visual/stories.spec.js +637 -0
  120. package/dist/cjs/utilities/dates.js +7 -7
  121. package/dist/esm/components/ActionList.js +33 -25
  122. package/dist/esm/components/AnnouncementBar.js +115 -18
  123. package/dist/esm/components/AnnouncementCard.js +254 -0
  124. package/dist/esm/components/AppProvider.js +15 -2
  125. package/dist/esm/components/Autocomplete.js +58 -36
  126. package/dist/esm/components/Badge.js +28 -14
  127. package/dist/esm/components/Banner.js +37 -27
  128. package/dist/esm/components/Box.js +50 -38
  129. package/dist/esm/components/Button.js +338 -109
  130. package/dist/esm/components/ButtonGroup.js +27 -14
  131. package/dist/esm/components/Card.js +300 -140
  132. package/dist/esm/components/Checkbox.js +55 -47
  133. package/dist/esm/components/CheckboxCard.js +207 -0
  134. package/dist/esm/components/CheckboxCardGroup.js +370 -0
  135. package/dist/esm/components/ChoiceList.js +21 -11
  136. package/dist/esm/components/Code.js +22 -8
  137. package/dist/esm/components/Collapsible.js +24 -11
  138. package/dist/esm/components/ColorField.js +165 -40
  139. package/dist/esm/components/ContextualSaveBar.js +13 -6
  140. package/dist/esm/components/DatePicker.js +48 -37
  141. package/dist/esm/components/Disclosure.js +50 -6
  142. package/dist/esm/components/Divider.js +78 -20
  143. package/dist/esm/components/DropZone.js +194 -68
  144. package/dist/esm/components/EmptyState.js +18 -6
  145. package/dist/esm/components/Filters.js +84 -36
  146. package/dist/esm/components/FooterHelp.js +14 -4
  147. package/dist/esm/components/Form.js +13 -2
  148. package/dist/esm/components/Frame.js +57 -22
  149. package/dist/esm/components/FrameSaveBar.js +37 -6
  150. package/dist/esm/components/Grid.js +31 -15
  151. package/dist/esm/components/HorizontalStack.js +38 -25
  152. package/dist/esm/components/Icon.js +681 -62
  153. package/dist/esm/components/Image.js +35 -22
  154. package/dist/esm/components/InlineError.js +19 -10
  155. package/dist/esm/components/Label.js +21 -12
  156. package/dist/esm/components/Layout.js +62 -27
  157. package/dist/esm/components/LayoutSection.js +84 -22
  158. package/dist/esm/components/Link.js +35 -22
  159. package/dist/esm/components/List.js +28 -12
  160. package/dist/esm/components/Listbox.js +53 -31
  161. package/dist/esm/components/Loading.js +14 -2
  162. package/dist/esm/components/Modal.js +79 -40
  163. package/dist/esm/components/Navigation.js +107 -36
  164. package/dist/esm/components/Page.js +44 -31
  165. package/dist/esm/components/Pagination.js +20 -5
  166. package/dist/esm/components/Pane.js +67 -4
  167. package/dist/esm/components/Popover.js +63 -30
  168. package/dist/esm/components/PopoverManager.js +14 -1
  169. package/dist/esm/components/ProgressBar.js +28 -15
  170. package/dist/esm/components/RadioButton.js +32 -24
  171. package/dist/esm/components/RadioButtonCard.js +92 -67
  172. package/dist/esm/components/RadioButtonCardGroup.js +364 -0
  173. package/dist/esm/components/RangeSlider.js +34 -26
  174. package/dist/esm/components/ResourceList.js +28 -14
  175. package/dist/esm/components/Select.js +38 -26
  176. package/dist/esm/components/SkeletonText.js +33 -18
  177. package/dist/esm/components/Spinner.js +24 -12
  178. package/dist/esm/components/Stack.js +131 -71
  179. package/dist/esm/components/TabNavigation.js +27 -1
  180. package/dist/esm/components/Table.js +85 -29
  181. package/dist/esm/components/Tabs.js +84 -24
  182. package/dist/esm/components/Tag.js +37 -16
  183. package/dist/esm/components/Text.js +32 -18
  184. package/dist/esm/components/TextField.js +119 -69
  185. package/dist/esm/components/Thumbnail.js +25 -11
  186. package/dist/esm/components/TimePicker.js +22 -1
  187. package/dist/esm/components/Tip.js +140 -25
  188. package/dist/esm/components/ToastNotification.js +107 -34
  189. package/dist/esm/components/ToastProvider.js +13 -3
  190. package/dist/esm/components/Tooltip.js +50 -41
  191. package/dist/esm/components/TopBar.js +83 -9
  192. package/dist/esm/components/VerticalStack.js +31 -16
  193. package/dist/esm/index.js +6 -0
  194. package/dist/esm/playwright.config.js +104 -0
  195. package/dist/esm/stories/Autocomplete.stories.js +10 -10
  196. package/dist/esm/stories/Checkbox.stories.js +6 -8
  197. package/dist/esm/stories/CheckboxCardGroup.stories.js +421 -0
  198. package/dist/esm/stories/Collapsible.stories.js +11 -11
  199. package/dist/esm/stories/ColorField.stories.js +2 -3
  200. package/dist/esm/stories/ComplexExamples.stories.js +48 -77
  201. package/dist/esm/stories/ContextualSaveBar.stories.js +1 -1
  202. package/dist/esm/stories/Divider.stories.js +15 -16
  203. package/dist/esm/stories/DropZone.stories.js +3 -3
  204. package/dist/esm/stories/FooterHelp.stories.js +3 -4
  205. package/dist/esm/stories/Form.stories.js +2 -4
  206. package/dist/esm/stories/Grid.stories.js +24 -33
  207. package/dist/esm/stories/Icon.stories.js +22 -23
  208. package/dist/esm/stories/Image.stories.js +12 -15
  209. package/dist/esm/stories/InlineError.stories.js +0 -1
  210. package/dist/esm/stories/Layout.stories.js +93 -2
  211. package/dist/esm/stories/LayoutSection.stories.js +13 -18
  212. package/dist/esm/stories/List.stories.js +24 -28
  213. package/dist/esm/stories/Listbox.stories.js +2 -2
  214. package/dist/esm/stories/Loading.stories.js +21 -25
  215. package/dist/esm/stories/Modal.stories.js +0 -1
  216. package/dist/esm/stories/Pagination.stories.js +4 -4
  217. package/dist/esm/stories/Pane.stories.js +10 -18
  218. package/dist/esm/stories/Popover.stories.js +7 -7
  219. package/dist/esm/stories/PopoverManager.stories.js +9 -9
  220. package/dist/esm/stories/ProgressBar.stories.js +8 -8
  221. package/dist/esm/stories/RadioButton.stories.js +2 -2
  222. package/dist/esm/stories/RadioButtonCard.stories.js +2 -2
  223. package/dist/esm/stories/RadioButtonCardGroup.stories.js +461 -0
  224. package/dist/esm/stories/RangeSlider.stories.js +1 -3
  225. package/dist/esm/stories/ResourceList.stories.js +13 -13
  226. package/dist/esm/stories/Spinner.stories.js +9 -9
  227. package/dist/esm/stories/Stack.stories.js +224 -51
  228. package/dist/esm/stories/Tabs.stories.js +2 -2
  229. package/dist/esm/stories/Tag.stories.js +1 -1
  230. package/dist/esm/stories/Thumbnail.stories.js +17 -18
  231. package/dist/esm/stories/TimePicker.stories.js +0 -5
  232. package/dist/esm/stories/Tip.stories.js +1 -1
  233. package/dist/esm/styles/Table.js +2 -7
  234. package/dist/esm/tests/visual/stories.spec.js +633 -0
  235. package/dist/esm/utilities/dates.js +7 -7
  236. package/dist/types/components/ActionList.d.ts +1 -31
  237. package/dist/types/components/ActionList.d.ts.map +1 -1
  238. package/dist/types/components/AnnouncementBar.d.ts +1 -19
  239. package/dist/types/components/AnnouncementBar.d.ts.map +1 -1
  240. package/dist/types/components/AnnouncementCard.d.ts +3 -0
  241. package/dist/types/components/AnnouncementCard.d.ts.map +1 -0
  242. package/dist/types/components/AppProvider.d.ts +14 -1
  243. package/dist/types/components/AppProvider.d.ts.map +1 -1
  244. package/dist/types/components/Autocomplete.d.ts +1 -71
  245. package/dist/types/components/Autocomplete.d.ts.map +1 -1
  246. package/dist/types/components/Badge.d.ts +1 -19
  247. package/dist/types/components/Badge.d.ts.map +1 -1
  248. package/dist/types/components/Banner.d.ts +1 -37
  249. package/dist/types/components/Banner.d.ts.map +1 -1
  250. package/dist/types/components/Box.d.ts +1 -68
  251. package/dist/types/components/Box.d.ts.map +1 -1
  252. package/dist/types/components/Button.d.ts +1 -131
  253. package/dist/types/components/Button.d.ts.map +1 -1
  254. package/dist/types/components/ButtonGroup.d.ts +1 -22
  255. package/dist/types/components/ButtonGroup.d.ts.map +1 -1
  256. package/dist/types/components/Card.d.ts +54 -59
  257. package/dist/types/components/Card.d.ts.map +1 -1
  258. package/dist/types/components/Checkbox.d.ts +1 -63
  259. package/dist/types/components/Checkbox.d.ts.map +1 -1
  260. package/dist/types/components/CheckboxCard.d.ts +3 -0
  261. package/dist/types/components/CheckboxCard.d.ts.map +1 -0
  262. package/dist/types/components/CheckboxCardGroup.d.ts +3 -0
  263. package/dist/types/components/CheckboxCardGroup.d.ts.map +1 -0
  264. package/dist/types/components/ChoiceList.d.ts +1 -42
  265. package/dist/types/components/ChoiceList.d.ts.map +1 -1
  266. package/dist/types/components/Code.d.ts +1 -26
  267. package/dist/types/components/Code.d.ts.map +1 -1
  268. package/dist/types/components/Collapsible.d.ts +1 -15
  269. package/dist/types/components/Collapsible.d.ts.map +1 -1
  270. package/dist/types/components/ColorField.d.ts +13 -34
  271. package/dist/types/components/ColorField.d.ts.map +1 -1
  272. package/dist/types/components/ContextualSaveBar.d.ts +13 -6
  273. package/dist/types/components/ContextualSaveBar.d.ts.map +1 -1
  274. package/dist/types/components/DatePicker.d.ts +1 -64
  275. package/dist/types/components/DatePicker.d.ts.map +1 -1
  276. package/dist/types/components/Disclosure.d.ts +1 -25
  277. package/dist/types/components/Disclosure.d.ts.map +1 -1
  278. package/dist/types/components/Divider.d.ts +1 -19
  279. package/dist/types/components/Divider.d.ts.map +1 -1
  280. package/dist/types/components/DropZone.d.ts +3 -62
  281. package/dist/types/components/DropZone.d.ts.map +1 -1
  282. package/dist/types/components/EmptyState.d.ts +1 -50
  283. package/dist/types/components/EmptyState.d.ts.map +1 -1
  284. package/dist/types/components/Filters.d.ts +13 -68
  285. package/dist/types/components/Filters.d.ts.map +1 -1
  286. package/dist/types/components/FooterHelp.d.ts +14 -4
  287. package/dist/types/components/FooterHelp.d.ts.map +1 -1
  288. package/dist/types/components/Form.d.ts +13 -2
  289. package/dist/types/components/Form.d.ts.map +1 -1
  290. package/dist/types/components/Frame.d.ts +15 -36
  291. package/dist/types/components/Frame.d.ts.map +1 -1
  292. package/dist/types/components/FrameSaveBar.d.ts +3 -6
  293. package/dist/types/components/FrameSaveBar.d.ts.map +1 -1
  294. package/dist/types/components/Grid.d.ts +5 -21
  295. package/dist/types/components/Grid.d.ts.map +1 -1
  296. package/dist/types/components/HorizontalStack.d.ts +1 -34
  297. package/dist/types/components/HorizontalStack.d.ts.map +1 -1
  298. package/dist/types/components/Icon.d.ts +1 -41
  299. package/dist/types/components/Icon.d.ts.map +1 -1
  300. package/dist/types/components/Image.d.ts +1 -43
  301. package/dist/types/components/Image.d.ts.map +1 -1
  302. package/dist/types/components/InlineError.d.ts +1 -20
  303. package/dist/types/components/InlineError.d.ts.map +1 -1
  304. package/dist/types/components/Label.d.ts +1 -26
  305. package/dist/types/components/Label.d.ts.map +1 -1
  306. package/dist/types/components/Layout.d.ts +24 -15
  307. package/dist/types/components/Layout.d.ts.map +1 -1
  308. package/dist/types/components/LayoutSection.d.ts +1 -19
  309. package/dist/types/components/LayoutSection.d.ts.map +1 -1
  310. package/dist/types/components/Link.d.ts +1 -37
  311. package/dist/types/components/Link.d.ts.map +1 -1
  312. package/dist/types/components/List.d.ts +5 -17
  313. package/dist/types/components/List.d.ts.map +1 -1
  314. package/dist/types/components/Listbox.d.ts +1 -32
  315. package/dist/types/components/Listbox.d.ts.map +1 -1
  316. package/dist/types/components/Loading.d.ts +14 -2
  317. package/dist/types/components/Loading.d.ts.map +1 -1
  318. package/dist/types/components/Modal.d.ts +26 -35
  319. package/dist/types/components/Modal.d.ts.map +1 -1
  320. package/dist/types/components/Navigation.d.ts +1 -25
  321. package/dist/types/components/Navigation.d.ts.map +1 -1
  322. package/dist/types/components/Page.d.ts +1 -57
  323. package/dist/types/components/Page.d.ts.map +1 -1
  324. package/dist/types/components/Pagination.d.ts +13 -3
  325. package/dist/types/components/Pagination.d.ts.map +1 -1
  326. package/dist/types/components/Pane.d.ts +55 -3
  327. package/dist/types/components/Pane.d.ts.map +1 -1
  328. package/dist/types/components/Popover.d.ts +5 -35
  329. package/dist/types/components/Popover.d.ts.map +1 -1
  330. package/dist/types/components/PopoverManager.d.ts.map +1 -1
  331. package/dist/types/components/ProgressBar.d.ts +1 -22
  332. package/dist/types/components/ProgressBar.d.ts.map +1 -1
  333. package/dist/types/components/RadioButton.d.ts +1 -37
  334. package/dist/types/components/RadioButton.d.ts.map +1 -1
  335. package/dist/types/components/RadioButtonCard.d.ts +1 -39
  336. package/dist/types/components/RadioButtonCard.d.ts.map +1 -1
  337. package/dist/types/components/RadioButtonCardGroup.d.ts +3 -0
  338. package/dist/types/components/RadioButtonCardGroup.d.ts.map +1 -0
  339. package/dist/types/components/RangeSlider.d.ts +1 -42
  340. package/dist/types/components/RangeSlider.d.ts.map +1 -1
  341. package/dist/types/components/ResourceList.d.ts +5 -30
  342. package/dist/types/components/ResourceList.d.ts.map +1 -1
  343. package/dist/types/components/Select.d.ts +1 -46
  344. package/dist/types/components/Select.d.ts.map +1 -1
  345. package/dist/types/components/SkeletonText.d.ts +1 -26
  346. package/dist/types/components/SkeletonText.d.ts.map +1 -1
  347. package/dist/types/components/Spinner.d.ts +1 -16
  348. package/dist/types/components/Spinner.d.ts.map +1 -1
  349. package/dist/types/components/Stack.d.ts +1 -47
  350. package/dist/types/components/Stack.d.ts.map +1 -1
  351. package/dist/types/components/TabNavigation.d.ts.map +1 -1
  352. package/dist/types/components/Table.d.ts +13 -58
  353. package/dist/types/components/Table.d.ts.map +1 -1
  354. package/dist/types/components/Tabs.d.ts +40 -34
  355. package/dist/types/components/Tabs.d.ts.map +1 -1
  356. package/dist/types/components/Tag.d.ts +1 -24
  357. package/dist/types/components/Tag.d.ts.map +1 -1
  358. package/dist/types/components/Text.d.ts +1 -30
  359. package/dist/types/components/Text.d.ts.map +1 -1
  360. package/dist/types/components/TextField.d.ts +1 -109
  361. package/dist/types/components/TextField.d.ts.map +1 -1
  362. package/dist/types/components/Thumbnail.d.ts +1 -16
  363. package/dist/types/components/Thumbnail.d.ts.map +1 -1
  364. package/dist/types/components/TimePicker.d.ts +28 -1
  365. package/dist/types/components/TimePicker.d.ts.map +1 -1
  366. package/dist/types/components/Tip.d.ts +1 -21
  367. package/dist/types/components/Tip.d.ts.map +1 -1
  368. package/dist/types/components/ToastNotification.d.ts +1 -34
  369. package/dist/types/components/ToastNotification.d.ts.map +1 -1
  370. package/dist/types/components/ToastProvider.d.ts +13 -3
  371. package/dist/types/components/ToastProvider.d.ts.map +1 -1
  372. package/dist/types/components/Tooltip.d.ts +1 -54
  373. package/dist/types/components/Tooltip.d.ts.map +1 -1
  374. package/dist/types/components/TopBar.d.ts +1 -19
  375. package/dist/types/components/TopBar.d.ts.map +1 -1
  376. package/dist/types/components/VerticalStack.d.ts +1 -25
  377. package/dist/types/components/VerticalStack.d.ts.map +1 -1
  378. package/dist/types/index.d.ts +6 -0
  379. package/dist/types/styles/Table.d.ts.map +1 -1
  380. package/index.css +76 -14
  381. package/package.json +15 -5
@@ -12,12 +12,90 @@ var _jsxruntime = require("react/jsx-runtime");
12
12
  var _tailwindvariants = require("tailwind-variants");
13
13
  var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
14
14
  var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
15
+ var _polarisicons = require("@shopify/polaris-icons");
16
+ function _define_property(obj, key, value) {
17
+ if (key in obj) {
18
+ Object.defineProperty(obj, key, {
19
+ value: value,
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true
23
+ });
24
+ } else {
25
+ obj[key] = value;
26
+ }
27
+ return obj;
28
+ }
15
29
  function _interop_require_default(obj) {
16
30
  return obj && obj.__esModule ? obj : {
17
31
  default: obj
18
32
  };
19
33
  }
20
- var styles = (0, _tailwindvariants.tv)({
34
+ function _object_spread(target) {
35
+ for(var i = 1; i < arguments.length; i++){
36
+ var source = arguments[i] != null ? arguments[i] : {};
37
+ var ownKeys = Object.keys(source);
38
+ if (typeof Object.getOwnPropertySymbols === "function") {
39
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
40
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
41
+ }));
42
+ }
43
+ ownKeys.forEach(function(key) {
44
+ _define_property(target, key, source[key]);
45
+ });
46
+ }
47
+ return target;
48
+ }
49
+ function ownKeys(object, enumerableOnly) {
50
+ var keys = Object.keys(object);
51
+ if (Object.getOwnPropertySymbols) {
52
+ var symbols = Object.getOwnPropertySymbols(object);
53
+ if (enumerableOnly) {
54
+ symbols = symbols.filter(function(sym) {
55
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
56
+ });
57
+ }
58
+ keys.push.apply(keys, symbols);
59
+ }
60
+ return keys;
61
+ }
62
+ function _object_spread_props(target, source) {
63
+ source = source != null ? source : {};
64
+ if (Object.getOwnPropertyDescriptors) {
65
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
66
+ } else {
67
+ ownKeys(Object(source)).forEach(function(key) {
68
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
69
+ });
70
+ }
71
+ return target;
72
+ }
73
+ /**
74
+ * @component AnnouncementBar
75
+ *
76
+ * @description A full-width banner displayed at the top of the application for global announcements and promotions.
77
+ *
78
+ * @usage
79
+ * - DO: Display global announcements, promotions, or system-wide messages.
80
+ * - DON'T: Use for page-specific messages (use Banner).
81
+ *
82
+ * @accessibility
83
+ * - Ensure the announcement text is descriptive; provide a dismiss action for user control.
84
+ *
85
+ * @alternative
86
+ * - If you need page-specific messaging, use `Banner`.
87
+ * - If you need a contextual hint, use `Tip`.
88
+ *
89
+ * @param {Object} props - Component properties.
90
+ * @param {Function} [props.onClick] - Click handler function.
91
+ * @param {string} props.content - Text content to be displayed.
92
+ * @param {string} [props.icon] - Icon source name.
93
+ * @param {"bounce"} [props.animateIcon] - Animation type for the icon.
94
+ * @param {boolean} [props.fixed] - Whether to fix the announcement bar to the top of the page.
95
+ * @param {Function} [props.onDismiss] - Callback to dismiss the announcement bar. Renders a close button when provided.
96
+ *
97
+ * @returns {JSX.Element} AnnouncementBar component.
98
+ */ var styles = (0, _tailwindvariants.tv)({
21
99
  base: "Litho-AnnouncementBar text-center p-2 min-h-10 flex items-center justify-center bg-brand",
22
100
  variants: {
23
101
  fixed: {
@@ -37,28 +115,27 @@ var iconContainerStyles = (0, _tailwindvariants.tv)({
37
115
  }
38
116
  }
39
117
  });
40
- /**
41
- * AnnouncementBar Component
42
- *
43
- * @param {Object} props - Component properties.
44
- * @param {Function} [props.onClick] - Click handler function.
45
- * @param {string} props.content - Text content to be displayed.
46
- * @param {string} [props.icon] - Icon source name.
47
- * @param {"bounce"} [props.animateIcon] - Animation type for the icon.
48
- * @param {boolean} [props.fixed] - Whether to fix the announcement bar to the top of the page.
49
- *
50
- * @returns {JSX.Element} AnnouncementBar component.
51
- */ function AnnouncementBar() {
118
+ function AnnouncementBar() {
52
119
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
53
- var onClick = props.onClick, content = props.content, icon = props.icon, animateIcon = props.animateIcon, _props_fixed = props.fixed, fixed = _props_fixed === void 0 ? false : _props_fixed;
54
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
120
+ var onClick = props.onClick, content = props.content, icon = props.icon, animateIcon = props.animateIcon, _props_fixed = props.fixed, fixed = _props_fixed === void 0 ? false : _props_fixed, onDismiss = props.onDismiss;
121
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
55
122
  className: styles({
56
123
  fixed: fixed,
57
124
  interactive: !!onClick
58
125
  }),
59
- onClick: onClick,
126
+ onClick: onClick
127
+ }, onClick ? {
128
+ role: "button",
129
+ tabIndex: 0,
130
+ onKeyDown: function(e) {
131
+ if (e.key === "Enter" || e.key === " ") {
132
+ e.preventDefault();
133
+ onClick(e);
134
+ }
135
+ }
136
+ } : {}), {
60
137
  children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
61
- className: "flex items-center justify-center gap-4",
138
+ className: "flex items-center justify-center gap-4 w-full relative",
62
139
  children: [
63
140
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
64
141
  fontWeight: "medium",
@@ -72,9 +149,29 @@ var iconContainerStyles = (0, _tailwindvariants.tv)({
72
149
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
73
150
  source: icon
74
151
  })
152
+ }),
153
+ onDismiss && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
154
+ className: "absolute right-0 p-1 cursor-pointer rounded-md hover:bg-brand-low",
155
+ onClick: function(e) {
156
+ e.stopPropagation();
157
+ onDismiss();
158
+ },
159
+ role: "button",
160
+ tabIndex: 0,
161
+ "aria-label": "Dismiss announcement",
162
+ onKeyDown: function(e) {
163
+ if (e.key === "Enter" || e.key === " ") {
164
+ e.preventDefault();
165
+ e.stopPropagation();
166
+ onDismiss();
167
+ }
168
+ },
169
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
170
+ source: _polarisicons.CancelSmallMinor
171
+ })
75
172
  })
76
173
  ]
77
174
  })
78
- });
175
+ }));
79
176
  }
80
177
  var _default = AnnouncementBar;
@@ -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({