@heymantle/litho 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/AI_COMPONENTS_GUIDE.md +28 -15
  2. package/AI_INTEGRATION_GUIDE.md +3 -3
  3. package/AI_PATTERNS_GUIDE.md +59 -25
  4. package/COMPONENT_QUICK_REFERENCE.md +3 -3
  5. package/README.md +52 -0
  6. package/dist/cjs/components/ActionList.js +33 -25
  7. package/dist/cjs/components/AnnouncementBar.js +115 -18
  8. package/dist/cjs/components/AnnouncementCard.js +269 -0
  9. package/dist/cjs/components/AppProvider.js +15 -2
  10. package/dist/cjs/components/Autocomplete.js +58 -36
  11. package/dist/cjs/components/Badge.js +28 -14
  12. package/dist/cjs/components/Banner.js +37 -27
  13. package/dist/cjs/components/Box.js +50 -38
  14. package/dist/cjs/components/Button.js +338 -109
  15. package/dist/cjs/components/ButtonGroup.js +27 -14
  16. package/dist/cjs/components/Card.js +311 -143
  17. package/dist/cjs/components/Checkbox.js +55 -47
  18. package/dist/cjs/components/CheckboxCard.js +222 -0
  19. package/dist/cjs/components/CheckboxCardGroup.js +384 -0
  20. package/dist/cjs/components/ChoiceList.js +21 -11
  21. package/dist/cjs/components/Code.js +22 -8
  22. package/dist/cjs/components/Collapsible.js +24 -11
  23. package/dist/cjs/components/ColorField.js +163 -38
  24. package/dist/cjs/components/ContextualSaveBar.js +13 -6
  25. package/dist/cjs/components/DatePicker.js +48 -37
  26. package/dist/cjs/components/Disclosure.js +57 -13
  27. package/dist/cjs/components/Divider.js +82 -18
  28. package/dist/cjs/components/DropZone.js +194 -68
  29. package/dist/cjs/components/EmptyState.js +18 -6
  30. package/dist/cjs/components/Filters.js +84 -36
  31. package/dist/cjs/components/FooterHelp.js +14 -4
  32. package/dist/cjs/components/Form.js +13 -2
  33. package/dist/cjs/components/Frame.js +57 -22
  34. package/dist/cjs/components/FrameSaveBar.js +37 -6
  35. package/dist/cjs/components/Grid.js +31 -15
  36. package/dist/cjs/components/HorizontalStack.js +38 -25
  37. package/dist/cjs/components/Icon.js +683 -61
  38. package/dist/cjs/components/Image.js +35 -22
  39. package/dist/cjs/components/InlineError.js +19 -10
  40. package/dist/cjs/components/Label.js +21 -12
  41. package/dist/cjs/components/Layout.js +37 -26
  42. package/dist/cjs/components/LayoutSection.js +84 -22
  43. package/dist/cjs/components/Link.js +35 -22
  44. package/dist/cjs/components/List.js +28 -12
  45. package/dist/cjs/components/Listbox.js +53 -31
  46. package/dist/cjs/components/Loading.js +14 -2
  47. package/dist/cjs/components/Modal.js +32 -39
  48. package/dist/cjs/components/Navigation.js +107 -36
  49. package/dist/cjs/components/Page.js +44 -31
  50. package/dist/cjs/components/Pagination.js +20 -5
  51. package/dist/cjs/components/Pane.js +67 -4
  52. package/dist/cjs/components/Popover.js +63 -30
  53. package/dist/cjs/components/PopoverManager.js +14 -1
  54. package/dist/cjs/components/ProgressBar.js +28 -15
  55. package/dist/cjs/components/RadioButton.js +32 -24
  56. package/dist/cjs/components/RadioButtonCard.js +92 -67
  57. package/dist/cjs/components/RadioButtonCardGroup.js +379 -0
  58. package/dist/cjs/components/RangeSlider.js +34 -26
  59. package/dist/cjs/components/ResourceList.js +28 -14
  60. package/dist/cjs/components/Select.js +38 -26
  61. package/dist/cjs/components/SkeletonText.js +33 -18
  62. package/dist/cjs/components/Spinner.js +24 -12
  63. package/dist/cjs/components/Stack.js +131 -71
  64. package/dist/cjs/components/TabNavigation.js +27 -1
  65. package/dist/cjs/components/Table.js +85 -29
  66. package/dist/cjs/components/Tabs.js +84 -24
  67. package/dist/cjs/components/Tag.js +37 -16
  68. package/dist/cjs/components/Text.js +32 -18
  69. package/dist/cjs/components/TextField.js +119 -69
  70. package/dist/cjs/components/Thumbnail.js +25 -11
  71. package/dist/cjs/components/TimePicker.js +22 -1
  72. package/dist/cjs/components/Tip.js +140 -25
  73. package/dist/cjs/components/ToastNotification.js +107 -34
  74. package/dist/cjs/components/ToastProvider.js +13 -3
  75. package/dist/cjs/components/Tooltip.js +50 -41
  76. package/dist/cjs/components/TopBar.js +83 -9
  77. package/dist/cjs/components/VerticalStack.js +31 -16
  78. package/dist/cjs/index.js +24 -0
  79. package/dist/cjs/playwright.config.js +114 -0
  80. package/dist/cjs/stories/Autocomplete.stories.js +10 -10
  81. package/dist/cjs/stories/Checkbox.stories.js +6 -8
  82. package/dist/cjs/stories/CheckboxCardGroup.stories.js +459 -0
  83. package/dist/cjs/stories/Collapsible.stories.js +11 -11
  84. package/dist/cjs/stories/ColorField.stories.js +2 -3
  85. package/dist/cjs/stories/ComplexExamples.stories.js +48 -77
  86. package/dist/cjs/stories/ContextualSaveBar.stories.js +1 -1
  87. package/dist/cjs/stories/Divider.stories.js +15 -16
  88. package/dist/cjs/stories/DropZone.stories.js +3 -3
  89. package/dist/cjs/stories/FooterHelp.stories.js +3 -4
  90. package/dist/cjs/stories/Form.stories.js +2 -4
  91. package/dist/cjs/stories/Grid.stories.js +24 -33
  92. package/dist/cjs/stories/Icon.stories.js +22 -23
  93. package/dist/cjs/stories/Image.stories.js +12 -15
  94. package/dist/cjs/stories/InlineError.stories.js +0 -1
  95. package/dist/cjs/stories/Layout.stories.js +96 -2
  96. package/dist/cjs/stories/LayoutSection.stories.js +13 -18
  97. package/dist/cjs/stories/List.stories.js +24 -28
  98. package/dist/cjs/stories/Listbox.stories.js +2 -2
  99. package/dist/cjs/stories/Loading.stories.js +21 -25
  100. package/dist/cjs/stories/Modal.stories.js +0 -1
  101. package/dist/cjs/stories/Pagination.stories.js +4 -4
  102. package/dist/cjs/stories/Pane.stories.js +10 -18
  103. package/dist/cjs/stories/Popover.stories.js +7 -7
  104. package/dist/cjs/stories/PopoverManager.stories.js +9 -9
  105. package/dist/cjs/stories/ProgressBar.stories.js +8 -8
  106. package/dist/cjs/stories/RadioButton.stories.js +2 -2
  107. package/dist/cjs/stories/RadioButtonCard.stories.js +2 -2
  108. package/dist/cjs/stories/RadioButtonCardGroup.stories.js +502 -0
  109. package/dist/cjs/stories/RangeSlider.stories.js +1 -3
  110. package/dist/cjs/stories/ResourceList.stories.js +13 -13
  111. package/dist/cjs/stories/Spinner.stories.js +9 -9
  112. package/dist/cjs/stories/Stack.stories.js +233 -51
  113. package/dist/cjs/stories/Tabs.stories.js +2 -2
  114. package/dist/cjs/stories/Tag.stories.js +1 -1
  115. package/dist/cjs/stories/Thumbnail.stories.js +17 -18
  116. package/dist/cjs/stories/TimePicker.stories.js +0 -5
  117. package/dist/cjs/stories/Tip.stories.js +1 -1
  118. package/dist/cjs/styles/Table.js +2 -7
  119. package/dist/cjs/tests/visual/stories.spec.js +637 -0
  120. package/dist/cjs/utilities/dates.js +7 -7
  121. package/dist/esm/components/ActionList.js +33 -25
  122. package/dist/esm/components/AnnouncementBar.js +115 -18
  123. package/dist/esm/components/AnnouncementCard.js +254 -0
  124. package/dist/esm/components/AppProvider.js +15 -2
  125. package/dist/esm/components/Autocomplete.js +58 -36
  126. package/dist/esm/components/Badge.js +28 -14
  127. package/dist/esm/components/Banner.js +37 -27
  128. package/dist/esm/components/Box.js +50 -38
  129. package/dist/esm/components/Button.js +338 -109
  130. package/dist/esm/components/ButtonGroup.js +27 -14
  131. package/dist/esm/components/Card.js +300 -140
  132. package/dist/esm/components/Checkbox.js +55 -47
  133. package/dist/esm/components/CheckboxCard.js +207 -0
  134. package/dist/esm/components/CheckboxCardGroup.js +370 -0
  135. package/dist/esm/components/ChoiceList.js +21 -11
  136. package/dist/esm/components/Code.js +22 -8
  137. package/dist/esm/components/Collapsible.js +24 -11
  138. package/dist/esm/components/ColorField.js +165 -40
  139. package/dist/esm/components/ContextualSaveBar.js +13 -6
  140. package/dist/esm/components/DatePicker.js +48 -37
  141. package/dist/esm/components/Disclosure.js +50 -6
  142. package/dist/esm/components/Divider.js +78 -20
  143. package/dist/esm/components/DropZone.js +194 -68
  144. package/dist/esm/components/EmptyState.js +18 -6
  145. package/dist/esm/components/Filters.js +84 -36
  146. package/dist/esm/components/FooterHelp.js +14 -4
  147. package/dist/esm/components/Form.js +13 -2
  148. package/dist/esm/components/Frame.js +57 -22
  149. package/dist/esm/components/FrameSaveBar.js +37 -6
  150. package/dist/esm/components/Grid.js +31 -15
  151. package/dist/esm/components/HorizontalStack.js +38 -25
  152. package/dist/esm/components/Icon.js +681 -62
  153. package/dist/esm/components/Image.js +35 -22
  154. package/dist/esm/components/InlineError.js +19 -10
  155. package/dist/esm/components/Label.js +21 -12
  156. package/dist/esm/components/Layout.js +62 -27
  157. package/dist/esm/components/LayoutSection.js +84 -22
  158. package/dist/esm/components/Link.js +35 -22
  159. package/dist/esm/components/List.js +28 -12
  160. package/dist/esm/components/Listbox.js +53 -31
  161. package/dist/esm/components/Loading.js +14 -2
  162. package/dist/esm/components/Modal.js +79 -40
  163. package/dist/esm/components/Navigation.js +107 -36
  164. package/dist/esm/components/Page.js +44 -31
  165. package/dist/esm/components/Pagination.js +20 -5
  166. package/dist/esm/components/Pane.js +67 -4
  167. package/dist/esm/components/Popover.js +63 -30
  168. package/dist/esm/components/PopoverManager.js +14 -1
  169. package/dist/esm/components/ProgressBar.js +28 -15
  170. package/dist/esm/components/RadioButton.js +32 -24
  171. package/dist/esm/components/RadioButtonCard.js +92 -67
  172. package/dist/esm/components/RadioButtonCardGroup.js +364 -0
  173. package/dist/esm/components/RangeSlider.js +34 -26
  174. package/dist/esm/components/ResourceList.js +28 -14
  175. package/dist/esm/components/Select.js +38 -26
  176. package/dist/esm/components/SkeletonText.js +33 -18
  177. package/dist/esm/components/Spinner.js +24 -12
  178. package/dist/esm/components/Stack.js +131 -71
  179. package/dist/esm/components/TabNavigation.js +27 -1
  180. package/dist/esm/components/Table.js +85 -29
  181. package/dist/esm/components/Tabs.js +84 -24
  182. package/dist/esm/components/Tag.js +37 -16
  183. package/dist/esm/components/Text.js +32 -18
  184. package/dist/esm/components/TextField.js +119 -69
  185. package/dist/esm/components/Thumbnail.js +25 -11
  186. package/dist/esm/components/TimePicker.js +22 -1
  187. package/dist/esm/components/Tip.js +140 -25
  188. package/dist/esm/components/ToastNotification.js +107 -34
  189. package/dist/esm/components/ToastProvider.js +13 -3
  190. package/dist/esm/components/Tooltip.js +50 -41
  191. package/dist/esm/components/TopBar.js +83 -9
  192. package/dist/esm/components/VerticalStack.js +31 -16
  193. package/dist/esm/index.js +6 -0
  194. package/dist/esm/playwright.config.js +104 -0
  195. package/dist/esm/stories/Autocomplete.stories.js +10 -10
  196. package/dist/esm/stories/Checkbox.stories.js +6 -8
  197. package/dist/esm/stories/CheckboxCardGroup.stories.js +421 -0
  198. package/dist/esm/stories/Collapsible.stories.js +11 -11
  199. package/dist/esm/stories/ColorField.stories.js +2 -3
  200. package/dist/esm/stories/ComplexExamples.stories.js +48 -77
  201. package/dist/esm/stories/ContextualSaveBar.stories.js +1 -1
  202. package/dist/esm/stories/Divider.stories.js +15 -16
  203. package/dist/esm/stories/DropZone.stories.js +3 -3
  204. package/dist/esm/stories/FooterHelp.stories.js +3 -4
  205. package/dist/esm/stories/Form.stories.js +2 -4
  206. package/dist/esm/stories/Grid.stories.js +24 -33
  207. package/dist/esm/stories/Icon.stories.js +22 -23
  208. package/dist/esm/stories/Image.stories.js +12 -15
  209. package/dist/esm/stories/InlineError.stories.js +0 -1
  210. package/dist/esm/stories/Layout.stories.js +93 -2
  211. package/dist/esm/stories/LayoutSection.stories.js +13 -18
  212. package/dist/esm/stories/List.stories.js +24 -28
  213. package/dist/esm/stories/Listbox.stories.js +2 -2
  214. package/dist/esm/stories/Loading.stories.js +21 -25
  215. package/dist/esm/stories/Modal.stories.js +0 -1
  216. package/dist/esm/stories/Pagination.stories.js +4 -4
  217. package/dist/esm/stories/Pane.stories.js +10 -18
  218. package/dist/esm/stories/Popover.stories.js +7 -7
  219. package/dist/esm/stories/PopoverManager.stories.js +9 -9
  220. package/dist/esm/stories/ProgressBar.stories.js +8 -8
  221. package/dist/esm/stories/RadioButton.stories.js +2 -2
  222. package/dist/esm/stories/RadioButtonCard.stories.js +2 -2
  223. package/dist/esm/stories/RadioButtonCardGroup.stories.js +461 -0
  224. package/dist/esm/stories/RangeSlider.stories.js +1 -3
  225. package/dist/esm/stories/ResourceList.stories.js +13 -13
  226. package/dist/esm/stories/Spinner.stories.js +9 -9
  227. package/dist/esm/stories/Stack.stories.js +224 -51
  228. package/dist/esm/stories/Tabs.stories.js +2 -2
  229. package/dist/esm/stories/Tag.stories.js +1 -1
  230. package/dist/esm/stories/Thumbnail.stories.js +17 -18
  231. package/dist/esm/stories/TimePicker.stories.js +0 -5
  232. package/dist/esm/stories/Tip.stories.js +1 -1
  233. package/dist/esm/styles/Table.js +2 -7
  234. package/dist/esm/tests/visual/stories.spec.js +633 -0
  235. package/dist/esm/utilities/dates.js +7 -7
  236. package/dist/types/components/ActionList.d.ts +1 -31
  237. package/dist/types/components/ActionList.d.ts.map +1 -1
  238. package/dist/types/components/AnnouncementBar.d.ts +1 -19
  239. package/dist/types/components/AnnouncementBar.d.ts.map +1 -1
  240. package/dist/types/components/AnnouncementCard.d.ts +3 -0
  241. package/dist/types/components/AnnouncementCard.d.ts.map +1 -0
  242. package/dist/types/components/AppProvider.d.ts +14 -1
  243. package/dist/types/components/AppProvider.d.ts.map +1 -1
  244. package/dist/types/components/Autocomplete.d.ts +1 -71
  245. package/dist/types/components/Autocomplete.d.ts.map +1 -1
  246. package/dist/types/components/Badge.d.ts +1 -19
  247. package/dist/types/components/Badge.d.ts.map +1 -1
  248. package/dist/types/components/Banner.d.ts +1 -37
  249. package/dist/types/components/Banner.d.ts.map +1 -1
  250. package/dist/types/components/Box.d.ts +1 -68
  251. package/dist/types/components/Box.d.ts.map +1 -1
  252. package/dist/types/components/Button.d.ts +1 -131
  253. package/dist/types/components/Button.d.ts.map +1 -1
  254. package/dist/types/components/ButtonGroup.d.ts +1 -22
  255. package/dist/types/components/ButtonGroup.d.ts.map +1 -1
  256. package/dist/types/components/Card.d.ts +54 -59
  257. package/dist/types/components/Card.d.ts.map +1 -1
  258. package/dist/types/components/Checkbox.d.ts +1 -63
  259. package/dist/types/components/Checkbox.d.ts.map +1 -1
  260. package/dist/types/components/CheckboxCard.d.ts +3 -0
  261. package/dist/types/components/CheckboxCard.d.ts.map +1 -0
  262. package/dist/types/components/CheckboxCardGroup.d.ts +3 -0
  263. package/dist/types/components/CheckboxCardGroup.d.ts.map +1 -0
  264. package/dist/types/components/ChoiceList.d.ts +1 -42
  265. package/dist/types/components/ChoiceList.d.ts.map +1 -1
  266. package/dist/types/components/Code.d.ts +1 -26
  267. package/dist/types/components/Code.d.ts.map +1 -1
  268. package/dist/types/components/Collapsible.d.ts +1 -15
  269. package/dist/types/components/Collapsible.d.ts.map +1 -1
  270. package/dist/types/components/ColorField.d.ts +13 -34
  271. package/dist/types/components/ColorField.d.ts.map +1 -1
  272. package/dist/types/components/ContextualSaveBar.d.ts +13 -6
  273. package/dist/types/components/ContextualSaveBar.d.ts.map +1 -1
  274. package/dist/types/components/DatePicker.d.ts +1 -64
  275. package/dist/types/components/DatePicker.d.ts.map +1 -1
  276. package/dist/types/components/Disclosure.d.ts +1 -25
  277. package/dist/types/components/Disclosure.d.ts.map +1 -1
  278. package/dist/types/components/Divider.d.ts +1 -19
  279. package/dist/types/components/Divider.d.ts.map +1 -1
  280. package/dist/types/components/DropZone.d.ts +3 -62
  281. package/dist/types/components/DropZone.d.ts.map +1 -1
  282. package/dist/types/components/EmptyState.d.ts +1 -50
  283. package/dist/types/components/EmptyState.d.ts.map +1 -1
  284. package/dist/types/components/Filters.d.ts +13 -68
  285. package/dist/types/components/Filters.d.ts.map +1 -1
  286. package/dist/types/components/FooterHelp.d.ts +14 -4
  287. package/dist/types/components/FooterHelp.d.ts.map +1 -1
  288. package/dist/types/components/Form.d.ts +13 -2
  289. package/dist/types/components/Form.d.ts.map +1 -1
  290. package/dist/types/components/Frame.d.ts +15 -36
  291. package/dist/types/components/Frame.d.ts.map +1 -1
  292. package/dist/types/components/FrameSaveBar.d.ts +3 -6
  293. package/dist/types/components/FrameSaveBar.d.ts.map +1 -1
  294. package/dist/types/components/Grid.d.ts +5 -21
  295. package/dist/types/components/Grid.d.ts.map +1 -1
  296. package/dist/types/components/HorizontalStack.d.ts +1 -34
  297. package/dist/types/components/HorizontalStack.d.ts.map +1 -1
  298. package/dist/types/components/Icon.d.ts +1 -41
  299. package/dist/types/components/Icon.d.ts.map +1 -1
  300. package/dist/types/components/Image.d.ts +1 -43
  301. package/dist/types/components/Image.d.ts.map +1 -1
  302. package/dist/types/components/InlineError.d.ts +1 -20
  303. package/dist/types/components/InlineError.d.ts.map +1 -1
  304. package/dist/types/components/Label.d.ts +1 -26
  305. package/dist/types/components/Label.d.ts.map +1 -1
  306. package/dist/types/components/Layout.d.ts +24 -15
  307. package/dist/types/components/Layout.d.ts.map +1 -1
  308. package/dist/types/components/LayoutSection.d.ts +1 -19
  309. package/dist/types/components/LayoutSection.d.ts.map +1 -1
  310. package/dist/types/components/Link.d.ts +1 -37
  311. package/dist/types/components/Link.d.ts.map +1 -1
  312. package/dist/types/components/List.d.ts +5 -17
  313. package/dist/types/components/List.d.ts.map +1 -1
  314. package/dist/types/components/Listbox.d.ts +1 -32
  315. package/dist/types/components/Listbox.d.ts.map +1 -1
  316. package/dist/types/components/Loading.d.ts +14 -2
  317. package/dist/types/components/Loading.d.ts.map +1 -1
  318. package/dist/types/components/Modal.d.ts +26 -35
  319. package/dist/types/components/Modal.d.ts.map +1 -1
  320. package/dist/types/components/Navigation.d.ts +1 -25
  321. package/dist/types/components/Navigation.d.ts.map +1 -1
  322. package/dist/types/components/Page.d.ts +1 -57
  323. package/dist/types/components/Page.d.ts.map +1 -1
  324. package/dist/types/components/Pagination.d.ts +13 -3
  325. package/dist/types/components/Pagination.d.ts.map +1 -1
  326. package/dist/types/components/Pane.d.ts +55 -3
  327. package/dist/types/components/Pane.d.ts.map +1 -1
  328. package/dist/types/components/Popover.d.ts +5 -35
  329. package/dist/types/components/Popover.d.ts.map +1 -1
  330. package/dist/types/components/PopoverManager.d.ts.map +1 -1
  331. package/dist/types/components/ProgressBar.d.ts +1 -22
  332. package/dist/types/components/ProgressBar.d.ts.map +1 -1
  333. package/dist/types/components/RadioButton.d.ts +1 -37
  334. package/dist/types/components/RadioButton.d.ts.map +1 -1
  335. package/dist/types/components/RadioButtonCard.d.ts +1 -39
  336. package/dist/types/components/RadioButtonCard.d.ts.map +1 -1
  337. package/dist/types/components/RadioButtonCardGroup.d.ts +3 -0
  338. package/dist/types/components/RadioButtonCardGroup.d.ts.map +1 -0
  339. package/dist/types/components/RangeSlider.d.ts +1 -42
  340. package/dist/types/components/RangeSlider.d.ts.map +1 -1
  341. package/dist/types/components/ResourceList.d.ts +5 -30
  342. package/dist/types/components/ResourceList.d.ts.map +1 -1
  343. package/dist/types/components/Select.d.ts +1 -46
  344. package/dist/types/components/Select.d.ts.map +1 -1
  345. package/dist/types/components/SkeletonText.d.ts +1 -26
  346. package/dist/types/components/SkeletonText.d.ts.map +1 -1
  347. package/dist/types/components/Spinner.d.ts +1 -16
  348. package/dist/types/components/Spinner.d.ts.map +1 -1
  349. package/dist/types/components/Stack.d.ts +1 -47
  350. package/dist/types/components/Stack.d.ts.map +1 -1
  351. package/dist/types/components/TabNavigation.d.ts.map +1 -1
  352. package/dist/types/components/Table.d.ts +13 -58
  353. package/dist/types/components/Table.d.ts.map +1 -1
  354. package/dist/types/components/Tabs.d.ts +40 -34
  355. package/dist/types/components/Tabs.d.ts.map +1 -1
  356. package/dist/types/components/Tag.d.ts +1 -24
  357. package/dist/types/components/Tag.d.ts.map +1 -1
  358. package/dist/types/components/Text.d.ts +1 -30
  359. package/dist/types/components/Text.d.ts.map +1 -1
  360. package/dist/types/components/TextField.d.ts +1 -109
  361. package/dist/types/components/TextField.d.ts.map +1 -1
  362. package/dist/types/components/Thumbnail.d.ts +1 -16
  363. package/dist/types/components/Thumbnail.d.ts.map +1 -1
  364. package/dist/types/components/TimePicker.d.ts +28 -1
  365. package/dist/types/components/TimePicker.d.ts.map +1 -1
  366. package/dist/types/components/Tip.d.ts +1 -21
  367. package/dist/types/components/Tip.d.ts.map +1 -1
  368. package/dist/types/components/ToastNotification.d.ts +1 -34
  369. package/dist/types/components/ToastNotification.d.ts.map +1 -1
  370. package/dist/types/components/ToastProvider.d.ts +13 -3
  371. package/dist/types/components/ToastProvider.d.ts.map +1 -1
  372. package/dist/types/components/Tooltip.d.ts +1 -54
  373. package/dist/types/components/Tooltip.d.ts.map +1 -1
  374. package/dist/types/components/TopBar.d.ts +1 -19
  375. package/dist/types/components/TopBar.d.ts.map +1 -1
  376. package/dist/types/components/VerticalStack.d.ts +1 -25
  377. package/dist/types/components/VerticalStack.d.ts.map +1 -1
  378. package/dist/types/index.d.ts +6 -0
  379. package/dist/types/styles/Table.d.ts.map +1 -1
  380. package/index.css +76 -14
  381. package/package.json +15 -5
