@elliemae/ds-chat-sidebar 3.80.0-next.71 → 3.80.0-next.75

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.
@@ -81,6 +81,7 @@ const SideBarChat = (props) => {
81
81
  enableTooltipWhenIsClosed,
82
82
  actionRef
83
83
  } = propsWithDefault;
84
+ const [buttonsContainer, setButtonsContainer] = import_react.default.useState(null);
84
85
  const { current: listRef } = import_react.default.useRef({});
85
86
  const registerReference = import_react.default.useCallback(
86
87
  (ref) => {
@@ -103,17 +104,26 @@ const SideBarChat = (props) => {
103
104
  getOwnerProps,
104
105
  getOwnerPropsArguments,
105
106
  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,
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
+ import_styled.StyledSideBarButtonsContainer,
108
109
  {
109
- innerRef: registerReference,
110
- ...p,
111
- selected: selectedItem === p.dsId,
112
- tooltipPlacement,
113
- disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
114
- },
115
- p.dsId
116
- )) }),
110
+ innerRef: setButtonsContainer,
111
+ getOwnerProps,
112
+ getOwnerPropsArguments,
113
+ children: sidebarItems.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ import_ds_chat_tile.TileButton,
115
+ {
116
+ innerRef: registerReference,
117
+ boundaryElement: buttonsContainer,
118
+ ...p,
119
+ selected: selectedItem === p.dsId,
120
+ tooltipPlacement,
121
+ disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
122
+ },
123
+ p.dsId
124
+ ))
125
+ }
126
+ ),
117
127
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
128
  FooterChat,
