@elliemae/ds-chat 2.2.0-next.4 → 2.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ChatDataTestids.js +54 -26
- package/cjs/ChatDataTestids.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +69 -44
- package/cjs/index.js.map +7 -0
- package/cjs/parts/bubble/ChatBubble.js +74 -64
- package/cjs/parts/bubble/ChatBubble.js.map +7 -0
- package/cjs/parts/bubble/ChatBubbleArrow.js +96 -79
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +7 -0
- package/cjs/parts/bubble/config/useValidateProps.js +47 -24
- package/cjs/parts/bubble/config/useValidateProps.js.map +7 -0
- package/cjs/parts/bubble/index.js +38 -12
- package/cjs/parts/bubble/index.js.map +7 -0
- package/cjs/parts/bubble/props.js +60 -48
- package/cjs/parts/bubble/props.js.map +7 -0
- package/cjs/parts/bubble/styled.js +141 -48
- package/cjs/parts/bubble/styled.js.map +7 -0
- package/cjs/parts/chat-card/ChatCard.js +55 -39
- package/cjs/parts/chat-card/ChatCard.js.map +7 -0
- package/cjs/parts/chat-card/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-card/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-card/index.js +36 -10
- package/cjs/parts/chat-card/index.js.map +7 -0
- package/cjs/parts/chat-card/props.js +39 -12
- package/cjs/parts/chat-card/props.js.map +7 -0
- package/cjs/parts/chat-card/styled.js +71 -36
- package/cjs/parts/chat-card/styled.js.map +7 -0
- package/cjs/parts/chat-composer/ChatContainerComposer.js +92 -98
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +7 -0
- package/cjs/parts/chat-composer/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-composer/index.js +36 -10
- package/cjs/parts/chat-composer/index.js.map +7 -0
- package/cjs/parts/chat-composer/props.js +73 -36
- package/cjs/parts/chat-composer/props.js.map +7 -0
- package/cjs/parts/chat-composer/styled.js +102 -34
- package/cjs/parts/chat-composer/styled.js.map +7 -0
- package/cjs/parts/chat-container/ChatContainer.js +122 -140
- package/cjs/parts/chat-container/ChatContainer.js.map +7 -0
- package/cjs/parts/chat-container/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-container/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-container/index.js +36 -10
- package/cjs/parts/chat-container/index.js.map +7 -0
- package/cjs/parts/chat-container/props.js +85 -42
- package/cjs/parts/chat-container/props.js.map +7 -0
- package/cjs/parts/chat-container/styled.js +104 -23
- package/cjs/parts/chat-container/styled.js.map +7 -0
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +48 -30
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
- package/cjs/parts/chat-container-header/helpers.js +38 -25
- package/cjs/parts/chat-container-header/helpers.js.map +7 -0
- package/cjs/parts/chat-container-header/styled.js +59 -24
- package/cjs/parts/chat-container-header/styled.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +163 -225
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/index.js +36 -10
- package/cjs/parts/chat-container-messages-list/index.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/props.js +62 -24
- package/cjs/parts/chat-container-messages-list/props.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/styled.js +100 -38
- package/cjs/parts/chat-container-messages-list/styled.js.map +7 -0
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +58 -42
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-empty-state/props.js +39 -12
- package/cjs/parts/chat-empty-state/props.js.map +7 -0
- package/cjs/parts/chat-empty-state/styled.js +47 -21
- package/cjs/parts/chat-empty-state/styled.js.map +7 -0
- package/cjs/parts/chat-sidebar/SideBarChat.js +82 -81
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +7 -0
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-sidebar/index.js +36 -10
- package/cjs/parts/chat-sidebar/index.js.map +7 -0
- package/cjs/parts/chat-sidebar/props.js +72 -30
- package/cjs/parts/chat-sidebar/props.js.map +7 -0
- package/cjs/parts/chat-sidebar/styled.js +56 -20
- package/cjs/parts/chat-sidebar/styled.js.map +7 -0
- package/cjs/parts/floating-button/FloatingButton.js +47 -34
- package/cjs/parts/floating-button/FloatingButton.js.map +7 -0
- package/cjs/parts/floating-button/index.js +28 -9
- package/cjs/parts/floating-button/index.js.map +7 -0
- package/cjs/parts/floating-button/props.js +42 -15
- package/cjs/parts/floating-button/props.js.map +7 -0
- package/cjs/parts/floating-button/styled.js +63 -17
- package/cjs/parts/floating-button/styled.js.map +7 -0
- package/cjs/parts/floating-container/styled.js +47 -17
- package/cjs/parts/floating-container/styled.js.map +7 -0
- package/cjs/parts/grid-influencer/InfluencerContainer.js +41 -21
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +7 -0
- package/cjs/parts/grid-influencer/styled.js +56 -21
- package/cjs/parts/grid-influencer/styled.js.map +7 -0
- package/cjs/parts/message-delimiter/MessageDelimiter.js +53 -39
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +7 -0
- package/cjs/parts/message-delimiter/config/useValidateProps.js +36 -9
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +7 -0
- package/cjs/parts/message-delimiter/index.js +36 -10
- package/cjs/parts/message-delimiter/index.js.map +7 -0
- package/cjs/parts/message-delimiter/props.js +44 -19
- package/cjs/parts/message-delimiter/props.js.map +7 -0
- package/cjs/parts/message-delimiter/styled.js +53 -24
- package/cjs/parts/message-delimiter/styled.js.map +7 -0
- package/cjs/parts/sidebar-button/SidebarButton.js +52 -53
- package/cjs/parts/sidebar-button/SidebarButton.js.map +7 -0
- package/cjs/parts/sidebar-button/index.js +20 -2
- package/cjs/parts/sidebar-button/index.js.map +7 -0
- package/cjs/parts/sidebar-button/props.js +49 -26
- package/cjs/parts/sidebar-button/props.js.map +7 -0
- package/cjs/parts/sidebar-button/styled.js +68 -24
- package/cjs/parts/sidebar-button/styled.js.map +7 -0
- package/cjs/parts/system-message/SystemMessage.js +55 -40
- package/cjs/parts/system-message/SystemMessage.js.map +7 -0
- package/cjs/parts/system-message/config/useValidateProps.js +36 -9
- package/cjs/parts/system-message/config/useValidateProps.js.map +7 -0
- package/cjs/parts/system-message/index.js +36 -10
- package/cjs/parts/system-message/index.js.map +7 -0
- package/cjs/parts/system-message/props.js +42 -15
- package/cjs/parts/system-message/props.js.map +7 -0
- package/cjs/parts/system-message/style.js +75 -32
- package/cjs/parts/system-message/style.js.map +7 -0
- package/cjs/parts/tile-button/TileButton.js +98 -68
- package/cjs/parts/tile-button/TileButton.js.map +7 -0
- package/cjs/parts/tile-button/config/useValidateProps.js +36 -9
- package/cjs/parts/tile-button/config/useValidateProps.js.map +7 -0
- package/cjs/parts/tile-button/index.js +36 -10
- package/cjs/parts/tile-button/index.js.map +7 -0
- package/cjs/parts/tile-button/props.js +83 -45
- package/cjs/parts/tile-button/props.js.map +7 -0
- package/cjs/parts/tile-button/styled.js +229 -77
- package/cjs/parts/tile-button/styled.js.map +7 -0
- package/cjs/prop-types.js +53 -26
- package/cjs/prop-types.js.map +7 -0
- package/cjs/styled.js +42 -14
- package/cjs/styled.js.map +7 -0
- package/cjs/tests/utils.js +66 -0
- package/cjs/tests/utils.js.map +7 -0
- package/esm/ChatDataTestids.js +25 -22
- package/esm/ChatDataTestids.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +40 -14
- package/esm/index.js.map +7 -0
- package/esm/parts/bubble/ChatBubble.js +51 -51
- package/esm/parts/bubble/ChatBubble.js.map +7 -0
- package/esm/parts/bubble/ChatBubbleArrow.js +67 -71
- package/esm/parts/bubble/ChatBubbleArrow.js.map +7 -0
- package/esm/parts/bubble/config/useValidateProps.js +17 -19
- package/esm/parts/bubble/config/useValidateProps.js.map +7 -0
- package/esm/parts/bubble/index.js +9 -2
- package/esm/parts/bubble/index.js.map +7 -0
- package/esm/parts/bubble/props.js +30 -36
- package/esm/parts/bubble/props.js.map +7 -0
- package/esm/parts/bubble/styled.js +112 -32
- package/esm/parts/bubble/styled.js.map +7 -0
- package/esm/parts/chat-card/ChatCard.js +23 -27
- package/esm/parts/chat-card/ChatCard.js.map +7 -0
- package/esm/parts/chat-card/config/useValidateProps.js +6 -4
- package/esm/parts/chat-card/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-card/index.js +7 -1
- package/esm/parts/chat-card/index.js.map +7 -0
- package/esm/parts/chat-card/props.js +10 -8
- package/esm/parts/chat-card/props.js.map +7 -0
- package/esm/parts/chat-card/styled.js +42 -23
- package/esm/parts/chat-card/styled.js.map +7 -0
- package/esm/parts/chat-composer/ChatContainerComposer.js +65 -83
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +7 -0
- package/esm/parts/chat-composer/config/useValidateProps.js +6 -4
- package/esm/parts/chat-composer/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-composer/index.js +7 -1
- package/esm/parts/chat-composer/index.js.map +7 -0
- package/esm/parts/chat-composer/props.js +37 -24
- package/esm/parts/chat-composer/props.js.map +7 -0
- package/esm/parts/chat-composer/styled.js +73 -22
- package/esm/parts/chat-composer/styled.js.map +7 -0
- package/esm/parts/chat-container/ChatContainer.js +88 -122
- package/esm/parts/chat-container/ChatContainer.js.map +7 -0
- package/esm/parts/chat-container/config/useValidateProps.js +6 -4
- package/esm/parts/chat-container/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-container/index.js +7 -1
- package/esm/parts/chat-container/index.js.map +7 -0
- package/esm/parts/chat-container/props.js +52 -31
- package/esm/parts/chat-container/props.js.map +7 -0
- package/esm/parts/chat-container/styled.js +79 -16
- package/esm/parts/chat-container/styled.js.map +7 -0
- package/esm/parts/chat-container-header/ChatContainerHeader.js +22 -21
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
- package/esm/parts/chat-container-header/helpers.js +9 -17
- package/esm/parts/chat-container-header/helpers.js.map +7 -0
- package/esm/parts/chat-container-header/styled.js +30 -14
- package/esm/parts/chat-container-header/styled.js.map +7 -0
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +138 -210
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +6 -4
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-container-messages-list/index.js +10 -1
- package/esm/parts/chat-container-messages-list/index.js.map +7 -0
- package/esm/parts/chat-container-messages-list/props.js +31 -17
- package/esm/parts/chat-container-messages-list/props.js.map +7 -0
- package/esm/parts/chat-container-messages-list/styled.js +71 -25
- package/esm/parts/chat-container-messages-list/styled.js.map +7 -0
- package/esm/parts/chat-empty-state/ChatEmptyState.js +25 -29
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
- package/esm/parts/chat-empty-state/config/useValidateProps.js +6 -4
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-empty-state/props.js +10 -7
- package/esm/parts/chat-empty-state/props.js.map +7 -0
- package/esm/parts/chat-empty-state/styled.js +18 -11
- package/esm/parts/chat-empty-state/styled.js.map +7 -0
- package/esm/parts/chat-sidebar/SideBarChat.js +50 -67
- package/esm/parts/chat-sidebar/SideBarChat.js.map +7 -0
- package/esm/parts/chat-sidebar/config/useValidateProps.js +6 -4
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-sidebar/index.js +7 -1
- package/esm/parts/chat-sidebar/index.js.map +7 -0
- package/esm/parts/chat-sidebar/props.js +39 -21
- package/esm/parts/chat-sidebar/props.js.map +7 -0
- package/esm/parts/chat-sidebar/styled.js +27 -11
- package/esm/parts/chat-sidebar/styled.js.map +7 -0
- package/esm/parts/floating-button/FloatingButton.js +18 -26
- package/esm/parts/floating-button/FloatingButton.js.map +7 -0
- package/esm/parts/floating-button/index.js +3 -1
- package/esm/parts/floating-button/index.js.map +7 -0
- package/esm/parts/floating-button/props.js +11 -8
- package/esm/parts/floating-button/props.js.map +7 -0
- package/esm/parts/floating-button/styled.js +34 -9
- package/esm/parts/floating-button/styled.js.map +7 -0
- package/esm/parts/floating-container/styled.js +18 -9
- package/esm/parts/floating-container/styled.js.map +7 -0
- package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +7 -0
- package/esm/parts/grid-influencer/styled.js +27 -12
- package/esm/parts/grid-influencer/styled.js.map +7 -0
- package/esm/parts/message-delimiter/MessageDelimiter.js +20 -26
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +7 -0
- package/esm/parts/message-delimiter/config/useValidateProps.js +6 -4
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +7 -0
- package/esm/parts/message-delimiter/index.js +10 -1
- package/esm/parts/message-delimiter/index.js.map +7 -0
- package/esm/parts/message-delimiter/props.js +15 -14
- package/esm/parts/message-delimiter/props.js.map +7 -0
- package/esm/parts/message-delimiter/styled.js +24 -14
- package/esm/parts/message-delimiter/styled.js.map +7 -0
- package/esm/parts/sidebar-button/SidebarButton.js +22 -41
- package/esm/parts/sidebar-button/SidebarButton.js.map +7 -0
- package/esm/parts/sidebar-button/index.js +2 -1
- package/esm/parts/sidebar-button/index.js.map +7 -0
- package/esm/parts/sidebar-button/props.js +18 -15
- package/esm/parts/sidebar-button/props.js.map +7 -0
- package/esm/parts/sidebar-button/styled.js +39 -14
- package/esm/parts/sidebar-button/styled.js.map +7 -0
- package/esm/parts/system-message/SystemMessage.js +22 -27
- package/esm/parts/system-message/SystemMessage.js.map +7 -0
- package/esm/parts/system-message/config/useValidateProps.js +6 -4
- package/esm/parts/system-message/config/useValidateProps.js.map +7 -0
- package/esm/parts/system-message/index.js +7 -1
- package/esm/parts/system-message/index.js.map +7 -0
- package/esm/parts/system-message/props.js +13 -10
- package/esm/parts/system-message/props.js.map +7 -0
- package/esm/parts/system-message/style.js +46 -20
- package/esm/parts/system-message/style.js.map +7 -0
- package/esm/parts/tile-button/TileButton.js +75 -54
- package/esm/parts/tile-button/TileButton.js.map +7 -0
- package/esm/parts/tile-button/config/useValidateProps.js +6 -4
- package/esm/parts/tile-button/config/useValidateProps.js.map +7 -0
- package/esm/parts/tile-button/index.js +7 -1
- package/esm/parts/tile-button/index.js.map +7 -0
- package/esm/parts/tile-button/props.js +47 -33
- package/esm/parts/tile-button/props.js.map +7 -0
- package/esm/parts/tile-button/styled.js +200 -60
- package/esm/parts/tile-button/styled.js.map +7 -0
- package/esm/prop-types.js +19 -16
- package/esm/prop-types.js.map +7 -0
- package/esm/styled.js +13 -5
- package/esm/styled.js.map +7 -0
- package/esm/tests/utils.js +37 -0
- package/esm/tests/utils.js.map +7 -0
- package/package.json +10 -10
- package/types/parts/bubble/ChatBubble.d.ts +1 -1
- package/types/parts/chat-card/ChatCard.d.ts +1 -1
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +1 -1
- package/types/parts/chat-container/ChatContainer.d.ts +1 -1
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +1 -1
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +1 -1
- package/types/parts/chat-sidebar/SideBarChat.d.ts +1 -1
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +1 -1
- package/types/parts/system-message/SystemMessage.d.ts +1 -1
- package/types/parts/tile-button/TileButton.d.ts +1 -1
|
@@ -1,45 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { StyledSidebarButton, StyledSidebarButtonIcon, StyledSidebarButtonLabel } from './styled.js';
|
|
11
|
-
import { defaultSidebarButton } from './props.js';
|
|
12
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
const _excluded = ["label", "dsId", "onClick", "Icon"];
|
|
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
|
-
const SidebarButton = _ref => {
|
|
20
|
-
let {
|
|
21
|
-
label,
|
|
22
|
-
dsId,
|
|
23
|
-
onClick,
|
|
24
|
-
Icon
|
|
25
|
-
} = _ref,
|
|
26
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
|
|
28
|
-
const handleClick = React.useCallback(() => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled";
|
|
4
|
+
import { propsSidebarButton, defaultSidebarButton } from "./props";
|
|
5
|
+
const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
6
|
+
const handleClick = React2.useCallback(() => {
|
|
29
7
|
onClick(dsId);
|
|
30
8
|
}, [onClick, dsId]);
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}),
|
|
9
|
+
return /* @__PURE__ */ React2.createElement(StyledSidebarButton, {
|
|
10
|
+
key: dsId,
|
|
11
|
+
"data-testid": `sidebar-button-${dsId}`,
|
|
12
|
+
onClick: handleClick,
|
|
13
|
+
...rest
|
|
14
|
+
}, /* @__PURE__ */ React2.createElement(StyledSidebarButtonIcon, {
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center"
|
|
17
|
+
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
18
|
+
size: "m"
|
|
19
|
+
})), label && /* @__PURE__ */ React2.createElement(StyledSidebarButtonLabel, null, label));
|
|
42
20
|
};
|
|
21
|
+
SidebarButton.propTypes = propsSidebarButton;
|
|
43
22
|
SidebarButton.defaultProps = defaultSidebarButton;
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
export {
|
|
24
|
+
SidebarButton
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=SidebarButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/sidebar-button/SidebarButton.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,WAA4C;AACzG,QAAM,cAAc,OAAM,YAAY,MAAM;AAC1C,YAAQ;AAAA,KACP,CAAC,SAAS;AAEb,SACE,qCAAC,qBAAD;AAAA,IAAqB,KAAK;AAAA,IAAM,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,OAAiB;AAAA,KAC/F,qCAAC,yBAAD;AAAA,IAAyB,YAAW;AAAA,IAAS,gBAAe;AAAA,KAC1D,qCAAC,MAAD;AAAA,IAAM,MAAK;AAAA,OAEZ,SAAS,qCAAC,0BAAD,MAA2B;AAAA;AAK3C,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import propsTypes from "prop-types";
|
|
3
|
+
import { PropTypes } from "react-desc";
|
|
4
|
+
import { noop } from "lodash";
|
|
5
|
+
import { Comments } from "@elliemae/ds-icons";
|
|
6
6
|
const defaultSidebarButton = {
|
|
7
7
|
Icon: Comments,
|
|
8
|
-
dsId:
|
|
9
|
-
label:
|
|
8
|
+
dsId: void 0,
|
|
9
|
+
label: "",
|
|
10
10
|
onClick: noop,
|
|
11
|
-
title:
|
|
11
|
+
title: ""
|
|
12
12
|
};
|
|
13
13
|
const propsSidebarButton = {
|
|
14
|
-
Icon: PropTypes.element.description(
|
|
15
|
-
dsId: PropTypes.oneOfType([propsTypes.number, propsTypes.string]).description(
|
|
16
|
-
label: PropTypes.string.description(
|
|
17
|
-
title: PropTypes.string.description(
|
|
18
|
-
onClick: PropTypes.func.description(
|
|
14
|
+
Icon: PropTypes.element.description("Icon component").defaultValue(defaultSidebarButton.Icon),
|
|
15
|
+
dsId: PropTypes.oneOfType([propsTypes.number, propsTypes.string]).description("Unique id for the button").defaultValue(defaultSidebarButton.dsId),
|
|
16
|
+
label: PropTypes.string.description("It will display under the icon").defaultValue(defaultSidebarButton.label),
|
|
17
|
+
title: PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
|
|
18
|
+
onClick: PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
export {
|
|
21
|
+
defaultSidebarButton,
|
|
22
|
+
propsSidebarButton
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/sidebar-button/props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport propsTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick?: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: undefined,\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([propsTypes.number, propsTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAUO,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA;AAGF,MAAM,qBAAqB;AAAA,EAChC,MAAM,UAAU,QAAQ,YAAY,kBAAkB,aAAa,qBAAqB;AAAA,EACxF,MAAM,UAAU,UAAU,CAAC,WAAW,QAAQ,WAAW,SACtD,YAAY,4BACZ,aAAa,qBAAqB;AAAA,EACrC,OAAO,UAAU,OAAO,YAAY,kCAAkC,aAAa,qBAAqB;AAAA,EACxG,OAAO,UAAU,OAAO,YAAY,WAAW,aAAa,qBAAqB;AAAA,EACjF,SAAS,UAAU,KAChB,YAAY,4CACZ,aAAa,qBAAqB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR } from "../../styled";
|
|
5
|
+
const StyledSidebarButton = styled.button`
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
outline: none;
|
|
10
|
+
height: ${BUTTON_SIDEBAR_HEIGHT}px;
|
|
11
|
+
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
12
|
+
position: relative;
|
|
13
|
+
border: 0;
|
|
14
|
+
background: transparent;
|
|
15
|
+
&:focus,
|
|
16
|
+
&:hover {
|
|
17
|
+
background: ${(props) => props.theme.colors.neutral["080"]};
|
|
18
|
+
}
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.neutral["200"]};
|
|
4
21
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
svg {
|
|
23
|
+
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const StyledSidebarButtonIcon = styled(Grid)`
|
|
27
|
+
position: relative;
|
|
28
|
+
`;
|
|
29
|
+
const StyledSidebarButtonLabel = styled.div`
|
|
30
|
+
width: 30px;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-align: center;
|
|
34
|
+
`;
|
|
35
|
+
export {
|
|
36
|
+
StyledSidebarButton,
|
|
37
|
+
StyledSidebarButtonIcon,
|
|
38
|
+
StyledSidebarButtonLabel
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/sidebar-button/styled.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR } from '../../styled';\n\n// Buttons\nexport const StyledSidebarButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n outline: none;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n border: 0;\n background: transparent;\n &:focus,\n &:hover {\n background: ${(props) => props.theme.colors.neutral['080']};\n }\n cursor: pointer;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledSidebarButtonIcon = styled(Grid)`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled.div`\n width: 30px;\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAGO,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,6BAG3B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,YAGvD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3C,MAAM,0BAA0B,OAAO;AAAA;AAAA;AAIvC,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _span;
|
|
10
|
-
|
|
11
|
-
const SystemMessage = props => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { Wrapper, Header, Title, Time, Message } from "./style";
|
|
5
|
+
import { systemMessageProps, defaultProps } from "./props";
|
|
6
|
+
import { useValidateProps } from "./config/useValidateProps";
|
|
7
|
+
const SystemMessage = (props) => {
|
|
12
8
|
useValidateProps(props, SystemMessageWithSchema.toJSON());
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
rows: ['auto', 'auto']
|
|
20
|
-
}, void 0, /*#__PURE__*/_jsx(Header, {
|
|
21
|
-
cols: ['1fr', 'auto', '1fr']
|
|
22
|
-
}, void 0, _span || (_span = /*#__PURE__*/_jsx("span", {})), /*#__PURE__*/_jsx(Title, {
|
|
9
|
+
const { title, time, body } = props;
|
|
10
|
+
return /* @__PURE__ */ React2.createElement(Wrapper, {
|
|
11
|
+
rows: ["auto", "auto"]
|
|
12
|
+
}, /* @__PURE__ */ React2.createElement(Header, {
|
|
13
|
+
cols: ["1fr", "auto", "1fr"]
|
|
14
|
+
}, /* @__PURE__ */ React2.createElement("span", null), /* @__PURE__ */ React2.createElement(Title, {
|
|
23
15
|
"data-testid": "chat-system-message-title"
|
|
24
|
-
},
|
|
16
|
+
}, title), /* @__PURE__ */ React2.createElement(Time, {
|
|
25
17
|
"data-testid": "chat-system-message-time"
|
|
26
|
-
},
|
|
18
|
+
}, time)), /* @__PURE__ */ React2.createElement(Message, {
|
|
27
19
|
"data-testid": "chat-system-message-body"
|
|
28
|
-
},
|
|
20
|
+
}, body));
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
SystemMessage.defaultProps = defaultProps;
|
|
23
|
+
SystemMessage.propTypes = systemMessageProps;
|
|
32
24
|
const SystemMessageWithSchema = describe(SystemMessage);
|
|
33
25
|
SystemMessageWithSchema.propTypes = systemMessageProps;
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
export {
|
|
27
|
+
SystemMessage,
|
|
28
|
+
SystemMessageWithSchema
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=SystemMessage.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/system-message/SystemMessage.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from 'react-desc';\nimport { Wrapper, Header, Title, Time, Message } from './style';\nimport { SystemMessageProps, systemMessageProps, defaultProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst SystemMessage = (props: SystemMessageProps): JSX.Element => {\n useValidateProps(props, SystemMessageWithSchema.toJSON());\n const { title, time, body } = props;\n return (\n <Wrapper rows={['auto', 'auto']}>\n <Header cols={['1fr', 'auto', '1fr']}>\n <span />\n <Title data-testid=\"chat-system-message-title\">{title}</Title>\n <Time data-testid=\"chat-system-message-time\">{time}</Time>\n </Header>\n <Message data-testid=\"chat-system-message-body\">{body}</Message>\n </Wrapper>\n );\n};\n\nSystemMessage.defaultProps = defaultProps;\nSystemMessage.propTypes = systemMessageProps;\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps;\n\nexport { SystemMessage, SystemMessageWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,gBAAgB,CAAC,UAA2C;AAChE,mBAAiB,OAAO,wBAAwB;AAChD,QAAM,EAAE,OAAO,MAAM,SAAS;AAC9B,SACE,qCAAC,SAAD;AAAA,IAAS,MAAM,CAAC,QAAQ;AAAA,KACtB,qCAAC,QAAD;AAAA,IAAQ,MAAM,CAAC,OAAO,QAAQ;AAAA,KAC5B,qCAAC,QAAD,OACA,qCAAC,OAAD;AAAA,IAAO,eAAY;AAAA,KAA6B,QAChD,qCAAC,MAAD;AAAA,IAAM,eAAY;AAAA,KAA4B,QAEhD,qCAAC,SAAD;AAAA,IAAS,eAAY;AAAA,KAA4B;AAAA;AAKvD,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,MAAM,0BAA0B,SAAS;AACzC,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const useValidateProps = (props, schema) => {
|
|
4
4
|
useValidatePropTypes(props, schema);
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export {
|
|
7
|
+
useValidateProps
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/system-message/config/useValidateProps.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { SystemMessageProps } from '../props';\n\nexport const useValidateProps = (props: SystemMessageProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAA2B,WAA0B;AACpF,uBAAqB,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { SystemMessage, SystemMessageWithSchema } from "./SystemMessage";
|
|
3
|
+
export {
|
|
4
|
+
SystemMessage,
|
|
5
|
+
SystemMessageWithSchema
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/system-message/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { SystemMessage, SystemMessageWithSchema } from './SystemMessage';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "react-desc";
|
|
3
3
|
const defaultProps = {
|
|
4
|
-
title:
|
|
5
|
-
time:
|
|
6
|
-
body:
|
|
4
|
+
title: "System Message",
|
|
5
|
+
time: "",
|
|
6
|
+
body: ""
|
|
7
7
|
};
|
|
8
8
|
const systemMessageProps = {
|
|
9
|
-
title: PropTypes.string.isRequired.description(
|
|
10
|
-
time: PropTypes.string.description(
|
|
11
|
-
body: PropTypes.string.isRequired.description(
|
|
9
|
+
title: PropTypes.string.isRequired.description("Message title").defaultValue("System Message"),
|
|
10
|
+
time: PropTypes.string.description("data of the message, ie: hour"),
|
|
11
|
+
body: PropTypes.string.isRequired.description("message")
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
export {
|
|
14
|
+
defaultProps,
|
|
15
|
+
systemMessageProps
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/system-message/props.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\n\nexport interface SystemMessageProps {\n title: string;\n time: string;\n body: string;\n}\n\nexport const defaultProps: SystemMessageProps = {\n title: 'System Message',\n time: '',\n body: '',\n};\n\nexport const systemMessageProps = {\n title: PropTypes.string.isRequired\n .description('Message title')\n .defaultValue('System Message'),\n time: PropTypes.string.description('data of the message, ie: hour'),\n body: PropTypes.string.isRequired.description('message'),\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAQO,MAAM,eAAmC;AAAA,EAC9C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA;AAGD,MAAM,qBAAqB;AAAA,EAChC,OAAO,UAAU,OAAO,WACrB,YAAY,iBACZ,aAAa;AAAA,EAChB,MAAM,UAAU,OAAO,YAAY;AAAA,EACnC,MAAM,UAAU,OAAO,WAAW,YAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,20 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const Wrapper =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
const Wrapper = styled(Grid)`
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
padding: 0 8px 8px;
|
|
9
|
+
border: 1px solid ${(props) => props.theme.colors.neutral["100"]};
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
background-color: ${(props) => props.theme.colors.neutral["080"]};
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
`;
|
|
14
|
+
const Header = styled(Grid)`
|
|
15
|
+
align-items: center;
|
|
16
|
+
height: 36px;
|
|
17
|
+
`;
|
|
18
|
+
const Title = styled.p`
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
21
|
+
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
22
|
+
margin: 0;
|
|
23
|
+
`;
|
|
24
|
+
const Time = styled.p`
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
27
|
+
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
28
|
+
margin: 0;
|
|
29
|
+
text-align: right;
|
|
30
|
+
`;
|
|
31
|
+
const Message = styled.p`
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
34
|
+
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
35
|
+
min-height: 32px;
|
|
36
|
+
text-align: center;
|
|
37
|
+
margin: 0;
|
|
38
|
+
`;
|
|
39
|
+
export {
|
|
40
|
+
Header,
|
|
41
|
+
Message,
|
|
42
|
+
Time,
|
|
43
|
+
Title,
|
|
44
|
+
Wrapper
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/system-message/style.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst Wrapper = styled(Grid)`\n align-items: center;\n justify-content: center;\n max-width: 100%;\n padding: 0 8px 8px;\n border: 1px solid ${(props) => props.theme.colors.neutral['100']};\n border-radius: 10px;\n background-color: ${(props) => props.theme.colors.neutral['080']};\n box-shadow: none;\n`;\n\nconst Header = styled(Grid)`\n align-items: center;\n height: 36px;\n`;\n\nconst Title = styled.p<any>`\n font-size: 14px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n`;\n\nconst Time = styled.p<any>`\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n margin: 0;\n text-align: right;\n`;\n\nconst Message = styled.p<any>`\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n min-height: 32px;\n text-align: center;\n margin: 0;\n`;\n\nexport { Wrapper, Header, Title, Time, Message };\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,sBAEtC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI5D,MAAM,SAAS,OAAO;AAAA;AAAA;AAAA;AAKtB,MAAM,QAAQ,OAAO;AAAA;AAAA,iBAEJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjD,MAAM,OAAO,OAAO;AAAA;AAAA,iBAEH,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAKjD,MAAM,UAAU,OAAO;AAAA;AAAA,iBAEN,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { DSTooltipV3 } from "@elliemae/ds-tooltip";
|
|
5
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
+
import { CloseXsmall } from "@elliemae/ds-icons";
|
|
7
|
+
import {
|
|
8
|
+
StyledTooltipV3ButtonWrapper,
|
|
9
|
+
StyledTileButton,
|
|
10
|
+
StyledTileButtonIcon,
|
|
11
|
+
StyledTileButtonLabel,
|
|
12
|
+
StyledWrapper,
|
|
13
|
+
StyledWrapperLeftBorder,
|
|
14
|
+
StyledStatusBadge,
|
|
15
|
+
StyledWrapperCentralContent,
|
|
16
|
+
CloseButton
|
|
17
|
+
} from "./styled";
|
|
18
|
+
import { propsTileButton, defaultTileButton } from "./props";
|
|
19
|
+
import { useValidateProps } from "./config/useValidateProps";
|
|
20
|
+
const TileButton = (props) => {
|
|
18
21
|
useValidateProps(props, TileButtonWithSchema.toJSON());
|
|
19
22
|
const {
|
|
20
23
|
label,
|
|
@@ -37,61 +40,79 @@ const TileButton = props => {
|
|
|
37
40
|
disableTooltip,
|
|
38
41
|
innerRef
|
|
39
42
|
} = props;
|
|
40
|
-
const handleClick =
|
|
43
|
+
const handleClick = React2.useCallback(() => {
|
|
41
44
|
onClick(dsId, title);
|
|
42
45
|
}, [dsId, onClick, title]);
|
|
43
|
-
const MainContent =
|
|
44
|
-
alignItems: isHeader ?
|
|
45
|
-
},
|
|
46
|
+
const MainContent = React2.useMemo(() => /* @__PURE__ */ React2.createElement(StyledWrapperCentralContent, {
|
|
47
|
+
alignItems: isHeader ? "center" : void 0
|
|
48
|
+
}, /* @__PURE__ */ React2.createElement(Grid, {
|
|
46
49
|
width: "100%",
|
|
47
50
|
alignItems: "center",
|
|
48
51
|
justifyContent: "center"
|
|
49
|
-
},
|
|
52
|
+
}, /* @__PURE__ */ React2.createElement(StyledTileButtonIcon, {
|
|
50
53
|
alignItems: "center",
|
|
51
54
|
justifyContent: "center"
|
|
52
|
-
},
|
|
55
|
+
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
53
56
|
size: "m"
|
|
54
|
-
})
|
|
55
|
-
badgeColor
|
|
56
|
-
badgePosition
|
|
57
|
-
"data-testid":
|
|
58
|
-
}) : null)), !isHeader ?
|
|
57
|
+
}), badge ? /* @__PURE__ */ React2.createElement(StyledStatusBadge, {
|
|
58
|
+
badgeColor,
|
|
59
|
+
badgePosition,
|
|
60
|
+
"data-testid": `tile-badge-${dsId}`
|
|
61
|
+
}) : null)), !isHeader ? /* @__PURE__ */ React2.createElement(Grid, {
|
|
59
62
|
width: "100%",
|
|
60
63
|
justifyContent: "center"
|
|
61
|
-
},
|
|
62
|
-
const Btn =
|
|
63
|
-
|
|
64
|
+
}, label ? /* @__PURE__ */ React2.createElement(StyledTileButtonLabel, null, label) : null) : null), [isHeader, Icon, badge, badgeColor, badgePosition, label]);
|
|
65
|
+
const Btn = React2.useMemo(() => /* @__PURE__ */ React2.createElement(StyledTileButton, {
|
|
66
|
+
key: dsId,
|
|
67
|
+
isHeader,
|
|
64
68
|
value: dsId,
|
|
65
|
-
"data-testid":
|
|
69
|
+
"data-testid": `tile-button-${dsId}`,
|
|
66
70
|
"data-key": dsId,
|
|
67
71
|
onClick: handleClick,
|
|
68
|
-
onFocus
|
|
69
|
-
onBlur
|
|
70
|
-
disabled
|
|
71
|
-
selected
|
|
72
|
-
badgeColor
|
|
73
|
-
badgePosition
|
|
72
|
+
onFocus,
|
|
73
|
+
onBlur,
|
|
74
|
+
disabled,
|
|
75
|
+
selected,
|
|
76
|
+
badgeColor,
|
|
77
|
+
badgePosition,
|
|
74
78
|
"aria-pressed": selected,
|
|
75
79
|
"aria-label": ariaLabel,
|
|
76
|
-
ref: innerRef
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
ref: innerRef
|
|
81
|
+
}, /* @__PURE__ */ React2.createElement(StyledWrapper, {
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
justifyContent: "center"
|
|
84
|
+
}, /* @__PURE__ */ React2.createElement("span", null, MainContent), /* @__PURE__ */ React2.createElement(StyledWrapperLeftBorder, null), showClose && !disabled ? /* @__PURE__ */ React2.createElement(CloseButton, {
|
|
85
|
+
onClick: onClose,
|
|
86
|
+
value: dsId,
|
|
87
|
+
"data-testid": `tile-close-btn-${dsId}`
|
|
88
|
+
}, /* @__PURE__ */ React2.createElement(CloseXsmall, null)) : null)), [
|
|
89
|
+
MainContent,
|
|
90
|
+
ariaLabel,
|
|
91
|
+
badgeColor,
|
|
92
|
+
badgePosition,
|
|
93
|
+
disabled,
|
|
94
|
+
dsId,
|
|
95
|
+
handleClick,
|
|
96
|
+
isHeader,
|
|
97
|
+
onBlur,
|
|
98
|
+
onClose,
|
|
99
|
+
onFocus,
|
|
100
|
+
selected,
|
|
101
|
+
showClose,
|
|
102
|
+
innerRef
|
|
103
|
+
]);
|
|
104
|
+
return title && !disableTooltip ? /* @__PURE__ */ React2.createElement(StyledTooltipV3ButtonWrapper, null, /* @__PURE__ */ React2.createElement(DSTooltipV3, {
|
|
105
|
+
id: `ds-chat-tile-tooltip-button-${dsId}`,
|
|
88
106
|
text: title,
|
|
89
107
|
startPlacementPreference: tooltipPlacement
|
|
90
|
-
},
|
|
108
|
+
}, Btn)) : Btn;
|
|
91
109
|
};
|
|
92
|
-
|
|
110
|
+
TileButton.propTypes = propsTileButton;
|
|
93
111
|
TileButton.defaultProps = defaultTileButton;
|
|
94
112
|
const TileButtonWithSchema = describe(TileButton);
|
|
95
113
|
TileButtonWithSchema.propTypes = propsTileButton;
|
|
96
|
-
|
|
97
|
-
|
|
114
|
+
export {
|
|
115
|
+
TileButton,
|
|
116
|
+
TileButtonWithSchema
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=TileButton.js.map
|