@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
@@ -191,7 +191,107 @@ function _unsupported_iterable_to_array(o, minLen) {
191
191
  if (n === "Map" || n === "Set") return Array.from(n);
192
192
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
193
193
  }
194
- var styles = (0, _tailwindvariants.tv)({
194
+ /**
195
+ * @component Button
196
+ *
197
+ * @description A versatile action trigger that renders as a button or link with support for variants, icons, loading states, and size options.
198
+ *
199
+ * @usage
200
+ * - DO: Use for triggering actions like save, delete, or submit.
201
+ * - DON'T: Use for navigation-only links (use Link component).
202
+ *
203
+ * @accessibility
204
+ * - Renders as `<button>` or `<a>` with proper roles; always provide `accessibilityLabel` for icon-only buttons.
205
+ *
206
+ * @alternative
207
+ * - If you need navigation-only text, use `Link`.
208
+ * - If you need a group of related actions, use `ButtonGroup`.
209
+ *
210
+ * @param {Object} props - The properties for configuring the Button component.
211
+ * @param {string} [props.id] - Unique identifier for the button.
212
+ * @param {React.ReactNode} [props.children] - The content to display within the button.
213
+ * @param {string} [props.url] - URL to navigate to when clicked. If provided, renders as an anchor tag.
214
+ * @param {boolean} [props.disabled=false] - Whether the button is disabled.
215
+ * @param {boolean} [props.external] - Whether the URL should open in a new tab.
216
+ * @param {string} [props.target] - Target attribute for the anchor tag when URL is provided.
217
+ * @param {boolean} [props.submit] - Whether the button should act as a form submit button.
218
+ * @param {boolean} [props.loading=false] - Whether to show a loading spinner.
219
+ * @param {boolean} [props.pressed=false] - Whether the button appears pressed.
220
+ * @param {string} [props.accessibilityLabel] - Accessible label for screen readers.
221
+ * @param {string} [props.role] - ARIA role for the button.
222
+ * @param {string} [props.ariaControls] - ID of the element controlled by the button.
223
+ * @param {boolean} [props.ariaExpanded] - Whether the controlled element is expanded.
224
+ * @param {string} [props.ariaDescribedBy] - ID of the element that describes the button.
225
+ * @param {boolean} [props.ariaChecked] - Whether the button is checked (for toggle buttons).
226
+ * @param {boolean} [props.hasIcon] - Override icon-presence detection for padding. Use when the button contains an icon not passed via the `icon` prop.
227
+ * @param {React.Component} [props.icon] - Icon component to display within the button.
228
+ * @param {"default" | "primary" | "secondary" | "plain" | "link" | "destructive" | "highlight"} [props.iconColor='default'] - Color of the icon.
229
+ * @param {"default" | "sm" | "lg" | "xl"} [props.iconSize='default'] - Size of the icon.
230
+ * @param {"left" | "right"} [props.iconPosition='left'] - Position of the icon ('left' or 'right').
231
+ * @param {boolean} [props.primary=false] - Whether to show the primary button style.
232
+ * @param {boolean} [props.highlight=false] - Whether to show the highlight button style.
233
+ * @param {boolean} [props.link=false] - Whether to show a link style.
234
+ * @param {boolean} [props.destructive=false] - Whether to show destructive styling.
235
+ * @param {boolean} [props.disclosure=false] - Whether to show a disclosure arrow.
236
+ * @param {boolean} [props.disclosureRight=false] - Whether to show the disclosure on the right.
237
+ * @param {boolean} [props.plain=false] - Whether to show plain styling without background.
238
+ * @param {boolean} [props.naked=false] - Whether to show the naked styling.
239
+ * @param {boolean} [props.outline=false] - Whether to show the outline variant. Styled like plain with a 1px outline border.
240
+ * @param {"mini" | "small" | "medium" | "large" | "stepper"} [props.size='medium'] - Size of the button ('mini', 'small', 'medium', 'large', 'stepper').
241
+ * @param {boolean} [props.fullWidth] - Whether the button should take full width.
242
+ * @param {"left" | "center"} [props.fullWidthAlignment='left'] - Alignment of the label text when fullWidth and disclosure are both active ('left', 'center').
243
+ * @param {"left" | "center" | "right"} [props.align='center'] - Alignment of the button content ('left', 'center', 'right').
244
+ * @param {string} [props.tooltip] - Tooltip to show when hovering over the button.
245
+ * @param {"left" | "center" | "right"} [props.tooltipAlignment='right'] - Alignment of the tooltip ('left', 'center', 'right').
246
+ * @param {"above" | "below" | "left" | "right"} [props.tooltipPosition='above'] - Position of the tooltip ('above', 'below', 'left', 'right').
247
+ * @param {"inline-block" | "block" | "inline"} [props.tooltipDisplay='inline-block'] - Display type of the tooltip ('inline-block', 'block', 'inline').
248
+ * @param {Object} [props.connectedDisclosure] - Configuration for connected disclosure menu.
249
+ * @param {Array<import("./ActionList").ActionListItem>} [props.connectedDisclosure.actions] - Actions to show in the disclosure menu.
250
+ * @param {Array<{title?: string, items: Array<import("./ActionList").ActionListItem>}>} [props.connectedDisclosure.sections] - Sections with optional titles to show in the disclosure menu. Use instead of actions for grouped items.
251
+ * @param {string} [props.className] - Additional CSS classes for the button.
252
+ * @param {string} [props.contentClassName] - Additional CSS classes for the button content.
253
+ * @param {boolean} [props.rounded] - Whether to show fully rounded corners.
254
+ * @param {Function} [props.onClick] - Callback when the button is clicked.
255
+ * @param {Function} [props.onMouseDown] - Callback when the mouse is pressed on the button.
256
+ *
257
+ * @returns {JSX.Element} The rendered Button component.
258
+ *
259
+ * @example
260
+ * ```js
261
+ * // Basic button
262
+ * <Button onClick={() => console.log('Clicked')}>
263
+ * Click me
264
+ * </Button>
265
+ * ```
266
+ *
267
+ * @example
268
+ * ```js
269
+ * // Primary button with icon and loading state
270
+ * <Button
271
+ * primary
272
+ * loading={isLoading}
273
+ * icon={SaveMinor}
274
+ * onClick={handleSave}
275
+ * >
276
+ * Save changes
277
+ * </Button>
278
+ * ```
279
+ *
280
+ * @example
281
+ * ```js
282
+ * // Button with connected disclosure
283
+ * <Button
284
+ * connectedDisclosure={{
285
+ * actions: [
286
+ * { content: 'Option 1', onAction: () => {} },
287
+ * { content: 'Option 2', onAction: () => {} }
288
+ * ]
289
+ * }}
290
+ * >
291
+ * More actions
292
+ * </Button>
293
+ * ```
294
+ */ var styles = (0, _tailwindvariants.tv)({
195
295
  base: "Litho-Button relative flex items-center justify-center rounded-md border border-transparent overflow-hidden",
196
296
  variants: {
197
297
  disabled: {
@@ -253,6 +353,10 @@ var styles = (0, _tailwindvariants.tv)({
253
353
  naked: {
254
354
  true: "border-none bg-transparent p-0 hover:bg-transparent w-auto justify-start",
255
355
  false: ""
356
+ },
357
+ outline: {
358
+ true: "",
359
+ false: ""
256
360
  }
257
361
  },
258
362
  compoundVariants: [
@@ -261,10 +365,16 @@ var styles = (0, _tailwindvariants.tv)({
261
365
  plain: true,
262
366
  class: "border-tint-2 dark:border-tint-alt-4"
263
367
  },
368
+ {
369
+ bordered: true,
370
+ outline: true,
371
+ class: "border-tint-2 dark:border-tint-alt-4"
372
+ },
264
373
  {
265
374
  disabled: true,
266
375
  plain: false,
267
376
  link: false,
377
+ outline: false,
268
378
  highlight: false,
269
379
  class: "border-btn-secondary-border"
270
380
  },
@@ -272,6 +382,7 @@ var styles = (0, _tailwindvariants.tv)({
272
382
  loading: true,
273
383
  plain: false,
274
384
  link: false,
385
+ outline: false,
275
386
  highlight: false,
276
387
  class: "border-btn-secondary-border"
277
388
  },
@@ -312,6 +423,7 @@ var styles = (0, _tailwindvariants.tv)({
312
423
  primary: false,
313
424
  plain: false,
314
425
  link: false,
426
+ outline: false,
315
427
  destructive: false,
316
428
  highlight: false,
317
429
  class: "rounded-l-none border-l border-l-tint-4!"
@@ -334,6 +446,7 @@ var styles = (0, _tailwindvariants.tv)({
334
446
  primary: false,
335
447
  plain: false,
336
448
  link: false,
449
+ outline: false,
337
450
  destructive: false,
338
451
  highlight: false,
339
452
  class: "rounded-l-none border-l border-l-tint-alt-4!"
@@ -374,6 +487,7 @@ var styles = (0, _tailwindvariants.tv)({
374
487
  primary: false,
375
488
  plain: false,
376
489
  link: false,
490
+ outline: false,
377
491
  destructive: false,
378
492
  highlight: false,
379
493
  pressed: false,
@@ -386,6 +500,7 @@ var styles = (0, _tailwindvariants.tv)({
386
500
  primary: false,
387
501
  plain: false,
388
502
  link: false,
503
+ outline: false,
389
504
  destructive: false,
390
505
  highlight: false,
391
506
  pressed: true,
@@ -397,6 +512,7 @@ var styles = (0, _tailwindvariants.tv)({
397
512
  primary: false,
398
513
  plain: false,
399
514
  link: false,
515
+ outline: false,
400
516
  destructive: false,
401
517
  highlight: false,
402
518
  class: "bg-btn-secondary-disabled text-btn-secondary-disabled-fg"
@@ -406,6 +522,7 @@ var styles = (0, _tailwindvariants.tv)({
406
522
  primary: false,
407
523
  plain: false,
408
524
  link: false,
525
+ outline: false,
409
526
  destructive: false,
410
527
  highlight: false,
411
528
  class: "bg-btn-secondary-disabled text-btn-secondary-disabled-fg"
@@ -435,6 +552,31 @@ var styles = (0, _tailwindvariants.tv)({
435
552
  loading: true,
436
553
  class: "bg-btn-plain-disabled text-btn-plain-disabled-fg"
437
554
  },
555
+ // Outline buttons
556
+ {
557
+ outline: true,
558
+ disabled: false,
559
+ loading: false,
560
+ bordered: false,
561
+ class: "border-edge-light bg-btn-plain hover:bg-btn-plain-low active:bg-btn-plain-lower text-btn-plain-fg hover:text-btn-plain-fg-alt"
562
+ },
563
+ {
564
+ outline: true,
565
+ disabled: false,
566
+ loading: false,
567
+ bordered: true,
568
+ class: "border-edge-light bg-btn-plain hover:bg-btn-plain-low active:bg-btn-plain-lower text-btn-plain-fg hover:text-btn-plain-fg-alt"
569
+ },
570
+ {
571
+ outline: true,
572
+ disabled: true,
573
+ class: "border-edge-light bg-btn-plain-disabled text-btn-plain-disabled-fg"
574
+ },
575
+ {
576
+ outline: true,
577
+ loading: true,
578
+ class: "border-edge-light bg-btn-plain-disabled text-btn-plain-disabled-fg"
579
+ },
438
580
  // Link buttons
439
581
  {
440
582
  link: true,
@@ -514,7 +656,8 @@ var styles = (0, _tailwindvariants.tv)({
514
656
  shadow: false,
515
657
  darkMode: false,
516
658
  bordered: false,
517
- insight: false
659
+ insight: false,
660
+ outline: false
518
661
  }
519
662
  });
520
663
  var contentStyles = (0, _tailwindvariants.tv)({
@@ -533,7 +676,7 @@ var contentStyles = (0, _tailwindvariants.tv)({
533
676
  false: ""
534
677
  },
535
678
  size: {
536
- mini: "p-0",
679
+ mini: "py-0 text-sm",
537
680
  small: "py-0.5",
538
681
  large: "py-3",
539
682
  medium: "py-1"
@@ -541,13 +684,57 @@ var contentStyles = (0, _tailwindvariants.tv)({
541
684
  naked: {
542
685
  true: "px-2",
543
686
  false: ""
687
+ },
688
+ iconPosition: {
689
+ left: "",
690
+ right: ""
691
+ },
692
+ fullWidth: {
693
+ true: "",
694
+ false: ""
695
+ },
696
+ fullWidthAlignment: {
697
+ left: "",
698
+ center: ""
544
699
  }
545
700
  },
546
701
  compoundVariants: [
702
+ {
703
+ fullWidth: true,
704
+ disclosure: true,
705
+ fullWidthAlignment: "left",
706
+ class: "w-full justify-start"
707
+ },
708
+ {
709
+ fullWidth: true,
710
+ disclosure: true,
711
+ fullWidthAlignment: "center",
712
+ class: "w-full justify-center"
713
+ },
547
714
  {
548
715
  size: "mini",
549
716
  iconOnly: true,
550
- class: "!px-0"
717
+ class: "!px-0.5"
718
+ },
719
+ {
720
+ size: "mini",
721
+ hasIcon: false,
722
+ iconOnly: false,
723
+ class: "px-1.5"
724
+ },
725
+ {
726
+ size: "mini",
727
+ hasIcon: true,
728
+ iconOnly: false,
729
+ iconPosition: "left",
730
+ class: "pl-0.5 pr-1.5"
731
+ },
732
+ {
733
+ size: "mini",
734
+ hasIcon: true,
735
+ iconOnly: false,
736
+ iconPosition: "right",
737
+ class: "pl-1.5 pr-0.5"
551
738
  },
552
739
  {
553
740
  size: "small",
@@ -564,8 +751,16 @@ var contentStyles = (0, _tailwindvariants.tv)({
564
751
  size: "small",
565
752
  hasIcon: true,
566
753
  iconOnly: false,
754
+ iconPosition: "left",
567
755
  class: "pl-1.5 pr-2"
568
756
  },
757
+ {
758
+ size: "small",
759
+ hasIcon: true,
760
+ iconOnly: false,
761
+ iconPosition: "right",
762
+ class: "pl-2 pr-1.5"
763
+ },
569
764
  {
570
765
  size: "medium",
571
766
  iconOnly: true,
@@ -581,8 +776,17 @@ var contentStyles = (0, _tailwindvariants.tv)({
581
776
  hasChildren: true,
582
777
  disclosure: false,
583
778
  size: "large",
779
+ iconPosition: "left",
584
780
  class: "pl-3 pr-4"
585
781
  },
782
+ {
783
+ hasIcon: true,
784
+ hasChildren: true,
785
+ disclosure: false,
786
+ size: "large",
787
+ iconPosition: "right",
788
+ class: "pl-4 pr-3"
789
+ },
586
790
  {
587
791
  hasIcon: true,
588
792
  hasChildren: true,
@@ -594,13 +798,28 @@ var contentStyles = (0, _tailwindvariants.tv)({
594
798
  hasChildren: true,
595
799
  disclosure: false,
596
800
  size: "medium",
801
+ iconPosition: "left",
597
802
  class: "pl-2 pr-3"
598
803
  },
804
+ {
805
+ hasIcon: true,
806
+ hasChildren: true,
807
+ disclosure: false,
808
+ size: "medium",
809
+ iconPosition: "right",
810
+ class: "pl-3 pr-2"
811
+ },
599
812
  {
600
813
  hasIcon: false,
601
814
  hasChildren: true,
602
815
  disclosure: false,
603
816
  naked: false,
817
+ size: [
818
+ "small",
819
+ "medium",
820
+ "large",
821
+ "stepper"
822
+ ],
604
823
  class: "px-3"
605
824
  },
606
825
  {
@@ -615,15 +834,27 @@ var contentStyles = (0, _tailwindvariants.tv)({
615
834
  hasIcon: false,
616
835
  iconOnly: false,
617
836
  hasChildren: true,
618
- size: "medium"
837
+ size: "medium",
838
+ iconPosition: "left"
619
839
  }
620
840
  });
621
841
  var iconStyles = (0, _tailwindvariants.tv)({
622
- base: "Litho-Button__Icon"
842
+ base: "Litho-Button__Icon",
843
+ variants: {
844
+ loading: {
845
+ true: "invisible"
846
+ }
847
+ }
623
848
  });
624
849
  var textStyles = (0, _tailwindvariants.tv)({
625
- base: "Litho-Button__Text whitespace-nowrap leading-5 font-medium",
850
+ base: "Litho-Button__Text whitespace-nowrap leading-5",
626
851
  variants: {
852
+ size: {
853
+ mini: "font-normal",
854
+ small: "font-medium",
855
+ medium: "font-medium",
856
+ large: "font-medium"
857
+ },
627
858
  loading: {
628
859
  true: "invisible"
629
860
  },
@@ -647,6 +878,10 @@ var textStyles = (0, _tailwindvariants.tv)({
647
878
  true: "",
648
879
  false: ""
649
880
  },
881
+ outline: {
882
+ true: "",
883
+ false: ""
884
+ },
650
885
  highlight: {
651
886
  true: "",
652
887
  false: ""
@@ -658,9 +893,33 @@ var textStyles = (0, _tailwindvariants.tv)({
658
893
  naked: {
659
894
  true: "",
660
895
  false: ""
896
+ },
897
+ fullWidth: {
898
+ true: "",
899
+ false: ""
900
+ },
901
+ disclosure: {
902
+ true: "",
903
+ false: ""
904
+ },
905
+ fullWidthAlignment: {
906
+ left: "",
907
+ center: ""
661
908
  }
662
909
  },
663
910
  compoundVariants: [
911
+ {
912
+ fullWidth: true,
913
+ disclosure: true,
914
+ fullWidthAlignment: "left",
915
+ class: "flex-grow text-left"
916
+ },
917
+ {
918
+ fullWidth: true,
919
+ disclosure: true,
920
+ fullWidthAlignment: "center",
921
+ class: "flex-grow text-center"
922
+ },
664
923
  {
665
924
  primary: true,
666
925
  loading: false,
@@ -684,6 +943,7 @@ var textStyles = (0, _tailwindvariants.tv)({
684
943
  primary: false,
685
944
  plain: false,
686
945
  link: false,
946
+ outline: false,
687
947
  naked: false,
688
948
  insight: false,
689
949
  class: "text-btn-secondary-fg"
@@ -695,6 +955,7 @@ var textStyles = (0, _tailwindvariants.tv)({
695
955
  primary: false,
696
956
  plain: false,
697
957
  link: false,
958
+ outline: false,
698
959
  class: "text-btn-secondary-disabled-fg"
699
960
  },
700
961
  {
@@ -704,6 +965,7 @@ var textStyles = (0, _tailwindvariants.tv)({
704
965
  primary: false,
705
966
  plain: false,
706
967
  link: false,
968
+ outline: false,
707
969
  class: "text-btn-secondary-disabled-fg"
708
970
  },
709
971
  {
@@ -722,6 +984,22 @@ var textStyles = (0, _tailwindvariants.tv)({
722
984
  disabled: true,
723
985
  class: "text-btn-plain-disabled-fg"
724
986
  },
987
+ {
988
+ outline: true,
989
+ loading: false,
990
+ disabled: false,
991
+ class: "text-btn-plain-fg"
992
+ },
993
+ {
994
+ outline: true,
995
+ loading: true,
996
+ class: "text-btn-plain-disabled-fg"
997
+ },
998
+ {
999
+ outline: true,
1000
+ disabled: true,
1001
+ class: "text-btn-plain-disabled-fg"
1002
+ },
725
1003
  {
726
1004
  link: true,
727
1005
  loading: false,
@@ -779,108 +1057,24 @@ var textStyles = (0, _tailwindvariants.tv)({
779
1057
  defaultVariants: {
780
1058
  primary: false,
781
1059
  plain: false,
1060
+ outline: false,
782
1061
  link: false,
783
1062
  destructive: false,
784
1063
  highlight: false,
785
1064
  loading: false,
786
1065
  disabled: false,
787
- rounded: false
1066
+ rounded: false,
1067
+ size: "medium"
788
1068
  }
789
1069
  });
790
1070
  var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
791
1071
  base: "Litho-Button__ConnectedDisclosure flex flex-wrap-nowrap"
792
1072
  });
793
- /**
794
- * A Button component that renders a customizable button or link with various styles and states.
795
- * The button can be configured with different variants, sizes, and can include icons, loading states,
796
- * and connected disclosure actions.
797
- *
798
- * @component
799
- *
800
- * @param {Object} props - The properties for configuring the Button component.
801
- * @param {string} [props.id] - Unique identifier for the button.
802
- * @param {React.ReactNode} [props.children] - The content to display within the button.
803
- * @param {string} [props.url] - URL to navigate to when clicked. If provided, renders as an anchor tag.
804
- * @param {boolean} [props.disabled=false] - Whether the button is disabled.
805
- * @param {boolean} [props.external] - Whether the URL should open in a new tab.
806
- * @param {string} [props.target] - Target attribute for the anchor tag when URL is provided.
807
- * @param {boolean} [props.submit] - Whether the button should act as a form submit button.
808
- * @param {boolean} [props.loading=false] - Whether to show a loading spinner.
809
- * @param {boolean} [props.pressed=false] - Whether the button appears pressed.
810
- * @param {string} [props.accessibilityLabel] - Accessible label for screen readers.
811
- * @param {string} [props.role] - ARIA role for the button.
812
- * @param {string} [props.ariaControls] - ID of the element controlled by the button.
813
- * @param {boolean} [props.ariaExpanded] - Whether the controlled element is expanded.
814
- * @param {string} [props.ariaDescribedBy] - ID of the element that describes the button.
815
- * @param {boolean} [props.ariaChecked] - Whether the button is checked (for toggle buttons).
816
- * @param {React.Component} [props.icon] - Icon component to display within the button.
817
- * @param {"default" | "primary" | "secondary" | "plain" | "link" | "destructive" | "highlight"} [props.iconColor='default'] - Color of the icon.
818
- * @param {"default" | "sm" | "lg" | "xl"} [props.iconSize='default'] - Size of the icon.
819
- * @param {boolean} [props.primary=false] - Whether to show the primary button style.
820
- * @param {boolean} [props.highlight=false] - Whether to show the highlight button style.
821
- * @param {boolean} [props.link=false] - Whether to show a link style.
822
- * @param {boolean} [props.destructive=false] - Whether to show destructive styling.
823
- * @param {boolean} [props.disclosure=false] - Whether to show a disclosure arrow.
824
- * @param {boolean} [props.disclosureRight=false] - Whether to show the disclosure on the right.
825
- * @param {boolean} [props.plain=false] - Whether to show plain styling without background.
826
- * @param {boolean} [props.naked=false] - Whether to show the naked styling.
827
- * @param {"mini" | "small" | "medium" | "large" | "stepper"} [props.size='medium'] - Size of the button ('mini', 'small', 'medium', 'large', 'stepper').
828
- * @param {boolean} [props.fullWidth] - Whether the button should take full width.
829
- * @param {"left" | "center" | "right"} [props.align='center'] - Alignment of the button content ('left', 'center', 'right').
830
- * @param {string} [props.tooltip] - Tooltip to show when hovering over the button.
831
- * @param {"left" | "center" | "right"} [props.tooltipAlignment='right'] - Alignment of the tooltip ('left', 'center', 'right').
832
- * @param {"above" | "below" | "left" | "right"} [props.tooltipPosition='above'] - Position of the tooltip ('above', 'below', 'left', 'right').
833
- * @param {"inline-block" | "block" | "inline"} [props.tooltipDisplay='inline-block'] - Display type of the tooltip ('inline-block', 'block', 'inline').
834
- * @param {Object} [props.connectedDisclosure] - Configuration for connected disclosure menu.
835
- * @param {Array<import("./ActionList").ActionListItem>} [props.connectedDisclosure.actions] - Actions to show in the disclosure menu.
836
- * @param {string} [props.className] - Additional CSS classes for the button.
837
- * @param {string} [props.contentClassName] - Additional CSS classes for the button content.
838
- * @param {boolean} [props.rounded] - Whether to show fully rounded corners.
839
- * @param {Function} [props.onClick] - Callback when the button is clicked.
840
- * @param {Function} [props.onMouseDown] - Callback when the mouse is pressed on the button.
841
- *
842
- * @returns {JSX.Element} The rendered Button component.
843
- *
844
- * @example
845
- * ```js
846
- * // Basic button
847
- * <Button onClick={() => console.log('Clicked')}>
848
- * Click me
849
- * </Button>
850
- * ```
851
- *
852
- * @example
853
- * ```js
854
- * // Primary button with icon and loading state
855
- * <Button
856
- * primary
857
- * loading={isLoading}
858
- * icon={SaveMinor}
859
- * onClick={handleSave}
860
- * >
861
- * Save changes
862
- * </Button>
863
- * ```
864
- *
865
- * @example
866
- * ```js
867
- * // Button with connected disclosure
868
- * <Button
869
- * connectedDisclosure={{
870
- * actions: [
871
- * { content: 'Option 1', onAction: () => {} },
872
- * { content: 'Option 2', onAction: () => {} }
873
- * ]
874
- * }}
875
- * >
876
- * More actions
877
- * </Button>
878
- * ```
879
- */ function Button() {
1073
+ function Button() {
880
1074
  var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
881
1075
  var darkMode = (0, _AppProvider.useDarkMode)().darkMode;
882
1076
  var _useState = _sliced_to_array((0, _react.useState)(false), 2), showConnectedDisclosurePopover = _useState[0], setShowConnectedDisclosurePopover = _useState[1];
883
- var id = props.id, children = props.children, url = props.url, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, external = props.external, target = props.target, submit = props.submit, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_pressed = props.pressed, pressed = _props_pressed === void 0 ? false : _props_pressed, accessibilityLabel = props.accessibilityLabel, role = props.role, ariaControls = props.ariaControls, ariaExpanded = props.ariaExpanded, ariaDescribedBy = props.ariaDescribedBy, ariaChecked = props.ariaChecked, icon = props.icon, _iconColor = props.iconColor, _props_iconSize = props.iconSize, iconSize = _props_iconSize === void 0 ? "default" : _props_iconSize, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, _props_primary = props.primary, primary = _props_primary === void 0 ? false : _props_primary, _props_highlight = props.highlight, highlight = _props_highlight === void 0 ? false : _props_highlight, _props_link = props.link, link = _props_link === void 0 ? false : _props_link, _props_destructive = props.destructive, destructive = _props_destructive === void 0 ? false : _props_destructive, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure, _props_disclosureRight = props.disclosureRight, disclosureRight = _props_disclosureRight === void 0 ? false : _props_disclosureRight, _props_insight = props.insight, insight = _props_insight === void 0 ? false : _props_insight, _props_plain = props.plain, plain = _props_plain === void 0 ? false : _props_plain, _props_naked = props.naked, naked = _props_naked === void 0 ? false : _props_naked, _props_size = props.size, size = _props_size === void 0 ? "medium" : _props_size, fullWidth = props.fullWidth, _props_align = props.align, align = _props_align === void 0 ? "center" : _props_align, connectedDisclosure = props.connectedDisclosure, className = props.className, contentClassName = props.contentClassName, rounded = props.rounded, onClick = props.onClick, onMouseDown = props.onMouseDown, tooltip = props.tooltip, _props_tooltipAlignment = props.tooltipAlignment, tooltipAlignment = _props_tooltipAlignment === void 0 ? "right" : _props_tooltipAlignment, _props_tooltipPosition = props.tooltipPosition, tooltipPosition = _props_tooltipPosition === void 0 ? "above" : _props_tooltipPosition, _props_tooltipDisplay = props.tooltipDisplay, tooltipDisplay = _props_tooltipDisplay === void 0 ? "inline-block" : _props_tooltipDisplay, shadow = props.shadow, restProps = _object_without_properties(props, [
1077
+ var id = props.id, children = props.children, url = props.url, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, external = props.external, target = props.target, submit = props.submit, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_pressed = props.pressed, pressed = _props_pressed === void 0 ? false : _props_pressed, accessibilityLabel = props.accessibilityLabel, role = props.role, ariaControls = props.ariaControls, ariaExpanded = props.ariaExpanded, ariaDescribedBy = props.ariaDescribedBy, ariaChecked = props.ariaChecked, hasIconProp = props.hasIcon, icon = props.icon, _iconColor = props.iconColor, _props_iconSize = props.iconSize, iconSize = _props_iconSize === void 0 ? "default" : _props_iconSize, _props_iconPosition = props.iconPosition, iconPosition = _props_iconPosition === void 0 ? "left" : _props_iconPosition, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, _props_primary = props.primary, primary = _props_primary === void 0 ? false : _props_primary, _props_highlight = props.highlight, highlight = _props_highlight === void 0 ? false : _props_highlight, _props_link = props.link, link = _props_link === void 0 ? false : _props_link, _props_destructive = props.destructive, destructive = _props_destructive === void 0 ? false : _props_destructive, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure, _props_disclosureRight = props.disclosureRight, disclosureRight = _props_disclosureRight === void 0 ? false : _props_disclosureRight, _props_insight = props.insight, insight = _props_insight === void 0 ? false : _props_insight, _props_plain = props.plain, plain = _props_plain === void 0 ? false : _props_plain, _props_naked = props.naked, naked = _props_naked === void 0 ? false : _props_naked, _props_outline = props.outline, outline = _props_outline === void 0 ? false : _props_outline, _props_size = props.size, size = _props_size === void 0 ? "medium" : _props_size, fullWidth = props.fullWidth, _props_fullWidthAlignment = props.fullWidthAlignment, fullWidthAlignment = _props_fullWidthAlignment === void 0 ? "left" : _props_fullWidthAlignment, _props_align = props.align, align = _props_align === void 0 ? "center" : _props_align, connectedDisclosure = props.connectedDisclosure, className = props.className, contentClassName = props.contentClassName, rounded = props.rounded, onClick = props.onClick, onMouseDown = props.onMouseDown, tooltip = props.tooltip, _props_tooltipAlignment = props.tooltipAlignment, tooltipAlignment = _props_tooltipAlignment === void 0 ? "right" : _props_tooltipAlignment, _props_tooltipPosition = props.tooltipPosition, tooltipPosition = _props_tooltipPosition === void 0 ? "above" : _props_tooltipPosition, _props_tooltipDisplay = props.tooltipDisplay, tooltipDisplay = _props_tooltipDisplay === void 0 ? "inline-block" : _props_tooltipDisplay, shadow = props.shadow, restProps = _object_without_properties(props, [
884
1078
  "id",
885
1079
  "children",
886
1080
  "url",
@@ -896,9 +1090,11 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
896
1090
  "ariaExpanded",
897
1091
  "ariaDescribedBy",
898
1092
  "ariaChecked",
1093
+ "hasIcon",
899
1094
  "icon",
900
1095
  "iconColor",
901
1096
  "iconSize",
1097
+ "iconPosition",
902
1098
  "bordered",
903
1099
  "primary",
904
1100
  "highlight",
@@ -909,8 +1105,10 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
909
1105
  "insight",
910
1106
  "plain",
911
1107
  "naked",
1108
+ "outline",
912
1109
  "size",
913
1110
  "fullWidth",
1111
+ "fullWidthAlignment",
914
1112
  "align",
915
1113
  "connectedDisclosure",
916
1114
  "className",
@@ -924,7 +1122,7 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
924
1122
  "tooltipDisplay",
925
1123
  "shadow"
926
1124
  ]);
927
- var hasIcon = !!icon;
1125
+ var hasIcon = hasIconProp !== null && hasIconProp !== void 0 ? hasIconProp : !!icon;
928
1126
  var hasChildren = !!children;
929
1127
  var insideButtonGroup = (0, _react.useContext)(_ButtonGroup.ButtonGroupContext);
930
1128
  var base = disabled || loading ? "-disabled-icon" : "-icon";
@@ -938,10 +1136,11 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
938
1136
  insight: "btn-insight".concat(base),
939
1137
  default: "btn-secondary".concat(base)
940
1138
  };
941
- var iconColor = iconColorMap[primary ? "primary" : plain ? "plain" : link ? "link" : destructive ? "destructive" : highlight ? "highlight" : insight ? "insight" : "default"];
1139
+ var iconColor = iconColorMap[primary ? "primary" : plain ? "plain" : outline ? "plain" : link ? "link" : destructive ? "destructive" : highlight ? "highlight" : insight ? "insight" : "default"];
942
1140
  var iconOnly = hasIcon && !hasChildren;
943
1141
  var connectedDisclosureActions = (connectedDisclosure === null || connectedDisclosure === void 0 ? void 0 : connectedDisclosure.actions) || [];
944
- var showConnectedDisclosure = connectedDisclosure && connectedDisclosureActions.length > 0;
1142
+ var connectedDisclosureSections = (connectedDisclosure === null || connectedDisclosure === void 0 ? void 0 : connectedDisclosure.sections) || null;
1143
+ var showConnectedDisclosure = connectedDisclosure && (connectedDisclosureActions.length > 0 || (connectedDisclosureSections === null || connectedDisclosureSections === void 0 ? void 0 : connectedDisclosureSections.length) > 0);
945
1144
  var classes = styles({
946
1145
  primary: primary,
947
1146
  plain: plain,
@@ -962,7 +1161,8 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
962
1161
  darkMode: darkMode,
963
1162
  bordered: bordered,
964
1163
  align: align,
965
- naked: naked
1164
+ naked: naked,
1165
+ outline: outline
966
1166
  });
967
1167
  var contentClasses = contentStyles({
968
1168
  disclosure: disclosure,
@@ -970,12 +1170,18 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
970
1170
  hasChildren: hasChildren,
971
1171
  size: size,
972
1172
  iconOnly: iconOnly,
973
- naked: naked
1173
+ naked: naked,
1174
+ iconPosition: iconPosition,
1175
+ fullWidth: fullWidth,
1176
+ fullWidthAlignment: fullWidthAlignment
1177
+ });
1178
+ var iconClasses = iconStyles({
1179
+ loading: loading
974
1180
  });
975
- var iconClasses = iconStyles();
976
1181
  var textClasses = textStyles({
977
1182
  primary: primary,
978
1183
  plain: plain,
1184
+ outline: outline,
979
1185
  link: link,
980
1186
  destructive: destructive,
981
1187
  highlight: highlight,
@@ -983,7 +1189,11 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
983
1189
  pressed: pressed,
984
1190
  loading: loading,
985
1191
  disabled: disabled,
986
- naked: naked
1192
+ naked: naked,
1193
+ fullWidth: fullWidth,
1194
+ disclosure: disclosure,
1195
+ fullWidthAlignment: fullWidthAlignment,
1196
+ size: size
987
1197
  });
988
1198
  var connectedDisclosureClasses = connectedDisclosureStyles({
989
1199
  primary: primary,
@@ -1028,7 +1238,7 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
1028
1238
  color: "subdued"
1029
1239
  })
1030
1240
  }),
1031
- memoizedIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
1241
+ iconPosition === "left" && memoizedIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
1032
1242
  className: iconClasses,
1033
1243
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
1034
1244
  source: memoizedIcon,
@@ -1040,8 +1250,16 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
1040
1250
  className: textClasses,
1041
1251
  children: children
1042
1252
  }),
1253
+ iconPosition === "right" && memoizedIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
1254
+ className: iconClasses,
1255
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
1256
+ source: memoizedIcon,
1257
+ color: disabled ? "disabled" : _iconColor || iconColor,
1258
+ size: iconSize
1259
+ })
1260
+ }),
1043
1261
  disclosure && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
1044
- className: "Litho-Button__DisclosureIcon relative -left-0.5",
1262
+ className: "Litho-Button__DisclosureIcon relative -left-0.5".concat(loading ? " invisible" : ""),
1045
1263
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
1046
1264
  source: _polarisicons.CaretDownMinor,
1047
1265
  color: disabled ? "disabled" : _iconColor || iconColor,
@@ -1069,6 +1287,7 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
1069
1287
  },
1070
1288
  preferredAlignment: "right",
1071
1289
  preferredPosition: "below",
1290
+ activatorDisplayType: "flex",
1072
1291
  activator: /*#__PURE__*/ (0, _jsxruntime.jsx)(Button, {
1073
1292
  primary: primary,
1074
1293
  plain: plain,
@@ -1076,20 +1295,30 @@ var connectedDisclosureStyles = (0, _tailwindvariants.tv)({
1076
1295
  destructive: destructive,
1077
1296
  highlight: highlight,
1078
1297
  insight: insight,
1298
+ size: size,
1079
1299
  icon: _polarisicons.CaretDownMinor,
1080
1300
  disclosureRight: true,
1081
1301
  iconColor: _iconColor,
1302
+ disabled: disabled || (connectedDisclosure === null || connectedDisclosure === void 0 ? void 0 : connectedDisclosure.disabled),
1082
1303
  className: primary ? "border-l border-l-tint-alt-6!" : undefined,
1304
+ onMouseDown: function(e) {
1305
+ return e.preventDefault();
1306
+ },
1083
1307
  onClick: function() {
1084
- return setShowConnectedDisclosurePopover(!showConnectedDisclosurePopover);
1308
+ return setShowConnectedDisclosurePopover(function(prev) {
1309
+ return !prev;
1310
+ });
1085
1311
  }
1086
1312
  }),
1087
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ActionList.default, {
1088
- items: connectedDisclosureActions,
1313
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ActionList.default, _object_spread_props(_object_spread({}, connectedDisclosureSections ? {
1314
+ sections: connectedDisclosureSections
1315
+ } : {
1316
+ items: connectedDisclosureActions
1317
+ }), {
1089
1318
  onActionAnyItem: function() {
1090
1319
  return setShowConnectedDisclosurePopover(false);
1091
1320
  }
1092
- })
1321
+ }))
1093
1322
  })
1094
1323
  ]
1095
1324
  });