@elliemae/ds-chat 2.2.0-alpha.4 → 3.0.0-next.2

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 (281) hide show
  1. package/cjs/ChatDataTestids.js +26 -54
  2. package/cjs/index.d.js +2 -27
  3. package/cjs/index.js +44 -69
  4. package/cjs/parts/bubble/ChatBubble.js +64 -74
  5. package/cjs/parts/bubble/ChatBubbleArrow.js +79 -96
  6. package/cjs/parts/bubble/config/useValidateProps.js +24 -47
  7. package/cjs/parts/bubble/index.js +12 -38
  8. package/cjs/parts/bubble/props.js +48 -60
  9. package/cjs/parts/bubble/styled.js +48 -141
  10. package/cjs/parts/chat-card/ChatCard.js +39 -55
  11. package/cjs/parts/chat-card/config/useValidateProps.js +9 -36
  12. package/cjs/parts/chat-card/index.js +10 -36
  13. package/cjs/parts/chat-card/props.js +12 -39
  14. package/cjs/parts/chat-card/styled.js +36 -71
  15. package/cjs/parts/chat-composer/ChatContainerComposer.js +98 -92
  16. package/cjs/parts/chat-composer/config/useValidateProps.js +9 -36
  17. package/cjs/parts/chat-composer/index.js +10 -36
  18. package/cjs/parts/chat-composer/props.js +36 -73
  19. package/cjs/parts/chat-composer/styled.js +34 -102
  20. package/cjs/parts/chat-container/ChatContainer.js +140 -122
  21. package/cjs/parts/chat-container/config/useValidateProps.js +9 -36
  22. package/cjs/parts/chat-container/index.js +10 -36
  23. package/cjs/parts/chat-container/props.js +42 -85
  24. package/cjs/parts/chat-container/styled.js +23 -104
  25. package/cjs/parts/chat-container-header/ChatContainerHeader.js +30 -48
  26. package/cjs/parts/chat-container-header/helpers.js +25 -38
  27. package/cjs/parts/chat-container-header/styled.js +24 -59
  28. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +225 -163
  29. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +9 -36
  30. package/cjs/parts/chat-container-messages-list/index.js +10 -36
  31. package/cjs/parts/chat-container-messages-list/props.js +24 -62
  32. package/cjs/parts/chat-container-messages-list/styled.js +38 -100
  33. package/cjs/parts/chat-empty-state/ChatEmptyState.js +42 -58
  34. package/cjs/parts/chat-empty-state/config/useValidateProps.js +9 -36
  35. package/cjs/parts/chat-empty-state/props.js +12 -39
  36. package/cjs/parts/chat-empty-state/styled.js +21 -47
  37. package/cjs/parts/chat-sidebar/SideBarChat.js +81 -82
  38. package/cjs/parts/chat-sidebar/config/useValidateProps.js +9 -36
  39. package/cjs/parts/chat-sidebar/index.js +10 -36
  40. package/cjs/parts/chat-sidebar/props.js +30 -72
  41. package/cjs/parts/chat-sidebar/styled.js +20 -56
  42. package/cjs/parts/floating-button/FloatingButton.js +34 -47
  43. package/cjs/parts/floating-button/index.js +9 -28
  44. package/cjs/parts/floating-button/props.js +15 -42
  45. package/cjs/parts/floating-button/styled.js +17 -63
  46. package/cjs/parts/floating-container/styled.js +17 -47
  47. package/cjs/parts/grid-influencer/InfluencerContainer.js +21 -41
  48. package/cjs/parts/grid-influencer/styled.js +21 -56
  49. package/cjs/parts/message-delimiter/MessageDelimiter.js +39 -53
  50. package/cjs/parts/message-delimiter/config/useValidateProps.js +9 -36
  51. package/cjs/parts/message-delimiter/index.js +10 -36
  52. package/cjs/parts/message-delimiter/props.js +19 -44
  53. package/cjs/parts/message-delimiter/styled.js +24 -53
  54. package/cjs/parts/sidebar-button/SidebarButton.js +53 -52
  55. package/cjs/parts/sidebar-button/index.js +2 -20
  56. package/cjs/parts/sidebar-button/props.js +26 -49
  57. package/cjs/parts/sidebar-button/styled.js +24 -68
  58. package/cjs/parts/system-message/SystemMessage.js +40 -55
  59. package/cjs/parts/system-message/config/useValidateProps.js +9 -36
  60. package/cjs/parts/system-message/index.js +10 -36
  61. package/cjs/parts/system-message/props.js +15 -42
  62. package/cjs/parts/system-message/style.js +32 -75
  63. package/cjs/parts/tile-button/TileButton.js +68 -98
  64. package/cjs/parts/tile-button/config/useValidateProps.js +9 -36
  65. package/cjs/parts/tile-button/index.js +10 -36
  66. package/cjs/parts/tile-button/props.js +45 -83
  67. package/cjs/parts/tile-button/styled.js +77 -229
  68. package/cjs/prop-types.js +26 -53
  69. package/cjs/styled.js +14 -42
  70. package/esm/ChatDataTestids.js +22 -25
  71. package/esm/index.d.js +1 -2
  72. package/esm/index.js +14 -40
  73. package/esm/parts/bubble/ChatBubble.js +51 -51
  74. package/esm/parts/bubble/ChatBubbleArrow.js +71 -67
  75. package/esm/parts/bubble/config/useValidateProps.js +19 -17
  76. package/esm/parts/bubble/index.js +2 -9
  77. package/esm/parts/bubble/props.js +36 -30
  78. package/esm/parts/bubble/styled.js +32 -112
  79. package/esm/parts/chat-card/ChatCard.js +27 -23
  80. package/esm/parts/chat-card/config/useValidateProps.js +4 -6
  81. package/esm/parts/chat-card/index.js +1 -7
  82. package/esm/parts/chat-card/props.js +8 -10
  83. package/esm/parts/chat-card/styled.js +23 -42
  84. package/esm/parts/chat-composer/ChatContainerComposer.js +83 -65
  85. package/esm/parts/chat-composer/config/useValidateProps.js +4 -6
  86. package/esm/parts/chat-composer/index.js +1 -7
  87. package/esm/parts/chat-composer/props.js +24 -37
  88. package/esm/parts/chat-composer/styled.js +22 -73
  89. package/esm/parts/chat-container/ChatContainer.js +122 -88
  90. package/esm/parts/chat-container/config/useValidateProps.js +4 -6
  91. package/esm/parts/chat-container/index.js +1 -7
  92. package/esm/parts/chat-container/props.js +31 -52
  93. package/esm/parts/chat-container/styled.js +16 -79
  94. package/esm/parts/chat-container-header/ChatContainerHeader.js +21 -22
  95. package/esm/parts/chat-container-header/helpers.js +17 -9
  96. package/esm/parts/chat-container-header/styled.js +14 -30
  97. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +210 -138
  98. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +4 -6
  99. package/esm/parts/chat-container-messages-list/index.js +1 -10
  100. package/esm/parts/chat-container-messages-list/props.js +17 -31
  101. package/esm/parts/chat-container-messages-list/styled.js +25 -71
  102. package/esm/parts/chat-empty-state/ChatEmptyState.js +29 -25
  103. package/esm/parts/chat-empty-state/config/useValidateProps.js +4 -6
  104. package/esm/parts/chat-empty-state/props.js +7 -10
  105. package/esm/parts/chat-empty-state/styled.js +11 -18
  106. package/esm/parts/chat-sidebar/SideBarChat.js +67 -50
  107. package/esm/parts/chat-sidebar/config/useValidateProps.js +4 -6
  108. package/esm/parts/chat-sidebar/index.js +1 -7
  109. package/esm/parts/chat-sidebar/props.js +21 -39
  110. package/esm/parts/chat-sidebar/styled.js +11 -27
  111. package/esm/parts/floating-button/FloatingButton.js +26 -18
  112. package/esm/parts/floating-button/index.js +1 -3
  113. package/esm/parts/floating-button/props.js +8 -11
  114. package/esm/parts/floating-button/styled.js +9 -34
  115. package/esm/parts/floating-container/styled.js +9 -18
  116. package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
  117. package/esm/parts/grid-influencer/styled.js +12 -27
  118. package/esm/parts/message-delimiter/MessageDelimiter.js +26 -20
  119. package/esm/parts/message-delimiter/config/useValidateProps.js +4 -6
  120. package/esm/parts/message-delimiter/index.js +1 -10
  121. package/esm/parts/message-delimiter/props.js +14 -15
  122. package/esm/parts/message-delimiter/styled.js +14 -24
  123. package/esm/parts/sidebar-button/SidebarButton.js +41 -22
  124. package/esm/parts/sidebar-button/index.js +1 -2
  125. package/esm/parts/sidebar-button/props.js +15 -18
  126. package/esm/parts/sidebar-button/styled.js +14 -39
  127. package/esm/parts/system-message/SystemMessage.js +27 -22
  128. package/esm/parts/system-message/config/useValidateProps.js +4 -6
  129. package/esm/parts/system-message/index.js +1 -7
  130. package/esm/parts/system-message/props.js +10 -13
  131. package/esm/parts/system-message/style.js +20 -46
  132. package/esm/parts/tile-button/TileButton.js +54 -75
  133. package/esm/parts/tile-button/config/useValidateProps.js +4 -6
  134. package/esm/parts/tile-button/index.js +1 -7
  135. package/esm/parts/tile-button/props.js +33 -47
  136. package/esm/parts/tile-button/styled.js +60 -200
  137. package/esm/prop-types.js +16 -19
  138. package/esm/styled.js +5 -13
  139. package/package.json +10 -10
  140. package/cjs/ChatDataTestids.js.map +0 -7
  141. package/cjs/index.d.js.map +0 -7
  142. package/cjs/index.js.map +0 -7
  143. package/cjs/parts/bubble/ChatBubble.js.map +0 -7
  144. package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -7
  145. package/cjs/parts/bubble/config/useValidateProps.js.map +0 -7
  146. package/cjs/parts/bubble/index.js.map +0 -7
  147. package/cjs/parts/bubble/props.js.map +0 -7
  148. package/cjs/parts/bubble/styled.js.map +0 -7
  149. package/cjs/parts/chat-card/ChatCard.js.map +0 -7
  150. package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -7
  151. package/cjs/parts/chat-card/index.js.map +0 -7
  152. package/cjs/parts/chat-card/props.js.map +0 -7
  153. package/cjs/parts/chat-card/styled.js.map +0 -7
  154. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  155. package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -7
  156. package/cjs/parts/chat-composer/index.js.map +0 -7
  157. package/cjs/parts/chat-composer/props.js.map +0 -7
  158. package/cjs/parts/chat-composer/styled.js.map +0 -7
  159. package/cjs/parts/chat-container/ChatContainer.js.map +0 -7
  160. package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -7
  161. package/cjs/parts/chat-container/index.js.map +0 -7
  162. package/cjs/parts/chat-container/props.js.map +0 -7
  163. package/cjs/parts/chat-container/styled.js.map +0 -7
  164. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  165. package/cjs/parts/chat-container-header/helpers.js.map +0 -7
  166. package/cjs/parts/chat-container-header/styled.js.map +0 -7
  167. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  168. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  169. package/cjs/parts/chat-container-messages-list/index.js.map +0 -7
  170. package/cjs/parts/chat-container-messages-list/props.js.map +0 -7
  171. package/cjs/parts/chat-container-messages-list/styled.js.map +0 -7
  172. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  173. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  174. package/cjs/parts/chat-empty-state/props.js.map +0 -7
  175. package/cjs/parts/chat-empty-state/styled.js.map +0 -7
  176. package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -7
  177. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  178. package/cjs/parts/chat-sidebar/index.js.map +0 -7
  179. package/cjs/parts/chat-sidebar/props.js.map +0 -7
  180. package/cjs/parts/chat-sidebar/styled.js.map +0 -7
  181. package/cjs/parts/floating-button/FloatingButton.js.map +0 -7
  182. package/cjs/parts/floating-button/index.js.map +0 -7
  183. package/cjs/parts/floating-button/props.js.map +0 -7
  184. package/cjs/parts/floating-button/styled.js.map +0 -7
  185. package/cjs/parts/floating-container/styled.js.map +0 -7
  186. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  187. package/cjs/parts/grid-influencer/styled.js.map +0 -7
  188. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  189. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  190. package/cjs/parts/message-delimiter/index.js.map +0 -7
  191. package/cjs/parts/message-delimiter/props.js.map +0 -7
  192. package/cjs/parts/message-delimiter/styled.js.map +0 -7
  193. package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -7
  194. package/cjs/parts/sidebar-button/index.js.map +0 -7
  195. package/cjs/parts/sidebar-button/props.js.map +0 -7
  196. package/cjs/parts/sidebar-button/styled.js.map +0 -7
  197. package/cjs/parts/system-message/SystemMessage.js.map +0 -7
  198. package/cjs/parts/system-message/config/useValidateProps.js.map +0 -7
  199. package/cjs/parts/system-message/index.js.map +0 -7
  200. package/cjs/parts/system-message/props.js.map +0 -7
  201. package/cjs/parts/system-message/style.js.map +0 -7
  202. package/cjs/parts/tile-button/TileButton.js.map +0 -7
  203. package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -7
  204. package/cjs/parts/tile-button/index.js.map +0 -7
  205. package/cjs/parts/tile-button/props.js.map +0 -7
  206. package/cjs/parts/tile-button/styled.js.map +0 -7
  207. package/cjs/prop-types.js.map +0 -7
  208. package/cjs/styled.js.map +0 -7
  209. package/cjs/tests/utils.js +0 -66
  210. package/cjs/tests/utils.js.map +0 -7
  211. package/esm/ChatDataTestids.js.map +0 -7
  212. package/esm/index.d.js.map +0 -7
  213. package/esm/index.js.map +0 -7
  214. package/esm/parts/bubble/ChatBubble.js.map +0 -7
  215. package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -7
  216. package/esm/parts/bubble/config/useValidateProps.js.map +0 -7
  217. package/esm/parts/bubble/index.js.map +0 -7
  218. package/esm/parts/bubble/props.js.map +0 -7
  219. package/esm/parts/bubble/styled.js.map +0 -7
  220. package/esm/parts/chat-card/ChatCard.js.map +0 -7
  221. package/esm/parts/chat-card/config/useValidateProps.js.map +0 -7
  222. package/esm/parts/chat-card/index.js.map +0 -7
  223. package/esm/parts/chat-card/props.js.map +0 -7
  224. package/esm/parts/chat-card/styled.js.map +0 -7
  225. package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -7
  226. package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -7
  227. package/esm/parts/chat-composer/index.js.map +0 -7
  228. package/esm/parts/chat-composer/props.js.map +0 -7
  229. package/esm/parts/chat-composer/styled.js.map +0 -7
  230. package/esm/parts/chat-container/ChatContainer.js.map +0 -7
  231. package/esm/parts/chat-container/config/useValidateProps.js.map +0 -7
  232. package/esm/parts/chat-container/index.js.map +0 -7
  233. package/esm/parts/chat-container/props.js.map +0 -7
  234. package/esm/parts/chat-container/styled.js.map +0 -7
  235. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
  236. package/esm/parts/chat-container-header/helpers.js.map +0 -7
  237. package/esm/parts/chat-container-header/styled.js.map +0 -7
  238. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
  239. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
  240. package/esm/parts/chat-container-messages-list/index.js.map +0 -7
  241. package/esm/parts/chat-container-messages-list/props.js.map +0 -7
  242. package/esm/parts/chat-container-messages-list/styled.js.map +0 -7
  243. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
  244. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
  245. package/esm/parts/chat-empty-state/props.js.map +0 -7
  246. package/esm/parts/chat-empty-state/styled.js.map +0 -7
  247. package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -7
  248. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
  249. package/esm/parts/chat-sidebar/index.js.map +0 -7
  250. package/esm/parts/chat-sidebar/props.js.map +0 -7
  251. package/esm/parts/chat-sidebar/styled.js.map +0 -7
  252. package/esm/parts/floating-button/FloatingButton.js.map +0 -7
  253. package/esm/parts/floating-button/index.js.map +0 -7
  254. package/esm/parts/floating-button/props.js.map +0 -7
  255. package/esm/parts/floating-button/styled.js.map +0 -7
  256. package/esm/parts/floating-container/styled.js.map +0 -7
  257. package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -7
  258. package/esm/parts/grid-influencer/styled.js.map +0 -7
  259. package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -7
  260. package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -7
  261. package/esm/parts/message-delimiter/index.js.map +0 -7
  262. package/esm/parts/message-delimiter/props.js.map +0 -7
  263. package/esm/parts/message-delimiter/styled.js.map +0 -7
  264. package/esm/parts/sidebar-button/SidebarButton.js.map +0 -7
  265. package/esm/parts/sidebar-button/index.js.map +0 -7
  266. package/esm/parts/sidebar-button/props.js.map +0 -7
  267. package/esm/parts/sidebar-button/styled.js.map +0 -7
  268. package/esm/parts/system-message/SystemMessage.js.map +0 -7
  269. package/esm/parts/system-message/config/useValidateProps.js.map +0 -7
  270. package/esm/parts/system-message/index.js.map +0 -7
  271. package/esm/parts/system-message/props.js.map +0 -7
  272. package/esm/parts/system-message/style.js.map +0 -7
  273. package/esm/parts/tile-button/TileButton.js.map +0 -7
  274. package/esm/parts/tile-button/config/useValidateProps.js.map +0 -7
  275. package/esm/parts/tile-button/index.js.map +0 -7
  276. package/esm/parts/tile-button/props.js.map +0 -7
  277. package/esm/parts/tile-button/styled.js.map +0 -7
  278. package/esm/prop-types.js.map +0 -7
  279. package/esm/styled.js.map +0 -7
  280. package/esm/tests/utils.js +0 -37
  281. package/esm/tests/utils.js.map +0 -7