119
129
  {
@@ -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 {\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;",
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 [buttonsContainer, setButtonsContainer] = React.useState<HTMLDivElement | null>(null);\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\n innerRef={setButtonsContainer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\n boundaryElement={buttonsContainer}\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,CAAC,kBAAkB,mBAAmB,IAAI,aAAAA,QAAM,SAAgC,IAAI;AAC1F,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;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YAEC,uBAAa,IAAI,CAAC,MACjB;AAAA,cAAC;AAAA;AAAA,gBAEC,UAAU;AAAA,gBACV,iBAAiB;AAAA,gBAChB,GAAG;AAAA,gBACJ,UAAU,iBAAiB,EAAE;AAAA,gBAC7B;AAAA,gBACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,cANhD,EAAE;AAAA,YAOT,CACD;AAAA;AAAA,QACH;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
  }
@@ -37,8 +37,10 @@ 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
39
  var import_constants = require("../constants/index.js");
40
- const MIN_WIDTH_SIDEBAR = 48;
41
- const BUTTON_SIDEBAR_HEIGHT = 48;
40
+ const MIN_WIDTH_SIDEBAR = "3.6923rem";
41
+ const MIN_WIDTH_SIDEBAR_SMALL = "3rem";
42
+ const BUTTON_SIDEBAR_HEIGHT = "3.6923rem";
43
+ const BUTTON_SIDEBAR_HEIGHT_SMALL = "3rem";
42
44
  const StyledSidebarButton = (0, import_ds_system.styled)("button", {
43
45
  name: import_constants.DSChatSidebarName,
44
46
  slot: import_constants.CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON,
@@ -49,8 +51,12 @@ const StyledSidebarButton = (0, import_ds_system.styled)("button", {
49
51
  align-items: center;
50
52
  justify-content: center;
51
53
  outline: none;
52
- height: ${BUTTON_SIDEBAR_HEIGHT}px;
53
- width: ${MIN_WIDTH_SIDEBAR}px;
54
+ min-height: ${BUTTON_SIDEBAR_HEIGHT};
55
+ min-width: ${MIN_WIDTH_SIDEBAR};
56
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
57
+ min-height: ${BUTTON_SIDEBAR_HEIGHT_SMALL};
58
+ min-width: ${MIN_WIDTH_SIDEBAR_SMALL};
59
+ }
54
60
  position: relative;
55
61
  border: 0;
56
62
  background: transparent;
@@ -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';\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;",
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 = '3.6923rem'; // 48px / 13\nconst MIN_WIDTH_SIDEBAR_SMALL = '3rem'; // 48px / 16\nconst BUTTON_SIDEBAR_HEIGHT = '3.6923rem'; // 48px / 13\nconst BUTTON_SIDEBAR_HEIGHT_SMALL = '3rem'; // 48px / 16\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 min-height: ${BUTTON_SIDEBAR_HEIGHT};\n min-width: ${MIN_WIDTH_SIDEBAR};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n min-height: ${BUTTON_SIDEBAR_HEIGHT_SMALL};\n min-width: ${MIN_WIDTH_SIDEBAR_SMALL};\n }\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,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAE7B,MAAM,0BAAsB,yBAAO,UAAU;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKe,qBAAqB;AAAA,eACtB,iBAAiB;AAAA,uBACT,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,kBAC7C,2BAA2B;AAAA,iBAC5B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOtB,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
  }
@@ -36,8 +36,10 @@ 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
38
  var import_constants = require("./constants/index.js");
39
- const MIN_WIDTH_SIDEBAR = 48;
40
- const BUTTON_SIDEBAR_HEIGHT = 48;
39
+ const MIN_WIDTH_SIDEBAR = "3.6923rem";
40
+ const MIN_WIDTH_SIDEBAR_SMALL = "3rem";
41
+ const BUTTON_SIDEBAR_HEIGHT = "3.6923rem";
42
+ const BUTTON_SIDEBAR_HEIGHT_SMALL = "3rem";
41
43
  const StyledSideBarContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
42
44
  name: import_constants.DSChatSidebarName,
43
45
  slot: import_constants.CHAT_SIDEBAR_SLOTS.ROOT,
@@ -45,7 +47,14 @@ const StyledSideBarContainer = (0, import_ds_system.styled)(import_ds_grid.Grid,
45
47
  preserveLegacyDataTestId: true
46
48
  })`
47
49
  height: 100%;
48
- width: ${MIN_WIDTH_SIDEBAR}px;
50
+ min-width: ${MIN_WIDTH_SIDEBAR};
51
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
52
+ min-width: ${MIN_WIDTH_SIDEBAR_SMALL};
53
+ }
54
+ /** the spec width (48px, border included) comes from min-width: the tiles must not push the root to 49px */
55
+ contain: inline-size;
56
+ /** without a width the rail stretches to its container: fit-content keeps it at the scalable minimum */
57
+ width: fit-content;
49
58
  background: ${(props) => props.theme.colors.neutral["050"]};
50
59
  border-right: 1px solid ${(props) => props.theme.colors.neutral["100"]};
51
60
  overflow: hidden;
@@ -57,7 +66,11 @@ const StyledSideBarButtonsContainer = (0, import_ds_system.styled)(import_ds_gri
57
66
  overflow-y: auto;
58
67
  align-items: flex-start;
59
68
  justify-content: flex-start;
60
- grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);
69
+ grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT}, auto);
70
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
71
+ grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT_SMALL}, auto);
72
+ }
73
+ align-content: start;
61
74
  overflow-x: hidden;
62
75
 
63
76
  scrollbar-width: thin;
@@ -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';\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;",
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 = '3.6923rem'; // 48px / 13\nconst MIN_WIDTH_SIDEBAR_SMALL = '3rem'; // 48px / 16\nconst BUTTON_SIDEBAR_HEIGHT = '3.6923rem'; // 48px / 13\nconst BUTTON_SIDEBAR_HEIGHT_SMALL = '3rem'; // 48px / 16\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 min-width: ${MIN_WIDTH_SIDEBAR};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n min-width: ${MIN_WIDTH_SIDEBAR_SMALL};\n }\n /** the spec width (48px, border included) comes from min-width: the tiles must not push the root to 49px */\n contain: inline-size;\n /** without a width the rail stretches to its container: fit-content keeps it at the scalable minimum */\n width: fit-content;\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-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT}, auto);\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT_SMALL}, auto);\n }\n align-content: start;\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,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAE7B,MAAM,6BAAyB,yBAAO,qBAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,oCAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA,eAEc,iBAAiB;AAAA,uBACT,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,iBAC9C,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMxB,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,2BAI0B,qBAAqB;AAAA,uBACzB,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,6BAClC,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -52,6 +52,7 @@ const SideBarChat = (props) => {
52
52
  enableTooltipWhenIsClosed,
53
53
  actionRef
54
54
  } = propsWithDefault;
55
+ const [buttonsContainer, setButtonsContainer] = React2.useState(null);
55
56
  const { current: listRef } = React2.useRef({});
56
57
  const registerReference = React2.useCallback(
57
58
  (ref) => {
@@ -74,17 +75,26 @@ const SideBarChat = (props) => {
74
75
  getOwnerProps,
75
76
  getOwnerPropsArguments,
76
77
  children: [
77
- /* @__PURE__ */ jsx(StyledSideBarButtonsContainer, { getOwnerProps, getOwnerPropsArguments, children: sidebarItems.map((p) => /* @__PURE__ */ jsx(
78
- TileButton,
78
+ /* @__PURE__ */ jsx(
79
+ StyledSideBarButtonsContainer,
79
80
  {
80
- innerRef: registerReference,
81
- ...p,
82
- selected: selectedItem === p.dsId,
83
- tooltipPlacement,
84
- disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
85
- },
86
- p.dsId
87
- )) }),
81
+ innerRef: setButtonsContainer,
82
+ getOwnerProps,
83
+ getOwnerPropsArguments,
84
+ children: sidebarItems.map((p) => /* @__PURE__ */ jsx(
85
+ TileButton,
86
+ {
87
+ innerRef: registerReference,
88
+ boundaryElement: buttonsContainer,
89
+ ...p,
90
+ selected: selectedItem === p.dsId,
91
+ tooltipPlacement,
92
+ disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
93
+ },
94
+ p.dsId
95
+ ))
96
+ }
97
+ ),
88
98
  /* @__PURE__ */ jsx(
89
99
  FooterChat,
90
100
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/SideBarChat.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6BrB,cA+CE,YA/CF;AA5BF,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAE9B,SAAS,cAAc,wBAAwB;AAC/C,SAAS,0BAA0B,yBAAyB;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,eAAe;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,mBAAmB,6BAA2D,OAAO,YAAY;AACvG,iCAA+B,kBAAkB,kBAAkB,iBAAiB;AAEpF,QAAM,cAAc,uBAAuB,gBAAgB;AAG3D,QAAM,EAAE,MAAM,cAAc,GAAG,YAAY,IAAI;AAC/C,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAoC,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,IAAIA,OAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;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;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAM,CAAC,OAAO,MAAM;AAAA,MAEpB,eAAa,yBAAyB;AAAA,MACtC;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,iCAA8B,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,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAGlC,MAAM,gBAAgB;AACtB,MAAM,0BAA0B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 [buttonsContainer, setButtonsContainer] = React.useState<HTMLDivElement | null>(null);\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\n innerRef={setButtonsContainer}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\n boundaryElement={buttonsContainer}\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"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC6BrB,cAgDE,YAhDF;AA5BF,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAE9B,SAAS,cAAc,wBAAwB;AAC/C,SAAS,0BAA0B,yBAAyB;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,eAAe;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,mBAAmB,6BAA2D,OAAO,YAAY;AACvG,iCAA+B,kBAAkB,kBAAkB,iBAAiB;AAEpF,QAAM,cAAc,uBAAuB,gBAAgB;AAG3D,QAAM,EAAE,MAAM,cAAc,GAAG,YAAY,IAAI;AAC/C,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAoC,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,CAAC,kBAAkB,mBAAmB,IAAIA,OAAM,SAAgC,IAAI;AAC1F,QAAM,EAAE,SAAS,QAAQ,IAAIA,OAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;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;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAM,CAAC,OAAO,MAAM;AAAA,MAEpB,eAAa,yBAAyB;AAAA,MACtC;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV;AAAA,YACA;AAAA,YAEC,uBAAa,IAAI,CAAC,MACjB;AAAA,cAAC;AAAA;AAAA,gBAEC,UAAU;AAAA,gBACV,iBAAiB;AAAA,gBAChB,GAAG;AAAA,gBACJ,UAAU,iBAAiB,EAAE;AAAA,gBAC7B;AAAA,gBACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,cANhD,EAAE;AAAA,YAOT,CACD;AAAA;AAAA,QACH;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,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAGlC,MAAM,gBAAgB;AACtB,MAAM,0BAA0B;",
6
6
  "names": ["React"]
7
7
  }
@@ -2,8 +2,10 @@ import * as React from "react";
2
2
  import { styled } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
4
  import { CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from "../constants/index.js";
5
- const MIN_WIDTH_SIDEBAR = 48;
6
- const BUTTON_SIDEBAR_HEIGHT = 48;
5
+ const MIN_WIDTH_SIDEBAR = "3.6923rem";
6
+ const MIN_WIDTH_SIDEBAR_SMALL = "3rem";
7
+ const BUTTON_SIDEBAR_HEIGHT = "3.6923rem";
8
+ const BUTTON_SIDEBAR_HEIGHT_SMALL = "3rem";
7
9
  const StyledSidebarButton = styled("button", {
8
10
  name: DSChatSidebarName,
9
11
  slot: CHAT_SIDEBAR_SLOTS.SIDEBAR_BUTTON,
@@ -14,8 +16,12 @@ const StyledSidebarButton = styled("button", {
14
16
  align-items: center;
15
17
  justify-content: center;
16
18
  outline: none;
17
- height: ${BUTTON_SIDEBAR_HEIGHT}px;
18
- width: ${MIN_WIDTH_SIDEBAR}px;
19
+ min-height: ${BUTTON_SIDEBAR_HEIGHT};
20
+ min-width: ${MIN_WIDTH_SIDEBAR};
21
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
22
+ min-height: ${BUTTON_SIDEBAR_HEIGHT_SMALL};
23
+ min-width: ${MIN_WIDTH_SIDEBAR_SMALL};
24
+ }
19
25
  position: relative;
20
26
  border: 0;
21
27
  background: transparent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB,yBAAyB;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,OAAO,UAAU;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,mBAAmB;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,0BAA0B,OAAO,MAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAIM,MAAM,2BAA2B,OAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 = '3.6923rem'; // 48px / 13\nconst MIN_WIDTH_SIDEBAR_SMALL = '3rem'; // 48px / 16\nconst BUTTON_SIDEBAR_HEIGHT = '3.6923rem'; // 48px / 13\nconst BUTTON_SIDEBAR_HEIGHT_SMALL = '3rem'; // 48px / 16\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 min-height: ${BUTTON_SIDEBAR_HEIGHT};\n min-width: ${MIN_WIDTH_SIDEBAR};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n min-height: ${BUTTON_SIDEBAR_HEIGHT_SMALL};\n min-width: ${MIN_WIDTH_SIDEBAR_SMALL};\n }\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"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB,yBAAyB;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAE7B,MAAM,sBAAsB,OAAO,UAAU;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKe,qBAAqB;AAAA,eACtB,iBAAiB;AAAA,uBACT,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,kBAC7C,2BAA2B;AAAA,iBAC5B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOtB,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,0BAA0B,OAAO,MAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAIM,MAAM,2BAA2B,OAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -2,8 +2,10 @@ import * as React from "react";
2
2
  import { styled } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
4
  import { CHAT_SIDEBAR_SLOTS, DSChatSidebarName } from "./constants/index.js";
5
- const MIN_WIDTH_SIDEBAR = 48;
6
- const BUTTON_SIDEBAR_HEIGHT = 48;
5
+ const MIN_WIDTH_SIDEBAR = "3.6923rem";
6
+ const MIN_WIDTH_SIDEBAR_SMALL = "3rem";
7
+ const BUTTON_SIDEBAR_HEIGHT = "3.6923rem";
8
+ const BUTTON_SIDEBAR_HEIGHT_SMALL = "3rem";
7
9
  const StyledSideBarContainer = styled(Grid, {
8
10
  name: DSChatSidebarName,
9
11
  slot: CHAT_SIDEBAR_SLOTS.ROOT,
@@ -11,7 +13,14 @@ const StyledSideBarContainer = styled(Grid, {
11
13
  preserveLegacyDataTestId: true
12
14
  })`
13
15
  height: 100%;
14
- width: ${MIN_WIDTH_SIDEBAR}px;
16
+ min-width: ${MIN_WIDTH_SIDEBAR};
17
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
18
+ min-width: ${MIN_WIDTH_SIDEBAR_SMALL};
19
+ }
20
+ /** the spec width (48px, border included) comes from min-width: the tiles must not push the root to 49px */
21
+ contain: inline-size;
22
+ /** without a width the rail stretches to its container: fit-content keeps it at the scalable minimum */
23
+ width: fit-content;
15
24
  background: ${(props) => props.theme.colors.neutral["050"]};
16
25
  border-right: 1px solid ${(props) => props.theme.colors.neutral["100"]};
17
26
  overflow: hidden;
@@ -23,7 +32,11 @@ const StyledSideBarButtonsContainer = styled(Grid, {
23
32
  overflow-y: auto;
24
33
  align-items: flex-start;
25
34
  justify-content: flex-start;
26
- grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);
35
+ grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT}, auto);
36
+ @media (max-width: ${(props) => props.theme.breakpoints.small}) {
37
+ grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT_SMALL}, auto);
38
+ }
39
+ align-content: start;
27
40
  overflow-x: hidden;
