@elliemae/ds-chat-sidebar 3.52.1 → 3.53.0-alpha.2

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.
@@ -28,15 +28,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var SidebarButton_exports = {};
30
30
  __export(SidebarButton_exports, {
31
- SidebarButton: () => SidebarButton
31
+ SidebarButton: () => SidebarButtonWithSchema
32
32
  });
33
33
  module.exports = __toCommonJS(SidebarButton_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = __toESM(require("react"));
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
38
  var import_styled = require("./styled.js");
38
39
  var import_props = require("./props.js");
39
- const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
40
+ const SidebarButton = (props) => {
41
+ const propsWithDefaultsTemporary = { ...import_props.defaultSidebarButton, ...props };
42
+ const { dsId, onClick, Icon, label, ...rest } = propsWithDefaultsTemporary;
40
43
  const handleClick = import_react.default.useCallback(() => {
41
44
  if (dsId) onClick(dsId);
42
45
  }, [onClick, dsId]);
@@ -45,6 +48,7 @@ const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
45
48
  label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSidebarButtonLabel, { children: label })
46
49
  ] }, dsId);
47
50
  };
48
- SidebarButton.propTypes = import_props.propsSidebarButton;
49
- SidebarButton.defaultProps = import_props.defaultSidebarButton;
51
+ SidebarButton.displayName = "SidebarButton";
52
+ const SidebarButtonWithSchema = (0, import_ds_props_helpers.describe)(SidebarButton);
53
+ SidebarButtonWithSchema.propTypes = import_props.sidebarButtonPropsSchema;
50
54
  //# sourceMappingURL=SidebarButton.js.map
@@ -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 { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { propsSidebarButton, defaultSidebarButton } from './props.js';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWnB;AAXJ,mBAAkB;AAClB,oBAAuF;AAEvF,mBAAyD;AAElD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,MAAM,GAAG,KAAK,MAAuC;AACzG,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI,KAAM,SAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,6CAAC,qCAA+B,eAAa,kBAAkB,IAAI,IAAI,SAAS,aAAc,GAAG,MAC/F;AAAA,gDAAC,yCAAwB,YAAW,UAAS,gBAAe,UAC1D,sDAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,4CAAC,0CAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
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 propsWithDefaultsTemporary = { ...defaultSidebarButton, ...props };\n const { dsId, onClick, Icon, label, ...rest } = propsWithDefaultsTemporary;\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.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;ADcnB;AAdJ,mBAAkB;AAClB,8BAAyB;AACzB,oBAAuF;AAEvF,mBAA+D;AAE/D,MAAM,gBAAgB,CAAC,UAA2C;AAChE,QAAM,6BAA6B,EAAE,GAAG,mCAAsB,GAAG,MAAM;AACvE,QAAM,EAAE,MAAM,SAAS,MAAM,OAAO,GAAG,KAAK,IAAI;AAChD,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI,KAAM,SAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,6CAAC,qCAA+B,eAAa,kBAAkB,IAAI,IAAI,SAAS,aAAc,GAAG,MAC/F;AAAA,gDAAC,yCAAwB,YAAW,UAAS,gBAAe,UAC1D,sDAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,4CAAC,0CAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -29,13 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var props_exports = {};
30
30
  __export(props_exports, {
31
31
  defaultSidebarButton: () => defaultSidebarButton,
32
- propsSidebarButton: () => propsSidebarButton
32
+ propsSidebarButton: () => propsSidebarButton,
33
+ sidebarButtonPropsSchema: () => sidebarButtonPropsSchema
33
34
  });
34
35
  module.exports = __toCommonJS(props_exports);
35
36
  var React = __toESM(require("react"));
37
+ var import_ds_icons = require("@elliemae/ds-icons");
36
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
39
  var import_lodash_es = require("lodash-es");
38
- var import_ds_icons = require("@elliemae/ds-icons");
39
40
  const defaultSidebarButton = {
40
41
  Icon: import_ds_icons.Comments,
41
42
  dsId: "",
@@ -50,4 +51,5 @@ const propsSidebarButton = {
50
51
  title: import_ds_props_helpers.PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
51
52
  onClick: import_ds_props_helpers.PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
52
53
  };
54
+ const sidebarButtonPropsSchema = propsSidebarButton;
53
55
  //# 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 React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<SvgIconT.Props>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,uBAAqB;AAErB,sBAAyB;AAUlB,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,kCAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,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;AAC9C;",
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.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n\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;AAWd,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,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,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;AAC9C;AAEO,MAAM,2BAA2B;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
+ import { describe } from "@elliemae/ds-props-helpers";
4
5
  import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled.js";
5
- import { propsSidebarButton, defaultSidebarButton } from "./props.js";
6
- const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
6
+ import { sidebarButtonPropsSchema, defaultSidebarButton } from "./props.js";
7
+ const SidebarButton = (props) => {
8
+ const propsWithDefaultsTemporary = { ...defaultSidebarButton, ...props };
9
+ const { dsId, onClick, Icon, label, ...rest } = propsWithDefaultsTemporary;
7
10
  const handleClick = React2.useCallback(() => {
8
11
  if (dsId) onClick(dsId);
9
12
  }, [onClick, dsId]);
@@ -12,9 +15,10 @@ const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
12
15
  label && /* @__PURE__ */ jsx(StyledSidebarButtonLabel, { children: label })
13
16
  ] }, dsId);