@@ -1,64 +1,64 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { describe } from "react-desc";
4
- import { WarningCircleFill } from "@elliemae/ds-icons";
5
- import {
6
- StyledWrapper,
7
- StyledColoredBubble,
8
- StyledTitleBubble,
9
- StyledTitleLeftBubble,
10
- StyledTitleRightBubble,
11
- StyleBodyWrapper,
12
- StyleErrorMessage,
13
- StyleHelpMessage
14
- } from "./styled";
15
- import { propsBubbles } from "./props";
16
- import { useValidateProps } from "./config/useValidateProps";
17
- import { ChatBubbleArrow } from "./ChatBubbleArrow";
18
- const ChatBubble = (props) => {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.url.to-json.js';
3
+ import 'core-js/modules/esnext.async-iterator.map.js';
4
+ import 'core-js/modules/esnext.iterator.map.js';
5
+ import React from 'react';
6
+ import { describe } from 'react-desc';
7
+ import { WarningCircleFill } from '@elliemae/ds-icons';
8
+ import { StyledWrapper, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage } from './styled.js';
9
+ import { propsBubbles } from './props.js';
10
+ import { useValidateProps } from './config/useValidateProps.js';
11
+ import { ChatBubbleArrow } from './ChatBubbleArrow.js';
12
+
13
+ var _br, _WarningCircleFill;
14
+
15
+ const ChatBubble = props => {
19
16
  useValidateProps(props, ChatBubbleWithSchema.toJSON());
20
- const { dsId, type, title, time, body, errorMessage, helpMessage } = props;
21
- const bodyParts = React2.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
22
- return /* @__PURE__ */ React2.createElement(StyledWrapper, {
23
- "data-testid": `ds-chat-bubble-${dsId}`,
24
- type
25
- }, /* @__PURE__ */ React2.createElement(StyledColoredBubble, {
26
- type
27
- }, /* @__PURE__ */ React2.createElement(StyledTitleBubble, {
28
- cols: [1, "auto"],
17
+ const {
18
+ dsId,
19
+ type,
20
+ title,
21
+ time,
22
+ body,
23
+ errorMessage,
24
+ helpMessage
25
+ } = props;
26
+ const bodyParts = React.useMemo(() => typeof body === 'string' ? body.split('\n') : [body], [body]);
27
+ return /*#__PURE__*/_jsx(StyledWrapper, {
28
+ "data-testid": "ds-chat-bubble-".concat(dsId),
29
+ type: type
30
+ }, void 0, /*#__PURE__*/_jsx(StyledColoredBubble, {
31
+ type: type
32
+ }, void 0, /*#__PURE__*/_jsx(StyledTitleBubble, {
33
+ cols: [1, 'auto'],
29
34
  gutter: "xs",
30
35
  alignItems: "flex-end",
31
36
  className: "sr-only"
32
- }, /* @__PURE__ */ React2.createElement(StyledTitleLeftBubble, {
37
+ }, void 0, /*#__PURE__*/_jsx(StyledTitleLeftBubble, {
33
38
  alignItems: "center",
34
- "data-testid": `chat-bubble-title-${dsId}`
35
- }, title), /* @__PURE__ */ React2.createElement(StyledTitleRightBubble, {
39
+ "data-testid": "chat-bubble-title-".concat(dsId)
40
+ }, void 0, title), /*#__PURE__*/_jsx(StyledTitleRightBubble, {
36
41
  alignItems: "center",
37
- type,
38
- "data-testid": `chat-bubble-time-${dsId}`
39
- }, time)), /* @__PURE__ */ React2.createElement(StyleBodyWrapper, {
40
- "data-testid": `chat-bubble-body-${dsId}`
41
- }, bodyParts.map((item, index) => /* @__PURE__ */ React2.createElement(React2.Fragment, {
42
- key: `${item}-${index}`
43
- }, item, index < bodyParts.length - 1 ? /* @__PURE__ */ React2.createElement("br", null) : null))), /* @__PURE__ */ React2.createElement(ChatBubbleArrow, {
44
- type
45
- })), errorMessage ? /* @__PURE__ */ React2.createElement(StyleErrorMessage, {
46
- "data-testid": `chat-bubble-error-message-${dsId}`,
42
+ type: type,
43
+ "data-testid": "chat-bubble-time-".concat(dsId)
44
+ }, void 0, time)), /*#__PURE__*/_jsx(StyleBodyWrapper, {
45
+ "data-testid": "chat-bubble-body-".concat(dsId)
46
+ }, void 0, bodyParts.map((item, index) => /*#__PURE__*/_jsx(React.Fragment, {}, "".concat(item, "-").concat(index), item, index < bodyParts.length - 1 ? _br || (_br = /*#__PURE__*/_jsx("br", {})) : null))), /*#__PURE__*/_jsx(ChatBubbleArrow, {
47
+ type: type
48
+ })), errorMessage ? /*#__PURE__*/_jsx(StyleErrorMessage, {
49
+ "data-testid": "chat-bubble-error-message-".concat(dsId),
47
50
  p: "xxs",
48
51
  gutter: "xxs",
49
- cols: [1, "auto"]
50
- }, /* @__PURE__ */ React2.createElement("span", null, errorMessage), /* @__PURE__ */ React2.createElement(WarningCircleFill, null)) : null, helpMessage ? /* @__PURE__ */ React2.createElement(StyleHelpMessage, {
51
- "data-testid": `chat-bubble-help-message-${dsId}`,
52
+ cols: [1, 'auto']
53
+ }, void 0, /*#__PURE__*/_jsx("span", {}, void 0, errorMessage), _WarningCircleFill || (_WarningCircleFill = /*#__PURE__*/_jsx(WarningCircleFill, {}))) : null, helpMessage ? /*#__PURE__*/_jsx(StyleHelpMessage, {
54
+ "data-testid": "chat-bubble-help-message-".concat(dsId),
52
55
  p: "xxs",
53
56
  gutter: "xxs",
54
- cols: [1, "auto"]
55
- }, /* @__PURE__ */ React2.createElement("span", null, helpMessage)) : null);
57
+ cols: [1, 'auto']
58
+ }, void 0, /*#__PURE__*/_jsx("span", {}, void 0, helpMessage)) : null);
56
59
  };
57
- ChatBubble.propTypes = propsBubbles;
60
+
58
61
  const ChatBubbleWithSchema = describe(ChatBubble);
59
62
  ChatBubbleWithSchema.propTypes = propsBubbles;
60
- export {
61
- ChatBubble,
62
- ChatBubbleWithSchema
63
- };
64
- //# sourceMappingURL=ChatBubble.js.map
63
+
64
+ export { ChatBubble, ChatBubbleWithSchema };
@@ -1,68 +1,72 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { StyledBubbleArrow } from "./styled";
4
- import { BUBBLE_TYPES, propsArrowBubble } from "./props";
5
- const ChatBubbleArrow = ({ type }) => /* @__PURE__ */ React2.createElement(StyledBubbleArrow, null, type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ React2.createElement("svg", {
6
- width: "15px",
7
- height: "14px",
8
- viewBox: "0 0 15 14"
9
- }, /* @__PURE__ */ React2.createElement("defs", null, /* @__PURE__ */ React2.createElement("path", {
10
- d: "M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z",
11
- id: "path-chat-bubble"
12
- }), /* @__PURE__ */ React2.createElement("filter", {
13
- x: "-55.6%",
14
- y: "-50.0%",
15
- width: "211.1%",
16
- height: "225.0%",
17
- filterUnits: "objectBoundingBox",
18
- id: "filter-2"
19
- }, /* @__PURE__ */ React2.createElement("feOffset", {
20
- dx: "2.3",
21
- dy: "1.2",
22
- in: "SourceAlpha",
23
- result: "shadowOffsetOuter1"
24
- }), /* @__PURE__ */ React2.createElement("feGaussianBlur", {
25
- stdDeviation: "1.5",
26
- in: "shadowOffsetOuter1",
27
- result: "shadowBlurOuter1"
28
- }), /* @__PURE__ */ React2.createElement("feColorMatrix", {
29
- values: "0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0",
30
- type: "matrix",
31
- in: "shadowBlurOuter1"
32
- }))), /* @__PURE__ */ React2.createElement("g", {
33
- id: "[DSK]-Visual-Design",
34
- stroke: "none",
35
- strokeWidth: "1",
36
- fill: "none",
37
- fillRule: "evenodd"
38
- }, /* @__PURE__ */ React2.createElement("g", {
39
- id: "Path-Copy",
40
- transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) "
41
- }, /* @__PURE__ */ React2.createElement("use", {
42
- fill: "black",
43
- fillOpacity: "1",
44
- filter: "url(#filter-2)",
45
- xlinkHref: "#path-chat-bubble"
46
- }), /* @__PURE__ */ React2.createElement("use", {
47
- fill: "#FFFFFF",
48
- fillRule: "evenodd",
49
- xlinkHref: "#path-chat-bubble"
50
- })))) : /* @__PURE__ */ React2.createElement("svg", {
51
- width: "9px",
52
- height: "8px",
53
- viewBox: "0 0 9 8"
54
- }, /* @__PURE__ */ React2.createElement("g", {
55
- stroke: "none",
56
- strokeWidth: "1",
57
- fill: "none",
58
- fillRule: "evenodd"
59
- }, /* @__PURE__ */ React2.createElement("path", {
60
- d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z",
61
- id: "Path",
62
- fill: "#1E79C2"
63
- }))));
64
- ChatBubbleArrow.propTypes = propsArrowBubble;
65
- export {
66
- ChatBubbleArrow
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { StyledBubbleArrow } from './styled.js';
4
+ import { BUBBLE_TYPES } from './props.js';
5
+
6
+ var _svg, _svg2;
7
+ const ChatBubbleArrow = _ref => {
8
+ let {
9
+ type
10
+ } = _ref;
11
+ return /*#__PURE__*/_jsx(StyledBubbleArrow, {}, void 0, type === BUBBLE_TYPES.RECIPIENT ? _svg || (_svg = /*#__PURE__*/_jsx("svg", {
12
+ width: "15px",
13
+ height: "14px",
14
+ viewBox: "0 0 15 14"
15
+ }, void 0, /*#__PURE__*/_jsx("defs", {}, void 0, /*#__PURE__*/_jsx("path", {
16
+ d: "M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z",
17
+ id: "path-chat-bubble"
18
+ }), /*#__PURE__*/_jsx("filter", {
19
+ x: "-55.6%",
20
+ y: "-50.0%",
21
+ width: "211.1%",
22
+ height: "225.0%",
23
+ filterUnits: "objectBoundingBox",
24
+ id: "filter-2"
25
+ }, void 0, /*#__PURE__*/_jsx("feOffset", {
26
+ dx: "2.3",
27
+ dy: "1.2",
28
+ in: "SourceAlpha",
29
+ result: "shadowOffsetOuter1"
30
+ }), /*#__PURE__*/_jsx("feGaussianBlur", {
31
+ stdDeviation: "1.5",
32
+ in: "shadowOffsetOuter1",
33
+ result: "shadowBlurOuter1"
34
+ }), /*#__PURE__*/_jsx("feColorMatrix", {
35
+ values: "0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0",
36
+ type: "matrix",
37
+ in: "shadowBlurOuter1"
38
+ }))), /*#__PURE__*/_jsx("g", {
39
+ id: "[DSK]-Visual-Design",
40
+ stroke: "none",
41
+ strokeWidth: "1",
42
+ fill: "none",
43
+ fillRule: "evenodd"
44
+ }, void 0, /*#__PURE__*/_jsx("g", {
45
+ id: "Path-Copy",
46
+ transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) "
47
+ }, void 0, /*#__PURE__*/_jsx("use", {
48
+ fill: "black",
49
+ fillOpacity: "1",
50
+ filter: "url(#filter-2)",
51
+ xlinkHref: "#path-chat-bubble"
52
+ }), /*#__PURE__*/_jsx("use", {
53
+ fill: "#FFFFFF",
54
+ fillRule: "evenodd",
55
+ xlinkHref: "#path-chat-bubble"
56
+ }))))) : _svg2 || (_svg2 = /*#__PURE__*/_jsx("svg", {
57
+ width: "9px",
58
+ height: "8px",
59
+ viewBox: "0 0 9 8"
60
+ }, void 0, /*#__PURE__*/_jsx("g", {
61
+ stroke: "none",
62
+ strokeWidth: "1",
63
+ fill: "none",
64
+ fillRule: "evenodd"
65
+ }, void 0, /*#__PURE__*/_jsx("path", {
66
+ d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z",
67
+ id: "Path",
68
+ fill: "#1E79C2"
69
+ })))));
67
70
  };