28
41
 
29
42
  scrollbar-width: thin;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB,yBAAyB;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,yBAAyB,OAAO,MAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,mBAAmB;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,gCAAgC,OAAO,MAAM;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA,0CAIyC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 = '3.6923rem'; // 48px / 13\nconst MIN_WIDTH_SIDEBAR_SMALL = '3rem'; // 48px / 16\nconst BUTTON_SIDEBAR_HEIGHT = '3.6923rem'; // 48px / 13\nconst BUTTON_SIDEBAR_HEIGHT_SMALL = '3rem'; // 48px / 16\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 min-width: ${MIN_WIDTH_SIDEBAR};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n min-width: ${MIN_WIDTH_SIDEBAR_SMALL};\n }\n /** the spec width (48px, border included) comes from min-width: the tiles must not push the root to 49px */\n contain: inline-size;\n /** without a width the rail stretches to its container: fit-content keeps it at the scalable minimum */\n width: fit-content;\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-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT}, auto);\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n grid-auto-rows: minmax(${BUTTON_SIDEBAR_HEIGHT_SMALL}, auto);\n }\n align-content: start;\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,SAAS,oBAAoB,yBAAyB;AAEtD,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,8BAA8B;AAE7B,MAAM,yBAAyB,OAAO,MAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAAA;AAAA,EAEzB,0BAA0B;AAC5B,CAAC;AAAA;AAAA,eAEc,iBAAiB;AAAA,uBACT,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,iBAC9C,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMxB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,4BAChC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIjE,MAAM,gCAAgC,OAAO,MAAM;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,mBAAmB;AAC3B,CAAC;AAAA;AAAA;AAAA;AAAA,2BAI0B,qBAAqB;AAAA,uBACzB,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,6BAClC,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat-sidebar",
