@elliemae/ds-chat 1.55.1-rc.0 → 1.56.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/parts/chat-sidebar/SideBarChat.js +6 -2
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/cjs/parts/chat-sidebar/props.js +5 -1
- package/cjs/parts/chat-sidebar/props.js.map +1 -1
- package/cjs/parts/tile-button/TileButton.js +32 -33
- package/cjs/parts/tile-button/TileButton.js.map +1 -1
- package/cjs/parts/tile-button/props.js +6 -2
- package/cjs/parts/tile-button/props.js.map +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +6 -2
- package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/esm/parts/chat-sidebar/props.js +5 -1
- package/esm/parts/chat-sidebar/props.js.map +1 -1
- package/esm/parts/tile-button/TileButton.js +32 -32
- package/esm/parts/tile-button/TileButton.js.map +1 -1
- package/esm/parts/tile-button/props.js +6 -2
- package/esm/parts/tile-button/props.js.map +1 -1
- package/package.json +9 -9
|
@@ -57,12 +57,16 @@ var SideBarChat = function SideBarChat(props) {
|
|
|
57
57
|
onFooterClose = props.onFooterClose,
|
|
58
58
|
onFooterExpand = props.onFooterExpand,
|
|
59
59
|
selectedItem = props.selectedItem,
|
|
60
|
-
footerButtonExtraProps = props.footerButtonExtraProps
|
|
60
|
+
footerButtonExtraProps = props.footerButtonExtraProps,
|
|
61
|
+
tooltipPlacement = props.tooltipPlacement,
|
|
62
|
+
enableTooltipWhenIsClosed = props.enableTooltipWhenIsClosed;
|
|
61
63
|
return /*#__PURE__*/React__default['default'].createElement(parts_chatSidebar_styled.StyledSideBarContainer, {
|
|
62
64
|
rows: [1, 'auto']
|
|
63
65
|
}, /*#__PURE__*/React__default['default'].createElement(parts_chatSidebar_styled.StyledSideBarButtonsContainer, null, sidebarItems.map(function (p) {
|
|
64
66
|
return /*#__PURE__*/React__default['default'].createElement(parts_tileButton_TileButton.TileButton, _extends__default['default']({}, p, {
|
|
65
|
-
selected: selectedItem === p.dsId
|
|
67
|
+
selected: selectedItem === p.dsId,
|
|
68
|
+
tooltipPlacement: tooltipPlacement,
|
|
69
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
66
70
|
}));
|
|
67
71
|
})), /*#__PURE__*/React__default['default'].createElement(FooterChat, {
|
|
68
72
|
expanded: expanded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {
|
|
1
|
+
{"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n } = props;\n return (\n <StyledSideBarContainer rows={[1, 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n {...p}\n selected={selectedItem === p.dsId}\n tooltipPlacement={tooltipPlacement}\n disableTooltip={enableTooltipWhenIsClosed ? false : !expanded}\n />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.propTypes = chatSidebarProps;\nSideBarChat.defaultProps = defaultProps;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],"names":["FooterChat","expanded","onFooterClose","onFooterExpand","footerButtonExtraProps","React","SidebarButton","MenuCollapse","MenuExpand","SideBarChat","props","useValidateProps","SideBarChatWithSchema","toJSON","sidebarItems","selectedItem","tooltipPlacement","enableTooltipWhenIsClosed","StyledSideBarContainer","StyledSideBarButtonsContainer","map","p","TileButton","dsId","propTypes","chatSidebarProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,UAAU,GAAG,SAAbA,UAAa;AAAA,MACjBC,QADiB,QACjBA,QADiB;AAAA,MAEjBC,aAFiB,QAEjBA,aAFiB;AAAA,MAGjBC,cAHiB,QAGjBA,cAHiB;AAAA,MAIjBC,sBAJiB,QAIjBA,sBAJiB;AAAA,sBAMjBC,wCAACC,+CAAD;AACE,IAAA,IAAI,EAAC,gBADP;AAEE,IAAA,KAAK,EAAE,IAFT;AAGE,IAAA,IAAI,EAAE,CAACL,QAAD,GAAYM,gCAAZ,GAA2BC,8BAHnC;AAIE,IAAA,OAAO,EAAEP,QAAQ,GAAGC,aAAH,GAAmBC,cAJtC;AAKE,oBAAcF,QALhB;AAME,kBAAYG,sBAAsB,CAAC,YAAD;AANpC,IANiB;AAAA,CAAnB;;IAgBMK,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAA0C;AAC5DC,EAAAA,0DAAgB,CAACD,KAAD,EAAQE,qBAAqB,CAACC,MAAtB,EAAR,CAAhB;AACA,MACEC,YADF,GASIJ,KATJ,CACEI,YADF;AAAA,MAEEb,QAFF,GASIS,KATJ,CAEET,QAFF;AAAA,MAGEC,aAHF,GASIQ,KATJ,CAGER,aAHF;AAAA,MAIEC,cAJF,GASIO,KATJ,CAIEP,cAJF;AAAA,MAKEY,YALF,GASIL,KATJ,CAKEK,YALF;AAAA,MAMEX,sBANF,GASIM,KATJ,CAMEN,sBANF;AAAA,MAOEY,gBAPF,GASIN,KATJ,CAOEM,gBAPF;AAAA,MAQEC,yBARF,GASIP,KATJ,CAQEO,yBARF;AAUA,sBACEZ,wCAACa,+CAAD;AAAwB,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAA9B,kBACEb,wCAACc,sDAAD,QACGL,YAAY,CAACM,GAAb,CAAiB,UAACC,CAAD;AAAA,wBAChBhB,wCAACiB,sCAAD,mCACMD,CADN;AAEE,MAAA,QAAQ,EAAEN,YAAY,KAAKM,CAAC,CAACE,IAF/B;AAGE,MAAA,gBAAgB,EAAEP,gBAHpB;AAIE,MAAA,cAAc,EAAEC,yBAAyB,GAAG,KAAH,GAAW,CAAChB;AAJvD,OADgB;AAAA,GAAjB,CADH,CADF,eAWEI,wCAAC,UAAD;AACE,IAAA,QAAQ,EAAEJ,QADZ;AAEE,IAAA,aAAa,EAAEC,aAFjB;AAGE,IAAA,cAAc,EAAEC,cAHlB;AAIE,IAAA,sBAAsB,EAAEC;AAJ1B,IAXF,CADF;AAoBD;;AAEDK,WAAW,CAACe,SAAZ,GAAwBC,wCAAxB;AACAhB,WAAW,CAACiB,YAAZ,GAA2BA,oCAA3B;IACMd,qBAAqB,GAAGe,kBAAQ,CAAClB,WAAD;AACtCG,qBAAqB,CAACY,SAAtB,GAAkCC,wCAAlC;;;;;"}
|
|
@@ -15,12 +15,16 @@ var defaultProps = {
|
|
|
15
15
|
onHeaderClose: lodash.noop,
|
|
16
16
|
footerButtonExtraProps: {
|
|
17
17
|
'aria-label': 'expand or collapse button'
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
tooltipPlacement: 'right',
|
|
20
|
+
enableTooltipWhenIsClosed: false
|
|
19
21
|
};
|
|
20
22
|
var chatSidebarProps = {
|
|
21
23
|
sidebarItems: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat').defaultValue(defaultProps.sidebarItems),
|
|
22
24
|
expanded: reactDesc.PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
|
|
23
25
|
selectedItem: reactDesc.PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.selectedItem),
|
|
26
|
+
tooltipPlacement: reactDesc.PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
27
|
+
enableTooltipWhenIsClosed: reactDesc.PropTypes.bool.description('Enable tooltip when is closed').defaultValue(defaultProps.onFooterExpand),
|
|
24
28
|
onFooterExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
|
|
25
29
|
onFooterClose: reactDesc.PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
|
|
26
30
|
onHeaderExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps:
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, any>;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n enableTooltipWhenIsClosed: boolean;\n}\n\nexport const defaultProps: CharSidebarProps = {\n expanded: false,\n selectedItem: undefined,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string\n .description('The id of the chat item you want to be opened')\n .defaultValue(defaultProps.selectedItem),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n};\n"],"names":["defaultProps","expanded","selectedItem","undefined","sidebarItems","onFooterExpand","noop","onFooterClose","onHeaderExpand","onHeaderClose","footerButtonExtraProps","tooltipPlacement","enableTooltipWhenIsClosed","chatSidebarProps","PropTypes","arrayOf","object","description","defaultValue","bool","string","oneOf","func"],"mappings":";;;;;;;IA8BaA,YAA8B,GAAG;AAC5CC,EAAAA,QAAQ,EAAE,KADkC;AAE5CC,EAAAA,YAAY,EAAEC,SAF8B;AAG5CC,EAAAA,YAAY,EAAE,EAH8B;AAI5CC,EAAAA,cAAc,EAAEC,WAJ4B;AAK5CC,EAAAA,aAAa,EAAED,WAL6B;AAM5CE,EAAAA,cAAc,EAAEF,WAN4B;AAO5CG,EAAAA,aAAa,EAAEH,WAP6B;AAQ5CI,EAAAA,sBAAsB,EAAE;AAAE,kBAAc;AAAhB,GARoB;AAS5CC,EAAAA,gBAAgB,EAAE,OAT0B;AAU5CC,EAAAA,yBAAyB,EAAE;AAViB;IAajCC,gBAAgB,GAAG;AAC9BT,EAAAA,YAAY,EAAEU,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EACXC,WADW,CACC,yFADD,EAEXC,YAFW,CAEElB,YAAY,CAACI,YAFf,CADgB;AAI9BH,EAAAA,QAAQ,EAAEa,mBAAS,CAACK,IAAV,CACPF,WADO,CACK,gDADL,EAEPC,YAFO,CAEMlB,YAAY,CAACC,QAFnB,CAJoB;AAO9BC,EAAAA,YAAY,EAAEY,mBAAS,CAACM,MAAV,CACXH,WADW,CACC,+CADD,EAEXC,YAFW,CAEElB,YAAY,CAACE,YAFf,CAPgB;AAU9BS,EAAAA,gBAAgB,EAAEG,mBAAS,CAACO,KAAV,CAAgB,CAChC,WADgC,EAEhC,KAFgC,EAGhC,SAHgC,EAIhC,aAJgC,EAKhC,OALgC,EAMhC,WANgC,EAOhC,YAPgC,EAQhC,QARgC,EAShC,cATgC,EAUhC,UAVgC,EAWhC,MAXgC,EAYhC,YAZgC,CAAhB,EAcfJ,WAde,CAcH,+DAdG,EAefC,YAfe,CAeF,SAfE,CAVY;AA0B9BN,EAAAA,yBAAyB,EAAEE,mBAAS,CAACK,IAAV,CACxBF,WADwB,CACZ,+BADY,EAExBC,YAFwB,CAEXlB,YAAY,CAACK,cAFF,CA1BG;AA6B9BA,EAAAA,cAAc,EAAES,mBAAS,CAACQ,IAAV,CACbL,WADa,CACD,6DADC,EAEbC,YAFa,CAEAlB,YAAY,CAACK,cAFb,CA7Bc;AAgC9BE,EAAAA,aAAa,EAAEO,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAEClB,YAAY,CAACO,aAFd,CAhCe;AAmC9BC,EAAAA,cAAc,EAAEM,mBAAS,CAACQ,IAAV,CACbL,WADa,CACD,6DADC,EAEbC,YAFa,CAEAlB,YAAY,CAACQ,cAFb,CAnCc;AAsC9BC,EAAAA,aAAa,EAAEK,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAEClB,YAAY,CAACS,aAFd,CAtCe;AAyC9BC,EAAAA,sBAAsB,EAAEI,mBAAS,CAACE,MAAV,CACrBC,WADqB,CACT,2CADS,EAErBC,YAFqB,CAERlB,YAAY,CAACU,sBAFL;AAzCM;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactDesc = require('react-desc');
|
|
7
|
-
var
|
|
7
|
+
var dsTooltip = require('@elliemae/ds-tooltip');
|
|
8
8
|
var dsGrid = require('@elliemae/ds-grid');
|
|
9
9
|
var CloseXsmall = require('@elliemae/ds-icons/CloseXsmall');
|
|
10
10
|
var parts_tileButton_styled = require('./styled.js');
|
|
@@ -18,7 +18,6 @@ require('@elliemae/ds-props-helpers');
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var DSTooltip__default = /*#__PURE__*/_interopDefaultLegacy(DSTooltip);
|
|
22
21
|
var CloseXsmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseXsmall);
|
|
23
22
|
|
|
24
23
|
var TileButton = function TileButton(props) {
|
|
@@ -38,7 +37,9 @@ var TileButton = function TileButton(props) {
|
|
|
38
37
|
disabled = props.disabled,
|
|
39
38
|
selected = props.selected,
|
|
40
39
|
isHeader = props.isHeader,
|
|
41
|
-
ariaLabel = props.ariaLabel
|
|
40
|
+
ariaLabel = props.ariaLabel,
|
|
41
|
+
tooltipPlacement = props.tooltipPlacement,
|
|
42
|
+
disableTooltip = props.disableTooltip;
|
|
42
43
|
var handleClick = React__default['default'].useCallback(function () {
|
|
43
44
|
onClick(dsId, title);
|
|
44
45
|
}, [dsId, onClick, title]);
|
|
@@ -62,36 +63,34 @@ var TileButton = function TileButton(props) {
|
|
|
62
63
|
justifyContent: "center"
|
|
63
64
|
}, label ? /*#__PURE__*/React__default['default'].createElement(parts_tileButton_styled.StyledTileButtonLabel, null, label) : null) : null);
|
|
64
65
|
}, [isHeader, Icon, badge, badgeColor, badgePosition, label]);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
value: dsId
|
|
94
|
-
}, /*#__PURE__*/React__default['default'].createElement(CloseXsmall__default['default'], null)) : null));
|
|
66
|
+
var Btn = React__default['default'].useMemo(function () {
|
|
67
|
+
return /*#__PURE__*/React__default['default'].createElement(parts_tileButton_styled.StyledTileButton, {
|
|
68
|
+
key: dsId,
|
|
69
|
+
isHeader: isHeader,
|
|
70
|
+
value: dsId,
|
|
71
|
+
"data-testid": "tile-button-".concat(dsId),
|
|
72
|
+
onClick: handleClick,
|
|
73
|
+
onFocus: onFocus,
|
|
74
|
+
onBlur: onBlur,
|
|
75
|
+
disabled: disabled,
|
|
76
|
+
selected: selected,
|
|
77
|
+
badgeColor: badgeColor,
|
|
78
|
+
badgePosition: badgePosition,
|
|
79
|
+
"aria-pressed": selected,
|
|
80
|
+
"aria-label": ariaLabel
|
|
81
|
+
}, /*#__PURE__*/React__default['default'].createElement(parts_tileButton_styled.StyledWrapper, {
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
justifyContent: "center"
|
|
84
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, MainContent), /*#__PURE__*/React__default['default'].createElement(parts_tileButton_styled.StyledWrapperLeftBorder, null), showClose && !disabled ? /*#__PURE__*/React__default['default'].createElement(parts_tileButton_styled.CloseButton, {
|
|
85
|
+
onClick: onClose,
|
|
86
|
+
value: dsId
|
|
87
|
+
}, /*#__PURE__*/React__default['default'].createElement(CloseXsmall__default['default'], null)) : null));
|
|
88
|
+
}, [MainContent, ariaLabel, badgeColor, badgePosition, disabled, dsId, handleClick, isHeader, onBlur, onClose, onFocus, selected, showClose]);
|
|
89
|
+
return title && !disableTooltip ? /*#__PURE__*/React__default['default'].createElement(dsTooltip.DSTooltipV3, {
|
|
90
|
+
id: "ds-chat-tile-tooltip-button-".concat(dsId),
|
|
91
|
+
text: title,
|
|
92
|
+
startPlacementPreference: tooltipPlacement
|
|
93
|
+
}, Btn) : Btn;
|
|
95
94
|
};
|
|
96
95
|
|
|
97
96
|
TileButton.propTypes = parts_tileButton_props.propsTileButton;
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"TileButton.js","sources":["../../../../src/parts/tile-button/TileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { DSTooltipV3 } 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 tooltipPlacement,\n disableTooltip,\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 const Btn = React.useMemo(\n () => (\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 <span>{MainContent}</span>\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n ),\n [\n MainContent,\n ariaLabel,\n badgeColor,\n badgePosition,\n disabled,\n dsId,\n handleClick,\n isHeader,\n onBlur,\n onClose,\n onFocus,\n selected,\n showClose,\n ],\n );\n\n return title && !disableTooltip ? (\n <DSTooltipV3 id={`ds-chat-tile-tooltip-button-${dsId}`} text={title} startPlacementPreference={tooltipPlacement}>\n {Btn}\n </DSTooltipV3>\n ) : (\n Btn\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","tooltipPlacement","disableTooltip","handleClick","React","useCallback","MainContent","useMemo","StyledWrapperCentralContent","undefined","Grid","StyledTileButtonIcon","StyledStatusBadge","StyledTileButtonLabel","Btn","StyledTileButton","StyledWrapper","StyledWrapperLeftBorder","CloseButton","CloseXsmall","DSTooltipV3","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,GAmBIJ,KAnBJ,CACEI,KADF;AAAA,MAEEC,KAFF,GAmBIL,KAnBJ,CAEEK,KAFF;AAAA,MAGEC,IAHF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,QAAd,gBACCO,wCAACc,mCAAD;AAAa,MAAA,OAAO,EAAEzB,OAAtB;AAA+B,MAAA,KAAK,EAAEN;AAAtC,oBACEiB,wCAACe,+BAAD,OADF,CADD,GAIG,IAPN,CAfF,CADF;AAAA,GADU,EA4BV,CACEb,WADF,EAEEN,SAFF,EAGEL,UAHF,EAIEC,aAJF,EAKEC,QALF,EAMEV,IANF,EAOEgB,WAPF,EAQEJ,QARF,EASET,MATF,EAUEG,OAVF,EAWEJ,OAXF,EAYES,QAZF,EAaEN,SAbF,CA5BU,CAAZ;AA6CA,SAAON,KAAK,IAAI,CAACgB,cAAV,gBACLE,wCAACgB,qBAAD;AAAa,IAAA,EAAE,wCAAiCjC,IAAjC,CAAf;AAAwD,IAAA,IAAI,EAAED,KAA9D;AAAqE,IAAA,wBAAwB,EAAEe;AAA/F,KACGa,GADH,CADK,GAKLA,GALF;AAOD;;AAEDlC,UAAU,CAACyC,SAAX,GAAuBC,sCAAvB;AACA1C,UAAU,CAAC2C,YAAX,GAA0BC,wCAA1B;IAEMzC,oBAAoB,GAAG0C,kBAAQ,CAAC7C,UAAD;AACrCG,oBAAoB,CAACsC,SAArB,GAAiCC,sCAAjC;;;;;"}
|
|
@@ -26,7 +26,9 @@ var defaultTileButton = {
|
|
|
26
26
|
disabled: false,
|
|
27
27
|
selected: false,
|
|
28
28
|
isHeader: false,
|
|
29
|
-
ariaLabel: 'Tile button'
|
|
29
|
+
ariaLabel: 'Tile button',
|
|
30
|
+
tooltipPlacement: 'right',
|
|
31
|
+
disableTooltip: false
|
|
30
32
|
};
|
|
31
33
|
var propsTileButton = {
|
|
32
34
|
Icon: reactDesc.PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),
|
|
@@ -44,7 +46,9 @@ var propsTileButton = {
|
|
|
44
46
|
disabled: reactDesc.PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),
|
|
45
47
|
selected: reactDesc.PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),
|
|
46
48
|
isHeader: reactDesc.PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
|
|
47
|
-
ariaLabel: reactDesc.PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel)
|
|
49
|
+
ariaLabel: reactDesc.PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),
|
|
50
|
+
tooltipPlacement: reactDesc.PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
51
|
+
disableTooltip: reactDesc.PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip)
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
exports.defaultTileButton = defaultTileButton;
|
|
@@ -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.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":";;;;;;;;;;;;
|
|
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 tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n disableTooltip: boolean;\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 tooltipPlacement: 'right',\n disableTooltip: false,\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 tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),\n};\n"],"names":["defaultTileButton","Icon","Comments","dsId","undefined","label","onClick","noop","onBlur","onFocus","title","onClose","showClose","badge","badgeColor","badgePosition","disabled","selected","isHeader","ariaLabel","tooltipPlacement","disableTooltip","propsTileButton","PropTypes","func","description","defaultValue","oneOf","string","bool"],"mappings":";;;;;;;;;;;;IAuCaA,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,EA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AACmB,SAApF,CAxBkB;AAyB7BC,EAAAA,gBAAgB,EAAEG,mBAAS,CAACI,KAAV,CAAgB,CAChC,WADgC,EAEhC,KAFgC,EAGhC,SAHgC,EAIhC,aAJgC,EAKhC,OALgC,EAMhC,WANgC,EAOhC,YAPgC,EAQhC,QARgC,EAShC,cATgC,EAUhC,UAVgC,EAWhC,MAXgC,EAYhC,YAZgC,CAAhB,EAcfF,WAde,CAcH,+DAdG,EAefC,YAfe,CAeF,SAfE,CAzBW;AAyC7BL,EAAAA,cAAc,EAAEE,mBAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,wBAA3B,EAAqDC,YAArD,CAAkE1B,iBAAiB,CAACqB,cAApF;AAzCa;;;;;"}
|
|
@@ -46,12 +46,16 @@ var SideBarChat = function SideBarChat(props) {
|
|
|
46
46
|
onFooterClose = props.onFooterClose,
|
|
47
47
|
onFooterExpand = props.onFooterExpand,
|
|
48
48
|
selectedItem = props.selectedItem,
|
|
49
|
-
footerButtonExtraProps = props.footerButtonExtraProps
|
|
49
|
+
footerButtonExtraProps = props.footerButtonExtraProps,
|
|
50
|
+
tooltipPlacement = props.tooltipPlacement,
|
|
51
|
+
enableTooltipWhenIsClosed = props.enableTooltipWhenIsClosed;
|
|
50
52
|
return /*#__PURE__*/React.createElement(StyledSideBarContainer, {
|
|
51
53
|
rows: [1, 'auto']
|
|
52
54
|
}, /*#__PURE__*/React.createElement(StyledSideBarButtonsContainer, null, sidebarItems.map(function (p) {
|
|
53
55
|
return /*#__PURE__*/React.createElement(TileButton, _extends({}, p, {
|
|
54
|
-
selected: selectedItem === p.dsId
|
|
56
|
+
selected: selectedItem === p.dsId,
|
|
57
|
+
tooltipPlacement: tooltipPlacement,
|
|
58
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
55
59
|
}));
|
|
56
60
|
})), /*#__PURE__*/React.createElement(FooterChat, {
|
|
57
61
|
expanded: expanded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {
|
|
1
|
+
{"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n } = props;\n return (\n <StyledSideBarContainer rows={[1, 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n {...p}\n selected={selectedItem === p.dsId}\n tooltipPlacement={tooltipPlacement}\n disableTooltip={enableTooltipWhenIsClosed ? false : !expanded}\n />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.propTypes = chatSidebarProps;\nSideBarChat.defaultProps = defaultProps;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],"names":["FooterChat","expanded","onFooterClose","onFooterExpand","footerButtonExtraProps","MenuCollapse","MenuExpand","SideBarChat","props","useValidateProps","SideBarChatWithSchema","toJSON","sidebarItems","selectedItem","tooltipPlacement","enableTooltipWhenIsClosed","map","p","dsId","propTypes","chatSidebarProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,UAAU,GAAG,SAAbA,UAAa;AAAA,MACjBC,QADiB,QACjBA,QADiB;AAAA,MAEjBC,aAFiB,QAEjBA,aAFiB;AAAA,MAGjBC,cAHiB,QAGjBA,cAHiB;AAAA,MAIjBC,sBAJiB,QAIjBA,sBAJiB;AAAA,sBAMjB,oBAAC,aAAD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C,cAHlB;AAIE,IAAA,sBAAsB,EAAEC;AAJ1B,IAXF,CADF;AAoBD;;AAEDG,WAAW,CAACY,SAAZ,GAAwBC,gBAAxB;AACAb,WAAW,CAACc,YAAZ,GAA2BA,YAA3B;IACMX,qBAAqB,GAAGY,QAAQ,CAACf,WAAD;AACtCG,qBAAqB,CAACS,SAAtB,GAAkCC,gBAAlC;;;;"}
|
|
@@ -11,12 +11,16 @@ var defaultProps = {
|
|
|
11
11
|
onHeaderClose: noop,
|
|
12
12
|
footerButtonExtraProps: {
|
|
13
13
|
'aria-label': 'expand or collapse button'
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
tooltipPlacement: 'right',
|
|
16
|
+
enableTooltipWhenIsClosed: false
|
|
15
17
|
};
|
|
16
18
|
var chatSidebarProps = {
|
|
17
19
|
sidebarItems: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat').defaultValue(defaultProps.sidebarItems),
|
|
18
20
|
expanded: PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
|
|
19
21
|
selectedItem: PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.selectedItem),
|
|
22
|
+
tooltipPlacement: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
23
|
+
enableTooltipWhenIsClosed: PropTypes.bool.description('Enable tooltip when is closed').defaultValue(defaultProps.onFooterExpand),
|
|
20
24
|
onFooterExpand: PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
|
|
21
25
|
onFooterClose: PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
|
|
22
26
|
onHeaderExpand: PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps:
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, any>;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n enableTooltipWhenIsClosed: boolean;\n}\n\nexport const defaultProps: CharSidebarProps = {\n expanded: false,\n selectedItem: undefined,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string\n .description('The id of the chat item you want to be opened')\n .defaultValue(defaultProps.selectedItem),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n};\n"],"names":["defaultProps","expanded","selectedItem","undefined","sidebarItems","onFooterExpand","noop","onFooterClose","onHeaderExpand","onHeaderClose","footerButtonExtraProps","tooltipPlacement","enableTooltipWhenIsClosed","chatSidebarProps","PropTypes","arrayOf","object","description","defaultValue","bool","string","oneOf","func"],"mappings":";;;IA8BaA,YAA8B,GAAG;AAC5CC,EAAAA,QAAQ,EAAE,KADkC;AAE5CC,EAAAA,YAAY,EAAEC,SAF8B;AAG5CC,EAAAA,YAAY,EAAE,EAH8B;AAI5CC,EAAAA,cAAc,EAAEC,IAJ4B;AAK5CC,EAAAA,aAAa,EAAED,IAL6B;AAM5CE,EAAAA,cAAc,EAAEF,IAN4B;AAO5CG,EAAAA,aAAa,EAAEH,IAP6B;AAQ5CI,EAAAA,sBAAsB,EAAE;AAAE,kBAAc;AAAhB,GARoB;AAS5CC,EAAAA,gBAAgB,EAAE,OA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S,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAEClB,YAAY,CAACS,aAFd,CAtCe;AAyC9BC,EAAAA,sBAAsB,EAAEI,SAAS,CAACE,MAAV,CACrBC,WADqB,CACT,2CADS,EAErBC,YAFqB,CAERlB,YAAY,CAACU,sBAFL;AAzCM;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { describe } from 'react-desc';
|
|
3
|
-
import
|
|
3
|
+
import { DSTooltipV3 } from '@elliemae/ds-tooltip';
|
|
4
4
|
import { Grid } from '@elliemae/ds-grid';
|
|
5
5
|
import CloseXsmall from '@elliemae/ds-icons/CloseXsmall';
|
|
6
6
|
import { StyledWrapperCentralContent, StyledTileButtonIcon, StyledStatusBadge, StyledTileButtonLabel, StyledTileButton, StyledWrapper, StyledWrapperLeftBorder, CloseButton } from './styled.js';
|
|
@@ -28,7 +28,9 @@ var TileButton = function TileButton(props) {
|
|
|
28
28
|
disabled = props.disabled,
|
|
29
29
|
selected = props.selected,
|
|
30
30
|
isHeader = props.isHeader,
|
|
31
|
-
ariaLabel = props.ariaLabel
|
|
31
|
+
ariaLabel = props.ariaLabel,
|
|
32
|
+
tooltipPlacement = props.tooltipPlacement,
|
|
33
|
+
disableTooltip = props.disableTooltip;
|
|
32
34
|
var handleClick = React.useCallback(function () {
|
|
33
35
|
onClick(dsId, title);
|
|
34
36
|
}, [dsId, onClick, title]);
|
|
@@ -52,36 +54,34 @@ var TileButton = function TileButton(props) {
|
|
|
52
54
|
justifyContent: "center"
|
|
53
55
|
}, label ? /*#__PURE__*/React.createElement(StyledTileButtonLabel, null, label) : null) : null);
|
|
54
56
|
}, [isHeader, Icon, badge, badgeColor, badgePosition, label]);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
value: dsId
|
|
84
|
-
}, /*#__PURE__*/React.createElement(CloseXsmall, null)) : null));
|
|
57
|
+
var Btn = React.useMemo(function () {
|
|
58
|
+
return /*#__PURE__*/React.createElement(StyledTileButton, {
|
|
59
|
+
key: dsId,
|
|
60
|
+
isHeader: isHeader,
|
|
61
|
+
value: dsId,
|
|
62
|
+
"data-testid": "tile-button-".concat(dsId),
|
|
63
|
+
onClick: handleClick,
|
|
64
|
+
onFocus: onFocus,
|
|
65
|
+
onBlur: onBlur,
|
|
66
|
+
disabled: disabled,
|
|
67
|
+
selected: selected,
|
|
68
|
+
badgeColor: badgeColor,
|
|
69
|
+
badgePosition: badgePosition,
|
|
70
|
+
"aria-pressed": selected,
|
|
71
|
+
"aria-label": ariaLabel
|
|
72
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper, {
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyContent: "center"
|
|
75
|
+
}, /*#__PURE__*/React.createElement("span", null, MainContent), /*#__PURE__*/React.createElement(StyledWrapperLeftBorder, null), showClose && !disabled ? /*#__PURE__*/React.createElement(CloseButton, {
|
|
76
|
+
onClick: onClose,
|
|
77
|
+
value: dsId
|
|
78
|
+
}, /*#__PURE__*/React.createElement(CloseXsmall, null)) : null));
|
|
79
|
+
}, [MainContent, ariaLabel, badgeColor, badgePosition, disabled, dsId, handleClick, isHeader, onBlur, onClose, onFocus, selected, showClose]);
|
|
80
|
+
return title && !disableTooltip ? /*#__PURE__*/React.createElement(DSTooltipV3, {
|
|
81
|
+
id: "ds-chat-tile-tooltip-button-".concat(dsId),
|
|
82
|
+
text: title,
|
|
83
|
+
startPlacementPreference: tooltipPlacement
|
|
84
|
+
}, Btn) : Btn;
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
TileButton.propTypes = propsTileButton;
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"TileButton.js","sources":["../../../../src/parts/tile-button/TileButton.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { DSTooltipV3 } 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 tooltipPlacement,\n disableTooltip,\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 const Btn = React.useMemo(\n () => (\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 <span>{MainContent}</span>\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n ),\n [\n MainContent,\n ariaLabel,\n badgeColor,\n badgePosition,\n disabled,\n dsId,\n handleClick,\n isHeader,\n onBlur,\n onClose,\n onFocus,\n selected,\n showClose,\n ],\n );\n\n return title && !disableTooltip ? (\n <DSTooltipV3 id={`ds-chat-tile-tooltip-button-${dsId}`} text={title} startPlacementPreference={tooltipPlacement}>\n {Btn}\n </DSTooltipV3>\n ) : (\n Btn\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","tooltipPlacement","disableTooltip","handleClick","React","useCallback","MainContent","useMemo","undefined","Btn","propTypes","propsTileButton","defaultProps","defaultTileButton","describe"],"mappings":";;;;;;;;;;;;;IAkBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAyC;AAC1DC,EAAAA,gBAAgB,CAACD,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MAAA,UAAU,EAAC,QAA1B;AAAmC,MAAA,cAAc,EAAC;AAAlD,oBACE,kCAAOM,WAAP,CADF,eAEE,oBAAC,uBAAD,OAFF,EAGGd,SAAS,IAAI,CAACK,QAAd,gBACC,oBAAC,WAAD;AAAa,MAAA,OAAO,EAAEJ,OAAtB;AAA+B,MAAA,KAAK,EAAEN;AAAtC,oBACE,oBAAC,WAAD,OADF,CADD,GAIG,IAPN,CAfF,CADF;AAAA,GADU,EA4BV,CACEmB,WADF,EAEEN,SAFF,EAGEL,UAHF,EAIEC,aAJF,EAKEC,QALF,EAMEV,IANF,EAOEgB,WAPF,EAQEJ,QARF,EASET,MATF,EAUEG,OAVF,EAWEJ,OAXF,EAYES,QAZF,EAaEN,SAbF,CA5BU,CAAZ;AA6CA,SAAON,KAAK,IAAI,CAACgB,cAAV,gBACL,oBAAC,WAAD;AAAa,IAAA,EAAE,wCAAiCf,IAAjC,CAAf;AAAwD,IAAA,IAAI,EAAED,KAA9D;AAAqE,IAAA,wBAAwB,EAAEe;AAA/F,KACGQ,GADH,CADK,GAKLA,GALF;AAOD;;AAED7B,UAAU,CAAC8B,SAAX,GAAuBC,eAAvB;AACA/B,UAAU,CAACgC,YAAX,GAA0BC,iBAA1B;IAEM9B,oBAAoB,GAAG+B,QAAQ,CAAClC,UAAD;AACrCG,oBAAoB,CAAC2B,SAArB,GAAiCC,eAAjC;;;;"}
|
|
@@ -18,7 +18,9 @@ var defaultTileButton = {
|
|
|
18
18
|
disabled: false,
|
|
19
19
|
selected: false,
|
|
20
20
|
isHeader: false,
|
|
21
|
-
ariaLabel: 'Tile button'
|
|
21
|
+
ariaLabel: 'Tile button',
|
|
22
|
+
tooltipPlacement: 'right',
|
|
23
|
+
disableTooltip: false
|
|
22
24
|
};
|
|
23
25
|
var propsTileButton = {
|
|
24
26
|
Icon: PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),
|
|
@@ -36,7 +38,9 @@ var propsTileButton = {
|
|
|
36
38
|
disabled: PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),
|
|
37
39
|
selected: PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),
|
|
38
40
|
isHeader: PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
|
|
39
|
-
ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel)
|
|
41
|
+
ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),
|
|
42
|
+
tooltipPlacement: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
43
|
+
disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip)
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
export { defaultTileButton, propsTileButton };
|
|
@@ -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.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":";;;;
|
|
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 tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n disableTooltip: boolean;\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 tooltipPlacement: 'right',\n disableTooltip: false,\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 tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),\n};\n"],"names":["defaultTileButton","Icon","Comments","dsId","undefined","label","onClick","noop","onBlur","onFocus","title","onClose","showClose","badge","badgeColor","badgePosition","disabled","selected","isHeader","ariaLabel","tooltipPlacement","disableTooltip","propsTileButton","PropTypes","func","description","defaultValue","oneOf","string","bool"],"mappings":";;;;IAuCaA,iBAAkC,GAAG;AAChDC,EAAAA,IAAI,EAAEC,QAD0C;AAEhDC,EAAAA,IAAI,EAAEC,SAF0C;AAGhDC,EAAAA,KAAK,EAAE,EAHyC;AAIhDC,EAAAA,OAAO,EAAEC,IAJuC;AAKhDC,EAAAA,MAAM,EAAED,IALwC;AAMhDE,EAAAA,OAAO,EAAEF,IANuC;AAOhDG,EAAAA,KAAK,EAAE,EAPyC;AAQhDC,EAAAA,OAAO,EAAEJ,IARuC;AAShDK,EAAAA,SAAS,EAAE,KATqC;AAUhDC,EAAAA,KAAK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CAAkE1B,iBAAiB,CAACmB,SAApF,CAxBkB;AAyB7BC,EAAAA,gBAAgB,EAAEG,SAAS,CAACI,KAAV,CAAgB,CAChC,WADgC,EAEhC,KAFgC,EAGhC,SAHgC,EAIhC,aAJgC,EAKhC,OALgC,EAMhC,WANgC,EAOhC,YAPgC,EAQhC,QARgC,EAShC,cATgC,EAUhC,UAVgC,EAWhC,MAXgC,EAYhC,YAZgC,CAAhB,EAcfF,WAde,CAcH,+DAdG,EAefC,YAfe,CAeF,SAfE,CAzBW;AAyC7BL,EAAAA,cAAc,EAAEE,SAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,wBAA3B,EAAqDC,YAArD,CAAkE1B,iBAAiB,CAACqB,cAApF;AAzCa;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.56.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Chat",
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"directory": "dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-banner": "1.
|
|
20
|
-
"@elliemae/ds-basic": "1.
|
|
21
|
-
"@elliemae/ds-button": "1.
|
|
22
|
-
"@elliemae/ds-grid": "1.
|
|
23
|
-
"@elliemae/ds-icons": "1.
|
|
24
|
-
"@elliemae/ds-props-helpers": "1.
|
|
25
|
-
"@elliemae/ds-tooltip": "1.
|
|
26
|
-
"@elliemae/ds-truncated-tooltip-text": "1.
|
|
19
|
+
"@elliemae/ds-banner": "1.56.0",
|
|
20
|
+
"@elliemae/ds-basic": "1.56.0",
|
|
21
|
+
"@elliemae/ds-button": "1.56.0",
|
|
22
|
+
"@elliemae/ds-grid": "1.56.0",
|
|
23
|
+
"@elliemae/ds-icons": "1.56.0",
|
|
24
|
+
"@elliemae/ds-props-helpers": "1.56.0",
|
|
25
|
+
"@elliemae/ds-tooltip": "1.56.0",
|
|
26
|
+
"@elliemae/ds-truncated-tooltip-text": "1.56.0",
|
|
27
27
|
"prop-types": "~15.7.2",
|
|
28
28
|
"react-desc": "^4.1.2",
|
|
29
29
|
"react-virtual": "^2.3.2"
|