@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
@@ -159,7 +159,7 @@ import { ComponentName } from '@heymantle/litho';
159
159
  actions={[{ content: 'Edit', onAction: handleEdit }]}
160
160
  padded
161
161
  >
162
- <Stack gap="4">
162
+ <Stack>
163
163
  <Text>Product details go here</Text>
164
164
  </Stack>
165
165
  </Card>
@@ -214,7 +214,7 @@ import { ComponentName } from '@heymantle/litho';
214
214
 
215
215
  **Example:**
216
216
  ```jsx
217
- <Grid columns={{ xs: 1, sm: 2, lg: 3 }} gap="4">
217
+ <Grid columns={{ xs: 1, sm: 2, lg: 3 }}>
218
218
  <Card>Product 1</Card>
219
219
  <Card>Product 2</Card>
220
220
  <Card>Product 3</Card>
@@ -225,14 +225,13 @@ import { ComponentName } from '@heymantle/litho';
225
225
 
226
226
  ### Stack
227
227
 
228
- **Purpose:** Flexible stack component for creating vertical or horizontal layouts with consistent spacing. By default creates a vertical stack.
228
+ **Purpose:** Flexible stack component for creating vertical or horizontal layouts with consistent spacing. By default creates a vertical stack. Supports responsive breakpoints for switching from vertical to horizontal at a given screen width.
229
229
 
230
230
  **Key Props:**
231
- - `horizontal` (boolean): If true, creates horizontal layout (flex-row). Defaults to vertical (flex-col)
231
+ - `horizontal` (boolean|'xs'|'sm'|'md'|'lg'|'xl'): Direction control. `true` for always horizontal. A breakpoint string (e.g. `"md"`) makes it vertical below that breakpoint and horizontal at/above it. Defaults to `false` (vertical)
232
+ - `fill` (boolean): When true and horizontal is active, children fill equal space. Defaults to `true`
232
233
  - `gap` (string|number): Space between children
233
- - `align` (string): Main axis alignment ('start', 'center', 'end', 'space-between', 'space-around')
234
- - `blockAlign` (string): Cross-axis alignment for horizontal stacks (vertical alignment)
235
- - `inlineAlign` (string): Cross-axis alignment for vertical stacks (horizontal alignment)
234
+ - `align` (string): Main axis alignment ('start', 'center', 'end', 'between', 'around')
236
235
  - `wrap` (boolean): Whether children should wrap to the next line
237
236
 
238
237
  **Common Use Cases:**
@@ -240,14 +239,28 @@ import { ComponentName } from '@heymantle/litho';
240
239
  - Form field layouts
241
240
  - Content spacing
242
241
  - Header actions
242
+ - Responsive column layouts (vertical on mobile, horizontal on desktop)
243
243
 
244
244
  **Example:**
245
245
  ```jsx
246
- <Stack horizontal gap="4" align="space-between">
246
+ {/* Horizontal with equal-width children (fill is true by default) */}
247
+ <Stack horizontal justify="between">
247
248
  <Text variant="headingLg">Title</Text>
248
249
  <Button>Action</Button>
249
250
  </Stack>
250
251
 
252
+ {/* Responsive: vertical on mobile, horizontal columns at md breakpoint */}
253
+ <Stack horizontal="md">
254
+ <Card title="Plan A" padded>Basic</Card>
255
+ <Card title="Plan B" padded>Pro</Card>
256
+ </Stack>
257
+
258
+ {/* Horizontal without fill (children size naturally) */}
259
+ <Stack horizontal>
260
+ <Button>Cancel</Button>
261
+ <Button primary>Save</Button>
262
+ </Stack>
263
+
251
264
  <Stack gap="6">
252
265
  <TextField label="Name" />
253
266
  <TextField label="Email" />
@@ -565,7 +578,7 @@ const handleSave = async () => {
565
578
  };
566
579
 
567
580
  <Form>
568
- <Stack gap="4">
581
+ <Stack>
569
582
  <TextField
570
583
  label="Name"
571
584
  value={formData.name}