3
- "version": "3.80.0-next.71",
3
+ "version": "3.80.0-next.75",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat Sidebar",
6
6
  "files": [
@@ -36,16 +36,17 @@
36
36
  "typeSafety": true
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-chat-tile": "3.80.0-next.71",
40
- "@elliemae/ds-grid": "3.80.0-next.71",
41
- "@elliemae/ds-icons": "3.80.0-next.71",
42
- "@elliemae/ds-props-helpers": "3.80.0-next.71",
43
- "@elliemae/ds-system": "3.80.0-next.71",
44
- "@elliemae/ds-typescript-helpers": "3.80.0-next.71"
39
+ "@elliemae/ds-chat-tile": "3.80.0-next.75",
40
+ "@elliemae/ds-grid": "3.80.0-next.75",
41
+ "@elliemae/ds-icons": "3.80.0-next.75",
42
+ "@elliemae/ds-props-helpers": "3.80.0-next.75",
43
+ "@elliemae/ds-system": "3.80.0-next.75",
44
+ "@elliemae/ds-typescript-helpers": "3.80.0-next.75"
45
45
  },
46
46
  "devDependencies": {
47
- "@elliemae/ds-monorepo-devops": "3.80.0-next.71",
48
- "@elliemae/ds-test-utils": "3.80.0-next.71",
47
+ "@elliemae/ds-monorepo-devops": "3.80.0-next.75",
48
+ "@elliemae/ds-test-utils": "3.80.0-next.75",
49
+ "@playwright/experimental-ct-react": "1.61.1",
49
50
  "jest": "^30.0.0",
50
51
  "styled-components": "~5.3.11"
51
52
  },
@@ -56,7 +57,7 @@
56
57
  "styled-components": "~5.3.11"
57
58
  },
58
59
  "scripts": {
59
- "test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
60
+ "test": "playwright test -c ./playwright.config.mjs && ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
60
61
  "lint": "node ../../../scripts/lint.mjs --fix",
61
62
  "lint:strict": "node ../../../scripts/lint-strict.mjs",
62
63
  "dts": "node ../../../scripts/dts.mjs",