@elliemae/ds-chat 1.57.1 → 2.0.0-alpha.11
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/index.d.js +0 -1
- package/cjs/index.js +37 -94
- package/cjs/parts/bubble/ChatBubble.js +35 -42
- package/cjs/parts/bubble/ChatBubbleArrow.js +67 -73
- package/cjs/parts/bubble/config/useValidateProps.js +2 -3
- package/cjs/parts/bubble/index.js +5 -17
- package/cjs/parts/bubble/props.js +5 -6
- package/cjs/parts/bubble/styled.js +14 -38
- package/cjs/parts/chat-card/ChatCard.js +24 -25
- package/cjs/parts/chat-card/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-card/index.js +3 -13
- package/cjs/parts/chat-card/props.js +1 -2
- package/cjs/parts/chat-card/styled.js +7 -12
- package/cjs/parts/chat-composer/ChatContainerComposer.js +65 -77
- package/cjs/parts/chat-composer/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-composer/index.js +3 -17
- package/cjs/parts/chat-composer/props.js +2 -5
- package/cjs/parts/chat-composer/styled.js +10 -31
- package/cjs/parts/chat-container/ChatContainer.js +89 -106
- package/cjs/parts/chat-container/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-container/index.js +3 -43
- package/cjs/parts/chat-container/props.js +6 -7
- package/cjs/parts/chat-container/styled.js +10 -32
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +15 -15
- package/cjs/parts/chat-container-header/styled.js +6 -13
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +114 -125
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-container-messages-list/index.js +3 -32
- package/cjs/parts/chat-container-messages-list/props.js +3 -6
- package/cjs/parts/chat-container-messages-list/styled.js +12 -47
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +38 -37
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-empty-state/props.js +2 -3
- package/cjs/parts/chat-empty-state/styled.js +4 -7
- package/cjs/parts/chat-sidebar/SideBarChat.js +50 -60
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-sidebar/index.js +3 -26
- package/cjs/parts/chat-sidebar/props.js +3 -8
- package/cjs/parts/chat-sidebar/styled.js +4 -9
- package/cjs/parts/floating-button/FloatingButton.js +17 -20
- package/cjs/parts/floating-button/index.js +2 -10
- package/cjs/parts/floating-button/props.js +2 -3
- package/cjs/parts/floating-button/styled.js +5 -18
- package/cjs/parts/floating-container/styled.js +2 -5
- package/cjs/parts/grid-influencer/InfluencerContainer.js +11 -65
- package/cjs/parts/grid-influencer/styled.js +4 -17
- package/cjs/parts/message-delimiter/MessageDelimiter.js +23 -22
- package/cjs/parts/message-delimiter/config/useValidateProps.js +1 -2
- package/cjs/parts/message-delimiter/index.js +3 -12
- package/cjs/parts/message-delimiter/props.js +2 -3
- package/cjs/parts/message-delimiter/styled.js +5 -16
- package/cjs/parts/sidebar-button/SidebarButton.js +31 -30
- package/cjs/parts/sidebar-button/index.js +0 -1
- package/cjs/parts/sidebar-button/props.js +6 -6
- package/cjs/parts/sidebar-button/styled.js +4 -11
- package/cjs/parts/system-message/SystemMessage.js +25 -24
- package/cjs/parts/system-message/config/useValidateProps.js +1 -2
- package/cjs/parts/system-message/index.js +3 -12
- package/cjs/parts/system-message/props.js +2 -3
- package/cjs/parts/system-message/style.js +9 -26
- package/cjs/parts/tile-button/TileButton.js +85 -82
- package/cjs/parts/tile-button/config/useValidateProps.js +1 -2
- package/cjs/parts/tile-button/index.js +3 -15
- package/cjs/parts/tile-button/props.js +10 -11
- package/cjs/parts/tile-button/styled.js +18 -67
- package/cjs/prop-types.js +2 -3
- package/cjs/styled.js +6 -7
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -57
- package/esm/parts/bubble/ChatBubble.js +27 -35
- package/esm/parts/bubble/ChatBubbleArrow.js +65 -71
- package/esm/parts/bubble/config/useValidateProps.js +2 -3
- package/esm/parts/bubble/index.js +0 -12
- package/esm/parts/bubble/props.js +4 -5
- package/esm/parts/bubble/styled.js +13 -37
- package/esm/parts/chat-card/ChatCard.js +18 -19
- package/esm/parts/chat-card/config/useValidateProps.js +1 -2
- package/esm/parts/chat-card/index.js +0 -10
- package/esm/parts/chat-card/props.js +1 -2
- package/esm/parts/chat-card/styled.js +7 -12
- package/esm/parts/chat-composer/ChatContainerComposer.js +56 -69
- package/esm/parts/chat-composer/config/useValidateProps.js +1 -2
- package/esm/parts/chat-composer/index.js +0 -14
- package/esm/parts/chat-composer/props.js +2 -5
- package/esm/parts/chat-composer/styled.js +9 -30
- package/esm/parts/chat-container/ChatContainer.js +79 -97
- package/esm/parts/chat-container/config/useValidateProps.js +1 -2
- package/esm/parts/chat-container/index.js +0 -40
- package/esm/parts/chat-container/props.js +2 -3
- package/esm/parts/chat-container/styled.js +6 -28
- package/esm/parts/chat-container-header/ChatContainerHeader.js +13 -14
- package/esm/parts/chat-container-header/styled.js +6 -13
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +102 -113
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +1 -2
- package/esm/parts/chat-container-messages-list/index.js +0 -29
- package/esm/parts/chat-container-messages-list/props.js +3 -6
- package/esm/parts/chat-container-messages-list/styled.js +11 -46
- package/esm/parts/chat-empty-state/ChatEmptyState.js +30 -30
- package/esm/parts/chat-empty-state/config/useValidateProps.js +1 -2
- package/esm/parts/chat-empty-state/props.js +2 -3
- package/esm/parts/chat-empty-state/styled.js +4 -7
- package/esm/parts/chat-sidebar/SideBarChat.js +38 -50
- package/esm/parts/chat-sidebar/config/useValidateProps.js +1 -2
- package/esm/parts/chat-sidebar/index.js +0 -23
- package/esm/parts/chat-sidebar/props.js +3 -8
- package/esm/parts/chat-sidebar/styled.js +4 -9
- package/esm/parts/floating-button/FloatingButton.js +13 -17
- package/esm/parts/floating-button/index.js +0 -8
- package/esm/parts/floating-button/props.js +2 -3
- package/esm/parts/floating-button/styled.js +5 -18
- package/esm/parts/floating-container/styled.js +2 -5
- package/esm/parts/grid-influencer/InfluencerContainer.js +7 -62
- package/esm/parts/grid-influencer/styled.js +4 -17
- package/esm/parts/message-delimiter/MessageDelimiter.js +16 -15
- package/esm/parts/message-delimiter/config/useValidateProps.js +1 -2
- package/esm/parts/message-delimiter/index.js +0 -9
- package/esm/parts/message-delimiter/props.js +2 -3
- package/esm/parts/message-delimiter/styled.js +5 -16
- package/esm/parts/sidebar-button/SidebarButton.js +26 -26
- package/esm/parts/sidebar-button/index.js +0 -1
- package/esm/parts/sidebar-button/props.js +3 -4
- package/esm/parts/sidebar-button/styled.js +4 -11
- package/esm/parts/system-message/SystemMessage.js +18 -17
- package/esm/parts/system-message/config/useValidateProps.js +1 -2
- package/esm/parts/system-message/index.js +0 -9
- package/esm/parts/system-message/props.js +2 -3
- package/esm/parts/system-message/style.js +9 -26
- package/esm/parts/tile-button/TileButton.js +76 -76
- package/esm/parts/tile-button/config/useValidateProps.js +1 -2
- package/esm/parts/tile-button/index.js +0 -12
- package/esm/parts/tile-button/props.js +5 -10
- package/esm/parts/tile-button/styled.js +18 -67
- package/esm/prop-types.js +2 -3
- package/esm/styled.js +6 -7
- package/package.json +289 -18
- package/types/index.d.d.ts +37 -0
- package/types/index.d.ts +13 -0
- package/types/parts/bubble/ChatBubble.d.ts +17 -0
- package/types/parts/bubble/ChatBubbleArrow.d.ts +8 -0
- package/types/parts/bubble/config/useValidateProps.d.ts +2 -0
- package/types/parts/bubble/index.d.ts +2 -0
- package/types/parts/bubble/props.d.ts +43 -0
- package/types/parts/bubble/styled.d.ts +10 -0
- package/types/parts/chat-card/ChatCard.d.ts +13 -0
- package/types/parts/chat-card/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-card/index.d.ts +1 -0
- package/types/parts/chat-card/props.d.ts +13 -0
- package/types/parts/chat-card/styled.d.ts +7 -0
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +22 -0
- package/types/parts/chat-composer/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-composer/index.d.ts +1 -0
- package/types/parts/chat-composer/props.d.ts +35 -0
- package/types/parts/chat-composer/styled.d.ts +64 -0
- package/types/parts/chat-container/ChatContainer.d.ts +22 -0
- package/types/parts/chat-container/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-container/index.d.ts +1 -0
- package/types/parts/chat-container/props.d.ts +39 -0
- package/types/parts/chat-container/styled.d.ts +8 -0
- package/types/parts/chat-container-header/ChatContainerHeader.d.ts +2 -0
- package/types/parts/chat-container-header/styled.d.ts +4 -0
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +18 -0
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-container-messages-list/index.d.ts +1 -0
- package/types/parts/chat-container-messages-list/props.d.ts +23 -0
- package/types/parts/chat-container-messages-list/styled.d.ts +11 -0
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -0
- package/types/parts/chat-empty-state/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-empty-state/props.d.ts +10 -0
- package/types/parts/chat-empty-state/styled.d.ts +4 -0
- package/types/parts/chat-sidebar/SideBarChat.d.ts +18 -0
- package/types/parts/chat-sidebar/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-sidebar/index.d.ts +1 -0
- package/types/parts/chat-sidebar/props.d.ts +22 -0
- package/types/parts/chat-sidebar/styled.d.ts +3 -0
- package/types/parts/floating-button/FloatingButton.d.ts +9 -0
- package/types/parts/floating-button/index.d.ts +1 -0
- package/types/parts/floating-button/props.d.ts +7 -0
- package/types/parts/floating-button/styled.d.ts +1 -0
- package/types/parts/floating-container/styled.d.ts +2 -0
- package/types/parts/grid-influencer/InfluencerContainer.d.ts +2 -0
- package/types/parts/grid-influencer/styled.d.ts +3 -0
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +14 -0
- package/types/parts/message-delimiter/config/useValidateProps.d.ts +2 -0
- package/types/parts/message-delimiter/index.d.ts +1 -0
- package/types/parts/message-delimiter/props.d.ts +13 -0
- package/types/parts/message-delimiter/styled.d.ts +6 -0
- package/types/parts/sidebar-button/SidebarButton.d.ts +13 -0
- package/types/parts/sidebar-button/index.d.ts +0 -0
- package/types/parts/sidebar-button/props.d.ts +18 -0
- package/types/parts/sidebar-button/styled.d.ts +4 -0
- package/types/parts/system-message/SystemMessage.d.ts +13 -0
- package/types/parts/system-message/config/useValidateProps.d.ts +2 -0
- package/types/parts/system-message/index.d.ts +1 -0
- package/types/parts/system-message/props.d.ts +11 -0
- package/types/parts/system-message/style.d.ts +7 -0
- package/types/parts/tile-button/TileButton.d.ts +26 -0
- package/types/parts/tile-button/config/useValidateProps.d.ts +2 -0
- package/types/parts/tile-button/index.d.ts +1 -0
- package/types/parts/tile-button/props.d.ts +40 -0
- package/types/parts/tile-button/styled.d.ts +10 -0
- package/types/prop-types.d.ts +14 -0
- package/types/styled.d.ts +6 -0
- package/cjs/index.d.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/parts/bubble/ChatBubble.js.map +0 -1
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -1
- package/cjs/parts/bubble/config/useValidateProps.js.map +0 -1
- package/cjs/parts/bubble/index.js.map +0 -1
- package/cjs/parts/bubble/props.js.map +0 -1
- package/cjs/parts/bubble/styled.js.map +0 -1
- package/cjs/parts/chat-card/ChatCard.js.map +0 -1
- package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-card/index.js.map +0 -1
- package/cjs/parts/chat-card/props.js.map +0 -1
- package/cjs/parts/chat-card/styled.js.map +0 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -1
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-composer/index.js.map +0 -1
- package/cjs/parts/chat-composer/props.js.map +0 -1
- package/cjs/parts/chat-composer/styled.js.map +0 -1
- package/cjs/parts/chat-container/ChatContainer.js.map +0 -1
- package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-container/index.js.map +0 -1
- package/cjs/parts/chat-container/props.js.map +0 -1
- package/cjs/parts/chat-container/styled.js.map +0 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -1
- package/cjs/parts/chat-container-header/helpers.js +0 -28
- package/cjs/parts/chat-container-header/helpers.js.map +0 -1
- package/cjs/parts/chat-container-header/styled.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/index.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/props.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/styled.js.map +0 -1
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -1
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-empty-state/props.js.map +0 -1
- package/cjs/parts/chat-empty-state/styled.js.map +0 -1
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -1
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-sidebar/index.js.map +0 -1
- package/cjs/parts/chat-sidebar/props.js.map +0 -1
- package/cjs/parts/chat-sidebar/styled.js.map +0 -1
- package/cjs/parts/floating-button/FloatingButton.js.map +0 -1
- package/cjs/parts/floating-button/index.js.map +0 -1
- package/cjs/parts/floating-button/props.js.map +0 -1
- package/cjs/parts/floating-button/styled.js.map +0 -1
- package/cjs/parts/floating-container/styled.js.map +0 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -1
- package/cjs/parts/grid-influencer/styled.js.map +0 -1
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -1
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -1
- package/cjs/parts/message-delimiter/index.js.map +0 -1
- package/cjs/parts/message-delimiter/props.js.map +0 -1
- package/cjs/parts/message-delimiter/styled.js.map +0 -1
- package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -1
- package/cjs/parts/sidebar-button/index.js.map +0 -1
- package/cjs/parts/sidebar-button/props.js.map +0 -1
- package/cjs/parts/sidebar-button/styled.js.map +0 -1
- package/cjs/parts/system-message/SystemMessage.js.map +0 -1
- package/cjs/parts/system-message/config/useValidateProps.js.map +0 -1
- package/cjs/parts/system-message/index.js.map +0 -1
- package/cjs/parts/system-message/props.js.map +0 -1
- package/cjs/parts/system-message/style.js.map +0 -1
- package/cjs/parts/tile-button/TileButton.js.map +0 -1
- package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -1
- package/cjs/parts/tile-button/index.js.map +0 -1
- package/cjs/parts/tile-button/props.js.map +0 -1
- package/cjs/parts/tile-button/styled.js.map +0 -1
- package/cjs/prop-types.js.map +0 -1
- package/cjs/styled.js.map +0 -1
- package/esm/index.d.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/parts/bubble/ChatBubble.js.map +0 -1
- package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -1
- package/esm/parts/bubble/config/useValidateProps.js.map +0 -1
- package/esm/parts/bubble/index.js.map +0 -1
- package/esm/parts/bubble/props.js.map +0 -1
- package/esm/parts/bubble/styled.js.map +0 -1
- package/esm/parts/chat-card/ChatCard.js.map +0 -1
- package/esm/parts/chat-card/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-card/index.js.map +0 -1
- package/esm/parts/chat-card/props.js.map +0 -1
- package/esm/parts/chat-card/styled.js.map +0 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -1
- package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-composer/index.js.map +0 -1
- package/esm/parts/chat-composer/props.js.map +0 -1
- package/esm/parts/chat-composer/styled.js.map +0 -1
- package/esm/parts/chat-container/ChatContainer.js.map +0 -1
- package/esm/parts/chat-container/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-container/index.js.map +0 -1
- package/esm/parts/chat-container/props.js.map +0 -1
- package/esm/parts/chat-container/styled.js.map +0 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -1
- package/esm/parts/chat-container-header/helpers.js +0 -20
- package/esm/parts/chat-container-header/helpers.js.map +0 -1
- package/esm/parts/chat-container-header/styled.js.map +0 -1
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -1
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-container-messages-list/index.js.map +0 -1
- package/esm/parts/chat-container-messages-list/props.js.map +0 -1
- package/esm/parts/chat-container-messages-list/styled.js.map +0 -1
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -1
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-empty-state/props.js.map +0 -1
- package/esm/parts/chat-empty-state/styled.js.map +0 -1
- package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -1
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-sidebar/index.js.map +0 -1
- package/esm/parts/chat-sidebar/props.js.map +0 -1
- package/esm/parts/chat-sidebar/styled.js.map +0 -1
- package/esm/parts/floating-button/FloatingButton.js.map +0 -1
- package/esm/parts/floating-button/index.js.map +0 -1
- package/esm/parts/floating-button/props.js.map +0 -1
- package/esm/parts/floating-button/styled.js.map +0 -1
- package/esm/parts/floating-container/styled.js.map +0 -1
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -1
- package/esm/parts/grid-influencer/styled.js.map +0 -1
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -1
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -1
- package/esm/parts/message-delimiter/index.js.map +0 -1
- package/esm/parts/message-delimiter/props.js.map +0 -1
- package/esm/parts/message-delimiter/styled.js.map +0 -1
- package/esm/parts/sidebar-button/SidebarButton.js.map +0 -1
- package/esm/parts/sidebar-button/index.js.map +0 -1
- package/esm/parts/sidebar-button/props.js.map +0 -1
- package/esm/parts/sidebar-button/styled.js.map +0 -1
- package/esm/parts/system-message/SystemMessage.js.map +0 -1
- package/esm/parts/system-message/config/useValidateProps.js.map +0 -1
- package/esm/parts/system-message/index.js.map +0 -1
- package/esm/parts/system-message/props.js.map +0 -1
- package/esm/parts/system-message/style.js.map +0 -1
- package/esm/parts/tile-button/TileButton.js.map +0 -1
- package/esm/parts/tile-button/config/useValidateProps.js.map +0 -1
- package/esm/parts/tile-button/index.js.map +0 -1
- package/esm/parts/tile-button/props.js.map +0 -1
- package/esm/parts/tile-button/styled.js.map +0 -1
- package/esm/prop-types.js.map +0 -1
- package/esm/styled.js.map +0 -1
- package/parts/bubble/ChatBubble/package.json +0 -10
- package/parts/bubble/ChatBubbleArrow/package.json +0 -10
- package/parts/bubble/config/useValidateProps/package.json +0 -10
- package/parts/bubble/package.json +0 -10
- package/parts/bubble/props/package.json +0 -10
- package/parts/bubble/styled/package.json +0 -10
- package/parts/chat-card/ChatCard/package.json +0 -10
- package/parts/chat-card/config/useValidateProps/package.json +0 -10
- package/parts/chat-card/package.json +0 -10
- package/parts/chat-card/props/package.json +0 -10
- package/parts/chat-card/styled/package.json +0 -10
- package/parts/chat-composer/ChatContainerComposer/package.json +0 -10
- package/parts/chat-composer/config/useValidateProps/package.json +0 -10
- package/parts/chat-composer/package.json +0 -10
- package/parts/chat-composer/props/package.json +0 -10
- package/parts/chat-composer/styled/package.json +0 -10
- package/parts/chat-container/ChatContainer/package.json +0 -10
- package/parts/chat-container/config/useValidateProps/package.json +0 -10
- package/parts/chat-container/package.json +0 -10
- package/parts/chat-container/props/package.json +0 -10
- package/parts/chat-container/styled/package.json +0 -10
- package/parts/chat-container-header/ChatContainerHeader/package.json +0 -10
- package/parts/chat-container-header/helpers/package.json +0 -10
- package/parts/chat-container-header/styled/package.json +0 -10
- package/parts/chat-container-messages-list/ChatContainerMessagesList/package.json +0 -10
- package/parts/chat-container-messages-list/config/useValidateProps/package.json +0 -10
- package/parts/chat-container-messages-list/package.json +0 -10
- package/parts/chat-container-messages-list/props/package.json +0 -10
- package/parts/chat-container-messages-list/styled/package.json +0 -10
- package/parts/chat-empty-state/ChatEmptyState/package.json +0 -10
- package/parts/chat-empty-state/config/useValidateProps/package.json +0 -10
- package/parts/chat-empty-state/props/package.json +0 -10
- package/parts/chat-empty-state/styled/package.json +0 -10
- package/parts/chat-sidebar/SideBarChat/package.json +0 -10
- package/parts/chat-sidebar/config/useValidateProps/package.json +0 -10
- package/parts/chat-sidebar/package.json +0 -10
- package/parts/chat-sidebar/props/package.json +0 -10
- package/parts/chat-sidebar/styled/package.json +0 -10
- package/parts/floating-button/FloatingButton/package.json +0 -10
- package/parts/floating-button/package.json +0 -10
- package/parts/floating-button/props/package.json +0 -10
- package/parts/floating-button/styled/package.json +0 -10
- package/parts/floating-container/styled/package.json +0 -10
- package/parts/grid-influencer/InfluencerContainer/package.json +0 -10
- package/parts/grid-influencer/styled/package.json +0 -10
- package/parts/message-delimiter/MessageDelimiter/package.json +0 -10
- package/parts/message-delimiter/config/useValidateProps/package.json +0 -10
- package/parts/message-delimiter/package.json +0 -10
- package/parts/message-delimiter/props/package.json +0 -10
- package/parts/message-delimiter/styled/package.json +0 -10
- package/parts/sidebar-button/SidebarButton/package.json +0 -10
- package/parts/sidebar-button/package.json +0 -10
- package/parts/sidebar-button/props/package.json +0 -10
- package/parts/sidebar-button/styled/package.json +0 -10
- package/parts/system-message/SystemMessage/package.json +0 -10
- package/parts/system-message/config/useValidateProps/package.json +0 -10
- package/parts/system-message/package.json +0 -10
- package/parts/system-message/props/package.json +0 -10
- package/parts/system-message/style/package.json +0 -10
- package/parts/tile-button/TileButton/package.json +0 -10
- package/parts/tile-button/config/useValidateProps/package.json +0 -10
- package/parts/tile-button/package.json +0 -10
- package/parts/tile-button/props/package.json +0 -10
- package/parts/tile-button/styled/package.json +0 -10
- package/prop-types/package.json +0 -10
- package/styled/package.json +0 -10
|
@@ -1,61 +1,37 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Grid } from '@elliemae/ds-grid';
|
|
3
3
|
import { BUBBLE_TYPES } from './props.js';
|
|
4
|
-
import 'prop-types';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import 'lodash';
|
|
7
4
|
|
|
8
5
|
/* eslint-disable max-lines */
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
11
8
|
componentId: "sc-fe8e9o-0"
|
|
12
9
|
})(["min-width:224px;border-radius:10px;"]); // Bubble HEADER
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
const StyledTitleBubble = /*#__PURE__*/styled(Grid).withConfig({
|
|
15
12
|
componentId: "sc-fe8e9o-1"
|
|
16
13
|
})(["padding-top:6px;padding-left:10px;padding-right:10px;padding-bottom:4px;"]);
|
|
17
|
-
|
|
14
|
+
const StyledTitleLeftBubble = /*#__PURE__*/styled(Grid).withConfig({
|
|
18
15
|
componentId: "sc-fe8e9o-2"
|
|
19
16
|
})(["font-size:13px;font-weight:600;"]);
|
|
20
|
-
|
|
17
|
+
const StyledTitleRightBubble = /*#__PURE__*/styled(Grid).withConfig({
|
|
21
18
|
componentId: "sc-fe8e9o-3"
|
|
22
|
-
})(["font-size:13px;font-weight:400;color:", ";"],
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
var StyleBodyWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
19
|
+
})(["font-size:13px;font-weight:400;color:", ";"], props => props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489');
|
|
20
|
+
const StyleBodyWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
26
21
|
componentId: "sc-fe8e9o-4"
|
|
27
22
|
})(["font-size:13px;font-weight:400;line-height:15px;min-height:18px;padding:0px 10px 8px 10px;"]);
|
|
28
|
-
|
|
23
|
+
const StyleErrorMessage = /*#__PURE__*/styled.div.withConfig({
|
|
29
24
|
componentId: "sc-fe8e9o-5"
|
|
30
|
-
})(["font-size:12px;font-weight:400;padding-top:", ";padding-bottom:", ";color:", ";align-items:flex-end;justify-content:center;text-align:right;line-height:15px;svg{fill:", ";}a{font-size:12px;color:", ";}.em-ds-icon{margin-left:8px;}"],
|
|
31
|
-
|
|
32
|
-
}, function (props) {
|
|
33
|
-
return props.theme.space.xxxs;
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return props.theme.colors.danger[900];
|
|
36
|
-
}, function (props) {
|
|
37
|
-
return props.theme.colors.danger[900];
|
|
38
|
-
}, function (props) {
|
|
39
|
-
return props.theme.colors.danger[900];
|
|
40
|
-
});
|
|
41
|
-
var StyleHelpMessage = /*#__PURE__*/styled(StyleErrorMessage).withConfig({
|
|
25
|
+
})(["font-size:12px;font-weight:400;padding-top:", ";padding-bottom:", ";color:", ";align-items:flex-end;justify-content:center;text-align:right;line-height:15px;svg{fill:", ";}a{font-size:12px;color:", ";}.em-ds-icon{margin-left:8px;}"], props => props.theme.space.xxxs, props => props.theme.space.xxxs, props => props.theme.colors.danger[900], props => props.theme.colors.danger[900], props => props.theme.colors.danger[900]);
|
|
26
|
+
const StyleHelpMessage = /*#__PURE__*/styled(StyleErrorMessage).withConfig({
|
|
42
27
|
componentId: "sc-fe8e9o-6"
|
|
43
|
-
})(["font-size:12px;line-height:15px;color:", ";svg{fill:", ";}a{font-size:12px;color:", ";}"],
|
|
44
|
-
return props.theme.colors.neutral[500];
|
|
45
|
-
}, function (props) {
|
|
46
|
-
return props.theme.colors.danger[500];
|
|
47
|
-
}, function (props) {
|
|
48
|
-
return props.theme.colors.danger[500];
|
|
49
|
-
}); // bubble sender/ recipient
|
|
28
|
+
})(["font-size:12px;line-height:15px;color:", ";svg{fill:", ";}a{font-size:12px;color:", ";}"], props => props.theme.colors.neutral[500], props => props.theme.colors.danger[500], props => props.theme.colors.danger[500]); // bubble sender/ recipient
|
|
50
29
|
|
|
51
|
-
|
|
30
|
+
const StyledBubbleArrow = /*#__PURE__*/styled.div.withConfig({
|
|
52
31
|
componentId: "sc-fe8e9o-7"
|
|
53
32
|
})(["display:block;content:'';position:absolute;bottom:10px;height:15px;"]);
|
|
54
|
-
|
|
33
|
+
const StyledColoredBubble = /*#__PURE__*/styled.div.withConfig({
|
|
55
34
|
componentId: "sc-fe8e9o-8"
|
|
56
|
-
})(["min-width:224px;border-radius:10px;position:relative;", ""],
|
|
57
|
-
return props.type === BUBBLE_TYPES.SENDER ? "\n border: 1px solid ".concat(props.theme.colors.brand['700'], ";\n background: ").concat(props.theme.colors.brand[600], ";\n color: ").concat(props.theme.colors.neutral['000'], ";\n ").concat(StyledBubbleArrow, "{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.brand[600], ";\n }\n }\n\n a {\n color: #FFF;\n }\n\n ") : "\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ".concat(props.theme.colors.neutral['000'], ";\n color: ").concat(props.theme.colors.neutral[700], ";\n\n ").concat(StyledBubbleArrow, "{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.neutral['000'], ";\n }\n }\n\n ");
|
|
58
|
-
});
|
|
35
|
+
})(["min-width:224px;border-radius:10px;position:relative;", ""], props => props.type === BUBBLE_TYPES.SENDER ? "\n border: 1px solid ".concat(props.theme.colors.brand['700'], ";\n background: ").concat(props.theme.colors.brand[600], ";\n color: ").concat(props.theme.colors.neutral['000'], ";\n ").concat(StyledBubbleArrow, "{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.brand[600], ";\n }\n }\n\n a {\n color: #FFF;\n }\n\n ") : "\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ".concat(props.theme.colors.neutral['000'], ";\n color: ").concat(props.theme.colors.neutral[700], ";\n\n ").concat(StyledBubbleArrow, "{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ").concat(props.theme.colors.neutral['000'], ";\n }\n }\n\n "));
|
|
59
36
|
|
|
60
37
|
export { StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage, StyledBubbleArrow, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyledWrapper };
|
|
61
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.url.to-json.js';
|
|
3
|
+
import 'react';
|
|
2
4
|
import { describe } from 'react-desc';
|
|
3
5
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
4
6
|
import { propTypes } from './props.js';
|
|
5
7
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
6
8
|
import { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled.js';
|
|
7
|
-
import '@elliemae/ds-props-helpers';
|
|
8
|
-
import 'styled-components';
|
|
9
|
-
import '@elliemae/ds-grid';
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
const ChatCard = props => {
|
|
12
11
|
useValidateProps(props, ChatCardWithSchema.toJSON());
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const {
|
|
13
|
+
title,
|
|
14
|
+
content,
|
|
15
|
+
time,
|
|
16
|
+
rightAddon
|
|
17
|
+
} = props;
|
|
18
|
+
return /*#__PURE__*/_jsx(Wrapper, {
|
|
18
19
|
cols: ['1fr', 'auto'],
|
|
19
20
|
"data-testid": "chat-card-wrapper"
|
|
20
|
-
}, /*#__PURE__*/
|
|
21
|
+
}, void 0, /*#__PURE__*/_jsx(MainContent, {}, void 0, /*#__PURE__*/_jsx(Title, {
|
|
21
22
|
"data-testid": "chat-card-title"
|
|
22
|
-
}, title), /*#__PURE__*/
|
|
23
|
+
}, void 0, title), /*#__PURE__*/_jsx(Content, {
|
|
23
24
|
"data-testid": "chat-card-content"
|
|
24
|
-
}, /*#__PURE__*/
|
|
25
|
+
}, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
25
26
|
value: content
|
|
26
|
-
})), time && /*#__PURE__*/
|
|
27
|
+
})), time && /*#__PURE__*/_jsx(Time, {
|
|
27
28
|
"data-testid": "chat-card-time"
|
|
28
|
-
}, time)), rightAddon && /*#__PURE__*/
|
|
29
|
+
}, void 0, time)), rightAddon && /*#__PURE__*/_jsx(RightAddon, {
|
|
29
30
|
"data-testid": "chat-card-right-addon"
|
|
30
|
-
}, rightAddon));
|
|
31
|
+
}, void 0, rightAddon));
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
var ChatCardWithSchema = describe(ChatCard);
|
|
34
|
+
const ChatCardWithSchema = describe(ChatCard);
|
|
35
35
|
ChatCardWithSchema.propTypes = propTypes;
|
|
36
36
|
|
|
37
37
|
export { ChatCard, ChatCardWithSchema };
|
|
38
|
-
//# sourceMappingURL=ChatCard.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useValidateProps = (props, schema) => {
|
|
4
4
|
useValidatePropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
8
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,11 +1 @@
|
|
|
1
1
|
export { ChatCard, ChatCardWithSchema } from './ChatCard.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react-desc';
|
|
4
|
-
import '@elliemae/ds-truncated-tooltip-text';
|
|
5
|
-
import './props.js';
|
|
6
|
-
import './config/useValidateProps.js';
|
|
7
|
-
import '@elliemae/ds-props-helpers';
|
|
8
|
-
import './styled.js';
|
|
9
|
-
import 'styled-components';
|
|
10
|
-
import '@elliemae/ds-grid';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const propTypes = {
|
|
4
4
|
title: PropTypes.string.isRequired.description("Card's title"),
|
|
5
5
|
content: PropTypes.string.description("Card's content"),
|
|
6
6
|
time: PropTypes.string.description('Time'),
|
|
@@ -8,4 +8,3 @@ var propTypes = {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { propTypes };
|
|
11
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Grid } from '@elliemae/ds-grid';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const Wrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-s0g4hn-0"
|
|
6
6
|
})(["min-width:248px;border:1px;border-bottom:1px solid #ccc;padding:12px 12px;"]);
|
|
7
|
-
|
|
7
|
+
const MainContent = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
componentId: "sc-s0g4hn-1"
|
|
9
9
|
})([""]);
|
|
10
|
-
|
|
10
|
+
const Title = /*#__PURE__*/styled.p.withConfig({
|
|
11
11
|
componentId: "sc-s0g4hn-2"
|
|
12
12
|
})(["font-size:16px;font-weight:600;margin:0;"]);
|
|
13
|
-
|
|
13
|
+
const Content = /*#__PURE__*/styled.p.withConfig({
|
|
14
14
|
componentId: "sc-s0g4hn-3"
|
|
15
15
|
})(["font-size:12px;font-weight:400;line-height:1;margin:0;"]);
|
|
16
|
-
|
|
16
|
+
const Time = /*#__PURE__*/styled.p.withConfig({
|
|
17
17
|
componentId: "sc-s0g4hn-4"
|
|
18
|
-
})(["font-size:12px;font-weight:100;margin:0;margin-top:8px;font-weight:", ";color:", ";"],
|
|
19
|
-
|
|
20
|
-
}, function (props) {
|
|
21
|
-
return props.theme.colors.neutral['500'];
|
|
22
|
-
});
|
|
23
|
-
var RightAddon = /*#__PURE__*/styled.div.withConfig({
|
|
18
|
+
})(["font-size:12px;font-weight:100;margin:0;margin-top:8px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.regular, props => props.theme.colors.neutral['500']);
|
|
19
|
+
const RightAddon = /*#__PURE__*/styled.div.withConfig({
|
|
24
20
|
componentId: "sc-s0g4hn-5"
|
|
25
21
|
})(["height:fit-content;margin-left:12px;"]);
|
|
26
22
|
|
|
27
23
|
export { Content, MainContent, RightAddon, Time, Title, Wrapper };
|
|
28
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,97 +1,84 @@
|
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
1
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import
|
|
3
|
+
import 'core-js/modules/web.url.to-json.js';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
5
|
import React from 'react';
|
|
4
6
|
import { Grid } from '@elliemae/ds-grid';
|
|
5
7
|
import { describe } from 'react-desc';
|
|
6
|
-
import
|
|
8
|
+
import PaperAirplane from '@elliemae/ds-icons/PaperAirplane';
|
|
7
9
|
import { StyledChatContainerContentComposer, StyledComposerInput, StyledComposerButton, StyledCounterArea, StyledCounterErrorA11y } from './styled.js';
|
|
8
10
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
9
11
|
import { composerProps, defaultComposerPros } from './props.js';
|
|
10
|
-
import '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import 'lodash';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var _PaperAirplane, _Grid;
|
|
14
15
|
|
|
15
16
|
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
17
|
|
|
17
18
|
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
19
|
|
|
19
|
-
|
|
20
|
+
const ChatComposer = props => {
|
|
20
21
|
var _input$current;
|
|
21
22
|
|
|
22
23
|
useValidateProps(props, ChatComposerWithSchema.toJSON());
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
setHeight = _React$useState2[1];
|
|
45
|
-
|
|
46
|
-
var internalMaxHeight = React.useMemo(function () {
|
|
47
|
-
return maxHeight - 24;
|
|
48
|
-
}, [maxHeight]);
|
|
49
|
-
|
|
50
|
-
var _React$useState3 = React.useState(true),
|
|
51
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
52
|
-
showScroll = _React$useState4[0],
|
|
53
|
-
setShowScroll = _React$useState4[1];
|
|
54
|
-
|
|
55
|
-
React.useEffect(function () {
|
|
24
|
+
const {
|
|
25
|
+
inputValue,
|
|
26
|
+
onChange,
|
|
27
|
+
onResize,
|
|
28
|
+
onSend,
|
|
29
|
+
onFocus,
|
|
30
|
+
onBlur,
|
|
31
|
+
maxHeight = 300,
|
|
32
|
+
placeholder,
|
|
33
|
+
inputMaxLength,
|
|
34
|
+
buttonDisabled,
|
|
35
|
+
dataTestid,
|
|
36
|
+
actionRef
|
|
37
|
+
} = props;
|
|
38
|
+
const input = React.useRef();
|
|
39
|
+
const inputSize = React.useRef();
|
|
40
|
+
const inputSend = React.useRef();
|
|
41
|
+
const [height, setHeight] = React.useState(32);
|
|
42
|
+
const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);
|
|
43
|
+
const [showScroll, setShowScroll] = React.useState(true);
|
|
44
|
+
React.useEffect(() => {
|
|
56
45
|
var _inputSize$current, _inputSize$current2, _inputSize$current3, _inputSize$current4;
|
|
57
46
|
|
|
58
|
-
|
|
47
|
+
const newHeight = ((_inputSize$current = inputSize.current) === null || _inputSize$current === void 0 ? void 0 : _inputSize$current.scrollHeight) > internalMaxHeight ? internalMaxHeight : (_inputSize$current2 = inputSize.current) === null || _inputSize$current2 === void 0 ? void 0 : _inputSize$current2.scrollHeight;
|
|
59
48
|
onResize(newHeight);
|
|
60
49
|
setHeight(newHeight);
|
|
61
50
|
setShowScroll(((_inputSize$current3 = inputSize.current) === null || _inputSize$current3 === void 0 ? void 0 : _inputSize$current3.scrollHeight) - ((_inputSize$current4 = inputSize.current) === null || _inputSize$current4 === void 0 ? void 0 : _inputSize$current4.clientHeight) > 5);
|
|
62
|
-
}, [inputValue, internalMaxHeight
|
|
63
|
-
React.useEffect(
|
|
51
|
+
}, [inputValue, internalMaxHeight]);
|
|
52
|
+
React.useEffect(() => {
|
|
64
53
|
if (actionRef && actionRef.current) {
|
|
65
|
-
actionRef.current.focusToComposer =
|
|
54
|
+
actionRef.current.focusToComposer = () => {
|
|
66
55
|
input.current.focus();
|
|
67
56
|
};
|
|
68
57
|
|
|
69
|
-
actionRef.current.focusToSend =
|
|
58
|
+
actionRef.current.focusToSend = () => {
|
|
70
59
|
inputSend.current.focus();
|
|
71
60
|
};
|
|
72
61
|
}
|
|
73
|
-
}, [actionRef]);
|
|
74
|
-
|
|
62
|
+
}, [actionRef.current]);
|
|
63
|
+
const handleChange = React.useCallback(e => {
|
|
75
64
|
onChange(e.target.value);
|
|
76
65
|
}, [onChange]);
|
|
77
|
-
|
|
78
|
-
height
|
|
66
|
+
const heightProps = {
|
|
67
|
+
height,
|
|
79
68
|
overflow: showScroll ? 'auto' : 'hidden'
|
|
80
69
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}, [inputLength, inputMaxLength]);
|
|
85
|
-
return /*#__PURE__*/React.createElement(StyledChatContainerContentComposer, {
|
|
70
|
+
const inputLength = String(inputValue || '').length;
|
|
71
|
+
const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);
|
|
72
|
+
return /*#__PURE__*/_jsx(StyledChatContainerContentComposer, {
|
|
86
73
|
rows: ['auto', '15px'],
|
|
87
74
|
maxHeight: "".concat(maxHeight, "px"),
|
|
88
75
|
"data-testid": dataTestid
|
|
89
|
-
}, /*#__PURE__*/
|
|
76
|
+
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
90
77
|
cols: ['1fr', '24px'],
|
|
91
78
|
justifyContent: "center",
|
|
92
79
|
alignItems: "flex-end",
|
|
93
80
|
gutter: "xxs"
|
|
94
|
-
}, /*#__PURE__*/
|
|
81
|
+
}, void 0, /*#__PURE__*/jsx(StyledComposerInput, {
|
|
95
82
|
ref: input,
|
|
96
83
|
onChange: handleChange,
|
|
97
84
|
style: _objectSpread({}, heightProps),
|
|
@@ -101,22 +88,22 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
101
88
|
placeholder: placeholder,
|
|
102
89
|
"aria-label": "Message to send",
|
|
103
90
|
"data-testid": "chat-composer-textarea"
|
|
104
|
-
}), /*#__PURE__*/
|
|
91
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
105
92
|
height: "32px",
|
|
106
93
|
alignItems: "center"
|
|
107
|
-
}, /*#__PURE__*/
|
|
94
|
+
}, void 0, /*#__PURE__*/_jsx(StyledComposerButton, {
|
|
108
95
|
buttonType: "text",
|
|
109
|
-
icon: /*#__PURE__*/
|
|
96
|
+
icon: _PaperAirplane || (_PaperAirplane = /*#__PURE__*/_jsx(PaperAirplane, {
|
|
110
97
|
width: 18,
|
|
111
98
|
height: 18
|
|
112
|
-
}),
|
|
99
|
+
})),
|
|
113
100
|
onClick: onSend,
|
|
114
101
|
size: "s",
|
|
115
102
|
disabled: !inputValue || buttonDisabled || hasError,
|
|
116
103
|
"data-testid": "chat-composer-send-button",
|
|
117
104
|
"aria-label": "Send",
|
|
118
105
|
innerRef: inputSend
|
|
119
|
-
}))), /*#__PURE__*/
|
|
106
|
+
}))), /*#__PURE__*/jsx(StyledComposerInput, {
|
|
120
107
|
ref: inputSize,
|
|
121
108
|
style: {
|
|
122
109
|
height: 32,
|
|
@@ -129,24 +116,24 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
129
116
|
onChange: handleChange,
|
|
130
117
|
value: inputValue // maxLength={inputMaxLength}
|
|
131
118
|
|
|
132
|
-
}), /*#__PURE__*/
|
|
119
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
133
120
|
cols: ['1fr', '24px'],
|
|
134
121
|
justifyContent: "flex-end",
|
|
135
122
|
alignItems: "center",
|
|
136
123
|
gutter: "xxs",
|
|
137
124
|
pb: "xxs"
|
|
138
|
-
}, /*#__PURE__*/
|
|
125
|
+
}, void 0, /*#__PURE__*/_jsx(StyledCounterArea, {
|
|
139
126
|
hasError: hasError,
|
|
140
127
|
"data-testid": "composer-counter-area"
|
|
141
|
-
}, inputMaxLength && hasError ? /*#__PURE__*/
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
}, void 0, inputMaxLength && hasError ? /*#__PURE__*/jsxs(Fragment, {
|
|
129
|
+
children: [/*#__PURE__*/_jsx(StyledCounterErrorA11y, {
|
|
130
|
+
role: "alert"
|
|
131
|
+
}, void 0, "You have exceeded the character limit by ", inputLength - inputMaxLength), "Please limit to less than ", inputMaxLength, " characters.", ' ']
|
|
132
|
+
}) : '', inputMaxLength ? "".concat(inputLength, " / ").concat(inputMaxLength) : ''), _Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {}))));
|
|
144
133
|
};
|
|
145
134
|
|
|
146
|
-
ChatComposer.propTypes = composerProps;
|
|
147
135
|
ChatComposer.defaultProps = defaultComposerPros;
|
|
148
|
-
|
|
136
|
+
const ChatComposerWithSchema = describe(ChatComposer);
|
|
149
137
|
ChatComposerWithSchema.propTypes = composerProps;
|
|
150
138
|
|
|
151
139
|
export { ChatComposer, ChatComposerWithSchema };
|
|
152
|
-
//# sourceMappingURL=ChatContainerComposer.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useValidateProps = (props, schema) => {
|
|
4
4
|
useValidatePropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
8
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,15 +1 @@
|
|
|
1
1
|
export { ChatComposer, ChatComposerWithSchema } from './ChatContainerComposer.js';
|
|
2
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '@elliemae/ds-grid';
|
|
6
|
-
import 'react-desc';
|
|
7
|
-
import '@elliemae/ds-icons';
|
|
8
|
-
import './styled.js';
|
|
9
|
-
import 'styled-components';
|
|
10
|
-
import '@elliemae/ds-button';
|
|
11
|
-
import './config/useValidateProps.js';
|
|
12
|
-
import '@elliemae/ds-props-helpers';
|
|
13
|
-
import './props.js';
|
|
14
|
-
import 'lodash';
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const defaultComposerPros = {
|
|
5
5
|
placeholder: 'Type your message',
|
|
6
6
|
inputValue: '',
|
|
7
7
|
onChange: noop,
|
|
@@ -11,15 +11,13 @@ var defaultComposerPros = {
|
|
|
11
11
|
onBlur: noop,
|
|
12
12
|
maxHeight: 0,
|
|
13
13
|
inputMaxLength: undefined,
|
|
14
|
-
maxLengthMessage: undefined,
|
|
15
14
|
buttonDisabled: false,
|
|
16
15
|
dataTestid: 'ds-chat-composer',
|
|
17
16
|
actionRef: noop
|
|
18
17
|
};
|
|
19
|
-
|
|
18
|
+
const composerProps = {
|
|
20
19
|
placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),
|
|
21
20
|
inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),
|
|
22
|
-
maxLengthMessage: PropTypes.string.description('Max length message').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
23
21
|
onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),
|
|
24
22
|
onResize: PropTypes.func.description('Called the input changes his height').defaultValue(defaultComposerPros.onResize),
|
|
25
23
|
onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),
|
|
@@ -33,4 +31,3 @@ var composerProps = {
|
|
|
33
31
|
};
|
|
34
32
|
|
|
35
33
|
export { composerProps, defaultComposerPros };
|
|
36
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -3,41 +3,20 @@ import { Grid } from '@elliemae/ds-grid';
|
|
|
3
3
|
import { DSButton } from '@elliemae/ds-button';
|
|
4
4
|
|
|
5
5
|
// Composer
|
|
6
|
-
|
|
6
|
+
const StyledChatContainerContentComposer = /*#__PURE__*/styled(Grid).withConfig({
|
|
7
7
|
componentId: "sc-1ahwpce-0"
|
|
8
|
-
})(["width:100%;min-height:56px;background:", ";padding:", ";padding-bottom:3px;padding-top:6px;padding-left:", ";max-height:", ";border-top:1px solid #cbcfd7;"],
|
|
9
|
-
|
|
10
|
-
}, function (props) {
|
|
11
|
-
return props.theme.space.xxs;
|
|
12
|
-
}, function (props) {
|
|
13
|
-
return props.theme.space.xs;
|
|
14
|
-
}, function (props) {
|
|
15
|
-
return props.maxHeight;
|
|
16
|
-
});
|
|
17
|
-
var StyledComposerInput = /*#__PURE__*/styled.textarea.withConfig({
|
|
8
|
+
})(["width:100%;min-height:56px;background:", ";padding:", ";padding-bottom:3px;padding-top:6px;padding-left:", ";max-height:", ";border-top:1px solid #cbcfd7;"], props => props.theme.colors.neutral['050'], props => props.theme.space.xxs, props => props.theme.space.xs, props => props.maxHeight);
|
|
9
|
+
const StyledComposerInput = /*#__PURE__*/styled.textarea.withConfig({
|
|
18
10
|
componentId: "sc-1ahwpce-1"
|
|
19
|
-
})(["padding:", ";resize:none;min-height:32px;border-radius:2px;border:solid 1px #cbcfd7;color:#25292f;height:", ";min-width:244px;overflow-y:auto;font-size:13px;font-weight:400;line-height:1;transition:height 0.3s;&:focus{outline:none;border:1px solid ", ";box-shadow:inset 0 0 0 1px #8cc2ed;border-radius:2px;}"],
|
|
20
|
-
|
|
21
|
-
}, function (props) {
|
|
22
|
-
return typeof props.height === 'number' ? "".concat(props.height, "px") : props.height;
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return props.theme.colors.brand[600];
|
|
25
|
-
});
|
|
26
|
-
var StyledComposerButton = /*#__PURE__*/styled(DSButton).withConfig({
|
|
11
|
+
})(["padding:", ";resize:none;min-height:32px;border-radius:2px;border:solid 1px #cbcfd7;color:#25292f;height:", ";min-width:244px;overflow-y:auto;font-size:13px;font-weight:400;line-height:1;transition:height 0.3s;&:focus{outline:none;border:1px solid ", ";box-shadow:inset 0 0 0 1px #8cc2ed;border-radius:2px;}"], props => props.theme.space.xxs, props => typeof props.height === 'number' ? "".concat(props.height, "px") : props.height, props => props.theme.colors.brand[600]);
|
|
12
|
+
const StyledComposerButton = /*#__PURE__*/styled(DSButton).withConfig({
|
|
27
13
|
componentId: "sc-1ahwpce-2"
|
|
28
|
-
})(["&:disabled{background:none;svg{fill:#5d6775;}}svg{fill:", ";}&:focus{background:", ";}"],
|
|
29
|
-
|
|
30
|
-
}, function (props) {
|
|
31
|
-
return props.theme.colors.brand[200];
|
|
32
|
-
});
|
|
33
|
-
var StyledCounterArea = /*#__PURE__*/styled(Grid).withConfig({
|
|
14
|
+
})(["&:disabled{background:none;svg{fill:#5d6775;}}svg{fill:", ";}&:focus{background:", ";}"], props => props.theme.colors.brand[600], props => props.theme.colors.brand[200]);
|
|
15
|
+
const StyledCounterArea = /*#__PURE__*/styled(Grid).withConfig({
|
|
34
16
|
componentId: "sc-1ahwpce-3"
|
|
35
|
-
})(["text-align:right;font-size:11px;height:15px;align-items:center;font-style:italic;", " position:relative;"],
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
var StyledCounterErrorA11y = /*#__PURE__*/styled.span.withConfig({
|
|
17
|
+
})(["text-align:right;font-size:11px;height:15px;align-items:center;font-style:italic;", " position:relative;"], props => props.hasError ? "color:".concat(props.theme.colors.danger[900], ";") : '');
|
|
18
|
+
const StyledCounterErrorA11y = /*#__PURE__*/styled.span.withConfig({
|
|
39
19
|
componentId: "sc-1ahwpce-4"
|
|
40
20
|
})(["width:1px;height:1px;position:absolute;clip:rect(1px,1px,1px,1px);"]);
|
|
41
21
|
|
|
42
22
|
export { StyledChatContainerContentComposer, StyledComposerButton, StyledComposerInput, StyledCounterArea, StyledCounterErrorA11y };
|
|
43
|
-
//# sourceMappingURL=styled.js.map
|