@@ -956,7 +969,7 @@ const handleSave = async () => {
956
969
  onClose={() => setPaneOpen(false)}
957
970
  title="Product Details"
958
971
  >
959
- <Stack gap="4">
972
+ <Stack>
960
973
  {/* Pane content */}
961
974
  </Stack>
962
975
  </Pane>
@@ -1045,7 +1058,7 @@ const handleSave = async () => {
1045
1058
  items={customers}
1046
1059
  renderItem={(customer) => (
1047
1060
  <ResourceList.Item key={customer.id} id={`customer-${customer.id}`}>
1048
- <Stack horizontal align="space-between">
1061
+ <Stack horizontal justify="between">
1049
1062
  <Stack gap="1">
1050
1063
  <Text variant="headingSm">{customer.name}</Text>
1051
1064
  <Text variant="bodySm" color="subdued">{customer.email}</Text>
@@ -1266,7 +1279,7 @@ import { EditMinor } from '@shopify/polaris-icons';
1266
1279
 
1267
1280
  **Example:**
1268
1281
  ```jsx
1269
- <Stack gap="4">
1282
+ <Stack>
1270
1283
  <Text>Section 1</Text>
1271
1284
  <Divider />
1272
1285
  <Text>Section 2</Text>
@@ -1421,7 +1434,7 @@ const { darkMode, toggleDarkMode } = useDarkMode();
1421
1434
  1. **Always wrap your app with AppProvider** for context access
1422
1435
  2. **Use Page as top-level container** for application pages
1423
1436
  3. **Prefer Layout for complex pages** with multiple sections
1424
- 4. **Use VerticalStack/HorizontalStack** for consistent spacing
1437
+ 4. **Use Stack** for consistent spacing
1425
1438
  5. **Use Card for content grouping** with optional titles
1426
1439
  6. **Provide resourceName** for ResourceList and Table for better accessibility
1427
1440
  7. **Use proper status colors** for badges and banners (success/critical/warning)
@@ -1472,7 +1485,7 @@ const { darkMode, toggleDarkMode } = useDarkMode();
1472
1485
  <Layout>
1473
1486
  <Layout.Section>
1474
1487
  <Card title="Customer Information" padded>
1475
- <Stack gap="4">
1488
+ <Stack>
1476
1489
  <TextField label="Name" value={name} onChange={setName} />
1477
1490
  <TextField label="Email" value={email} onChange={setEmail} />
1478
1491
  </Stack>
@@ -1496,7 +1509,7 @@ const { darkMode, toggleDarkMode } = useDarkMode();
1496
1509
  description="Basic settings"
1497
1510
  >
1498
1511
  <Card padded>
1499
- <Stack gap="4">
1512
+ <Stack>
1500
1513
  <TextField label="Store Name" />
1501
1514
  <TextField label="Email" />
1502
1515
  </Stack>
@@ -72,7 +72,7 @@ import Button from '@heymantle/litho/components/Button';
72
72
 
73
73
  ```jsx
74
74
  // ✅ Correct - Use Litho components for layout
75
- <Stack gap="4">
75
+ <Stack>
76
76
  <TextField label="Name" />
77
77
  <TextField label="Email" />
78
78
  </Stack>
@@ -100,7 +100,7 @@ import Button from '@heymantle/litho/components/Button';
100
100
 
101
101
  ```jsx
102
102
  // ✅ Correct - Use Stack for consistent spacing
103
- <Stack gap="4">
103
+ <Stack>
104
104
  <TextField label="Name" />
105
105
  <TextField label="Email" />
106
106
  <Button primary>Submit</Button>
@@ -285,7 +285,7 @@ import { TextField as MuiTextField } from '@mui/material';
285
285
  </div>
286
286
 
287
287
  // ✅ CORRECT - Use Stack with horizontal
288
- <Stack horizontal gap="4">
288
+ <Stack horizontal>
289
289
  <Button>Cancel</Button>
290
290
  <Button>Save</Button>
291
291
  </Stack>
@@ -313,8 +313,8 @@ function MultiStepRegistration() {
313
313
  switch (currentStep) {
314
314
  case 0:
315
315
  return (
316
- <Stack gap="4">
317
- <Grid columns={{ xs: 1, sm: 2 }} gap="4">
316
+ <Stack>
317
+ <Grid columns={{ xs: 1, sm: 2 }}>
318
318
  <TextField
319
319
  label="First Name"
320
320
  value={formData.firstName}
@@ -347,14 +347,14 @@ function MultiStepRegistration() {
347
347
 
348
348
  case 1:
349
349
  return (
350
- <Stack gap="4">
350
+ <Stack>
351
351
  <TextField
352
352
  label="Street Address"
353
353
  value={formData.address}
354
354
  onChange={(value) => updateField('address', value)}
355
355
  placeholder="123 Main Street"
356
356
  />
357
- <Grid columns={{ xs: 1, sm: 3 }} gap="4">
357
+ <Grid columns={{ xs: 1, sm: 3 }}>
358
358
  <TextField
359
359
  label="City"
360
360
  value={formData.city}
@@ -380,7 +380,7 @@ function MultiStepRegistration() {
380
380
  case 2:
381
381
  return (
382
382
  <Stack gap="6">
383
- <Stack gap="4">
383
+ <Stack>
384
384
  <Text variant="headingSm">
385
385
  Notification Preferences
386
386
  </Text>
@@ -423,7 +423,7 @@ function MultiStepRegistration() {
423
423
  {/* Progress Indicator */}
424
424
  <Box paddingBlockEnd="8">
425
425
  <Stack gap="2">
426
- <Stack horizontal align="space-between">
426
+ <Stack horizontal justify="between">
427
427
  {steps.map((step, index) => (
428
428
  <Text
429
429
  key={step}
@@ -453,7 +453,7 @@ function MultiStepRegistration() {
453
453
  {/* Navigation */}
454
454
  <Box paddingBlockStart="8">
455
455
  <Box paddingBlockStart="4" className="border-t border-edge-subdued">
456
- <Stack horizontal align="space-between">
456
+ <Stack horizontal justify="between">
457
457
  <Button
458
458
  disabled={currentStep === 0}
459
459
  onClick={handlePrevious}
@@ -531,7 +531,7 @@ function ContactForm() {
531
531
  <Card title="Contact Us" padded>
532
532
  <Form>
533
533
  <Stack gap="6">
534
- <Stack horizontal gap="4">
534
+ <Stack horizontal>
535
535
  <TextField
536
536
  label="Name"
537
537
  value={formData.name}
@@ -563,7 +563,7 @@ function ContactForm() {
563
563
  placeholder="Select a subject"
564
564
  />
565
565
 
566
- <Stack gap="4">
566
+ <Stack>
567
567
  <Text variant="headingSm">
568
568
  Priority
569
569
  </Text>
@@ -751,7 +751,7 @@ function OrderList() {
751
751
  accessibilityLabel={`View details for order ${order.id}`}
752
752
  >
753
753
  <Stack gap="2">
754
- <Stack horizontal align="space-between" blockAlign="start">
754
+ <Stack horizontal justify="between" align="start">
755
755
  <Stack gap="1">
756
756
  <Text variant="headingSm">{order.id}</Text>
757
757
  <Text variant="bodySm">{order.customer}</Text>
@@ -764,7 +764,7 @@ function OrderList() {
764
764
  </Stack>
765
765
  </Stack>
766
766
 
767
- <Stack horizontal align="space-between" blockAlign="center">
767
+ <Stack horizontal justify="between" align="center">
768
768
  <Text variant="bodySm" color="subdued">
769
769
  {order.items} item{order.items !== 1 ? 's' : ''} • {order.date}
770
770
  </Text>
@@ -864,7 +864,7 @@ function SettingsPage() {
864
864
  <Checkbox label="Allow search engines to index profile" />
865
865
  <Checkbox label="Show online status" />
866
866
  </Stack>
867
- <Stack horizontal gap="4">
867
+ <Stack horizontal>
868
868
  <Button>Change Password</Button>
869
869
  <Button>Setup 2FA</Button>
870
870
  </Stack>
@@ -909,7 +909,7 @@ function SettingsPage() {
909
909
  description="Irreversible and destructive actions"
910
910
  >
911
911
  <Card padded>
912
- <Stack gap="4">
912
+ <Stack>
913
913
  <Text color="subdued">
914
914
  These actions cannot be undone. Please proceed with caution.
915
915
  </Text>
@@ -955,7 +955,7 @@ function ProductManagement() {
955
955
  description="Essential details about your product"
956
956
  >
957
957
  <Card padded>
958
- <Stack gap="4">
958
+ <Stack>
959
959
  <TextField label="Product Name" placeholder="Enter product name" />
960
960
  <TextField label="SKU" placeholder="Product SKU" />
961
961
  <TextField
@@ -973,7 +973,7 @@ function ProductManagement() {
973
973
  description="Set pricing and manage stock levels"
974
974
  >
975
975
  <Card padded>
976
- <Grid columns={{ xs: 1, sm: 2, lg: 4 }} gap="4">
976
+ <Grid columns={{ xs: 1, sm: 2, lg: 4 }}>
977
977
  <TextField label="Price" placeholder="$0.00" />
978
978
  <TextField label="Compare Price" placeholder="$0.00" />
979
979
  <TextField label="Cost per Item" placeholder="$0.00" />
@@ -987,8 +987,8 @@ function ProductManagement() {
987
987
  description="Configure shipping options and delivery settings"
988
988
  >
989
989
  <Card padded>
990
- <Stack gap="4">
991
- <Grid columns={{ xs: 1, sm: 2, lg: 4 }} gap="4">
990
+ <Stack>
991
+ <Grid columns={{ xs: 1, sm: 2, lg: 4 }}>
992
992
  <TextField label="Weight" placeholder="0.0 kg" />
993
993
  <TextField label="Length" placeholder="0.0 cm" />
994
994
  <TextField label="Width" placeholder="0.0 cm" />
@@ -1005,7 +1005,7 @@ function ProductManagement() {
1005
1005
 
1006
1006
  <Layout.Section>
1007
1007
  <Card padded>
1008
- <Stack horizontal gap="4" align="end">
1008
+ <Stack horizontal align="end">
1009
1009
  <Button>Save as Draft</Button>
1010
1010
  <Button>Preview</Button>
1011
1011
  <Button primary>Publish Product</Button>
@@ -1022,6 +1022,40 @@ function ProductManagement() {
1022
1022
 
1023
1023
  ---
1024
1024
 
1025
+ ### Responsive Column Layout
1026
+
1027
+ **Use Case:** Content that stacks vertically on mobile and displays as equal-width columns on larger screens. Common for pricing cards, feature comparisons, and dashboard panels.
1028
+
1029
+ ```jsx
1030
+ import { Stack, Card, Text } from '@heymantle/litho';
1031
+
1032
+ function PricingSection() {
1033
+ return (
1034
+ <Stack horizontal="md">
1035
+ <Card title="Basic" padded>
1036
+ <Text>Essential features for small teams.</Text>
1037
+ </Card>
1038
+ <Card title="Pro" padded>
1039
+ <Text>Advanced features for growing businesses.</Text>
1040
+ </Card>
1041
+ <Card title="Enterprise" padded>
1042
+ <Text>Full-featured solution for large organizations.</Text>
1043
+ </Card>
1044
+ </Stack>
1045
+ );
1046
+ }
1047
+ ```
1048
+
1049
+ **Key Points:**
1050
+ - `horizontal="md"` makes the stack vertical below 800px and horizontal at/above
1051
+ - Children fill equal width by default (`fill={true}`)
1052
+ - Use `fill={false}` when children should size naturally (e.g. button groups)
1053
+ - Available breakpoints: `"xs"` (320px), `"sm"` (480px), `"md"` (800px), `"lg"` (1038px), `"xl"` (1440px)
1054
+
1055
+ **Storybook Reference:** `stories/Stack.stories.js` → ResponsiveFill
1056
+
1057
+ ---
1058
+
1025
1059
  ## CRUD Operation Patterns
1026
1060
 
1027
1061
  ### List Page with Actions
@@ -1046,14 +1080,14 @@ function ProductsListPage() {
1046
1080
 
1047
1081
  const renderProduct = (product) => (
1048
1082
  <ResourceList.Item key={product.id} id={`product-${product.id}`}>
1049
- <Stack horizontal align="space-between" blockAlign="center">
1083
+ <Stack horizontal justify="between" align="center">
1050
1084
  <Stack gap="1">
1051
1085
  <Text variant="headingSm">{product.name}</Text>
1052
1086
  <Text variant="bodySm" color="subdued">
1053
1087
  Stock: {product.stock} units
1054
1088
  </Text>
1055
1089
  </Stack>
1056
- <Stack horizontal gap="4" blockAlign="center">
1090
+ <Stack horizontal align="center">
1057
1091
  <Text variant="headingSm">{product.price}</Text>
1058
1092
  <Badge status={product.status === 'active' ? 'success' : 'critical'}>
1059
1093
  {product.status === 'active' ? 'Active' : 'Out of Stock'}
@@ -1072,7 +1106,7 @@ function ProductsListPage() {
1072
1106
  }}
1073
1107
  >
1074
1108
  <Card padded>
1075
- <Stack gap="4">
1109
+ <Stack>
1076
1110
  <Filters
1077
1111
  queryValue={searchQuery}
1078
1112
  onQueryChange={setSearchQuery}
@@ -1165,7 +1199,7 @@ function CustomerDetailPage() {
1165
1199
  <Layout>
1166
1200
  <Layout.Section>
1167
1201
  <Card title="Customer Information" padded>
1168
- <Stack gap="4">
1202
+ <Stack>
1169
1203
  <TextField
1170
1204
  label="Name"
1171
1205
  value={customer.name}
@@ -1185,7 +1219,7 @@ function CustomerDetailPage() {
1185
1219
  onChange={(value) => setCustomer({ ...customer, phone: value })}
1186
1220
  disabled={!editing}
1187
1221
  />
1188
- <Stack horizontal gap="2" blockAlign="center">
1222
+ <Stack horizontal gap="2" align="center">
1189
1223
  <Text variant="bodySm">Status:</Text>
1190
1224
  <Badge status={customer.status === 'active' ? 'success' : 'warning'}>
1191
1225
  {customer.status}
@@ -1310,7 +1344,7 @@ function EditProductModal({ open, onClose, product }) {
1310
1344
  ]}
1311
1345
  sectioned
1312
1346
  >
1313
- <Stack gap="4">
1347
+ <Stack>
1314
1348
  <TextField
1315
1349
  label="Product Name"
1316
1350
  value={formData.name}
@@ -1433,7 +1467,7 @@ function FormWithErrorHandling() {
1433
1467
 
1434
1468
  return (
1435
1469
  <Form>
1436
- <Stack gap="4">
1470
+ <Stack>
1437
1471
  {generalError && (
1438
1472
  <Banner status="critical" onDismiss={() => setGeneralError('')}>
1439
1473
  {generalError}
@@ -26,7 +26,7 @@
26
26
  | **Layout.AnnotatedSection** | Section with title/description | `title`, `description` | Settings, forms |
27
27
  | **Card** | Content container | `title`, `actions`, `padded`, `sectioned` | Grouping content |
28
28
  | **Grid** | Responsive grid | `columns` (object/number), `gap` | Product grids, dashboards |
29
- | **Stack** | Vertical/horizontal spacing | `gap`, `align`, `horizontal`, `blockAlign`, `inlineAlign` | Form fields, content, button groups, headers |
29
+ | **Stack** | Vertical/horizontal spacing | `gap`, `align`, `horizontal` (bool/breakpoint), `fill`,
30
30
  | **Box** | Utility container | `padding`, `background`, `borderRadius` | Spacing, colored sections |
31
31
  | **Frame** | App shell with nav | `navigation`, `topBar` | Application wrapper |
32
32
 
@@ -192,7 +192,7 @@ const handleSave = async () => {
192
192
  };
193
193
 
194
194
  <Form>
195
- <Stack gap="4">
195
+ <Stack>
196
196
  <TextField
197
197
  label="Name"
198
198
  value={formData.name}
@@ -253,7 +253,7 @@ const handleSave = async () => {
253
253
  secondaryActions={[{content: 'Cancel', onAction: close}]}
254
254
  sectioned
255
255
  >
256
- <Stack gap="4">
256
+ <Stack>
257
257
  <TextField label="Name" value={name} onChange={setName} />
258
258
  </Stack>
259
259
  </Modal>
@@ -62,7 +62,36 @@ function _interop_require_wildcard(obj, nodeInterop) {
62
62
  }
63
63
  return newObj;
64
64
  }
65
- var styles = (0, _tailwindvariants.tv)({
65
+ /**
66
+ * @component ActionList
67
+ *
68
+ * @description A vertical list of actionable items typically displayed inside a Popover for dropdown menus and contextual actions.
69
+ *
70
+ * @usage
71
+ * - DO: Display a list of actions inside a Popover dropdown menu.
72
+ * - DON'T: Use as a standalone visible list (use List or ResourceList).
73
+ *
74
+ * @accessibility
75
+ * - Renders as a list of buttons; each action item is keyboard navigable.
76
+ *
77
+ * @alternative
78
+ * - If you need a visible list of content, use `List`.
79
+ * - If you need a selectable list, use `Listbox`.
80
+ *
81
+ * @param {Object} props - Component properties.
82
+ * @param {Array<{title: string, items: Array<ActionListItem>}>} [props.sections] - Sections containing items for the action list.
83
+ * @param {Array<ActionListItem>} [props.items] - List of items to render in the action list when no sections are provided.
84
+ * @param {string} [props.iconColor="subdued"] - Default color for icons in the action items.
85
+ * @param {function} [props.onActionAnyItem] - Callback function invoked whenever any action item is selected.
86
+ * @param {boolean} [props.fullWidth=false] - Whether to apply full width styling to the action list.
87
+ * @param {boolean} [props.padded=true] - Whether to apply padding to the action list.
88
+ * @param {string} [props.className] - Additional CSS classes to apply to the action list.
89
+ * @example
90
+ * const items = [{ content: 'Item 1', onAction: () => {} }];
91
+ * <ActionList items={items} />
92
+ *
93
+ * @returns {JSX.Element} The rendered ActionList component.
94
+ */ var styles = (0, _tailwindvariants.tv)({
66
95
  base: "Litho-ActionList",
67
96
  variants: {
68
97
  fullWidth: {
@@ -120,28 +149,12 @@ var itemStyles = (0, _tailwindvariants.tv)({
120
149
  * @property {string} imageUrl - The image to display for the action item.
121
150
  * @property {string} url - The URL to navigate to when the action item is selected.
122
151
  * @property {SecondaryAction} secondaryAction - The secondary action to display for the action item.
123
- */ /**
124
- * ActionList component renders a list of actionable items with optional sections.
125
- * Supports keyboard navigation and action triggers on item selection.
126
- *
127
- * @component
128
- * @param {Object} props - Component properties.
129
- * @param {Array<{title: string, items: Array<ActionListItem>}>} [props.sections] - Sections containing items for the action list.
130
- * @param {Array<ActionListItem>} [props.items] - List of items to render in the action list when no sections are provided.
131
- * @param {string} [props.iconColor="subdued"] - Default color for icons in the action items.
132
- * @param {function} [props.onActionAnyItem] - Callback function invoked whenever any action item is selected.
133
- * @param {boolean} [props.fullWidth=false] - Whether to apply full width styling to the action list.
134
- * @param {boolean} [props.padded=true] - Whether to apply padding to the action list.
135
- * @param {string} [props.className] - Additional CSS classes to apply to the action list.
136
- * @example
137
- * const items = [{ content: 'Item 1', onAction: () => {} }];
138
- * <ActionList items={items} />
139
- *
140
- * @returns {JSX.Element} The rendered ActionList component.
141
152
  */ function ActionList() {
142
153
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
143
154
  var sections = props.sections, _props_padded = props.padded, padded = _props_padded === void 0 ? true : _props_padded, tmp = props.items, initialItems = tmp === void 0 ? [] : tmp, tmp1 = props.iconColor, _iconColor = tmp1 === void 0 ? "subdued" : tmp1, onActionAnyItem = props.onActionAnyItem, className = props.className, _props_fullWidth = props.fullWidth, fullWidth = _props_fullWidth === void 0 ? false : _props_fullWidth;
144
- var sectionTitleAsKeys = true;
155
+ // Always use index-based keys to avoid duplicate key issues when
156
+ // multiple sections have empty or identical titles
157
+ var sectionTitleAsKeys = false;
145
158
  var items = initialItems || (sections ? sections.flatMap(function(section) {
146
159
  return section.items;
147
160
  }) : []);
@@ -184,11 +197,6 @@ var itemStyles = (0, _tailwindvariants.tv)({
184
197
  padded: padded
185
198
  });
186
199
  var isSectioned = sections && sections.length > 0;
187
- if (isSectioned) {
188
- sectionTitleAsKeys = sections.every(function(section) {
189
- return Object.prototype.hasOwnProperty.call(section, "title");
190
- });
191
- }
192
200
  var ActionListItem = function(param) {
193
201
  var item = param.item, index = param.index;
194
202
  var content = item.content, description = item.description, disabled = item.disabled, destructive = item.destructive, icon = item.icon, onAction = item.onAction, prefix = item.prefix, imageUrl = item.imageUrl, url = item.url, secondaryAction = item.secondaryAction;
@@ -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;