@@ -3,10 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function() {
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
+ });
11
+ }
12
+ _export(exports, {
13
+ get default () {
9
14
  return _default;
15
+ },
16
+ get useCard () {
17
+ return useCard;
10
18
  }
11
19
  });
12
20
  var _jsxruntime = require("react/jsx-runtime");
@@ -18,15 +26,119 @@ var _Spinner = /*#__PURE__*/ _interop_require_default(require("./Spinner"));
18
26
  var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
19
27
  var _Tooltip = /*#__PURE__*/ _interop_require_default(require("./Tooltip"));
20
28
  var _Frame = require("./Frame");
29
+ var _Modal = require("./Modal");
30
+ function _define_property(obj, key, value) {
31
+ if (key in obj) {
32
+ Object.defineProperty(obj, key, {
33
+ value: value,
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true
37
+ });
38
+ } else {
39
+ obj[key] = value;
40
+ }
41
+ return obj;
42
+ }
21
43
  function _interop_require_default(obj) {
22
44
  return obj && obj.__esModule ? obj : {
23
45
  default: obj
24
46
  };
25
47
  }
48
+ function _object_spread(target) {
49
+ for(var i = 1; i < arguments.length; i++){
50
+ var source = arguments[i] != null ? arguments[i] : {};
51
+ var ownKeys = Object.keys(source);
52
+ if (typeof Object.getOwnPropertySymbols === "function") {
53
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
54
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
55
+ }));
56
+ }
57
+ ownKeys.forEach(function(key) {
58
+ _define_property(target, key, source[key]);
59
+ });
60
+ }
61
+ return target;
62
+ }
63
+ function ownKeys(object, enumerableOnly) {
64
+ var keys = Object.keys(object);
65
+ if (Object.getOwnPropertySymbols) {
66
+ var symbols = Object.getOwnPropertySymbols(object);
67
+ if (enumerableOnly) {
68
+ symbols = symbols.filter(function(sym) {
69
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
70
+ });
71
+ }
72
+ keys.push.apply(keys, symbols);
73
+ }
74
+ return keys;
75
+ }
76
+ function _object_spread_props(target, source) {
77
+ source = source != null ? source : {};
78
+ if (Object.getOwnPropertyDescriptors) {
79
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
80
+ } else {
81
+ ownKeys(Object(source)).forEach(function(key) {
82
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
83
+ });
84
+ }
85
+ return target;
86
+ }
26
87
  function _type_of(obj) {
27
88
  "@swc/helpers - typeof";
28
89
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
29
90
  }
