@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
@@ -119,42 +119,21 @@ import Spinner from "./Spinner.js";
119
119
  import Text from "./Text.js";
120
120
  import Icon from "./Icon.js";
121
121
  import { SearchMinor } from "@shopify/polaris-icons";
122
- var styles = tv({
123
- base: "Litho-Autocomplete flex flex-col"
124
- });
125
- function attachPropToTextField(children, prop) {
126
- return React.Children.map(children, function(child) {
127
- if (/*#__PURE__*/ isValidElement(child)) {
128
- var _child_type, _child_props;
129
- if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
130
- return /*#__PURE__*/ cloneElement(child, prop);
131
- }
132
- if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
133
- return /*#__PURE__*/ cloneElement(child, {
134
- children: attachPropToTextField(child.props.children, prop)
135
- });
136
- }
137
- }
138
- return child;
139
- });
140
- }
141
122
  /**
142
- * @typedef {Object} AutocompleteOption
143
- * @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).
144
- * @property {string} value - The value to associate with the option.
145
- * @property {string} [title] - An optional title to display for the option.
146
- * @property {boolean} [allowMultiple] - Whether multiple options can be selected.
147
- * @property {string} [selected] - The value of the option that is currently selected.
148
- * @property {function} [onSelect] - The function to call when the option is selected.
149
- * @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
150
- */ /**
151
- * @typedef {Object} AutocompleteEmptyState
152
- * @property {string} content - The content to display in the empty state.
153
- * @property {React.ReactNode} icon - An optional icon to display in the empty state.
154
- */ /**
155
- * Autocomplete component that provides a flexible dropdown menu with search and selection capabilities.
123
+ * @component Autocomplete
124
+ *
125
+ * @description A searchable text input with a dropdown suggestions list for selecting from filtered options.
126
+ *
127
+ * @usage
128
+ * - DO: Use for selecting from a large list with search/filter capability.
129
+ * - 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).
130
+ *
131
+ * @accessibility
132
+ * - Implements combobox pattern with `aria-expanded` and `aria-activedescendant`; keyboard navigable.
133
+ *
134
+ * @alternative
135
+ * - If the option list is short and static, use `Select`. If you need a custom dropdown, use `Listbox`.
156
136
  *
157
- * @component
158
137
  * @param {Object} props - The props for the Autocomplete component.
159
138
  * @param {Array<AutocompleteOption>} props.options - The options to display in the dropdown.
160
139
  * @param {Array<string>} props.selected - The currently selected option values.
@@ -184,7 +163,7 @@ function attachPropToTextField(children, prop) {
184
163
  * <Autocomplete
185
164
  * options={[
186
165
  * {
187
- * label: <Stack horizontal gap="xs" blockAlign="center"><span>Premium</span><Badge>New</Badge></Stack>,
166
+ * label: <Stack horizontal gap="xs" align="center"><span>Premium</span><Badge>New</Badge></Stack>,
188
167
  * value: "premium"
189
168
  * }
190
169
  * ]}
@@ -192,7 +171,39 @@ function attachPropToTextField(children, prop) {
192
171
  * onSelect={(selected) => console.log(selected)}
193
172
  * textField={<Autocomplete.TextField placeholder="Search..." />}
194
173
  * />
195
- */ function Autocomplete() {
174
+ */ var styles = tv({
175
+ base: "Litho-Autocomplete flex flex-col"
176
+ });
177
+ /**
178
+ * @typedef {Object} AutocompleteOption
179
+ * @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).
180
+ * @property {string} value - The value to associate with the option.
181
+ * @property {string} [title] - An optional title to display for the option.
182
+ * @property {boolean} [allowMultiple] - Whether multiple options can be selected.
183
+ * @property {string} [selected] - The value of the option that is currently selected.
184
+ * @property {function} [onSelect] - The function to call when the option is selected.
185
+ * @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
186
+ */ /**
187
+ * @typedef {Object} AutocompleteEmptyState
188
+ * @property {string} content - The content to display in the empty state.
189
+ * @property {React.ReactNode} icon - An optional icon to display in the empty state.
190
+ */ function attachPropToTextField(children, prop) {
191
+ return React.Children.map(children, function(child) {
192
+ if (/*#__PURE__*/ isValidElement(child)) {
193
+ var _child_type, _child_props;
194
+ if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
195
+ return /*#__PURE__*/ cloneElement(child, prop);
196
+ }
197
+ if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
198
+ return /*#__PURE__*/ cloneElement(child, {
199
+ children: attachPropToTextField(child.props.children, prop)
200
+ });
201
+ }
202
+ }
203
+ return child;
204
+ });
205
+ }
206
+ function Autocomplete() {
196
207
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
197
208
  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;
198
209
  var classes = styles();
@@ -236,6 +247,17 @@ function attachPropToTextField(children, prop) {
236
247
  ]);
