@elliemae/ds-chat-sidebar 3.61.5-rc.1 → 3.70.0-next.10
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/DSChatSidebarDataTestIds.js +2 -1
- package/dist/cjs/DSChatSidebarDataTestIds.js.map +2 -2
- package/dist/cjs/DSChatSidebarDefinitions.js +2 -2
- package/dist/cjs/DSChatSidebarDefinitions.js.map +2 -2
- package/dist/cjs/SideBarChat.js +52 -28
- package/dist/cjs/SideBarChat.js.map +2 -2
- package/dist/cjs/constants/index.js +52 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +11 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +4 -1
- package/dist/cjs/react-desc-prop-types.js +5 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/sidebar-button/SidebarButton.js +26 -6
- package/dist/cjs/sidebar-button/SidebarButton.js.map +2 -2
- package/dist/cjs/sidebar-button/props.js +6 -2
- package/dist/cjs/sidebar-button/props.js.map +2 -2
- package/dist/cjs/sidebar-button/styled.js +15 -3
- package/dist/cjs/sidebar-button/styled.js.map +2 -2
- package/dist/cjs/styled.js +11 -2
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/DSChatSidebarDataTestIds.js +2 -1
- package/dist/esm/DSChatSidebarDataTestIds.js.map +2 -2
- package/dist/esm/DSChatSidebarDefinitions.js +1 -1
- package/dist/esm/DSChatSidebarDefinitions.js.map +2 -2
- package/dist/esm/SideBarChat.js +58 -27
- package/dist/esm/SideBarChat.js.map +2 -2
- package/dist/esm/constants/index.js +22 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +12 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/package.json +4 -1
- package/dist/esm/react-desc-prop-types.js +11 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/sidebar-button/SidebarButton.js +27 -7
- package/dist/esm/sidebar-button/SidebarButton.js.map +2 -2
- package/dist/esm/sidebar-button/props.js +6 -2
- package/dist/esm/sidebar-button/props.js.map +2 -2
- package/dist/esm/sidebar-button/styled.js +15 -3
- package/dist/esm/sidebar-button/styled.js.map +2 -2
- package/dist/esm/styled.js +11 -2
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/DSChatSidebarDefinitions.d.ts +1 -1
- package/dist/types/SideBarChat.d.ts +3 -1
- package/dist/types/constants/index.d.ts +15 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/react-desc-prop-types.d.ts +15 -16
- package/dist/types/sidebar-button/props.d.ts +2 -0
- package/dist/types/tests/DSChatSidebar.a11y.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.api.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.data-testId.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.events.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.exports.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSChatSidebar.keyboard.test.d.ts +1 -0
- package/package.json +9 -8
|
@@ -32,7 +32,8 @@ __export(DSChatSidebarDataTestIds_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(DSChatSidebarDataTestIds_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
|
+
var import_constants = require("./constants/index.js");
|
|
35
36
|
const DSChatSidebarDataTestIds = {
|
|
36
|
-
ROOT:
|
|
37
|
+
ROOT: import_constants.CHAT_SIDEBAR_DATA_TESTID.ROOT
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=DSChatSidebarDataTestIds.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSChatSidebarDataTestIds.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const DSChatSidebarDataTestIds = {\n ROOT:
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { CHAT_SIDEBAR_DATA_TESTID } from './constants/index.js';\n\n// Legacy export \u2014 preserved for backwards compatibility with consumers importing { DSChatSidebarDataTestIds }.\n// New consumers should import { CHAT_SIDEBAR_DATA_TESTID } from '@elliemae/ds-chat-sidebar' instead.\nexport const DSChatSidebarDataTestIds = {\n ROOT: CHAT_SIDEBAR_DATA_TESTID.ROOT,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAyC;AAIlC,MAAM,2BAA2B;AAAA,EACtC,MAAM,0CAAyB;AACjC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var DSChatSidebarDefinitions_exports = {};
|
|
30
30
|
__export(DSChatSidebarDefinitions_exports, {
|
|
31
|
-
DSChatSidebarName: () => DSChatSidebarName
|
|
31
|
+
DSChatSidebarName: () => import_constants.DSChatSidebarName
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(DSChatSidebarDefinitions_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
|
-
|
|
35
|
+
var import_constants = require("./constants/index.js");
|
|
36
36
|
//# sourceMappingURL=DSChatSidebarDefinitions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSChatSidebarDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["// Legacy file \u2014 preserved as a shim. Source of truth is now `./constants/index.ts`.\nexport { DSChatSidebarName } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAkC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/SideBarChat.js
CHANGED
|
@@ -28,6 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var SideBarChat_exports = {};
|
|
30
30
|
__export(SideBarChat_exports, {
|
|
31
|
+
DSChatSidebar: () => DSChatSidebar,
|
|
32
|
+
DSChatSidebarWithSchema: () => DSChatSidebarWithSchema,
|
|
31
33
|
SideBarChat: () => SideBarChat,
|
|
32
34
|
SideBarChatWithSchema: () => SideBarChatWithSchema
|
|
33
35
|
});
|
|
@@ -41,13 +43,14 @@ var import_ds_chat_tile = require("@elliemae/ds-chat-tile");
|
|
|
41
43
|
var import_styled = require("./styled.js");
|
|
42
44
|
var import_SidebarButton = require("./sidebar-button/SidebarButton.js");
|
|
43
45
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
44
|
-
var
|
|
45
|
-
var import_DSChatSidebarDataTestIds = require("./DSChatSidebarDataTestIds.js");
|
|
46
|
+
var import_constants = require("./constants/index.js");
|
|
46
47
|
const FooterChat = ({
|
|
47
48
|
expanded,
|
|
48
49
|
onFooterClose,
|
|
49
50
|
onFooterExpand,
|
|
50
|
-
footerButtonExtraProps
|
|
51
|
+
footerButtonExtraProps,
|
|
52
|
+
getOwnerProps,
|
|
53
|
+
getOwnerPropsArguments
|
|
51
54
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
55
|
import_SidebarButton.SidebarButton,
|
|
53
56
|
{
|
|
@@ -55,12 +58,18 @@ const FooterChat = ({
|
|
|
55
58
|
Icon: !expanded ? import_ds_icons.MenuCollapse : import_ds_icons.MenuExpand,
|
|
56
59
|
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
57
60
|
"aria-pressed": expanded,
|
|
58
|
-
"aria-label": footerButtonExtraProps["aria-label"]
|
|
61
|
+
"aria-label": footerButtonExtraProps["aria-label"],
|
|
62
|
+
getOwnerProps,
|
|
63
|
+
getOwnerPropsArguments
|
|
59
64
|
}
|
|
60
65
|
);
|
|
61
66
|
const SideBarChat = (props) => {
|
|
62
67
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
63
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.chatSidebarProps,
|
|
68
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.chatSidebarProps, import_constants.DSChatSidebarName);
|
|
69
|
+
const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
|
|
70
|
+
const { wrap: wrapStripped, ...globalProps } = globalAttrs;
|
|
71
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
72
|
+
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
64
73
|
const {
|
|
65
74
|
sidebarItems,
|
|
66
75
|
expanded,
|
|
@@ -84,30 +93,45 @@ const SideBarChat = (props) => {
|
|
|
84
93
|
actionRef.current.listRef = listRef;
|
|
85
94
|
}
|
|
86
95
|
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
87
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
97
|
+
import_styled.StyledSideBarContainer,
|
|
98
|
+
{
|
|
99
|
+
...globalProps,
|
|
100
|
+
...xstyledProps,
|
|
101
|
+
rows: ["1fr", "auto"],
|
|
102
|
+
"data-testid": import_constants.CHAT_SIDEBAR_DATA_TESTID.ROOT,
|
|
103
|
+
getOwnerProps,
|
|
104
|
+
getOwnerPropsArguments,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSideBarButtonsContainer, { getOwnerProps, getOwnerPropsArguments, children: sidebarItems.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_ds_chat_tile.TileButton,
|
|
108
|
+
{
|
|
109
|
+
innerRef: registerReference,
|
|
110
|
+
...p,
|
|
111
|
+
selected: selectedItem === p.dsId,
|
|
112
|
+
tooltipPlacement,
|
|
113
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
114
|
+
},
|
|
115
|
+
p.dsId
|
|
116
|
+
)) }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
+
FooterChat,
|
|
119
|
+
{
|
|
120
|
+
expanded,
|
|
121
|
+
onFooterClose,
|
|
122
|
+
onFooterExpand,
|
|
123
|
+
footerButtonExtraProps,
|
|
124
|
+
getOwnerProps,
|
|
125
|
+
getOwnerPropsArguments
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
109
131
|
};
|
|
110
|
-
SideBarChat.displayName =
|
|
132
|
+
SideBarChat.displayName = import_constants.DSChatSidebarName;
|
|
111
133
|
const SideBarChatWithSchema = (0, import_ds_props_helpers.describe)(SideBarChat);
|
|
112
134
|
SideBarChatWithSchema.propTypes = import_react_desc_prop_types.chatSidebarProps;
|
|
135
|
+
const DSChatSidebar = SideBarChat;
|
|
136
|
+
const DSChatSidebarWithSchema = SideBarChatWithSchema;
|
|
113
137
|
//# sourceMappingURL=SideBarChat.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SideBarChat.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';\nimport { SidebarButton } from './sidebar-button/SidebarButton.js';\nimport type { DSChatSidebarT } from './react-desc-prop-types.js';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types.js';\nimport { CHAT_SIDEBAR_DATA_TESTID, DSChatSidebarName } from './constants/index.js';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n getOwnerProps,\n getOwnerPropsArguments,\n}: Pick<DSChatSidebarT.DefaultProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'> & {\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}) => (\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n);\n\nconst SideBarChat: React.ComponentType<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\n\n const globalAttrs = useGetGlobalAttributes(propsWithDefault);\n // strip `wrap` \u2014 Grid uses a strict literal type (`Wrap`) that collides with the generic string from globalAttributes.\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars\n const { wrap: wrapStripped, ...globalProps } = globalAttrs as typeof globalAttrs & { wrap?: unknown };\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatSidebarT.Props>(propsWithDefault);\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\n {...globalProps}\n {...xstyledProps}\n rows={['1fr', 'auto']}\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_SIDEBAR_DATA_TESTID.ROOT}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledSideBarButtonsContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\n// DS-prefixed canonical names (modern Dimsum convention) \u2014 SideBarChat kept as alias for backwards compat\nconst DSChatSidebar = SideBarChat;\nconst DSChatSidebarWithSchema = SideBarChatWithSchema;\n\nexport { SideBarChat, SideBarChatWithSchema, DSChatSidebar, DSChatSidebarWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BrB;AA5BF,mBAAkB;AAClB,8BAOO;AACP,sBAAyC;AACzC,0BAA2B;AAC3B,oBAAsE;AACtE,2BAA8B;AAE9B,mCAA+C;AAC/C,uBAA4D;AAE5D,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAIE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,CAAC,WAAW,+BAAe;AAAA,IACjC,SAAS,WAAW,gBAAgB;AAAA,IACpC,gBAAc;AAAA,IACd,cAAY,uBAAuB,YAAY;AAAA,IAC/C;AAAA,IACA;AAAA;AACF;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,sDAA2D,OAAO,yCAAY;AACvG,8DAA+B,kBAAkB,+CAAkB,kCAAiB;AAEpF,QAAM,kBAAc,gDAAuB,gBAAgB;AAG3D,QAAM,EAAE,MAAM,cAAc,GAAG,YAAY,IAAI;AAC/C,QAAM,mBAAe,4CAAmB,gBAAgB;AACxD,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAoC,gBAAgB;AAEtG,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,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;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;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAM,CAAC,OAAO,MAAM;AAAA,MAEpB,eAAa,0CAAyB;AAAA,MACtC;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,+CAA8B,eAA8B,wBAC1D,uBAAa,IAAI,CAAC,MACjB;AAAA,UAAC;AAAA;AAAA,YAEC,UAAU;AAAA,YACT,GAAG;AAAA,YACJ,UAAU,iBAAiB,EAAE;AAAA,YAC7B;AAAA,YACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,UALhD,EAAE;AAAA,QAMT,CACD,GACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;AAGlC,MAAM,gBAAgB;AACtB,MAAM,0BAA0B;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
CHAT_SIDEBAR_DATA_TESTID: () => CHAT_SIDEBAR_DATA_TESTID,
|
|
32
|
+
CHAT_SIDEBAR_SLOTS: () => CHAT_SIDEBAR_SLOTS,
|
|
33
|
+
DSChatSidebarName: () => DSChatSidebarName
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(constants_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSChatSidebarName = "DSChatsidebar";
|
|
39
|
+
const CHAT_SIDEBAR_SLOTS = {
|
|
40
|
+
ROOT: "root",
|
|
41
|
+
// legacy ones...
|
|
42
|
+
BUTTONS_CONTAINER: "buttons-container",
|
|
43
|
+
SIDEBAR_BUTTON: "sidebar-button",
|
|
44
|
+
SIDEBAR_BUTTON_ICON: "sidebar-button-icon",
|
|
45
|
+
SIDEBAR_BUTTON_LABEL: "sidebar-button-label"
|
|
46
|
+
};
|
|
47
|
+
const CHAT_SIDEBAR_DATA_TESTID = {
|
|
48
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSChatSidebarName, CHAT_SIDEBAR_SLOTS),
|
|
49
|
+
ROOT: "ds-chat-sidebar"
|
|
50
|
+
// legacy value — breaking change if removed
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatSidebarName = 'DSChatsidebar';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CHAT_SIDEBAR_SLOTS = {\n ROOT: 'root', // legacy ones...\n BUTTONS_CONTAINER: 'buttons-container',\n SIDEBAR_BUTTON: 'sidebar-button',\n SIDEBAR_BUTTON_ICON: 'sidebar-button-icon',\n SIDEBAR_BUTTON_LABEL: 'sidebar-button-label',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\n// Note: ROOT legacy value is `ds-chat-sidebar` \u2014 preserved at three layers (constants + preserveLegacyDataTestId + inline JSX) \u2014 breaking change if removed.\n// Note: the dynamic `sidebar-button-${dsId}` testid rendered by SidebarButton.tsx is preserved inline at the JSX level only; it cannot be expressed in this static map.\nexport const CHAT_SIDEBAR_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatSidebarName, CHAT_SIDEBAR_SLOTS),\n ROOT: 'ds-chat-sidebar', // legacy value \u2014 breaking change if removed\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,oBAAoB;AAG1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA;AAAA,EACN,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,sBAAsB;AACxB;AAKO,MAAM,2BAA2B;AAAA,EACtC,OAAG,0CAAwB,mBAAmB,kBAAkB;AAAA,EAChE,MAAM;AAAA;AACR;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,10 +28,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
|
+
CHAT_SIDEBAR_DATA_TESTID: () => import_constants.CHAT_SIDEBAR_DATA_TESTID,
|
|
32
|
+
CHAT_SIDEBAR_SLOTS: () => import_constants.CHAT_SIDEBAR_SLOTS,
|
|
33
|
+
DSChatSidebar: () => import_SideBarChat.DSChatSidebar,
|
|
34
|
+
DSChatSidebarDataTestIds: () => import_DSChatSidebarDataTestIds.DSChatSidebarDataTestIds,
|
|
35
|
+
DSChatSidebarName: () => import_constants.DSChatSidebarName,
|
|
36
|
+
DSChatSidebarWithSchema: () => import_SideBarChat.DSChatSidebarWithSchema,
|
|
31
37
|
SideBarChat: () => import_SideBarChat.SideBarChat,
|
|
32
|
-
SideBarChatWithSchema: () => import_SideBarChat.SideBarChatWithSchema
|
|
38
|
+
SideBarChatWithSchema: () => import_SideBarChat.SideBarChatWithSchema,
|
|
39
|
+
chatSidebarProps: () => import_react_desc_prop_types.chatSidebarProps
|
|
33
40
|
});
|
|
34
41
|
module.exports = __toCommonJS(index_exports);
|
|
35
42
|
var React = __toESM(require("react"));
|
|
36
43
|
var import_SideBarChat = require("./SideBarChat.js");
|
|
44
|
+
var import_DSChatSidebarDataTestIds = require("./DSChatSidebarDataTestIds.js");
|
|
45
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
46
|
+
var import_constants = require("./constants/index.js");
|
|
37
47
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { SideBarChat, SideBarChatWithSchema } from './SideBarChat.js';\nexport type { DSChatSidebarT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["export { SideBarChat, SideBarChatWithSchema, DSChatSidebar, DSChatSidebarWithSchema } from './SideBarChat.js';\nexport { DSChatSidebarDataTestIds } from './DSChatSidebarDataTestIds.js'; // LEGACY EXPORT\nexport type { DSChatSidebarT } from './react-desc-prop-types.js';\nexport { chatSidebarProps } from './react-desc-prop-types.js';\nexport { CHAT_SIDEBAR_DATA_TESTID, CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAA2F;AAC3F,sCAAyC;AAEzC,mCAAiC;AACjC,uBAAgF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/package.json
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
37
|
var import_lodash_es = require("lodash-es");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
38
39
|
const defaultProps = {
|
|
39
40
|
expanded: false,
|
|
40
41
|
sidebarItems: [],
|
|
@@ -47,6 +48,9 @@ const defaultProps = {
|
|
|
47
48
|
enableTooltipWhenIsClosed: false
|
|
48
49
|
};
|
|
49
50
|
const chatSidebarProps = {
|
|
51
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSChatSidebarName, import_constants.CHAT_SIDEBAR_SLOTS),
|
|
52
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
53
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
50
54
|
sidebarItems: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.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),
|
|
51
55
|
expanded: import_ds_props_helpers.PropTypes.bool.description("Whether to show the chat expanded or collapsed").defaultValue(defaultProps.expanded),
|
|
52
56
|
selectedItem: import_ds_props_helpers.PropTypes.string.description("The id of the chat item you want to be opened"),
|
|
@@ -64,7 +68,7 @@ const chatSidebarProps = {
|
|
|
64
68
|
"left",
|
|
65
69
|
"left-start"
|
|
66
70
|
]).description("start placement preferences, as per popperjs placement option").defaultValue("'right'"),
|
|
67
|
-
enableTooltipWhenIsClosed: import_ds_props_helpers.PropTypes.bool.description("Enable tooltip when is closed").defaultValue(defaultProps.
|
|
71
|
+
enableTooltipWhenIsClosed: import_ds_props_helpers.PropTypes.bool.description("Enable tooltip when is closed").defaultValue(defaultProps.enableTooltipWhenIsClosed),
|
|
68
72
|
onFooterExpand: import_ds_props_helpers.PropTypes.func.description("The function to call when the chat is opened via the footer").defaultValue(defaultProps.onFooterExpand),
|
|
69
73
|
onFooterClose: import_ds_props_helpers.PropTypes.func.description("The function to call when the chat is closed via the footer").defaultValue(defaultProps.onFooterClose),
|
|
70
74
|
onHeaderExpand: import_ds_props_helpers.PropTypes.func.description("The function to call when the chat is opened via the header").defaultValue(defaultProps.onHeaderExpand),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { noop } from 'lodash-es';\nimport { CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from './constants/index.js';\n\nexport declare namespace DSChatSidebarT {\n type TooltipPlacementT =\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 // hand-written per-slot function argument map \u2014 one entry per slot in CHAT_SIDEBAR_SLOTS\n export type SlotFunctionArguments = {\n dsChatsidebarRoot: () => object;\n dsChatsidebarButtonsContainer: () => object;\n dsChatsidebarSidebarButton: () => object;\n dsChatsidebarSidebarButtonIcon: () => object;\n dsChatsidebarSidebarButtonLabel: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement: TooltipPlacementT;\n enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatSidebarName, typeof CHAT_SIDEBAR_SLOTS> {\n selectedItem?: string | number;\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\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: DSPropTypesSchema<DSChatSidebarT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatSidebarName, CHAT_SIDEBAR_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\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.description('The id of the chat item you want to be opened'),\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.enableTooltipWhenIsClosed),\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;ADIvB,8BAKO;AAEP,uBAAqB;AACrB,uBAAsD;AA+D/C,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,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,mBAA4D;AAAA,EACvE,OAAG,kDAAyB,oCAAmB,mCAAkB;AAAA,EACjE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,kCAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,kCAAU,OAAO,YAAY,+CAA+C;AAAA,EAC1F,kBAAkB,kCAAU,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,kCAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,yBAAyB;AAAA,EACtD,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,kCAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,kCAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,15 +38,35 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
38
38
|
var import_styled = require("./styled.js");
|
|
39
39
|
var import_props = require("./props.js");
|
|
40
40
|
const SidebarButton = (props) => {
|
|
41
|
-
const
|
|
42
|
-
const { dsId, onClick, Icon, label, ...rest } =
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_props.defaultSidebarButton);
|
|
42
|
+
const { dsId, onClick, Icon, label, getOwnerProps, getOwnerPropsArguments, ...rest } = propsWithDefault;
|
|
43
43
|
const handleClick = import_react.default.useCallback(() => {
|
|
44
44
|
if (dsId) onClick(dsId);
|
|
45
45
|
}, [onClick, dsId]);
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
|
+
import_styled.StyledSidebarButton,
|
|
48
|
+
{
|
|
49
|
+
"data-testid": `sidebar-button-${dsId}`,
|
|
50
|
+
onClick: handleClick,
|
|
51
|
+
getOwnerProps,
|
|
52
|
+
getOwnerPropsArguments,
|
|
53
|
+
...rest,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
+
import_styled.StyledSidebarButtonIcon,
|
|
57
|
+
{
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
justifyContent: "center",
|
|
60
|
+
getOwnerProps,
|
|
61
|
+
getOwnerPropsArguments,
|
|
62
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "m" })
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSidebarButtonLabel, { getOwnerProps, getOwnerPropsArguments, children: label })
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
dsId
|
|
69
|
+
);
|
|
50
70
|
};
|
|
51
71
|
SidebarButton.displayName = "SidebarButton";
|
|
52
72
|
const SidebarButtonWithSchema = (0, import_ds_props_helpers.describe)(SidebarButton);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/sidebar-button/SidebarButton.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { sidebarButtonPropsSchema, defaultSidebarButton } from './props.js';\n\nconst SidebarButton = (props: SidebarButtonProps): JSX.Element => {\n const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { sidebarButtonPropsSchema, defaultSidebarButton } from './props.js';\n\n// Internal sub-component \u2014 not consumer-facing. Schema validation is deliberately skipped here\n// because SidebarButton intentionally accepts forwarded `...rest` (aria-pressed, aria-label, etc.)\n// from its parent SideBarChat. Validation would reject those passthrough props.\nconst SidebarButton = (props: SidebarButtonProps): JSX.Element => {\n const propsWithDefault = useMemoMergePropsWithDefault<SidebarButtonProps>(props, defaultSidebarButton);\n\n const { dsId, onClick, Icon, label, getOwnerProps, getOwnerPropsArguments, ...rest } = propsWithDefault;\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton\n key={dsId}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`sidebar-button-${dsId}`}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...rest}\n >\n <StyledSidebarButtonIcon\n alignItems=\"center\"\n justifyContent=\"center\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && (\n <StyledSidebarButtonLabel getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {label}\n </StyledSidebarButtonLabel>\n )}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.displayName = 'SidebarButton';\nconst SidebarButtonWithSchema = describe(SidebarButton);\nSidebarButtonWithSchema.propTypes = sidebarButtonPropsSchema;\n\nexport { SidebarButtonWithSchema as SidebarButton };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAlBJ,mBAAkB;AAClB,8BAAuD;AACvD,oBAAuF;AAEvF,mBAA+D;AAK/D,MAAM,gBAAgB,CAAC,UAA2C;AAChE,QAAM,uBAAmB,sDAAiD,OAAO,iCAAoB;AAErG,QAAM,EAAE,MAAM,SAAS,MAAM,OAAO,eAAe,wBAAwB,GAAG,KAAK,IAAI;AACvF,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI,KAAM,SAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MAGC,eAAa,kBAAkB,IAAI;AAAA,MACnC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,gBAAe;AAAA,YACf;AAAA,YACA;AAAA,YAEA,sDAAC,QAAK,MAAK,KAAI;AAAA;AAAA,QACjB;AAAA,QACC,SACC,4CAAC,0CAAyB,eAA8B,wBACrD,iBACH;AAAA;AAAA;AAAA,IAnBG;AAAA,EAqBP;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -45,11 +45,15 @@ const defaultSidebarButton = {
|
|
|
45
45
|
title: ""
|
|
46
46
|
};
|
|
47
47
|
const propsSidebarButton = {
|
|
48
|
-
Icon: import_ds_props_helpers.PropTypes.
|
|
48
|
+
Icon: import_ds_props_helpers.PropTypes.func.description("Icon component").defaultValue(defaultSidebarButton.Icon),
|
|
49
49
|
dsId: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.string]).description("Unique id for the button").defaultValue(defaultSidebarButton.dsId),
|
|
50
50
|
label: import_ds_props_helpers.PropTypes.string.description("It will display under the icon").defaultValue(defaultSidebarButton.label),
|
|
51
51
|
title: import_ds_props_helpers.PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
|
|
52
|
-
onClick: import_ds_props_helpers.PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
|
|
52
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick),
|
|
53
|
+
getOwnerProps: import_ds_props_helpers.PropTypes.func.description("Slot system getter \u2014 forwarded from the parent SideBarChat"),
|
|
54
|
+
getOwnerPropsArguments: import_ds_props_helpers.PropTypes.func.description(
|
|
55
|
+
"Slot system getOwnerPropsArguments \u2014 forwarded from the parent SideBarChat"
|
|
56
|
+
)
|
|
53
57
|
};
|
|
54
58
|
const sidebarButtonPropsSchema = propsSidebarButton;
|
|
55
59
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/sidebar-button/props.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { SvgIconT } from '@elliemae/ds-icons';\nimport { Comments } from '@elliemae/ds-icons';\nimport type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport type React from 'react';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<SvgIconT.Props>;\n dsId: string | number;\n onClick: (dsId: string | number) => void;\n label?: string;\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: DSPropTypesSchema<SidebarButtonProps> = {\n Icon: PropTypes.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAyB;AAEzB,8BAA0B;AAC1B,uBAAqB;
|
|
4
|
+
"sourcesContent": ["import type { SvgIconT } from '@elliemae/ds-icons';\nimport { Comments } from '@elliemae/ds-icons';\nimport type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport type React from 'react';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<SvgIconT.Props>;\n dsId: string | number;\n onClick: (dsId: string | number) => void;\n label?: string;\n title?: string;\n // forwarded from SideBarChat so the styled children participate in the slot system; optional for backwards compat.\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton: DSPropTypesSchema<SidebarButtonProps> = {\n Icon: PropTypes.func.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 getOwnerProps: PropTypes.func.description('Slot system getter \u2014 forwarded from the parent SideBarChat'),\n getOwnerPropsArguments: PropTypes.func.description(\n 'Slot system getOwnerPropsArguments \u2014 forwarded from the parent SideBarChat',\n ),\n};\n\nexport const sidebarButtonPropsSchema = propsSidebarButton as unknown as ValidationMap<SidebarButtonProps>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAyB;AAEzB,8BAA0B;AAC1B,uBAAqB;AAcd,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAA4D;AAAA,EACvE,MAAM,kCAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EACzF,MAAM,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,kCAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,kCAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,kCAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAAA,EAC5C,eAAe,kCAAU,KAAK,YAAY,iEAA4D;AAAA,EACtG,wBAAwB,kCAAU,KAAK;AAAA,IACrC;AAAA,EACF;AACF;AAEO,MAAM,2BAA2B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,9 +36,15 @@ module.exports = __toCommonJS(styled_exports);
|
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
38
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
39
|
+
var import_constants = require("../constants/index.js");
|
|
39
40
|
const MIN_WIDTH_SIDEBAR = 48;
|
|
40
41
|
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
41
|
-
const StyledSidebarButton = import_ds_system.styled
|
|
42
|
+
const StyledSidebarButton = (0, import_ds_system.styled)("button", {
|
|
43
|
+
name: import_constants.DSChatSidebarName,
|
|
44
|
+
slot: import_constants.CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON,
|
|
45
|
+
// legacy dynamic data-testid `sidebar-button-${dsId}` is preserved via inline JSX data-testid
|
|
46
|
+
preserveLegacyDataTestId: true
|
|
47
|
+
})`
|
|
42
48
|
display: flex;
|
|
43
49
|
align-items: center;
|
|
44
50
|
justify-content: center;
|
|
@@ -59,10 +65,16 @@ const StyledSidebarButton = import_ds_system.styled.button`
|
|
|
59
65
|
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
60
66
|
}
|
|
61
67
|
`;
|
|
62
|
-
const StyledSidebarButtonIcon = (0, import_ds_system.styled)(import_ds_grid.Grid
|
|
68
|
+
const StyledSidebarButtonIcon = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
69
|
+
name: import_constants.DSChatSidebarName,
|
|
70
|
+
slot: import_constants.CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON_ICON
|
|
71
|
+
})`
|
|
63
72
|
position: relative;
|
|
64
73
|
`;
|
|
65
|
-
const StyledSidebarButtonLabel = import_ds_system.styled
|
|
74
|
+
const StyledSidebarButtonLabel = (0, import_ds_system.styled)("div", {
|
|
75
|
+
name: import_constants.DSChatSidebarName,
|
|
76
|
+
slot: import_constants.CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON_LABEL
|
|
77
|
+
})`
|
|
66
78
|
width: 30px;
|
|
67
79
|
text-transform: uppercase;
|
|
68
80
|
overflow: hidden;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from '../constants/index.js';\n\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Buttons\nexport const StyledSidebarButton = styled('button', {\n name: DSChatSidebarName,\n slot: CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON,\n // legacy dynamic data-testid `sidebar-button-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\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 name: DSChatSidebarName,\n slot: CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON_ICON,\n})`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled('div', {\n name: DSChatSidebarName,\n slot: CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON_LABEL,\n})`\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,uBAAsD;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,0BAAsB,yBAAO,UAAU;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAKW,qBAAqB;AAAA,WACtB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMV,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA,6BAGjC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA,YAG7D,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAI/C,MAAM,8BAA0B,yBAAO,qBAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAC3B,CAAC;AAAA;AAAA;AAIM,MAAM,+BAA2B,yBAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -35,16 +35,25 @@ module.exports = __toCommonJS(styled_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
37
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
38
39
|
const MIN_WIDTH_SIDEBAR = 48;
|
|
39
40
|
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
40
|
-
const StyledSideBarContainer = (0, import_ds_system.styled)(import_ds_grid.Grid
|
|
41
|
+
const StyledSideBarContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
42
|
+
name: import_constants.DSChatSidebarName,
|
|
43
|
+
slot: import_constants.CHAT_SIDEBAR_SLOTS.ROOT,
|
|
44
|
+
// legacy data-testid `ds-chat-sidebar` is preserved via inline JSX data-testid
|
|
45
|
+
preserveLegacyDataTestId: true
|
|
46
|
+
})`
|
|
41
47
|
height: 100%;
|
|
42
48
|
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
43
49
|
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
44
50
|
border-right: 1px solid ${(props) => props.theme.colors.neutral["100"]};
|
|
45
51
|
overflow: hidden;
|
|
46
52
|
`;
|
|
47
|
-
const StyledSideBarButtonsContainer = (0, import_ds_system.styled)(import_ds_grid.Grid
|
|
53
|
+
const StyledSideBarButtonsContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
54
|
+
name: import_constants.DSChatSidebarName,
|
|
55
|
+
slot: import_constants.CHAT_SIDEBAR_SLOTS.BUTTONS_CONTAINER
|
|
56
|
+
})`
|
|
48
57
|
overflow-y: auto;
|
|
49
58
|
align-items: flex-start;
|
|
50
59
|
justify-content: flex-start;
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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,
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from './constants/index.js';\n\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid, {\n name: DSChatSidebarName,\n slot: CHAT_SIDEBAR_SLOTS.ROOT,\n // legacy data-testid `ds-chat-sidebar` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\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 name: DSChatSidebarName,\n slot: CHAT_SIDEBAR_SLOTS.BUTTONS_CONTAINER,\n})`\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,uBAAsD;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,6BAAyB,yBAAO,qBAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA,WAEU,iBAAiB;AAAA,gBACZ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,4BAChC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIjE,MAAM,oCAAgC,yBAAO,qBAAM;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA,0CAIyC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSChatSidebarDataTestIds.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSChatSidebarDataTestIds = {\n ROOT:
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { CHAT_SIDEBAR_DATA_TESTID } from './constants/index.js';\n\n// Legacy export \u2014 preserved for backwards compatibility with consumers importing { DSChatSidebarDataTestIds }.\n// New consumers should import { CHAT_SIDEBAR_DATA_TESTID } from '@elliemae/ds-chat-sidebar' instead.\nexport const DSChatSidebarDataTestIds = {\n ROOT: CHAT_SIDEBAR_DATA_TESTID.ROOT,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,gCAAgC;AAIlC,MAAM,2BAA2B;AAAA,EACtC,MAAM,yBAAyB;AACjC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|