68
- //# sourceMappingURL=ChatBubbleArrow.js.map
71
+
72
+ export { ChatBubbleArrow };
@@ -1,25 +1,27 @@
1
- import * as React from "react";
2
- import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
3
- const throwError = (message) => {
4
- throw new Error(`Bubble:: ${message}
5
- `);
1
+ import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
+
3
+ const throwError = message => {
4
+ throw new Error("Bubble:: ".concat(message, "\n "));
6
5
  };
6
+
7
7
  const useValidateProps = (props, schema) => {
8
8
  useValidatePropTypes(props, schema);
9
- if (typeof props.title === "undefined") {
10
- throwError(`Please provide a title property to use this component.`);
9
+
10
+ if (typeof props.title === 'undefined') {
11
+ throwError("Please provide a title property to use this component.");
11
12
  }
12
- if (typeof props.time === "undefined") {
13
- throwError(`Please provide a time property to use this component.`);
13
+
14
+ if (typeof props.time === 'undefined') {
15
+ throwError("Please provide a time property to use this component.");
14
16
  }
15
- if (typeof props.body === "undefined") {
16
- throwError(`Please provide a body property to use this component.`);
17
+
18
+ if (typeof props.body === 'undefined') {
19
+ throwError("Please provide a body property to use this component.");
17
20
  }
18
- if (typeof props.type === "undefined") {
19
- throwError(`Please provide a type property to use this component.`);
21
+
22
+ if (typeof props.type === 'undefined') {
23
+ throwError("Please provide a type property to use this component.");
20
24
  }
21
25
  };
22
- export {
23
- useValidateProps
24
- };
25
- //# sourceMappingURL=useValidateProps.js.map
26
+
27
+ export { useValidateProps };
@@ -1,9 +1,2 @@
1
- import * as React from "react";
2
- import { ChatBubble, ChatBubbleWithSchema } from "./ChatBubble";
3
- import { BUBBLE_TYPES } from "./props";
4
- export {
5
- BUBBLE_TYPES,
6
- ChatBubble,
7
- ChatBubbleWithSchema
8
- };
9
- //# sourceMappingURL=index.js.map
1
+ export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';
2
+ export { BUBBLE_TYPES } from './props.js';
@@ -1,40 +1,46 @@
1
- import * as React from "react";
2
- import propTypes from "prop-types";
3
- import { PropTypes } from "react-desc";
4
- import { noop } from "lodash";
1
+ import propsTypes from 'prop-types';
2
+ import { PropTypes } from 'react-desc';
3
+ import { noop } from 'lodash';
4
+
5
+ /**
6
+ *
7
+ * BUBBLE
8
+ *
9
+ */
5
10
  const BUBBLE_TYPES = {
6
- SENDER: "SENDER",
7
- RECIPIENT: "RECIPIENT",
8
- DELIMITER: "DELIMITER",
9
- SYSTEM: "SYSTEM"
11
+ SENDER: 'SENDER',
12
+ RECIPIENT: 'RECIPIENT',
13
+ DELIMITER: 'DELIMITER',
14
+ SYSTEM: 'SYSTEM'
10
15
  };
11
16
  const defaultBubbleProps = {
12
- dsId: void 0,
17
+ dsId: undefined,
13
18
  type: BUBBLE_TYPES.SENDER,
14
- title: void 0,
15
- time: void 0,
16
- body: void 0,
19
+ title: undefined,
20
+ time: undefined,
21
+ body: undefined,
17
22
  onClick: noop,
18
- errorMessage: void 0,
19
- helpMessage: void 0
23
+ errorMessage: undefined,
24
+ helpMessage: undefined
20
25
  };
21
26
  const propsBubbles = {
22
- dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Unique id for bubble").defaultValue(defaultBubbleProps.dsId),
23
- type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description("Define bubble type ").defaultValue(defaultBubbleProps.type),
24
- title: PropTypes.string.isRequired.description("Title of the bubble").defaultValue(defaultBubbleProps.title),
25
- time: PropTypes.string.isRequired.description("Time of the bubble").defaultValue(defaultBubbleProps.title),
26
- body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description("Bubble content").defaultValue(defaultBubbleProps.body),
27
- onClick: PropTypes.string.description("Callback when the bubble is tapped").defaultValue(defaultBubbleProps.onClick),
28
- errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description("Error message to display at bottom of the bubble").defaultValue(defaultBubbleProps.onClick),
29
- helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description("Help message to display at bottom of the bubble").defaultValue(defaultBubbleProps.onClick)
27
+ dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Unique id for bubble').defaultValue(defaultBubbleProps.dsId),
28
+ type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description('Define bubble type ').defaultValue(defaultBubbleProps.type),
29
+ title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),
30
+ time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),
31
+ body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description('Bubble content').defaultValue(defaultBubbleProps.body),
32
+ onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),
33
+ errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Error message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick),
34
+ helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Help message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick)
30
35
  };