14
17
  };
15
- SidebarButton.propTypes = propsSidebarButton;
16
- SidebarButton.defaultProps = defaultSidebarButton;
18
+ SidebarButton.displayName = "SidebarButton";
19
+ const SidebarButtonWithSchema = describe(SidebarButton);
20
+ SidebarButtonWithSchema.propTypes = sidebarButtonPropsSchema;
17
21
  export {
18
- SidebarButton
22
+ SidebarButtonWithSchema as SidebarButton
19
23
  };
20
24
  //# sourceMappingURL=SidebarButton.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/SidebarButton.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { propsSidebarButton, defaultSidebarButton } from './props.js';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACWnB,SAEI,KAFJ;AAXJ,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AAEvF,SAAS,oBAAoB,4BAA4B;AAElD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,MAAM,GAAG,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI,KAAM,SAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC,uBAA+B,eAAa,kBAAkB,IAAI,IAAI,SAAS,aAAc,GAAG,MAC/F;AAAA,wBAAC,2BAAwB,YAAW,UAAS,gBAAe,UAC1D,8BAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,oBAAC,4BAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 propsWithDefaultsTemporary = { ...defaultSidebarButton, ...props };\n const { dsId, onClick, Icon, label, ...rest } = propsWithDefaultsTemporary;\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.displayName = 'SidebarButton';\nconst SidebarButtonWithSchema = describe(SidebarButton);\nSidebarButtonWithSchema.propTypes = sidebarButtonPropsSchema;\n\nexport { SidebarButtonWithSchema as SidebarButton };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACcnB,SAEI,KAFJ;AAdJ,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,qBAAqB,0BAA0B,+BAA+B;AAEvF,SAAS,0BAA0B,4BAA4B;AAE/D,MAAM,gBAAgB,CAAC,UAA2C;AAChE,QAAM,6BAA6B,EAAE,GAAG,sBAAsB,GAAG,MAAM;AACvE,QAAM,EAAE,MAAM,SAAS,MAAM,OAAO,GAAG,KAAK,IAAI;AAChD,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI,KAAM,SAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC,uBAA+B,eAAa,kBAAkB,IAAI,IAAI,SAAS,aAAc,GAAG,MAC/F;AAAA,wBAAC,2BAAwB,YAAW,UAAS,gBAAe,UAC1D,8BAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,oBAAC,4BAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
+ import { Comments } from "@elliemae/ds-icons";
2
3
  import { PropTypes } from "@elliemae/ds-props-helpers";
3
4
  import { noop } from "lodash-es";
