@elliemae/ds-chat 2.3.0-next.1 → 2.3.0-next.10

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 (231) hide show
  1. package/cjs/{parts → exported-related}/bubble/ChatBubble.js +8 -10
  2. package/cjs/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
  3. package/cjs/{parts → exported-related}/bubble/index.js +0 -0
  4. package/cjs/exported-related/bubble/props.js +43 -0
  5. package/cjs/{parts → exported-related}/bubble/styled.js +9 -9
  6. package/cjs/{parts → exported-related}/chat-card/ChatCard.js +6 -7
  7. package/cjs/{parts → exported-related}/chat-card/index.js +0 -0
  8. package/cjs/exported-related/chat-card/props.js +22 -0
  9. package/cjs/{parts → exported-related}/chat-card/styled.js +6 -6
  10. package/cjs/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +10 -4
  11. package/cjs/{parts → exported-related}/chat-container-header/helpers.js +0 -0
  12. package/cjs/exported-related/chat-container-header/props.js +18 -0
  13. package/cjs/{parts → exported-related}/chat-container-header/styled.js +3 -3
  14. package/cjs/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +8 -10
  15. package/cjs/exported-related/chat-empty-state/props.js +18 -0
  16. package/cjs/{parts → exported-related}/chat-empty-state/styled.js +2 -2
  17. package/cjs/{parts → exported-related}/chat-sidebar/SideBarChat.js +10 -11
  18. package/cjs/{parts → exported-related}/chat-sidebar/index.js +0 -0
  19. package/cjs/{parts → exported-related}/chat-sidebar/props.js +2 -5
  20. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
  21. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
  22. package/cjs/exported-related/chat-sidebar/sidebar-button/props.js +25 -0
  23. package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
  24. package/cjs/{parts → exported-related}/chat-sidebar/styled.js +2 -2
  25. package/cjs/{parts → exported-related}/floating-button/FloatingButton.js +13 -6
  26. package/cjs/{parts → exported-related}/floating-button/index.js +1 -0
  27. package/cjs/{parts → exported-related}/floating-button/props.js +0 -0
  28. package/cjs/{parts → exported-related}/floating-button/styled.js +1 -1
  29. package/cjs/{parts → exported-related}/floating-container/styled.js +1 -1
  30. package/cjs/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
  31. package/cjs/{parts → exported-related}/grid-influencer/styled.js +2 -2
  32. package/cjs/exported-related/index.js +37 -0
  33. package/cjs/exported-related/message-delimiter/MessageDelimiter.js +53 -0
  34. package/cjs/{parts → exported-related}/message-delimiter/index.js +0 -0
  35. package/cjs/exported-related/message-delimiter/props.js +33 -0
  36. package/cjs/{parts → exported-related}/message-delimiter/styled.js +3 -3
  37. package/cjs/{parts → exported-related}/system-message/SystemMessage.js +6 -8
  38. package/cjs/{parts → exported-related}/system-message/index.js +0 -0
  39. package/cjs/{parts → exported-related}/system-message/props.js +0 -0
  40. package/cjs/{parts → exported-related}/system-message/style.js +5 -5
  41. package/cjs/{parts → exported-related}/tile-button/TileButton.js +7 -9
  42. package/cjs/{parts → exported-related}/tile-button/index.js +0 -0
  43. package/cjs/exported-related/tile-button/props.js +55 -0
  44. package/cjs/{parts → exported-related}/tile-button/styled.js +9 -9
  45. package/cjs/index.js +29 -18
  46. package/cjs/parts/chat-composer/ChatContainerComposer.js +7 -9
  47. package/cjs/parts/chat-container/ChatContainer.js +18 -20
  48. package/cjs/parts/chat-container/styled.js +2 -2
  49. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +74 -64
  50. package/cjs/parts/chat-container-messages-list/styled.js +2 -2
  51. package/cjs/parts/index.js +16 -0
  52. package/cjs/react-desc-prop-types.js +116 -0
  53. package/esm/{parts → exported-related}/bubble/ChatBubble.js +7 -9
  54. package/esm/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
  55. package/esm/{parts → exported-related}/bubble/index.js +0 -0
  56. package/esm/{parts → exported-related}/bubble/props.js +14 -24
  57. package/esm/{parts → exported-related}/bubble/styled.js +9 -9
  58. package/esm/{parts → exported-related}/chat-card/ChatCard.js +4 -5
  59. package/esm/{parts → exported-related}/chat-card/index.js +0 -0
  60. package/esm/{parts → exported-related}/chat-card/props.js +9 -2
  61. package/esm/{parts → exported-related}/chat-card/styled.js +6 -6
  62. package/esm/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +9 -4
  63. package/esm/{parts → exported-related}/chat-container-header/helpers.js +0 -0
  64. package/esm/exported-related/chat-container-header/props.js +13 -0
  65. package/esm/{parts → exported-related}/chat-container-header/styled.js +3 -3
  66. package/esm/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +7 -9
  67. package/esm/exported-related/chat-empty-state/props.js +13 -0
  68. package/esm/{parts → exported-related}/chat-empty-state/styled.js +2 -2
  69. package/esm/{parts → exported-related}/chat-sidebar/SideBarChat.js +8 -9
  70. package/esm/{parts → exported-related}/chat-sidebar/index.js +0 -0
  71. package/esm/{parts → exported-related}/chat-sidebar/props.js +2 -5
  72. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
  73. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
  74. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/props.js +3 -4
  75. package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
  76. package/esm/{parts → exported-related}/chat-sidebar/styled.js +2 -2
  77. package/esm/exported-related/floating-button/FloatingButton.js +33 -0
  78. package/esm/exported-related/floating-button/index.js +1 -0
  79. package/esm/{parts → exported-related}/floating-button/props.js +0 -0
  80. package/esm/{parts → exported-related}/floating-button/styled.js +1 -1
  81. package/esm/{parts → exported-related}/floating-container/styled.js +1 -1
  82. package/esm/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
  83. package/esm/{parts → exported-related}/grid-influencer/styled.js +2 -2
  84. package/esm/exported-related/index.js +11 -0
  85. package/esm/exported-related/message-delimiter/MessageDelimiter.js +43 -0
  86. package/esm/{parts → exported-related}/message-delimiter/index.js +0 -0
  87. package/esm/exported-related/message-delimiter/props.js +24 -0
  88. package/esm/{parts → exported-related}/message-delimiter/styled.js +3 -3
  89. package/esm/{parts → exported-related}/system-message/SystemMessage.js +4 -6
  90. package/esm/{parts → exported-related}/system-message/index.js +0 -0
  91. package/esm/{parts → exported-related}/system-message/props.js +0 -0
  92. package/esm/{parts → exported-related}/system-message/style.js +5 -5
  93. package/esm/{parts → exported-related}/tile-button/TileButton.js +5 -7
  94. package/esm/{parts → exported-related}/tile-button/index.js +0 -0
  95. package/esm/{parts → exported-related}/tile-button/props.js +3 -3
  96. package/esm/{parts → exported-related}/tile-button/styled.js +9 -9
  97. package/esm/index.js +14 -12
  98. package/esm/parts/chat-composer/ChatContainerComposer.js +9 -11
  99. package/esm/parts/chat-container/ChatContainer.js +16 -18
  100. package/esm/parts/chat-container/styled.js +2 -2
  101. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +70 -60
  102. package/esm/parts/chat-container-messages-list/styled.js +2 -2
  103. package/esm/parts/index.js +3 -0
  104. package/esm/react-desc-prop-types.js +103 -0
  105. package/package.json +172 -216
  106. package/types/exported-related/bubble/ChatBubble.d.ts +5 -0
  107. package/types/{parts → exported-related}/bubble/ChatBubbleArrow.d.ts +1 -1
  108. package/types/{parts → exported-related}/bubble/index.d.ts +0 -0
  109. package/types/{parts → exported-related}/bubble/props.d.ts +7 -26
  110. package/types/{parts → exported-related}/bubble/styled.d.ts +11 -7
  111. package/types/{parts → exported-related}/bubble/tests/ChatBubble.test.d.ts +0 -0
  112. package/types/exported-related/chat-card/ChatCard.d.ts +5 -0
  113. package/types/{parts → exported-related}/chat-card/index.d.ts +0 -0
  114. package/types/exported-related/chat-card/props.d.ts +14 -0
  115. package/types/{parts → exported-related}/chat-card/styled.d.ts +0 -0
  116. package/types/exported-related/chat-container-header/ChatContainerHeader.d.ts +5 -0
  117. package/types/{parts → exported-related}/chat-container-header/helpers.d.ts +2 -2
  118. package/types/exported-related/chat-container-header/props.d.ts +10 -0
  119. package/types/{parts → exported-related}/chat-container-header/styled.d.ts +0 -0
  120. package/types/exported-related/chat-empty-state/ChatEmptyState.d.ts +5 -0
  121. package/types/exported-related/chat-empty-state/props.d.ts +10 -0
  122. package/types/{parts → exported-related}/chat-empty-state/styled.d.ts +0 -0
  123. package/types/exported-related/chat-sidebar/SideBarChat.d.ts +5 -0
  124. package/types/{parts → exported-related}/chat-sidebar/index.d.ts +0 -0
  125. package/types/{parts → exported-related}/chat-sidebar/props.d.ts +4 -4
  126. package/types/exported-related/chat-sidebar/sidebar-button/SidebarButton.d.ts +13 -0
  127. package/types/{parts → exported-related/chat-sidebar}/sidebar-button/index.d.ts +0 -0
  128. package/types/exported-related/chat-sidebar/sidebar-button/props.d.ts +18 -0
  129. package/types/{parts → exported-related/chat-sidebar}/sidebar-button/styled.d.ts +0 -0
  130. package/types/{parts → exported-related}/chat-sidebar/styled.d.ts +0 -0
  131. package/types/exported-related/floating-button/FloatingButton.d.ts +5 -0
  132. package/types/{parts → exported-related}/floating-button/index.d.ts +0 -0
  133. package/types/{parts → exported-related}/floating-button/props.d.ts +0 -0
  134. package/types/{parts → exported-related}/floating-button/styled.d.ts +0 -0
  135. package/types/{parts → exported-related}/floating-container/styled.d.ts +0 -0
  136. package/types/{parts → exported-related}/grid-influencer/InfluencerContainer.d.ts +0 -0
  137. package/types/{parts → exported-related}/grid-influencer/styled.d.ts +0 -0
  138. package/types/exported-related/index.d.ts +10 -0
  139. package/types/exported-related/message-delimiter/MessageDelimiter.d.ts +5 -0
  140. package/types/{parts → exported-related}/message-delimiter/index.d.ts +0 -0
  141. package/types/exported-related/message-delimiter/props.d.ts +7 -0
  142. package/types/{parts → exported-related}/message-delimiter/styled.d.ts +0 -0
  143. package/types/exported-related/system-message/SystemMessage.d.ts +5 -0
  144. package/types/{parts → exported-related}/system-message/index.d.ts +0 -0
  145. package/types/{parts → exported-related}/system-message/props.d.ts +0 -0
  146. package/types/{parts → exported-related}/system-message/style.d.ts +0 -0
  147. package/types/exported-related/tile-button/TileButton.d.ts +5 -0
  148. package/types/{parts → exported-related}/tile-button/index.d.ts +0 -0
  149. package/types/exported-related/tile-button/props.d.ts +46 -0
  150. package/types/{parts → exported-related}/tile-button/styled.d.ts +1 -1
  151. package/types/index.d.ts +4 -13
  152. package/types/parts/chat-composer/ChatContainerComposer.d.ts +4 -59
  153. package/types/parts/chat-composer/styled.d.ts +4 -3
  154. package/types/parts/chat-container/ChatContainer.d.ts +4 -62
  155. package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +4 -47
  156. package/types/parts/chat-container-messages-list/index.d.ts +1 -1
  157. package/types/parts/chat-container-messages-list/styled.d.ts +1 -2
  158. package/types/parts/index.d.ts +3 -0
  159. package/types/react-desc-prop-types.d.ts +94 -0
  160. package/cjs/index.d.js +0 -2
  161. package/cjs/parts/bubble/config/useValidateProps.js +0 -31
  162. package/cjs/parts/bubble/props.js +0 -57
  163. package/cjs/parts/chat-card/config/useValidateProps.js +0 -11
  164. package/cjs/parts/chat-card/props.js +0 -14
  165. package/cjs/parts/chat-composer/config/useValidateProps.js +0 -11
  166. package/cjs/parts/chat-composer/props.js +0 -44
  167. package/cjs/parts/chat-container/config/useValidateProps.js +0 -11
  168. package/cjs/parts/chat-container/index.js +0 -10
  169. package/cjs/parts/chat-container/props.js +0 -49
  170. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +0 -11
  171. package/cjs/parts/chat-container-messages-list/props.js +0 -30
  172. package/cjs/parts/chat-empty-state/config/useValidateProps.js +0 -11
  173. package/cjs/parts/chat-empty-state/props.js +0 -17
  174. package/cjs/parts/chat-sidebar/config/useValidateProps.js +0 -11
  175. package/cjs/parts/message-delimiter/MessageDelimiter.js +0 -41
  176. package/cjs/parts/message-delimiter/config/useValidateProps.js +0 -11
  177. package/cjs/parts/message-delimiter/props.js +0 -23
  178. package/cjs/parts/sidebar-button/props.js +0 -30
  179. package/cjs/parts/system-message/config/useValidateProps.js +0 -11
  180. package/cjs/parts/tile-button/config/useValidateProps.js +0 -11
  181. package/cjs/parts/tile-button/props.js +0 -55
  182. package/cjs/prop-types.js +0 -33
  183. package/esm/index.d.js +0 -1
  184. package/esm/parts/bubble/config/useValidateProps.js +0 -27
  185. package/esm/parts/chat-card/config/useValidateProps.js +0 -7
  186. package/esm/parts/chat-composer/config/useValidateProps.js +0 -7
  187. package/esm/parts/chat-composer/props.js +0 -39
  188. package/esm/parts/chat-container/config/useValidateProps.js +0 -7
  189. package/esm/parts/chat-container/index.js +0 -1
  190. package/esm/parts/chat-container/props.js +0 -44
  191. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +0 -7
  192. package/esm/parts/chat-container-messages-list/props.js +0 -25
  193. package/esm/parts/chat-empty-state/config/useValidateProps.js +0 -7
  194. package/esm/parts/chat-empty-state/props.js +0 -12
  195. package/esm/parts/chat-sidebar/config/useValidateProps.js +0 -7
  196. package/esm/parts/floating-button/FloatingButton.js +0 -27
  197. package/esm/parts/floating-button/index.js +0 -1
  198. package/esm/parts/message-delimiter/MessageDelimiter.js +0 -32
  199. package/esm/parts/message-delimiter/config/useValidateProps.js +0 -7
  200. package/esm/parts/message-delimiter/props.js +0 -18
  201. package/esm/parts/system-message/config/useValidateProps.js +0 -7
  202. package/esm/parts/tile-button/config/useValidateProps.js +0 -7
  203. package/esm/prop-types.js +0 -28
  204. package/types/index.d.d.ts +0 -37
  205. package/types/parts/bubble/ChatBubble.d.ts +0 -30
  206. package/types/parts/bubble/config/useValidateProps.d.ts +0 -2
  207. package/types/parts/chat-card/ChatCard.d.ts +0 -33
  208. package/types/parts/chat-card/config/useValidateProps.d.ts +0 -2
  209. package/types/parts/chat-card/props.d.ts +0 -29
  210. package/types/parts/chat-composer/config/useValidateProps.d.ts +0 -2
  211. package/types/parts/chat-container/config/useValidateProps.d.ts +0 -2
  212. package/types/parts/chat-container/index.d.ts +0 -1
  213. package/types/parts/chat-container-header/ChatContainerHeader.d.ts +0 -2
  214. package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +0 -2
  215. package/types/parts/chat-empty-state/ChatEmptyState.d.ts +0 -21
  216. package/types/parts/chat-empty-state/config/useValidateProps.d.ts +0 -2
  217. package/types/parts/chat-empty-state/props.d.ts +0 -15
  218. package/types/parts/chat-sidebar/SideBarChat.d.ts +0 -48
  219. package/types/parts/chat-sidebar/config/useValidateProps.d.ts +0 -2
  220. package/types/parts/floating-button/FloatingButton.d.ts +0 -18
  221. package/types/parts/message-delimiter/MessageDelimiter.d.ts +0 -31
  222. package/types/parts/message-delimiter/config/useValidateProps.d.ts +0 -2
  223. package/types/parts/message-delimiter/props.d.ts +0 -26
  224. package/types/parts/sidebar-button/SidebarButton.d.ts +0 -24
  225. package/types/parts/sidebar-button/props.d.ts +0 -29
  226. package/types/parts/system-message/SystemMessage.d.ts +0 -23
  227. package/types/parts/system-message/config/useValidateProps.d.ts +0 -2
  228. package/types/parts/tile-button/TileButton.d.ts +0 -75
  229. package/types/parts/tile-button/config/useValidateProps.d.ts +0 -2
  230. package/types/parts/tile-button/props.d.ts +0 -88
  231. package/types/prop-types.d.ts +0 -33