91
+ /**
92
+ * @component Card
93
+ *
94
+ * @description A bordered container component that groups related content into a visually distinct section with optional header, sections, and actions.
95
+ *
96
+ * @usage
97
+ * - DO: Group related content into a visually distinct, bordered container.
98
+ * - DON'T: Nest Cards inside other Cards.
99
+ *
100
+ * @accessibility
101
+ * - Card uses semantic grouping; ensure heading props render appropriate heading levels.
102
+ *
103
+ * @alternative
104
+ * - If you need a plain container without borders, use `Box`.
105
+ * - If you need a full-page layout, use `Layout`.
106
+ *
107
+ * @param {Object} props - Props for the Card component.
108
+ * @param {boolean} [props.allowOverflow=false] - Allows content to overflow the Card boundaries.
109
+ * @param {React.ReactNode} [props.children] - Child elements to render inside the Card.
110
+ * @param {boolean} [props.hideOnPrint] - Hides the Card when printing.
111
+ * @param {string|React.ReactNode} [props.title] - Title of the Card.
112
+ * @param {string} [props.titleVariant='headingMd'] - Typography variant for the Card title.
113
+ * @param {string} [props.description] - Description of the Card.
114
+ * @param {string} [props.descriptionVariant='bodyMd'] - Typography variant for the Card description.
115
+ * @param {React.ElementType|Object} [props.icon] - Icon to render alongside the title.
116
+ * @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip] - Tooltip content for the title.
117
+ * @param {string} [props.tooltipPreferredPosition='above'] - Preferred position for the tooltip.
118
+ * @param {boolean} [props.outlined=false] - Applies outlined styling to the Card.
119
+ * @param {string} [props.shadow='default'] - Applies a shadow to the Card. Can be 'default', or 'none'.
120
+ * @param {boolean} [props.highlighted=false] - Applies highlighted styling to the Card.
121
+ * @param {boolean} [props.subdued=false] - Applies subdued styling to the Card.
122
+ * @param {boolean} [props.alternate=false] - Applies alternate styling to the Card.
123
+ * @param {boolean} [props.padded=false] - Adds padding to the Card body.
124
+ * @param {boolean} [props.loading=false] - Shows a loading spinner in place of the title.
125
+ * @param {boolean} [props.paddedHalf=false] - Adds half padding to the Card body.
126
+ * @param {boolean} [props.removeHeaderBottomPadding=false] - Removes bottom padding from the header.
127
+ * @param {Function} [props.onClick] - Click handler for the Card, making it clickable.
128
+ * @param {Object} [props.emptyState={}] - Configures the empty state of the Card.
129
+ * @param {Object} [props.action] - Action button or configuration to render in the Card header.
130
+ * @param {string} [props.className] - Additional classes to apply to the Card.
131
+ * @param {string} [props.headerClassName] - Additional classes to apply to the Card header.
132
+ * @param {React.ReactNode} [props.accessory] - Accessory element to render in the header.
133
+ * @param {boolean} [props.fullWidthOnMobile] - Makes the Card full width on mobile. Defaults to `true` for top-level cards, `false` for nested cards.
134
+ * @param {boolean} [props.roundedOnMobile] - Makes the Card rounded on mobile. Defaults to `false` for top-level cards, `true` for nested cards.
135
+ * @returns {React.ReactElement} The rendered Card component.
136
+ */ var CardContext = /*#__PURE__*/ _react.default.createContext({
137
+ nested: false
138
+ });
139
+ var NESTED_CONTEXT = {
140
+ nested: true
141
+ };
30
142
  var styles = (0, _tailwindvariants.tv)({
31
143
  base: "Litho-Card relative",
32
144
  variants: {
@@ -63,7 +175,7 @@ var styles = (0, _tailwindvariants.tv)({
63
175
  false: ""
64
176
  },
65
177
  highlighted: {
66
- true: "cursor-pointer ring ring-form-focus outline outline-form-border-focus",
178
+ true: "cursor-pointer outline outline-form-border-focus",
67
179
  false: ""
68
180
  },
69
181
  shadow: {
@@ -74,6 +186,10 @@ var styles = (0, _tailwindvariants.tv)({
74
186
  embedded: {
75
187
  true: "",
76
188
  false: ""
189
+ },
190
+ nested: {
191
+ true: "",
192
+ false: ""
77
193
  }
78
194
  },
79
195
  compoundVariants: [
@@ -97,7 +213,14 @@ var styles = (0, _tailwindvariants.tv)({
97
213
  subdued: false,
98
214
  alternate: false,
99
215
  highlighted: true,
100
- className: "bg-surface-highest dark:border-t dark:border-tint-alt-2"
216
+ className: "bg-surface-selected hover:bg-surface-selected dark:border-t dark:border-tint-alt-2"
217
+ },
218
+ {
219
+ nested: true,
220
+ subdued: false,
221
+ alternate: false,
222
+ highlighted: false,
223
+ className: "outline-edge-light @md:outline-edge-light"
101
224
  }
102
225
  ],
103
226
  defaultVariants: {
@@ -107,7 +230,8 @@ var styles = (0, _tailwindvariants.tv)({
107
230
  outlined: false,
108
231
  highlighted: false,
109
232
  shadow: "default",
110
- embedded: false
233
+ embedded: false,
234
+ nested: false
111
235
  }
112
236
  });
113
237
  var headerStyles = (0, _tailwindvariants.tv)({
@@ -154,41 +278,14 @@ var bodyStyles = (0, _tailwindvariants.tv)({
154
278
  }
155
279
  ]
156
280
  });
157
- /**
158
- * Card component for creating styled containers with optional headers, actions, and children.
159
- *
160
- * @component
161
- * @param {Object} props - Props for the Card component.
162
- * @param {boolean} [props.allowOverflow=false] - Allows content to overflow the Card boundaries.
163
- * @param {React.ReactNode} [props.children] - Child elements to render inside the Card.
164
- * @param {boolean} [props.hideOnPrint] - Hides the Card when printing.
165
- * @param {string|React.ReactNode} [props.title] - Title of the Card.
166
- * @param {string} [props.titleVariant='headingMd'] - Typography variant for the Card title.
167
- * @param {string} [props.description] - Description of the Card.
168
- * @param {React.ElementType|Object} [props.icon] - Icon to render alongside the title.
169
- * @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip] - Tooltip content for the title.
170
- * @param {string} [props.tooltipPreferredPosition='above'] - Preferred position for the tooltip.
171
- * @param {boolean} [props.outlined=false] - Applies outlined styling to the Card.
172
- * @param {string} [props.shadow='default'] - Applies a shadow to the Card. Can be 'default', or 'none'.
173
- * @param {boolean} [props.highlighted=false] - Applies highlighted styling to the Card.
174
- * @param {boolean} [props.subdued=false] - Applies subdued styling to the Card.
175
- * @param {boolean} [props.alternate=false] - Applies alternate styling to the Card.
176
- * @param {boolean} [props.padded=false] - Adds padding to the Card body.
177
- * @param {boolean} [props.loading=false] - Shows a loading spinner in place of the title.
178
- * @param {boolean} [props.paddedHalf=false] - Adds half padding to the Card body.
179
- * @param {boolean} [props.removeHeaderBottomPadding=false] - Removes bottom padding from the header.
180
- * @param {Function} [props.onClick] - Click handler for the Card, making it clickable.
181
- * @param {Object} [props.emptyState={}] - Configures the empty state of the Card.
182
- * @param {Object} [props.action] - Action button or configuration to render in the Card header.
183
- * @param {string} [props.className] - Additional classes to apply to the Card.
184
- * @param {string} [props.headerClassName] - Additional classes to apply to the Card header.
185
- * @param {React.ReactNode} [props.accessory] - Accessory element to render in the header.
186
- * @param {boolean} [props.fullWidthOnMobile=true] - Makes the Card full width on mobile.
187
- * @param {boolean} [props.roundedOnMobile=false] - Makes the Card rounded on mobile.
188
- * @returns {React.ReactElement} The rendered Card component.
189
- */ var Card = function(param) {
190
- var _param_allowOverflow = param.allowOverflow, allowOverflow = _param_allowOverflow === void 0 ? false : _param_allowOverflow, _param_roundedOnMobile = param.roundedOnMobile, roundedOnMobile = _param_roundedOnMobile === void 0 ? false : _param_roundedOnMobile, children = param.children, hideOnPrint = param.hideOnPrint, title = param.title, _param_titleVariant = param.titleVariant, titleVariant = _param_titleVariant === void 0 ? "headingMd" : _param_titleVariant, description = param.description, icon = param.icon, tooltip = param.tooltip, _param_tooltipPreferredPosition = param.tooltipPreferredPosition, tooltipPreferredPosition = _param_tooltipPreferredPosition === void 0 ? "above" : _param_tooltipPreferredPosition, _param_outlined = param.outlined, outlined = _param_outlined === void 0 ? false : _param_outlined, _param_highlighted = param.highlighted, highlighted = _param_highlighted === void 0 ? false : _param_highlighted, _param_subdued = param.subdued, subdued = _param_subdued === void 0 ? false : _param_subdued, _param_alternate = param.alternate, alternate = _param_alternate === void 0 ? false : _param_alternate, _param_padded = param.padded, padded = _param_padded === void 0 ? false : _param_padded, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading, _param_paddedHalf = param.paddedHalf, paddedHalf = _param_paddedHalf === void 0 ? false : _param_paddedHalf, _param_removeHeaderBottomPadding = param.removeHeaderBottomPadding, removeHeaderBottomPadding = _param_removeHeaderBottomPadding === void 0 ? false : _param_removeHeaderBottomPadding, onClick = param.onClick, _param_emptyState = param.emptyState, emptyState = _param_emptyState === void 0 ? {} : _param_emptyState, action = param.action, className = param.className, headerClassName = param.headerClassName, accessory = param.accessory, _param_fullHeightBody = param.fullHeightBody, fullHeightBody = _param_fullHeightBody === void 0 ? false : _param_fullHeightBody, _param_fullWidthOnMobile = param.fullWidthOnMobile, fullWidthOnMobile = _param_fullWidthOnMobile === void 0 ? true : _param_fullWidthOnMobile, _param_shadow = param.shadow, shadow = _param_shadow === void 0 ? "default" : _param_shadow;
281
+ var Card = function(param) {
282
+ var _param_allowOverflow = param.allowOverflow, allowOverflow = _param_allowOverflow === void 0 ? false : _param_allowOverflow, roundedOnMobile = param.roundedOnMobile, children = param.children, hideOnPrint = param.hideOnPrint, title = param.title, _param_titleVariant = param.titleVariant, titleVariant = _param_titleVariant === void 0 ? "headingMd" : _param_titleVariant, description = param.description, _param_descriptionVariant = param.descriptionVariant, descriptionVariant = _param_descriptionVariant === void 0 ? "bodyMd" : _param_descriptionVariant, icon = param.icon, tooltip = param.tooltip, _param_tooltipPreferredPosition = param.tooltipPreferredPosition, tooltipPreferredPosition = _param_tooltipPreferredPosition === void 0 ? "above" : _param_tooltipPreferredPosition, _param_outlined = param.outlined, outlined = _param_outlined === void 0 ? false : _param_outlined, _param_highlighted = param.highlighted, highlighted = _param_highlighted === void 0 ? false : _param_highlighted, _param_subdued = param.subdued, subdued = _param_subdued === void 0 ? false : _param_subdued, _param_alternate = param.alternate, alternate = _param_alternate === void 0 ? false : _param_alternate, _param_padded = param.padded, padded = _param_padded === void 0 ? false : _param_padded, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading, _param_paddedHalf = param.paddedHalf, paddedHalf = _param_paddedHalf === void 0 ? false : _param_paddedHalf, _param_removeHeaderBottomPadding = param.removeHeaderBottomPadding, removeHeaderBottomPadding = _param_removeHeaderBottomPadding === void 0 ? false : _param_removeHeaderBottomPadding, onClick = param.onClick, _param_emptyState = param.emptyState, emptyState = _param_emptyState === void 0 ? {} : _param_emptyState, action = param.action, className = param.className, headerClassName = param.headerClassName, accessory = param.accessory, _param_fullHeightBody = param.fullHeightBody, fullHeightBody = _param_fullHeightBody === void 0 ? false : _param_fullHeightBody, fullWidthOnMobile = param.fullWidthOnMobile, _param_shadow = param.shadow, shadow = _param_shadow === void 0 ? "default" : _param_shadow, nestedProp = param.nested;
191
283
  var embedded = (0, _Frame.useFrame)().embedded;
284
+ var _React_useContext = _react.default.useContext(CardContext), cardNested = _React_useContext.nested;
285
+ var isInModal = _react.default.useContext(_Modal.ModalContext);
286
+ var nested = nestedProp !== null && nestedProp !== void 0 ? nestedProp : cardNested || isInModal;
287
+ var resolvedFullWidthOnMobile = fullWidthOnMobile !== null && fullWidthOnMobile !== void 0 ? fullWidthOnMobile : nested ? false : true;
288
+ var resolvedRoundedOnMobile = roundedOnMobile !== null && roundedOnMobile !== void 0 ? roundedOnMobile : nested ? true : false;
192
289
  var showHeader = !!(title || action);
193
290
  var isClickable = !!onClick;
194
291
  var classes = styles({
@@ -197,12 +294,13 @@ var bodyStyles = (0, _tailwindvariants.tv)({
197
294
  alternate: alternate,
198
295
  allowOverflow: allowOverflow,
199
296
  isClickable: isClickable,
200
- fullWidthOnMobile: fullWidthOnMobile,
201
- roundedOnMobile: roundedOnMobile,
297
+ fullWidthOnMobile: resolvedFullWidthOnMobile,
298
+ roundedOnMobile: resolvedRoundedOnMobile,
202
299
  outlined: outlined,
203
- shadow: shadow,
300
+ shadow: nested ? "none" : shadow,
204
301
  highlighted: highlighted,
205
- embedded: embedded
302
+ embedded: embedded,
303
+ nested: nested
206
304
  });
207
305
  var headerClasses = headerStyles({
208
306
  padded: padded,
@@ -232,89 +330,103 @@ var bodyStyles = (0, _tailwindvariants.tv)({
232
330
  }
233
331
  return _react.default.Children.toArray(children).map(process);
234
332
  };
235
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
236
- className: "".concat(classes).concat(className ? " ".concat(className) : ""),
237
- onClick: isClickable ? onClick : undefined,
238
- children: [
239
- showHeader && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
240
- className: "".concat(headerClasses).concat(headerClassName ? " ".concat(headerClassName) : ""),
241
- children: [
242
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
243
- className: "w-full flex gap-2 justify-between items-center",
244
- children: [
245
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
246
- className: "Litho-Card__HeaderTitle flex items-center gap-2",
247
- children: [
248
- loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
249
- size: "small"
250
- }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
251
- children: [
252
- icon && typeof icon === "function" && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
253
- source: icon,
254
- color: "subdued"
255
- }),
256
- icon && (typeof icon === "undefined" ? "undefined" : _type_of(icon)) === "object" && icon
257
- ]
258
- }),
259
- /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
260
- children: [
261
- title && typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
262
- variant: titleVariant,
263
- children: title
264
- }) : title,
265
- description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
266
- color: "subdued",
267
- children: description
268
- })
269
- ]
270
- }),
271
- tooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
272
- content: tooltip,
273
- preferredPosition: tooltipPreferredPosition
274
- })
275
- ]
276
- }),
277
- action && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
278
- className: "Litho-Card__HeaderAction self-start",
279
- children: action.content ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
280
- link: true,
281
- onClick: action.onAction || action.onClick,
282
- primary: action.primary,
283
- destructive: action.destructive,
284
- icon: action.icon,
285
- loading: action.loading,
286
- disabled: action.disabled,
287
- connectedDisclosure: action.connectedDisclosure,
288
- children: action.content
289
- }) : action
290
- })
291
- ]
333
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(CardContext.Provider, {
334
+ value: NESTED_CONTEXT,
335
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
336
+ className: "".concat(classes).concat(className ? " ".concat(className) : ""),
337
+ onClick: isClickable ? onClick : undefined
338
+ }, isClickable ? {
339
+ role: "button",
340
+ tabIndex: 0,
341
+ onKeyDown: function(e) {
342
+ if (e.key === "Enter" || e.key === " ") {
343
+ e.preventDefault();
344
+ onClick();
345
+ }
346
+ }
347
+ } : {}), {
348
+ children: [
349
+ showHeader && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
350
+ className: "".concat(headerClasses).concat(headerClassName ? " ".concat(headerClassName) : ""),
351
+ children: [
352
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
353
+ className: "w-full flex gap-2 justify-between items-center",
354
+ children: [
355
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
356
+ className: "Litho-Card__HeaderTitle flex items-center gap-2",
357
+ children: [
358
+ loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
359
+ size: "small"
360
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
361
+ children: [
362
+ icon && typeof icon === "function" && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
363
+ source: icon,
364
+ color: "subdued"
365
+ }),
366
+ icon && (typeof icon === "undefined" ? "undefined" : _type_of(icon)) === "object" && icon
367
+ ]
368
+ }),
369
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
370
+ children: [
371
+ title && typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
372
+ variant: titleVariant,
373
+ children: title
374
+ }) : title,
375
+ description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
376
+ color: "subdued",
377
+ variant: descriptionVariant,
378
+ children: description
379
+ })
380
+ ]
381
+ }),
382
+ tooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
383
+ content: tooltip,
384
+ preferredPosition: tooltipPreferredPosition
385
+ })
386
+ ]
387
+ }),
388
+ action && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
389
+ className: "Litho-Card__HeaderAction self-start",
390
+ children: action.content ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
391
+ link: true,
392
+ onClick: action.onAction || action.onClick,
393
+ primary: action.primary,
394
+ destructive: action.destructive,
395
+ icon: action.icon,
396
+ loading: action.loading,
397
+ disabled: action.disabled,
398
+ connectedDisclosure: action.connectedDisclosure,
399
+ children: action.content
400
+ }) : action
401
+ })
402
+ ]
403
+ }),
404
+ accessory && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
405
+ className: "Litho-Card__HeaderAccessory pr-2",
406
+ children: accessory
407
+ })
408
+ ]
409
+ }),
410
+ emptyState.showIf ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
411
+ className: bodyStyles({
412
+ padding: "full",
413
+ showHeader: showHeader,
414
+ fullHeight: fullHeightBody
292
415
  }),