4
- import { Comments } from "@elliemae/ds-icons";
5
5
  const defaultSidebarButton = {
6
6
  Icon: Comments,
7
7
  dsId: "",
@@ -16,8 +16,10 @@ const propsSidebarButton = {
16
16
  title: PropTypes.string.description("Tooltip").defaultValue(defaultSidebarButton.title),
17
17
  onClick: PropTypes.func.description("The function to call when the is clicked").defaultValue(defaultSidebarButton.onClick)
18
18
  };
19
+ const sidebarButtonPropsSchema = propsSidebarButton;
19
20
  export {
20
21
  defaultSidebarButton,
21
- propsSidebarButton
22
+ propsSidebarButton,
23
+ sidebarButtonPropsSchema
22
24
  };
23
25
  //# sourceMappingURL=props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/props.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<SvgIconT.Props>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,SAAS,gBAAgB;AAUlB,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,UAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,UAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,UAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAC9C;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n\nexport const sidebarButtonPropsSchema = propsSidebarButton as unknown as ValidationMap<SidebarButtonProps>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,gBAAgB;AAEzB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAWd,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAA4D;AAAA,EACvE,MAAM,UAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,UAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,UAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAC9C;AAEO,MAAM,2BAA2B;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DSChatTileT } from '@elliemae/ds-chat-tile';
3
2
  export declare namespace DSChatSidebarT {
4
3
  type TooltipPlacementT = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
@@ -1,13 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SidebarButtonProps } from './props.js';
3
- export declare const SidebarButton: {
4
- ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element;
5
- propTypes: {
6
- Icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
7
- dsId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
8
- label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
9
- title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
10
- onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
11
- };
12
- defaultProps: SidebarButtonProps;
13
- };
2
+ declare const SidebarButtonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<SidebarButtonProps>;
3
+ export { SidebarButtonWithSchema as SidebarButton };
@@ -1,17 +1,13 @@
1
- import type React from 'react';
2
1
  import type { SvgIconT } from '@elliemae/ds-icons';
2
+ import type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
3
+ import type React from 'react';
3
4
  export interface SidebarButtonProps {
4
5
  Icon: React.FC<SvgIconT.Props>;
5
6
  dsId: string | number;
6
- label: string;
7
7
  onClick: (dsId: string | number) => void;
8
- title: string;
8
+ label?: string;
9
+ title?: string;
9
10
  }
10
11
  export declare const defaultSidebarButton: SidebarButtonProps;
11
- export declare const propsSidebarButton: {
12
- Icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
13
- dsId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
14
- label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
15
- title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
16
- onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
17
- };
12
+ export declare const propsSidebarButton: DSPropTypesSchema<SidebarButtonProps>;
13
+ export declare const sidebarButtonPropsSchema: ValidationMap<SidebarButtonProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledSidebarButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"button">, never>;
3
2
  export declare const StyledSidebarButtonIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
4
3
  export declare const StyledSidebarButtonLabel: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledSideBarContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
3
2
  export declare const StyledSideBarButtonsContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat-sidebar",
3
- "version": "3.52.1",
3
+ "version": "3.53.0-alpha.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat Sidebar",
6
6
  "files": [
@@ -36,17 +36,18 @@
36
36
  "typeSafety": true
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-chat-tile": "3.52.1",
40
- "@elliemae/ds-props-helpers": "3.52.1",
41
- "@elliemae/ds-icons": "3.52.1",
42
- "@elliemae/ds-grid": "3.52.1",
43
- "@elliemae/ds-system": "3.52.1"
39
+ "@elliemae/ds-chat-tile": "3.53.0-alpha.2",
40
+ "@elliemae/ds-grid": "3.53.0-alpha.2",
41
+ "@elliemae/ds-props-helpers": "3.53.0-alpha.2",
42
+ "@elliemae/ds-icons": "3.53.0-alpha.2",
43
+ "@elliemae/ds-system": "3.53.0-alpha.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@elliemae/pui-cli": "9.0.0-next.63",
46
+ "@elliemae/pui-cli": "9.0.0-next.65",
47
47
  "jest": "~29.7.0",
48
48
  "styled-components": "~5.3.9",
49
- "@elliemae/ds-monorepo-devops": "3.52.1"
49
+ "@elliemae/ds-monorepo-devops": "3.53.0-alpha.2",
50
+ "@elliemae/ds-test-utils": "3.53.0-alpha.2"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "lodash-es": "^4.17.21",