@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.
- package/cjs/{parts → exported-related}/bubble/ChatBubble.js +8 -10
- package/cjs/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
- package/cjs/{parts → exported-related}/bubble/index.js +0 -0
- package/cjs/exported-related/bubble/props.js +43 -0
- package/cjs/{parts → exported-related}/bubble/styled.js +9 -9
- package/cjs/{parts → exported-related}/chat-card/ChatCard.js +6 -7
- package/cjs/{parts → exported-related}/chat-card/index.js +0 -0
- package/cjs/exported-related/chat-card/props.js +22 -0
- package/cjs/{parts → exported-related}/chat-card/styled.js +6 -6
- package/cjs/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +10 -4
- package/cjs/{parts → exported-related}/chat-container-header/helpers.js +0 -0
- package/cjs/exported-related/chat-container-header/props.js +18 -0
- package/cjs/{parts → exported-related}/chat-container-header/styled.js +3 -3
- package/cjs/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +8 -10
- package/cjs/exported-related/chat-empty-state/props.js +18 -0
- package/cjs/{parts → exported-related}/chat-empty-state/styled.js +2 -2
- package/cjs/{parts → exported-related}/chat-sidebar/SideBarChat.js +10 -11
- package/cjs/{parts → exported-related}/chat-sidebar/index.js +0 -0
- package/cjs/{parts → exported-related}/chat-sidebar/props.js +2 -5
- package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
- package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
- package/cjs/exported-related/chat-sidebar/sidebar-button/props.js +25 -0
- package/cjs/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
- package/cjs/{parts → exported-related}/chat-sidebar/styled.js +2 -2
- package/cjs/{parts → exported-related}/floating-button/FloatingButton.js +13 -6
- package/cjs/{parts → exported-related}/floating-button/index.js +1 -0
- package/cjs/{parts → exported-related}/floating-button/props.js +0 -0
- package/cjs/{parts → exported-related}/floating-button/styled.js +1 -1
- package/cjs/{parts → exported-related}/floating-container/styled.js +1 -1
- package/cjs/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
- package/cjs/{parts → exported-related}/grid-influencer/styled.js +2 -2
- package/cjs/exported-related/index.js +37 -0
- package/cjs/exported-related/message-delimiter/MessageDelimiter.js +53 -0
- package/cjs/{parts → exported-related}/message-delimiter/index.js +0 -0
- package/cjs/exported-related/message-delimiter/props.js +33 -0
- package/cjs/{parts → exported-related}/message-delimiter/styled.js +3 -3
- package/cjs/{parts → exported-related}/system-message/SystemMessage.js +6 -8
- package/cjs/{parts → exported-related}/system-message/index.js +0 -0
- package/cjs/{parts → exported-related}/system-message/props.js +0 -0
- package/cjs/{parts → exported-related}/system-message/style.js +5 -5
- package/cjs/{parts → exported-related}/tile-button/TileButton.js +7 -9
- package/cjs/{parts → exported-related}/tile-button/index.js +0 -0
- package/cjs/exported-related/tile-button/props.js +55 -0
- package/cjs/{parts → exported-related}/tile-button/styled.js +9 -9
- package/cjs/index.js +29 -18
- package/cjs/parts/chat-composer/ChatContainerComposer.js +7 -9
- package/cjs/parts/chat-container/ChatContainer.js +18 -20
- package/cjs/parts/chat-container/styled.js +2 -2
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +74 -64
- package/cjs/parts/chat-container-messages-list/styled.js +2 -2
- package/cjs/parts/index.js +16 -0
- package/cjs/react-desc-prop-types.js +116 -0
- package/esm/{parts → exported-related}/bubble/ChatBubble.js +7 -9
- package/esm/{parts → exported-related}/bubble/ChatBubbleArrow.js +0 -0
- package/esm/{parts → exported-related}/bubble/index.js +0 -0
- package/esm/{parts → exported-related}/bubble/props.js +14 -24
- package/esm/{parts → exported-related}/bubble/styled.js +9 -9
- package/esm/{parts → exported-related}/chat-card/ChatCard.js +4 -5
- package/esm/{parts → exported-related}/chat-card/index.js +0 -0
- package/esm/{parts → exported-related}/chat-card/props.js +9 -2
- package/esm/{parts → exported-related}/chat-card/styled.js +6 -6
- package/esm/{parts → exported-related}/chat-container-header/ChatContainerHeader.js +9 -4
- package/esm/{parts → exported-related}/chat-container-header/helpers.js +0 -0
- package/esm/exported-related/chat-container-header/props.js +13 -0
- package/esm/{parts → exported-related}/chat-container-header/styled.js +3 -3
- package/esm/{parts → exported-related}/chat-empty-state/ChatEmptyState.js +7 -9
- package/esm/exported-related/chat-empty-state/props.js +13 -0
- package/esm/{parts → exported-related}/chat-empty-state/styled.js +2 -2
- package/esm/{parts → exported-related}/chat-sidebar/SideBarChat.js +8 -9
- package/esm/{parts → exported-related}/chat-sidebar/index.js +0 -0
- package/esm/{parts → exported-related}/chat-sidebar/props.js +2 -5
- package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/SidebarButton.js +1 -1
- package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/index.js +0 -0
- package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/props.js +3 -4
- package/esm/{parts → exported-related/chat-sidebar}/sidebar-button/styled.js +4 -4
- package/esm/{parts → exported-related}/chat-sidebar/styled.js +2 -2
- package/esm/exported-related/floating-button/FloatingButton.js +33 -0
- package/esm/exported-related/floating-button/index.js +1 -0
- package/esm/{parts → exported-related}/floating-button/props.js +0 -0
- package/esm/{parts → exported-related}/floating-button/styled.js +1 -1
- package/esm/{parts → exported-related}/floating-container/styled.js +1 -1
- package/esm/{parts → exported-related}/grid-influencer/InfluencerContainer.js +1 -1
- package/esm/{parts → exported-related}/grid-influencer/styled.js +2 -2
- package/esm/exported-related/index.js +11 -0
- package/esm/exported-related/message-delimiter/MessageDelimiter.js +43 -0
- package/esm/{parts → exported-related}/message-delimiter/index.js +0 -0
- package/esm/exported-related/message-delimiter/props.js +24 -0
- package/esm/{parts → exported-related}/message-delimiter/styled.js +3 -3
- package/esm/{parts → exported-related}/system-message/SystemMessage.js +4 -6
- package/esm/{parts → exported-related}/system-message/index.js +0 -0
- package/esm/{parts → exported-related}/system-message/props.js +0 -0
- package/esm/{parts → exported-related}/system-message/style.js +5 -5
- package/esm/{parts → exported-related}/tile-button/TileButton.js +5 -7
- package/esm/{parts → exported-related}/tile-button/index.js +0 -0
- package/esm/{parts → exported-related}/tile-button/props.js +3 -3
- package/esm/{parts → exported-related}/tile-button/styled.js +9 -9
- package/esm/index.js +14 -12
- package/esm/parts/chat-composer/ChatContainerComposer.js +9 -11
- package/esm/parts/chat-container/ChatContainer.js +16 -18
- package/esm/parts/chat-container/styled.js +2 -2
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +70 -60
- package/esm/parts/chat-container-messages-list/styled.js +2 -2
- package/esm/parts/index.js +3 -0
- package/esm/react-desc-prop-types.js +103 -0
- package/package.json +172 -216
- package/types/exported-related/bubble/ChatBubble.d.ts +5 -0
- package/types/{parts → exported-related}/bubble/ChatBubbleArrow.d.ts +1 -1
- package/types/{parts → exported-related}/bubble/index.d.ts +0 -0
- package/types/{parts → exported-related}/bubble/props.d.ts +7 -26
- package/types/{parts → exported-related}/bubble/styled.d.ts +11 -7
- package/types/{parts → exported-related}/bubble/tests/ChatBubble.test.d.ts +0 -0
- package/types/exported-related/chat-card/ChatCard.d.ts +5 -0
- package/types/{parts → exported-related}/chat-card/index.d.ts +0 -0
- package/types/exported-related/chat-card/props.d.ts +14 -0
- package/types/{parts → exported-related}/chat-card/styled.d.ts +0 -0
- package/types/exported-related/chat-container-header/ChatContainerHeader.d.ts +5 -0
- package/types/{parts → exported-related}/chat-container-header/helpers.d.ts +2 -2
- package/types/exported-related/chat-container-header/props.d.ts +10 -0
- package/types/{parts → exported-related}/chat-container-header/styled.d.ts +0 -0
- package/types/exported-related/chat-empty-state/ChatEmptyState.d.ts +5 -0
- package/types/exported-related/chat-empty-state/props.d.ts +10 -0
- package/types/{parts → exported-related}/chat-empty-state/styled.d.ts +0 -0
- package/types/exported-related/chat-sidebar/SideBarChat.d.ts +5 -0
- package/types/{parts → exported-related}/chat-sidebar/index.d.ts +0 -0
- package/types/{parts → exported-related}/chat-sidebar/props.d.ts +4 -4
- package/types/exported-related/chat-sidebar/sidebar-button/SidebarButton.d.ts +13 -0
- package/types/{parts → exported-related/chat-sidebar}/sidebar-button/index.d.ts +0 -0
- package/types/exported-related/chat-sidebar/sidebar-button/props.d.ts +18 -0
- package/types/{parts → exported-related/chat-sidebar}/sidebar-button/styled.d.ts +0 -0
- package/types/{parts → exported-related}/chat-sidebar/styled.d.ts +0 -0
- package/types/exported-related/floating-button/FloatingButton.d.ts +5 -0
- package/types/{parts → exported-related}/floating-button/index.d.ts +0 -0
- package/types/{parts → exported-related}/floating-button/props.d.ts +0 -0
- package/types/{parts → exported-related}/floating-button/styled.d.ts +0 -0
- package/types/{parts → exported-related}/floating-container/styled.d.ts +0 -0
- package/types/{parts → exported-related}/grid-influencer/InfluencerContainer.d.ts +0 -0
- package/types/{parts → exported-related}/grid-influencer/styled.d.ts +0 -0
- package/types/exported-related/index.d.ts +10 -0
- package/types/exported-related/message-delimiter/MessageDelimiter.d.ts +5 -0
- package/types/{parts → exported-related}/message-delimiter/index.d.ts +0 -0
- package/types/exported-related/message-delimiter/props.d.ts +7 -0
- package/types/{parts → exported-related}/message-delimiter/styled.d.ts +0 -0
- package/types/exported-related/system-message/SystemMessage.d.ts +5 -0
- package/types/{parts → exported-related}/system-message/index.d.ts +0 -0
- package/types/{parts → exported-related}/system-message/props.d.ts +0 -0
- package/types/{parts → exported-related}/system-message/style.d.ts +0 -0
- package/types/exported-related/tile-button/TileButton.d.ts +5 -0
- package/types/{parts → exported-related}/tile-button/index.d.ts +0 -0
- package/types/exported-related/tile-button/props.d.ts +46 -0
- package/types/{parts → exported-related}/tile-button/styled.d.ts +1 -1
- package/types/index.d.ts +4 -13
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +4 -59
- package/types/parts/chat-composer/styled.d.ts +4 -3
- package/types/parts/chat-container/ChatContainer.d.ts +4 -62
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +4 -47
- package/types/parts/chat-container-messages-list/index.d.ts +1 -1
- package/types/parts/chat-container-messages-list/styled.d.ts +1 -2
- package/types/parts/index.d.ts +3 -0
- package/types/react-desc-prop-types.d.ts +94 -0
- package/cjs/index.d.js +0 -2
- package/cjs/parts/bubble/config/useValidateProps.js +0 -31
- package/cjs/parts/bubble/props.js +0 -57
- package/cjs/parts/chat-card/config/useValidateProps.js +0 -11
- package/cjs/parts/chat-card/props.js +0 -14
- package/cjs/parts/chat-composer/config/useValidateProps.js +0 -11
- package/cjs/parts/chat-composer/props.js +0 -44
- package/cjs/parts/chat-container/config/useValidateProps.js +0 -11
- package/cjs/parts/chat-container/index.js +0 -10
- package/cjs/parts/chat-container/props.js +0 -49
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +0 -11
- package/cjs/parts/chat-container-messages-list/props.js +0 -30
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +0 -11
- package/cjs/parts/chat-empty-state/props.js +0 -17
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +0 -11
- package/cjs/parts/message-delimiter/MessageDelimiter.js +0 -41
- package/cjs/parts/message-delimiter/config/useValidateProps.js +0 -11
- package/cjs/parts/message-delimiter/props.js +0 -23
- package/cjs/parts/sidebar-button/props.js +0 -30
- package/cjs/parts/system-message/config/useValidateProps.js +0 -11
- package/cjs/parts/tile-button/config/useValidateProps.js +0 -11
- package/cjs/parts/tile-button/props.js +0 -55
- package/cjs/prop-types.js +0 -33
- package/esm/index.d.js +0 -1
- package/esm/parts/bubble/config/useValidateProps.js +0 -27
- package/esm/parts/chat-card/config/useValidateProps.js +0 -7
- package/esm/parts/chat-composer/config/useValidateProps.js +0 -7
- package/esm/parts/chat-composer/props.js +0 -39
- package/esm/parts/chat-container/config/useValidateProps.js +0 -7
- package/esm/parts/chat-container/index.js +0 -1
- package/esm/parts/chat-container/props.js +0 -44
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +0 -7
- package/esm/parts/chat-container-messages-list/props.js +0 -25
- package/esm/parts/chat-empty-state/config/useValidateProps.js +0 -7
- package/esm/parts/chat-empty-state/props.js +0 -12
- package/esm/parts/chat-sidebar/config/useValidateProps.js +0 -7
- package/esm/parts/floating-button/FloatingButton.js +0 -27
- package/esm/parts/floating-button/index.js +0 -1
- package/esm/parts/message-delimiter/MessageDelimiter.js +0 -32
- package/esm/parts/message-delimiter/config/useValidateProps.js +0 -7
- package/esm/parts/message-delimiter/props.js +0 -18
- package/esm/parts/system-message/config/useValidateProps.js +0 -7
- package/esm/parts/tile-button/config/useValidateProps.js +0 -7
- package/esm/prop-types.js +0 -28
- package/types/index.d.d.ts +0 -37
- package/types/parts/bubble/ChatBubble.d.ts +0 -30
- package/types/parts/bubble/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-card/ChatCard.d.ts +0 -33
- package/types/parts/chat-card/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-card/props.d.ts +0 -29
- package/types/parts/chat-composer/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-container/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-container/index.d.ts +0 -1
- package/types/parts/chat-container-header/ChatContainerHeader.d.ts +0 -2
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +0 -21
- package/types/parts/chat-empty-state/config/useValidateProps.d.ts +0 -2
- package/types/parts/chat-empty-state/props.d.ts +0 -15
- package/types/parts/chat-sidebar/SideBarChat.d.ts +0 -48
- package/types/parts/chat-sidebar/config/useValidateProps.d.ts +0 -2
- package/types/parts/floating-button/FloatingButton.d.ts +0 -18
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +0 -31
- package/types/parts/message-delimiter/config/useValidateProps.d.ts +0 -2
- package/types/parts/message-delimiter/props.d.ts +0 -26
- package/types/parts/sidebar-button/SidebarButton.d.ts +0 -24
- package/types/parts/sidebar-button/props.d.ts +0 -29
- package/types/parts/system-message/SystemMessage.d.ts +0 -23
- package/types/parts/system-message/config/useValidateProps.d.ts +0 -2
- package/types/parts/tile-button/TileButton.d.ts +0 -75
- package/types/parts/tile-button/config/useValidateProps.d.ts +0 -2
- package/types/parts/tile-button/props.d.ts +0 -88
- 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-
|
|
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-
|
|
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-
|
|
15
|
+
componentId: "sc-57v3aa-2"
|
|
16
16
|
})(["font-size:13px;font-weight:600;"]);
|
|
17
17
|
const StyledTitleRightBubble = /*#__PURE__*/styled(Grid).withConfig({
|
|
18
|
-
componentId: "sc-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 '
|
|
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
|
-
|
|
9
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
10
|
+
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
12
11
|
const {
|
|
13
12
|
title,
|
|
14
13
|
content,
|
|
File without changes
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { PropTypes } from '
|
|
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-
|
|
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-
|
|
8
|
+
componentId: "sc-1x060wl-1"
|
|
9
9
|
})([""]);
|
|
10
10
|
const Title = /*#__PURE__*/styled.p.withConfig({
|
|
11
|
-
componentId: "sc-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
} =
|
|
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
|
-
|
|
33
|
+
const ChatContainerHeaderWithSchema = describe(ChatContainerHeader);
|
|
34
|
+
ChatContainerHeaderWithSchema.propTypes = propTypes;
|
|
35
|
+
|
|
36
|
+
export { ChatContainerHeader, ChatContainerHeaderWithSchema };
|
|
File without changes
|
|
@@ -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-
|
|
5
|
+
componentId: "sc-rsxerm-0"
|
|
6
6
|
})(["max-width:80px;"]);
|
|
7
7
|
const StyledChatContainerContentHeader = /*#__PURE__*/styled(Grid).withConfig({
|
|
8
|
-
componentId: "sc-
|
|
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-
|
|
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 '
|
|
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
|
-
|
|
12
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
13
|
+
useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps);
|
|
15
14
|
const {
|
|
16
15
|
label,
|
|
17
16
|
action
|
|
18
|
-
} =
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
ChatEmptyStateListWithSchema.propTypes = emptyStateProps;
|
|
40
|
+
const ChatEmptyStateWithSchema = describe(ChatEmptyState);
|
|
41
|
+
ChatEmptyStateWithSchema.propTypes = emptyStateProps;
|
|
44
42
|
|
|
45
|
-
export { ChatEmptyState,
|
|
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-
|
|
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-
|
|
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 '
|
|
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 '
|
|
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
|
-
|
|
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
|
-
} =
|
|
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
|
-
|
|
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
|
|
|
File without changes
|
|
@@ -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),
|
|
File without changes
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
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:
|
|
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([
|
|
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 '
|
|
3
|
+
import { BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR } from '../../../styled.js';
|
|
4
4
|
|
|
5
5
|
const StyledSidebarButton = /*#__PURE__*/styled.button.withConfig({
|
|
6
|
-
componentId: "sc-
|
|
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-
|
|
9
|
+
componentId: "sc-1k6wb46-1"
|
|
10
10
|
})(["position:relative;"]);
|
|
11
11
|
const StyledSidebarButtonLabel = /*#__PURE__*/styled.div.withConfig({
|
|
12
|
-
componentId: "sc-
|
|
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-
|
|
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-
|
|
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';
|
|
File without changes
|
|
@@ -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-
|
|
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-
|
|
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 '
|
|
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-
|
|
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-
|
|
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 };
|
|
File without changes
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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 };
|