@ohos-ports/sprucelabs-react-heartwood-components 9.1.0-beta.0

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 (616) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -0
  3. package/lib/__mocks__/stubs/events.js +166 -0
  4. package/lib/__mocks__/stubs/events.js.map +1 -0
  5. package/lib/__mocks__/stubs/location.js +34 -0
  6. package/lib/__mocks__/stubs/location.js.map +1 -0
  7. package/lib/__mocks__/stubs/users.js +225 -0
  8. package/lib/__mocks__/stubs/users.js.map +1 -0
  9. package/lib/__tests__/components/Pagination/Pagination.test.js +127 -0
  10. package/lib/__tests__/components/Pagination/Pagination.test.js.map +1 -0
  11. package/lib/components/Avatar/Avatar-story.js +34 -0
  12. package/lib/components/Avatar/Avatar-story.js.map +1 -0
  13. package/lib/components/Avatar/Avatar.d.ts +40 -0
  14. package/lib/components/Avatar/Avatar.d.ts.map +1 -0
  15. package/lib/components/Avatar/Avatar.js +91 -0
  16. package/lib/components/Avatar/Avatar.js.map +1 -0
  17. package/lib/components/Avatar/UserAvatar.js +45 -0
  18. package/lib/components/Avatar/UserAvatar.js.map +1 -0
  19. package/lib/components/BotText/BotText-story.d.ts +2 -0
  20. package/lib/components/BotText/BotText-story.d.ts.map +1 -0
  21. package/lib/components/BotText/BotText-story.js +21 -0
  22. package/lib/components/BotText/BotText-story.js.map +1 -0
  23. package/lib/components/BotText/BotText.d.ts +12 -0
  24. package/lib/components/BotText/BotText.d.ts.map +1 -0
  25. package/lib/components/BotText/BotText.js +52 -0
  26. package/lib/components/BotText/BotText.js.map +1 -0
  27. package/lib/components/Button/Button-story.js +109 -0
  28. package/lib/components/Button/Button-story.js.map +1 -0
  29. package/lib/components/Button/Button.d.ts +47 -0
  30. package/lib/components/Button/Button.d.ts.map +1 -0
  31. package/lib/components/Button/Button.js +155 -0
  32. package/lib/components/Button/Button.js.map +1 -0
  33. package/lib/components/ButtonGroup/ButtonGroup-story.js +27 -0
  34. package/lib/components/ButtonGroup/ButtonGroup-story.js.map +1 -0
  35. package/lib/components/ButtonGroup/ButtonGroup.d.ts +19 -0
  36. package/lib/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  37. package/lib/components/ButtonGroup/ButtonGroup.js +64 -0
  38. package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -0
  39. package/lib/components/Card/Card-story.d.ts +2 -0
  40. package/lib/components/Card/Card-story.d.ts.map +1 -0
  41. package/lib/components/Card/Card-story.js +389 -0
  42. package/lib/components/Card/Card-story.js.map +1 -0
  43. package/lib/components/Card/Card.d.ts +69 -0
  44. package/lib/components/Card/Card.d.ts.map +1 -0
  45. package/lib/components/Card/Card.js +113 -0
  46. package/lib/components/Card/Card.js.map +1 -0
  47. package/lib/components/Card/components/CardBody.d.ts +27 -0
  48. package/lib/components/Card/components/CardBody.d.ts.map +1 -0
  49. package/lib/components/Card/components/CardBody.js +45 -0
  50. package/lib/components/Card/components/CardBody.js.map +1 -0
  51. package/lib/components/Card/components/CardBuilder.d.ts +50 -0
  52. package/lib/components/Card/components/CardBuilder.d.ts.map +1 -0
  53. package/lib/components/Card/components/CardBuilder.js +139 -0
  54. package/lib/components/Card/components/CardBuilder.js.map +1 -0
  55. package/lib/components/Card/components/CardFooter.d.ts +11 -0
  56. package/lib/components/Card/components/CardFooter.d.ts.map +1 -0
  57. package/lib/components/Card/components/CardFooter.js +22 -0
  58. package/lib/components/Card/components/CardFooter.js.map +1 -0
  59. package/lib/components/Card/components/CardHeader.d.ts +28 -0
  60. package/lib/components/Card/components/CardHeader.d.ts.map +1 -0
  61. package/lib/components/Card/components/CardHeader.js +70 -0
  62. package/lib/components/Card/components/CardHeader.js.map +1 -0
  63. package/lib/components/Card/components/CardSection.d.ts +10 -0
  64. package/lib/components/Card/components/CardSection.d.ts.map +1 -0
  65. package/lib/components/Card/components/CardSection.js +27 -0
  66. package/lib/components/Card/components/CardSection.js.map +1 -0
  67. package/lib/components/Card/components/OnboardingCard.d.ts +27 -0
  68. package/lib/components/Card/components/OnboardingCard.d.ts.map +1 -0
  69. package/lib/components/Card/components/OnboardingCard.js +129 -0
  70. package/lib/components/Card/components/OnboardingCard.js.map +1 -0
  71. package/lib/components/Card/components/Scores.d.ts +15 -0
  72. package/lib/components/Card/components/Scores.d.ts.map +1 -0
  73. package/lib/components/Card/components/Scores.js +39 -0
  74. package/lib/components/Card/components/Scores.js.map +1 -0
  75. package/lib/components/Card/index.d.ts +11 -0
  76. package/lib/components/Card/index.d.ts.map +1 -0
  77. package/lib/components/Card/index.js +120 -0
  78. package/lib/components/Card/index.js.map +1 -0
  79. package/lib/components/CircleLoader/CircleLoader-story.d.ts +2 -0
  80. package/lib/components/CircleLoader/CircleLoader-story.d.ts.map +1 -0
  81. package/lib/components/CircleLoader/CircleLoader-story.js +20 -0
  82. package/lib/components/CircleLoader/CircleLoader-story.js.map +1 -0
  83. package/lib/components/CircleLoader/CircleLoader.d.ts +13 -0
  84. package/lib/components/CircleLoader/CircleLoader.d.ts.map +1 -0
  85. package/lib/components/CircleLoader/CircleLoader.js +28 -0
  86. package/lib/components/CircleLoader/CircleLoader.js.map +1 -0
  87. package/lib/components/ContextMenu/ContextMenu-story.js +31 -0
  88. package/lib/components/ContextMenu/ContextMenu-story.js.map +1 -0
  89. package/lib/components/ContextMenu/ContextMenu.d.ts +70 -0
  90. package/lib/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  91. package/lib/components/ContextMenu/ContextMenu.js +315 -0
  92. package/lib/components/ContextMenu/ContextMenu.js.map +1 -0
  93. package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js +101 -0
  94. package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js.map +1 -0
  95. package/lib/components/Core/components/FeedBuilder/FeedBuilder.js +290 -0
  96. package/lib/components/Core/components/FeedBuilder/FeedBuilder.js.map +1 -0
  97. package/lib/components/Core/components/FooterPrimary/FooterPrimary.js +20 -0
  98. package/lib/components/Core/components/FooterPrimary/FooterPrimary.js.map +1 -0
  99. package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js +52 -0
  100. package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js.map +1 -0
  101. package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js +38 -0
  102. package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js.map +1 -0
  103. package/lib/components/Core/components/FooterPrimary/index.js +30 -0
  104. package/lib/components/Core/components/FooterPrimary/index.js.map +1 -0
  105. package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js +134 -0
  106. package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js.map +1 -0
  107. package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js +238 -0
  108. package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js.map +1 -0
  109. package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js +32 -0
  110. package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js.map +1 -0
  111. package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js +58 -0
  112. package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js.map +1 -0
  113. package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js +169 -0
  114. package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js.map +1 -0
  115. package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js +56 -0
  116. package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js.map +1 -0
  117. package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js +26 -0
  118. package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js.map +1 -0
  119. package/lib/components/Core/components/ProfileSummary/ProfileSummary.js +46 -0
  120. package/lib/components/Core/components/ProfileSummary/ProfileSummary.js.map +1 -0
  121. package/lib/components/Core/components/SaveBar/SaveBar-story.js +68 -0
  122. package/lib/components/Core/components/SaveBar/SaveBar-story.js.map +1 -0
  123. package/lib/components/Core/components/SaveBar/SaveBar.js +127 -0
  124. package/lib/components/Core/components/SaveBar/SaveBar.js.map +1 -0
  125. package/lib/components/Core/components/Sidebar/Sidebar-story.js +204 -0
  126. package/lib/components/Core/components/Sidebar/Sidebar-story.js.map +1 -0
  127. package/lib/components/Core/components/Sidebar/Sidebar.js +87 -0
  128. package/lib/components/Core/components/Sidebar/Sidebar.js.map +1 -0
  129. package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js +48 -0
  130. package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js.map +1 -0
  131. package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js +25 -0
  132. package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js.map +1 -0
  133. package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts +12 -0
  134. package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts.map +1 -0
  135. package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js +47 -0
  136. package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js.map +1 -0
  137. package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js +115 -0
  138. package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js.map +1 -0
  139. package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js +38 -0
  140. package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js.map +1 -0
  141. package/lib/components/Core/index.js +80 -0
  142. package/lib/components/Core/index.js.map +1 -0
  143. package/lib/components/Dropzone/Dropzone-story.js +119 -0
  144. package/lib/components/Dropzone/Dropzone-story.js.map +1 -0
  145. package/lib/components/Dropzone/Dropzone.js +317 -0
  146. package/lib/components/Dropzone/Dropzone.js.map +1 -0
  147. package/lib/components/EmptyState/EmptyState-story.d.ts +2 -0
  148. package/lib/components/EmptyState/EmptyState-story.d.ts.map +1 -0
  149. package/lib/components/EmptyState/EmptyState-story.js +60 -0
  150. package/lib/components/EmptyState/EmptyState-story.js.map +1 -0
  151. package/lib/components/EmptyState/EmptyState.d.ts +28 -0
  152. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -0
  153. package/lib/components/EmptyState/EmptyState.js +54 -0
  154. package/lib/components/EmptyState/EmptyState.js.map +1 -0
  155. package/lib/components/EventDetails/EventDetails-story.d.ts +2 -0
  156. package/lib/components/EventDetails/EventDetails-story.d.ts.map +1 -0
  157. package/lib/components/EventDetails/EventDetails-story.js +112 -0
  158. package/lib/components/EventDetails/EventDetails-story.js.map +1 -0
  159. package/lib/components/EventDetails/EventDetails.d.ts +18 -0
  160. package/lib/components/EventDetails/EventDetails.d.ts.map +1 -0
  161. package/lib/components/EventDetails/EventDetails.js +75 -0
  162. package/lib/components/EventDetails/EventDetails.js.map +1 -0
  163. package/lib/components/EventDetails/EventDetailsUtilities.d.ts +11 -0
  164. package/lib/components/EventDetails/EventDetailsUtilities.d.ts.map +1 -0
  165. package/lib/components/EventDetails/EventDetailsUtilities.js +56 -0
  166. package/lib/components/EventDetails/EventDetailsUtilities.js.map +1 -0
  167. package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts +18 -0
  168. package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts.map +1 -0
  169. package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js +111 -0
  170. package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js.map +1 -0
  171. package/lib/components/EventDetails/eventDetailsMock.d.ts +10 -0
  172. package/lib/components/EventDetails/eventDetailsMock.d.ts.map +1 -0
  173. package/lib/components/EventDetails/eventDetailsMock.js +840 -0
  174. package/lib/components/EventDetails/eventDetailsMock.js.map +1 -0
  175. package/lib/components/FontLoader/FontLoader-story.js +16 -0
  176. package/lib/components/FontLoader/FontLoader-story.js.map +1 -0
  177. package/lib/components/FontLoader/FontLoader.js +148 -0
  178. package/lib/components/FontLoader/FontLoader.js.map +1 -0
  179. package/lib/components/Forms/FormPartials.js +70 -0
  180. package/lib/components/Forms/FormPartials.js.map +1 -0
  181. package/lib/components/Forms/Forms-story.js +297 -0
  182. package/lib/components/Forms/Forms-story.js.map +1 -0
  183. package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts +71 -0
  184. package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts.map +1 -0
  185. package/lib/components/Forms/components/Autosuggest/Autosuggest.js +372 -0
  186. package/lib/components/Forms/components/Autosuggest/Autosuggest.js.map +1 -0
  187. package/lib/components/Forms/components/Checkbox/Checkbox.d.ts +23 -0
  188. package/lib/components/Forms/components/Checkbox/Checkbox.d.ts.map +1 -0
  189. package/lib/components/Forms/components/Checkbox/Checkbox.js +162 -0
  190. package/lib/components/Forms/components/Checkbox/Checkbox.js.map +1 -0
  191. package/lib/components/Forms/components/DatePicker/DatePicker.js +236 -0
  192. package/lib/components/Forms/components/DatePicker/DatePicker.js.map +1 -0
  193. package/lib/components/Forms/components/DomainInput/DomainInput.js +29 -0
  194. package/lib/components/Forms/components/DomainInput/DomainInput.js.map +1 -0
  195. package/lib/components/Forms/components/DurationInput/DurationInput.js +270 -0
  196. package/lib/components/Forms/components/DurationInput/DurationInput.js.map +1 -0
  197. package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js +357 -0
  198. package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js.map +1 -0
  199. package/lib/components/Forms/components/FormBuilder/FormBuilder.js +121 -0
  200. package/lib/components/Forms/components/FormBuilder/FormBuilder.js.map +1 -0
  201. package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js +201 -0
  202. package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js.map +1 -0
  203. package/lib/components/Forms/components/FormLayout/FormLayout.js +35 -0
  204. package/lib/components/Forms/components/FormLayout/FormLayout.js.map +1 -0
  205. package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js +30 -0
  206. package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -0
  207. package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js +32 -0
  208. package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js.map +1 -0
  209. package/lib/components/Forms/components/FormLayout/index.js +32 -0
  210. package/lib/components/Forms/components/FormLayout/index.js.map +1 -0
  211. package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts +30 -0
  212. package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts.map +1 -0
  213. package/lib/components/Forms/components/PhoneInput/PhoneInput.js +119 -0
  214. package/lib/components/Forms/components/PhoneInput/PhoneInput.js.map +1 -0
  215. package/lib/components/Forms/components/Radio/Radio.d.ts +15 -0
  216. package/lib/components/Forms/components/Radio/Radio.d.ts.map +1 -0
  217. package/lib/components/Forms/components/Radio/Radio.js +92 -0
  218. package/lib/components/Forms/components/Radio/Radio.js.map +1 -0
  219. package/lib/components/Forms/components/Search/Search.js +96 -0
  220. package/lib/components/Forms/components/Search/Search.js.map +1 -0
  221. package/lib/components/Forms/components/Select/Select.js +95 -0
  222. package/lib/components/Forms/components/Select/Select.js.map +1 -0
  223. package/lib/components/Forms/components/Slider/Slider.js +100 -0
  224. package/lib/components/Forms/components/Slider/Slider.js.map +1 -0
  225. package/lib/components/Forms/components/Stars/Stars.js +101 -0
  226. package/lib/components/Forms/components/Stars/Stars.js.map +1 -0
  227. package/lib/components/Forms/components/Tag/Tag.js +60 -0
  228. package/lib/components/Forms/components/Tag/Tag.js.map +1 -0
  229. package/lib/components/Forms/components/TextArea/TextArea.js +55 -0
  230. package/lib/components/Forms/components/TextArea/TextArea.js.map +1 -0
  231. package/lib/components/Forms/components/TextInput/TextInput.d.ts +28 -0
  232. package/lib/components/Forms/components/TextInput/TextInput.d.ts.map +1 -0
  233. package/lib/components/Forms/components/TextInput/TextInput.js +57 -0
  234. package/lib/components/Forms/components/TextInput/TextInput.js.map +1 -0
  235. package/lib/components/Forms/components/Toggle/Toggle.d.ts +9 -0
  236. package/lib/components/Forms/components/Toggle/Toggle.d.ts.map +1 -0
  237. package/lib/components/Forms/components/Toggle/Toggle.js +43 -0
  238. package/lib/components/Forms/components/Toggle/Toggle.js.map +1 -0
  239. package/lib/components/Forms/index.d.ts +18 -0
  240. package/lib/components/Forms/index.d.ts.map +1 -0
  241. package/lib/components/Forms/index.js +182 -0
  242. package/lib/components/Forms/index.js.map +1 -0
  243. package/lib/components/Heading/Heading-story.js +18 -0
  244. package/lib/components/Heading/Heading-story.js.map +1 -0
  245. package/lib/components/Heading/Heading.d.ts +13 -0
  246. package/lib/components/Heading/Heading.d.ts.map +1 -0
  247. package/lib/components/Heading/Heading.js +32 -0
  248. package/lib/components/Heading/Heading.js.map +1 -0
  249. package/lib/components/Icon/Icon-story.d.ts +2 -0
  250. package/lib/components/Icon/Icon-story.d.ts.map +1 -0
  251. package/lib/components/Icon/Icon-story.js +44 -0
  252. package/lib/components/Icon/Icon-story.js.map +1 -0
  253. package/lib/components/Icon/Icon.d.ts +13 -0
  254. package/lib/components/Icon/Icon.d.ts.map +1 -0
  255. package/lib/components/Icon/Icon.js +52 -0
  256. package/lib/components/Icon/Icon.js.map +1 -0
  257. package/lib/components/Image/Image.d.ts +11 -0
  258. package/lib/components/Image/Image.d.ts.map +1 -0
  259. package/lib/components/Image/Image.js +32 -0
  260. package/lib/components/Image/Image.js.map +1 -0
  261. package/lib/components/ImageCropper/ImageCropper-story.js +219 -0
  262. package/lib/components/ImageCropper/ImageCropper-story.js.map +1 -0
  263. package/lib/components/ImageCropper/ImageCropper.js +256 -0
  264. package/lib/components/ImageCropper/ImageCropper.js.map +1 -0
  265. package/lib/components/ImageSSR/ImageSSR.js +32 -0
  266. package/lib/components/ImageSSR/ImageSSR.js.map +1 -0
  267. package/lib/components/Layout/Layout-story.js +128 -0
  268. package/lib/components/Layout/Layout-story.js.map +1 -0
  269. package/lib/components/Layout/Layout.js +43 -0
  270. package/lib/components/Layout/Layout.js.map +1 -0
  271. package/lib/components/Layout/components/LayoutSection/LayoutSection.js +38 -0
  272. package/lib/components/Layout/components/LayoutSection/LayoutSection.js.map +1 -0
  273. package/lib/components/Layout/index.js +24 -0
  274. package/lib/components/Layout/index.js.map +1 -0
  275. package/lib/components/List/List-story.d.ts +2 -0
  276. package/lib/components/List/List-story.d.ts.map +1 -0
  277. package/lib/components/List/List-story.js +241 -0
  278. package/lib/components/List/List-story.js.map +1 -0
  279. package/lib/components/List/List.d.ts +34 -0
  280. package/lib/components/List/List.d.ts.map +1 -0
  281. package/lib/components/List/List.js +83 -0
  282. package/lib/components/List/List.js.map +1 -0
  283. package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts +27 -0
  284. package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts.map +1 -0
  285. package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js +93 -0
  286. package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js.map +1 -0
  287. package/lib/components/List/components/ListHeader/ListHeader.d.ts +16 -0
  288. package/lib/components/List/components/ListHeader/ListHeader.d.ts.map +1 -0
  289. package/lib/components/List/components/ListHeader/ListHeader.js +51 -0
  290. package/lib/components/List/components/ListHeader/ListHeader.js.map +1 -0
  291. package/lib/components/List/components/ListItem/ListItem.d.ts +67 -0
  292. package/lib/components/List/components/ListItem/ListItem.d.ts.map +1 -0
  293. package/lib/components/List/components/ListItem/ListItem.js +206 -0
  294. package/lib/components/List/components/ListItem/ListItem.js.map +1 -0
  295. package/lib/components/List/components/SortableList/SortableList.d.ts +35 -0
  296. package/lib/components/List/components/SortableList/SortableList.d.ts.map +1 -0
  297. package/lib/components/List/components/SortableList/SortableList.js +180 -0
  298. package/lib/components/List/components/SortableList/SortableList.js.map +1 -0
  299. package/lib/components/List/index.d.ts +6 -0
  300. package/lib/components/List/index.d.ts.map +1 -0
  301. package/lib/components/List/index.js +74 -0
  302. package/lib/components/List/index.js.map +1 -0
  303. package/lib/components/Loader/Loader-story.js +30 -0
  304. package/lib/components/Loader/Loader-story.js.map +1 -0
  305. package/lib/components/Loader/Loader.js +36 -0
  306. package/lib/components/Loader/Loader.js.map +1 -0
  307. package/lib/components/Loader/Loader.test.js +17 -0
  308. package/lib/components/Loader/Loader.test.js.map +1 -0
  309. package/lib/components/MarkdownText/MarkdownText.d.ts +8 -0
  310. package/lib/components/MarkdownText/MarkdownText.d.ts.map +1 -0
  311. package/lib/components/MarkdownText/MarkdownText.js +26 -0
  312. package/lib/components/MarkdownText/MarkdownText.js.map +1 -0
  313. package/lib/components/Message/Message-story.js +135 -0
  314. package/lib/components/Message/Message-story.js.map +1 -0
  315. package/lib/components/Message/Message.js +147 -0
  316. package/lib/components/Message/Message.js.map +1 -0
  317. package/lib/components/Message/components/MessageBuilder.js +132 -0
  318. package/lib/components/Message/components/MessageBuilder.js.map +1 -0
  319. package/lib/components/Message/index.js +24 -0
  320. package/lib/components/Message/index.js.map +1 -0
  321. package/lib/components/Modal/Modal-story.js +239 -0
  322. package/lib/components/Modal/Modal-story.js.map +1 -0
  323. package/lib/components/Modal/Modal.js +86 -0
  324. package/lib/components/Modal/Modal.js.map +1 -0
  325. package/lib/components/Modal/components/ModalBody/ModalBody.js +30 -0
  326. package/lib/components/Modal/components/ModalBody/ModalBody.js.map +1 -0
  327. package/lib/components/Modal/components/ModalFooter/ModalFooter.js +31 -0
  328. package/lib/components/Modal/components/ModalFooter/ModalFooter.js.map +1 -0
  329. package/lib/components/Modal/components/ModalHeader/ModalHeader.js +84 -0
  330. package/lib/components/Modal/components/ModalHeader/ModalHeader.js.map +1 -0
  331. package/lib/components/Page/Page-story.js +115 -0
  332. package/lib/components/Page/Page-story.js.map +1 -0
  333. package/lib/components/Page/Page.js +55 -0
  334. package/lib/components/Page/Page.js.map +1 -0
  335. package/lib/components/Page/components/PageContent/PageContent.js +22 -0
  336. package/lib/components/Page/components/PageContent/PageContent.js.map +1 -0
  337. package/lib/components/Page/components/PageHeader/PageHeader.js +127 -0
  338. package/lib/components/Page/components/PageHeader/PageHeader.js.map +1 -0
  339. package/lib/components/Page/index.js +32 -0
  340. package/lib/components/Page/index.js.map +1 -0
  341. package/lib/components/PagedModal/PagedModal-story.js +121 -0
  342. package/lib/components/PagedModal/PagedModal-story.js.map +1 -0
  343. package/lib/components/PagedModal/PagedModal.js +84 -0
  344. package/lib/components/PagedModal/PagedModal.js.map +1 -0
  345. package/lib/components/Pagination/Pagination-story.js +35 -0
  346. package/lib/components/Pagination/Pagination-story.js.map +1 -0
  347. package/lib/components/Pagination/Pagination.js +157 -0
  348. package/lib/components/Pagination/Pagination.js.map +1 -0
  349. package/lib/components/RecordSelectionList/RecordSelectList-story.js +491 -0
  350. package/lib/components/RecordSelectionList/RecordSelectList-story.js.map +1 -0
  351. package/lib/components/RecordSelectionList/RecordSelectionList.d.ts +112 -0
  352. package/lib/components/RecordSelectionList/RecordSelectionList.d.ts.map +1 -0
  353. package/lib/components/RecordSelectionList/RecordSelectionList.js +702 -0
  354. package/lib/components/RecordSelectionList/RecordSelectionList.js.map +1 -0
  355. package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts +5 -0
  356. package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts.map +1 -0
  357. package/lib/components/RecordSelectionList/RecordSelectionListItem.js +20 -0
  358. package/lib/components/RecordSelectionList/RecordSelectionListItem.js.map +1 -0
  359. package/lib/components/RecordTable/RecordTable-story.d.ts +2 -0
  360. package/lib/components/RecordTable/RecordTable-story.d.ts.map +1 -0
  361. package/lib/components/RecordTable/RecordTable-story.js +242 -0
  362. package/lib/components/RecordTable/RecordTable-story.js.map +1 -0
  363. package/lib/components/RecordTable/RecordTable.d.ts +133 -0
  364. package/lib/components/RecordTable/RecordTable.d.ts.map +1 -0
  365. package/lib/components/RecordTable/RecordTable.js +523 -0
  366. package/lib/components/RecordTable/RecordTable.js.map +1 -0
  367. package/lib/components/SplitButton/SplitButton-story.js +60 -0
  368. package/lib/components/SplitButton/SplitButton-story.js.map +1 -0
  369. package/lib/components/SplitButton/SplitButton.d.ts +47 -0
  370. package/lib/components/SplitButton/SplitButton.d.ts.map +1 -0
  371. package/lib/components/SplitButton/SplitButton.js +296 -0
  372. package/lib/components/SplitButton/SplitButton.js.map +1 -0
  373. package/lib/components/Subheading/Subheading-story.js +18 -0
  374. package/lib/components/Subheading/Subheading-story.js.map +1 -0
  375. package/lib/components/Subheading/Subheading.js +40 -0
  376. package/lib/components/Subheading/Subheading.js.map +1 -0
  377. package/lib/components/Table/Table-story.js +428 -0
  378. package/lib/components/Table/Table-story.js.map +1 -0
  379. package/lib/components/Table/Table.d.ts +63 -0
  380. package/lib/components/Table/Table.d.ts.map +1 -0
  381. package/lib/components/Table/Table.js +395 -0
  382. package/lib/components/Table/Table.js.map +1 -0
  383. package/lib/components/Table/components/TableFilters/TableFilters.js +31 -0
  384. package/lib/components/Table/components/TableFilters/TableFilters.js.map +1 -0
  385. package/lib/components/Table/components/TableSearch/TableSearch.d.ts +7 -0
  386. package/lib/components/Table/components/TableSearch/TableSearch.d.ts.map +1 -0
  387. package/lib/components/Table/components/TableSearch/TableSearch.js +30 -0
  388. package/lib/components/Table/components/TableSearch/TableSearch.js.map +1 -0
  389. package/lib/components/Table/index.d.ts +4 -0
  390. package/lib/components/Table/index.d.ts.map +1 -0
  391. package/lib/components/Table/index.js +40 -0
  392. package/lib/components/Table/index.js.map +1 -0
  393. package/lib/components/Tabs/Tabs-story.d.ts +2 -0
  394. package/lib/components/Tabs/Tabs-story.d.ts.map +1 -0
  395. package/lib/components/Tabs/Tabs-story.js +36 -0
  396. package/lib/components/Tabs/Tabs-story.js.map +1 -0
  397. package/lib/components/Tabs/Tabs.d.ts +40 -0
  398. package/lib/components/Tabs/Tabs.d.ts.map +1 -0
  399. package/lib/components/Tabs/Tabs.js +244 -0
  400. package/lib/components/Tabs/Tabs.js.map +1 -0
  401. package/lib/components/Tabs/components/Tab/Tab.d.ts +26 -0
  402. package/lib/components/Tabs/components/Tab/Tab.d.ts.map +1 -0
  403. package/lib/components/Tabs/components/Tab/Tab.js +46 -0
  404. package/lib/components/Tabs/components/Tab/Tab.js.map +1 -0
  405. package/lib/components/Text/Text-story.d.ts +2 -0
  406. package/lib/components/Text/Text-story.d.ts.map +1 -0
  407. package/lib/components/Text/Text-story.js +51 -0
  408. package/lib/components/Text/Text-story.js.map +1 -0
  409. package/lib/components/Text/Text.d.ts +18 -0
  410. package/lib/components/Text/Text.d.ts.map +1 -0
  411. package/lib/components/Text/Text.js +123 -0
  412. package/lib/components/Text/Text.js.map +1 -0
  413. package/lib/components/TextContainer/TextContainer-story.js +32 -0
  414. package/lib/components/TextContainer/TextContainer-story.js.map +1 -0
  415. package/lib/components/TextContainer/TextContainer.js +33 -0
  416. package/lib/components/TextContainer/TextContainer.js.map +1 -0
  417. package/lib/components/TextStyle/TextStyle-story.js +28 -0
  418. package/lib/components/TextStyle/TextStyle-story.js.map +1 -0
  419. package/lib/components/TextStyle/TextStyle.js +41 -0
  420. package/lib/components/TextStyle/TextStyle.js.map +1 -0
  421. package/lib/components/Toast/Toast-story.d.ts +2 -0
  422. package/lib/components/Toast/Toast-story.d.ts.map +1 -0
  423. package/lib/components/Toast/Toast-story.js +210 -0
  424. package/lib/components/Toast/Toast-story.js.map +1 -0
  425. package/lib/components/Toast/Toast.d.ts +24 -0
  426. package/lib/components/Toast/Toast.d.ts.map +1 -0
  427. package/lib/components/Toast/Toast.js +76 -0
  428. package/lib/components/Toast/Toast.js.map +1 -0
  429. package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts +24 -0
  430. package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts.map +1 -0
  431. package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js +131 -0
  432. package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js.map +1 -0
  433. package/lib/components/TruncatedList/TruncatedList-story.js +222 -0
  434. package/lib/components/TruncatedList/TruncatedList-story.js.map +1 -0
  435. package/lib/components/TruncatedList/TruncatedList.d.ts +49 -0
  436. package/lib/components/TruncatedList/TruncatedList.d.ts.map +1 -0
  437. package/lib/components/TruncatedList/TruncatedList.js +188 -0
  438. package/lib/components/TruncatedList/TruncatedList.js.map +1 -0
  439. package/lib/components/View/View-story.js +485 -0
  440. package/lib/components/View/View-story.js.map +1 -0
  441. package/lib/components/View/View.d.ts +26 -0
  442. package/lib/components/View/View.d.ts.map +1 -0
  443. package/lib/components/View/View.js +91 -0
  444. package/lib/components/View/View.js.map +1 -0
  445. package/lib/components/_utilities/Anchor.js +28 -0
  446. package/lib/components/_utilities/Anchor.js.map +1 -0
  447. package/lib/custom-types.d.js +2 -0
  448. package/lib/custom-types.d.js.map +1 -0
  449. package/lib/icons.js +3328 -0
  450. package/lib/icons.js.map +1 -0
  451. package/lib/index.d.ts +46 -0
  452. package/lib/index.d.ts.map +1 -0
  453. package/lib/index.js +707 -0
  454. package/lib/index.js.map +1 -0
  455. package/lib/stubs/events.js +166 -0
  456. package/lib/stubs/events.js.map +1 -0
  457. package/lib/stubs/location.js +34 -0
  458. package/lib/stubs/location.js.map +1 -0
  459. package/lib/stubs/users.js +225 -0
  460. package/lib/stubs/users.js.map +1 -0
  461. package/lib/utilities.js +23 -0
  462. package/lib/utilities.js.map +1 -0
  463. package/package.json +174 -0
  464. package/static/android-chrome-192x192.png +0 -0
  465. package/static/android-chrome-256x256.png +0 -0
  466. package/static/apple-touch-icon.png +0 -0
  467. package/static/assets/bg.jpeg +0 -0
  468. package/static/assets/icons/Design/Rotate/rotate-back.svg +9 -0
  469. package/static/assets/icons/Design/Rotate/rotate-forward.svg +9 -0
  470. package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--16w.svg +3 -0
  471. package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--56w.svg +5 -0
  472. package/static/assets/icons/Interface-Essential/Alerts/alert-triangle.svg +3 -0
  473. package/static/assets/icons/Interface-Essential/Dashboard/gauge-dashboard-1.svg +11 -0
  474. package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-3.svg +12 -0
  475. package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-date.svg +9 -0
  476. package/static/assets/icons/Interface-Essential/Delete/bin.svg +7 -0
  477. package/static/assets/icons/Interface-Essential/Edit/pencil-write.svg +5 -0
  478. package/static/assets/icons/Interface-Essential/Form-Edition/paper-write.svg +8 -0
  479. package/static/assets/icons/Interface-Essential/Form-Validation/check-circle-1.svg +4 -0
  480. package/static/assets/icons/Interface-Essential/Help/question-help-square--16w.svg +5 -0
  481. package/static/assets/icons/Interface-Essential/Help/question-help-square.svg +5 -0
  482. package/static/assets/icons/Interface-Essential/Home/house-1--16w.svg +4 -0
  483. package/static/assets/icons/Interface-Essential/Home/house-1.svg +4 -0
  484. package/static/assets/icons/Interface-Essential/Lists/list-bullets-1.svg +8 -0
  485. package/static/assets/icons/Interface-Essential/Lock/Unlock/Lock/Unlock-4.svg +5 -0
  486. package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6--16w.svg +3 -0
  487. package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6.svg +5 -0
  488. package/static/assets/icons/Interface-Essential/Login/Logout/logout.svg +5 -0
  489. package/static/assets/icons/Interface-Essential/Menu/navigation-menu-horizontal.svg +5 -0
  490. package/static/assets/icons/Interface-Essential/Select/cursor-select-4.svg +14 -0
  491. package/static/assets/icons/Interface-Essential/Time/stopwatch.svg +8 -0
  492. package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-check.svg +7 -0
  493. package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-upload.svg +9 -0
  494. package/static/assets/icons/Maps-Navigation/Pins/pin-2.svg +4 -0
  495. package/static/assets/icons/Maps-Navigation/Pins/pin.svg +4 -0
  496. package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text--16w.svg +8 -0
  497. package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text.svg +8 -0
  498. package/static/assets/icons/Messages-Chat-Smileys/Messages-Speech-Bubbles/messages-bubble-square-text.svg +5 -0
  499. package/static/assets/icons/Phones-Mobile-Devices/Phone/phone-retro-1.svg +7 -0
  500. package/static/assets/icons/Programming-Apps-Websites/Plugins/Modules/module-puzzle.svg +3 -0
  501. package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1--56w.svg +6 -0
  502. package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1.svg +7 -0
  503. package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1-1.svg +3 -0
  504. package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1.svg +3 -0
  505. package/static/assets/icons/Transportation/Aircraft/aircraft-military-plane.svg +18 -0
  506. package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-image--56w.svg +7 -0
  507. package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-up-down.svg +8 -0
  508. package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Neutral/single-neutral-id-card-3.svg +8 -0
  509. package/static/assets/icons/Users/Geometric-Full-Body-Multiple-Users/multiple-users-1.svg +8 -0
  510. package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team--16w.svg +8 -0
  511. package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team.svg +8 -0
  512. package/static/assets/icons/ic_add.svg +5 -0
  513. package/static/assets/icons/ic_add_circle_outline.svg +3 -0
  514. package/static/assets/icons/ic_arrow_back.svg +3 -0
  515. package/static/assets/icons/ic_arrow_drop_down.svg +3 -0
  516. package/static/assets/icons/ic_arrow_forward.svg +3 -0
  517. package/static/assets/icons/ic_button.svg +3 -0
  518. package/static/assets/icons/ic_calendar.svg +12 -0
  519. package/static/assets/icons/ic_cancel.svg +8 -0
  520. package/static/assets/icons/ic_caution.svg +3 -0
  521. package/static/assets/icons/ic_caution_light_large.svg +5 -0
  522. package/static/assets/icons/ic_check_box.svg +3 -0
  523. package/static/assets/icons/ic_check_box_outline_blank.svg +3 -0
  524. package/static/assets/icons/ic_check_circle.svg +3 -0
  525. package/static/assets/icons/ic_close.svg +3 -0
  526. package/static/assets/icons/ic_colors.svg +8 -0
  527. package/static/assets/icons/ic_complete.svg +4 -0
  528. package/static/assets/icons/ic_css.svg +7 -0
  529. package/static/assets/icons/ic_dashboard.svg +11 -0
  530. package/static/assets/icons/ic_date.svg +9 -0
  531. package/static/assets/icons/ic_date_disable.svg +8 -0
  532. package/static/assets/icons/ic_delete.svg +7 -0
  533. package/static/assets/icons/ic_disable.svg +3 -0
  534. package/static/assets/icons/ic_drag_handle.svg +3 -0
  535. package/static/assets/icons/ic_drop_light_large.svg +14 -0
  536. package/static/assets/icons/ic_edit.svg +5 -0
  537. package/static/assets/icons/ic_email.svg +6 -0
  538. package/static/assets/icons/ic_fonts.svg +6 -0
  539. package/static/assets/icons/ic_fullscreen.svg +3 -0
  540. package/static/assets/icons/ic_fullscreen_exit.svg +3 -0
  541. package/static/assets/icons/ic_guests.svg +8 -0
  542. package/static/assets/icons/ic_help.svg +5 -0
  543. package/static/assets/icons/ic_home.svg +4 -0
  544. package/static/assets/icons/ic_indeterminate_check_box.svg +3 -0
  545. package/static/assets/icons/ic_keyboard_arrow_left.svg +3 -0
  546. package/static/assets/icons/ic_keyboard_arrow_right.svg +3 -0
  547. package/static/assets/icons/ic_late.svg +5 -0
  548. package/static/assets/icons/ic_launch.svg +18 -0
  549. package/static/assets/icons/ic_location.svg +4 -0
  550. package/static/assets/icons/ic_logout.svg +5 -0
  551. package/static/assets/icons/ic_menu.svg +3 -0
  552. package/static/assets/icons/ic_message.svg +5 -0
  553. package/static/assets/icons/ic_message_failed.svg +7 -0
  554. package/static/assets/icons/ic_messages.svg +8 -0
  555. package/static/assets/icons/ic_more.svg +5 -0
  556. package/static/assets/icons/ic_new_tab.svg +3 -0
  557. package/static/assets/icons/ic_note.svg +8 -0
  558. package/static/assets/icons/ic_payment_failed_solid.svg +5 -0
  559. package/static/assets/icons/ic_payment_success_solid.svg +5 -0
  560. package/static/assets/icons/ic_phone.svg +7 -0
  561. package/static/assets/icons/ic_pin.svg +4 -0
  562. package/static/assets/icons/ic_pin_outline.svg +4 -0
  563. package/static/assets/icons/ic_power.svg +4 -0
  564. package/static/assets/icons/ic_private.svg +5 -0
  565. package/static/assets/icons/ic_profile_image_light_large.svg +7 -0
  566. package/static/assets/icons/ic_public.svg +5 -0
  567. package/static/assets/icons/ic_radio_button_checked.svg +3 -0
  568. package/static/assets/icons/ic_radio_button_unchecked.svg +3 -0
  569. package/static/assets/icons/ic_rotate_left.svg +9 -0
  570. package/static/assets/icons/ic_rotate_right.svg +9 -0
  571. package/static/assets/icons/ic_search.svg +3 -0
  572. package/static/assets/icons/ic_settings.svg +4 -0
  573. package/static/assets/icons/ic_shop_light_large.svg +6 -0
  574. package/static/assets/icons/ic_show.svg +4 -0
  575. package/static/assets/icons/ic_skill.svg +3 -0
  576. package/static/assets/icons/ic_star_outline.svg +3 -0
  577. package/static/assets/icons/ic_star_solid.svg +3 -0
  578. package/static/assets/icons/ic_status.svg +8 -0
  579. package/static/assets/icons/ic_store.svg +7 -0
  580. package/static/assets/icons/ic_switch_users.svg +8 -0
  581. package/static/assets/icons/ic_team.svg +8 -0
  582. package/static/assets/icons/ic_teammates.svg +8 -0
  583. package/static/assets/icons/ic_unordered_list.svg +8 -0
  584. package/static/assets/icons/ic_upload.svg +8 -0
  585. package/static/assets/icons/ic_upload_file_light_large.svg +9 -0
  586. package/static/assets/icons/ic_upload_file_success_light_large.svg +7 -0
  587. package/static/assets/icons/ic_user_avatar.svg +3 -0
  588. package/static/assets/icons/ic_wifi.svg +9 -0
  589. package/static/assets/icons/s-ic_spruce-logo-02.svg +3 -0
  590. package/static/assets/icons/s-ic_spruce-logo.svg +3 -0
  591. package/static/assets/logo.png +0 -0
  592. package/static/assets/users/user-01--96w.png +0 -0
  593. package/static/assets/users/user-01.png +0 -0
  594. package/static/assets/users/user-02--96w.png +0 -0
  595. package/static/assets/users/user-03--96w.png +0 -0
  596. package/static/assets/users/user-04--96w.png +0 -0
  597. package/static/assets/users/user-04.png +0 -0
  598. package/static/assets/users/user-05--96w.png +0 -0
  599. package/static/assets/users/user-05.png +0 -0
  600. package/static/assets/users/user-06--96w.png +0 -0
  601. package/static/assets/users/user-06.png +0 -0
  602. package/static/assets/users/user-07--96w.png +0 -0
  603. package/static/assets/users/user-07.png +0 -0
  604. package/static/assets/users/user-08--96w.png +0 -0
  605. package/static/assets/users/user-08.png +0 -0
  606. package/static/assets/users/user-09--96w.png +0 -0
  607. package/static/assets/users/user-09.png +0 -0
  608. package/static/assets/users/user-placeholder--96w.png +0 -0
  609. package/static/assets/users/user-placeholder.png +0 -0
  610. package/static/browserconfig.xml +9 -0
  611. package/static/favicon-16x16.png +0 -0
  612. package/static/favicon-32x32.png +0 -0
  613. package/static/favicon.ico +0 -0
  614. package/static/mstile-150x150.png +0 -0
  615. package/static/safari-pinned-tab.svg +26 -0
  616. package/static/site.webmanifest +19 -0
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export interface ICardBodyProps {
3
+ /** Children to show in the Card */
4
+ children?: React.ReactNode;
5
+ /** Whether to wrap children in CardSection */
6
+ isSectioned?: boolean;
7
+ /** Set true to display line separators between CardSection components */
8
+ areSectionSeparatorsVisible?: boolean;
9
+ /** Does card include top padding */
10
+ hasTopPadding?: boolean;
11
+ /** Does card include bottom padding */
12
+ hasBottomPadding?: boolean;
13
+ /** Set to true to remove horizontal padding */
14
+ isFullBleed?: boolean;
15
+ }
16
+ declare const CardBody: {
17
+ (props: ICardBodyProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
18
+ displayName: string;
19
+ defaultProps: {
20
+ isSectioned: boolean;
21
+ areSectionSeparatorsVisible: boolean;
22
+ hasTopPadding: boolean;
23
+ hasBottomPadding: boolean;
24
+ };
25
+ };
26
+ export default CardBody;
27
+ //# sourceMappingURL=CardBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardBody.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/CardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,cAAc;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,yEAAyE;IACzE,2BAA2B,CAAC,EAAE,OAAO,CAAA;IAErC,oCAAoC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,QAAQ;;;;;;;;;CAuBb,CAAA;AAUD,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _CardSection = _interopRequireDefault(require("./CardSection"));
15
+
16
+ var CardBody = function CardBody(props) {
17
+ var children = props.children,
18
+ isSectioned = props.isSectioned,
19
+ hasTopPadding = props.hasTopPadding,
20
+ hasBottomPadding = props.hasBottomPadding,
21
+ areSectionSeparatorsVisible = props.areSectionSeparatorsVisible,
22
+ _props$isFullBleed = props.isFullBleed,
23
+ isFullBleed = _props$isFullBleed === void 0 ? false : _props$isFullBleed;
24
+ var className = (0, _classnames["default"])('card__body', {
25
+ 'card__body--section-separators-visible': areSectionSeparatorsVisible,
26
+ 'card__body--no-top-padding': !hasTopPadding,
27
+ 'card__body--no-bottom-padding': !hasBottomPadding
28
+ });
29
+ return _react["default"].createElement("div", {
30
+ className: className
31
+ }, isSectioned ? _react["default"].createElement(_CardSection["default"], {
32
+ isFullBleed: isFullBleed
33
+ }, children) : children);
34
+ };
35
+
36
+ CardBody.displayName = 'Card.Body';
37
+ CardBody.defaultProps = {
38
+ isSectioned: true,
39
+ areSectionSeparatorsVisible: false,
40
+ hasTopPadding: true,
41
+ hasBottomPadding: true
42
+ };
43
+ var _default = CardBody;
44
+ exports["default"] = _default;
45
+ //# sourceMappingURL=CardBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Card/components/CardBody.tsx"],"names":["CardBody","props","children","isSectioned","hasTopPadding","hasBottomPadding","areSectionSeparatorsVisible","isFullBleed","className","displayName","defaultProps"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAuBA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAA+C;AAAA,MAE9DC,QAF8D,GAQ3DD,KAR2D,CAE9DC,QAF8D;AAAA,MAG9DC,WAH8D,GAQ3DF,KAR2D,CAG9DE,WAH8D;AAAA,MAI9DC,aAJ8D,GAQ3DH,KAR2D,CAI9DG,aAJ8D;AAAA,MAK9DC,gBAL8D,GAQ3DJ,KAR2D,CAK9DI,gBAL8D;AAAA,MAM9DC,2BAN8D,GAQ3DL,KAR2D,CAM9DK,2BAN8D;AAAA,2BAQ3DL,KAR2D,CAO9DM,WAP8D;AAAA,MAO9DA,WAP8D,mCAOhD,KAPgD;AAS/D,MAAMC,SAAS,GAAG,4BAAG,YAAH,EAAiB;AAClC,8CAA0CF,2BADR;AAElC,kCAA8B,CAACF,aAFG;AAGlC,qCAAiC,CAACC;AAHA,GAAjB,CAAlB;AAKA,SACC;AAAK,IAAA,SAAS,EAAEG;AAAhB,KACEL,WAAW,GACX,gCAAC,uBAAD;AAAa,IAAA,WAAW,EAAEI;AAA1B,KAAwCL,QAAxC,CADW,GAGXA,QAJF,CADD;AASA,CAvBD;;AAyBAF,QAAQ,CAACS,WAAT,GAAuB,WAAvB;AACAT,QAAQ,CAACU,YAAT,GAAwB;AACvBP,EAAAA,WAAW,EAAE,IADU;AAEvBG,EAAAA,2BAA2B,EAAE,KAFN;AAGvBF,EAAAA,aAAa,EAAE,IAHQ;AAIvBC,EAAAA,gBAAgB,EAAE;AAJK,CAAxB;eAOeL,Q","sourcesContent":["import React from 'react'\nimport cx from 'classnames'\nimport CardSection from './CardSection'\n\n// Card Body\nexport interface ICardBodyProps {\n\t/** Children to show in the Card */\n\tchildren?: React.ReactNode\n\n\t/** Whether to wrap children in CardSection */\n\tisSectioned?: boolean\n\n\t/** Set true to display line separators between CardSection components */\n\tareSectionSeparatorsVisible?: boolean\n\n\t/** Does card include top padding */\n\thasTopPadding?: boolean\n\n\t/** Does card include bottom padding */\n\thasBottomPadding?: boolean\n\n\t/** Set to true to remove horizontal padding */\n\tisFullBleed?: boolean\n}\n\nconst CardBody = (props: ICardBodyProps): React.ReactElement => {\n\tconst {\n\t\tchildren,\n\t\tisSectioned,\n\t\thasTopPadding,\n\t\thasBottomPadding,\n\t\tareSectionSeparatorsVisible,\n\t\tisFullBleed = false\n\t} = props\n\tconst className = cx('card__body', {\n\t\t'card__body--section-separators-visible': areSectionSeparatorsVisible,\n\t\t'card__body--no-top-padding': !hasTopPadding,\n\t\t'card__body--no-bottom-padding': !hasBottomPadding\n\t})\n\treturn (\n\t\t<div className={className}>\n\t\t\t{isSectioned ? (\n\t\t\t\t<CardSection isFullBleed={isFullBleed}>{children}</CardSection>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nCardBody.displayName = 'Card.Body'\nCardBody.defaultProps = {\n\tisSectioned: true,\n\tareSectionSeparatorsVisible: false,\n\thasTopPadding: true,\n\thasBottomPadding: true\n}\n\nexport default CardBody\n"],"file":"CardBody.js"}
@@ -0,0 +1,50 @@
1
+ import { IHWAction, IHWCardBuilder, IHWCardBuilderBody, IHWCardBuilderBodyItem, IHWCardBuilderFooter, IHWHeading, IHWScoreCard } from '@sprucelabs/spruce-types';
2
+ import React from 'react';
3
+ import { IButtonProps } from '../../Button/Button';
4
+ import { IButtonGroupProps } from '../../ButtonGroup/ButtonGroup';
5
+ import { IImageProps } from '../../Image/Image';
6
+ import { IListProps } from '../../List/List';
7
+ import { ITextProps } from '../../Text/Text';
8
+ import { IToastProps } from '../../Toast/Toast';
9
+ import { ICardHeaderProps } from './CardHeader';
10
+ import { IOnboardingCardProps } from './OnboardingCard';
11
+ export interface ICardBuilderFooter extends Omit<IHWCardBuilderFooter, 'buttonGroup'> {
12
+ /** Render buttons in the Card Footer */
13
+ buttonGroup?: IButtonGroupProps | null;
14
+ }
15
+ export declare type CardBuilderBodyItemViewModel = IButtonProps | IImageProps | IHWHeading | ITextProps | IHWScoreCard | IToastProps | IListProps;
16
+ export interface ICardBuilderBodyItem extends Omit<IHWCardBuilderBodyItem, 'viewModel'> {
17
+ viewModel: CardBuilderBodyItemViewModel;
18
+ }
19
+ export interface ICardBuilderBodyProps extends Omit<IHWCardBuilderBody, 'items'> {
20
+ /** array of items to be rendered */
21
+ items?: ICardBuilderBodyItem[];
22
+ /** optional child that will be rendered as the body */
23
+ children?: React.ReactNode;
24
+ }
25
+ export interface ICardBuilderProps extends Omit<IHWCardBuilder, 'id' | 'header' | 'onboarding' | 'body' | 'footer' | 'headerImage'> {
26
+ /** optional id for view caching */
27
+ id?: string;
28
+ /** Card Header props */
29
+ header?: ICardHeaderProps | null;
30
+ /** Image rendered as header */
31
+ headerImage?: IImageProps | null;
32
+ /** all onboarding props */
33
+ onboarding?: IOnboardingCardProps | null;
34
+ /** Card Body props */
35
+ body?: ICardBuilderBodyProps | null;
36
+ /** Card Footer props */
37
+ footer?: ICardBuilderFooter | null;
38
+ /** so we can use directly and set our own children */
39
+ children?: any;
40
+ /** optional, provide a handler for Actions */
41
+ onAction?: (action: IHWAction) => any;
42
+ }
43
+ declare const CardBuilder: {
44
+ (props: ICardBuilderProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
45
+ defaultProps: {
46
+ footer: null;
47
+ };
48
+ };
49
+ export default CardBuilder;
50
+ //# sourceMappingURL=CardBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/CardBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAoB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAE9E,OAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAItD,OAAmB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAuB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAIvE,MAAM,WAAW,kBAChB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC;IACjD,wCAAwC;IACxC,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACtC;AAED,oBAAY,4BAA4B,GACrC,YAAY,GACZ,WAAW,GACX,UAAU,GACV,UAAU,GACV,YAAY,GACZ,WAAW,GACX,UAAU,CAAA;AAEb,MAAM,WAAW,oBAChB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC;IACjD,SAAS,EAAE,4BAA4B,CAAA;CACvC;AAED,MAAM,WAAW,qBAChB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACzC,oCAAoC;IACpC,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAA;IAE9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,MAAM,WAAW,iBAChB,SAAQ,IAAI,CACX,cAAc,EACd,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,CAClE;IACD,mCAAmC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX,wBAAwB;IACxB,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAEhC,+BAA+B;IAC/B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAEhC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAExC,sBAAsB;IACtB,IAAI,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAEnC,wBAAwB;IACxB,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAElC,sDAAsD;IACtD,QAAQ,CAAC,EAAE,GAAG,CAAA;IAEd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,GAAG,CAAA;CACrC;AAyCD,QAAA,MAAM,WAAW;;;;;CA2DhB,CAAA;AAMD,eAAe,WAAW,CAAA"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _Button = _interopRequireDefault(require("../../Button/Button"));
17
+
18
+ var _ButtonGroup = _interopRequireDefault(require("../../ButtonGroup/ButtonGroup"));
19
+
20
+ var _Heading = _interopRequireDefault(require("../../Heading/Heading"));
21
+
22
+ var _Image = _interopRequireDefault(require("../../Image/Image"));
23
+
24
+ var _List = _interopRequireDefault(require("../../List/List"));
25
+
26
+ var _Text = _interopRequireDefault(require("../../Text/Text"));
27
+
28
+ var _Toast = _interopRequireDefault(require("../../Toast/Toast"));
29
+
30
+ var _Card = _interopRequireDefault(require("../Card"));
31
+
32
+ var _CardBody = _interopRequireDefault(require("./CardBody"));
33
+
34
+ var _CardFooter = _interopRequireDefault(require("./CardFooter"));
35
+
36
+ var _CardHeader = _interopRequireDefault(require("./CardHeader"));
37
+
38
+ var _OnboardingCard = _interopRequireDefault(require("./OnboardingCard"));
39
+
40
+ var _Scores = _interopRequireDefault(require("./Scores"));
41
+
42
+ var _ = require("../../..");
43
+
44
+ // COMPONENTS THAT CAN GO INTO THIS COMPONENT, KEEP MINIMAL
45
+ var renderItem = function renderItem(item, onAction) {
46
+ var CardBuilderKey = {
47
+ CardBodyButton: _Button["default"],
48
+ CardBodyImage: _Image["default"],
49
+ CardBodyHeading: _Heading["default"],
50
+ CardBodyText: _Text["default"],
51
+ CardBodyList: _List["default"],
52
+ CardBodyScores: _Scores["default"],
53
+ CardBodyToast: _Toast["default"],
54
+ button: _Button["default"],
55
+ image: _Image["default"],
56
+ heading: _Heading["default"],
57
+ text: _Text["default"],
58
+ list: _List["default"],
59
+ scoreCard: _Scores["default"],
60
+ toast: _Toast["default"]
61
+ };
62
+ var type = item.type,
63
+ viewModel = item.viewModel;
64
+ var Handler = CardBuilderKey[type];
65
+
66
+ if (!Handler) {
67
+ return _react["default"].createElement("div", null, "Could not render type $", type, ".");
68
+ }
69
+
70
+ return typeof Handler.prototype === 'undefined' || !Handler.prototype.render ? // TODO figure out why these don't pass
71
+ Handler((0, _objectSpread2["default"])({}, viewModel, {
72
+ onAction: onAction
73
+ })) : // @ts-ignore
74
+ _react["default"].createElement(Handler, (0, _extends2["default"])({}, viewModel, {
75
+ onAction: onAction
76
+ }));
77
+ };
78
+
79
+ var CardBuilder = function CardBuilder(props) {
80
+ var header = props.header,
81
+ headerImage = props.headerImage,
82
+ body = props.body,
83
+ footer = props.footer,
84
+ onboarding = props.onboarding,
85
+ onAction = props.onAction;
86
+
87
+ if (onboarding) {
88
+ return _react["default"].createElement(_OnboardingCard["default"], onboarding);
89
+ } // NOTE: Destructuring stopped working after tsx conversion
90
+
91
+
92
+ var _ref = body || {
93
+ items: undefined,
94
+ isSectioned: true,
95
+ isFullBleed: false,
96
+ areSectionSeparatorsVisible: false,
97
+ hasTopPadding: true,
98
+ hasBottomPadding: true
99
+ },
100
+ items = _ref.items,
101
+ _ref$isSectioned = _ref.isSectioned,
102
+ isSectioned = _ref$isSectioned === void 0 ? true : _ref$isSectioned,
103
+ _ref$isFullBleed = _ref.isFullBleed,
104
+ isFullBleed = _ref$isFullBleed === void 0 ? false : _ref$isFullBleed,
105
+ _ref$areSectionSepara = _ref.areSectionSeparatorsVisible,
106
+ areSectionSeparatorsVisible = _ref$areSectionSepara === void 0 ? false : _ref$areSectionSepara,
107
+ _ref$hasTopPadding = _ref.hasTopPadding,
108
+ hasTopPadding = _ref$hasTopPadding === void 0 ? true : _ref$hasTopPadding,
109
+ _ref$hasBottomPadding = _ref.hasBottomPadding,
110
+ hasBottomPadding = _ref$hasBottomPadding === void 0 ? true : _ref$hasBottomPadding;
111
+
112
+ var _ref2 = body || {
113
+ children: undefined
114
+ },
115
+ children = _ref2.children;
116
+
117
+ return _react["default"].createElement(_Card["default"], null, header && _react["default"].createElement(_CardHeader["default"], (0, _extends2["default"])({}, header, {
118
+ onAction: onAction
119
+ })), headerImage && _react["default"].createElement(_Image["default"], headerImage), (items || children) && _react["default"].createElement(_CardBody["default"], {
120
+ hasBottomPadding: hasBottomPadding === null ? true : hasBottomPadding,
121
+ hasTopPadding: hasTopPadding === null ? true : hasTopPadding,
122
+ areSectionSeparatorsVisible: areSectionSeparatorsVisible === null ? false : areSectionSeparatorsVisible,
123
+ isSectioned: !!isSectioned,
124
+ isFullBleed: !!isFullBleed
125
+ }, children, Array.isArray(items) ? (0, _.unionArray)(items).map(function (item) {
126
+ return renderItem(item, onAction);
127
+ }) : items), footer && _react["default"].createElement(_CardFooter["default"], null, footer.buttonGroup && _react["default"].createElement(_ButtonGroup["default"], (0, _extends2["default"])({}, footer.buttonGroup, {
128
+ onAction: onAction
129
+ })), footer.helper && _react["default"].createElement("div", {
130
+ className: 'card__footer__helper'
131
+ }, footer.helper)));
132
+ };
133
+
134
+ CardBuilder.defaultProps = {
135
+ footer: null
136
+ };
137
+ var _default = CardBuilder;
138
+ exports["default"] = _default;
139
+ //# sourceMappingURL=CardBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Card/components/CardBuilder.tsx"],"names":["renderItem","item","onAction","CardBuilderKey","CardBodyButton","Button","CardBodyImage","Image","CardBodyHeading","Heading","CardBodyText","Text","CardBodyList","List","CardBodyScores","Scores","CardBodyToast","Toast","button","image","heading","text","list","scoreCard","toast","type","viewModel","Handler","prototype","render","CardBuilder","props","header","headerImage","body","footer","onboarding","items","undefined","isSectioned","isFullBleed","areSectionSeparatorsVisible","hasTopPadding","hasBottomPadding","children","Array","isArray","map","buttonGroup","helper","defaultProps"],"mappings":";;;;;;;;;;;;;AASA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAdA;AA2EA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAClBC,IADkB,EAElBC,QAFkB,EAGM;AACxB,MAAMC,cAAc,GAAG;AACtBC,IAAAA,cAAc,EAAEC,kBADM;AAEtBC,IAAAA,aAAa,EAAEC,iBAFO;AAGtBC,IAAAA,eAAe,EAAEC,mBAHK;AAItBC,IAAAA,YAAY,EAAEC,gBAJQ;AAKtBC,IAAAA,YAAY,EAAEC,gBALQ;AAMtBC,IAAAA,cAAc,EAAEC,kBANM;AAOtBC,IAAAA,aAAa,EAAEC,iBAPO;AAQtBC,IAAAA,MAAM,EAAEb,kBARc;AAStBc,IAAAA,KAAK,EAAEZ,iBATe;AAUtBa,IAAAA,OAAO,EAAEX,mBAVa;AAWtBY,IAAAA,IAAI,EAAEV,gBAXgB;AAYtBW,IAAAA,IAAI,EAAET,gBAZgB;AAatBU,IAAAA,SAAS,EAAER,kBAbW;AActBS,IAAAA,KAAK,EAAEP;AAde,GAAvB;AADwB,MAkBhBQ,IAlBgB,GAkBIxB,IAlBJ,CAkBhBwB,IAlBgB;AAAA,MAkBVC,SAlBU,GAkBIzB,IAlBJ,CAkBVyB,SAlBU;AAmBxB,MAAMC,OAAO,GAAGxB,cAAc,CAACsB,IAAD,CAA9B;;AAEA,MAAI,CAACE,OAAL,EAAc;AACb,WAAO,wEAA6BF,IAA7B,MAAP;AACA;;AAED,SAAO,OAAOE,OAAO,CAACC,SAAf,KAA6B,WAA7B,IACN,CAACD,OAAO,CAACC,SAAR,CAAkBC,MADb,GAEN;AAEAF,EAAAA,OAAO,oCAAMD,SAAN;AAAiBxB,IAAAA,QAAQ,EAARA;AAAjB,KAJD,GAMN;AACA,kCAAC,OAAD,gCAAawB,SAAb;AAAwB,IAAA,QAAQ,EAAExB;AAAlC,KAPD;AASA,CArCD;;AAuCA,IAAM4B,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAkD;AAAA,MAC7DC,MAD6D,GACDD,KADC,CAC7DC,MAD6D;AAAA,MACrDC,WADqD,GACDF,KADC,CACrDE,WADqD;AAAA,MACxCC,IADwC,GACDH,KADC,CACxCG,IADwC;AAAA,MAClCC,MADkC,GACDJ,KADC,CAClCI,MADkC;AAAA,MAC1BC,UAD0B,GACDL,KADC,CAC1BK,UAD0B;AAAA,MACdlC,QADc,GACD6B,KADC,CACd7B,QADc;;AAErE,MAAIkC,UAAJ,EAAgB;AACf,WAAO,gCAAC,0BAAD,EAAoBA,UAApB,CAAP;AACA,GAJoE,CAMrE;;;AANqE,aAcjEF,IAAI,IAAI;AACXG,IAAAA,KAAK,EAAEC,SADI;AAEXC,IAAAA,WAAW,EAAE,IAFF;AAGXC,IAAAA,WAAW,EAAE,KAHF;AAIXC,IAAAA,2BAA2B,EAAE,KAJlB;AAKXC,IAAAA,aAAa,EAAE,IALJ;AAMXC,IAAAA,gBAAgB,EAAE;AANP,GAdyD;AAAA,MAQpEN,KARoE,QAQpEA,KARoE;AAAA,8BASpEE,WAToE;AAAA,MASpEA,WAToE,iCAStD,IATsD;AAAA,8BAUpEC,WAVoE;AAAA,MAUpEA,WAVoE,iCAUtD,KAVsD;AAAA,mCAWpEC,2BAXoE;AAAA,MAWpEA,2BAXoE,sCAWtC,KAXsC;AAAA,gCAYpEC,aAZoE;AAAA,MAYpEA,aAZoE,mCAYpD,IAZoD;AAAA,mCAapEC,gBAboE;AAAA,MAapEA,gBAboE,sCAajD,IAbiD;;AAAA,cAuB/CT,IAAD,IAA+B;AAAEU,IAAAA,QAAQ,EAAEN;AAAZ,GAvBiB;AAAA,MAuB7DM,QAvB6D,SAuB7DA,QAvB6D;;AAyBrE,SACC,gCAAC,gBAAD,QACEZ,MAAM,IAAI,gCAAC,sBAAD,gCAAgBA,MAAhB;AAAwB,IAAA,QAAQ,EAAE9B;AAAlC,KADZ,EAEE+B,WAAW,IAAI,gCAAC,iBAAD,EAAWA,WAAX,CAFjB,EAGE,CAACI,KAAK,IAAIO,QAAV,KACA,gCAAC,oBAAD;AACC,IAAA,gBAAgB,EAAED,gBAAgB,KAAK,IAArB,GAA4B,IAA5B,GAAmCA,gBADtD;AAEC,IAAA,aAAa,EAAED,aAAa,KAAK,IAAlB,GAAyB,IAAzB,GAAgCA,aAFhD;AAGC,IAAA,2BAA2B,EAC1BD,2BAA2B,KAAK,IAAhC,GACG,KADH,GAEGA,2BANL;AAQC,IAAA,WAAW,EAAE,CAAC,CAACF,WARhB;AASC,IAAA,WAAW,EAAE,CAAC,CAACC;AAThB,KAWEI,QAXF,EAYEC,KAAK,CAACC,OAAN,CAAcT,KAAd,IACE,kBAAWA,KAAX,EAAkBU,GAAlB,CAAsB,UAAA9C,IAAI;AAAA,WAAID,UAAU,CAACC,IAAD,EAAOC,QAAP,CAAd;AAAA,GAA1B,CADF,GAEEmC,KAdJ,CAJF,EAqBEF,MAAM,IACN,gCAAC,sBAAD,QACEA,MAAM,CAACa,WAAP,IACA,gCAAC,uBAAD,gCAAiBb,MAAM,CAACa,WAAxB;AAAqC,IAAA,QAAQ,EAAE9C;AAA/C,KAFF,EAIEiC,MAAM,CAACc,MAAP,IACA;AAAK,IAAA,SAAS,EAAE;AAAhB,KAAyCd,MAAM,CAACc,MAAhD,CALF,CAtBF,CADD;AAkCA,CA3DD;;AA6DAnB,WAAW,CAACoB,YAAZ,GAA2B;AAC1Bf,EAAAA,MAAM,EAAE;AADkB,CAA3B;eAIeL,W","sourcesContent":["import {\n\tIHWAction,\n\tIHWCardBuilder,\n\tIHWCardBuilderBody,\n\tIHWCardBuilderBodyItem,\n\tIHWCardBuilderFooter,\n\tIHWHeading,\n\tIHWScoreCard\n} from '@sprucelabs/spruce-types'\nimport React from 'react'\n// COMPONENTS THAT CAN GO INTO THIS COMPONENT, KEEP MINIMAL\nimport Button, { IButtonProps } from '../../Button/Button'\nimport ButtonGroup, { IButtonGroupProps } from '../../ButtonGroup/ButtonGroup'\nimport Heading from '../../Heading/Heading'\nimport Image, { IImageProps } from '../../Image/Image'\nimport List, { IListProps } from '../../List/List'\nimport Text, { ITextProps } from '../../Text/Text'\nimport Toast, { IToastProps } from '../../Toast/Toast'\nimport Card from '../Card'\nimport CardBody from './CardBody'\nimport CardFooter from './CardFooter'\nimport CardHeader, { ICardHeaderProps } from './CardHeader'\nimport OnboardingCard, { IOnboardingCardProps } from './OnboardingCard'\nimport Scores from './Scores'\nimport { unionArray } from '../../..'\n\nexport interface ICardBuilderFooter\n\textends Omit<IHWCardBuilderFooter, 'buttonGroup'> {\n\t/** Render buttons in the Card Footer */\n\tbuttonGroup?: IButtonGroupProps | null\n}\n\nexport type CardBuilderBodyItemViewModel =\n\t| IButtonProps\n\t| IImageProps\n\t| IHWHeading\n\t| ITextProps\n\t| IHWScoreCard\n\t| IToastProps\n\t| IListProps\n\nexport interface ICardBuilderBodyItem\n\textends Omit<IHWCardBuilderBodyItem, 'viewModel'> {\n\tviewModel: CardBuilderBodyItemViewModel\n}\n\nexport interface ICardBuilderBodyProps\n\textends Omit<IHWCardBuilderBody, 'items'> {\n\t/** array of items to be rendered */\n\titems?: ICardBuilderBodyItem[]\n\n\t/** optional child that will be rendered as the body */\n\tchildren?: React.ReactNode\n}\n\nexport interface ICardBuilderProps\n\textends Omit<\n\t\tIHWCardBuilder,\n\t\t'id' | 'header' | 'onboarding' | 'body' | 'footer' | 'headerImage'\n\t> {\n\t/** optional id for view caching */\n\tid?: string\n\n\t/** Card Header props */\n\theader?: ICardHeaderProps | null\n\n\t/** Image rendered as header */\n\theaderImage?: IImageProps | null\n\n\t/** all onboarding props */\n\tonboarding?: IOnboardingCardProps | null\n\n\t/** Card Body props */\n\tbody?: ICardBuilderBodyProps | null\n\n\t/** Card Footer props */\n\tfooter?: ICardBuilderFooter | null\n\n\t/** so we can use directly and set our own children */\n\tchildren?: any\n\n\t/** optional, provide a handler for Actions */\n\tonAction?: (action: IHWAction) => any\n}\n\nconst renderItem = (\n\titem: ICardBuilderBodyItem | IHWCardBuilderBodyItem,\n\tonAction?: (action: IHWAction) => any\n): React.ReactElement => {\n\tconst CardBuilderKey = {\n\t\tCardBodyButton: Button,\n\t\tCardBodyImage: Image,\n\t\tCardBodyHeading: Heading,\n\t\tCardBodyText: Text,\n\t\tCardBodyList: List,\n\t\tCardBodyScores: Scores,\n\t\tCardBodyToast: Toast,\n\t\tbutton: Button,\n\t\timage: Image,\n\t\theading: Heading,\n\t\ttext: Text,\n\t\tlist: List,\n\t\tscoreCard: Scores,\n\t\ttoast: Toast\n\t}\n\n\tconst { type, viewModel } = item\n\tconst Handler = CardBuilderKey[type]\n\n\tif (!Handler) {\n\t\treturn <div>Could not render type ${type}.</div>\n\t}\n\n\treturn typeof Handler.prototype === 'undefined' ||\n\t\t!Handler.prototype.render ? (\n\t\t// TODO figure out why these don't pass\n\t\t// @ts-ignore\n\t\tHandler({ ...viewModel, onAction })\n\t) : (\n\t\t// @ts-ignore\n\t\t<Handler {...viewModel} onAction={onAction} />\n\t)\n}\n\nconst CardBuilder = (props: ICardBuilderProps): React.ReactElement => {\n\tconst { header, headerImage, body, footer, onboarding, onAction } = props\n\tif (onboarding) {\n\t\treturn <OnboardingCard {...onboarding} />\n\t}\n\n\t// NOTE: Destructuring stopped working after tsx conversion\n\tconst {\n\t\titems,\n\t\tisSectioned = true,\n\t\tisFullBleed = false,\n\t\tareSectionSeparatorsVisible = false,\n\t\thasTopPadding = true,\n\t\thasBottomPadding = true\n\t} = body || {\n\t\titems: undefined,\n\t\tisSectioned: true,\n\t\tisFullBleed: false,\n\t\tareSectionSeparatorsVisible: false,\n\t\thasTopPadding: true,\n\t\thasBottomPadding: true\n\t}\n\n\tconst { children } = (body as ICardBuilderProps) || { children: undefined }\n\n\treturn (\n\t\t<Card>\n\t\t\t{header && <CardHeader {...header} onAction={onAction} />}\n\t\t\t{headerImage && <Image {...headerImage} />}\n\t\t\t{(items || children) && (\n\t\t\t\t<CardBody\n\t\t\t\t\thasBottomPadding={hasBottomPadding === null ? true : hasBottomPadding}\n\t\t\t\t\thasTopPadding={hasTopPadding === null ? true : hasTopPadding}\n\t\t\t\t\tareSectionSeparatorsVisible={\n\t\t\t\t\t\tareSectionSeparatorsVisible === null\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: areSectionSeparatorsVisible\n\t\t\t\t\t}\n\t\t\t\t\tisSectioned={!!isSectioned}\n\t\t\t\t\tisFullBleed={!!isFullBleed}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t\t{Array.isArray(items)\n\t\t\t\t\t\t? unionArray(items).map(item => renderItem(item, onAction))\n\t\t\t\t\t\t: items}\n\t\t\t\t</CardBody>\n\t\t\t)}\n\t\t\t{footer && (\n\t\t\t\t<CardFooter>\n\t\t\t\t\t{footer.buttonGroup && (\n\t\t\t\t\t\t<ButtonGroup {...footer.buttonGroup} onAction={onAction} />\n\t\t\t\t\t)}\n\t\t\t\t\t{footer.helper && (\n\t\t\t\t\t\t<div className={'card__footer__helper'}>{footer.helper}</div>\n\t\t\t\t\t)}\n\t\t\t\t</CardFooter>\n\t\t\t)}\n\t\t</Card>\n\t)\n}\n\nCardBuilder.defaultProps = {\n\tfooter: null\n}\n\nexport default CardBuilder\n"],"file":"CardBuilder.js"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface ICardFooterProps {
3
+ /** Children to show in the Card Footer */
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const CardFooter: {
7
+ (props: ICardFooterProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
8
+ displayName: string;
9
+ };
10
+ export default CardFooter;
11
+ //# sourceMappingURL=CardFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,WAAW,gBAAgB;IAChC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,UAAU;;;CAGf,CAAA;AAGD,eAAe,UAAU,CAAA"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var CardFooter = function CardFooter(props) {
13
+ var children = props.children;
14
+ return _react["default"].createElement("div", {
15
+ className: "card__footer"
16
+ }, children);
17
+ };
18
+
19
+ CardFooter.displayName = 'Card.Footer';
20
+ var _default = CardFooter;
21
+ exports["default"] = _default;
22
+ //# sourceMappingURL=CardFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Card/components/CardFooter.tsx"],"names":["CardFooter","props","children","displayName"],"mappings":";;;;;;;;;AAAA;;AAQA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAiD;AAAA,MAC3DC,QAD2D,GAC9CD,KAD8C,CAC3DC,QAD2D;AAEnE,SAAO;AAAK,IAAA,SAAS,EAAC;AAAf,KAA+BA,QAA/B,CAAP;AACA,CAHD;;AAKAF,UAAU,CAACG,WAAX,GAAyB,aAAzB;eACeH,U","sourcesContent":["import React from 'react'\n\n// Card Footer\nexport interface ICardFooterProps {\n\t/** Children to show in the Card Footer */\n\tchildren?: React.ReactNode\n}\n\nconst CardFooter = (props: ICardFooterProps): React.ReactElement => {\n\tconst { children } = props\n\treturn <div className=\"card__footer\">{children}</div>\n}\n\nCardFooter.displayName = 'Card.Footer'\nexport default CardFooter\n"],"file":"CardFooter.js"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { IIconProps } from '../../Icon/Icon';
3
+ import { IContextMenuProps } from '../../ContextMenu/ContextMenu';
4
+ import { IButtonProps } from '../../Button/Button';
5
+ import { IHWAction, IHWCardHeader } from '@sprucelabs/spruce-types';
6
+ export interface ICardHeaderProps extends Omit<IHWCardHeader, 'labelIcon' | 'actions' | 'contextMenu'> {
7
+ /** Optional icon to show above the title and before the label */
8
+ labelIcon?: IIconProps | null;
9
+ /** Render buttons in the Card Header */
10
+ actions?: IButtonProps[] | null;
11
+ /** Renders a Context Menu in the Card Header */
12
+ contextMenu?: IContextMenuProps | null;
13
+ /** optional, provide a handler for Actions */
14
+ onAction?: (action: IHWAction) => any;
15
+ }
16
+ declare const CardHeader: {
17
+ (props: IHWCardHeader | ICardHeaderProps): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
18
+ displayName: string;
19
+ defaultProps: {
20
+ title: string;
21
+ labelText: string;
22
+ labelIcon: null;
23
+ headerActions: never[];
24
+ contextMenu: null;
25
+ };
26
+ };
27
+ export default CardHeader;
28
+ //# sourceMappingURL=CardHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAoB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAGnE,MAAM,WAAW,gBAChB,SAAQ,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;IACpE,iEAAiE;IACjE,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IAE7B,wCAAwC;IACxC,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IAE/B,gDAAgD;IAChD,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAEtC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,GAAG,CAAA;CACrC;AAED,QAAA,MAAM,UAAU;;;;;;;;;;CAqDf,CAAA;AAWD,eAAe,UAAU,CAAA"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _react = _interopRequireWildcard(require("react"));
15
+
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
18
+ var _Button = _interopRequireWildcard(require("../../Button/Button"));
19
+
20
+ var _Icon = _interopRequireDefault(require("../../Icon/Icon"));
21
+
22
+ var _ContextMenu = _interopRequireDefault(require("../../ContextMenu/ContextMenu"));
23
+
24
+ var CardHeader = function CardHeader(props) {
25
+ var reactHeartwoodProps = props;
26
+ var commonProps = props;
27
+ var title = commonProps.title,
28
+ labelText = commonProps.labelText,
29
+ actions = commonProps.actions,
30
+ contextMenu = commonProps.contextMenu;
31
+ var labelIcon = reactHeartwoodProps.labelIcon,
32
+ onAction = reactHeartwoodProps.onAction;
33
+ return _react["default"].createElement("div", {
34
+ className: "card__header"
35
+ }, (title || labelText || labelIcon) && _react["default"].createElement("div", {
36
+ className: "card__header-text"
37
+ }, (labelText || labelIcon) && _react["default"].createElement("div", {
38
+ className: "card__header-label"
39
+ }, labelIcon && _react["default"].createElement(_Icon["default"], {
40
+ customIcon: labelIcon.customIcon ? labelIcon.customIcon : undefined,
41
+ name: labelIcon.name,
42
+ isLineIcon: labelIcon.isLineIcon,
43
+ className: (0, _classnames["default"])('card__header-label-icon', labelIcon.className)
44
+ }), labelText && _react["default"].createElement("span", {
45
+ className: "card__header-label-text"
46
+ }, labelText)), title && _react["default"].createElement("h3", {
47
+ className: "card__title"
48
+ }, title)), (actions || contextMenu) && _react["default"].createElement("div", {
49
+ className: "card__header-actions"
50
+ }, _react["default"].createElement(_react.Fragment, null, actions && actions.length > 0 && actions.map(function (action) {
51
+ return _react["default"].createElement(_Button["default"], (0, _extends2["default"])({
52
+ key: action.id,
53
+ kind: _Button.ButtonKinds.Simple,
54
+ isSmall: true,
55
+ onAction: onAction
56
+ }, action));
57
+ }), contextMenu && _react["default"].createElement(_ContextMenu["default"], contextMenu))));
58
+ };
59
+
60
+ CardHeader.displayName = 'Card.Header';
61
+ CardHeader.defaultProps = {
62
+ title: '',
63
+ labelText: '',
64
+ labelIcon: null,
65
+ headerActions: [],
66
+ contextMenu: null
67
+ };
68
+ var _default = CardHeader;
69
+ exports["default"] = _default;
70
+ //# sourceMappingURL=CardHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Card/components/CardHeader.tsx"],"names":["CardHeader","props","reactHeartwoodProps","commonProps","title","labelText","actions","contextMenu","labelIcon","onAction","customIcon","undefined","name","isLineIcon","className","length","map","action","id","ButtonKinds","Simple","displayName","defaultProps","headerActions"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAqBA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAClBC,KADkB,EAEM;AACxB,MAAMC,mBAAmB,GAAGD,KAA5B;AACA,MAAME,WAAW,GAAGF,KAApB;AAFwB,MAIhBG,KAJgB,GAI2BD,WAJ3B,CAIhBC,KAJgB;AAAA,MAITC,SAJS,GAI2BF,WAJ3B,CAITE,SAJS;AAAA,MAIEC,OAJF,GAI2BH,WAJ3B,CAIEG,OAJF;AAAA,MAIWC,WAJX,GAI2BJ,WAJ3B,CAIWI,WAJX;AAAA,MAKhBC,SALgB,GAKQN,mBALR,CAKhBM,SALgB;AAAA,MAKLC,QALK,GAKQP,mBALR,CAKLO,QALK;AAOxB,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACE,CAACL,KAAK,IAAIC,SAAT,IAAsBG,SAAvB,KACA;AAAK,IAAA,SAAS,EAAC;AAAf,KACE,CAACH,SAAS,IAAIG,SAAd,KACA;AAAK,IAAA,SAAS,EAAC;AAAf,KACEA,SAAS,IACT,gCAAC,gBAAD;AACC,IAAA,UAAU,EACTA,SAAS,CAACE,UAAV,GAAuBF,SAAS,CAACE,UAAjC,GAA8CC,SAFhD;AAIC,IAAA,IAAI,EAAEH,SAAS,CAACI,IAJjB;AAKC,IAAA,UAAU,EAAEJ,SAAS,CAACK,UALvB;AAMC,IAAA,SAAS,EAAE,4BAAG,yBAAH,EAA8BL,SAAS,CAACM,SAAxC;AANZ,IAFF,EAWET,SAAS,IACT;AAAM,IAAA,SAAS,EAAC;AAAhB,KAA2CA,SAA3C,CAZF,CAFF,EAkBED,KAAK,IAAI;AAAI,IAAA,SAAS,EAAC;AAAd,KAA6BA,KAA7B,CAlBX,CAFF,EAuBE,CAACE,OAAO,IAAIC,WAAZ,KACA;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,gCAAC,eAAD,QACED,OAAO,IACPA,OAAO,CAACS,MAAR,GAAiB,CADjB,IAEAT,OAAO,CAACU,GAAR,CAAY,UAAAC,MAAM;AAAA,WACjB,gCAAC,kBAAD;AACC,MAAA,GAAG,EAAEA,MAAM,CAACC,EADb;AAEC,MAAA,IAAI,EAAEC,oBAAYC,MAFnB;AAGC,MAAA,OAAO,MAHR;AAIC,MAAA,QAAQ,EAAEX;AAJX,OAKKQ,MALL,EADiB;AAAA,GAAlB,CAHF,EAYEV,WAAW,IAAI,gCAAC,uBAAD,EAAiBA,WAAjB,CAZjB,CADD,CAxBF,CADD;AA4CA,CArDD;;AAuDAP,UAAU,CAACqB,WAAX,GAAyB,aAAzB;AACArB,UAAU,CAACsB,YAAX,GAA0B;AACzBlB,EAAAA,KAAK,EAAE,EADkB;AAEzBC,EAAAA,SAAS,EAAE,EAFc;AAGzBG,EAAAA,SAAS,EAAE,IAHc;AAIzBe,EAAAA,aAAa,EAAE,EAJU;AAKzBhB,EAAAA,WAAW,EAAE;AALY,CAA1B;eAQeP,U","sourcesContent":["import React, { Fragment } from 'react'\nimport cx from 'classnames'\nimport Button, { ButtonKinds } from '../../Button/Button'\nimport Icon, { IIconProps } from '../../Icon/Icon'\nimport ContextMenu, { IContextMenuProps } from '../../ContextMenu/ContextMenu'\n\nimport { IButtonProps } from '../../Button/Button'\nimport { IHWAction, IHWCardHeader } from '@sprucelabs/spruce-types'\n\n// Card Header\nexport interface ICardHeaderProps\n\textends Omit<IHWCardHeader, 'labelIcon' | 'actions' | 'contextMenu'> {\n\t/** Optional icon to show above the title and before the label */\n\tlabelIcon?: IIconProps | null\n\n\t/** Render buttons in the Card Header */\n\tactions?: IButtonProps[] | null\n\n\t/** Renders a Context Menu in the Card Header */\n\tcontextMenu?: IContextMenuProps | null\n\n\t/** optional, provide a handler for Actions */\n\tonAction?: (action: IHWAction) => any\n}\n\nconst CardHeader = (\n\tprops: ICardHeaderProps | IHWCardHeader\n): React.ReactElement => {\n\tconst reactHeartwoodProps = props as ICardHeaderProps\n\tconst commonProps = props as IHWCardHeader\n\n\tconst { title, labelText, actions, contextMenu } = commonProps\n\tconst { labelIcon, onAction } = reactHeartwoodProps\n\n\treturn (\n\t\t<div className=\"card__header\">\n\t\t\t{(title || labelText || labelIcon) && (\n\t\t\t\t<div className=\"card__header-text\">\n\t\t\t\t\t{(labelText || labelIcon) && (\n\t\t\t\t\t\t<div className=\"card__header-label\">\n\t\t\t\t\t\t\t{labelIcon && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tcustomIcon={\n\t\t\t\t\t\t\t\t\t\tlabelIcon.customIcon ? labelIcon.customIcon : undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tname={labelIcon.name}\n\t\t\t\t\t\t\t\t\tisLineIcon={labelIcon.isLineIcon}\n\t\t\t\t\t\t\t\t\tclassName={cx('card__header-label-icon', labelIcon.className)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{labelText && (\n\t\t\t\t\t\t\t\t<span className=\"card__header-label-text\">{labelText}</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{title && <h3 className=\"card__title\">{title}</h3>}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{(actions || contextMenu) && (\n\t\t\t\t<div className=\"card__header-actions\">\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{actions &&\n\t\t\t\t\t\t\tactions.length > 0 &&\n\t\t\t\t\t\t\tactions.map(action => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={action.id}\n\t\t\t\t\t\t\t\t\tkind={ButtonKinds.Simple}\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\tonAction={onAction}\n\t\t\t\t\t\t\t\t\t{...action}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t{contextMenu && <ContextMenu {...contextMenu} />}\n\t\t\t\t\t</Fragment>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nCardHeader.displayName = 'Card.Header'\nCardHeader.defaultProps = {\n\ttitle: '',\n\tlabelText: '',\n\tlabelIcon: null,\n\theaderActions: [],\n\tcontextMenu: null\n}\n\nexport default CardHeader\n"],"file":"CardHeader.js"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface ICardSectionProps {
3
+ /** Children to show in the Card */
4
+ children?: React.ReactNode;
5
+ /** Set to true to remove horizontal padding */
6
+ isFullBleed?: boolean;
7
+ }
8
+ declare const CardSection: (props: ICardSectionProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
9
+ export default CardSection;
10
+ //# sourceMappingURL=CardSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardSection.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/CardSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,iBAAiB;IACjC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,QAAA,MAAM,WAAW,8OAMhB,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var CardSection = function CardSection(props) {
15
+ var children = props.children,
16
+ isFullBleed = props.isFullBleed;
17
+ var className = (0, _classnames["default"])('card__section', {
18
+ 'card__section--full-bleed': isFullBleed
19
+ });
20
+ return _react["default"].createElement("div", {
21
+ className: className
22
+ }, children);
23
+ };
24
+
25
+ var _default = CardSection;
26
+ exports["default"] = _default;
27
+ //# sourceMappingURL=CardSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Card/components/CardSection.tsx"],"names":["CardSection","props","children","isFullBleed","className"],"mappings":";;;;;;;;;AAAA;;AAEA;;AAWA,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAAkD;AAAA,MAC7DC,QAD6D,GACnCD,KADmC,CAC7DC,QAD6D;AAAA,MACnDC,WADmD,GACnCF,KADmC,CACnDE,WADmD;AAErE,MAAMC,SAAS,GAAG,4BAAG,eAAH,EAAoB;AACrC,iCAA6BD;AADQ,GAApB,CAAlB;AAGA,SAAO;AAAK,IAAA,SAAS,EAAEC;AAAhB,KAA4BF,QAA5B,CAAP;AACA,CAND;;eAQeF,W","sourcesContent":["import React from 'react'\n\nimport cx from 'classnames'\n\n// Card Section\nexport interface ICardSectionProps {\n\t/** Children to show in the Card */\n\tchildren?: React.ReactNode\n\n\t/** Set to true to remove horizontal padding */\n\tisFullBleed?: boolean\n}\n\nconst CardSection = (props: ICardSectionProps): React.ReactElement => {\n\tconst { children, isFullBleed } = props\n\tconst className = cx('card__section', {\n\t\t'card__section--full-bleed': isFullBleed\n\t})\n\treturn <div className={className}>{children}</div>\n}\n\nexport default CardSection\n"],"file":"CardSection.js"}
@@ -0,0 +1,27 @@
1
+ import React, { Component } from 'react';
2
+ import { IButtonProps } from '../../Button/Button';
3
+ import { IHWOnboardingCard, IHWOnboardingCardStep } from '@sprucelabs/spruce-types';
4
+ import { IIconProps } from '../../Icon/Icon';
5
+ export interface IStep extends Omit<IHWOnboardingCardStep, 'panelCTA' | 'tabIcon'> {
6
+ /** Primary CTA of this step */
7
+ panelCTA?: IButtonProps | null;
8
+ tabIcon?: IIconProps | null;
9
+ }
10
+ export interface IOnboardingCardProps extends Omit<IHWOnboardingCard, 'steps'> {
11
+ /** Steps for onboarding */
12
+ steps: IStep[];
13
+ /** Optional class to add */
14
+ className?: string;
15
+ }
16
+ interface IOnboardingCardState {
17
+ currentStep: number;
18
+ }
19
+ export default class OnboardingCard extends Component<IOnboardingCardProps | IHWOnboardingCard, IOnboardingCardState> {
20
+ state: {
21
+ currentStep: number;
22
+ };
23
+ handleClick: (idx: number) => void;
24
+ render(): React.ReactElement;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=OnboardingCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/components/OnboardingCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMxC,OAAe,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAA;AACvE,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAG5C,MAAM,WAAW,KAChB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,UAAU,GAAG,SAAS,CAAC;IAC3D,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAE9B,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC7E,2BAA2B;IAC3B,KAAK,EAAE,KAAK,EAAE,CAAA;IAEd,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,oBAAoB;IAC7B,WAAW,EAAE,MAAM,CAAA;CACnB;AAcD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CACpD,oBAAoB,GAAG,iBAAiB,EACxC,oBAAoB,CACpB;IACO,KAAK;;MAEX;IAEM,WAAW,wBAIjB;IAEM,MAAM,IAAI,KAAK,CAAC,YAAY;CAgCnC"}