36
+ /**
37
+ *
38
+ * BUBBLE ARROW
39
+ *
40
+ */
41
+
31
42
  const propsArrowBubble = {
32
- type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])
43
+ type: propsTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])
33
44
  };
34
- export {
35
- BUBBLE_TYPES,
36
- defaultBubbleProps,
37
- propsArrowBubble,
38
- propsBubbles
39
- };
40
- //# sourceMappingURL=props.js.map
45
+
46
+ export { BUBBLE_TYPES, defaultBubbleProps, propsArrowBubble, propsBubbles };
@@ -1,117 +1,37 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Grid } from "@elliemae/ds-grid";
4
- import { BUBBLE_TYPES } from "./props";
5
- const StyledWrapper = styled.div`
6
- min-width: 224px;
7
- border-radius: 10px;
8
- `;
9
- const StyledTitleBubble = styled(Grid)`
10
- padding-top: 6px;
11
- padding-left: 10px;
12
- padding-right: 10px;
13
- padding-bottom: 4px;
14
- `;
15
- const StyledTitleLeftBubble = styled(Grid)`
16
- font-size: 13px;
17
- font-weight: 600;
18
- `;
19
- const StyledTitleRightBubble = styled(Grid)`
20
- font-size: 13px;
21
- font-weight: 400;
22
- color: ${(props) => props.type === BUBBLE_TYPES.SENDER ? "#FFF" : "#657489"};
23
- `;
24
- const StyleBodyWrapper = styled.div`
25
- font-size: 13px;
26
- font-weight: 400;
27
- line-height: 15px;
28
- min-height: 18px;
29
- padding: 0px 10px 8px 10px;
30
- `;
31
- const StyleErrorMessage = styled.div`
32
- font-size: 12px;
33
- font-weight: 400;
34
- padding-top: ${(props) => props.theme.space.xxxs};
35
- color: ${(props) => props.theme.colors.danger[900]};
36
- align-items: flex-end;
37
- justify-content: center;
38
- text-align: right;
39
- line-height: 15px;
40
- svg {
41
- fill: ${(props) => props.theme.colors.danger[900]};
42
- }
43
- a {
44
- font-size: 12px;
45
- color: ${(props) => props.theme.colors.danger[900]};
46
- }
47
- .em-ds-icon {
48
- margin-left: 8px;
49
- }
50
- `;
51
- const StyleHelpMessage = styled(StyleErrorMessage)`
52
- font-size: 12px;
53
- line-height: 15px;
54
- color: ${(props) => props.theme.colors.neutral[500]};
55
- svg {
56
- fill: ${(props) => props.theme.colors.danger[500]};
57
- }
58
- a {
59
- font-size: 12px;
60
- color: ${(props) => props.theme.colors.danger[500]};
61
- }
62
- `;
63
- const StyledBubbleArrow = styled.div`
64
- display: block;
65
- content: '';
66
- position: absolute;
67
- bottom: 10px;
68
- height: 15px;
69
- `;
70
- const StyledColoredBubble = styled.div`
71
- min-width: 224px;
72
- border-radius: 10px;
73
- position: relative;
1
+ import styled from 'styled-components';
2
+ import { Grid } from '@elliemae/ds-grid';
3
+ import { BUBBLE_TYPES } from './props.js';
74
4
 
75
- ${(props) => props.type === BUBBLE_TYPES.SENDER ? `
76
- border: 1px solid ${props.theme.colors.brand["700"]};
77
- background: ${props.theme.colors.brand[600]};
78
- color: ${props.theme.colors.neutral["000"]};
79
- ${StyledBubbleArrow}{
80
- right: -9px;
81
- bottom: 6px;
82
- svg{
83
- fill: ${props.theme.colors.brand[600]};
84
- }
85
- }
5
+ /* eslint-disable max-lines */
86
6
 
