@elliemae/ds-chat 1.53.4-rc.3 → 1.53.5-rc.0
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.js +14 -1
- package/cjs/index.js.map +1 -1
- package/cjs/parts/bubble/ChatBubble.js +8 -1
- package/cjs/parts/bubble/ChatBubble.js.map +1 -1
- package/cjs/parts/bubble/config/useValidateProps.js +32 -0
- package/cjs/parts/bubble/config/useValidateProps.js.map +1 -0
- package/cjs/parts/bubble/index.js +4 -1
- package/cjs/parts/bubble/index.js.map +1 -1
- package/cjs/parts/bubble/props.js +4 -4
- package/cjs/parts/bubble/props.js.map +1 -1
- package/cjs/parts/bubble/styled.js +1 -1
- package/cjs/parts/bubble/styled.js.map +1 -1
- package/cjs/parts/chat-card/ChatCard.js +9 -6
- package/cjs/parts/chat-card/ChatCard.js.map +1 -1
- package/cjs/parts/chat-card/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-card/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-card/index.js +3 -1
- package/cjs/parts/chat-card/index.js.map +1 -1
- package/cjs/parts/chat-card/props.js +1 -1
- package/cjs/parts/chat-card/props.js.map +1 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js +19 -2
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/cjs/parts/chat-composer/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-composer/index.js +2 -0
- package/cjs/parts/chat-composer/index.js.map +1 -1
- package/cjs/parts/chat-composer/props.js +6 -4
- package/cjs/parts/chat-composer/props.js.map +1 -1
- package/cjs/parts/chat-composer/styled.js +2 -2
- package/cjs/parts/chat-composer/styled.js.map +1 -1
- package/cjs/parts/chat-container/ChatContainer.js +10 -1
- package/cjs/parts/chat-container/ChatContainer.js.map +1 -1
- package/cjs/parts/chat-container/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-container/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-container/index.js +7 -0
- package/cjs/parts/chat-container/index.js.map +1 -1
- package/cjs/parts/chat-container/props.js +3 -2
- package/cjs/parts/chat-container/props.js.map +1 -1
- package/cjs/parts/chat-container/styled.js +3 -1
- package/cjs/parts/chat-container/styled.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +70 -11
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-container-messages-list/index.js +5 -0
- package/cjs/parts/chat-container-messages-list/index.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/props.js +1 -1
- package/cjs/parts/chat-container-messages-list/props.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/styled.js +9 -1
- package/cjs/parts/chat-container-messages-list/styled.js.map +1 -1
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +14 -3
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-empty-state/props.js +2 -1
- package/cjs/parts/chat-empty-state/props.js.map +1 -1
- package/cjs/parts/chat-sidebar/SideBarChat.js +12 -8
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +12 -0
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +1 -0
- package/cjs/parts/chat-sidebar/index.js +4 -1
- package/cjs/parts/chat-sidebar/index.js.map +1 -1
- package/cjs/parts/floating-button/FloatingButton.js.map +1 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js +9 -0
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/cjs/parts/message-delimiter/MessageDelimiter.js +8 -5
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +1 -1
- package/cjs/parts/message-delimiter/config/useValidateProps.js +12 -0
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +1 -0
- package/cjs/parts/message-delimiter/index.js +2 -0
- package/cjs/parts/message-delimiter/index.js.map +1 -1
- package/cjs/parts/message-delimiter/props.js +1 -1
- package/cjs/parts/message-delimiter/props.js.map +1 -1
- package/cjs/parts/sidebar-button/SidebarButton.js.map +1 -1
- package/cjs/parts/sidebar-button/styled.js +3 -1
- package/cjs/parts/sidebar-button/styled.js.map +1 -1
- package/cjs/parts/system-message/SystemMessage.js +7 -4
- package/cjs/parts/system-message/SystemMessage.js.map +1 -1
- package/cjs/parts/system-message/config/useValidateProps.js +12 -0
- package/cjs/parts/system-message/config/useValidateProps.js.map +1 -0
- package/cjs/parts/system-message/index.js +2 -0
- package/cjs/parts/system-message/index.js.map +1 -1
- package/cjs/parts/tile-button/TileButton.js +3 -1
- package/cjs/parts/tile-button/TileButton.js.map +1 -1
- package/cjs/parts/tile-button/config/useValidateProps.js +12 -0
- package/cjs/parts/tile-button/config/useValidateProps.js.map +1 -0
- package/cjs/parts/tile-button/index.js +2 -1
- package/cjs/parts/tile-button/index.js.map +1 -1
- package/cjs/parts/tile-button/props.js +3 -5
- package/cjs/parts/tile-button/props.js.map +1 -1
- package/cjs/parts/tile-button/styled.js +9 -5
- package/cjs/parts/tile-button/styled.js.map +1 -1
- package/esm/index.js +14 -2
- package/esm/index.js.map +1 -1
- package/esm/parts/bubble/ChatBubble.js +8 -2
- package/esm/parts/bubble/ChatBubble.js.map +1 -1
- package/esm/parts/bubble/config/useValidateProps.js +28 -0
- package/esm/parts/bubble/config/useValidateProps.js.map +1 -0
- package/esm/parts/bubble/index.js +4 -2
- package/esm/parts/bubble/index.js.map +1 -1
- package/esm/parts/bubble/props.js +4 -4
- package/esm/parts/bubble/props.js.map +1 -1
- package/esm/parts/bubble/styled.js +1 -1
- package/esm/parts/bubble/styled.js.map +1 -1
- package/esm/parts/chat-card/ChatCard.js +9 -6
- package/esm/parts/chat-card/ChatCard.js.map +1 -1
- package/esm/parts/chat-card/config/useValidateProps.js +8 -0
- package/esm/parts/chat-card/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-card/index.js +3 -1
- package/esm/parts/chat-card/index.js.map +1 -1
- package/esm/parts/chat-card/props.js +1 -1
- package/esm/parts/chat-card/props.js.map +1 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js +19 -2
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/esm/parts/chat-composer/config/useValidateProps.js +8 -0
- package/esm/parts/chat-composer/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-composer/index.js +2 -0
- package/esm/parts/chat-composer/index.js.map +1 -1
- package/esm/parts/chat-composer/props.js +6 -4
- package/esm/parts/chat-composer/props.js.map +1 -1
- package/esm/parts/chat-composer/styled.js +2 -2
- package/esm/parts/chat-composer/styled.js.map +1 -1
- package/esm/parts/chat-container/ChatContainer.js +10 -1
- package/esm/parts/chat-container/ChatContainer.js.map +1 -1
- package/esm/parts/chat-container/config/useValidateProps.js +8 -0
- package/esm/parts/chat-container/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-container/index.js +7 -0
- package/esm/parts/chat-container/index.js.map +1 -1
- package/esm/parts/chat-container/props.js +3 -2
- package/esm/parts/chat-container/props.js.map +1 -1
- package/esm/parts/chat-container/styled.js +3 -1
- package/esm/parts/chat-container/styled.js.map +1 -1
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +71 -12
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +8 -0
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-container-messages-list/index.js +5 -0
- package/esm/parts/chat-container-messages-list/index.js.map +1 -1
- package/esm/parts/chat-container-messages-list/props.js +1 -1
- package/esm/parts/chat-container-messages-list/props.js.map +1 -1
- package/esm/parts/chat-container-messages-list/styled.js +9 -2
- package/esm/parts/chat-container-messages-list/styled.js.map +1 -1
- package/esm/parts/chat-empty-state/ChatEmptyState.js +14 -4
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/esm/parts/chat-empty-state/config/useValidateProps.js +8 -0
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-empty-state/props.js +2 -1
- package/esm/parts/chat-empty-state/props.js.map +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +12 -8
- package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/esm/parts/chat-sidebar/config/useValidateProps.js +8 -0
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +1 -0
- package/esm/parts/chat-sidebar/index.js +4 -1
- package/esm/parts/chat-sidebar/index.js.map +1 -1
- package/esm/parts/floating-button/FloatingButton.js.map +1 -1
- package/esm/parts/grid-influencer/InfluencerContainer.js +9 -0
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/esm/parts/message-delimiter/MessageDelimiter.js +8 -5
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +1 -1
- package/esm/parts/message-delimiter/config/useValidateProps.js +8 -0
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +1 -0
- package/esm/parts/message-delimiter/index.js +2 -0
- package/esm/parts/message-delimiter/index.js.map +1 -1
- package/esm/parts/message-delimiter/props.js +1 -1
- package/esm/parts/message-delimiter/props.js.map +1 -1
- package/esm/parts/sidebar-button/SidebarButton.js.map +1 -1
- package/esm/parts/sidebar-button/styled.js +3 -1
- package/esm/parts/sidebar-button/styled.js.map +1 -1
- package/esm/parts/system-message/SystemMessage.js +7 -4
- package/esm/parts/system-message/SystemMessage.js.map +1 -1
- package/esm/parts/system-message/config/useValidateProps.js +8 -0
- package/esm/parts/system-message/config/useValidateProps.js.map +1 -0
- package/esm/parts/system-message/index.js +2 -0
- package/esm/parts/system-message/index.js.map +1 -1
- package/esm/parts/tile-button/TileButton.js +3 -1
- package/esm/parts/tile-button/TileButton.js.map +1 -1
- package/esm/parts/tile-button/config/useValidateProps.js +8 -0
- package/esm/parts/tile-button/config/useValidateProps.js.map +1 -0
- package/esm/parts/tile-button/index.js +2 -1
- package/esm/parts/tile-button/index.js.map +1 -1
- package/esm/parts/tile-button/props.js +3 -4
- package/esm/parts/tile-button/props.js.map +1 -1
- package/esm/parts/tile-button/styled.js +9 -5
- package/esm/parts/tile-button/styled.js.map +1 -1
- package/package.json +5 -5
- package/parts/bubble/config/useValidateProps/package.json +10 -0
- package/parts/chat-card/config/useValidateProps/package.json +10 -0
- package/parts/chat-composer/config/useValidateProps/package.json +10 -0
- package/parts/chat-container/config/useValidateProps/package.json +10 -0
- package/parts/chat-container-messages-list/config/useValidateProps/package.json +10 -0
- package/parts/chat-empty-state/config/useValidateProps/package.json +10 -0
- package/parts/chat-sidebar/config/useValidateProps/package.json +10 -0
- package/parts/message-delimiter/config/useValidateProps/package.json +10 -0
- package/parts/system-message/config/useValidateProps/package.json +10 -0
- package/parts/tile-button/config/useValidateProps/package.json +10 -0
|
@@ -9,10 +9,11 @@ var dsGrid = require('@elliemae/ds-grid');
|
|
|
9
9
|
var CloseXsmall = require('@elliemae/ds-icons/CloseXsmall');
|
|
10
10
|
var parts_tileButton_styled = require('./styled.js');
|
|
11
11
|
var parts_tileButton_props = require('./props.js');
|
|
12
|
+
var parts_tileButton_config_useValidateProps = require('./config/useValidateProps.js');
|
|
12
13
|
require('styled-components');
|
|
13
|
-
require('prop-types');
|
|
14
14
|
require('lodash');
|
|
15
15
|
require('@elliemae/ds-icons/Comments');
|
|
16
|
+
require('@elliemae/ds-props-helpers');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
19
|
|
|
@@ -21,6 +22,7 @@ var DSTooltip__default = /*#__PURE__*/_interopDefaultLegacy(DSTooltip);
|
|
|
21
22
|
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
22
23
|
|
|
23
24
|
var TileButton = function TileButton(props) {
|
|
25
|
+
parts_tileButton_config_useValidateProps.useValidateProps(props, TileButtonWithSchema.toJSON());
|
|
24
26
|
var label = props.label,
|
|
25
27
|
title = props.title,
|
|
26
28
|
dsId = props.dsId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileButton.js","sources":["../../../../src/parts/tile-button/TileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Grid } from '@elliemae/ds-grid';\nimport CloseXsmall from '@elliemae/ds-icons/CloseXsmall';\nimport {\n StyledTileButton,\n StyledTileButtonIcon,\n StyledTileButtonLabel,\n StyledWrapper,\n StyledWrapperLeftBorder,\n StyledStatusBadge,\n StyledWrapperCentralContent,\n CloseButton,\n} from './styled';\nimport { propsTileButton, defaultTileButton, TileButtonProps } from './props';\n\nconst TileButton = (props: TileButtonProps): JSX.Element => {\n const {\n label,\n title,\n dsId,\n onClick,\n onFocus,\n onBlur,\n Icon,\n showClose,\n onClose,\n badge,\n badgeColor,\n badgePosition,\n disabled,\n selected,\n isHeader,\n ariaLabel,\n } = props;\n const handleClick = React.useCallback(() => {\n onClick(dsId, title);\n }, [dsId, onClick, title]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent alignItems={isHeader ? 'center' : undefined}>\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n {badge ? <StyledStatusBadge badgeColor={badgeColor} badgePosition={badgePosition} /> : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? <StyledTileButtonLabel>{label}</StyledTileButtonLabel> : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, badgeColor, badgePosition, label],\n );\n\n return (\n <StyledTileButton\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n data-testid={`tile-button-${dsId}`}\n onClick={handleClick}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n selected={selected}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n aria-pressed={selected}\n aria-label={ariaLabel}\n >\n <StyledWrapper alignItems=\"center\" justifyContent=\"center\">\n {title ? (\n <DSTooltip\n containerProps={{\n id: `ds-chat-tile-tooltip-button-${dsId}`,\n 'data-testid': `ds-chat-tile-tooltip-button-${dsId}`,\n }}\n interactionType=\"hover\"\n title={title}\n triggerComponent={<span>{MainContent}</span>}\n placement=\"bottom\"\n />\n ) : (\n MainContent\n )}\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n );\n};\n\nTileButton.propTypes = propsTileButton;\nTileButton.defaultProps = defaultTileButton;\n\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton;\n\nexport { TileButton, TileButtonWithSchema };\n"],"names":["TileButton","props","label","title","dsId","onClick","onFocus","onBlur","Icon","showClose","onClose","badge","badgeColor","badgePosition","disabled","selected","isHeader","ariaLabel","handleClick","React","useCallback","MainContent","useMemo","StyledWrapperCentralContent","undefined","Grid","StyledTileButtonIcon","StyledStatusBadge","StyledTileButtonLabel","StyledTileButton","StyledWrapper","DSTooltip","id","StyledWrapperLeftBorder","CloseButton","CloseXsmall","propTypes","propsTileButton","defaultProps","defaultTileButton","
|
|
1
|
+
{"version":3,"file":"TileButton.js","sources":["../../../../src/parts/tile-button/TileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Grid } from '@elliemae/ds-grid';\nimport CloseXsmall from '@elliemae/ds-icons/CloseXsmall';\nimport {\n StyledTileButton,\n StyledTileButtonIcon,\n StyledTileButtonLabel,\n StyledWrapper,\n StyledWrapperLeftBorder,\n StyledStatusBadge,\n StyledWrapperCentralContent,\n CloseButton,\n} from './styled';\nimport { propsTileButton, defaultTileButton, TileButtonProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst TileButton = (props: TileButtonProps): JSX.Element => {\n useValidateProps(props, TileButtonWithSchema.toJSON());\n\n const {\n label,\n title,\n dsId,\n onClick,\n onFocus,\n onBlur,\n Icon,\n showClose,\n onClose,\n badge,\n badgeColor,\n badgePosition,\n disabled,\n selected,\n isHeader,\n ariaLabel,\n } = props;\n const handleClick = React.useCallback(() => {\n onClick(dsId, title);\n }, [dsId, onClick, title]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent alignItems={isHeader ? 'center' : undefined}>\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n {badge ? <StyledStatusBadge badgeColor={badgeColor} badgePosition={badgePosition} /> : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? <StyledTileButtonLabel>{label}</StyledTileButtonLabel> : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, badgeColor, badgePosition, label],\n );\n\n return (\n <StyledTileButton\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n data-testid={`tile-button-${dsId}`}\n onClick={handleClick}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n selected={selected}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n aria-pressed={selected}\n aria-label={ariaLabel}\n >\n <StyledWrapper alignItems=\"center\" justifyContent=\"center\">\n {title ? (\n <DSTooltip\n containerProps={{\n id: `ds-chat-tile-tooltip-button-${dsId}`,\n 'data-testid': `ds-chat-tile-tooltip-button-${dsId}`,\n }}\n interactionType=\"hover\"\n title={title}\n triggerComponent={<span>{MainContent}</span>}\n placement=\"bottom\"\n />\n ) : (\n MainContent\n )}\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n );\n};\n\nTileButton.propTypes = propsTileButton;\nTileButton.defaultProps = defaultTileButton;\n\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton;\n\nexport { TileButton, TileButtonWithSchema };\n"],"names":["TileButton","props","useValidateProps","TileButtonWithSchema","toJSON","label","title","dsId","onClick","onFocus","onBlur","Icon","showClose","onClose","badge","badgeColor","badgePosition","disabled","selected","isHeader","ariaLabel","handleClick","React","useCallback","MainContent","useMemo","StyledWrapperCentralContent","undefined","Grid","StyledTileButtonIcon","StyledStatusBadge","StyledTileButtonLabel","StyledTileButton","StyledWrapper","DSTooltip","id","StyledWrapperLeftBorder","CloseButton","CloseXsmall","propTypes","propsTileButton","defaultProps","defaultTileButton","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAkBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAyC;AAC1DC,EAAAA,yDAAgB,CAACD,KAAD,EAAQE,oBAAoB,CAACC,MAArB,EAAR,CAAhB;AAEA,MACEC,KADF,GAiBIJ,KAjBJ,CACEI,KADF;AAAA,MAEEC,KAFF,GAiBIL,KAjBJ,CAEEK,KAFF;AAAA,MAGEC,IAHF,GAiBIN,KAjBJ,CAGEM,IAHF;AAAA,MAIEC,OAJF,GAiBIP,KAjBJ,CAIEO,OAJF;AAAA,MAKEC,OALF,GAiBIR,KAjBJ,CAKEQ,OALF;AAAA,MAMEC,MANF,GAiBIT,KAjBJ,CAMES,MANF;AAAA,MAOEC,IAPF,GAiBIV,KAjBJ,CAOEU,IAPF;AAAA,MAQEC,SARF,GAiBIX,KAjBJ,CAQEW,S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tC,UAAU,CAACuC,SAAX,GAAuBC,sCAAvB;AACAxC,UAAU,CAACyC,YAAX,GAA0BC,wCAA1B;IAEMvC,oBAAoB,GAAGwC,kBAAQ,CAAC3C,UAAD;AACrCG,oBAAoB,CAACoC,SAArB,GAAiCC,sCAAjC;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
|
+
|
|
7
|
+
var useValidateProps = function useValidateProps(props, schema) {
|
|
8
|
+
dsPropsHelpers.useValidatePropTypes(props, schema);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.useValidateProps = useValidateProps;
|
|
12
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/tile-button/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { TileButtonProps } from '../props';\n\nexport const useValidateProps = (props: TileButtonProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAyBC,MAAzB,EAAmD;AACjFC,EAAAA,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
|
|
@@ -11,9 +11,10 @@ require('@elliemae/ds-icons/CloseXsmall');
|
|
|
11
11
|
require('./styled.js');
|
|
12
12
|
require('styled-components');
|
|
13
13
|
require('./props.js');
|
|
14
|
-
require('prop-types');
|
|
15
14
|
require('lodash');
|
|
16
15
|
require('@elliemae/ds-icons/Comments');
|
|
16
|
+
require('./config/useValidateProps.js');
|
|
17
|
+
require('@elliemae/ds-props-helpers');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var propsTypes = require('prop-types');
|
|
6
5
|
var reactDesc = require('react-desc');
|
|
7
6
|
var lodash = require('lodash');
|
|
8
7
|
var Comments = require('@elliemae/ds-icons/Comments');
|
|
9
8
|
|
|
10
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
10
|
|
|
12
|
-
var propsTypes__default = /*#__PURE__*/_interopDefaultLegacy(propsTypes);
|
|
13
11
|
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
14
12
|
|
|
15
13
|
var defaultTileButton = {
|
|
@@ -31,8 +29,8 @@ var defaultTileButton = {
|
|
|
31
29
|
ariaLabel: 'Tile button'
|
|
32
30
|
};
|
|
33
31
|
var propsTileButton = {
|
|
34
|
-
Icon: reactDesc.PropTypes.
|
|
35
|
-
dsId: reactDesc.PropTypes.
|
|
32
|
+
Icon: reactDesc.PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),
|
|
33
|
+
dsId: reactDesc.PropTypes.oneOf(['number', 'string']).description('Unique id for the button').defaultValue(defaultTileButton.dsId),
|
|
36
34
|
label: reactDesc.PropTypes.string.description('It will display under the icon').defaultValue(defaultTileButton.label),
|
|
37
35
|
title: reactDesc.PropTypes.string.description('Tooltip').defaultValue(defaultTileButton.title),
|
|
38
36
|
onClick: reactDesc.PropTypes.func.description('The function to call when is clicked').defaultValue(defaultTileButton.onClick),
|
|
@@ -42,7 +40,7 @@ var propsTileButton = {
|
|
|
42
40
|
showClose: reactDesc.PropTypes.bool.description('It will display the X').defaultValue(defaultTileButton.showClose),
|
|
43
41
|
badge: reactDesc.PropTypes.bool.description('It will display the badge').defaultValue(defaultTileButton.badge),
|
|
44
42
|
badgeColor: reactDesc.PropTypes.oneOf(['blue', 'green']).description('Color badge: blue or green').defaultValue(defaultTileButton.badgeColor),
|
|
45
|
-
badgePosition: reactDesc.PropTypes.oneOf(['
|
|
43
|
+
badgePosition: reactDesc.PropTypes.oneOf(['left', 'right']).description('Color badge: blue or green').defaultValue(defaultTileButton.badgePosition),
|
|
46
44
|
disabled: reactDesc.PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),
|
|
47
45
|
selected: reactDesc.PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),
|
|
48
46
|
isHeader: reactDesc.PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/tile-button/props.ts"],"sourcesContent":["import React from 'react';\nimport propsTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport Comments from '@elliemae/ds-icons/Comments';\n\nexport interface TileButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick?: (dsId: string | number, label: string) => void;\n onBlur?: (e) => void;\n onFocus?: (e) => void;\n title: string;\n showClose: boolean;\n onClose?: (dsId: string | number) => void;\n badge: boolean;\n badgeColor: 'blue' | 'green';\n badgePosition: 'left' | 'right';\n disabled: boolean;\n selected: boolean;\n isHeader: boolean;\n ariaLabel: string;\n}\n\nexport const defaultTileButton: TileButtonProps = {\n Icon: Comments,\n dsId: undefined,\n label: '',\n onClick: noop,\n onBlur: noop,\n onFocus: noop,\n title: '',\n onClose: noop,\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'left',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n};\n\nexport const propsTileButton = {\n Icon: PropTypes.
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/tile-button/props.ts"],"sourcesContent":["import React from 'react';\nimport propsTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport Comments from '@elliemae/ds-icons/Comments';\n\nexport interface TileButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick?: (dsId: string | number, label: string) => void;\n onBlur?: (e) => void;\n onFocus?: (e) => void;\n title: string;\n showClose: boolean;\n onClose?: (dsId: string | number) => void;\n badge: boolean;\n badgeColor: 'blue' | 'green';\n badgePosition: 'left' | 'right';\n disabled: boolean;\n selected: boolean;\n isHeader: boolean;\n ariaLabel: string;\n}\n\nexport const defaultTileButton: TileButtonProps = {\n Icon: Comments,\n dsId: undefined,\n label: '',\n onClick: noop,\n onBlur: noop,\n onFocus: noop,\n title: '',\n onClose: noop,\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'left',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n};\n\nexport const propsTileButton = {\n Icon: PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),\n dsId: PropTypes.oneOf(['number', 'string'])\n .description('Unique id for the button')\n .defaultValue(defaultTileButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultTileButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultTileButton.title),\n onClick: PropTypes.func.description('The function to call when is clicked').defaultValue(defaultTileButton.onClick),\n onFocus: PropTypes.func.description('The function to call when is focused').defaultValue(defaultTileButton.onFocus),\n onBlur: PropTypes.func.description('The function to call when is on blur').defaultValue(defaultTileButton.onBlur),\n onClose: PropTypes.func\n .description('The function to call when the X is Clicked')\n .defaultValue(defaultTileButton.onClose),\n showClose: PropTypes.bool.description('It will display the X').defaultValue(defaultTileButton.showClose),\n badge: PropTypes.bool.description('It will display the badge').defaultValue(defaultTileButton.badge),\n badgeColor: PropTypes.oneOf(['blue', 'green'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgeColor),\n badgePosition: PropTypes.oneOf(['left', 'right'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgePosition),\n disabled: PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),\n selected: PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),\n isHeader: PropTypes.bool.description(\"It won't render the label\").defaultValue(defaultTileButton.disabled),\n ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),\n};\n"],"names":["defaultTileButton","Icon","Comments","dsId","undefined","label","onClick","noop","onBlur","onFocus","title","onClose","showClose","badge","badgeColor","badgePosition","disabled","selected","isHeader","ariaLabel","propsTileButton","PropTypes","func","description","defaultValue","oneOf","string","bool"],"mappings":";;;;;;;;;;;;IAyBaA,iBAAkC,GAAG;AAChDC,EAAAA,IAAI,EAAEC,4BAD0C;AAEhDC,EAAAA,IAAI,EAAEC,SAF0C;AAGhDC,EAAAA,KAAK,EAAE,EAHyC;AAIhDC,EAAAA,OAAO,EAAEC,WAJuC;AAKhDC,EAAAA,MAAM,EAAED,WALwC;AAMhDE,EAAAA,OAAO,EAAEF,WANuC;AAOhDG,EAAAA,KAAK,EAAE,EAPyC;AAQhDC,EAAAA,OAAO,EAAEJ,WARuC;AAShDK,EAAAA,SAAS,EAAE,KATqC;AAUhDC,EAAAA,KAAK,EAAE,KAVyC;AAWhDC,EAAAA,UAAU,EAAE,MAXoC;AAYhDC,EAAAA,aAAa,EAAE,MAZiC;AAahDC,EAAAA,QAAQ,EAAE,KAbsC;AAchDC,EAAAA,QAAQ,EAAE,KAdsC;AAehDC,EAAAA,QAAQ,EAAE,KAfsC;AAgBhDC,EAAAA,SAAS,EAAE;AAhBqC;IAmBrCC,eAAe,GAAG;AAC7BnB,EAAAA,IAAI,EAAEoB,mBAAS,CAACC,IAAV,CAAeC,WAAf,CAA2B,gBAA3B,E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AACa,KAAvF,CAdsB;AAe7BC,EAAAA,UAAU,EAAEO,mBAAS,CAACI,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,CAAhB,EACTF,WADS,CACG,4BADH,EAETC,YAFS,CAEIxB,iBAAiB,CAACc,UAFtB,CAfiB;AAkB7BC,EAAAA,aAAa,EAAEM,mBAAS,CAACI,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,CAAhB,EACZF,WADY,CACA,4BADA,EAEZC,YAFY,CAECxB,iBAAiB,CAACe,aAFnB,CAlBc;AAqB7BC,EAAAA,QAAQ,EAAEK,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,6BAA3B,EAA0DC,YAA1D,CAAuExB,iBAAiB,CAACgB,QAAzF,CArBmB;AAsB7BC,EAAAA,QAAQ,EAAEI,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,sCAA3B,EAAmEC,YAAnE,CAAgFxB,iBAAiB,CAACgB,QAAlG,CAtBmB;AAuB7BE,EAAAA,QAAQ,EAAEG,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,2BAA3B,EAAwDC,YAAxD,CAAqExB,iBAAiB,CAACgB,QAAvF,CAvBmB;AAwB7BG,EAAAA,SAAS,EAAEE,mBAAS,CAACK,MAAV,CAAiBH,WAAjB,CAA6B,sBAA7B,EAAqDC,YAArD,CAAkExB,iBAAiB,CAACmB,SAApF;AAxBkB;;;;;"}
|
|
@@ -46,7 +46,11 @@ var StyledWrapperCentralContent = /*#__PURE__*/styled__default['default'](dsGrid
|
|
|
46
46
|
})(["width:24px;height:40px;"]);
|
|
47
47
|
var StyledTileButtonIcon = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
48
48
|
componentId: "sc-1ebp1zs-3"
|
|
49
|
-
})(["position:relative;height:24px;width:24px;}"])
|
|
49
|
+
})(["position:relative;height:24px;width:24px;svg{fill:", ";}&:focus{svg{fill:", ";}}"], function (props) {
|
|
50
|
+
return props.theme.colors.neutral[500];
|
|
51
|
+
}, function (props) {
|
|
52
|
+
return props.theme.colors.brand[800];
|
|
53
|
+
});
|
|
50
54
|
var StyledTileButtonLabel = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
51
55
|
componentId: "sc-1ebp1zs-4"
|
|
52
56
|
})(["width:24px;height:", ";text-transform:uppercase;overflow:hidden;text-align:center;font-size:13px;color:", ";line-height:17px;"], function (props) {
|
|
@@ -64,7 +68,7 @@ var CloseButton = /*#__PURE__*/styled__default['default'].button.withConfig({
|
|
|
64
68
|
|
|
65
69
|
var StyledTileButton = /*#__PURE__*/styled__default['default'].button.withConfig({
|
|
66
70
|
componentId: "sc-1ebp1zs-6"
|
|
67
|
-
})(["outline:none;background:transparent;height:", "px;width:", "px;position:relative;padding:0;border:none;cursor:pointer;border-bottom:", ";&:focus,&:hover,&:active,&:disabled{background:", ";& ", "{border:2px solid ", ";margin-top:-2px;", ";}}&:focus,&:hover{& ", "{background:", ";}& ", "{color:", ";}}&:active:not(:disabled){background:", ";& ", "{background:", ";}& ", "{color:", ";font-weight:600;}& svg{fill:", ";}& ", "{border:2px solid ", ";}}&:disabled{background:", ";", "{background:", ";}& ", "{background:", ";border:2px solid ", ";}", "{svg{fill:", ";}}", "{color:", ";}}", ""], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR, function (props) {
|
|
71
|
+
})(["outline:none;background:transparent;height:", "px;width:", "px;position:relative;padding:0;border:none;cursor:pointer;border-bottom:", ";&:focus,&:hover,&:active,&:disabled{background:", ";& ", "{border:2px solid ", ";margin-top:-2px;", ";}}&:focus,&:hover{& ", "{background:", ";}& ", "{color:", ";}& svg{fill:", ";}}&:active:not(:disabled){background:", ";& ", "{background:", ";}& ", "{color:", ";font-weight:600;}& svg{fill:", ";}& ", "{border:2px solid ", ";}}&:disabled{background:", ";", "{background:", ";}& ", "{background:", ";border:2px solid ", ";}", "{svg{fill:", ";}}", "{color:", ";}}", ""], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR, function (props) {
|
|
68
72
|
return props.isHeader ? "1px solid ".concat(props.theme.colors.neutral['200']) : 'none';
|
|
69
73
|
}, function (props) {
|
|
70
74
|
return props.theme.colors.neutral['080'];
|
|
@@ -85,6 +89,8 @@ var StyledTileButton = /*#__PURE__*/styled__default['default'].button.withConfig
|
|
|
85
89
|
return props.theme.colors.brand[800];
|
|
86
90
|
}, StyledTileButtonLabel, function (props) {
|
|
87
91
|
return props.theme.colors.neutral[600];
|
|
92
|
+
}, function (props) {
|
|
93
|
+
return props.theme.colors.brand[800];
|
|
88
94
|
}, function (props) {
|
|
89
95
|
return props.theme.colors.neutral['050'];
|
|
90
96
|
}, StyledWrapperLeftBorder, function (props) {
|
|
@@ -118,9 +124,7 @@ var StyledTileButton = /*#__PURE__*/styled__default['default'].button.withConfig
|
|
|
118
124
|
});
|
|
119
125
|
var StyledWrapper = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
120
126
|
componentId: "sc-1ebp1zs-7"
|
|
121
|
-
})(["height:100%;width:100%;position:relative
|
|
122
|
-
return props.theme.colors.brand[800];
|
|
123
|
-
});
|
|
127
|
+
})(["height:100%;width:100%;position:relative;"]);
|
|
124
128
|
|
|
125
129
|
exports.CloseButton = CloseButton;
|
|
126
130
|
exports.StyledStatusBadge = StyledStatusBadge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/tile-button/styled.ts"],"sourcesContent":["/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport styled, { css } from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { TileButtonProps } from './props';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n\n// Buttons\nexport const StyledWrapperLeftBorder = styled(Grid)`\n height: 100%;\n width: 4px;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const StyledStatusBadge = styled.div<Partial<TileButtonProps>>`\n height: 8px;\n width: 8px;\n position: absolute;\n top: 0;\n background: ${(props) => {\n switch (props.badgeColor) {\n case 'blue':\n return props.theme.colors.brand[600];\n case 'green':\n return props.theme.colors.success[900];\n default:\n return props.theme.colors.brand[600];\n }\n }};\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'left: -4px;';\n case 'right':\n return 'right: -4px;';\n default:\n return 'left: -4px;';\n }\n }};\n border-radius: 50%;\n box-sizing: content-box;\n`;\n\nexport const StyledWrapperCentralContent = styled(Grid)`\n width: 24px;\n height: 40px;\n`;\n\nexport const StyledTileButtonIcon = styled(Grid)`\n position: relative;\n height: 24px;\n width: 24px;\n }\n`;\n\nexport const StyledTileButtonLabel = styled.div`\n width: 24px;\n height: ${(props) => props.theme.space.xs};\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 17px;\n`;\n\nexport const CloseButton = styled.button<any>`\n outline: none;\n background: none;\n height: 9px;\n width: 9px;\n position: absolute;\n top: 1px;\n right: 1px;\n overflow: hidden;\n padding: 0;\n border: none;\n span {\n position: absolute;\n left: -3px;\n top: -4px;\n }\n\n &:focus,\n &:hover {\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:after {\n display: block;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: solid 1px ${(props) => props.theme.colors.brand[600]};\n border-radius: 2px;\n }\n }\n cursor: pointer;\n`;\n\n// MAIN WRAPPER\nexport const StyledTileButton = styled.button<Partial<TileButtonProps>>`\n outline: none;\n background: transparent;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n padding: 0;\n border: none;\n cursor: pointer;\n border-bottom: ${(props) => (props.isHeader ? `1px solid ${props.theme.colors.neutral['200']}` : 'none')};\n &:focus,\n &:hover,\n &:active,\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n margin-top: -2px;\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'margin-left: -2px;';\n case 'right':\n return 'margin-right: -2px;';\n default:\n return 'margin-left: -2px;';\n }\n }};\n }\n }\n\n &:focus,\n &:hover {\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[800]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n }\n }\n\n &:active:not(:disabled) {\n background: ${(props) => props.theme.colors.neutral['050']};\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n font-weight: 600;\n }\n & svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['050']};\n }\n }\n\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.neutral['400']};\n }\n & ${StyledStatusBadge} {\n background: ${(props) => props.theme.colors.neutral['500']};\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n }\n ${StyledTileButtonIcon} {\n svg {\n fill: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n\n ${(props) => {\n if (props.selected) {\n return css`\n & ${StyledWrapperLeftBorder} {\n background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};\n }\n `;\n }\n return '';\n }}\n`;\n\nexport const StyledWrapper = styled(Grid)`\n height: 100%;\n width: 100%;\n position: relative;\n
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/tile-button/styled.ts"],"sourcesContent":["/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport styled, { css } from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { TileButtonProps } from './props';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n\n// Buttons\nexport const StyledWrapperLeftBorder = styled(Grid)`\n height: 100%;\n width: 4px;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const StyledStatusBadge = styled.div<Partial<TileButtonProps>>`\n height: 8px;\n width: 8px;\n position: absolute;\n top: 0;\n background: ${(props) => {\n switch (props.badgeColor) {\n case 'blue':\n return props.theme.colors.brand[600];\n case 'green':\n return props.theme.colors.success[900];\n default:\n return props.theme.colors.brand[600];\n }\n }};\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'left: -4px;';\n case 'right':\n return 'right: -4px;';\n default:\n return 'left: -4px;';\n }\n }};\n border-radius: 50%;\n box-sizing: content-box;\n`;\n\nexport const StyledWrapperCentralContent = styled(Grid)`\n width: 24px;\n height: 40px;\n`;\n\nexport const StyledTileButtonIcon = styled(Grid)`\n position: relative;\n height: 24px;\n width: 24px;\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n\n &:focus {\n svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledTileButtonLabel = styled.div`\n width: 24px;\n height: ${(props) => props.theme.space.xs};\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 17px;\n`;\n\nexport const CloseButton = styled.button<any>`\n outline: none;\n background: none;\n height: 9px;\n width: 9px;\n position: absolute;\n top: 1px;\n right: 1px;\n overflow: hidden;\n padding: 0;\n border: none;\n span {\n position: absolute;\n left: -3px;\n top: -4px;\n }\n\n &:focus,\n &:hover {\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:after {\n display: block;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: solid 1px ${(props) => props.theme.colors.brand[600]};\n border-radius: 2px;\n }\n }\n cursor: pointer;\n`;\n\n// MAIN WRAPPER\nexport const StyledTileButton = styled.button<Partial<TileButtonProps>>`\n outline: none;\n background: transparent;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n padding: 0;\n border: none;\n cursor: pointer;\n border-bottom: ${(props) => (props.isHeader ? `1px solid ${props.theme.colors.neutral['200']}` : 'none')};\n &:focus,\n &:hover,\n &:active,\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n margin-top: -2px;\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'margin-left: -2px;';\n case 'right':\n return 'margin-right: -2px;';\n default:\n return 'margin-left: -2px;';\n }\n }};\n }\n }\n\n &:focus,\n &:hover {\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[800]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n }\n\n & svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n\n &:active:not(:disabled) {\n background: ${(props) => props.theme.colors.neutral['050']};\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n font-weight: 600;\n }\n & svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['050']};\n }\n }\n\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.neutral['400']};\n }\n & ${StyledStatusBadge} {\n background: ${(props) => props.theme.colors.neutral['500']};\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n }\n ${StyledTileButtonIcon} {\n svg {\n fill: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n\n ${(props) => {\n if (props.selected) {\n return css`\n & ${StyledWrapperLeftBorder} {\n background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};\n }\n `;\n }\n return '';\n }}\n`;\n\nexport const StyledWrapper = styled(Grid)`\n height: 100%;\n width: 100%;\n position: relative;\n`;\n"],"names":["MIN_WIDTH_SIDEBAR","BUTTON_SIDEBAR_HEIGHT","StyledWrapperLeftBorder","styled","Grid","StyledStatusBadge","div","props","badgeColor","theme","colors","brand","success","badgePosition","StyledWrapperCentralContent","StyledTileButtonIcon","neutral","StyledTileButtonLabel","space","xs","CloseButton","button","StyledTileButton","isHeader","selected","css","nestedProps","StyledWrapper"],"mappings":";;;;;;;;;;;AAAA;AAKA,IAAMA,iBAAiB,GAAG,EAA1B;AACA,IAAMC,qBAAqB,GAAG,EAA9B;;IAGaC,uBAAuB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA;IAQvBC,iBAAiB,gBAAGF,0BAAM,CAACG,GAAV;AAAA;AAAA,oHAKd,UAACC,KAAD,EAAW;AACvB,UAAQA,KAAK,CAACC,UAAd;AACE,SAAK,MAAL;AACE,aAAOD,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAP;;AACF,SAAK,OAAL;AACE,aAAOJ,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,GAA3B,CAAP;;AACF;AACE,aAAOL,KAAK,CAACE,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAP;AANJ;AAQD,CAd2B,EAe1B,UAACJ,KAAD,EAAW;AACX,UAAQA,KAAK,CAACM,aAAd;AACE,SAAK,MAAL;AACE,aAAO,aAAP;;AACF,SAAK,OAAL;AACE,aAAO,cAAP;;AACF;AACE,aAAO,aAAP;AANJ;AAQD,CAxB2B;IA6BjBC,2BAA2B,gBAAGX,0BAAM,CAACC,WAAD,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ble } from './parts/bubble/ChatBubble.js';
|
|
1
|
+
export { ChatBubble, ChatBubbleWithSchema } from './parts/bubble/ChatBubble.js';
|
|
2
2
|
export { BUBBLE_TYPES } from './parts/bubble/props.js';
|
|
3
3
|
export { FloatingButton } from './parts/floating-button/FloatingButton.js';
|
|
4
4
|
export { StyledFloatingContainer } from './parts/floating-container/styled.js';
|
|
@@ -13,13 +13,15 @@ export { MessageDelimiter, MessageDelimiterWithSchema } from './parts/message-de
|
|
|
13
13
|
export { SystemMessage, SystemMessageWithSchema } from './parts/system-message/SystemMessage.js';
|
|
14
14
|
export { ChatCard, ChatCardWithSchema } from './parts/chat-card/ChatCard.js';
|
|
15
15
|
import 'react';
|
|
16
|
+
import 'react-desc';
|
|
16
17
|
import '@elliemae/ds-icons/WarningCircleFill';
|
|
17
18
|
import './parts/bubble/styled.js';
|
|
18
19
|
import 'styled-components';
|
|
19
20
|
import '@elliemae/ds-grid';
|
|
20
21
|
import 'prop-types';
|
|
21
|
-
import 'react-desc';
|
|
22
22
|
import 'lodash';
|
|
23
|
+
import './parts/bubble/config/useValidateProps.js';
|
|
24
|
+
import '@elliemae/ds-props-helpers';
|
|
23
25
|
import './parts/bubble/ChatBubbleArrow.js';
|
|
24
26
|
import '@elliemae/ds-icons/Comments';
|
|
25
27
|
import './parts/floating-button/styled.js';
|
|
@@ -28,21 +30,27 @@ import './styled.js';
|
|
|
28
30
|
import '@elliemae/ds-truncated-tooltip-text';
|
|
29
31
|
import './parts/chat-container-header/styled.js';
|
|
30
32
|
import '@elliemae/ds-icons/Communications';
|
|
33
|
+
import './parts/chat-empty-state/props.js';
|
|
31
34
|
import './parts/chat-empty-state/styled.js';
|
|
35
|
+
import './parts/chat-empty-state/config/useValidateProps.js';
|
|
32
36
|
import '@babel/runtime/helpers/esm/extends';
|
|
33
37
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
34
38
|
import 'react-virtual';
|
|
35
39
|
import '@elliemae/ds-basic/Button';
|
|
36
40
|
import './parts/chat-container-messages-list/styled.js';
|
|
37
41
|
import './parts/chat-container-messages-list/props.js';
|
|
42
|
+
import './parts/chat-container-messages-list/config/useValidateProps.js';
|
|
38
43
|
import './parts/message-delimiter/styled.js';
|
|
39
44
|
import './parts/message-delimiter/props.js';
|
|
45
|
+
import './parts/message-delimiter/config/useValidateProps.js';
|
|
40
46
|
import './parts/system-message/style.js';
|
|
41
47
|
import './parts/system-message/props.js';
|
|
48
|
+
import './parts/system-message/config/useValidateProps.js';
|
|
42
49
|
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
43
50
|
import '@elliemae/ds-icons/PaperAirplane';
|
|
44
51
|
import './parts/chat-composer/styled.js';
|
|
45
52
|
import '@elliemae/ds-button';
|
|
53
|
+
import './parts/chat-composer/config/useValidateProps.js';
|
|
46
54
|
import './parts/chat-composer/props.js';
|
|
47
55
|
import '@elliemae/ds-icons/MenuExpand';
|
|
48
56
|
import '@elliemae/ds-icons/MenuCollapse';
|
|
@@ -52,14 +60,18 @@ import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
|
52
60
|
import './parts/sidebar-button/styled.js';
|
|
53
61
|
import './parts/sidebar-button/props.js';
|
|
54
62
|
import './parts/chat-sidebar/props.js';
|
|
63
|
+
import './parts/chat-sidebar/config/useValidateProps.js';
|
|
55
64
|
import '@elliemae/ds-tooltip';
|
|
56
65
|
import '@elliemae/ds-icons/CloseXsmall';
|
|
57
66
|
import './parts/tile-button/styled.js';
|
|
58
67
|
import './parts/tile-button/props.js';
|
|
68
|
+
import './parts/tile-button/config/useValidateProps.js';
|
|
59
69
|
import '@elliemae/ds-basic/IndeterminateProgressIndicator';
|
|
60
70
|
import '@elliemae/ds-banner';
|
|
61
71
|
import './parts/chat-container/props.js';
|
|
62
72
|
import './parts/chat-container/styled.js';
|
|
73
|
+
import './parts/chat-container/config/useValidateProps.js';
|
|
63
74
|
import './parts/chat-card/props.js';
|
|
75
|
+
import './parts/chat-card/config/useValidateProps.js';
|
|
64
76
|
import './parts/chat-card/styled.js';
|
|
65
77
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { describe } from 'react-desc';
|
|
2
3
|
import Warning from '@elliemae/ds-icons/WarningCircleFill';
|
|
3
4
|
import { StyledWrapper, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage } from './styled.js';
|
|
4
5
|
import { propsBubbles } from './props.js';
|
|
6
|
+
import { useValidateProps } from './config/useValidateProps.js';
|
|
5
7
|
import { ChatBubbleArrow } from './ChatBubbleArrow.js';
|
|
6
8
|
import 'styled-components';
|
|
7
9
|
import '@elliemae/ds-grid';
|
|
8
10
|
import 'prop-types';
|
|
9
|
-
import 'react-desc';
|
|
10
11
|
import 'lodash';
|
|
12
|
+
import '@elliemae/ds-props-helpers';
|
|
11
13
|
|
|
12
14
|
var ChatBubble = function ChatBubble(props) {
|
|
15
|
+
useValidateProps(props, ChatBubbleWithSchema.toJSON());
|
|
13
16
|
var dsId = props.dsId,
|
|
14
17
|
type = props.type,
|
|
15
18
|
title = props.title,
|
|
@@ -50,7 +53,10 @@ var ChatBubble = function ChatBubble(props) {
|
|
|
50
53
|
cols: [1, 'auto']
|
|
51
54
|
}, /*#__PURE__*/React.createElement("span", null, helpMessage)) : null);
|
|
52
55
|
};
|
|
56
|
+
|
|
53
57
|
ChatBubble.propTypes = propsBubbles;
|
|
58
|
+
var ChatBubbleWithSchema = describe(ChatBubble);
|
|
59
|
+
ChatBubbleWithSchema.propTypes = propsBubbles;
|
|
54
60
|
|
|
55
|
-
export { ChatBubble };
|
|
61
|
+
export { ChatBubble, ChatBubbleWithSchema };
|
|
56
62
|
//# sourceMappingURL=ChatBubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport Warning from '@elliemae/ds-icons/WarningCircleFill';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled';\nimport { propsBubbles, BubbleProps } from './props';\nimport { ChatBubbleArrow } from './ChatBubbleArrow';\n\
|
|
1
|
+
{"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport Warning from '@elliemae/ds-icons/WarningCircleFill';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled';\nimport { propsBubbles, BubbleProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { ChatBubbleArrow } from './ChatBubbleArrow';\n\nconst ChatBubble = (props: BubbleProps): JSX.Element => {\n useValidateProps(props, ChatBubbleWithSchema.toJSON());\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = props;\n return (\n <StyledWrapper data-testid={`ds-chat-bubble-${dsId}`} type={type}>\n <StyledColoredBubble type={type}>\n <StyledTitleBubble cols={[1, 'auto']} gutter=\"xs\" alignItems=\"flex-end\" className=\"sr-only\">\n <StyledTitleLeftBubble alignItems=\"center\" data-testid={`chat-bubble-title-${dsId}`}>\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble alignItems=\"center\" type={type} data-testid={`chat-bubble-time-${dsId}`}>\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper data-testid={`chat-bubble-body-${dsId}`}>{body}</StyleBodyWrapper>\n <ChatBubbleArrow type={type} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage data-testid={`chat-bubble-error-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{errorMessage}</span>\n <Warning />\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage data-testid={`chat-bubble-help-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\nChatBubble.propTypes = propsBubbles;\n\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = propsBubbles;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n"],"names":["ChatBubble","props","useValidateProps","ChatBubbleWithSchema","toJSON","dsId","type","title","time","body","errorMessage","helpMessage","propTypes","propsBubbles","describe"],"mappings":";;;;;;;;;;;;;IAiBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAqC;AACtDC,EAAAA,gBAAgB,CAACD,KAAD,EAAQE,oBAAoB,CAACC,MAArB,EAAR,CAAhB;AAEA,MAAQC,IAAR,GAAqEJ,KAArE,CAAQI,IAAR;AAAA,MAAcC,IAAd,GAAqEL,KAArE,CAAcK,IAAd;AAAA,MAAoBC,KAApB,GAAqEN,KAArE,CAAoBM,KAApB;AAAA,MAA2BC,IAA3B,GAAqEP,KAArE,CAA2BO,IAA3B;AAAA,MAAiCC,IAAjC,GAAqER,KAArE,CAAiCQ,IAAjC;AAAA,MAAuCC,YAAvC,GAAqET,KAArE,CAAuCS,YAAvC;AAAA,MAAqDC,WAArD,GAAqEV,KAArE,CAAqDU,WAArD;AACA,sBACE,oBAAC,aAAD;AAAe,4CAA+BN,IAA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G,oBAAoB,CAACS,SAArB,GAAiCC,YAAjC;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
|
|
2
|
+
|
|
3
|
+
var throwError = function throwError(message) {
|
|
4
|
+
throw new Error("Bubble:: ".concat(message, "\n "));
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
var useValidateProps = function useValidateProps(props, schema) {
|
|
8
|
+
useValidatePropTypes(props, schema);
|
|
9
|
+
|
|
10
|
+
if (typeof props.title === 'undefined') {
|
|
11
|
+
throwError("Please provide a title property to use this component.");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (typeof props.time === 'undefined') {
|
|
15
|
+
throwError("Please provide a time property to use this component.");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (typeof props.body === 'undefined') {
|
|
19
|
+
throwError("Please provide a body property to use this component.");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (typeof props.type === 'undefined') {
|
|
23
|
+
throwError("Please provide a type property to use this component.");
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { useValidateProps };
|
|
28
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/bubble/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { BubbleProps } from '../props';\n\nconst throwError = (message: string): void => {\n throw new Error(\n `Bubble:: ${message}\n `,\n );\n};\n\nexport const useValidateProps = (props: BubbleProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n if (typeof props.title === 'undefined') {\n throwError(`Please provide a title property to use this component.`);\n }\n if (typeof props.time === 'undefined') {\n throwError(`Please provide a time property to use this component.`);\n }\n if (typeof props.body === 'undefined') {\n throwError(`Please provide a body property to use this component.`);\n }\n if (typeof props.type === 'undefined') {\n throwError(`Please provide a type property to use this component.`);\n }\n};\n"],"names":["throwError","message","Error","useValidateProps","props","schema","useValidatePropTypes","title","time","body","type"],"mappings":";;AAGA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAA2B;AAC5C,QAAM,IAAIC,KAAJ,oBACQD,OADR,UAAN;AAID,CALD;;IAOaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAqBC,MAArB,EAA+C;AAC7EC,EAAAA,oBAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;;AACA,MAAI,OAAOD,KAAK,CAACG,KAAb,KAAuB,WAA3B,EAAwC;AACtCP,IAAAA,UAAU,0DAAV;AACD;;AACD,MAAI,OAAOI,KAAK,CAACI,IAAb,KAAsB,WAA1B,EAAuC;AACrCR,IAAAA,UAAU,yDAAV;AACD;;AACD,MAAI,OAAOI,KAAK,CAACK,IAAb,KAAsB,WAA1B,EAAuC;AACrCT,IAAAA,UAAU,yDAAV;AACD;;AACD,MAAI,OAAOI,KAAK,CAACM,IAAb,KAAsB,WAA1B,EAAuC;AACrCV,IAAAA,UAAU,yDAAV;AACD;AACF;;;;"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export { ChatBubble } from './ChatBubble.js';
|
|
1
|
+
export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';
|
|
2
2
|
export { BUBBLE_TYPES } from './props.js';
|
|
3
3
|
import 'react';
|
|
4
|
+
import 'react-desc';
|
|
4
5
|
import '@elliemae/ds-icons/WarningCircleFill';
|
|
5
6
|
import './styled.js';
|
|
6
7
|
import 'styled-components';
|
|
7
8
|
import '@elliemae/ds-grid';
|
|
8
9
|
import 'prop-types';
|
|
9
|
-
import 'react-desc';
|
|
10
10
|
import 'lodash';
|
|
11
|
+
import './config/useValidateProps.js';
|
|
12
|
+
import '@elliemae/ds-props-helpers';
|
|
11
13
|
import './ChatBubbleArrow.js';
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -25,10 +25,10 @@ var defaultBubbleProps = {
|
|
|
25
25
|
};
|
|
26
26
|
var propsBubbles = {
|
|
27
27
|
dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('Unique id for bubble').defaultValue(defaultBubbleProps.dsId),
|
|
28
|
-
type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).description('Define bubble type ').defaultValue(defaultBubbleProps.type),
|
|
29
|
-
title: PropTypes.string.description('Title of the bubble').defaultValue(defaultBubbleProps.title),
|
|
30
|
-
time: PropTypes.string.description('Time of the bubble').defaultValue(defaultBubbleProps.title),
|
|
31
|
-
body: PropTypes.string.description('Bubble content').defaultValue(defaultBubbleProps.body),
|
|
28
|
+
type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description('Define bubble type ').defaultValue(defaultBubbleProps.type),
|
|
29
|
+
title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),
|
|
30
|
+
time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),
|
|
31
|
+
body: PropTypes.oneOf(['string', 'element']).isRequired.description('Bubble content').defaultValue(defaultBubbleProps.body),
|
|
32
32
|
onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),
|
|
33
33
|
errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Error message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick),
|
|
34
34
|
helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Help message to display at bottom of the bubble').defaultValue(defaultBubbleProps.onClick)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/bubble/props.ts"],"sourcesContent":["import propTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\n/**\n *\n * BUBBLE\n *\n */\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\nexport type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];\n\nexport interface BubbleProps {\n dsId: string | number;\n type: BubbleTypesValues;\n title: string;\n body: string;\n time: string;\n errorMessage: string | React.ReactChild;\n helpMessage: string | React.ReactChild;\n onClick: (id: string | number) => void;\n}\n\nexport const defaultBubbleProps: BubbleProps = {\n dsId: undefined,\n type: BUBBLE_TYPES.SENDER,\n title: undefined,\n time: undefined,\n body: undefined,\n onClick: noop,\n errorMessage: undefined,\n helpMessage: undefined,\n};\n\nexport const propsBubbles = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue(defaultBubbleProps.dsId),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .description('Define bubble type ')\n .defaultValue(defaultBubbleProps.type),\n title: PropTypes.string.description('Title of the bubble').defaultValue(defaultBubbleProps.title),\n time: PropTypes.string.description('Time of the bubble').defaultValue(defaultBubbleProps.title),\n body: PropTypes.string.description('Bubble content').defaultValue(defaultBubbleProps.body),\n onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Error message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Help message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n};\n\n/**\n *\n * BUBBLE ARROW\n *\n */\nexport const propsArrowBubble = {\n type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]),\n};\n"],"names":["BUBBLE_TYPES","SENDER","RECIPIENT","DELIMITER","SYSTEM","defaultBubbleProps","dsId","undefined","type","title","time","body","onClick","noop","errorMessage","helpMessage","propsBubbles","PropTypes","oneOfType","string","number","description","defaultValue","oneOf","element","propsArrowBubble","propTypes"],"mappings":";;;;AAKA;AACA;AACA;AACA;AACA;IACaA,YAAY,GAAG;AAC1BC,EAAAA,MAAM,EAAE,QADkB;AAE1BC,EAAAA,SAAS,EAAE,WAFe;AAG1BC,EAAAA,SAAS,EAAE,WAHe;AAI1BC,EAAAA,MAAM,EAAE;AAJkB;IAqBfC,kBAA+B,GAAG;AAC7CC,EAAAA,IAAI,EAAEC,SADuC;AAE7CC,EAAAA,IAAI,EAAER,YAAY,CAACC,MAF0B;AAG7CQ,EAAAA,KAAK,EAAEF,SAHsC;AAI7CG,EAAAA,IAAI,EAAEH,SAJuC;AAK7CI,EAAAA,IAAI,EAAEJ,SALuC;AAM7CK,EAAAA,OAAO,EAAEC,IANoC;AAO7CC,EAAAA,YAAY,EAAEP,SAP+B;AAQ7CQ,EAAAA,WAAW,EAAER;AARgC;IAWlCS,YAAY,GAAG;AAC1BV,EAAAA,IAAI,EAAEW,SAAS,CAACC,SAAV,CAAoB,CAACD,SAAS,CAACE,MAAX,EAAmBF,SAAS,CAACG,MAA7B,CAApB,EACHC,WADG,CACS,sBADT,EAEHC,YAFG,CAEUjB,kBAAkB,CAACC,IAF7B,CADoB;AAI1BE,EAAAA,IAAI,EAAES,SAAS,CAACM,KAAV,CAAgB,CAACvB,YAAY,CAACE,SAAd,EAAyBF,YAAY,CAACC,MAAtC,CAAhB,
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/bubble/props.ts"],"sourcesContent":["import propTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\n/**\n *\n * BUBBLE\n *\n */\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\nexport type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];\n\nexport interface BubbleProps {\n dsId: string | number;\n type: BubbleTypesValues;\n title: string;\n body: string;\n time: string;\n errorMessage: string | React.ReactChild;\n helpMessage: string | React.ReactChild;\n onClick: (id: string | number) => void;\n}\n\nexport const defaultBubbleProps: BubbleProps = {\n dsId: undefined,\n type: BUBBLE_TYPES.SENDER,\n title: undefined,\n time: undefined,\n body: undefined,\n onClick: noop,\n errorMessage: undefined,\n helpMessage: undefined,\n};\n\nexport const propsBubbles = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue(defaultBubbleProps.dsId),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultBubbleProps.type),\n title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),\n time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),\n body: PropTypes.oneOf(['string', 'element'])\n .isRequired.description('Bubble content')\n .defaultValue(defaultBubbleProps.body),\n onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Error message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Help message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n};\n\n/**\n *\n * BUBBLE ARROW\n *\n */\nexport const propsArrowBubble = {\n type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]),\n};\n"],"names":["BUBBLE_TYPES","SENDER","RECIPIENT","DELIMITER","SYSTEM","defaultBubbleProps","dsId","undefined","type","title","time","body","onClick","noop","errorMessage","helpMessage","propsBubbles","PropTypes","oneOfType","string","number","description","defaultValue","oneOf","isRequired","element","propsArrowBubble","propTypes"],"mappings":";;;;AAKA;AACA;AACA;AACA;AACA;IACaA,YAAY,GAAG;AAC1BC,EAAAA,MAAM,EAAE,QADkB;AAE1BC,EAAAA,SAAS,EAAE,WAFe;AAG1BC,EAAAA,SAAS,EAAE,WAHe;AAI1BC,EAAAA,MAAM,EAAE;AAJkB;IAqBfC,kBAA+B,GAAG;AAC7CC,EAAAA,IAAI,EAAEC,SADuC;AAE7CC,EAAAA,IAAI,EAAER,YAAY,CAACC,MAF0B;AAG7CQ,EAAAA,KAAK,EAAEF,SAHsC;AAI7CG,EAAAA,IAAI,EAAEH,SAJuC;AAK7CI,EAAAA,IAAI,EAAEJ,SALuC;AAM7CK,EAAAA,OAAO,EAAEC,IANoC;AAO7CC,EAAAA,YAAY,EAAEP,SAP+B;AAQ7CQ,EAAAA,WAAW,EAAER;AARgC;IAWlCS,YAAY,GAAG;AAC1BV,EAAAA,IAAI,EAAEW,SAAS,CAACC,SAAV,CAAoB,CAACD,SAAS,CAACE,MAAX,EAAmBF,SAAS,CAACG,MAA7B,CAApB,EACHC,WADG,CACS,sBADT,EAEHC,YAFG,CAEUjB,kBAAkB,CAACC,IAF7B,CADoB;AAI1BE,EAAAA,IAAI,EAAES,SAAS,CAACM,KAAV,CAAgB,CAACvB,YAAY,CAACE,SAAd,EAAyBF,YAAY,CAACC,MAAtC,CAAhB,EACHuB,UADG,CACQH,WADR,CACoB,qBADpB,EAEHC,YAFG,CAEUjB,kBAAkB,CAACG,IAF7B,CAJoB;AAO1BC,EAAAA,KAAK,EAAEQ,SAAS,CAACE,MAAV,CAAiBK,UAAjB,CAA4BH,WAA5B,CAAwC,qBAAxC,EAA+DC,YAA/D,CAA4EjB,kBAAkB,CAACI,KAA/F,CAPmB;AAQ1BC,EAAAA,IAAI,EAAEO,SAAS,CAACE,MAAV,CAAiBK,UAAjB,CAA4BH,WAA5B,CAAwC,oBAAxC,EAA8DC,YAA9D,CAA2EjB,kBAAkB,CAACI,KAA9F,CARoB;AAS1BE,EAAAA,IAAI,EAAEM,SAAS,CAACM,KAAV,CAAgB,CAAC,QAAD,EAAW,SAAX,CAAhB,EACHC,UADG,CACQH,WADR,CACoB,gBADpB,EAEHC,YAFG,CAEUjB,kBAAkB,CAACM,IAF7B,CAToB;AAY1BC,EAAAA,OAAO,EAAEK,SAAS,CAACE,MAAV,CAAiBE,WAAjB,CAA6B,oCAA7B,EAAmEC,YAAnE,CAAgFjB,kBAAkB,CAACO,OAAnG,CAZiB;AAa1BE,EAAAA,YAAY,EAAEG,SAAS,CAACC,SAAV,CAAoB,CAACD,SAAS,CAACE,MAAX,EAAmBF,SAAS,CAACQ,OAA7B,CAApB,EACXJ,WADW,CACC,kDADD,EAEXC,YAFW,CAEEjB,kBAAkB,CAACO,OAFrB,CAbY;AAgB1BG,EAAAA,WAAW,EAAEE,SAAS,CAACC,SAAV,CAAoB,CAACD,SAAS,CAACE,MAAX,EAAmBF,SAAS,CAACQ,OAA7B,CAApB,EACVJ,WADU,CACE,iDADF,EAEVC,YAFU,CAEGjB,kBAAkB,CAACO,OAFtB;AAhBa;AAqB5B;AACA;AACA;AACA;AACA;;IACac,gBAAgB,GAAG;AAC9BlB,EAAAA,IAAI,EAAEmB,UAAS,CAACJ,KAAV,CAAgB,CAACvB,YAAY,CAACE,SAAd,EAAyBF,YAAY,CAACC,MAAtC,CAAhB;AADwB;;;;"}
|
|
@@ -54,7 +54,7 @@ var StyledBubbleArrow = /*#__PURE__*/styled.div.withConfig({
|
|
|
54
54
|
var StyledColoredBubble = /*#__PURE__*/styled.div.withConfig({
|
|
55
55
|
componentId: "sc-fe8e9o-8"
|
|
56
56
|
})(["min-width:224px;border-radius:10px;position:relative;", ""], function (props) {
|
|
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 ") : "\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 ");
|
|
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
58
|
});
|
|
59
59
|
|
|
60
60
|
export { StyleBodyWrapper, StyleErrorMessage, StyleHelpMessage, StyledBubbleArrow, StyledColoredBubble, StyledTitleBubble, StyledTitleLeftBubble, StyledTitleRightBubble, StyledWrapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/bubble/styled.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './props';\n\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 600;\n`;\nexport const StyledTitleRightBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 400;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div<any>`\n font-size: 13px;\n font-weight: 400;\n line-height: 15px;\n min-height: 32px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div<any>`\n font-size: 12px;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n padding-bottom: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 15px;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 12px;\n line-height: 15px;\n color: ${(props) => props.theme.colors.neutral[500]};\n svg {\n fill: ${(props) => props.theme.colors.danger[500]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[500]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div<any>`\n display: block;\n content: '';\n position: absolute;\n bottom: 10px;\n height: 15px;\n`;\n\nexport const StyledColoredBubble = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n"],"names":["StyledWrapper","styled","div","StyledTitleBubble","Grid","StyledTitleLeftBubble","StyledTitleRightBubble","props","type","BUBBLE_TYPES","SENDER","StyleBodyWrapper","StyleErrorMessage","theme","space","xxxs","colors","danger","StyleHelpMessage","neutral","StyledBubbleArrow","StyledColoredBubble","brand"],"mappings":";;;;;;;AAAA;;IAMaA,aAAa,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA;;IAMbC,iBAAiB,gBAAGF,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA;IAOjBC,qBAAqB,gBAAGJ,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA;IAIrBE,sBAAsB,gBAAGL,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA,mDAGxB,UAACG,KAAD;AAAA,SAAYA,KAAK,CAACC,IAAN,KAAeC,YAAY,CAACC,MAA5B,GAAqC,MAArC,GAA8C,SAA1D;AAAA,CAHwB;IAMtBC,gBAAgB,gBAAGV,MAAM,CAACC,GAAV;AAAA;AAAA;IAQhBU,iBAAiB,gBAAGX,MAAM,CAACC,GAAV;AAAA;AAAA,+OAGb,UAACK,KAAD;AAAA,SAAWA,KAAK,CAACM,KAAN,CAAYC,KAAZ,CAAkBC,IAA7B;AAAA,CAHa,EAIV,UAACR,KAAD;AAAA,SAAWA,KAAK,CAACM,KAAN,CAAYC,KAAZ,CAAkBC,IAA7B;AAAA,CAJU,EAKnB,UAACR,KAAD;AAAA,SAAWA,KAAK,CAACM,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+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/bubble/styled.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './props';\n\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 600;\n`;\nexport const StyledTitleRightBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 400;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div<any>`\n font-size: 13px;\n font-weight: 400;\n line-height: 15px;\n min-height: 32px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div<any>`\n font-size: 12px;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n padding-bottom: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 15px;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 12px;\n line-height: 15px;\n color: ${(props) => props.theme.colors.neutral[500]};\n svg {\n fill: ${(props) => props.theme.colors.danger[500]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[500]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div<any>`\n display: block;\n content: '';\n position: absolute;\n bottom: 10px;\n height: 15px;\n`;\n\nexport const StyledColoredBubble = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n a {\n color: #FFF;\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n"],"names":["StyledWrapper","styled","div","StyledTitleBubble","Grid","StyledTitleLeftBubble","StyledTitleRightBubble","props","type","BUBBLE_TYPES","SENDER","StyleBodyWrapper","StyleErrorMessage","theme","space","xxxs","colors","danger","StyleHelpMessage","neutral","StyledBubbleArrow","StyledColoredBubble","brand"],"mappings":";;;;;;;AAAA;;IAMaA,aAAa,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA;;IAMbC,iBAAiB,gBAAGF,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA;IAOjBC,qBAAqB,gBAAGJ,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA;IAIrBE,sBAAsB,gBAAGL,MAAM,CAACG,IAAD,CAAT;AAAA;AAAA,mDAGxB,UAACG,KAAD;AAAA,SAAYA,KAAK,CAACC,IAAN,KAAeC,YAAY,CAACC,MAA5B,GAAqC,MAArC,GAA8C,SAA1D;AAAA,CAHwB;IAMtBC,gBAAgB,gBAAGV,MAAM,CAACC,GAAV;AAAA;AAAA;IAQhBU,iBAAiB,gBAAGX,MAAM,CAACC,GAAV;AAAA;AAAA,+OAGb,UAACK,KAAD;AAAA,SAAWA,KAAK,CAACM,KAAN,CAAYC,KAAZ,CAAkBC,IAA7B;AAAA,CAHa,EA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BG,OAAnB,CAA2B,KAA3B,CAJb,wBAKMC,iBALN,wHASoBb,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBM,KAAnB,CAAyB,GAAzB,CATpB,mLAoBkBf,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBG,OAAnB,CAA2B,KAA3B,CApBlB,+BAqBaZ,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBG,OAAnB,CAA2B,GAA3B,CArBb,0BAuBMC,iBAvBN,wHA2BoBb,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBG,OAAnB,CAA2B,KAA3B,CA3BpB,wCADA;AAAA,CAL4B;;;;"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { describe } from 'react-desc';
|
|
3
|
-
import { propTypes } from './props.js';
|
|
4
3
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
4
|
+
import { propTypes } from './props.js';
|
|
5
|
+
import { useValidateProps } from './config/useValidateProps.js';
|
|
5
6
|
import { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled.js';
|
|
7
|
+
import '@elliemae/ds-props-helpers';
|
|
6
8
|
import 'styled-components';
|
|
7
9
|
import '@elliemae/ds-grid';
|
|
8
10
|
|
|
9
|
-
var ChatCard = function ChatCard(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
var ChatCard = function ChatCard(props) {
|
|
12
|
+
useValidateProps(props, ChatCardWithSchema.toJSON());
|
|
13
|
+
var title = props.title,
|
|
14
|
+
content = props.content,
|
|
15
|
+
time = props.time,
|
|
16
|
+
rightAddon = props.rightAddon;
|
|
14
17
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
15
18
|
cols: ['1fr', 'auto'],
|
|
16
19
|
"data-testid": "chat-card-wrapper"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatCard.js","sources":["../../../../src/parts/chat-card/ChatCard.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { propTypes, CardPropTypes } from './props';\nimport {
|
|
1
|
+
{"version":3,"file":"ChatCard.js","sources":["../../../../src/parts/chat-card/ChatCard.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { propTypes, CardPropTypes } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\n\nconst ChatCard = (props: CardPropTypes): JSX.Element => {\n useValidateProps(props, ChatCardWithSchema.toJSON());\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid=\"chat-card-wrapper\">\n <MainContent>\n <Title data-testid=\"chat-card-title\">{title}</Title>\n <Content data-testid=\"chat-card-content\">\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid=\"chat-card-time\">{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid=\"chat-card-right-addon\">{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes;\n\nexport { ChatCard, ChatCardWithSchema };\n"],"names":["ChatCard","props","useValidateProps","ChatCardWithSchema","toJSON","title","content","time","rightAddon","propTypes","describe"],"mappings":";;;;;;;;;;IAQMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAuC;AACtDC,EAAAA,gBAAgB,CAACD,KAAD,EAAQE,kBAAkB,CAACC,MAAnB,EAAR,CAAhB;AACA,MAAQC,KAAR,GAA6CJ,KAA7C,CAAQI,KAAR;AAAA,MAAeC,OAAf,GAA6CL,KAA7C,CAAeK,OAAf;AAAA,MAAwBC,IAAxB,GAA6CN,KAA7C,CAAwBM,IAAxB;AAAA,MAA8BC,UAA9B,GAA6CP,KAA7C,CAA8BO,UAA9B;AACA,sBACE,oBAAC,OAAD;AAAS,IAAA,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,CAAf;AAAgC,mBAAY;AAA5C,kBACE,oBAAC,WAAD,qBACE,oBAAC,KAAD;AAAO,mBAAY;AAAnB,KAAsCH,KAAtC,CADF,eAEE,oBAAC,OAAD;AAAS,mBAAY;AAArB,kBACE,oBAAC,0BAAD;AAA4B,IAAA,KAAK,EAAEC;AAAnC,IADF,CAFF,EAKGC,IAAI,iBAAI,oBAAC,IAAD;AAAM,mBAAY;AAAlB,KAAoCA,IAApC,CALX,CADF,EAQGC,UAAU,iBAAI,oBAAC,UAAD;AAAY,mBAAY;AAAxB,KAAiDA,UAAjD,CARjB,CADF;AAYD;;AAEDR,QAAQ,CAACS,SAAT,GAAqBA,SAArB;IACMN,kBAAkB,GAAGO,QAAQ,CAACV,QAAD;AACnCG,kBAAkB,CAACM,SAAnB,GAA+BA,SAA/B;;;;"}
|