@@ -5,33 +5,33 @@ import { BUBBLE_TYPES } from './props.js';
5
5
  /* eslint-disable max-lines */
6
6
 
7
7
  const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
8
- componentId: "sc-fe8e9o-0"
8
+ componentId: "sc-57v3aa-0"
9
9
  })(["min-width:224px;border-radius:10px;"]); // Bubble HEADER
10
10
 
11
11
  const StyledTitleBubble = /*#__PURE__*/styled(Grid).withConfig({
12
- componentId: "sc-fe8e9o-1"
12
+ componentId: "sc-57v3aa-1"
13
13
  })(["padding-top:6px;padding-left:10px;padding-right:10px;padding-bottom:4px;"]);
14
14
  const StyledTitleLeftBubble = /*#__PURE__*/styled(Grid).withConfig({
15
- componentId: "sc-fe8e9o-2"
15
+ componentId: "sc-57v3aa-2"
16
16
  })(["font-size:13px;font-weight:600;"]);
17
17
  const StyledTitleRightBubble = /*#__PURE__*/styled(Grid).withConfig({
18
- componentId: "sc-fe8e9o-3"
18
+ componentId: "sc-57v3aa-3"
19
19
  })(["font-size:13px;font-weight:400;color:", ";"], props => props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489');
20
20
  const StyleBodyWrapper = /*#__PURE__*/styled.div.withConfig({
21
- componentId: "sc-fe8e9o-4"
21
+ componentId: "sc-57v3aa-4"
22
22
  })(["font-size:13px;font-weight:400;line-height:15px;min-height:18px;padding:0px 10px 8px 10px;"]);
23
23
  const StyleErrorMessage = /*#__PURE__*/styled.div.withConfig({
24
- componentId: "sc-fe8e9o-5"
24
+ componentId: "sc-57v3aa-5"
25
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
26
  const StyleHelpMessage = /*#__PURE__*/styled(StyleErrorMessage).withConfig({
27
- componentId: "sc-fe8e9o-6"
27
+ componentId: "sc-57v3aa-6"
28
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
29
29
 
30
30
  const StyledBubbleArrow = /*#__PURE__*/styled.div.withConfig({
31
- componentId: "sc-fe8e9o-7"
31
+ componentId: "sc-57v3aa-7"
32
32
  })(["display:block;content:'';position:absolute;bottom:10px;height:15px;"]);
33
33
  const StyledColoredBubble = /*#__PURE__*/styled.div.withConfig({
34
- componentId: "sc-fe8e9o-8"
34
+ componentId: "sc-57v3aa-8"
35
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 "));
36
36
 
37
37
  export { StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage, StyledBubbleArrow, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyledWrapper };
@@ -1,14 +1,13 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'core-js/modules/web.url.to-json.js';
3
2
  import 'react';
4
- import { describe } from 'react-desc';
3
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
5
4
  import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
6
- import { propTypes } from './props.js';
7
- import { useValidateProps } from './config/useValidateProps.js';
5
+ import { propTypes, defaultProps } from './props.js';
8
6
  import { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled.js';
9
7
 
10
8
  const ChatCard = props => {
11
- useValidateProps(props, ChatCardWithSchema.toJSON());
9
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
10
+ useValidateTypescriptPropTypes(propsWithDefault, propTypes);
12
11
  const {
13
12
  title,
14
13
  content,
@@ -1,5 +1,12 @@
1
- import { PropTypes } from 'react-desc';
1
+ import { PropTypes } from '@elliemae/ds-props-helpers';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
3
 
4
+ const defaultProps = {
5
+ title: '',
6
+ content: '',
7
+ time: '',
8
+ rightAddon: /*#__PURE__*/jsx(Fragment, {})
9
+ };
3
10
  const propTypes = {
4
11
  title: PropTypes.string.isRequired.description("Card's title"),
5
12
  content: PropTypes.string.description("Card's content"),
@@ -7,4 +14,4 @@ const propTypes = {
7
14
  rightAddon: PropTypes.element.description('Right addon, badge or icon')
8
15
  };
9
16
 
10
- export { propTypes };
17
+ export { defaultProps, propTypes };
@@ -2,22 +2,22 @@ import styled from 'styled-components';
2
2
  import { Grid } from '@elliemae/ds-grid';
3
3
 
4
4
  const Wrapper = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-s0g4hn-0"
5
+ componentId: "sc-1x060wl-0"
6
6
  })(["min-width:248px;border:1px;border-bottom:1px solid #ccc;padding:12px 12px;"]);
7
7
  const MainContent = /*#__PURE__*/styled.div.withConfig({
8
- componentId: "sc-s0g4hn-1"
8
+ componentId: "sc-1x060wl-1"
9
9
  })([""]);
10
10
  const Title = /*#__PURE__*/styled.p.withConfig({
11
- componentId: "sc-s0g4hn-2"
11
+ componentId: "sc-1x060wl-2"
12
12
  })(["font-size:16px;font-weight:600;margin:0;"]);
13
13
  const Content = /*#__PURE__*/styled.p.withConfig({
14
- componentId: "sc-s0g4hn-3"
14
+ componentId: "sc-1x060wl-3"
15
15
  })(["font-size:12px;font-weight:400;line-height:1;margin:0;"]);
16
16
  const Time = /*#__PURE__*/styled.p.withConfig({
17
- componentId: "sc-s0g4hn-4"
17
+ componentId: "sc-1x060wl-4"
18
18
  })(["font-size:12px;font-weight:100;margin:0;margin-top:8px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.regular, props => props.theme.colors.neutral['500']);
19
19
  const RightAddon = /*#__PURE__*/styled.div.withConfig({
20
- componentId: "sc-s0g4hn-5"
20
+ componentId: "sc-1x060wl-5"
21
21
  })(["height:fit-content;margin-left:12px;"]);
22
22
 
23
23
  export { Content, MainContent, RightAddon, Time, Title, Wrapper };
@@ -1,19 +1,21 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
3
4
  import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
4
5
  import { StyledChatContainerContentHeader, StyledChatContainerContentHeaderLabel, StyledChatContainerContentHeaderActions } from './styled.js';
6
+ import { propTypes, defaultProps } from './props.js';
5
7
  import { validHeaderChilds } from './helpers.js';
6
8
 
7
9
  const ChatContainerHeader = props => {
10
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
11
+ useValidateTypescriptPropTypes(propsWithDefault, propTypes);
8
12
  const {
9
13
  title,
10
- floating,
11
14
  children
12
- } = props;
15
+ } = propsWithDefault;
13
16
  return /*#__PURE__*/_jsx(StyledChatContainerContentHeader, {
14
17
  alignItems: "center",
15
18
  cols: ['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px'],
16
- floating: floating,
17
19
  role: "heading"
18
20
  }, void 0, /*#__PURE__*/_jsx(StyledChatContainerContentHeaderLabel, {
19
21
  "data-testid": "chat-container-header-title",
@@ -28,4 +30,7 @@ const ChatContainerHeader = props => {
28
30
  }, void 0, children));
29
31
  };
30
32
 
31
- export { ChatContainerHeader };
33
+ const ChatContainerHeaderWithSchema = describe(ChatContainerHeader);
34
+ ChatContainerHeaderWithSchema.propTypes = propTypes;
35
+
36
+ export { ChatContainerHeader, ChatContainerHeaderWithSchema };
@@ -0,0 +1,13 @@
1
+ import { PropTypes } from '@elliemae/ds-props-helpers';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+
4
+ const defaultProps = {
5
+ title: '',
6
+ children: /*#__PURE__*/jsx(Fragment, {})
7
+ };
8
+ const propTypes = {
9
+ title: PropTypes.string.isRequired.description("Card's title"),
10
+ children: PropTypes.node.description('Childrens')
11
+ };
12
+
13
+ export { defaultProps, propTypes };
@@ -2,13 +2,13 @@ import styled from 'styled-components';
2
2
  import { Grid } from '@elliemae/ds-grid';
3
3
 
4
4
  const StyledChatContainerContentHeaderActions = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-jmynvr-0"
5
+ componentId: "sc-rsxerm-0"
6
6
  })(["max-width:80px;"]);
7
7
  const StyledChatContainerContentHeader = /*#__PURE__*/styled(Grid).withConfig({
8
- componentId: "sc-jmynvr-1"
8
+ componentId: "sc-rsxerm-1"
9
9
  })(["width:100%;min-height:48px;border-bottom:1px solid ", ";background:", ";", "{& button{background:transparent;}}"], props => props.theme.colors.neutral['200'], props => props.theme.colors.neutral['050'], StyledChatContainerContentHeaderActions);
10
10
  const StyledChatContainerContentHeaderLabel = /*#__PURE__*/styled(Grid).withConfig({
11
- componentId: "sc-jmynvr-2"
11
+ componentId: "sc-rsxerm-2"
12
12
  })(["justify-content:center;align-items:center;font-weight:bold;font-size:18px;color:", ";"], props => props.theme.colors.neutral['700']);
13
13
 
14
14
  export { StyledChatContainerContentHeader, StyledChatContainerContentHeaderActions, StyledChatContainerContentHeaderLabel };
@@ -1,21 +1,20 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'core-js/modules/web.url.to-json.js';
3
2
  import { useMemo } from 'react';
4
- import { describe } from 'react-desc';
3
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
5
4
  import { Grid } from '@elliemae/ds-grid';
6
5
  import { Communications } from '@elliemae/ds-icons';
7
6
  import { emptyStateProps, defaultProps } from './props.js';
8
7
  import { MessageWrapper, ChatEmptyStateWrapper } from './styled.js';
9
- import { useValidateProps } from './config/useValidateProps.js';
10
8
 
11
9
  const ChatEmptyState = props => {
12
10
  var _Grid, _Grid2;
13
11
 
14
- useValidateProps(props, ChatEmptyStateListWithSchema.toJSON());
12
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
13
+ useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps);
15
14
  const {
16
15
  label,
17
16
  action
18
- } = props;
17
+ } = propsWithDefault;
19
18
  const MainContent = useMemo(() => /*#__PURE__*/_jsx(Grid, {
20
19
  alignItems: "center",
21
20
  justifyContent: "center"
@@ -38,8 +37,7 @@ const ChatEmptyState = props => {
38
37
  }, void 0, MainContent);
39
38
  };
40
39
 
41
- ChatEmptyState.defaultProps = defaultProps;
42
- const ChatEmptyStateListWithSchema = describe(ChatEmptyState);
43
- ChatEmptyStateListWithSchema.propTypes = emptyStateProps;
40
+ const ChatEmptyStateWithSchema = describe(ChatEmptyState);
41
+ ChatEmptyStateWithSchema.propTypes = emptyStateProps;
44
42
 
45
- export { ChatEmptyState, ChatEmptyStateListWithSchema };
43
+ export { ChatEmptyState, ChatEmptyStateWithSchema };
@@ -0,0 +1,13 @@
1
+ import { PropTypes } from '@elliemae/ds-props-helpers';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+
4
+ const defaultProps = {
5
+ label: 'No Messages Yet',
6
+ action: /*#__PURE__*/jsx(Fragment, {})
7
+ };
8
+ const emptyStateProps = {
9
+ label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),
10
+ action: PropTypes.node.description('action element').defaultValue(defaultProps.action)
11
+ };
12
+
13
+ export { defaultProps, emptyStateProps };
@@ -3,10 +3,10 @@ import { Grid } from '@elliemae/ds-grid';
3
3
 
4
4
  const CONTAINER_WIDTH = 300;
5
5
  const ChatEmptyStateWrapper = /*#__PURE__*/styled(Grid).withConfig({
6
- componentId: "sc-1tutmen-0"
6
+ componentId: "sc-16zzc1w-0"
7
7
  })(["height:100%;min-width:", "px;overflow:hidden;background:", ";"], CONTAINER_WIDTH, props => props.theme.colors.neutral['050']);
8
8
  const MessageWrapper = /*#__PURE__*/styled.p.withConfig({
9
- componentId: "sc-1tutmen-1"
9
+ componentId: "sc-16zzc1w-1"
10
10
  })(["font-size:18px;"]);
11
11
 
12
12
  export { CONTAINER_WIDTH, ChatEmptyStateWrapper, MessageWrapper };
@@ -1,6 +1,5 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
- import 'core-js/modules/web.url.to-json.js';
4
3
  import 'core-js/modules/esnext.async-iterator.map.js';
5
4
  import 'core-js/modules/esnext.iterator.map.js';
6
5
  import 'core-js/modules/esnext.async-iterator.filter.js';
@@ -9,13 +8,12 @@ import 'core-js/modules/esnext.iterator.filter.js';
9
8
  import 'core-js/modules/esnext.async-iterator.for-each.js';
10
9
  import 'core-js/modules/esnext.iterator.for-each.js';
11
10
  import React from 'react';
12
- import { describe } from 'react-desc';
11
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
13
12
  import { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';
14
13
  import { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';
15
14
  import { TileButton } from '../tile-button/TileButton.js';
16
- import { SidebarButton } from '../sidebar-button/SidebarButton.js';
15
+ import { SidebarButton } from './sidebar-button/SidebarButton.js';
17
16
  import { chatSidebarProps, defaultProps } from './props.js';
18
- import { useValidateProps } from './config/useValidateProps.js';
19
17
  import { jsxs, jsx } from 'react/jsx-runtime';
20
18
 
21
19
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -31,7 +29,6 @@ const FooterChat = _ref => {
31
29
  } = _ref;
32
30
  return /*#__PURE__*/_jsx(SidebarButton, {
33
31
  dsId: "sidebar_footer",
34
- label: null,
35
32
  Icon: !expanded ? MenuCollapse : MenuExpand,
36
33
  onClick: expanded ? onFooterClose : onFooterExpand,
37
34
  "aria-pressed": expanded,
@@ -40,7 +37,8 @@ const FooterChat = _ref => {
40
37
  };
41
38
 
42
39
  const SideBarChat = props => {
43
- useValidateProps(props, SideBarChatWithSchema.toJSON());
40
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
41
+ useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);
44
42
  const {
45
43
  sidebarItems,
46
44
  expanded,
@@ -51,7 +49,7 @@ const SideBarChat = props => {
51
49
  tooltipPlacement,
52
50
  enableTooltipWhenIsClosed,
53
51
  actionRef
54
- } = props;
52
+ } = propsWithDefault;
55
53
  const {
56
54
  current: listRef
57
55
  } = React.useRef({});
@@ -59,7 +57,9 @@ const SideBarChat = props => {
59
57
  if (ref) listRef[ref.dataset.key] = ref;
60
58
  }, [listRef]);
61
59
  React.useEffect(() => {
62
- if (actionRef.current.listRef) {
60
+ var _actionRef$current;
61
+
62
+ if ((_actionRef$current = actionRef.current) !== null && _actionRef$current !== void 0 && _actionRef$current.listRef) {
63
63
  actionRef.current.listRef = listRef;
64
64
  }
65
65
  }, [sidebarItems, expanded, actionRef, listRef]);
@@ -81,7 +81,6 @@ const SideBarChat = props => {
81
81
  });
82
82
  };
83
83
 
84
- SideBarChat.defaultProps = defaultProps;
85
84
  const SideBarChatWithSchema = describe(SideBarChat);
86
85
  SideBarChatWithSchema.propTypes = chatSidebarProps;
87
86
 
@@ -1,3 +1,4 @@
1
+ import { createRef } from 'react';
1
2
  import { PropTypes } from 'react-desc';
2
3
  import { noop } from 'lodash';
3
4
 
@@ -14,11 +15,7 @@ const defaultProps = {
14
15
  },
15
16
  tooltipPlacement: 'right',
16
17
  enableTooltipWhenIsClosed: false,
17
- actionRef: {
18
- current: {
19
- listRef: []
20
- }
21
- }
18
+ actionRef: /*#__PURE__*/createRef()
22
19
  };
23
20
  const chatSidebarProps = {
24
21
  sidebarItems: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat').defaultValue(defaultProps.sidebarItems),
@@ -26,7 +26,7 @@ const SidebarButton = _ref => {
26
26
  rest = _objectWithoutProperties(_ref, _excluded);
27
27
 
28
28
  const handleClick = React.useCallback(() => {
29
- onClick(dsId);
29
+ if (dsId) onClick(dsId);
30
30
  }, [onClick, dsId]);
31
31
  return /*#__PURE__*/jsxs(StyledSidebarButton, _objectSpread(_objectSpread({
32
32
  "data-testid": "sidebar-button-".concat(dsId),
@@ -1,18 +1,17 @@
1
- import propsTypes from 'prop-types';
2
- import { PropTypes } from 'react-desc';
1
+ import { PropTypes } from '@elliemae/ds-props-helpers';
3
2
  import { noop } from 'lodash';
4
3
  import { Comments } from '@elliemae/ds-icons';
5
4
 
6
5
  const defaultSidebarButton = {
7
6
  Icon: Comments,
8
- dsId: undefined,
7
+ dsId: '',
9
8
  label: '',
10
9
  onClick: noop,
11
10
  title: ''
12
11
  };
13
12
  const propsSidebarButton = {
14
13
  Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),
15
- dsId: PropTypes.oneOfType([propsTypes.number, propsTypes.string]).description('Unique id for the button').defaultValue(defaultSidebarButton.dsId),
14
+ dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('Unique id for the button').defaultValue(defaultSidebarButton.dsId),
16
15
  label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),
17
16
  title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),
18
17
  onClick: PropTypes.func.description('The function to call when the is clicked').defaultValue(defaultSidebarButton.onClick)
@@ -1,15 +1,15 @@
1
1
  import styled from 'styled-components';
2
2
  import { Grid } from '@elliemae/ds-grid';
3
- import { BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR } from '../../styled.js';
3
+ import { BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR } from '../../../styled.js';
4
4
 
5
5
  const StyledSidebarButton = /*#__PURE__*/styled.button.withConfig({
6
- componentId: "sc-6ygly3-0"
6
+ componentId: "sc-1k6wb46-0"
7
7
  })(["display:flex;align-items:center;justify-content:center;outline:none;height:", "px;width:", "px;position:relative;border:0;background:transparent;&:focus,&:hover{background:", ";}cursor:pointer;border-bottom:1px solid ", ";svg{fill:", ";}"], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['080'], props => props.theme.colors.neutral['200'], props => props.theme.colors.neutral[500]);
8
8
  const StyledSidebarButtonIcon = /*#__PURE__*/styled(Grid).withConfig({
9
- componentId: "sc-6ygly3-1"
9
+ componentId: "sc-1k6wb46-1"
10
10
  })(["position:relative;"]);
11
11
  const StyledSidebarButtonLabel = /*#__PURE__*/styled.div.withConfig({
12
- componentId: "sc-6ygly3-2"
12
+ componentId: "sc-1k6wb46-2"
13
13
  })(["width:30px;text-transform:uppercase;overflow:hidden;text-align:center;"]);
14
14
 
15
15
  export { StyledSidebarButton, StyledSidebarButtonIcon, StyledSidebarButtonLabel };
@@ -3,10 +3,10 @@ import { Grid } from '@elliemae/ds-grid';
3
3
  import { MIN_WIDTH_SIDEBAR, BUTTON_SIDEBAR_HEIGHT } from '../../styled.js';
4
4
 
5
5
  const StyledSideBarContainer = /*#__PURE__*/styled(Grid).withConfig({
6
- componentId: "sc-16uijso-0"
6
+ componentId: "sc-18v8jb-0"
7
7
  })(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";overflow:hidden;"], MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
8
8
  const StyledSideBarButtonsContainer = /*#__PURE__*/styled(Grid).withConfig({
9
- componentId: "sc-16uijso-1"
9
+ componentId: "sc-18v8jb-1"
10
10
  })(["overflow-y:auto;align-items:flex-start;justify-content:flex-start;grid-template-rows:repeat(auto-fill,", "px);overflow-x:hidden;scrollbar-width:thin;&::-webkit-scrollbar{width:6px;}"], BUTTON_SIDEBAR_HEIGHT);
11
11
 
12
12
  export { StyledSideBarButtonsContainer, StyledSideBarContainer };
@@ -0,0 +1,33 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
4
+ import { Comments } from '@elliemae/ds-icons';
5
+ import { StyledFloatingButton } from './styled.js';
6
+ import { propsFloatingButton, defaultFloatingButton } from './props.js';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ var _Comments;
10
+
11
+ const FloatingButton = props => {
12
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultFloatingButton);
13
+ useValidateTypescriptPropTypes(propsWithDefault, propsFloatingButton);
14
+ const {
15
+ onFocus,
16
+ innerRef,
17
+ onClick
18
+ } = propsWithDefault;
19
+ return /*#__PURE__*/jsx(StyledFloatingButton, {
20
+ onFocus: onFocus,
21
+ ref: innerRef,
22
+ "data-testid": "chat-floating-button",
23
+ onClick: onClick,
24
+ children: _Comments || (_Comments = /*#__PURE__*/_jsx(Comments, {
25
+ size: "l"
26
+ }))
27
+ });
28
+ };
29
+
30
+ const FloatingButtonWithSchema = describe(FloatingButton);
31
+ FloatingButtonWithSchema.propTypes = propsFloatingButton;
32
+
33
+ export { FloatingButton, FloatingButtonWithSchema };
@@ -0,0 +1 @@
1
+ export { FloatingButton, FloatingButtonWithSchema } from './FloatingButton.js';
@@ -4,7 +4,7 @@ const BUTTON_FLOATING = 56;
4
4
  const BOX_SHADOW = '0 5px 8px 0 rgba(53,60,70,0.55)';
5
5
  const BOX_SHADOW_FLOATING = '0 5px 8px 0 rgba(53,60,70,0.35)';
6
6
  const StyledFloatingButton = /*#__PURE__*/styled.button.withConfig({
7
- componentId: "sc-vlozhu-0"
7
+ componentId: "sc-1i0yavm-0"
8
8
  })(["outline:none;cursor:pointer;height:", "px;width:", "px;border:none;background:", ";border-radius:50%;box-shadow:", ";&:hover{background:", ";}&:focus{border:2px solid ", ";box-shadow:inset 0 0 0 2px ", ",", ";}&:active{background:", ";box-shadow:inset 0 0 0 0,", ";}svg{fill:", ";}"], BUTTON_FLOATING, BUTTON_FLOATING, props => props.theme.colors.brand[600], BOX_SHADOW_FLOATING, props => props.theme.colors.brand[700], props => props.theme.colors.brand[700], props => props.theme.colors.neutral['000'], BOX_SHADOW, props => props.theme.colors.brand[800], BOX_SHADOW_FLOATING, props => props.theme.colors.neutral['000']);
9
9
 
10
10
  export { StyledFloatingButton };
@@ -3,7 +3,7 @@ import { Grid } from '@elliemae/ds-grid';
3
3
  import { BOX_SHADOW } from '../../styled.js';
4
4
 
5
5
  const StyledFloatingContainer = /*#__PURE__*/styled(Grid).withConfig({
6
- componentId: "sc-nqvrts-0"
6
+ componentId: "sc-1qjulsq-0"
7
7
  })(["position:fixed;bottom:24px;right:24px;border-radius:4px;z-index:1;box-shadow:", ";background:", ";width:348px;"], BOX_SHADOW, nestedProps => nestedProps.theme.colors.neutral['050']);
8
8
 
9
9
  export { StyledFloatingContainer };
@@ -1,7 +1,7 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import React from 'react';
3
3
  import { StyledChatContainer } from './styled.js';
4
- import { ChatContainer } from '../chat-container/ChatContainer.js';
4
+ import { ChatContainer } from '../../parts/chat-container/ChatContainer.js';
5
5
  import { SideBarChat } from '../chat-sidebar/SideBarChat.js';
6
6
 
7
7
  var _SideBarChat, _ChatContainer, _div;
@@ -3,10 +3,10 @@ import { Grid } from '@elliemae/ds-grid';
3
3
  import { MIN_WIDTH_SIDEBAR } from '../../styled.js';
4
4
 
5
5
  const StyledChatContainer = /*#__PURE__*/styled(Grid).withConfig({
6
- componentId: "sc-b6t5vk-0"
6
+ componentId: "sc-15373cc-0"
7
7
  })(["height:100%;width:", ";background:", ";box-shadow:-1px 0 0 0 ", ";transition:width ", " 350ms;"], props => props.expanded ? "".concat(props.expandedWidth, "px") : "".concat(MIN_WIDTH_SIDEBAR, "px"), props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral[100], props => props.expanded ? 'ease-out' : 'ease-in');
8
8
  const StyledChatContainerContent = /*#__PURE__*/styled(Grid).withConfig({
9
- componentId: "sc-b6t5vk-1"
9
+ componentId: "sc-15373cc-1"
10
10
  })(["height:100%;overflow:hidden;background:", ";", ""], props => props.theme.colors.neutral['050'], props => props.floating ? "\n width: ".concat(props.expandedWidth, "px;\n") : "\n width: ".concat(props.expandedWidth - MIN_WIDTH_SIDEBAR, "px;\n"));
11
11
 
12
12
  export { StyledChatContainer, StyledChatContainerContent };
@@ -0,0 +1,11 @@
1
+ export { ChatBubble, ChatBubbleWithSchema } from './bubble/ChatBubble.js';
2
+ export { BUBBLE_TYPES } from './bubble/props.js';
3
+ export { FloatingButton } from './floating-button/FloatingButton.js';
4
+ export { StyledFloatingContainer } from './floating-container/styled.js';
5
+ export { ChatContainerHeader, ChatContainerHeaderWithSchema } from './chat-container-header/ChatContainerHeader.js';
6
+ export { ChatEmptyState, ChatEmptyStateWithSchema } from './chat-empty-state/ChatEmptyState.js';
7
+ export { SideBarChat, SideBarChatWithSchema } from './chat-sidebar/SideBarChat.js';
8
+ export { TileButton, TileButtonWithSchema } from './tile-button/TileButton.js';
9
+ export { MessageDelimiter, MessageDelimiterWithSchema } from './message-delimiter/MessageDelimiter.js';
10
+ export { SystemMessage, SystemMessageWithSchema } from './system-message/SystemMessage.js';
11
+ export { ChatCard, ChatCardWithSchema } from './chat-card/ChatCard.js';
@@ -0,0 +1,43 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import 'react';
9
+ import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
10
+ import { Wrapper, Line, Text } from './styled.js';
11
+ import { messageDelimiterProps, defaultProps } from './props.js';
12
+ import { jsxs } from 'react/jsx-runtime';
13
+
14
+ var _Line, _Line2;
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ const MessageDelimiter = props => {
21
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
22
+ useValidateTypescriptPropTypes(propsWithDefault, messageDelimiterProps);
23
+ const globalAttrs = useGetGlobalAttributes(propsWithDefault);
24
+ const {
25
+ title,
26
+ size,
27
+ verticalMargin
28
+ } = propsWithDefault;
29
+ return /*#__PURE__*/jsxs(Wrapper, _objectSpread(_objectSpread({
30
+ cols: ['1fr', 'auto', '1fr']
31
+ }, globalAttrs), {}, {
32
+ children: [_Line || (_Line = /*#__PURE__*/_jsx(Line, {})), /*#__PURE__*/_jsx(Text, {
33
+ size: size,
34
+ verticalMargin: verticalMargin,
35
+ "data-testid": "chat-message-delimiter-title"
36
+ }, void 0, title), _Line2 || (_Line2 = /*#__PURE__*/_jsx(Line, {}))]
37
+ }));
38
+ };
39
+
40
+ const MessageDelimiterWithSchema = describe(MessageDelimiter);
41
+ MessageDelimiterWithSchema.propTypes = messageDelimiterProps;
42
+
43
+ export { MessageDelimiter, MessageDelimiterWithSchema };
@@ -0,0 +1,24 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';
8
+
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
+
11
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
+ const defaultProps = {
13
+ title: '',
14
+ size: 's',
15
+ verticalMargin: '0px'
16
+ };
17
+ const messageDelimiterProps = _objectSpread(_objectSpread({}, globalAttributesPropTypes), {}, {
18
+ title: PropTypes.string.isRequired.description('Text to display in the delimiter'),
19
+ size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),
20
+ extraProps: PropTypes.object.description('extra props for delimiter'),
21
+ verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Configurable css vertical margin property for flexibilty')
22
+ });
23
+
24
+ export { defaultProps, messageDelimiterProps };
@@ -2,13 +2,13 @@ import { Grid } from '@elliemae/ds-grid';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  const Wrapper = /*#__PURE__*/styled(Grid).withConfig({
5
- componentId: "sc-upz0rt-0"
5
+ componentId: "sc-1oelxl4-0"
6
6
  })(["align-items:center;justify-content:center;width:100%;min-height:8px;"]);
7
7
  const Line = /*#__PURE__*/styled.span.withConfig({
8
- componentId: "sc-upz0rt-1"
8
+ componentId: "sc-1oelxl4-1"
9
9
  })(["border-top:1px solid ", ";"], props => props.theme.colors.neutral['400']);
10
10
  const Text = /*#__PURE__*/styled.p.withConfig({
11
- componentId: "sc-upz0rt-2"
11
+ componentId: "sc-1oelxl4-2"
12
12
  })(["color:", ";font-size:", ";font-weight:", ";margin:", ";"], props => props.theme.colors.neutral['600'], props => props.size === 's' ? '12px' : '14px', props => props.theme.fontWeights.semibold, props => typeof props.verticalMargin === 'number' ? "".concat(props.verticalMargin, "px 8px") : "".concat(props.verticalMargin, " 8px"));
13
13
 
14
14
  export { Line, Text, Wrapper };