87
- a {
88
- color: #FFF;
89
- }
7
+ const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
8
+ componentId: "sc-fe8e9o-0"
9
+ })(["min-width:224px;border-radius:10px;"]); // Bubble HEADER
90
10
 
91
- ` : `
92
- box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);
93
- background: ${props.theme.colors.neutral["000"]};
94
- color: ${props.theme.colors.neutral[700]};
11
+ const StyledTitleBubble = /*#__PURE__*/styled(Grid).withConfig({
12
+ componentId: "sc-fe8e9o-1"
13
+ })(["padding-top:6px;padding-left:10px;padding-right:10px;padding-bottom:4px;"]);
14
+ const StyledTitleLeftBubble = /*#__PURE__*/styled(Grid).withConfig({
15
+ componentId: "sc-fe8e9o-2"
16
+ })(["font-size:13px;font-weight:600;"]);
17
+ const StyledTitleRightBubble = /*#__PURE__*/styled(Grid).withConfig({
18
+ componentId: "sc-fe8e9o-3"
19
+ })(["font-size:13px;font-weight:400;color:", ";"], props => props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489');
20
+ const StyleBodyWrapper = /*#__PURE__*/styled.div.withConfig({
21
+ componentId: "sc-fe8e9o-4"
22
+ })(["font-size:13px;font-weight:400;line-height:15px;min-height:18px;padding:0px 10px 8px 10px;"]);
23
+ const StyleErrorMessage = /*#__PURE__*/styled.div.withConfig({
24
+ componentId: "sc-fe8e9o-5"
25
+ })(["font-size:12px;font-weight:400;padding-top:", ";color:", ";align-items:flex-end;justify-content:center;text-align:right;line-height:15px;svg{fill:", ";}a{font-size:12px;color:", ";}.em-ds-icon{margin-left:8px;}"], props => props.theme.space.xxxs, props => props.theme.colors.danger[900], props => props.theme.colors.danger[900], props => props.theme.colors.danger[900]);
26
+ const StyleHelpMessage = /*#__PURE__*/styled(StyleErrorMessage).withConfig({
27
+ componentId: "sc-fe8e9o-6"
28
+ })(["font-size:12px;line-height:15px;color:", ";svg{fill:", ";}a{font-size:12px;color:", ";}"], props => props.theme.colors.neutral[500], props => props.theme.colors.danger[500], props => props.theme.colors.danger[500]); // bubble sender/ recipient
95
29
 
96
- ${StyledBubbleArrow}{
97
- left: -11px;
98
- bottom: 6px;
99
- svg{
100
- fill: ${props.theme.colors.neutral["000"]};
101
- }
102
- }
30
+ const StyledBubbleArrow = /*#__PURE__*/styled.div.withConfig({
31
+ componentId: "sc-fe8e9o-7"
32
+ })(["display:block;content:'';position:absolute;bottom:10px;height:15px;"]);
33
+ const StyledColoredBubble = /*#__PURE__*/styled.div.withConfig({
34
+ componentId: "sc-fe8e9o-8"
35
+ })(["min-width:224px;border-radius:10px;position:relative;", ""], props => props.type === BUBBLE_TYPES.SENDER ? "\n border: 1px solid ".concat(props.theme.colors.brand['700'], ";\n background: ").concat(props.theme.colors.brand[600], ";\n color: ").concat(props.theme.colors.neutral['000'], ";\n ").concat(StyledBubbleArrow, "{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.brand[600], ";\n }\n }\n\n a {\n color: #FFF;\n }\n\n ") : "\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ".concat(props.theme.colors.neutral['000'], ";\n color: ").concat(props.theme.colors.neutral[700], ";\n\n ").concat(StyledBubbleArrow, "{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.neutral['000'], ";\n }\n }\n\n "));
103
36
 
104
- `}
105
- `;
106
- export {
107
- StyleBodyWrapper,
108
- StyleErrorMessage,
109
- StyleHelpMessage,
110
- StyledBubbleArrow,
111
- StyledColoredBubble,
112
- StyledTitleBubble,
113
- StyledTitleLeftBubble,
114
- StyledTitleRightBubble,
115
- StyledWrapper
116
- };
117
- //# sourceMappingURL=styled.js.map
37
+ export { StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage, StyledBubbleArrow, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyledWrapper };
@@ -1,33 +1,37 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { describe } from "react-desc";
4
- import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
5
- import { propTypes } from "./props";
6
- import { useValidateProps } from "./config/useValidateProps";
7
- import { Wrapper, MainContent, Title, Content, Time, RightAddon } from "./styled";
8
- const ChatCard = (props) => {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.url.to-json.js';
3
+ import 'react';
4
+ import { describe } from 'react-desc';
5
+ import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
6
+ import { propTypes } from './props.js';
7
+ import { useValidateProps } from './config/useValidateProps.js';
8
+ import { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled.js';
9
+
10
+ const ChatCard = props => {
9
11
  useValidateProps(props, ChatCardWithSchema.toJSON());
10
- const { title, content, time, rightAddon } = props;
11
- return /* @__PURE__ */ React2.createElement(Wrapper, {
12
- cols: ["1fr", "auto"],
12
+ const {
13
+ title,
14
+ content,
15
+ time,
16
+ rightAddon
17
+ } = props;
18
+ return /*#__PURE__*/_jsx(Wrapper, {
19
+ cols: ['1fr', 'auto'],
13
20
  "data-testid": "chat-card-wrapper"
14
- }, /* @__PURE__ */ React2.createElement(MainContent, null, /* @__PURE__ */ React2.createElement(Title, {
21
+ }, void 0, /*#__PURE__*/_jsx(MainContent, {}, void 0, /*#__PURE__*/_jsx(Title, {
15
22
  "data-testid": "chat-card-title"
16
- }, title), /* @__PURE__ */ React2.createElement(Content, {
23
+ }, void 0, title), /*#__PURE__*/_jsx(Content, {
17
24
  "data-testid": "chat-card-content"
18
- }, /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
25
+ }, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
19
26
  value: content
20
- })), time && /* @__PURE__ */ React2.createElement(Time, {
27
+ })), time && /*#__PURE__*/_jsx(Time, {
21
28
  "data-testid": "chat-card-time"
22
- }, time)), rightAddon && /* @__PURE__ */ React2.createElement(RightAddon, {
29
+ }, void 0, time)), rightAddon && /*#__PURE__*/_jsx(RightAddon, {
23
30
  "data-testid": "chat-card-right-addon"
24
- }, rightAddon));
31
+ }, void 0, rightAddon));
25
32
  };
26
- ChatCard.propTypes = propTypes;
33
+
27
34
  const ChatCardWithSchema = describe(ChatCard);
28
35
  ChatCardWithSchema.propTypes = propTypes;
29
- export {
30
- ChatCard,
31
- ChatCardWithSchema
32
- };
33
- //# sourceMappingURL=ChatCard.js.map
36
+
37
+ export { ChatCard, ChatCardWithSchema };
@@ -1,9 +1,7 @@
1
- import * as React from "react";
2
- import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
1
+ import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
+
3
3
  const useValidateProps = (props, schema) => {
4
4
  useValidatePropTypes(props, schema);
5
5
  };
6
- export {
7
- useValidateProps
8
- };
9
- //# sourceMappingURL=useValidateProps.js.map
6
+
7
+ export { useValidateProps };
@@ -1,7 +1 @@
1
- import * as React from "react";
2
- import { ChatCard, ChatCardWithSchema } from "./ChatCard";
3
- export {
4
- ChatCard,
5
- ChatCardWithSchema
6
- };
7
- //# sourceMappingURL=index.js.map
1
+ export { ChatCard, ChatCardWithSchema } from './ChatCard.js';