@elliemae/ds-chat 2.0.0-alpha.10 → 2.0.0-alpha.14
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/ChatDataTestids.js +27 -0
- 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 +67 -20
- package/cjs/parts/chat-container/config/useValidateProps.js +2 -2
- package/cjs/parts/chat-container/props.js +7 -13
- package/cjs/parts/chat-container/styled.js +2 -2
- 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 +156 -40
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- 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 +18 -10
- package/cjs/parts/floating-button/props.js +6 -2
- 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 +12 -5
- package/cjs/styled.js +1 -1
- package/esm/ChatDataTestids.js +23 -0
- 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 +65 -18
- package/esm/parts/chat-container/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container/props.js +7 -13
- package/esm/parts/chat-container/styled.js +2 -2
- 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 +154 -38
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- 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 +18 -9
- package/esm/parts/floating-button/props.js +6 -2
- 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 +12 -7
- package/esm/styled.js +1 -1
- package/package.json +29 -6
- package/types/ChatDataTestids.d.ts +21 -0
- package/types/parts/bubble/ChatBubble.d.ts +18 -5
- package/types/parts/bubble/props.d.ts +13 -4
- package/types/parts/bubble/styled.d.ts +9 -9
- package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
- package/types/parts/chat-card/ChatCard.d.ts +24 -4
- package/types/parts/chat-card/props.d.ts +19 -3
- package/types/parts/chat-card/styled.d.ts +6 -6
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +48 -13
- package/types/parts/chat-composer/styled.d.ts +117 -24
- package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
- package/types/parts/chat-container/ChatContainer.d.ts +54 -13
- package/types/parts/chat-container/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container/styled.d.ts +4 -4
- package/types/parts/chat-container/tests/ChatContainer.test.d.ts +1 -0
- 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/ChatContainerMessagesList.d.ts +39 -9
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container-messages-list/styled.d.ts +7 -7
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -3
- package/types/parts/chat-empty-state/props.d.ts +7 -2
- package/types/parts/chat-empty-state/styled.d.ts +2 -2
- package/types/parts/chat-sidebar/SideBarChat.d.ts +39 -9
- package/types/parts/chat-sidebar/props.d.ts +39 -9
- package/types/parts/chat-sidebar/styled.d.ts +2 -2
- package/types/parts/floating-button/FloatingButton.d.ts +11 -2
- package/types/parts/floating-button/props.d.ts +13 -1
- package/types/parts/floating-button/styled.d.ts +1 -1
- package/types/parts/floating-container/styled.d.ts +1 -2
- package/types/parts/grid-influencer/styled.d.ts +2 -2
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +21 -4
- package/types/parts/message-delimiter/props.d.ts +16 -3
- package/types/parts/message-delimiter/styled.d.ts +3 -3
- package/types/parts/sidebar-button/SidebarButton.d.ts +16 -5
- package/types/parts/sidebar-button/props.d.ts +16 -5
- package/types/parts/sidebar-button/styled.d.ts +3 -3
- package/types/parts/system-message/SystemMessage.d.ts +12 -2
- package/types/parts/system-message/props.d.ts +7 -1
- package/types/parts/system-message/style.d.ts +5 -5
- package/types/parts/tile-button/TileButton.d.ts +66 -17
- package/types/parts/tile-button/props.d.ts +64 -16
- package/types/parts/tile-button/styled.d.ts +9 -8
- package/types/prop-types.d.ts +28 -9
- package/types/tests/utils.d.ts +27 -0
- package/cjs/package.json +0 -4
- package/esm/package.json +0 -4
- package/types/parts/chat-composer/props.d.ts +0 -35
- package/types/parts/chat-container/props.d.ts +0 -39
- package/types/parts/chat-container-messages-list/props.d.ts +0 -23
|
@@ -11,22 +11,14 @@ const defaultProps = {
|
|
|
11
11
|
onScrollEnds: () => [],
|
|
12
12
|
getMoreMessages: lodash.noop,
|
|
13
13
|
sendingMessages: undefined,
|
|
14
|
-
sendingText: 'Sending'
|
|
14
|
+
sendingText: 'Sending',
|
|
15
|
+
bannerPosition: undefined,
|
|
16
|
+
bannerRef: undefined
|
|
15
17
|
};
|
|
16
18
|
const listProps = {
|
|
17
19
|
messages: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of out-of-the-box items you want to render inside the ChatMessageList').defaultValue(defaultProps.messages),
|
|
18
|
-
actionRef: reactDesc.PropTypes.object.description(
|
|
19
|
-
|
|
20
|
-
scrollToIndex: (n: number) => void,
|
|
21
|
-
getMessagesInView: () => number[],
|
|
22
|
-
focusToIndex: (n: number) => void,
|
|
23
|
-
focusToList: () => void,
|
|
24
|
-
focusToComposer: () => void,
|
|
25
|
-
focusToSend: () => void,
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
`).defaultValue(defaultProps.actionRef),
|
|
29
|
-
onScrollEnds: reactDesc.PropTypes.func.description(`Called when the scroll stops.`),
|
|
20
|
+
actionRef: reactDesc.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),
|
|
21
|
+
onScrollEnds: reactDesc.PropTypes.func.description("Called when the scroll stops."),
|
|
30
22
|
isLoading: reactDesc.PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
|
|
31
23
|
hasMoreItems: reactDesc.PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
32
24
|
getMoreMessages: reactDesc.PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
|
|
@@ -16,11 +16,7 @@ const StyledWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
16
16
|
|
|
17
17
|
const StyledWrapperListItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
18
|
componentId: "sc-1jhprzr-1"
|
|
19
|
-
})(["min-width:100%;", ";", ";", ";"], props$1 => props$1.type === props.BUBBLE_TYPES.SENDER &&
|
|
20
|
-
`, props$1 => props$1.type === props.BUBBLE_TYPES.RECIPIENT && `padding: ${props$1.theme.space.xxs} 13% ${props$1.theme.space.xxs}
|
|
21
|
-
${props$1.theme.space.xxs}
|
|
22
|
-
`, props$1 => props$1.type === props.BUBBLE_TYPES.SYSTEM && `padding: ${props$1.theme.space.xxs} 0px
|
|
23
|
-
`);
|
|
19
|
+
})(["min-width:100%;", ";", ";", ";"], props$1 => props$1.type === props.BUBBLE_TYPES.SENDER && "padding: ".concat(props$1.theme.space.xxs, " ").concat(props$1.theme.space.xxs, " ").concat(props$1.theme.space.xxs, " 13%\n "), props$1 => props$1.type === props.BUBBLE_TYPES.RECIPIENT && "padding: ".concat(props$1.theme.space.xxs, " 13% ").concat(props$1.theme.space.xxs, "\n ").concat(props$1.theme.space.xxs, "\n "), props$1 => props$1.type === props.BUBBLE_TYPES.SYSTEM && "padding: ".concat(props$1.theme.space.xxs, " 0px\n "));
|
|
24
20
|
const StyledChatContainerContentList = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
25
21
|
componentId: "sc-1jhprzr-2"
|
|
26
22
|
})(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"], props => props.theme.space.xs);
|
|
@@ -32,7 +28,7 @@ const StyledLoadMoreContainer = /*#__PURE__*/styled__default["default"].div.with
|
|
|
32
28
|
})(["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;' : '');
|
|
33
29
|
const ListItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
30
|
componentId: "sc-1jhprzr-5"
|
|
35
|
-
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;
|
|
31
|
+
})(["&: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);
|
|
36
32
|
|
|
37
33
|
exports.ListItem = ListItem;
|
|
38
34
|
exports.StyledChatContainerContentList = StyledChatContainerContentList;
|
|
@@ -7,7 +7,7 @@ require('core-js/modules/web.url.to-json.js');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
9
|
var dsGrid = require('@elliemae/ds-grid');
|
|
10
|
-
var
|
|
10
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
11
11
|
var props = require('./props.js');
|
|
12
12
|
var styled = require('./styled.js');
|
|
13
13
|
var useValidateProps = require('./config/useValidateProps.js');
|
|
@@ -15,7 +15,6 @@ var useValidateProps = require('./config/useValidateProps.js');
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
|
-
var Communications__default = /*#__PURE__*/_interopDefaultLegacy(Communications);
|
|
19
18
|
|
|
20
19
|
const ChatEmptyState = props => {
|
|
21
20
|
var _Grid, _Grid2;
|
|
@@ -31,7 +30,7 @@ const ChatEmptyState = props => {
|
|
|
31
30
|
}, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
32
31
|
alignItems: "center",
|
|
33
32
|
justifyContent: "center"
|
|
34
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
33
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsIcons.Communications, {
|
|
35
34
|
size: "xxl",
|
|
36
35
|
color: ['neutral', 400]
|
|
37
36
|
})), _Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
@@ -5,10 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
7
|
require('core-js/modules/web.url.to-json.js');
|
|
8
|
-
require('
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
|
+
var React = require('react');
|
|
9
16
|
var reactDesc = require('react-desc');
|
|
10
|
-
var
|
|
11
|
-
var MenuCollapse = require('@elliemae/ds-icons/MenuCollapse');
|
|
17
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
18
|
var styled = require('./styled.js');
|
|
13
19
|
var TileButton = require('../tile-button/TileButton.js');
|
|
14
20
|
var SidebarButton = require('../sidebar-button/SidebarButton.js');
|
|
@@ -20,26 +26,28 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
26
|
|
|
21
27
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
28
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
23
|
-
var
|
|
24
|
-
var MenuCollapse__default = /*#__PURE__*/_interopDefaultLegacy(MenuCollapse);
|
|
29
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
30
|
|
|
26
31
|
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; }
|
|
27
32
|
|
|
28
33
|
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__default["default"](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; }
|
|
29
34
|
|
|
30
|
-
const FooterChat =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const FooterChat = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
expanded,
|
|
38
|
+
onFooterClose,
|
|
39
|
+
onFooterExpand,
|
|
40
|
+
footerButtonExtraProps
|
|
41
|
+
} = _ref;
|
|
42
|
+
return /*#__PURE__*/_jsx__default["default"](SidebarButton.SidebarButton, {
|
|
43
|
+
dsId: "sidebar_footer",
|
|
44
|
+
label: null,
|
|
45
|
+
Icon: !expanded ? dsIcons.MenuCollapse : dsIcons.MenuExpand,
|
|
46
|
+
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
47
|
+
"aria-pressed": expanded,
|
|
48
|
+
"aria-label": footerButtonExtraProps['aria-label']
|
|
49
|
+
});
|
|
50
|
+
};
|
|
43
51
|
|
|
44
52
|
const SideBarChat = props => {
|
|
45
53
|
useValidateProps.useValidateProps(props, SideBarChatWithSchema.toJSON());
|
|
@@ -49,18 +57,38 @@ const SideBarChat = props => {
|
|
|
49
57
|
onFooterClose,
|
|
50
58
|
onFooterExpand,
|
|
51
59
|
selectedItem,
|
|
52
|
-
footerButtonExtraProps
|
|
60
|
+
footerButtonExtraProps,
|
|
61
|
+
tooltipPlacement,
|
|
62
|
+
enableTooltipWhenIsClosed,
|
|
63
|
+
actionRef
|
|
53
64
|
} = props;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
const {
|
|
66
|
+
current: listRef
|
|
67
|
+
} = React__default["default"].useRef({});
|
|
68
|
+
const registerReference = React__default["default"].useCallback(ref => {
|
|
69
|
+
if (ref) listRef[ref.dataset.key] = ref;
|
|
70
|
+
}, [listRef]);
|
|
71
|
+
React__default["default"].useEffect(() => {
|
|
72
|
+
if (actionRef.current.listRef) {
|
|
73
|
+
actionRef.current.listRef = listRef;
|
|
74
|
+
}
|
|
75
|
+
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
76
|
+
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledSideBarContainer, {
|
|
77
|
+
rows: [1, 'auto'],
|
|
78
|
+
ref: listRef,
|
|
79
|
+
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledSideBarButtonsContainer, {}, void 0, sidebarItems.map(p => /*#__PURE__*/jsxRuntime.jsx(TileButton.TileButton, _objectSpread(_objectSpread({
|
|
80
|
+
innerRef: registerReference
|
|
81
|
+
}, p), {}, {
|
|
82
|
+
selected: selectedItem === p.dsId,
|
|
83
|
+
tooltipPlacement: tooltipPlacement,
|
|
84
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
85
|
+
}), p.dsId))), /*#__PURE__*/_jsx__default["default"](FooterChat, {
|
|
86
|
+
expanded: expanded,
|
|
87
|
+
onFooterClose: onFooterClose,
|
|
88
|
+
onFooterExpand: onFooterExpand,
|
|
89
|
+
footerButtonExtraProps: footerButtonExtraProps
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
64
92
|
};
|
|
65
93
|
|
|
66
94
|
SideBarChat.defaultProps = props.defaultProps;
|
|
@@ -15,17 +15,27 @@ const defaultProps = {
|
|
|
15
15
|
onHeaderClose: lodash.noop,
|
|
16
16
|
footerButtonExtraProps: {
|
|
17
17
|
'aria-label': 'expand or collapse button'
|
|
18
|
+
},
|
|
19
|
+
tooltipPlacement: 'right',
|
|
20
|
+
enableTooltipWhenIsClosed: false,
|
|
21
|
+
actionRef: {
|
|
22
|
+
current: {
|
|
23
|
+
listRef: []
|
|
24
|
+
}
|
|
18
25
|
}
|
|
19
26
|
};
|
|
20
27
|
const chatSidebarProps = {
|
|
21
28
|
sidebarItems: reactDesc.PropTypes.arrayOf(reactDesc.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),
|
|
22
29
|
expanded: reactDesc.PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
|
|
23
30
|
selectedItem: reactDesc.PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.selectedItem),
|
|
31
|
+
tooltipPlacement: reactDesc.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'"),
|
|
32
|
+
enableTooltipWhenIsClosed: reactDesc.PropTypes.bool.description('Enable tooltip when is closed').defaultValue(defaultProps.onFooterExpand),
|
|
24
33
|
onFooterExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
|
|
25
34
|
onFooterClose: reactDesc.PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
|
|
26
35
|
onHeaderExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
|
|
27
36
|
onHeaderClose: reactDesc.PropTypes.func.description('The function to call when the chat is closed via the header').defaultValue(defaultProps.onHeaderClose),
|
|
28
|
-
footerButtonExtraProps: reactDesc.PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps)
|
|
37
|
+
footerButtonExtraProps: reactDesc.PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps),
|
|
38
|
+
actionRef: reactDesc.PropTypes.object.description("Action ref for sidebar\n {\n listRef: references to Tiles\n }\n ").defaultValue(defaultProps.actionRef)
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
exports.chatSidebarProps = chatSidebarProps;
|
|
@@ -12,10 +12,10 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
12
12
|
|
|
13
13
|
const StyledSideBarContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
14
14
|
componentId: "sc-16uijso-0"
|
|
15
|
-
})(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";"], styled$1.MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
|
|
15
|
+
})(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";overflow:hidden;"], styled$1.MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
|
|
16
16
|
const StyledSideBarButtonsContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
17
17
|
componentId: "sc-16uijso-1"
|
|
18
|
-
})(["overflow-y:auto;align-items:flex-start;justify-content:flex-start;grid-template-rows:repeat(auto-fill,", "px);"], styled$1.BUTTON_SIDEBAR_HEIGHT);
|
|
18
|
+
})(["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;}"], styled$1.BUTTON_SIDEBAR_HEIGHT);
|
|
19
19
|
|
|
20
20
|
exports.StyledSideBarButtonsContainer = StyledSideBarButtonsContainer;
|
|
21
21
|
exports.StyledSideBarContainer = StyledSideBarContainer;
|
|
@@ -4,24 +4,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('react');
|
|
7
|
-
var
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
8
8
|
var styled = require('./styled.js');
|
|
9
9
|
var props = require('./props.js');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
11
|
|
|
11
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
13
|
|
|
13
14
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
|
-
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
15
15
|
|
|
16
16
|
var _Comments;
|
|
17
|
-
const FloatingButton =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const FloatingButton = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
onClick,
|
|
20
|
+
onFocus,
|
|
21
|
+
innerRef
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.StyledFloatingButton, {
|
|
24
|
+
onFocus: onFocus,
|
|
25
|
+
ref: innerRef,
|
|
26
|
+
"data-testid": "chat-floating-button",
|
|
27
|
+
onClick: onClick,
|
|
28
|
+
children: _Comments || (_Comments = /*#__PURE__*/_jsx__default["default"](dsIcons.Comments, {
|
|
29
|
+
size: "l"
|
|
30
|
+
}))
|
|
31
|
+
});
|
|
32
|
+
};
|
|
25
33
|
FloatingButton.defaultProps = props.defaultFloatingButton;
|
|
26
34
|
|
|
27
35
|
exports.FloatingButton = FloatingButton;
|
|
@@ -6,10 +6,14 @@ var reactDesc = require('react-desc');
|
|
|
6
6
|
var lodash = require('lodash');
|
|
7
7
|
|
|
8
8
|
const defaultFloatingButton = {
|
|
9
|
-
onClick: lodash.noop
|
|
9
|
+
onClick: lodash.noop,
|
|
10
|
+
onFocus: lodash.noop,
|
|
11
|
+
innerRef: null
|
|
10
12
|
};
|
|
11
13
|
const propsFloatingButton = {
|
|
12
|
-
onClick: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultFloatingButton.onClick)
|
|
14
|
+
onClick: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultFloatingButton.onClick),
|
|
15
|
+
onFocus: reactDesc.PropTypes.func.description('The function to call when button is being focused').defaultValue(defaultFloatingButton.onFocus),
|
|
16
|
+
innerRef: reactDesc.PropTypes.object.description('Ref to the component container').defaultValue(null)
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
exports.defaultFloatingButton = defaultFloatingButton;
|
|
@@ -12,14 +12,10 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
12
12
|
|
|
13
13
|
const StyledChatContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
14
14
|
componentId: "sc-b6t5vk-0"
|
|
15
|
-
})(["height:100%;width:", ";background:", ";box-shadow:-1px 0 0 0 ", ";transition:width ", " 350ms;"], props => props.expanded ?
|
|
15
|
+
})(["height:100%;width:", ";background:", ";box-shadow:-1px 0 0 0 ", ";transition:width ", " 350ms;"], props => props.expanded ? "".concat(props.expandedWidth, "px") : "".concat(styled$1.MIN_WIDTH_SIDEBAR, "px"), props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral[100], props => props.expanded ? 'ease-out' : 'ease-in');
|
|
16
16
|
const StyledChatContainerContent = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
17
17
|
componentId: "sc-b6t5vk-1"
|
|
18
|
-
})(["height:100%;overflow:hidden;background:", ";", ""], props => props.theme.colors.neutral['050'], props => props.floating ?
|
|
19
|
-
width: ${props.expandedWidth}px;
|
|
20
|
-
` : `
|
|
21
|
-
width: ${props.expandedWidth - styled$1.MIN_WIDTH_SIDEBAR}px;
|
|
22
|
-
`);
|
|
18
|
+
})(["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 - styled$1.MIN_WIDTH_SIDEBAR, "px;\n"));
|
|
23
19
|
|
|
24
20
|
exports.StyledChatContainer = StyledChatContainer;
|
|
25
21
|
exports.StyledChatContainerContent = StyledChatContainerContent;
|
|
@@ -17,7 +17,7 @@ const Line = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
|
17
17
|
})(["border-top:1px solid ", ";"], props => props.theme.colors.neutral['400']);
|
|
18
18
|
const Text = /*#__PURE__*/styled__default["default"].p.withConfig({
|
|
19
19
|
componentId: "sc-upz0rt-2"
|
|
20
|
-
})(["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' ?
|
|
20
|
+
})(["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"));
|
|
21
21
|
|
|
22
22
|
exports.Line = Line;
|
|
23
23
|
exports.Text = Text;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
12
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -35,7 +40,7 @@ const SidebarButton = _ref => {
|
|
|
35
40
|
onClick(dsId);
|
|
36
41
|
}, [onClick, dsId]);
|
|
37
42
|
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledSidebarButton, _objectSpread(_objectSpread({
|
|
38
|
-
"data-testid":
|
|
43
|
+
"data-testid": "sidebar-button-".concat(dsId),
|
|
39
44
|
onClick: handleClick
|
|
40
45
|
}, rest), {}, {
|
|
41
46
|
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledSidebarButtonIcon, {
|
|
@@ -5,15 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var propsTypes = require('prop-types');
|
|
6
6
|
var reactDesc = require('react-desc');
|
|
7
7
|
var lodash = require('lodash');
|
|
8
|
-
var
|
|
8
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var propsTypes__default = /*#__PURE__*/_interopDefaultLegacy(propsTypes);
|
|
13
|
-
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
14
13
|
|
|
15
14
|
const defaultSidebarButton = {
|
|
16
|
-
Icon:
|
|
15
|
+
Icon: dsIcons.Comments,
|
|
17
16
|
dsId: undefined,
|
|
18
17
|
label: '',
|
|
19
18
|
onClick: lodash.noop,
|
|
@@ -11,7 +11,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
const Wrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
13
13
|
componentId: "sc-80w41d-0"
|
|
14
|
-
})(["align-items:center;justify-content:center;
|
|
14
|
+
})(["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']);
|
|
15
15
|
const Header = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
16
16
|
componentId: "sc-80w41d-1"
|
|
17
17
|
})(["align-items:center;height:36px;"]);
|
|
@@ -6,24 +6,23 @@ var _jsx = require('@babel/runtime/helpers/jsx');
|
|
|
6
6
|
require('core-js/modules/web.url.to-json.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
|
-
var
|
|
9
|
+
var dsTooltip = require('@elliemae/ds-tooltip');
|
|
10
10
|
var dsGrid = require('@elliemae/ds-grid');
|
|
11
|
-
var
|
|
11
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
12
|
var styled = require('./styled.js');
|
|
13
13
|
var props = require('./props.js');
|
|
14
14
|
var useValidateProps = require('./config/useValidateProps.js');
|
|
15
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
18
19
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
var DSTooltip__default = /*#__PURE__*/_interopDefaultLegacy(DSTooltip);
|
|
21
|
-
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
22
21
|
|
|
23
22
|
var _StyledWrapperLeftBor, _CloseXsmall;
|
|
24
23
|
|
|
25
24
|
const TileButton = props => {
|
|
26
|
-
var _Icon,
|
|
25
|
+
var _Icon, _StyledTileButtonLabe, _span;
|
|
27
26
|
|
|
28
27
|
useValidateProps.useValidateProps(props, TileButtonWithSchema.toJSON());
|
|
29
28
|
const {
|
|
@@ -42,7 +41,10 @@ const TileButton = props => {
|
|
|
42
41
|
disabled,
|
|
43
42
|
selected,
|
|
44
43
|
isHeader,
|
|
45
|
-
ariaLabel
|
|
44
|
+
ariaLabel,
|
|
45
|
+
tooltipPlacement,
|
|
46
|
+
disableTooltip,
|
|
47
|
+
innerRef
|
|
46
48
|
} = props;
|
|
47
49
|
const handleClick = React__default["default"].useCallback(() => {
|
|
48
50
|
onClick(dsId, title);
|
|
@@ -58,17 +60,19 @@ const TileButton = props => {
|
|
|
58
60
|
justifyContent: "center"
|
|
59
61
|
}, void 0, _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {
|
|
60
62
|
size: "m"
|
|
61
|
-
})), badge ?
|
|
63
|
+
})), badge ? /*#__PURE__*/_jsx__default["default"](styled.StyledStatusBadge, {
|
|
62
64
|
badgeColor: badgeColor,
|
|
63
|
-
badgePosition: badgePosition
|
|
64
|
-
|
|
65
|
+
badgePosition: badgePosition,
|
|
66
|
+
"data-testid": "tile-badge-".concat(dsId)
|
|
67
|
+
}) : null)), !isHeader ? /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
65
68
|
width: "100%",
|
|
66
69
|
justifyContent: "center"
|
|
67
70
|
}, void 0, label ? _StyledTileButtonLabe || (_StyledTileButtonLabe = /*#__PURE__*/_jsx__default["default"](styled.StyledTileButtonLabel, {}, void 0, label)) : null) : null), [isHeader, Icon, badge, badgeColor, badgePosition, label]);
|
|
68
|
-
|
|
71
|
+
const Btn = React__default["default"].useMemo(() => /*#__PURE__*/jsxRuntime.jsx(styled.StyledTileButton, {
|
|
69
72
|
isHeader: isHeader,
|
|
70
73
|
value: dsId,
|
|
71
|
-
"data-testid":
|
|
74
|
+
"data-testid": "tile-button-".concat(dsId),
|
|
75
|
+
"data-key": dsId,
|
|
72
76
|
onClick: handleClick,
|
|
73
77
|
onFocus: onFocus,
|
|
74
78
|
onBlur: onBlur,
|
|
@@ -77,23 +81,22 @@ const TileButton = props => {
|
|
|
77
81
|
badgeColor: badgeColor,
|
|
78
82
|
badgePosition: badgePosition,
|
|
79
83
|
"aria-pressed": selected,
|
|
80
|
-
"aria-label": ariaLabel
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, void 0, _CloseXsmall || (_CloseXsmall = /*#__PURE__*/_jsx__default["default"](CloseXsmall__default["default"], {}))) : null));
|
|
84
|
+
"aria-label": ariaLabel,
|
|
85
|
+
ref: innerRef,
|
|
86
|
+
children: /*#__PURE__*/_jsx__default["default"](styled.StyledWrapper, {
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
justifyContent: "center"
|
|
89
|
+
}, void 0, _span || (_span = /*#__PURE__*/_jsx__default["default"]("span", {}, void 0, MainContent)), _StyledWrapperLeftBor || (_StyledWrapperLeftBor = /*#__PURE__*/_jsx__default["default"](styled.StyledWrapperLeftBorder, {})), showClose && !disabled ? /*#__PURE__*/_jsx__default["default"](styled.CloseButton, {
|
|
90
|
+
onClick: onClose,
|
|
91
|
+
value: dsId,
|
|
92
|
+
"data-testid": "tile-close-btn-".concat(dsId)
|
|
93
|
+
}, void 0, _CloseXsmall || (_CloseXsmall = /*#__PURE__*/_jsx__default["default"](dsIcons.CloseXsmall, {}))) : null)
|
|
94
|
+
}, dsId), [MainContent, ariaLabel, badgeColor, badgePosition, disabled, dsId, handleClick, isHeader, onBlur, onClose, onFocus, selected, showClose, innerRef]);
|
|
95
|
+
return title && !disableTooltip ? /*#__PURE__*/_jsx__default["default"](styled.StyledTooltipV3ButtonWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsTooltip.DSTooltipV3, {
|
|
96
|
+
id: "ds-chat-tile-tooltip-button-".concat(dsId),
|
|
97
|
+
text: title,
|
|
98
|
+
startPlacementPreference: tooltipPlacement
|
|
99
|
+
}, void 0, Btn)) : Btn;
|
|
97
100
|
};
|
|
98
101
|
|
|
99
102
|
TileButton.defaultProps = props.defaultTileButton;
|
|
@@ -4,14 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var reactDesc = require('react-desc');
|
|
6
6
|
var lodash = require('lodash');
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
8
|
|
|
13
9
|
const defaultTileButton = {
|
|
14
|
-
Icon:
|
|
10
|
+
Icon: dsIcons.Comments,
|
|
15
11
|
dsId: undefined,
|
|
16
12
|
label: '',
|
|
17
13
|
onClick: lodash.noop,
|
|
@@ -26,7 +22,10 @@ const defaultTileButton = {
|
|
|
26
22
|
disabled: false,
|
|
27
23
|
selected: false,
|
|
28
24
|
isHeader: false,
|
|
29
|
-
ariaLabel: 'Tile button'
|
|
25
|
+
ariaLabel: 'Tile button',
|
|
26
|
+
tooltipPlacement: 'right',
|
|
27
|
+
disableTooltip: false,
|
|
28
|
+
innerRef: lodash.noop
|
|
30
29
|
};
|
|
31
30
|
const propsTileButton = {
|
|
32
31
|
Icon: reactDesc.PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),
|
|
@@ -44,7 +43,12 @@ const propsTileButton = {
|
|
|
44
43
|
disabled: reactDesc.PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),
|
|
45
44
|
selected: reactDesc.PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),
|
|
46
45
|
isHeader: reactDesc.PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
|
|
47
|
-
ariaLabel: reactDesc.PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel)
|
|
46
|
+
ariaLabel: reactDesc.PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),
|
|
47
|
+
tooltipPlacement: reactDesc.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'"),
|
|
48
|
+
disableTooltip: reactDesc.PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),
|
|
49
|
+
innerRef: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.func, reactDesc.PropTypes.shape({
|
|
50
|
+
current: reactDesc.PropTypes.any
|
|
51
|
+
})]).description('reference to the component')
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
exports.defaultTileButton = defaultTileButton;
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
5
6
|
var styled = require('styled-components');
|
|
7
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
6
8
|
var dsGrid = require('@elliemae/ds-grid');
|
|
7
9
|
|
|
8
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
11
|
|
|
12
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
10
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
var _templateObject;
|
|
13
16
|
const MIN_WIDTH_SIDEBAR = 48;
|
|
14
17
|
const BUTTON_SIDEBAR_HEIGHT = 48; // Buttons
|
|
15
18
|
|
|
@@ -54,9 +57,12 @@ const CloseButton = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
|
54
57
|
componentId: "sc-1ebp1zs-5"
|
|
55
58
|
})(["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
|
|
56
59
|
|
|
57
|
-
const
|
|
60
|
+
const StyledTooltipV3ButtonWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
58
61
|
componentId: "sc-1ebp1zs-6"
|
|
59
|
-
})(["
|
|
62
|
+
})(["height:", "px;width:", "px;"], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR);
|
|
63
|
+
const StyledTileButton = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
64
|
+
componentId: "sc-1ebp1zs-7"
|
|
65
|
+
})(["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 => {
|
|
60
66
|
switch (props.badgePosition) {
|
|
61
67
|
case 'left':
|
|
62
68
|
return 'margin-left: -2px;';
|
|
@@ -69,13 +75,13 @@ const StyledTileButton = /*#__PURE__*/styled__default["default"].button.withConf
|
|
|
69
75
|
}
|
|
70
76
|
}, StyledWrapperLeftBorder, props => props.theme.colors.brand[800], StyledTileButtonLabel, props => props.theme.colors.neutral[600], props => props.theme.colors.brand[800], props => props.theme.colors.neutral['050'], StyledWrapperLeftBorder, props => props.theme.colors.brand[600], StyledTileButtonLabel, props => props.theme.colors.neutral[600], props => props.theme.colors.brand[600], StyledStatusBadge, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['080'], StyledWrapperLeftBorder, props => props.theme.colors.neutral['400'], StyledStatusBadge, props => props.theme.colors.neutral['500'], props => props.theme.colors.neutral['080'], StyledTileButtonIcon, props => props.theme.colors.neutral[400], StyledTileButtonLabel, props => props.theme.colors.neutral[400], props => {
|
|
71
77
|
if (props.selected) {
|
|
72
|
-
return
|
|
78
|
+
return dsSystem.css(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n & ", " {\n background: ", ";\n }\n "])), StyledWrapperLeftBorder, nestedProps => nestedProps.theme.colors.brand[600]);
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
return '';
|
|
76
82
|
});
|
|
77
83
|
const StyledWrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
78
|
-
componentId: "sc-1ebp1zs-
|
|
84
|
+
componentId: "sc-1ebp1zs-8"
|
|
79
85
|
})(["height:100%;width:100%;position:relative;"]);
|
|
80
86
|
|
|
81
87
|
exports.CloseButton = CloseButton;
|
|
@@ -83,6 +89,7 @@ exports.StyledStatusBadge = StyledStatusBadge;
|
|
|
83
89
|
exports.StyledTileButton = StyledTileButton;
|
|
84
90
|
exports.StyledTileButtonIcon = StyledTileButtonIcon;
|
|
85
91
|
exports.StyledTileButtonLabel = StyledTileButtonLabel;
|
|
92
|
+
exports.StyledTooltipV3ButtonWrapper = StyledTooltipV3ButtonWrapper;
|
|
86
93
|
exports.StyledWrapper = StyledWrapper;
|
|
87
94
|
exports.StyledWrapperCentralContent = StyledWrapperCentralContent;
|
|
88
95
|
exports.StyledWrapperLeftBorder = StyledWrapperLeftBorder;
|
package/cjs/styled.js
CHANGED
|
@@ -7,7 +7,7 @@ const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
|
7
7
|
const BUTTON_FLOATING = 56;
|
|
8
8
|
const BOX_SHADOW = '0 5px 8px 0 rgba(53,60,70,0.55)';
|
|
9
9
|
const BOX_SHADOW_FLOATING = '0 5px 8px 0 rgba(53,60,70,0.35)';
|
|
10
|
-
const BOX_SHADOW_INSET =
|
|
10
|
+
const BOX_SHADOW_INSET = "inset 100px 3px 4px 0 rgba(53,60,70,0.50)";
|
|
11
11
|
|
|
12
12
|
exports.BOX_SHADOW = BOX_SHADOW;
|
|
13
13
|
exports.BOX_SHADOW_FLOATING = BOX_SHADOW_FLOATING;
|