@elliemae/ds-chat-sidebar 3.6.0-next.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/dist/cjs/SideBarChat.js +104 -0
- package/dist/cjs/SideBarChat.js.map +7 -0
- package/dist/cjs/index.js +33 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +78 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/sidebar-button/SidebarButton.js +60 -0
- package/dist/cjs/sidebar-button/SidebarButton.js.map +7 -0
- package/dist/cjs/sidebar-button/index.js +21 -0
- package/dist/cjs/sidebar-button/index.js.map +7 -0
- package/dist/cjs/sidebar-button/props.js +49 -0
- package/dist/cjs/sidebar-button/props.js.map +7 -0
- package/dist/cjs/sidebar-button/styled.js +67 -0
- package/dist/cjs/sidebar-button/styled.js.map +7 -0
- package/dist/cjs/styled.js +55 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/SideBarChat.js +78 -0
- package/dist/esm/SideBarChat.js.map +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +52 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/sidebar-button/SidebarButton.js +34 -0
- package/dist/esm/sidebar-button/SidebarButton.js.map +7 -0
- package/dist/esm/sidebar-button/index.js +2 -0
- package/dist/esm/sidebar-button/index.js.map +7 -0
- package/dist/esm/sidebar-button/props.js +23 -0
- package/dist/esm/sidebar-button/props.js.map +7 -0
- package/dist/esm/sidebar-button/styled.js +41 -0
- package/dist/esm/sidebar-button/styled.js.map +7 -0
- package/dist/esm/styled.js +29 -0
- package/dist/esm/styled.js.map +7 -0
- package/package.json +94 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var SideBarChat_exports = {};
|
|
26
|
+
__export(SideBarChat_exports, {
|
|
27
|
+
SideBarChat: () => SideBarChat,
|
|
28
|
+
SideBarChatWithSchema: () => SideBarChatWithSchema
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(SideBarChat_exports);
|
|
31
|
+
var React = __toESM(require("react"));
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
35
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
|
+
var import_ds_chat_tile = require("@elliemae/ds-chat-tile");
|
|
37
|
+
var import_styled = require("./styled");
|
|
38
|
+
var import_SidebarButton = require("./sidebar-button/SidebarButton");
|
|
39
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
40
|
+
const FooterChat = ({
|
|
41
|
+
expanded,
|
|
42
|
+
onFooterClose,
|
|
43
|
+
onFooterExpand,
|
|
44
|
+
footerButtonExtraProps
|
|
45
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SidebarButton.SidebarButton, {
|
|
46
|
+
dsId: "sidebar_footer",
|
|
47
|
+
Icon: !expanded ? import_ds_icons.MenuCollapse : import_ds_icons.MenuExpand,
|
|
48
|
+
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
49
|
+
"aria-pressed": expanded,
|
|
50
|
+
"aria-label": footerButtonExtraProps["aria-label"]
|
|
51
|
+
});
|
|
52
|
+
const SideBarChat = (props) => {
|
|
53
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
54
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.chatSidebarProps);
|
|
55
|
+
const {
|
|
56
|
+
sidebarItems,
|
|
57
|
+
expanded,
|
|
58
|
+
onFooterClose,
|
|
59
|
+
onFooterExpand,
|
|
60
|
+
selectedItem,
|
|
61
|
+
footerButtonExtraProps,
|
|
62
|
+
tooltipPlacement,
|
|
63
|
+
enableTooltipWhenIsClosed,
|
|
64
|
+
actionRef
|
|
65
|
+
} = propsWithDefault;
|
|
66
|
+
const { current: listRef } = import_react.default.useRef({});
|
|
67
|
+
const registerReference = import_react.default.useCallback(
|
|
68
|
+
(ref) => {
|
|
69
|
+
if (ref?.dataset?.key)
|
|
70
|
+
listRef[ref.dataset.key] = ref;
|
|
71
|
+
},
|
|
72
|
+
[listRef]
|
|
73
|
+
);
|
|
74
|
+
import_react.default.useEffect(() => {
|
|
75
|
+
if (actionRef?.current?.listRef) {
|
|
76
|
+
actionRef.current.listRef = listRef;
|
|
77
|
+
}
|
|
78
|
+
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSideBarContainer, {
|
|
80
|
+
rows: ["1fr", "auto"],
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSideBarButtonsContainer, {
|
|
83
|
+
children: sidebarItems.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_chat_tile.TileButton, {
|
|
84
|
+
innerRef: registerReference,
|
|
85
|
+
...p,
|
|
86
|
+
selected: selectedItem === p.dsId,
|
|
87
|
+
tooltipPlacement,
|
|
88
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
89
|
+
}, p.dsId))
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FooterChat, {
|
|
92
|
+
expanded,
|
|
93
|
+
onFooterClose,
|
|
94
|
+
onFooterExpand,
|
|
95
|
+
footerButtonExtraProps
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
SideBarChat.propTypes = import_react_desc_prop_types.chatSidebarProps;
|
|
101
|
+
SideBarChat.displayName = "SideBarChat";
|
|
102
|
+
const SideBarChatWithSchema = (0, import_ds_utilities.describe)(SideBarChat);
|
|
103
|
+
SideBarChatWithSchema.propTypes = import_react_desc_prop_types.chatSidebarProps;
|
|
104
|
+
//# sourceMappingURL=SideBarChat.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/SideBarChat.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport { DSChatSidebarT, defaultProps, chatSidebarProps } from './react-desc-prop-types';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\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: React.ComponentType<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);\n\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = propsWithDefault;\n const { current: listRef } = React.useRef<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) listRef[ref.dataset.key] = ref;\n },\n [listRef],\n );\n React.useEffect(() => {\n if (actionRef?.current?.listRef) {\n actionRef.current.listRef = listRef;\n }\n }, [sidebarItems, expanded, actionRef, listRef]);\n\n return (\n <StyledSideBarContainer rows={['1fr', 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\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 as WeakValidationMap<unknown>;\nSideBarChat.displayName = 'SideBarChat';\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAyC;AACzC,0BAAuF;AACvF,sBAAyC;AACzC,0BAA2B;AAC3B,oBAAsE;AACtE,2BAA8B;AAC9B,mCAA+D;AAE/D,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,4CAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,+BAAe;AAAA,EACjC,SAAS,WAAW,gBAAgB;AAAA,EACpC,gBAAc;AAAA,EACd,cAAY,uBAAuB;AAAA,CACrC;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,kDAAmD,OAAO,yCAAY;AAC/F,0DAA+B,kBAAkB,6CAAgB;AAEjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,SAAS,QAAQ,IAAI,aAAAA,QAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoB,aAAAA,QAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS;AAAK,gBAAQ,IAAI,QAAQ,OAAO;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,6CAAC;AAAA,IAAuB,MAAM,CAAC,OAAO,MAAM;AAAA,IAC1C;AAAA,kDAAC;AAAA,QACE,uBAAa,IAAI,CAAC,MACjB,4CAAC;AAAA,UAEC,UAAU;AAAA,UACT,GAAG;AAAA,UACJ,UAAU,iBAAiB,EAAE;AAAA,UAC7B;AAAA,UACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA,WALhD,EAAE,IAMT,CACD;AAAA,OACH;AAAA,MACA,4CAAC;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,8BAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var src_exports = {};
|
|
26
|
+
__export(src_exports, {
|
|
27
|
+
SideBarChat: () => import_SideBarChat.SideBarChat,
|
|
28
|
+
SideBarChatWithSchema: () => import_SideBarChat.SideBarChatWithSchema
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(src_exports);
|
|
31
|
+
var React = __toESM(require("react"));
|
|
32
|
+
var import_SideBarChat = require("./SideBarChat");
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { SideBarChat, SideBarChatWithSchema } from './SideBarChat';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAmD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var react_desc_prop_types_exports = {};
|
|
26
|
+
__export(react_desc_prop_types_exports, {
|
|
27
|
+
chatSidebarProps: () => chatSidebarProps,
|
|
28
|
+
defaultProps: () => defaultProps
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
31
|
+
var React = __toESM(require("react"));
|
|
32
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
|
+
var import_lodash = require("lodash");
|
|
34
|
+
const defaultProps = {
|
|
35
|
+
expanded: false,
|
|
36
|
+
selectedItem: void 0,
|
|
37
|
+
sidebarItems: [],
|
|
38
|
+
onFooterExpand: import_lodash.noop,
|
|
39
|
+
onFooterClose: import_lodash.noop,
|
|
40
|
+
onHeaderExpand: import_lodash.noop,
|
|
41
|
+
onHeaderClose: import_lodash.noop,
|
|
42
|
+
footerButtonExtraProps: { "aria-label": "expand or collapse button" },
|
|
43
|
+
tooltipPlacement: "right",
|
|
44
|
+
enableTooltipWhenIsClosed: false
|
|
45
|
+
};
|
|
46
|
+
const chatSidebarProps = {
|
|
47
|
+
sidebarItems: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.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),
|
|
48
|
+
expanded: import_ds_utilities.PropTypes.bool.description("Whether to show the chat expanded or collapsed").defaultValue(defaultProps.expanded),
|
|
49
|
+
selectedItem: import_ds_utilities.PropTypes.string.description("The id of the chat item you want to be opened").defaultValue(defaultProps.selectedItem),
|
|
50
|
+
tooltipPlacement: import_ds_utilities.PropTypes.oneOf([
|
|
51
|
+
"top-start",
|
|
52
|
+
"top",
|
|
53
|
+
"top-end",
|
|
54
|
+
"right-start",
|
|
55
|
+
"right",
|
|
56
|
+
"right-end",
|
|
57
|
+
"bottom-end",
|
|
58
|
+
"bottom",
|
|
59
|
+
"bottom-start",
|
|
60
|
+
"left-end",
|
|
61
|
+
"left",
|
|
62
|
+
"left-start"
|
|
63
|
+
]).description("start placement preferences, as per popperjs placement option").defaultValue("'right'"),
|
|
64
|
+
enableTooltipWhenIsClosed: import_ds_utilities.PropTypes.bool.description("Enable tooltip when is closed").defaultValue(defaultProps.onFooterExpand),
|
|
65
|
+
onFooterExpand: import_ds_utilities.PropTypes.func.description("The function to call when the chat is opened via the footer").defaultValue(defaultProps.onFooterExpand),
|
|
66
|
+
onFooterClose: import_ds_utilities.PropTypes.func.description("The function to call when the chat is closed via the footer").defaultValue(defaultProps.onFooterClose),
|
|
67
|
+
onHeaderExpand: import_ds_utilities.PropTypes.func.description("The function to call when the chat is opened via the header").defaultValue(defaultProps.onHeaderExpand),
|
|
68
|
+
onHeaderClose: import_ds_utilities.PropTypes.func.description("The function to call when the chat is closed via the header").defaultValue(defaultProps.onHeaderClose),
|
|
69
|
+
footerButtonExtraProps: import_ds_utilities.PropTypes.object.description("Expand/collapse footer button extra props").defaultValue(defaultProps.footerButtonExtraProps),
|
|
70
|
+
actionRef: import_ds_utilities.PropTypes.object.description(
|
|
71
|
+
`Action ref for sidebar
|
|
72
|
+
{
|
|
73
|
+
listRef: references to Tiles
|
|
74
|
+
}
|
|
75
|
+
`
|
|
76
|
+
)
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, 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 enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\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 actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA0B;AAC1B,oBAAqB;AAqCd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc;AAAA,EACd,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,8BAAU,QAAQ,8BAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,8BAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,8BAAU,OACrB,YAAY,+CAA+C,EAC3D,aAAa,aAAa,YAAY;AAAA,EACzC,kBAAkB,8BAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,8BAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,8BAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,8BAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,8BAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,8BAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,8BAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,8BAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var SidebarButton_exports = {};
|
|
26
|
+
__export(SidebarButton_exports, {
|
|
27
|
+
SidebarButton: () => SidebarButton
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(SidebarButton_exports);
|
|
30
|
+
var React = __toESM(require("react"));
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_react = __toESM(require("react"));
|
|
33
|
+
var import_styled = require("./styled");
|
|
34
|
+
var import_props = require("./props");
|
|
35
|
+
const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
36
|
+
const handleClick = import_react.default.useCallback(() => {
|
|
37
|
+
if (dsId)
|
|
38
|
+
onClick(dsId);
|
|
39
|
+
}, [onClick, dsId]);
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSidebarButton, {
|
|
41
|
+
"data-testid": `sidebar-button-${dsId}`,
|
|
42
|
+
onClick: handleClick,
|
|
43
|
+
...rest,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSidebarButtonIcon, {
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
justifyContent: "center",
|
|
48
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
|
|
49
|
+
size: "m"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSidebarButtonLabel, {
|
|
53
|
+
children: label
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}, dsId);
|
|
57
|
+
};
|
|
58
|
+
SidebarButton.propTypes = import_props.propsSidebarButton;
|
|
59
|
+
SidebarButton.defaultProps = import_props.defaultSidebarButton;
|
|
60
|
+
//# sourceMappingURL=SidebarButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/sidebar-button/SidebarButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAkB;AAClB,oBAAuF;AACvF,mBAA6E;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,6CAAC;AAAA,IAA+B,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,IAC/F;AAAA,kDAAC;AAAA,QAAwB,YAAW;AAAA,QAAS,gBAAe;AAAA,QAC1D,sDAAC;AAAA,UAAK,MAAK;AAAA,SAAI;AAAA,OACjB;AAAA,MACC,SAAS,4CAAC;AAAA,QAA0B;AAAA,OAAM;AAAA;AAAA,KAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
|
+
mod
|
|
19
|
+
));
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var props_exports = {};
|
|
26
|
+
__export(props_exports, {
|
|
27
|
+
defaultSidebarButton: () => defaultSidebarButton,
|
|
28
|
+
propsSidebarButton: () => propsSidebarButton
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(props_exports);
|
|
31
|
+
var React = __toESM(require("react"));
|
|
32
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
|
+
var import_lodash = require("lodash");
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
|
+
const defaultSidebarButton = {
|
|
36
|
+
Icon: import_ds_icons.Comments,
|
|
37
|
+
dsId: "",
|
|
38
|
+
label: "",
|
|
39
|
+
onClick: import_lodash.noop,
|
|
40
|
+
title: ""
|
|
41
|
+
};
|
|
42
|
+
const propsSidebarButton = {
|
|
43
|
+
Icon: import_ds_utilities.PropTypes.element.description("Icon component").defaultValue(defaultSidebarButton.Icon),
|
|
44
|
+
dsId: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("Unique id for the button").defaultValue(defaultSidebarButton.dsId),
|
|
45
|
+
label: import_ds_utilities.PropTypes.string.description("It will display under the icon").defaultValue(defaultSidebarButton.label),
|
|
46
|
+
title: import_ds_utilities.PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
|
|
47
|
+
onClick: import_ds_utilities.PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/sidebar-button/props.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA0B;AAC1B,oBAAqB;AACrB,sBAAyB;AAUlB,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,8BAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,MAAM,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,8BAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,8BAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,8BAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAC9C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var styled_exports = {};
|
|
26
|
+
__export(styled_exports, {
|
|
27
|
+
StyledSidebarButton: () => StyledSidebarButton,
|
|
28
|
+
StyledSidebarButtonIcon: () => StyledSidebarButtonIcon,
|
|
29
|
+
StyledSidebarButtonLabel: () => StyledSidebarButtonLabel
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(styled_exports);
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
34
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
35
|
+
const MIN_WIDTH_SIDEBAR = 48;
|
|
36
|
+
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
37
|
+
const StyledSidebarButton = import_ds_system.styled.button`
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
outline: none;
|
|
42
|
+
height: ${BUTTON_SIDEBAR_HEIGHT}px;
|
|
43
|
+
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
44
|
+
position: relative;
|
|
45
|
+
border: 0;
|
|
46
|
+
background: transparent;
|
|
47
|
+
&:focus,
|
|
48
|
+
&:hover {
|
|
49
|
+
background: ${(props) => props.theme.colors.neutral["080"]};
|
|
50
|
+
}
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.neutral["200"]};
|
|
53
|
+
|
|
54
|
+
svg {
|
|
55
|
+
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
const StyledSidebarButtonIcon = (0, import_ds_system.styled)(import_ds_grid.Grid)`
|
|
59
|
+
position: relative;
|
|
60
|
+
`;
|
|
61
|
+
const StyledSidebarButtonLabel = import_ds_system.styled.div`
|
|
62
|
+
width: 30px;
|
|
63
|
+
text-transform: uppercase;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-align: center;
|
|
66
|
+
`;
|
|
67
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/sidebar-button/styled.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Buttons\nexport const StyledSidebarButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n outline: none;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n border: 0;\n background: transparent;\n &:focus,\n &:hover {\n background: ${(props) => props.theme.colors.neutral['080']};\n }\n cursor: pointer;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledSidebarButtonIcon = styled(Grid)`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled.div`\n width: 30px;\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,6BAG3B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,YAGvD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3C,MAAM,8BAA0B,yBAAO,mBAAI;AAAA;AAAA;AAI3C,MAAM,2BAA2B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var styled_exports = {};
|
|
26
|
+
__export(styled_exports, {
|
|
27
|
+
StyledSideBarButtonsContainer: () => StyledSideBarButtonsContainer,
|
|
28
|
+
StyledSideBarContainer: () => StyledSideBarContainer
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(styled_exports);
|
|
31
|
+
var React = __toESM(require("react"));
|
|
32
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
33
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
34
|
+
const MIN_WIDTH_SIDEBAR = 48;
|
|
35
|
+
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
36
|
+
const StyledSideBarContainer = (0, import_ds_system.styled)(import_ds_grid.Grid)`
|
|
37
|
+
height: 100%;
|
|
38
|
+
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
39
|
+
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
40
|
+
border-right: 1px solid ${(props) => props.theme.colors.neutral["100"]};
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
`;
|
|
43
|
+
const StyledSideBarButtonsContainer = (0, import_ds_system.styled)(import_ds_grid.Grid)`
|
|
44
|
+
overflow-y: auto;
|
|
45
|
+
align-items: flex-start;
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);
|
|
48
|
+
overflow-x: hidden;
|
|
49
|
+
|
|
50
|
+
scrollbar-width: thin;
|
|
51
|
+
&::-webkit-scrollbar {
|
|
52
|
+
width: 6px;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styled.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,6BAAyB,yBAAO,mBAAI;AAAA;AAAA,WAEtC;AAAA,gBACK,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,4BAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3D,MAAM,oCAAgC,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,0CAId;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React2 from "react";
|
|
4
|
+
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
5
|
+
import { MenuCollapse, MenuExpand } from "@elliemae/ds-icons";
|
|
6
|
+
import { TileButton } from "@elliemae/ds-chat-tile";
|
|
7
|
+
import { StyledSideBarContainer, StyledSideBarButtonsContainer } from "./styled";
|
|
8
|
+
import { SidebarButton } from "./sidebar-button/SidebarButton";
|
|
9
|
+
import { defaultProps, chatSidebarProps } from "./react-desc-prop-types";
|
|
10
|
+
const FooterChat = ({
|
|
11
|
+
expanded,
|
|
12
|
+
onFooterClose,
|
|
13
|
+
onFooterExpand,
|
|
14
|
+
footerButtonExtraProps
|
|
15
|
+
}) => /* @__PURE__ */ jsx(SidebarButton, {
|
|
16
|
+
dsId: "sidebar_footer",
|
|
17
|
+
Icon: !expanded ? MenuCollapse : MenuExpand,
|
|
18
|
+
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
19
|
+
"aria-pressed": expanded,
|
|
20
|
+
"aria-label": footerButtonExtraProps["aria-label"]
|
|
21
|
+
});
|
|
22
|
+
const SideBarChat = (props) => {
|
|
23
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
24
|
+
useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);
|
|
25
|
+
const {
|
|
26
|
+
sidebarItems,
|
|
27
|
+
expanded,
|
|
28
|
+
onFooterClose,
|
|
29
|
+
onFooterExpand,
|
|
30
|
+
selectedItem,
|
|
31
|
+
footerButtonExtraProps,
|
|
32
|
+
tooltipPlacement,
|
|
33
|
+
enableTooltipWhenIsClosed,
|
|
34
|
+
actionRef
|
|
35
|
+
} = propsWithDefault;
|
|
36
|
+
const { current: listRef } = React2.useRef({});
|
|
37
|
+
const registerReference = React2.useCallback(
|
|
38
|
+
(ref) => {
|
|
39
|
+
if (ref?.dataset?.key)
|
|
40
|
+
listRef[ref.dataset.key] = ref;
|
|
41
|
+
},
|
|
42
|
+
[listRef]
|
|
43
|
+
);
|
|
44
|
+
React2.useEffect(() => {
|
|
45
|
+
if (actionRef?.current?.listRef) {
|
|
46
|
+
actionRef.current.listRef = listRef;
|
|
47
|
+
}
|
|
48
|
+
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
49
|
+
return /* @__PURE__ */ jsxs(StyledSideBarContainer, {
|
|
50
|
+
rows: ["1fr", "auto"],
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx(StyledSideBarButtonsContainer, {
|
|
53
|
+
children: sidebarItems.map((p) => /* @__PURE__ */ jsx(TileButton, {
|
|
54
|
+
innerRef: registerReference,
|
|
55
|
+
...p,
|
|
56
|
+
selected: selectedItem === p.dsId,
|
|
57
|
+
tooltipPlacement,
|
|
58
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
59
|
+
}, p.dsId))
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx(FooterChat, {
|
|
62
|
+
expanded,
|
|
63
|
+
onFooterClose,
|
|
64
|
+
onFooterExpand,
|
|
65
|
+
footerButtonExtraProps
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
SideBarChat.propTypes = chatSidebarProps;
|
|
71
|
+
SideBarChat.displayName = "SideBarChat";
|
|
72
|
+
const SideBarChatWithSchema = describe(SideBarChat);
|
|
73
|
+
SideBarChatWithSchema.propTypes = chatSidebarProps;
|
|
74
|
+
export {
|
|
75
|
+
SideBarChat,
|
|
76
|
+
SideBarChatWithSchema
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=SideBarChat.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/SideBarChat.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport { DSChatSidebarT, defaultProps, chatSidebarProps } from './react-desc-prop-types';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\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: React.ComponentType<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);\n\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = propsWithDefault;\n const { current: listRef } = React.useRef<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) listRef[ref.dataset.key] = ref;\n },\n [listRef],\n );\n React.useEffect(() => {\n if (actionRef?.current?.listRef) {\n actionRef.current.listRef = listRef;\n }\n }, [sidebarItems, expanded, actionRef, listRef]);\n\n return (\n <StyledSideBarContainer rows={['1fr', 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\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 as WeakValidationMap<unknown>;\nSideBarChat.displayName = 'SideBarChat';\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAC9B,SAAyB,cAAc,wBAAwB;AAE/D,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,eAAe;AAAA,EACjC,SAAS,WAAW,gBAAgB;AAAA,EACpC,gBAAc;AAAA,EACd,cAAY,uBAAuB;AAAA,CACrC;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAAmD,OAAO,YAAY;AAC/F,iCAA+B,kBAAkB,gBAAgB;AAEjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,SAAS,QAAQ,IAAIA,OAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS;AAAK,gBAAQ,IAAI,QAAQ,OAAO;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,qBAAC;AAAA,IAAuB,MAAM,CAAC,OAAO,MAAM;AAAA,IAC1C;AAAA,0BAAC;AAAA,QACE,uBAAa,IAAI,CAAC,MACjB,oBAAC;AAAA,UAEC,UAAU;AAAA,UACT,GAAG;AAAA,UACJ,UAAU,iBAAiB,EAAE;AAAA,UAC7B;AAAA,UACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA,WALhD,EAAE,IAMT,CACD;AAAA,OACH;AAAA,MACA,oBAAC;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { SideBarChat, SideBarChatWithSchema } from './SideBarChat';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,6BAA6B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
import { noop } from "lodash";
|
|
4
|
+
const defaultProps = {
|
|
5
|
+
expanded: false,
|
|
6
|
+
selectedItem: void 0,
|
|
7
|
+
sidebarItems: [],
|
|
8
|
+
onFooterExpand: noop,
|
|
9
|
+
onFooterClose: noop,
|
|
10
|
+
onHeaderExpand: noop,
|
|
11
|
+
onHeaderClose: noop,
|
|
12
|
+
footerButtonExtraProps: { "aria-label": "expand or collapse button" },
|
|
13
|
+
tooltipPlacement: "right",
|
|
14
|
+
enableTooltipWhenIsClosed: false
|
|
15
|
+
};
|
|
16
|
+
const chatSidebarProps = {
|
|
17
|
+
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
|
+
expanded: PropTypes.bool.description("Whether to show the chat expanded or collapsed").defaultValue(defaultProps.expanded),
|
|
19
|
+
selectedItem: PropTypes.string.description("The id of the chat item you want to be opened").defaultValue(defaultProps.selectedItem),
|
|
20
|
+
tooltipPlacement: PropTypes.oneOf([
|
|
21
|
+
"top-start",
|
|
22
|
+
"top",
|
|
23
|
+
"top-end",
|
|
24
|
+
"right-start",
|
|
25
|
+
"right",
|
|
26
|
+
"right-end",
|
|
27
|
+
"bottom-end",
|
|
28
|
+
"bottom",
|
|
29
|
+
"bottom-start",
|
|
30
|
+
"left-end",
|
|
31
|
+
"left",
|
|
32
|
+
"left-start"
|
|
33
|
+
]).description("start placement preferences, as per popperjs placement option").defaultValue("'right'"),
|
|
34
|
+
enableTooltipWhenIsClosed: PropTypes.bool.description("Enable tooltip when is closed").defaultValue(defaultProps.onFooterExpand),
|
|
35
|
+
onFooterExpand: PropTypes.func.description("The function to call when the chat is opened via the footer").defaultValue(defaultProps.onFooterExpand),
|
|
36
|
+
onFooterClose: PropTypes.func.description("The function to call when the chat is closed via the footer").defaultValue(defaultProps.onFooterClose),
|
|
37
|
+
onHeaderExpand: PropTypes.func.description("The function to call when the chat is opened via the header").defaultValue(defaultProps.onHeaderExpand),
|
|
38
|
+
onHeaderClose: PropTypes.func.description("The function to call when the chat is closed via the header").defaultValue(defaultProps.onHeaderClose),
|
|
39
|
+
footerButtonExtraProps: PropTypes.object.description("Expand/collapse footer button extra props").defaultValue(defaultProps.footerButtonExtraProps),
|
|
40
|
+
actionRef: PropTypes.object.description(
|
|
41
|
+
`Action ref for sidebar
|
|
42
|
+
{
|
|
43
|
+
listRef: references to Tiles
|
|
44
|
+
}
|
|
45
|
+
`
|
|
46
|
+
)
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
chatSidebarProps,
|
|
50
|
+
defaultProps
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, 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 enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\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 actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAqCd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc;AAAA,EACd,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,UAAU,QAAQ,UAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,UAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,UAAU,OACrB,YAAY,+CAA+C,EAC3D,aAAa,aAAa,YAAY;AAAA,EACzC,kBAAkB,UAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,UAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,UAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,UAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React2 from "react";
|
|
4
|
+
import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled";
|
|
5
|
+
import { propsSidebarButton, defaultSidebarButton } from "./props";
|
|
6
|
+
const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
7
|
+
const handleClick = React2.useCallback(() => {
|
|
8
|
+
if (dsId)
|
|
9
|
+
onClick(dsId);
|
|
10
|
+
}, [onClick, dsId]);
|
|
11
|
+
return /* @__PURE__ */ jsxs(StyledSidebarButton, {
|
|
12
|
+
"data-testid": `sidebar-button-${dsId}`,
|
|
13
|
+
onClick: handleClick,
|
|
14
|
+
...rest,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(StyledSidebarButtonIcon, {
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
20
|
+
size: "m"
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
label && /* @__PURE__ */ jsx(StyledSidebarButtonLabel, {
|
|
24
|
+
children: label
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}, dsId);
|
|
28
|
+
};
|
|
29
|
+
SidebarButton.propTypes = propsSidebarButton;
|
|
30
|
+
SidebarButton.defaultProps = defaultSidebarButton;
|
|
31
|
+
export {
|
|
32
|
+
SidebarButton
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SidebarButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/SidebarButton.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AACvF,SAAS,oBAAoB,4BAAgD;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC;AAAA,IAA+B,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,IAC/F;AAAA,0BAAC;AAAA,QAAwB,YAAW;AAAA,QAAS,gBAAe;AAAA,QAC1D,8BAAC;AAAA,UAAK,MAAK;AAAA,SAAI;AAAA,OACjB;AAAA,MACC,SAAS,oBAAC;AAAA,QAA0B;AAAA,OAAM;AAAA;AAAA,KAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
import { noop } from "lodash";
|
|
4
|
+
import { Comments } from "@elliemae/ds-icons";
|
|
5
|
+
const defaultSidebarButton = {
|
|
6
|
+
Icon: Comments,
|
|
7
|
+
dsId: "",
|
|
8
|
+
label: "",
|
|
9
|
+
onClick: noop,
|
|
10
|
+
title: ""
|
|
11
|
+
};
|
|
12
|
+
const propsSidebarButton = {
|
|
13
|
+
Icon: PropTypes.element.description("Icon component").defaultValue(defaultSidebarButton.Icon),
|
|
14
|
+
dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Unique id for the button").defaultValue(defaultSidebarButton.dsId),
|
|
15
|
+
label: PropTypes.string.description("It will display under the icon").defaultValue(defaultSidebarButton.label),
|
|
16
|
+
title: PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
|
|
17
|
+
onClick: PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
defaultSidebarButton,
|
|
21
|
+
propsSidebarButton
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAUlB,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,UAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,UAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,UAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAC9C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
const MIN_WIDTH_SIDEBAR = 48;
|
|
5
|
+
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
6
|
+
const StyledSidebarButton = styled.button`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
outline: none;
|
|
11
|
+
height: ${BUTTON_SIDEBAR_HEIGHT}px;
|
|
12
|
+
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
13
|
+
position: relative;
|
|
14
|
+
border: 0;
|
|
15
|
+
background: transparent;
|
|
16
|
+
&:focus,
|
|
17
|
+
&:hover {
|
|
18
|
+
background: ${(props) => props.theme.colors.neutral["080"]};
|
|
19
|
+
}
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.neutral["200"]};
|
|
22
|
+
|
|
23
|
+
svg {
|
|
24
|
+
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const StyledSidebarButtonIcon = styled(Grid)`
|
|
28
|
+
position: relative;
|
|
29
|
+
`;
|
|
30
|
+
const StyledSidebarButtonLabel = styled.div`
|
|
31
|
+
width: 30px;
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-align: center;
|
|
35
|
+
`;
|
|
36
|
+
export {
|
|
37
|
+
StyledSidebarButton,
|
|
38
|
+
StyledSidebarButtonIcon,
|
|
39
|
+
StyledSidebarButtonLabel
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/styled.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Buttons\nexport const StyledSidebarButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n outline: none;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n border: 0;\n background: transparent;\n &:focus,\n &:hover {\n background: ${(props) => props.theme.colors.neutral['080']};\n }\n cursor: pointer;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledSidebarButtonIcon = styled(Grid)`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled.div`\n width: 30px;\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,6BAG3B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,YAGvD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3C,MAAM,0BAA0B,OAAO,IAAI;AAAA;AAAA;AAI3C,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
const MIN_WIDTH_SIDEBAR = 48;
|
|
5
|
+
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
6
|
+
const StyledSideBarContainer = styled(Grid)`
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
9
|
+
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
10
|
+
border-right: 1px solid ${(props) => props.theme.colors.neutral["100"]};
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
`;
|
|
13
|
+
const StyledSideBarButtonsContainer = styled(Grid)`
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);
|
|
18
|
+
overflow-x: hidden;
|
|
19
|
+
|
|
20
|
+
scrollbar-width: thin;
|
|
21
|
+
&::-webkit-scrollbar {
|
|
22
|
+
width: 6px;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
export {
|
|
26
|
+
StyledSideBarButtonsContainer,
|
|
27
|
+
StyledSideBarContainer
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,yBAAyB,OAAO,IAAI;AAAA;AAAA,WAEtC;AAAA,gBACK,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,4BAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3D,MAAM,gCAAgC,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA,0CAId;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-chat-sidebar",
|
|
3
|
+
"version": "3.6.0-next.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Chat Sidebar",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./styled": {
|
|
18
|
+
"import": "./dist/esm/styled.js",
|
|
19
|
+
"require": "./dist/cjs/styled.js"
|
|
20
|
+
},
|
|
21
|
+
"./props": {
|
|
22
|
+
"import": "./dist/esm/props.js",
|
|
23
|
+
"require": "./dist/cjs/props.js"
|
|
24
|
+
},
|
|
25
|
+
"./SideBarChat": {
|
|
26
|
+
"import": "./dist/esm/SideBarChat.js",
|
|
27
|
+
"require": "./dist/cjs/SideBarChat.js"
|
|
28
|
+
},
|
|
29
|
+
"./sidebar-button/": {
|
|
30
|
+
"import": "./dist/esm/sidebar-button/index.js",
|
|
31
|
+
"require": "./dist/cjs/sidebar-button/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./sidebar-button/styled": {
|
|
34
|
+
"import": "./dist/esm/sidebar-button/styled.js",
|
|
35
|
+
"require": "./dist/cjs/sidebar-button/styled.js"
|
|
36
|
+
},
|
|
37
|
+
"./sidebar-button/props": {
|
|
38
|
+
"import": "./dist/esm/sidebar-button/props.js",
|
|
39
|
+
"require": "./dist/cjs/sidebar-button/props.js"
|
|
40
|
+
},
|
|
41
|
+
"./sidebar-button/SideBarButton": {
|
|
42
|
+
"import": "./dist/esm/sidebar-button/SideBarButton.js",
|
|
43
|
+
"require": "./dist/cjs/sidebar-button/SideBarButton.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"pnpm": ">=6",
|
|
52
|
+
"node": ">=16"
|
|
53
|
+
},
|
|
54
|
+
"author": "ICE MT",
|
|
55
|
+
"jestSonar": {
|
|
56
|
+
"sonar56x": true,
|
|
57
|
+
"reportPath": "reports",
|
|
58
|
+
"reportFile": "tests.xml",
|
|
59
|
+
"indent": 4
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"typeSafety": true
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@elliemae/ds-chat-tile": "3.6.0-next.0",
|
|
67
|
+
"@elliemae/ds-grid": "3.6.0-next.0",
|
|
68
|
+
"@elliemae/ds-icons": "3.6.0-next.0",
|
|
69
|
+
"@elliemae/ds-system": "3.6.0-next.0",
|
|
70
|
+
"@elliemae/ds-truncated-tooltip-text": "3.6.0-next.0",
|
|
71
|
+
"@elliemae/ds-utilities": "3.6.0-next.0"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@testing-library/dom": "~8.13.0",
|
|
75
|
+
"@testing-library/jest-dom": "~5.16.4",
|
|
76
|
+
"@testing-library/react": "~12.1.3",
|
|
77
|
+
"@testing-library/user-event": "~13.5.0",
|
|
78
|
+
"styled-components": "~5.3.5"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"lodash": "^4.17.21",
|
|
82
|
+
"react": "^17.0.2",
|
|
83
|
+
"react-dom": "^17.0.2",
|
|
84
|
+
"styled-components": "^5.3.5"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
88
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
89
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
90
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
91
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
92
|
+
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
93
|
+
}
|
|
94
|
+
}
|