@elliemae/ds-chat-container-header 3.31.4 → 3.32.0-rc.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.
- package/dist/cjs/ChatContainerHeader.js +29 -30
- package/dist/cjs/ChatContainerHeader.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +2 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/ChatContainerHeader.js +29 -30
- package/dist/esm/ChatContainerHeader.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +3 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/react-desc-prop-types.d.ts +8 -5
- package/dist/types/styled.d.ts +4 -12
- package/package.json +6 -6
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(ChatContainerHeader_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_lodash = require("lodash");
|
|
38
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
39
40
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
40
41
|
var import_styled = require("./styled.js");
|
|
@@ -43,38 +44,36 @@ var import_ChatContainerHeaderDataTestIds = require("./ChatContainerHeaderDataTe
|
|
|
43
44
|
var import_DSChatContainerHeaderDefinitions = require("./DSChatContainerHeaderDefinitions.js");
|
|
44
45
|
const ChatContainerHeader = (props) => {
|
|
45
46
|
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes, import_DSChatContainerHeaderDefinitions.DSChatContainerHeaderName);
|
|
46
|
-
const
|
|
47
|
+
const globalProps = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(props), [
|
|
48
|
+
"cols",
|
|
49
|
+
"rows",
|
|
50
|
+
"wrap"
|
|
51
|
+
]);
|
|
47
52
|
const { title, children } = props;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
alignItems: "center",
|
|
52
|
-
cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
53
|
-
role: "heading",
|
|
54
|
-
"aria-level": "2",
|
|
55
|
-
...globalsAttr,
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
-
import_styled.StyledChatContainerContentHeaderLabel,
|
|
59
|
-
{
|
|
60
|
-
"data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_TITLE,
|
|
61
|
-
pl: "xxs",
|
|
62
|
-
pr: "xxs",
|
|
63
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: title })
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
-
import_styled.StyledChatContainerContentHeaderActions,
|
|
68
|
-
{
|
|
69
|
-
cols: import_react.default.Children.toArray(children).filter(Boolean).map(() => "32px"),
|
|
70
|
-
justifyContent: "flex-end",
|
|
71
|
-
"data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_CHILDREN,
|
|
72
|
-
children
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
53
|
+
const cols = import_react.default.useMemo(
|
|
54
|
+
() => ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
55
|
+
[children]
|
|
77
56
|
);
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledChatContainerContentHeader, { alignItems: "center", cols, role: "heading", "aria-level": 2, ...globalProps, children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
import_styled.StyledChatContainerContentHeaderLabel,
|
|
60
|
+
{
|
|
61
|
+
"data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_TITLE,
|
|
62
|
+
pl: "xxs",
|
|
63
|
+
pr: "xxs",
|
|
64
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: title })
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
import_styled.StyledChatContainerContentHeaderActions,
|
|
69
|
+
{
|
|
70
|
+
cols: import_react.default.Children.toArray(children).filter(Boolean).map(() => "32px"),
|
|
71
|
+
justifyContent: "flex-end",
|
|
72
|
+
"data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_CHILDREN,
|
|
73
|
+
children
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] });
|
|
78
77
|
};
|
|
79
78
|
ChatContainerHeader.propTypes = import_react_desc_prop_types.propTypes;
|
|
80
79
|
ChatContainerHeader.displayName = import_DSChatContainerHeaderDefinitions.DSChatContainerHeaderName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ChatContainerHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { describe, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { type DSGridT } from '@elliemae/ds-grid';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled.js';\nimport type { DSChatContainerHeaderT } from './react-desc-prop-types.js';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { ChatContainerHeaderDataTestIds } from './ChatContainerHeaderDataTestIds.js';\nimport { DSChatContainerHeaderName } from './DSChatContainerHeaderDefinitions.js';\n\nconst ChatContainerHeader: React.ComponentType<DSChatContainerHeaderT.Props> = (props) => {\n useValidateTypescriptPropTypes(props, propTypes, DSChatContainerHeaderName);\n\n const globalProps = omit(useGetGlobalAttributes<DSChatContainerHeaderT.InternalProps>(props), [\n 'cols',\n 'rows',\n 'wrap',\n ]);\n const { title, children } = props;\n const cols = React.useMemo<DSGridT.Props['cols']>(\n () => ['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px'],\n [children],\n );\n\n return (\n <StyledChatContainerContentHeader alignItems=\"center\" cols={cols} role=\"heading\" aria-level={2} {...globalProps}>\n <StyledChatContainerContentHeaderLabel\n data-testid={ChatContainerHeaderDataTestIds.HEADER_TITLE}\n pl=\"xxs\"\n pr=\"xxs\"\n >\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={React.Children.toArray(children)\n .filter(Boolean)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid={ChatContainerHeaderDataTestIds.HEADER_CHILDREN}\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n\nChatContainerHeader.propTypes = propTypes;\nChatContainerHeader.displayName = DSChatContainerHeaderName;\nconst ChatContainerHeaderWithSchema = describe(ChatContainerHeader);\nChatContainerHeaderWithSchema.propTypes = propTypes;\n\nexport { ChatContainerHeader, ChatContainerHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BnB;AA9BJ,mBAAkB;AAClB,oBAAqB;AACrB,8BAAiF;AACjF,uCAA2C;AAE3C,oBAIO;AAEP,mCAA0B;AAC1B,4CAA+C;AAC/C,8CAA0C;AAE1C,MAAM,sBAAyE,CAAC,UAAU;AACxF,8DAA+B,OAAO,wCAAW,iEAAyB;AAE1E,QAAM,kBAAc,wBAAK,gDAA6D,KAAK,GAAG;AAAA,IAC5F;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,EAAE,OAAO,SAAS,IAAI;AAC5B,QAAM,OAAO,aAAAA,QAAM;AAAA,IACjB,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,CAAC,QAAQ;AAAA,EACX;AAEA,SACE,6CAAC,kDAAiC,YAAW,UAAS,MAAY,MAAK,WAAU,cAAY,GAAI,GAAG,aAClG;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAa,qEAA+B;AAAA,QAC5C,IAAG;AAAA,QACH,IAAG;AAAA,QAEH,sDAAC,+DAA2B,OAAO,OAAO;AAAA;AAAA,IAC5C;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,aAAAA,QAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,QACnB,gBAAe;AAAA,QACf,eAAa,qEAA+B;AAAA,QAE3C;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,oCAAgC,kCAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,8 @@ module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
const propTypes = {
|
|
37
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
38
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
37
39
|
title: import_ds_props_helpers.PropTypes.string.isRequired.description(`Card's title`),
|
|
38
40
|
children: import_ds_props_helpers.PropTypes.node.description("Childrens")
|
|
39
41
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatContainerHeaderT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface OptionalProps {\n children?: React.ReactNode;\n }\n\n export interface Props
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatContainerHeaderT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface OptionalProps {\n children?: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.isRequired.description(`Card's title`),\n children: PropTypes.node.description('Childrens'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAAuE;AA4BhE,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,UAAU,kCAAU,KAAK,YAAY,WAAW;AAClD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid, type DSGridT } from '@elliemae/ds-grid';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const StyledChatContainerContentHeader = styled(Grid)<DSGridT.Props>`\n width: 100%;\n min-height: 48px;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n background: ${(props) => props.theme.colors.neutral['050']};\n ${StyledChatContainerContentHeaderActions as any} {\n & button {\n background: transparent;\n }\n }\n`;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid)`\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: 1.6;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAmC;AAE5B,MAAM,8CAA0C,yBAAO,mBAAI;AAAA;AAAA;AAI3D,MAAM,uCAAmC,yBAAO,mBAAI;AAAA;AAAA;AAAA,6BAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,gBACxD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IACvD;AAAA;AAAA;AAAA;AAAA;AAAA;AAQG,MAAM,4CAAwC,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA,WAKrD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
+
import { omit } from "lodash";
|
|
4
5
|
import { describe, useValidateTypescriptPropTypes, useGetGlobalAttributes } from "@elliemae/ds-props-helpers";
|
|
5
6
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
7
|
import {
|
|
@@ -13,38 +14,36 @@ import { ChatContainerHeaderDataTestIds } from "./ChatContainerHeaderDataTestIds
|
|
|
13
14
|
import { DSChatContainerHeaderName } from "./DSChatContainerHeaderDefinitions.js";
|
|
14
15
|
const ChatContainerHeader = (props) => {
|
|
15
16
|
useValidateTypescriptPropTypes(props, propTypes, DSChatContainerHeaderName);
|
|
16
|
-
const
|
|
17
|
+
const globalProps = omit(useGetGlobalAttributes(props), [
|
|
18
|
+
"cols",
|
|
19
|
+
"rows",
|
|
20
|
+
"wrap"
|
|
21
|
+
]);
|
|
17
22
|
const { title, children } = props;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
23
|
-
role: "heading",
|
|
24
|
-
"aria-level": "2",
|
|
25
|
-
...globalsAttr,
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
StyledChatContainerContentHeaderLabel,
|
|
29
|
-
{
|
|
30
|
-
"data-testid": ChatContainerHeaderDataTestIds.HEADER_TITLE,
|
|
31
|
-
pl: "xxs",
|
|
32
|
-
pr: "xxs",
|
|
33
|
-
children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: title })
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
StyledChatContainerContentHeaderActions,
|
|
38
|
-
{
|
|
39
|
-
cols: React2.Children.toArray(children).filter(Boolean).map(() => "32px"),
|
|
40
|
-
justifyContent: "flex-end",
|
|
41
|
-
"data-testid": ChatContainerHeaderDataTestIds.HEADER_CHILDREN,
|
|
42
|
-
children
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
]
|
|
46
|
-
}
|
|
23
|
+
const cols = React2.useMemo(
|
|
24
|
+
() => ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
25
|
+
[children]
|
|
47
26
|
);
|
|
27
|
+
return /* @__PURE__ */ jsxs(StyledChatContainerContentHeader, { alignItems: "center", cols, role: "heading", "aria-level": 2, ...globalProps, children: [
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
StyledChatContainerContentHeaderLabel,
|
|
30
|
+
{
|
|
31
|
+
"data-testid": ChatContainerHeaderDataTestIds.HEADER_TITLE,
|
|
32
|
+
pl: "xxs",
|
|
33
|
+
pr: "xxs",
|
|
34
|
+
children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: title })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
StyledChatContainerContentHeaderActions,
|
|
39
|
+
{
|
|
40
|
+
cols: React2.Children.toArray(children).filter(Boolean).map(() => "32px"),
|
|
41
|
+
justifyContent: "flex-end",
|
|
42
|
+
"data-testid": ChatContainerHeaderDataTestIds.HEADER_CHILDREN,
|
|
43
|
+
children
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
48
47
|
};
|
|
49
48
|
ChatContainerHeader.propTypes = propTypes;
|
|
50
49
|
ChatContainerHeader.displayName = DSChatContainerHeaderName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatContainerHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash';\nimport { describe, useValidateTypescriptPropTypes, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { type DSGridT } from '@elliemae/ds-grid';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled.js';\nimport type { DSChatContainerHeaderT } from './react-desc-prop-types.js';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { ChatContainerHeaderDataTestIds } from './ChatContainerHeaderDataTestIds.js';\nimport { DSChatContainerHeaderName } from './DSChatContainerHeaderDefinitions.js';\n\nconst ChatContainerHeader: React.ComponentType<DSChatContainerHeaderT.Props> = (props) => {\n useValidateTypescriptPropTypes(props, propTypes, DSChatContainerHeaderName);\n\n const globalProps = omit(useGetGlobalAttributes<DSChatContainerHeaderT.InternalProps>(props), [\n 'cols',\n 'rows',\n 'wrap',\n ]);\n const { title, children } = props;\n const cols = React.useMemo<DSGridT.Props['cols']>(\n () => ['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px'],\n [children],\n );\n\n return (\n <StyledChatContainerContentHeader alignItems=\"center\" cols={cols} role=\"heading\" aria-level={2} {...globalProps}>\n <StyledChatContainerContentHeaderLabel\n data-testid={ChatContainerHeaderDataTestIds.HEADER_TITLE}\n pl=\"xxs\"\n pr=\"xxs\"\n >\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={React.Children.toArray(children)\n .filter(Boolean)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid={ChatContainerHeaderDataTestIds.HEADER_CHILDREN}\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n\nChatContainerHeader.propTypes = propTypes;\nChatContainerHeader.displayName = DSChatContainerHeaderName;\nconst ChatContainerHeaderWithSchema = describe(ChatContainerHeader);\nChatContainerHeaderWithSchema.propTypes = propTypes;\n\nexport { ChatContainerHeader, ChatContainerHeaderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8BnB,SAMI,KANJ;AA9BJ,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,UAAU,gCAAgC,8BAA8B;AACjF,SAAS,kCAAkC;AAE3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAC1B,SAAS,sCAAsC;AAC/C,SAAS,iCAAiC;AAE1C,MAAM,sBAAyE,CAAC,UAAU;AACxF,iCAA+B,OAAO,WAAW,yBAAyB;AAE1E,QAAM,cAAc,KAAK,uBAA6D,KAAK,GAAG;AAAA,IAC5F;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,EAAE,OAAO,SAAS,IAAI;AAC5B,QAAM,OAAOA,OAAM;AAAA,IACjB,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,CAAC,QAAQ;AAAA,EACX;AAEA,SACE,qBAAC,oCAAiC,YAAW,UAAS,MAAY,MAAK,WAAU,cAAY,GAAI,GAAG,aAClG;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAa,+BAA+B;AAAA,QAC5C,IAAG;AAAA,QACH,IAAG;AAAA,QAEH,8BAAC,8BAA2B,OAAO,OAAO;AAAA;AAAA,IAC5C;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAMA,OAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,QACnB,gBAAe;AAAA,QACf,eAAa,+BAA+B;AAAA,QAE3C;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const propTypes = {
|
|
4
|
+
...globalAttributesPropTypes,
|
|
5
|
+
...xstyledPropTypes,
|
|
4
6
|
title: PropTypes.string.isRequired.description(`Card's title`),
|
|
5
7
|
children: PropTypes.node.description("Childrens")
|
|
6
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatContainerHeaderT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface OptionalProps {\n children?: React.ReactNode;\n }\n\n export interface Props
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatContainerHeaderT {\n export interface RequiredProps {\n title: string;\n }\n\n export interface OptionalProps {\n children?: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.isRequired.description(`Card's title`),\n children: PropTypes.node.description('Childrens'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AA4BhE,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,UAAU,UAAU,KAAK,YAAY,WAAW;AAClD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -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';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid, type DSGridT } from '@elliemae/ds-grid';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const StyledChatContainerContentHeader = styled(Grid)<DSGridT.Props>`\n width: 100%;\n min-height: 48px;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n background: ${(props) => props.theme.colors.neutral['050']};\n ${StyledChatContainerContentHeaderActions as any} {\n & button {\n background: transparent;\n }\n }\n`;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid)`\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n line-height: 1.6;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAA0B;AAE5B,MAAM,0CAA0C,OAAO,IAAI;AAAA;AAAA;AAI3D,MAAM,mCAAmC,OAAO,IAAI;AAAA;AAAA;AAAA,6BAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,gBACxD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IACvD;AAAA;AAAA;AAAA;AAAA;AAAA;AAQG,MAAM,wCAAwC,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,WAKrD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { WeakValidationMap } from 'react';
|
|
1
2
|
import type React from 'react';
|
|
3
|
+
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
2
4
|
export declare namespace DSChatContainerHeaderT {
|
|
3
5
|
interface RequiredProps {
|
|
4
6
|
title: string;
|
|
@@ -6,10 +8,11 @@ export declare namespace DSChatContainerHeaderT {
|
|
|
6
8
|
interface OptionalProps {
|
|
7
9
|
children?: React.ReactNode;
|
|
8
10
|
}
|
|
9
|
-
interface
|
|
11
|
+
interface DefaultProps {
|
|
12
|
+
}
|
|
13
|
+
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
|
|
14
|
+
}
|
|
15
|
+
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof RequiredProps>, XstyledProps, RequiredProps {
|
|
10
16
|
}
|
|
11
17
|
}
|
|
12
|
-
export declare const propTypes:
|
|
13
|
-
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
|
-
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
15
|
-
};
|
|
18
|
+
export declare const propTypes: WeakValidationMap<unknown>;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[x: symbol]: any;
|
|
7
|
-
} & {
|
|
8
|
-
theme?: import("@elliemae/ds-system").Theme | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
as?: string | import("react").ComponentType<any> | undefined;
|
|
11
|
-
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
12
|
-
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
13
|
-
export declare const StyledChatContainerContentHeaderLabel: 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>;
|
|
2
|
+
import { type DSGridT } from '@elliemae/ds-grid';
|
|
3
|
+
export declare const StyledChatContainerContentHeaderActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<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<DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
4
|
+
export declare const StyledChatContainerContentHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, DSGridT.Props & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
5
|
+
export declare const StyledChatContainerContentHeaderLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<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<DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-container-header",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.32.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Container Header",
|
|
6
6
|
"files": [
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"typeSafety": true
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-grid": "3.
|
|
51
|
-
"@elliemae/ds-props-helpers": "3.
|
|
52
|
-
"@elliemae/ds-system": "3.
|
|
53
|
-
"@elliemae/ds-truncated-tooltip-text": "3.
|
|
50
|
+
"@elliemae/ds-grid": "3.32.0-rc.2",
|
|
51
|
+
"@elliemae/ds-props-helpers": "3.32.0-rc.2",
|
|
52
|
+
"@elliemae/ds-system": "3.32.0-rc.2",
|
|
53
|
+
"@elliemae/ds-truncated-tooltip-text": "3.32.0-rc.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
57
57
|
"@types/react": "latest",
|
|
58
58
|
"styled-components": "~5.3.9",
|
|
59
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
59
|
+
"@elliemae/ds-monorepo-devops": "3.32.0-rc.2"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"lodash": "^4.17.21",
|