237
248
  setShowOptionsPopover && setShowOptionsPopover(false);
238
249
  },
250
+ role: "option",
251
+ tabIndex: 0,
252
+ onKeyDown: function(e) {
253
+ if (e.key === "Enter" || e.key === " ") {
254
+ e.preventDefault();
255
+ onSelect([
256
+ option.value
257
+ ]);
258
+ setShowOptionsPopover && setShowOptionsPopover(false);
259
+ }
260
+ },
239
261
  children: option.label
240
262
  });
241
263
  };
@@ -1,7 +1,32 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { tv } from "tailwind-variants";
3
- var styles = tv({
4
- base: "Litho-Badge inline-flex items-center gap-1.5 text-sm rounded-full leading-normal min-h-5.5",
3
+ /**
4
+ * @component Badge
5
+ *
6
+ * @description A small status indicator that displays a short label with a color-coded background to convey state like success, warning, or attention.
7
+ *
8
+ * @usage
9
+ * - DO: Convey status (success, warning, critical) on list items or table rows.
10
+ * - DON'T: Use for interactive or clickable elements (use Button or Tag).
11
+ * - 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.
12
+ *
13
+ * @accessibility
14
+ * - Badge content is read as inline text; ensure status text is descriptive.
15
+ * - Do not rely on color alone to convey meaning.
16
+ *
17
+ * @alternative
18
+ * - If you need a removable label, use `Tag`.
19
+ * - If you need a full-sentence status message, use `Banner`.
20
+ *
21
+ * @param {object} props - Component properties.
22
+ * @param {React.ReactNode} props.children - Content to display within the badge.
23
+ * @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
24
+ * @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
25
+ * @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
26
+ * @param {string} [props.className] - Additional CSS classes to apply to the badge.
27
+ * @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
28
+ */ var styles = tv({
29
+ base: "Litho-Badge inline-flex items-center gap-1.5 text-sm rounded-full leading-normal min-h-5",
5
30
  variants: {
6
31
  status: {
7
32
  info: "bg-info-alt text-info-alt-fg",
@@ -186,18 +211,7 @@ var progressBadgeStyles = tv({
186
211
  progress: "null"
187
212
  }
188
213
  });
189
- /**
190
- * 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.
191
- *
192
- * @component
193
- * @param {object} props - Component properties.
194
- * @param {React.ReactNode} props.children - Content to display within the badge.
195
- * @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
196
- * @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
197
- * @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
198
- * @param {string} [props.className] - Additional CSS classes to apply to the badge.
199
- * @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
200
- */ function Badge() {
214
+ function Badge() {
201
215
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
202
216
  var children = props.children, progress = props.progress, status = props.status, capitalize = props.capitalize, className = props.className;
203
217
  var classes = styles({
@@ -6,7 +6,43 @@ import Text from "./Text.js";
6
6
  import Button from "./Button.js";
7
7
  import Link from "./Link.js";
8
8
  import { CancelMinor, CircleAlertMajor, CircleInformationMajor, MagicMajor, TickMinor } from "@shopify/polaris-icons";
9
- var styles = tv({
9
+ /**
10
+ * @component Banner
11
+ *
12
+ * @description A contextual message bar that displays informational, success, warning, or critical notices with optional actions and dismiss functionality.
13
+ *
14
+ * @usage
15
+ * - DO: Display important contextual messages at the top of a page or section (info, success, warning, critical).
16
+ * - DON'T: Use for transient notifications (use ToastNotification).
17
+ *
18
+ * @accessibility
19
+ * - Banner uses `role="status"` or appropriate ARIA role based on status; ensure the message text is descriptive.
20
+ *
21
+ * @alternative
22
+ * - If you need a brief, auto-dismissing notification, use `ToastNotification`.
23
+ * - If you need a contextual hint, use `Tip`.
24
+ *
25
+ * @param {Object} props - The properties for configuring the Banner component.
26
+ * @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
27
+ * @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
28
+ * @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
29
+ * @param {React.ReactNode} [props.children] - Additional content to display within the banner.
30
+ * @param {BannerAction} [props.action] - Primary action configuration object
31
+ * @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
32
+ * @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
33
+ * @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
34
+ *
35
+ * @returns {JSX.Element} The rendered Banner component.
36
+ *
37
+ * @example
38
+ * <Banner
39
+ * title="Warning"
40
+ * status="warning"
41
+ * onDismiss={() => console.log('Dismissed')}
42
+ * action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
43
+ * secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
44
+ * />
45
+ */ var styles = tv({
10
46
  base: "Litho-Banner relative rounded-md shadow-card bg-surface-highest outline outline-tint-3"
11
47
  });
12
48
  var headerStyles = tv({
@@ -97,32 +133,6 @@ var STATUS_STYLES = {
97
133
  * @property {boolean} [loading=false] - Whether to show a loading state
98
134
  * @property {Function} [onAction] - Click handler for the action
99
135
  * @property {string} [url] - URL to navigate to when clicked (opens in new tab)
100
- */ /**
101
- * A Banner component that displays a styled banner with customizable title, status, icon, actions, and dismiss functionality.
102
- * The banner style and content change based on the provided props, allowing for various statuses and themes.
103
- *
104
- * @component
105
- *
106
- * @param {Object} props - The properties for configuring the Banner component.
107
- * @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
108
- * @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
109
- * @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
110
- * @param {React.ReactNode} [props.children] - Additional content to display within the banner.
111
- * @param {BannerAction} [props.action] - Primary action configuration object
112
- * @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
113
- * @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
114
- * @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
115
- *
116
- * @returns {JSX.Element} The rendered Banner component.
117
- *
118
- * @example
119
- * <Banner
120
- * title="Warning"
121
- * status="warning"
122
- * onDismiss={() => console.log('Dismissed')}
123
- * action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
124
- * secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
125
- * />
126
136
  */ function Banner() {
127
137
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
128
138
  var _props_title = props.title, title = _props_title === void 0 ? null : _props_title, _props_status = props.status, status = _props_status === void 0 ? "neutral" : _props_status, _props_onDismiss = props.onDismiss, onDismiss = _props_onDismiss === void 0 ? null : _props_onDismiss, _props_children = props.children, children = _props_children === void 0 ? null : _props_children, _props_action = props.action, action = _props_action === void 0 ? null : _props_action, _props_secondaryAction = props.secondaryAction, secondaryAction = _props_secondaryAction === void 0 ? null : _props_secondaryAction, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_spinner = props.spinner, spinner = _props_spinner === void 0 ? false : _props_spinner;
@@ -28,7 +28,55 @@ function _object_spread(target) {
28
28
  }
29
29
  import { jsx as _jsx } from "react/jsx-runtime";
30
30
  import { tv } from "tailwind-variants";
31
- var styles = tv({
31
+ /**
32
+ * @component Box
33
+ *
34
+ * @description A flexible container component with configurable padding, background, border radius, shadow, and overflow properties.
35
+ *
36
+ * @usage
37
+ * - DO: Use as a flexible container for padding, spacing, and background styling.
38
+ * - DON'T: Use for page-level layout (use `Layout` instead).
39
+ *
40
+ * @accessibility
41
+ * - Box renders a generic div by default; use the `as` prop for semantic HTML elements when appropriate.
42
+ *
43
+ * @alternative
44
+ * - If you need a bordered card, use `Card`.
45
+ * - If you need flex layout, use `Stack`.
46
+ *
47
+ * @param {Object} props - Properties to configure the Box component.
48
+ * @param {string} [props.as='div'] - The HTML element to render as. Defaults to `div`.
49
+ * @param {'default' | 'subdued'} [props.background] - Background color variant.
50
+ * @param {'default' | 'subdued'} [props.borderColor] - Border color variant.
51
+ * @param {'default' | 'sm' | 'lg' | 'full'} [props.borderRadius] - Border radius variant.
52
+ * @param {'none' | '0' | '1'} [props.borderBlockStartWidth] - Top border width variant.
53
+ * @param {'none' | '0' | '1'} [props.borderBlockEndWidth] - Bottom border width variant.
54
+ * @param {'none' | '0' | '1'} [props.borderInlineStartWidth] - Left border width variant.
55
+ * @param {'none' | '0' | '1'} [props.borderInlineEndWidth] - Right border width variant.
56
+ * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.padding] - Padding for all sides.
57
+ * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockStart] - Top padding.
58
+ * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockEnd] - Bottom padding.
59
+ * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineStart] - Left padding.
60
+ * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineEnd] - Right padding.
61
+ * @param {'hidden' | 'scroll'} [props.overflow] - Overflow setting for all sides.
62
+ * @param {'hidden' | 'scroll'} [props.overflowX] - Overflow setting for x-axis.
63
+ * @param {'hidden' | 'scroll'} [props.overflowY] - Overflow setting for y-axis.
64
+ * @param {'relative' | 'absolute' | 'fixed' | 'sticky'} [props.position] - CSS positioning of the box.
65
+ * @param {React.ReactNode} [props.children] - Child elements to render inside the Box.
66
+ * @param {string} [props.id] - ID for the Box element.
67
+ * @param {number | string} [props.height] - CSS height of the Box.
68
+ * @param {number | string} [props.width] - CSS width of the Box.
69
+ * @param {number | string} [props.minHeight] - Minimum CSS height.
70
+ * @param {number | string} [props.maxHeight] - Maximum CSS height.
71
+ * @param {number | string} [props.minWidth] - Minimum CSS width.
72
+ * @param {number | string} [props.maxWidth] - Maximum CSS width.
73
+ * @param {number | string} [props.zIndex] - CSS z-index.
74
+ * @param {Object} [props.style] - Additional inline styles for the Box.
75
+ * @param {string} [props.className] - Additional CSS classes to apply to the Box.
76
+ * @param {Function} [props.onClick] - Click handler for the Box.
77
+ *
78
+ * @returns {JSX.Element} A rendered Box component with customized styling.
79
+ */ var styles = tv({
32
80
  base: "Litho-Box",
33
81
  variants: {
34
82
  background: {
@@ -155,43 +203,7 @@ var styles = tv({
155
203
  }
156
204
  }
157
205
  });
158
- /**
159
- * Renders a customizable Box component with various styling options.
160
- *
161
- * @component
162
- * @param {Object} props - Properties to configure the Box component.
163
- * @param {string} [props.as='div'] - The HTML element to render as. Defaults to `div`.
164
- * @param {'default' | 'subdued'} [props.background] - Background color variant.
165
- * @param {'default' | 'subdued'} [props.borderColor] - Border color variant.
166
- * @param {'default' | 'sm' | 'lg' | 'full'} [props.borderRadius] - Border radius variant.
167
- * @param {'none' | '0' | '1'} [props.borderBlockStartWidth] - Top border width variant.
168
- * @param {'none' | '0' | '1'} [props.borderBlockEndWidth] - Bottom border width variant.
169
- * @param {'none' | '0' | '1'} [props.borderInlineStartWidth] - Left border width variant.
170
- * @param {'none' | '0' | '1'} [props.borderInlineEndWidth] - Right border width variant.
171
- * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.padding] - Padding for all sides.
172
- * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockStart] - Top padding.
173
- * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockEnd] - Bottom padding.
174
- * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineStart] - Left padding.
175
- * @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineEnd] - Right padding.
176
- * @param {'hidden' | 'scroll'} [props.overflow] - Overflow setting for all sides.
177
- * @param {'hidden' | 'scroll'} [props.overflowX] - Overflow setting for x-axis.
178
- * @param {'hidden' | 'scroll'} [props.overflowY] - Overflow setting for y-axis.
179
- * @param {'relative' | 'absolute' | 'fixed' | 'sticky'} [props.position] - CSS positioning of the box.
180
- * @param {React.ReactNode} [props.children] - Child elements to render inside the Box.
181
- * @param {string} [props.id] - ID for the Box element.
182
- * @param {number | string} [props.height] - CSS height of the Box.
183
- * @param {number | string} [props.width] - CSS width of the Box.
184
- * @param {number | string} [props.minHeight] - Minimum CSS height.
185
- * @param {number | string} [props.maxHeight] - Maximum CSS height.
186
- * @param {number | string} [props.minWidth] - Minimum CSS width.
187
- * @param {number | string} [props.maxWidth] - Maximum CSS width.
188
- * @param {number | string} [props.zIndex] - CSS z-index.
189
- * @param {Object} [props.style] - Additional inline styles for the Box.
190
- * @param {string} [props.className] - Additional CSS classes to apply to the Box.
191
- * @param {Function} [props.onClick] - Click handler for the Box.
192
- *
193
- * @returns {JSX.Element} A rendered Box component with customized styling.
194
- */ var Box = function() {
206
+ var Box = function() {
195
207
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
196
208
  var _props_as = props.as, as = _props_as === void 0 ? 'div' : _props_as, background = props.background, borderColor = props.borderColor, borderBlockStartWidth = props.borderBlockStartWidth, borderBlockEndWidth = props.borderBlockEndWidth, borderInlineStartWidth = props.borderInlineStartWidth, borderInlineEndWidth = props.borderInlineEndWidth, borderRadius = props.borderRadius, children = props.children, id = props.id, height = props.height, width = props.width, minHeight = props.minHeight, maxHeight = props.maxHeight, minWidth = props.minWidth, maxWidth = props.maxWidth, overflow = props.overflow, overflowX = props.overflowX, overflowY = props.overflowY, padding = props.padding, paddingBlockStart = props.paddingBlockStart, paddingBlockEnd = props.paddingBlockEnd, paddingInlineStart = props.paddingInlineStart, paddingInlineEnd = props.paddingInlineEnd, position = props.position, zIndex = props.zIndex, onClick = props.onClick, style = props.style, className = props.className;
197
209
  var classes = styles({