293
- accessory && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
294
- className: "Litho-Card__HeaderAccessory pr-2",
295
- children: accessory
416
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
417
+ color: "subdued",
418
+ children: emptyState.text
296
419
  })
297
- ]
298
- }),
299
- emptyState.showIf ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
300
- className: bodyStyles({
301
- padding: "full",
302
- showHeader: showHeader,
303
- fullHeight: fullHeightBody
304
- }),
305
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
306
- color: "subdued",
307
- children: emptyState.text
420
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
421
+ className: bodyStyles({
422
+ padding: padded ? "full" : paddedHalf ? "half" : "none",
423
+ showHeader: showHeader,
424
+ fullHeight: fullHeightBody
425
+ }),
426
+ children: processCardChildren(children)
308
427
  })
309
- }) : /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
310
- className: bodyStyles({
311
- padding: padded ? "full" : paddedHalf ? "half" : "none",
312
- showHeader: showHeader,
313
- fullHeight: fullHeightBody
314
- }),
315
- children: processCardChildren(children)
316
- })
317
- ]
428
+ ]
429
+ }))
318
430
  });
319
431
  };
320
432
  var sectionStyles = (0, _tailwindvariants.tv)({
@@ -404,9 +516,12 @@ var sectionBodyStyles = (0, _tailwindvariants.tv)({
404
516
  ]
405
517
  });
406
518
  /**
407
- * Section component for dividing the Card into segments.
519
+ * @component Card.Section
520
+ *
521
+ * @usage
522
+ * - DO: Divide a Card into logical content segments.
523
+ * - DON'T: Nest sections within sections.
408
524
  *
409
- * @component
410
525
  * @param {Object} props - Props for the Section component.
411
526
  * @param {string|React.ReactNode} [props.title] - Title of the Section.
412
527
  * @param {string} [props.titleVariant='headingSm'] - Typography variant for the Section title.
@@ -424,12 +539,13 @@ var sectionBodyStyles = (0, _tailwindvariants.tv)({
424
539
  * @param {React.ElementType|Object} [props.icon] - Icon to render alongside the title.
425
540
  * @param {string} [props.tooltip] - Tooltip content for the title.
426
541
  * @param {string} [props.description] - Description text for the Section.
542
+ * @param {string} [props.descriptionVariant='bodyMd'] - Typography variant for the Section description.
427
543
  * @param {React.ReactNode} [props.accessory] - Accessory element to render in the Section header.
428
544
  * @param {Object} [props.emptyState={}] - Configures the empty state of the Section.
429
545
  *
430
546
  * @returns {React.ReactElement} The rendered Section component.
431
547
  */ Card.Section = function(param) {
432
- var title = param.title, _param_titleVariant = param.titleVariant, titleVariant = _param_titleVariant === void 0 ? "headingSm" : _param_titleVariant, action = param.action, children = param.children, _param_padded = param.padded, padded = _param_padded === void 0 ? true : _param_padded, _param_paddedHalf = param.paddedHalf, paddedHalf = _param_paddedHalf === void 0 ? false : _param_paddedHalf, _param_isFirst = param.isFirst, isFirst = _param_isFirst === void 0 ? false : _param_isFirst, _param_cardHasHeader = param.cardHasHeader, cardHasHeader = _param_cardHasHeader === void 0 ? false : _param_cardHasHeader, _param_borderBottom = param.borderBottom, borderBottom = _param_borderBottom === void 0 ? true : _param_borderBottom, _param_borderTop = param.borderTop, borderTop = _param_borderTop === void 0 ? false : _param_borderTop, _param_subdued = param.subdued, subdued = _param_subdued === void 0 ? false : _param_subdued, _param_headerGap = param.headerGap, headerGap = _param_headerGap === void 0 ? "0" : _param_headerGap, _param_gap = param.gap, gap = _param_gap === void 0 ? "0" : _param_gap, icon = param.icon, tooltip = param.tooltip, description = param.description, accessory = param.accessory, _param_emptyState = param.emptyState, emptyState = _param_emptyState === void 0 ? {} : _param_emptyState, className = param.className, sectionBodyClassName = param.sectionBodyClassName;
548
+ var title = param.title, _param_titleVariant = param.titleVariant, titleVariant = _param_titleVariant === void 0 ? "headingSm" : _param_titleVariant, action = param.action, children = param.children, _param_padded = param.padded, padded = _param_padded === void 0 ? true : _param_padded, _param_paddedHalf = param.paddedHalf, paddedHalf = _param_paddedHalf === void 0 ? false : _param_paddedHalf, _param_isFirst = param.isFirst, isFirst = _param_isFirst === void 0 ? false : _param_isFirst, _param_cardHasHeader = param.cardHasHeader, cardHasHeader = _param_cardHasHeader === void 0 ? false : _param_cardHasHeader, _param_borderBottom = param.borderBottom, borderBottom = _param_borderBottom === void 0 ? true : _param_borderBottom, _param_borderTop = param.borderTop, borderTop = _param_borderTop === void 0 ? false : _param_borderTop, _param_subdued = param.subdued, subdued = _param_subdued === void 0 ? false : _param_subdued, _param_headerGap = param.headerGap, headerGap = _param_headerGap === void 0 ? "0" : _param_headerGap, _param_gap = param.gap, gap = _param_gap === void 0 ? "0" : _param_gap, icon = param.icon, tooltip = param.tooltip, description = param.description, _param_descriptionVariant = param.descriptionVariant, descriptionVariant = _param_descriptionVariant === void 0 ? "bodyMd" : _param_descriptionVariant, accessory = param.accessory, _param_emptyState = param.emptyState, emptyState = _param_emptyState === void 0 ? {} : _param_emptyState, className = param.className, sectionBodyClassName = param.sectionBodyClassName;
433
549
  var showHeader = !!(title || action);
434
550
  var sectionClasses = sectionStyles({
435
551
  borderBottom: borderBottom,
@@ -439,7 +555,7 @@ var sectionBodyStyles = (0, _tailwindvariants.tv)({
439
555
  });
440
556
  var sectionHeaderClasses = sectionHeaderStyles();
441
557
  var sectionBodyClasses = sectionBodyStyles({
442
- padding: paddedHalf ? "half" : padded ? "full" : "none",
558
+ padding: paddedHalf || padded === "half" ? "half" : padded ? "full" : "none",
443
559
  showHeader: showHeader,
444
560
  cardHasHeader: cardHasHeader,
445
561
  isFirst: isFirst,
@@ -494,6 +610,7 @@ var sectionBodyStyles = (0, _tailwindvariants.tv)({
494
610
  }),
495
611
  description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
496
612
  color: "subdued",
613
+ variant: descriptionVariant,
497
614
  children: description
498
615
  })
499
616
  ]
@@ -516,17 +633,28 @@ var sectionBodyStyles = (0, _tailwindvariants.tv)({
516
633
  };
517
634
  Card.Section.displayName = "Card.Section";
518
635
  var clickableRowStyles = (0, _tailwindvariants.tv)({
519
- base: "Litho-Card__Row py-1.5 px-2.5 cursor-pointer rounded-md hover:bg-tint-2 active:bg-tint-3",
636
+ base: "Litho-Card__Row py-1.5 px-2 @md:px-2.5 rounded-md",
520
637
  variants: {
638
+ interactive: {
639
+ true: "cursor-pointer hover:bg-tint-2 active:bg-tint-3"
640
+ },
521
641
  disabled: {
522
642
  true: "opacity-50 cursor-not-allowed pointer-events-none"
523
643
  }
644
+ },
645
+ defaultVariants: {
646
+ interactive: true
524
647
  }
525
648
  });
526
649
  /**
527
- * ClickableRow component for creating clickable rows inside the Card.
650
+ * @component Card.ClickableRow
651
+ *
652
+ * @usage
653
+ * - DO: Use for rows that navigate or trigger actions.
654
+ *
655
+ * @accessibility
656
+ * - Renders as a clickable element; ensure it is keyboard accessible and has a clear action label.
528
657
  *
529
- * @component
530
658
  * @param {Object} props - Props for the ClickableRow component.
531
659
  * @param {React.ReactNode} [props.children] - Child elements to render inside the row.
532
660
  * @param {Function} [props.onClick] - Click handler for the row.
@@ -534,24 +662,43 @@ var clickableRowStyles = (0, _tailwindvariants.tv)({
534
662
  * @param {string} [props.url] - URL to open when the row is clicked.
535
663
  * @param {string} [props.className] - Additional classes to apply to the row.
536
664
  * @param {boolean} [props.disabled=false] - Disables interaction with the row.
665
+ * @param {string} [props.accessibilityLabel] - Accessible label for the row (aria-label).
537
666
  *
538
667
  * @returns {React.ReactElement} The rendered ClickableRow component.
539
668
  */ Card.ClickableRow = function(param) {
540
- var children = param.children, onClick = param.onClick, id = param.id, url = param.url, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, className = param.className;
669
+ var children = param.children, onClick = param.onClick, id = param.id, url = param.url, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, className = param.className, accessibilityLabel = param.accessibilityLabel;
541
670
  var classes = clickableRowStyles({
542
671
  disabled: disabled
543
672
  });
673
+ var handleClick = url ? function() {
674
+ return window.open(url, "_blank");
675
+ } : onClick;
676
+ var handleKeyDown = function(e) {
677
+ if (disabled) return;
678
+ if (e.key === "Enter" || e.key === " ") {
679
+ e.preventDefault();
680
+ handleClick === null || handleClick === void 0 ? void 0 : handleClick(e);
681
+ }
682
+ };
544
683
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
545
684
  id: id,
546
- onClick: url ? function() {
547
- return window.open(url, "_blank");
548
- } : onClick,
685
+ role: "button",
686
+ tabIndex: disabled ? -1 : 0,
687
+ "aria-disabled": disabled || undefined,
688
+ "aria-label": accessibilityLabel,
689
+ onClick: disabled ? undefined : handleClick,
690
+ onKeyDown: handleKeyDown,
549
691
  className: "".concat(classes).concat(className ? " ".concat(className) : ""),
550
692
  children: children
551
693
  });
552
694
  };
553
695
  Card.ClickableRow.displayName = "Card.ClickableRow";
554
- Card.Rows = function(param) {
696
+ /**
697
+ * Rows container component for grouping multiple Card.Row elements.
698
+ *
699
+ * @usage
700
+ * - DO: Use to group multiple `Card.Row` elements with consistent spacing.
701
+ */ Card.Rows = function(param) {
555
702
  var children = param.children;
556
703
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
557
704
  className: "px-1.5 pb-1.5 @md:pb-2 @md:px-2",
@@ -560,9 +707,11 @@ Card.Rows = function(param) {
560
707
  };
561
708
  Card.Rows.displayName = "Card.Rows";
562
709
  /**
563
- * Row component for creating clickable rows inside the Card.
710
+ * @component Card.Row
711
+ *
712
+ * @usage
713
+ * - DO: Use for individual data rows within `Card.Rows`.
564
714
  *
565
- * @component
566
715
  * @param {Object} props - Props for the Row component.
567
716
  * @param {React.ReactNode} [props.children] - Child elements to render inside the row.
568
717
  * @param {Function} [props.onClick] - Click handler for the row.
@@ -570,21 +719,40 @@ Card.Rows.displayName = "Card.Rows";
570
719
  * @param {string} [props.url] - URL to open when the row is clicked.
571
720
  * @param {string} [props.className] - Additional classes to apply to the row.
572
721
  * @param {boolean} [props.disabled=false] - Disables interaction with the row.
722
+ * @param {string} [props.accessibilityLabel] - Accessible label for the row (aria-label).
573
723
  *
574
724
  * @returns {React.ReactElement} The rendered Row component.
575
725
  */ Card.Row = function(param) {
576
- var children = param.children, onClick = param.onClick, id = param.id, url = param.url, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, className = param.className;
726
+ var children = param.children, onClick = param.onClick, id = param.id, url = param.url, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, className = param.className, accessibilityLabel = param.accessibilityLabel;
727
+ var isInteractive = !!(onClick || url);
577
728
  var classes = clickableRowStyles({
578
- disabled: disabled
729
+ disabled: isInteractive ? disabled : false,
730
+ interactive: isInteractive
579
731
  });
732
+ var handleClick = url ? function() {
733
+ return window.open(url, "_blank");
734
+ } : onClick;
735
+ var handleKeyDown = function(e) {
736
+ if (!isInteractive || disabled) return;
737
+ if (e.key === "Enter" || e.key === " ") {
738
+ e.preventDefault();
739
+ handleClick === null || handleClick === void 0 ? void 0 : handleClick(e);
740
+ }
741
+ };
580
742
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
581
743
  id: id,
582
- onClick: url ? function() {
583
- return window.open(url, "_blank");
584
- } : onClick,
744
+ role: isInteractive ? "button" : undefined,
745
+ tabIndex: isInteractive ? disabled ? -1 : 0 : undefined,
746
+ "aria-disabled": isInteractive && disabled ? true : undefined,
747
+ "aria-label": accessibilityLabel,
748
+ onClick: isInteractive && !disabled ? handleClick : undefined,
749
+ onKeyDown: isInteractive ? handleKeyDown : undefined,
585
750
  className: "".concat(classes).concat(className ? " ".concat(className) : ""),
586
751
  children: children
587
752
  });
588
753
  };
589
754
  Card.Row.displayName = "Card.Row";
755
+ var useCard = function() {
756
+ return _react.default.useContext(CardContext);
757
+ };
590
758
  var _default = Card;