@elliemae/ds-chat 2.0.0-next.0 → 2.0.0-next.12
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/bubble/ChatBubble.js +15 -12
- package/cjs/parts/bubble/ChatBubbleArrow.js +64 -61
- package/cjs/parts/bubble/config/useValidateProps.js +5 -6
- package/cjs/parts/bubble/props.js +1 -1
- package/cjs/parts/bubble/styled.js +2 -31
- package/cjs/parts/chat-card/props.js +2 -2
- package/cjs/parts/chat-composer/ChatContainerComposer.js +16 -8
- package/cjs/parts/chat-composer/props.js +5 -11
- package/cjs/parts/chat-composer/styled.js +4 -4
- package/cjs/parts/chat-container/ChatContainer.js +50 -9
- package/cjs/parts/chat-container/props.js +2 -12
- package/cjs/parts/chat-container/styled.js +1 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +3 -3
- package/cjs/parts/chat-container-header/helpers.js +31 -0
- package/cjs/parts/chat-container-header/styled.js +6 -6
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +139 -34
- package/cjs/parts/chat-container-messages-list/props.js +5 -13
- package/cjs/parts/chat-container-messages-list/styled.js +2 -6
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +2 -3
- package/cjs/parts/chat-sidebar/SideBarChat.js +57 -29
- package/cjs/parts/chat-sidebar/props.js +11 -1
- package/cjs/parts/chat-sidebar/styled.js +2 -2
- package/cjs/parts/floating-button/FloatingButton.js +12 -10
- package/cjs/parts/grid-influencer/styled.js +2 -6
- package/cjs/parts/message-delimiter/styled.js +1 -1
- package/cjs/parts/sidebar-button/SidebarButton.js +6 -1
- package/cjs/parts/sidebar-button/props.js +2 -3
- package/cjs/parts/system-message/style.js +1 -1
- package/cjs/parts/tile-button/TileButton.js +31 -28
- package/cjs/parts/tile-button/props.js +12 -8
- package/cjs/parts/tile-button/styled.js +7 -3
- package/cjs/styled.js +1 -1
- package/esm/parts/bubble/ChatBubble.js +14 -11
- package/esm/parts/bubble/ChatBubbleArrow.js +64 -61
- package/esm/parts/bubble/config/useValidateProps.js +5 -6
- package/esm/parts/bubble/props.js +1 -1
- package/esm/parts/bubble/styled.js +2 -31
- package/esm/parts/chat-card/props.js +2 -2
- package/esm/parts/chat-composer/ChatContainerComposer.js +15 -6
- package/esm/parts/chat-composer/props.js +5 -11
- package/esm/parts/chat-composer/styled.js +2 -2
- package/esm/parts/chat-container/ChatContainer.js +50 -9
- package/esm/parts/chat-container/props.js +2 -12
- package/esm/parts/chat-container/styled.js +1 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js +3 -2
- package/esm/parts/chat-container-header/helpers.js +23 -0
- package/esm/parts/chat-container-header/styled.js +6 -6
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +139 -34
- package/esm/parts/chat-container-messages-list/props.js +5 -13
- package/esm/parts/chat-container-messages-list/styled.js +2 -6
- package/esm/parts/chat-empty-state/ChatEmptyState.js +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +57 -28
- package/esm/parts/chat-sidebar/props.js +11 -1
- package/esm/parts/chat-sidebar/styled.js +2 -2
- package/esm/parts/floating-button/FloatingButton.js +12 -9
- package/esm/parts/grid-influencer/styled.js +2 -6
- package/esm/parts/message-delimiter/styled.js +1 -1
- package/esm/parts/sidebar-button/SidebarButton.js +6 -1
- package/esm/parts/sidebar-button/props.js +1 -1
- package/esm/parts/system-message/style.js +1 -1
- package/esm/parts/tile-button/TileButton.js +32 -27
- package/esm/parts/tile-button/props.js +11 -3
- package/esm/parts/tile-button/styled.js +7 -4
- package/esm/styled.js +1 -1
- package/package.json +16 -6
- package/types/parts/bubble/styled.d.ts +3 -3
- package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
- package/types/parts/chat-card/styled.d.ts +1 -1
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +2 -0
- package/types/parts/chat-composer/props.d.ts +10 -6
- package/types/parts/chat-composer/styled.d.ts +2 -2
- package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
- package/types/parts/chat-container/props.d.ts +2 -0
- package/types/parts/chat-container/styled.d.ts +2 -2
- package/types/parts/chat-container-header/helpers.d.ts +6 -0
- package/types/parts/chat-container-header/styled.d.ts +3 -3
- package/types/parts/chat-container-messages-list/props.d.ts +6 -0
- package/types/parts/chat-empty-state/styled.d.ts +1 -1
- package/types/parts/chat-sidebar/SideBarChat.d.ts +3 -0
- package/types/parts/chat-sidebar/props.d.ts +8 -1
- package/types/parts/chat-sidebar/styled.d.ts +2 -2
- package/types/parts/floating-container/styled.d.ts +1 -1
- package/types/parts/grid-influencer/styled.d.ts +2 -2
- package/types/parts/message-delimiter/styled.d.ts +1 -1
- package/types/parts/sidebar-button/styled.d.ts +1 -1
- package/types/parts/system-message/style.d.ts +2 -2
- package/types/parts/tile-button/TileButton.d.ts +3 -0
- package/types/parts/tile-button/props.d.ts +6 -0
- package/types/parts/tile-button/styled.d.ts +5 -4
- package/cjs/package.json +0 -4
- package/esm/package.json +0 -4
|
@@ -7,22 +7,14 @@ const defaultProps = {
|
|
|
7
7
|
onScrollEnds: () => [],
|
|
8
8
|
getMoreMessages: noop,
|
|
9
9
|
sendingMessages: undefined,
|
|
10
|
-
sendingText: 'Sending'
|
|
10
|
+
sendingText: 'Sending',
|
|
11
|
+
bannerPosition: undefined,
|
|
12
|
+
bannerRef: undefined
|
|
11
13
|
};
|
|
12
14
|
const listProps = {
|
|
13
15
|
messages: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the ChatMessageList').defaultValue(defaultProps.messages),
|
|
14
|
-
actionRef: PropTypes.object.description(
|
|
15
|
-
|
|
16
|
-
scrollToIndex: (n: number) => void,
|
|
17
|
-
getMessagesInView: () => number[],
|
|
18
|
-
focusToIndex: (n: number) => void,
|
|
19
|
-
focusToList: () => void,
|
|
20
|
-
focusToComposer: () => void,
|
|
21
|
-
focusToSend: () => void,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
`).defaultValue(defaultProps.actionRef),
|
|
25
|
-
onScrollEnds: PropTypes.func.description(`Called when the scroll stops.`),
|
|
16
|
+
actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToIndexWithoutScroll: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
|
|
17
|
+
onScrollEnds: PropTypes.func.description("Called when the scroll stops."),
|
|
26
18
|
isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
|
|
27
19
|
hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
28
20
|
getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
|
|
@@ -8,11 +8,7 @@ const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
8
8
|
|
|
9
9
|
const StyledWrapperListItem = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
componentId: "sc-1jhprzr-1"
|
|
11
|
-
})(["min-width:100%;", ";", ";", ";"], props => props.type === BUBBLE_TYPES.SENDER &&
|
|
12
|
-
`, props => props.type === BUBBLE_TYPES.RECIPIENT && `padding: ${props.theme.space.xxs} 13% ${props.theme.space.xxs}
|
|
13
|
-
${props.theme.space.xxs}
|
|
14
|
-
`, props => props.type === BUBBLE_TYPES.SYSTEM && `padding: ${props.theme.space.xxs} 0px
|
|
15
|
-
`);
|
|
11
|
+
})(["min-width:100%;", ";", ";", ";"], props => props.type === BUBBLE_TYPES.SENDER && "padding: ".concat(props.theme.space.xxs, " ").concat(props.theme.space.xxs, " ").concat(props.theme.space.xxs, " 13%\n "), props => props.type === BUBBLE_TYPES.RECIPIENT && "padding: ".concat(props.theme.space.xxs, " 13% ").concat(props.theme.space.xxs, "\n ").concat(props.theme.space.xxs, "\n "), props => props.type === BUBBLE_TYPES.SYSTEM && "padding: ".concat(props.theme.space.xxs, " 0px\n "));
|
|
16
12
|
const StyledChatContainerContentList = /*#__PURE__*/styled.div.withConfig({
|
|
17
13
|
componentId: "sc-1jhprzr-2"
|
|
18
14
|
})(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"], props => props.theme.space.xs);
|
|
@@ -24,6 +20,6 @@ const StyledLoadMoreContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
24
20
|
})(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";display:grid;justify-content:center;align-items:center;", " ", ""], props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.hasMoreItems === 'top' ? 'top: 0;' : '', props => props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '');
|
|
25
21
|
const ListItem = /*#__PURE__*/styled.div.withConfig({
|
|
26
22
|
componentId: "sc-1jhprzr-5"
|
|
27
|
-
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;
|
|
23
|
+
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;top:0;left:-", ";pointer-events:none;border-radius:2px;background-color:#ebedf0;width:calc(100% + 24px);border:2px solid #1e79c2;height:100%;z-index:-1;}}"], props => props.theme.space.xxs);
|
|
28
24
|
|
|
29
25
|
export { ListItem, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer, StyledWrapper, StyledWrapperListItem };
|
|
@@ -3,7 +3,7 @@ import 'core-js/modules/web.url.to-json.js';
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { describe } from 'react-desc';
|
|
5
5
|
import { Grid } from '@elliemae/ds-grid';
|
|
6
|
-
import Communications from '@elliemae/ds-icons
|
|
6
|
+
import { Communications } from '@elliemae/ds-icons';
|
|
7
7
|
import { emptyStateProps, defaultProps } from './props.js';
|
|
8
8
|
import { MessageWrapper, ChatEmptyStateWrapper } from './styled.js';
|
|
9
9
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import 'core-js/modules/web.url.to-json.js';
|
|
4
|
-
import '
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
11
|
+
import React from 'react';
|
|
5
12
|
import { describe } from 'react-desc';
|
|
6
|
-
import MenuExpand from '@elliemae/ds-icons
|
|
7
|
-
import MenuCollapse from '@elliemae/ds-icons/MenuCollapse';
|
|
13
|
+
import { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';
|
|
8
14
|
import { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';
|
|
9
15
|
import { TileButton } from '../tile-button/TileButton.js';
|
|
10
16
|
import { SidebarButton } from '../sidebar-button/SidebarButton.js';
|
|
11
17
|
import { chatSidebarProps, defaultProps } from './props.js';
|
|
12
18
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
13
|
-
import { jsx } from 'react/jsx-runtime';
|
|
19
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
20
|
|
|
15
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
16
22
|
|
|
17
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
18
24
|
|
|
19
|
-
const FooterChat =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
const FooterChat = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
expanded,
|
|
28
|
+
onFooterClose,
|
|
29
|
+
onFooterExpand,
|
|
30
|
+
footerButtonExtraProps
|
|
31
|
+
} = _ref;
|
|
32
|
+
return /*#__PURE__*/_jsx(SidebarButton, {
|
|
33
|
+
dsId: "sidebar_footer",
|
|
34
|
+
label: null,
|
|
35
|
+
Icon: !expanded ? MenuCollapse : MenuExpand,
|
|
36
|
+
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
37
|
+
"aria-pressed": expanded,
|
|
38
|
+
"aria-label": footerButtonExtraProps['aria-label']
|
|
39
|
+
});
|
|
40
|
+
};
|
|
32
41
|
|
|
33
42
|
const SideBarChat = props => {
|
|
34
43
|
useValidateProps(props, SideBarChatWithSchema.toJSON());
|
|
@@ -38,18 +47,38 @@ const SideBarChat = props => {
|
|
|
38
47
|
onFooterClose,
|
|
39
48
|
onFooterExpand,
|
|
40
49
|
selectedItem,
|
|
41
|
-
footerButtonExtraProps
|
|
50
|
+
footerButtonExtraProps,
|
|
51
|
+
tooltipPlacement,
|
|
52
|
+
enableTooltipWhenIsClosed,
|
|
53
|
+
actionRef
|
|
42
54
|
} = props;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
const {
|
|
56
|
+
current: listRef
|
|
57
|
+
} = React.useRef({});
|
|
58
|
+
const registerReference = React.useCallback(ref => {
|
|
59
|
+
if (ref) listRef[ref.dataset.key] = ref;
|
|
60
|
+
}, [listRef]);
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
if (actionRef.current.listRef) {
|
|
63
|
+
actionRef.current.listRef = listRef;
|
|
64
|
+
}
|
|
65
|
+
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
66
|
+
return /*#__PURE__*/jsxs(StyledSideBarContainer, {
|
|
67
|
+
rows: [1, 'auto'],
|
|
68
|
+
ref: listRef,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(StyledSideBarButtonsContainer, {}, void 0, sidebarItems.map(p => /*#__PURE__*/jsx(TileButton, _objectSpread(_objectSpread({
|
|
70
|
+
innerRef: registerReference
|
|
71
|
+
}, p), {}, {
|
|
72
|
+
selected: selectedItem === p.dsId,
|
|
73
|
+
tooltipPlacement: tooltipPlacement,
|
|
74
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
75
|
+
}), p.dsId))), /*#__PURE__*/_jsx(FooterChat, {
|
|
76
|
+
expanded: expanded,
|
|
77
|
+
onFooterClose: onFooterClose,
|
|
78
|
+
onFooterExpand: onFooterExpand,
|
|
79
|
+
footerButtonExtraProps: footerButtonExtraProps
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
53
82
|
};
|
|
54
83
|
|
|
55
84
|
SideBarChat.defaultProps = defaultProps;
|
|
@@ -11,17 +11,27 @@ const defaultProps = {
|
|
|
11
11
|
onHeaderClose: noop,
|
|
12
12
|
footerButtonExtraProps: {
|
|
13
13
|
'aria-label': 'expand or collapse button'
|
|
14
|
+
},
|
|
15
|
+
tooltipPlacement: 'right',
|
|
16
|
+
enableTooltipWhenIsClosed: false,
|
|
17
|
+
actionRef: {
|
|
18
|
+
current: {
|
|
19
|
+
listRef: []
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
22
|
};
|
|
16
23
|
const chatSidebarProps = {
|
|
17
24
|
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),
|
|
18
25
|
expanded: PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
|
|
19
26
|
selectedItem: PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.selectedItem),
|
|
27
|
+
tooltipPlacement: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
28
|
+
enableTooltipWhenIsClosed: PropTypes.bool.description('Enable tooltip when is closed').defaultValue(defaultProps.onFooterExpand),
|
|
20
29
|
onFooterExpand: PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
|
|
21
30
|
onFooterClose: PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
|
|
22
31
|
onHeaderExpand: PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
|
|
23
32
|
onHeaderClose: PropTypes.func.description('The function to call when the chat is closed via the header').defaultValue(defaultProps.onHeaderClose),
|
|
24
|
-
footerButtonExtraProps: PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps)
|
|
33
|
+
footerButtonExtraProps: PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps),
|
|
34
|
+
actionRef: PropTypes.object.description("Action ref for sidebar\n {\n listRef: references to Tiles\n }\n ").defaultValue(defaultProps.actionRef)
|
|
25
35
|
};
|
|
26
36
|
|
|
27
37
|
export { chatSidebarProps, defaultProps };
|
|
@@ -4,9 +4,9 @@ import { MIN_WIDTH_SIDEBAR, BUTTON_SIDEBAR_HEIGHT } from '../../styled.js';
|
|
|
4
4
|
|
|
5
5
|
const StyledSideBarContainer = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
6
|
componentId: "sc-16uijso-0"
|
|
7
|
-
})(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";"], MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
|
|
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
9
|
componentId: "sc-16uijso-1"
|
|
10
|
-
})(["overflow-y:auto;align-items:flex-start;justify-content:flex-start;grid-template-rows:repeat(auto-fill,", "px);"], BUTTON_SIDEBAR_HEIGHT);
|
|
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 };
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
-
import Comments from '@elliemae/ds-icons
|
|
3
|
+
import { Comments } from '@elliemae/ds-icons';
|
|
4
4
|
import { StyledFloatingButton } from './styled.js';
|
|
5
5
|
import { defaultFloatingButton } from './props.js';
|
|
6
6
|
|
|
7
7
|
var _Comments;
|
|
8
|
-
const FloatingButton =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
8
|
+
const FloatingButton = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
onClick
|
|
11
|
+
} = _ref;
|
|
12
|
+
return /*#__PURE__*/_jsx(StyledFloatingButton, {
|
|
13
|
+
"data-testid": "chat-floating-button",
|
|
14
|
+
onClick: onClick
|
|
15
|
+
}, void 0, _Comments || (_Comments = /*#__PURE__*/_jsx(Comments, {
|
|
16
|
+
size: "l"
|
|
17
|
+
})));
|
|
18
|
+
};
|
|
16
19
|
FloatingButton.defaultProps = defaultFloatingButton;
|
|
17
20
|
|
|
18
21
|
export { FloatingButton };
|
|
@@ -4,13 +4,9 @@ import { MIN_WIDTH_SIDEBAR } from '../../styled.js';
|
|
|
4
4
|
|
|
5
5
|
const StyledChatContainer = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
6
|
componentId: "sc-b6t5vk-0"
|
|
7
|
-
})(["height:100%;width:", ";background:", ";box-shadow:-1px 0 0 0 ", ";transition:width ", " 350ms;"], props => props.expanded ?
|
|
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
9
|
componentId: "sc-b6t5vk-1"
|
|
10
|
-
})(["height:100%;overflow:hidden;background:", ";", ""], props => props.theme.colors.neutral['050'], props => props.floating ?
|
|
11
|
-
width: ${props.expandedWidth}px;
|
|
12
|
-
` : `
|
|
13
|
-
width: ${props.expandedWidth - MIN_WIDTH_SIDEBAR}px;
|
|
14
|
-
`);
|
|
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"));
|
|
15
11
|
|
|
16
12
|
export { StyledChatContainer, StyledChatContainerContent };
|
|
@@ -9,6 +9,6 @@ const Line = /*#__PURE__*/styled.span.withConfig({
|
|
|
9
9
|
})(["border-top:1px solid ", ";"], props => props.theme.colors.neutral['400']);
|
|
10
10
|
const Text = /*#__PURE__*/styled.p.withConfig({
|
|
11
11
|
componentId: "sc-upz0rt-2"
|
|
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' ?
|
|
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 };
|
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
@@ -24,7 +29,7 @@ const SidebarButton = _ref => {
|
|
|
24
29
|
onClick(dsId);
|
|
25
30
|
}, [onClick, dsId]);
|
|
26
31
|
return /*#__PURE__*/jsxs(StyledSidebarButton, _objectSpread(_objectSpread({
|
|
27
|
-
"data-testid":
|
|
32
|
+
"data-testid": "sidebar-button-".concat(dsId),
|
|
28
33
|
onClick: handleClick
|
|
29
34
|
}, rest), {}, {
|
|
30
35
|
children: [/*#__PURE__*/_jsx(StyledSidebarButtonIcon, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import propsTypes from 'prop-types';
|
|
2
2
|
import { PropTypes } from 'react-desc';
|
|
3
3
|
import { noop } from 'lodash';
|
|
4
|
-
import Comments from '@elliemae/ds-icons
|
|
4
|
+
import { Comments } from '@elliemae/ds-icons';
|
|
5
5
|
|
|
6
6
|
const defaultSidebarButton = {
|
|
7
7
|
Icon: Comments,
|
|
@@ -3,7 +3,7 @@ import { Grid } from '@elliemae/ds-grid';
|
|
|
3
3
|
|
|
4
4
|
const Wrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-80w41d-0"
|
|
6
|
-
})(["align-items:center;justify-content:center;
|
|
6
|
+
})(["align-items:center;justify-content:center;max-width:100%;padding:0 8px 8px;border:1px solid ", ";border-radius:10px;background-color:", ";box-shadow:none;"], props => props.theme.colors.neutral['100'], props => props.theme.colors.neutral['080']);
|
|
7
7
|
const Header = /*#__PURE__*/styled(Grid).withConfig({
|
|
8
8
|
componentId: "sc-80w41d-1"
|
|
9
9
|
})(["align-items:center;height:36px;"]);
|
|
@@ -2,17 +2,18 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
2
2
|
import 'core-js/modules/web.url.to-json.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { describe } from 'react-desc';
|
|
5
|
-
import
|
|
5
|
+
import { DSTooltipV3 } from '@elliemae/ds-tooltip';
|
|
6
6
|
import { Grid } from '@elliemae/ds-grid';
|
|
7
|
-
import CloseXsmall from '@elliemae/ds-icons
|
|
8
|
-
import { StyledWrapperCentralContent, StyledTileButtonIcon, StyledStatusBadge, StyledTileButtonLabel, StyledTileButton, StyledWrapper, StyledWrapperLeftBorder, CloseButton } from './styled.js';
|
|
7
|
+
import { CloseXsmall } from '@elliemae/ds-icons';
|
|
8
|
+
import { StyledWrapperCentralContent, StyledTileButtonIcon, StyledStatusBadge, StyledTileButtonLabel, StyledTileButton, StyledWrapper, StyledWrapperLeftBorder, CloseButton, StyledTooltipV3ButtonWrapper } from './styled.js';
|
|
9
9
|
import { propsTileButton, defaultTileButton } from './props.js';
|
|
10
10
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
11
12
|
|
|
12
13
|
var _StyledWrapperLeftBor, _CloseXsmall;
|
|
13
14
|
|
|
14
15
|
const TileButton = props => {
|
|
15
|
-
var _Icon,
|
|
16
|
+
var _Icon, _StyledTileButtonLabe, _span;
|
|
16
17
|
|
|
17
18
|
useValidateProps(props, TileButtonWithSchema.toJSON());
|
|
18
19
|
const {
|
|
@@ -31,7 +32,10 @@ const TileButton = props => {
|
|
|
31
32
|
disabled,
|
|
32
33
|
selected,
|
|
33
34
|
isHeader,
|
|
34
|
-
ariaLabel
|
|
35
|
+
ariaLabel,
|
|
36
|
+
tooltipPlacement,
|
|
37
|
+
disableTooltip,
|
|
38
|
+
innerRef
|
|
35
39
|
} = props;
|
|
36
40
|
const handleClick = React.useCallback(() => {
|
|
37
41
|
onClick(dsId, title);
|
|
@@ -47,17 +51,19 @@ const TileButton = props => {
|
|
|
47
51
|
justifyContent: "center"
|
|
48
52
|
}, void 0, _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
|
|
49
53
|
size: "m"
|
|
50
|
-
})), badge ?
|
|
54
|
+
})), badge ? /*#__PURE__*/_jsx(StyledStatusBadge, {
|
|
51
55
|
badgeColor: badgeColor,
|
|
52
|
-
badgePosition: badgePosition
|
|
53
|
-
|
|
56
|
+
badgePosition: badgePosition,
|
|
57
|
+
"data-testid": "tile-badge-".concat(dsId)
|
|
58
|
+
}) : null)), !isHeader ? /*#__PURE__*/_jsx(Grid, {
|
|
54
59
|
width: "100%",
|
|
55
60
|
justifyContent: "center"
|
|
56
61
|
}, void 0, label ? _StyledTileButtonLabe || (_StyledTileButtonLabe = /*#__PURE__*/_jsx(StyledTileButtonLabel, {}, void 0, label)) : null) : null), [isHeader, Icon, badge, badgeColor, badgePosition, label]);
|
|
57
|
-
|
|
62
|
+
const Btn = React.useMemo(() => /*#__PURE__*/jsx(StyledTileButton, {
|
|
58
63
|
isHeader: isHeader,
|
|
59
64
|
value: dsId,
|
|
60
|
-
"data-testid":
|
|
65
|
+
"data-testid": "tile-button-".concat(dsId),
|
|
66
|
+
"data-key": dsId,
|
|
61
67
|
onClick: handleClick,
|
|
62
68
|
onFocus: onFocus,
|
|
63
69
|
onBlur: onBlur,
|
|
@@ -66,23 +72,22 @@ const TileButton = props => {
|
|
|
66
72
|
badgeColor: badgeColor,
|
|
67
73
|
badgePosition: badgePosition,
|
|
68
74
|
"aria-pressed": selected,
|
|
69
|
-
"aria-label": ariaLabel
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, void 0, _CloseXsmall || (_CloseXsmall = /*#__PURE__*/_jsx(CloseXsmall, {}))) : null));
|
|
75
|
+
"aria-label": ariaLabel,
|
|
76
|
+
ref: innerRef,
|
|
77
|
+
children: /*#__PURE__*/_jsx(StyledWrapper, {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyContent: "center"
|
|
80
|
+
}, void 0, _span || (_span = /*#__PURE__*/_jsx("span", {}, void 0, MainContent)), _StyledWrapperLeftBor || (_StyledWrapperLeftBor = /*#__PURE__*/_jsx(StyledWrapperLeftBorder, {})), showClose && !disabled ? /*#__PURE__*/_jsx(CloseButton, {
|
|
81
|
+
onClick: onClose,
|
|
82
|
+
value: dsId,
|
|
83
|
+
"data-testid": "tile-close-btn-".concat(dsId)
|
|
84
|
+
}, void 0, _CloseXsmall || (_CloseXsmall = /*#__PURE__*/_jsx(CloseXsmall, {}))) : null)
|
|
85
|
+
}, dsId), [MainContent, ariaLabel, badgeColor, badgePosition, disabled, dsId, handleClick, isHeader, onBlur, onClose, onFocus, selected, showClose, innerRef]);
|
|
86
|
+
return title && !disableTooltip ? /*#__PURE__*/_jsx(StyledTooltipV3ButtonWrapper, {}, void 0, /*#__PURE__*/_jsx(DSTooltipV3, {
|
|
87
|
+
id: "ds-chat-tile-tooltip-button-".concat(dsId),
|
|
88
|
+
text: title,
|
|
89
|
+
startPlacementPreference: tooltipPlacement
|
|
90
|
+
}, void 0, Btn)) : Btn;
|
|
86
91
|
};
|
|
87
92
|
|
|
88
93
|
TileButton.defaultProps = defaultTileButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
|
-
import Comments from '@elliemae/ds-icons
|
|
3
|
+
import { Comments } from '@elliemae/ds-icons';
|
|
4
4
|
|
|
5
5
|
const defaultTileButton = {
|
|
6
6
|
Icon: Comments,
|
|
@@ -18,7 +18,10 @@ const defaultTileButton = {
|
|
|
18
18
|
disabled: false,
|
|
19
19
|
selected: false,
|
|
20
20
|
isHeader: false,
|
|
21
|
-
ariaLabel: 'Tile button'
|
|
21
|
+
ariaLabel: 'Tile button',
|
|
22
|
+
tooltipPlacement: 'right',
|
|
23
|
+
disableTooltip: false,
|
|
24
|
+
innerRef: noop
|
|
22
25
|
};
|
|
23
26
|
const propsTileButton = {
|
|
24
27
|
Icon: PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),
|
|
@@ -36,7 +39,12 @@ const propsTileButton = {
|
|
|
36
39
|
disabled: PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),
|
|
37
40
|
selected: PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),
|
|
38
41
|
isHeader: PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
|
|
39
|
-
ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel)
|
|
42
|
+
ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),
|
|
43
|
+
tooltipPlacement: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
44
|
+
disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),
|
|
45
|
+
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
46
|
+
current: PropTypes.any
|
|
47
|
+
})]).description('reference to the component')
|
|
40
48
|
};
|
|
41
49
|
|
|
42
50
|
export { defaultTileButton, propsTileButton };
|
|
@@ -46,9 +46,12 @@ const CloseButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
46
46
|
componentId: "sc-1ebp1zs-5"
|
|
47
47
|
})(["outline:none;background:none;height:9px;width:9px;position:absolute;top:1px;right:1px;overflow:hidden;padding:0;border:none;span{position:absolute;left:-3px;top:-4px;}&:focus,&:hover{svg{fill:", ";}&:after{display:block;content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px ", ";border-radius:2px;}}cursor:pointer;"], props => props.theme.colors.brand[600], props => props.theme.colors.brand[600]); // MAIN WRAPPER
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const StyledTooltipV3ButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
50
50
|
componentId: "sc-1ebp1zs-6"
|
|
51
|
-
})(["
|
|
51
|
+
})(["height:", "px;width:", "px;"], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR);
|
|
52
|
+
const StyledTileButton = /*#__PURE__*/styled.button.withConfig({
|
|
53
|
+
componentId: "sc-1ebp1zs-7"
|
|
54
|
+
})(["outline:none;background:transparent;height:", "px;width:", "px;position:relative;padding:0;border:none;cursor:pointer;border-bottom:", ";&:focus,&:hover,&:active,&:disabled{background:", ";& ", "{border:2px solid ", ";margin-top:-2px;", ";}}&:focus,&:hover{& ", "{background:", ";}& ", "{color:", ";}& svg{fill:", ";}}&:active:not(:disabled){background:", ";& ", "{background:", ";}& ", "{color:", ";font-weight:600;}& svg{fill:", ";}& ", "{border:2px solid ", ";}}&:disabled{background:", ";", "{background:", ";}& ", "{background:", ";border:2px solid ", ";}", "{svg{fill:", ";}}", "{color:", ";}}", ""], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR, props => props.isHeader ? "1px solid ".concat(props.theme.colors.neutral['200']) : 'none', props => props.theme.colors.neutral['080'], StyledStatusBadge, props => props.theme.colors.neutral['080'], props => {
|
|
52
55
|
switch (props.badgePosition) {
|
|
53
56
|
case 'left':
|
|
54
57
|
return 'margin-left: -2px;';
|
|
@@ -67,7 +70,7 @@ const StyledTileButton = /*#__PURE__*/styled.button.withConfig({
|
|
|
67
70
|
return '';
|
|
68
71
|
});
|
|
69
72
|
const StyledWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
70
|
-
componentId: "sc-1ebp1zs-
|
|
73
|
+
componentId: "sc-1ebp1zs-8"
|
|
71
74
|
})(["height:100%;width:100%;position:relative;"]);
|
|
72
75
|
|
|
73
|
-
export { CloseButton, StyledStatusBadge, StyledTileButton, StyledTileButtonIcon, StyledTileButtonLabel, StyledWrapper, StyledWrapperCentralContent, StyledWrapperLeftBorder };
|
|
76
|
+
export { CloseButton, StyledStatusBadge, StyledTileButton, StyledTileButtonIcon, StyledTileButtonLabel, StyledTooltipV3ButtonWrapper, StyledWrapper, StyledWrapperCentralContent, StyledWrapperLeftBorder };
|
package/esm/styled.js
CHANGED
|
@@ -3,6 +3,6 @@ const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
|
3
3
|
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
|
-
const BOX_SHADOW_INSET =
|
|
6
|
+
const BOX_SHADOW_INSET = "inset 100px 3px 4px 0 rgba(53,60,70,0.50)";
|
|
7
7
|
|
|
8
8
|
export { BOX_SHADOW, BOX_SHADOW_FLOATING, BOX_SHADOW_INSET, BUTTON_FLOATING, BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -203,6 +203,10 @@
|
|
|
203
203
|
"import": "./esm/parts/chat-container-header/styled.js",
|
|
204
204
|
"require": "./cjs/parts/chat-container-header/styled.js"
|
|
205
205
|
},
|
|
206
|
+
"./parts/chat-container-header/helpers": {
|
|
207
|
+
"import": "./esm/parts/chat-container-header/helpers.js",
|
|
208
|
+
"require": "./cjs/parts/chat-container-header/helpers.js"
|
|
209
|
+
},
|
|
206
210
|
"./parts/chat-container-header/ChatContainerHeader": {
|
|
207
211
|
"import": "./esm/parts/chat-container-header/ChatContainerHeader.js",
|
|
208
212
|
"require": "./cjs/parts/chat-container-header/ChatContainerHeader.js"
|
|
@@ -293,19 +297,25 @@
|
|
|
293
297
|
"generateSubmodules": true
|
|
294
298
|
},
|
|
295
299
|
"dependencies": {
|
|
296
|
-
"@elliemae/ds-
|
|
297
|
-
"@elliemae/ds-
|
|
298
|
-
"@elliemae/ds-
|
|
300
|
+
"@elliemae/ds-banner": "2.0.0-next.12",
|
|
301
|
+
"@elliemae/ds-basic": "2.0.0-next.12",
|
|
302
|
+
"@elliemae/ds-button": "2.0.0-next.12",
|
|
303
|
+
"@elliemae/ds-grid": "2.0.0-next.12",
|
|
304
|
+
"@elliemae/ds-icons": "2.0.0-next.12",
|
|
305
|
+
"@elliemae/ds-props-helpers": "2.0.0-next.12",
|
|
306
|
+
"@elliemae/ds-tooltip": "2.0.0-next.12",
|
|
307
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-next.12",
|
|
299
308
|
"prop-types": "~15.7.2",
|
|
309
|
+
"react-desc": "~4.1.2",
|
|
300
310
|
"react-virtual": "~2.3.2"
|
|
301
311
|
},
|
|
302
312
|
"devDependencies": {
|
|
303
|
-
"styled-components": "~5.3.
|
|
313
|
+
"styled-components": "~5.3.3"
|
|
304
314
|
},
|
|
305
315
|
"peerDependencies": {
|
|
306
316
|
"lodash": "^4.17.21",
|
|
307
317
|
"react": "^16.14.0",
|
|
308
318
|
"react-dom": "^16.14.0",
|
|
309
|
-
"styled-components": "^5.3.
|
|
319
|
+
"styled-components": "^5.3.3"
|
|
310
320
|
}
|
|
311
321
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledWrapper: import("styled-components").StyledComponent<"div", any, any, never>;
|
|
3
|
-
export declare const StyledTitleBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<
|
|
4
|
-
export declare const StyledTitleLeftBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<
|
|
5
|
-
export declare const StyledTitleRightBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<
|
|
3
|
+
export declare const StyledTitleBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
4
|
+
export declare const StyledTitleLeftBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
+
export declare const StyledTitleRightBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
6
6
|
export declare const StyleBodyWrapper: import("styled-components").StyledComponent<"div", any, any, never>;
|
|
7
7
|
export declare const StyleErrorMessage: import("styled-components").StyledComponent<"div", any, any, never>;
|
|
8
8
|
export declare const StyleHelpMessage: import("styled-components").StyledComponent<"div", any, any, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<
|
|
2
|
+
export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
3
3
|
export declare const MainContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const Title: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
5
5
|
export declare const Content: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
@@ -5,11 +5,13 @@ declare const ChatComposer: {
|
|
|
5
5
|
propTypes: {
|
|
6
6
|
placeholder: any;
|
|
7
7
|
inputValue: any;
|
|
8
|
+
maxLengthMessage: any;
|
|
8
9
|
onChange: any;
|
|
9
10
|
onResize: any;
|
|
10
11
|
onSend: any;
|
|
11
12
|
onFocus: any;
|
|
12
13
|
onBlur: any;
|
|
14
|
+
onKeyDown: any;
|
|
13
15
|
maxHeight: any;
|
|
14
16
|
inputMaxLength: any;
|
|
15
17
|
buttonDisabled: any;
|
|
@@ -6,14 +6,16 @@ export interface TextAreaProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const defaultComposerPros: ChatComposerProps;
|
|
8
8
|
export interface ChatComposerProps {
|
|
9
|
-
placeholder
|
|
10
|
-
inputValue
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
inputValue?: string;
|
|
11
|
+
maxLengthMessage?: string;
|
|
11
12
|
onChange: (value: string) => void;
|
|
12
|
-
onResize
|
|
13
|
+
onResize?: (value: number) => void;
|
|
13
14
|
onSend: (value: string) => void;
|
|
14
|
-
onFocus
|
|
15
|
-
onBlur
|
|
16
|
-
|
|
15
|
+
onFocus?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
16
|
+
onBlur?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
17
|
+
onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
18
|
+
maxHeight?: number;
|
|
17
19
|
inputMaxLength: number | undefined;
|
|
18
20
|
buttonDisabled: boolean;
|
|
19
21
|
dataTestid?: string;
|
|
@@ -22,11 +24,13 @@ export interface ChatComposerProps {
|
|
|
22
24
|
export declare const composerProps: {
|
|
23
25
|
placeholder: any;
|
|
24
26
|
inputValue: any;
|
|
27
|
+
maxLengthMessage: any;
|
|
25
28
|
onChange: any;
|
|
26
29
|
onResize: any;
|
|
27
30
|
onSend: any;
|
|
28
31
|
onFocus: any;
|
|
29
32
|
onBlur: any;
|
|
33
|
+
onKeyDown: any;
|
|
30
34
|
maxHeight: any;
|
|
31
35
|
inputMaxLength: any;
|
|
32
36
|
buttonDisabled: any;
|