@elliemae/ds-chat-container-header 3.61.5-rc.1 → 3.70.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/ChatContainerHeader.js +57 -29
  2. package/dist/cjs/ChatContainerHeader.js.map +2 -2
  3. package/dist/cjs/TruncatedTooltipText.js +118 -0
  4. package/dist/cjs/TruncatedTooltipText.js.map +7 -0
  5. package/dist/cjs/{DSChatContainerHeaderDefinitions.js → constants/index.js} +22 -4
  6. package/dist/cjs/constants/index.js.map +7 -0
  7. package/dist/cjs/index.js +10 -3
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/package.json +4 -1
  10. package/dist/cjs/react-desc-prop-types.js +11 -2
  11. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  12. package/dist/cjs/styled.js +23 -3
  13. package/dist/cjs/styled.js.map +2 -2
  14. package/dist/cjs/{ChatContainerHeaderDataTestIds.js → typescript-testing/slot-props.js} +15 -14
  15. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  16. package/dist/cjs/typescript-testing/typescript-chat-container-header-valid.js +22 -5
  17. package/dist/cjs/typescript-testing/typescript-chat-container-header-valid.js.map +2 -2
  18. package/dist/esm/ChatContainerHeader.js +64 -30
  19. package/dist/esm/ChatContainerHeader.js.map +2 -2
  20. package/dist/esm/TruncatedTooltipText.js +92 -0
  21. package/dist/esm/TruncatedTooltipText.js.map +7 -0
  22. package/dist/esm/constants/index.js +24 -0
  23. package/dist/esm/constants/index.js.map +7 -0
  24. package/dist/esm/index.js +21 -4
  25. package/dist/esm/index.js.map +3 -3
  26. package/dist/esm/package.json +4 -1
  27. package/dist/esm/react-desc-prop-types.js +17 -3
  28. package/dist/esm/react-desc-prop-types.js.map +2 -2
  29. package/dist/esm/styled.js +24 -4
  30. package/dist/esm/styled.js.map +2 -2
  31. package/dist/esm/typescript-testing/slot-props.js +17 -0
  32. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  33. package/dist/esm/typescript-testing/typescript-chat-container-header-valid.js +22 -5
  34. package/dist/esm/typescript-testing/typescript-chat-container-header-valid.js.map +2 -2
  35. package/dist/types/ChatContainerHeader.d.ts +3 -1
  36. package/dist/types/TruncatedTooltipText.d.ts +10 -0
  37. package/dist/types/constants/index.d.ts +15 -0
  38. package/dist/types/index.d.ts +4 -3
  39. package/dist/types/react-desc-prop-types.d.ts +18 -8
  40. package/dist/types/styled.d.ts +3 -1
  41. package/dist/types/tests/DSChatContainerHeader.api.test.d.ts +1 -0
  42. package/dist/types/tests/DSChatContainerHeader.data-testid.test.d.ts +1 -0
  43. package/dist/types/tests/DSChatContainerHeader.events.test.d.ts +1 -0
  44. package/dist/types/tests/DSChatContainerHeader.exports.test.d.ts +1 -0
  45. package/dist/types/tests/DSChatContainerHeader.get-owner-props-arguments.test.d.ts +1 -0
  46. package/dist/types/tests/DSChatContainerHeader.keyboard.test.d.ts +1 -0
  47. package/dist/types/tests/DSChatContainerHeader.pui-17062.test.d.ts +1 -0
  48. package/dist/types/typescript-testing/slot-props.d.ts +1 -0
  49. package/package.json +7 -7
  50. package/dist/cjs/ChatContainerHeaderDataTestIds.js.map +0 -7
  51. package/dist/cjs/DSChatContainerHeaderDefinitions.js.map +0 -7
  52. package/dist/esm/ChatContainerHeaderDataTestIds.js +0 -9
  53. package/dist/esm/ChatContainerHeaderDataTestIds.js.map +0 -7
  54. package/dist/esm/DSChatContainerHeaderDefinitions.js +0 -6
  55. package/dist/esm/DSChatContainerHeaderDefinitions.js.map +0 -7
  56. package/dist/types/ChatContainerHeaderDataTestIds.d.ts +0 -4
  57. package/dist/types/DSChatContainerHeaderDefinitions.d.ts +0 -1
  58. /package/dist/types/tests/{ChatContainerHeader.test.d.ts → DSChatContainerHeader.a11y.test.d.ts} +0 -0
@@ -29,7 +29,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var ChatContainerHeader_exports = {};
30
30
  __export(ChatContainerHeader_exports, {
31
31
  ChatContainerHeader: () => ChatContainerHeader,
32
- ChatContainerHeaderWithSchema: () => ChatContainerHeaderWithSchema
32
+ ChatContainerHeaderWithSchema: () => ChatContainerHeaderWithSchema,
33
+ DSChatContainerHeader: () => DSChatContainerHeader,
34
+ DSChatContainerHeaderWithSchema: () => DSChatContainerHeaderWithSchema
33
35
  });
34
36
  module.exports = __toCommonJS(ChatContainerHeader_exports);
35
37
  var React = __toESM(require("react"));
@@ -37,46 +39,72 @@ var import_jsx_runtime = require("react/jsx-runtime");
37
39
  var import_react = __toESM(require("react"));
38
40
  var import_lodash_es = require("lodash-es");
39
41
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
- var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
42
+ var import_TruncatedTooltipText = require("./TruncatedTooltipText.js");
41
43
  var import_styled = require("./styled.js");
42
44
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
43
- var import_ChatContainerHeaderDataTestIds = require("./ChatContainerHeaderDataTestIds.js");
44
- var import_DSChatContainerHeaderDefinitions = require("./DSChatContainerHeaderDefinitions.js");
45
+ var import_constants = require("./constants/index.js");
45
46
  const ChatContainerHeader = (props) => {
46
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.propTypes, import_DSChatContainerHeaderDefinitions.DSChatContainerHeaderName);
47
- const globalProps = (0, import_lodash_es.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(props), [
47
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
48
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propTypes, import_constants.DSChatContainerHeaderName);
49
+ const globalProps = (0, import_lodash_es.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault), [
48
50
  "cols",
49
51
  "rows",
50
52
  "wrap",
51
53
  "title"
52
54
  ]);
53
- const { title, children } = props;
55
+ const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
56
+ const { title, children, wrapText } = propsWithDefault;
54
57
  const cols = import_react.default.useMemo(
55
58
  () => ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
56
59
  [children]
57
60
  );
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledChatContainerContentHeader, { alignItems: "center", cols, role: "heading", "aria-level": 2, ...globalProps, children: [
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
- import_styled.StyledChatContainerContentHeaderLabel,
61
- {
62
- "data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_TITLE,
63
- pl: "xxs",
64
- pr: "xxs",
65
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: title })
66
- }
67
- ),
68
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- import_styled.StyledChatContainerContentHeaderActions,
70
- {
71
- cols: import_react.default.Children.toArray(children).filter(Boolean).map(() => "32px"),
72
- justifyContent: "flex-end",
73
- "data-testid": import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds.HEADER_CHILDREN,
74
- children
75
- }
76
- )
77
- ] });
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
+ import_styled.StyledChatContainerContentHeader,
63
+ {
64
+ alignItems: "center",
65
+ cols,
66
+ role: "heading",
67
+ "aria-level": 2,
68
+ ...globalProps,
69
+ getOwnerProps,
70
+ getOwnerPropsArguments,
71
+ children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_styled.StyledChatContainerContentHeaderLabel,
74
+ {
75
+ "data-testid": import_constants.CHAT_CONTAINER_HEADER_DATA_TESTID.HEADER_TITLE,
76
+ pl: "xxs",
77
+ pr: "xxs",
78
+ $wrapText: wrapText,
79
+ getOwnerProps,
80
+ getOwnerPropsArguments,
81
+ children: wrapText ? title : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
+ import_TruncatedTooltipText.TruncatedTooltipText,
83
+ {
84
+ value: title,
85
+ getOwnerProps,
86
+ getOwnerPropsArguments
87
+ }
88
+ )
89
+ }
90
+ ),
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ import_styled.StyledChatContainerContentHeaderActions,
93
+ {
94
+ cols: import_react.default.Children.toArray(children).filter(Boolean).map(() => "32px"),
95
+ justifyContent: "flex-end",
96
+ "data-testid": import_constants.CHAT_CONTAINER_HEADER_DATA_TESTID.HEADER_CHILDREN,
97
+ getOwnerProps,
98
+ getOwnerPropsArguments,
99
+ children
100
+ }
101
+ )
102
+ ]
103
+ }
104
+ );
78
105
  };
79
- ChatContainerHeader.displayName = import_DSChatContainerHeaderDefinitions.DSChatContainerHeaderName;
106
+ ChatContainerHeader.displayName = import_constants.DSChatContainerHeaderName;
80
107
  const ChatContainerHeaderWithSchema = (0, import_ds_props_helpers.describe)(ChatContainerHeader);
81
- ChatContainerHeaderWithSchema.propTypes = import_react_desc_prop_types.propTypes;
108
+ const DSChatContainerHeader = ChatContainerHeader;
109
+ const DSChatContainerHeaderWithSchema = ChatContainerHeaderWithSchema;
82
110
  //# sourceMappingURL=ChatContainerHeader.js.map
@@ -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 React from 'react';\nimport { omit } from 'lodash-es';\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 'title',\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.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;AD+BnB;AA/BJ,mBAAkB;AAClB,uBAAqB;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,2BAAK,gDAA6D,KAAK,GAAG;AAAA,IAC5F;AAAA,IACA;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,cAAc;AAClC,MAAM,oCAAgC,kCAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash-es';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { type DSGridT } from '@elliemae/ds-grid';\nimport { TruncatedTooltipText } from './TruncatedTooltipText.js';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled.js';\nimport type { DSChatContainerHeaderT } from './react-desc-prop-types.js';\nimport { defaultProps, propTypes } from './react-desc-prop-types.js';\nimport { CHAT_CONTAINER_HEADER_DATA_TESTID, DSChatContainerHeaderName } from './constants/index.js';\n\nconst ChatContainerHeader: React.ComponentType<DSChatContainerHeaderT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatContainerHeaderT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes, DSChatContainerHeaderName);\n\n // `title` is omitted from globalProps to avoid forwarding it to the DOM as the native `title`\n // attribute (which would produce an unwanted browser tooltip on the header element).\n const globalProps = omit(useGetGlobalAttributes<DSChatContainerHeaderT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\n 'title',\n ]);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatContainerHeaderT.Props>(propsWithDefault);\n const { title, children, wrapText } = propsWithDefault;\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\n alignItems=\"center\"\n cols={cols}\n role=\"heading\"\n aria-level={2}\n {...globalProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChatContainerContentHeaderLabel\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_CONTAINER_HEADER_DATA_TESTID.HEADER_TITLE}\n pl=\"xxs\"\n pr=\"xxs\"\n $wrapText={wrapText}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {wrapText ? (\n title\n ) : (\n <TruncatedTooltipText\n value={title}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={React.Children.toArray(children)\n .filter(Boolean)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_CONTAINER_HEADER_DATA_TESTID.HEADER_CHILDREN}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n\nChatContainerHeader.displayName = DSChatContainerHeaderName;\nconst ChatContainerHeaderWithSchema = describe(ChatContainerHeader);\n\n// DS-prefixed canonical names (modern Dimsum convention) \u2014 ChatContainerHeader kept as alias for backwards compat\nconst DSChatContainerHeader = ChatContainerHeader;\nconst DSChatContainerHeaderWithSchema = ChatContainerHeaderWithSchema;\n\nexport { ChatContainerHeader, ChatContainerHeaderWithSchema, DSChatContainerHeader, DSChatContainerHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCnB;AAxCJ,mBAAkB;AAClB,uBAAqB;AACrB,8BAMO;AAEP,kCAAqC;AACrC,oBAIO;AAEP,mCAAwC;AACxC,uBAA6E;AAE7E,MAAM,sBAAyE,CAAC,UAAU;AACxF,QAAM,uBAAmB,sDAAmE,OAAO,yCAAY;AAC/G,8DAA+B,kBAAkB,wCAAW,0CAAyB;AAIrF,QAAM,kBAAc,2BAAK,gDAA6D,gBAAgB,GAAG;AAAA,IACvG;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAA4C,gBAAgB;AAC9G,QAAM,EAAE,OAAO,UAAU,SAAS,IAAI;AACtC,QAAM,OAAO,aAAAA,QAAM;AAAA,IACjB,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,CAAC,QAAQ;AAAA,EACX;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAW;AAAA,MACX;AAAA,MACA,MAAK;AAAA,MACL,cAAY;AAAA,MACX,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YAEC,eAAa,mDAAkC;AAAA,YAC/C,IAAG;AAAA,YACH,IAAG;AAAA,YACH,WAAW;AAAA,YACX;AAAA,YACA;AAAA,YAEC,qBACC,QAEA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP;AAAA,gBACA;AAAA;AAAA,YACF;AAAA;AAAA,QAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,aAAAA,QAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,YACnB,gBAAe;AAAA,YAEf,eAAa,mDAAkC;AAAA,YAC/C;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,oBAAoB,cAAc;AAClC,MAAM,oCAAgC,kCAAS,mBAAmB;AAGlE,MAAM,wBAAwB;AAC9B,MAAM,kCAAkC;",
6
6
  "names": ["React"]
7
7
  }
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var TruncatedTooltipText_exports = {};
30
+ __export(TruncatedTooltipText_exports, {
31
+ TruncatedTooltipText: () => TruncatedTooltipText,
32
+ default: () => TruncatedTooltipText_default
33
+ });
34
+ module.exports = __toCommonJS(TruncatedTooltipText_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_react = require("react");
38
+ var import_ds_system = require("@elliemae/ds-system");
39
+ var import_ds_floating_context = require("@elliemae/ds-floating-context");
40
+ var import_constants = require("./constants/index.js");
41
+ const TruncatedSpan = (0, import_ds_system.styled)("span", {
42
+ name: import_constants.DSChatContainerHeaderName,
43
+ slot: import_constants.CHAT_CONTAINER_HEADER_SLOTS.TOOLTIP_TEXT
44
+ })`
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ overflow: hidden;
48
+ display: inline-block;
49
+ max-width: 100%;
50
+ `;
51
+ const TooltipContainer = (0, import_ds_system.styled)("div", {
52
+ name: import_constants.DSChatContainerHeaderName,
53
+ slot: import_constants.CHAT_CONTAINER_HEADER_SLOTS.TOOLTIP_CONTAINER
54
+ })`
55
+ text-align: center;
56
+ min-width: ${({ theme }) => theme.space.l};
57
+ max-width: 250px;
58
+ overflow-wrap: break-word;
59
+ word-break: break-word;
60
+ min-height: 30px;
61
+ display: grid;
62
+ align-items: center;
63
+ padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
64
+ position: relative;
65
+ background-color: white;
66
+ border-radius: 2px;
67
+ font-size: 13px;
68
+ color: ${({ theme }) => theme.colors.neutral[600]};
69
+ pointer-events: none;
70
+ `;
71
+ const TruncatedTooltipText = ({
72
+ value = "",
73
+ placement = "top",
74
+ getOwnerProps,
75
+ getOwnerPropsArguments
76
+ }) => {
77
+ const [showTooltip, setShowTooltip] = (0, import_react.useState)(false);
78
+ const { refs, floatingStyles, arrowStyles, context } = (0, import_ds_floating_context.useFloatingContext)({
79
+ placement,
80
+ externallyControlledIsOpen: showTooltip,
81
+ withoutAnimation: true
82
+ });
83
+ const handleMouseEnter = (0, import_react.useCallback)((e) => {
84
+ const el = e.currentTarget;
85
+ setShowTooltip(el.offsetWidth < el.scrollWidth);
86
+ }, []);
87
+ const handleMouseLeave = (0, import_react.useCallback)(() => {
88
+ setShowTooltip(false);
89
+ }, []);
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ TruncatedSpan,
93
+ {
94
+ innerRef: refs.setReference,
95
+ onMouseEnter: handleMouseEnter,
96
+ onMouseLeave: handleMouseLeave,
97
+ getOwnerProps,
98
+ getOwnerPropsArguments,
99
+ children: value
100
+ }
101
+ ),
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
+ import_ds_floating_context.FloatingWrapper,
104
+ {
105
+ innerRef: refs.setFloating,
106
+ isOpen: showTooltip,
107
+ floatingStyles,
108
+ context,
109
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipContainer, { getOwnerProps, getOwnerPropsArguments, children: [
110
+ value,
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_floating_context.PopoverArrow, { ...arrowStyles })
112
+ ] })
113
+ }
114
+ )
115
+ ] });
116
+ };
117
+ var TruncatedTooltipText_default = TruncatedTooltipText;
118
+ //# sourceMappingURL=TruncatedTooltipText.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TruncatedTooltipText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\nimport { CHAT_CONTAINER_HEADER_SLOTS, DSChatContainerHeaderName } from './constants/index.js';\n\nconst TruncatedSpan = styled('span', {\n name: DSChatContainerHeaderName,\n slot: CHAT_CONTAINER_HEADER_SLOTS.TOOLTIP_TEXT,\n})`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n// Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency\nconst TooltipContainer = styled('div', {\n name: DSChatContainerHeaderName,\n slot: CHAT_CONTAINER_HEADER_SLOTS.TOOLTIP_CONTAINER,\n})`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n overflow-wrap: break-word;\n word-break: break-word;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n pointer-events: none;\n`;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nconst TruncatedTooltipText = ({\n value = '',\n placement = 'top',\n getOwnerProps,\n getOwnerPropsArguments,\n}: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: showTooltip,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback((e: React.MouseEvent<HTMLSpanElement>) => {\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <TruncatedSpan\n innerRef={refs.setReference}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {value}\n </TruncatedSpan>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={showTooltip}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {value}\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n </>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0EnB;AA1EJ,mBAA6C;AAC7C,uBAAuB;AACvB,iCAKO;AACP,uBAAuE;AAEvE,MAAM,oBAAgB,yBAAO,QAAQ;AAAA,EACnC,MAAM;AAAA,EACN,MAAM,6CAA4B;AACpC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASD,MAAM,uBAAmB,yBAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,MAAM,6CAA4B;AACpC,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAO9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKvD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAWnD,MAAM,uBAAuB,CAAC;AAAA,EAC5B,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MAAiC;AAC/B,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,QAAI,+CAAmB;AAAA,IACxE;AAAA,IACA,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,uBAAmB,0BAAY,CAAC,MAAyC;AAC7E,UAAM,KAAK,EAAE;AACb,mBAAe,GAAG,cAAc,GAAG,WAAW;AAAA,EAChD,GAAG,CAAC,CAAC;AAEL,QAAM,uBAAmB,0BAAY,MAAM;AACzC,mBAAe,KAAK;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,cAAc;AAAA,QACd,cAAc;AAAA,QACd;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QAEA,uDAAC,oBAAiB,eAA8B,wBAC7C;AAAA;AAAA,UACD,4CAAC,2CAAc,GAAG,aAAa;AAAA,WACjC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,+BAAQ;",
6
+ "names": []
7
+ }
@@ -26,11 +26,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSChatContainerHeaderDefinitions_exports = {};
30
- __export(DSChatContainerHeaderDefinitions_exports, {
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ CHAT_CONTAINER_HEADER_DATA_TESTID: () => CHAT_CONTAINER_HEADER_DATA_TESTID,
32
+ CHAT_CONTAINER_HEADER_SLOTS: () => CHAT_CONTAINER_HEADER_SLOTS,
31
33
  DSChatContainerHeaderName: () => DSChatContainerHeaderName
32
34
  });
33
- module.exports = __toCommonJS(DSChatContainerHeaderDefinitions_exports);
35
+ module.exports = __toCommonJS(constants_exports);
34
36
  var React = __toESM(require("react"));
37
+ var import_ds_system = require("@elliemae/ds-system");
35
38
  const DSChatContainerHeaderName = "DSChatcontainerheader";
36
- //# sourceMappingURL=DSChatContainerHeaderDefinitions.js.map
39
+ const CHAT_CONTAINER_HEADER_SLOTS = {
40
+ ROOT: "root",
41
+ HEADER_TITLE: "header-title",
42
+ // legacy data-testid override applied below
43
+ HEADER_CHILDREN: "header-children",
44
+ // legacy data-testid override applied below
45
+ TOOLTIP_TEXT: "tooltip-text",
46
+ TOOLTIP_CONTAINER: "tooltip-container"
47
+ };
48
+ const CHAT_CONTAINER_HEADER_DATA_TESTID = {
49
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSChatContainerHeaderName, CHAT_CONTAINER_HEADER_SLOTS),
50
+ // legacy values — preserved for QA/consumer compatibility, breaking change if removed
51
+ HEADER_TITLE: "chat-header-title",
52
+ HEADER_CHILDREN: "chat-header-children"
53
+ };
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatContainerHeaderName = 'DSChatcontainerheader';\n\nexport const CHAT_CONTAINER_HEADER_SLOTS = {\n ROOT: 'root',\n HEADER_TITLE: 'header-title', // legacy data-testid override applied below\n HEADER_CHILDREN: 'header-children', // legacy data-testid override applied below\n TOOLTIP_TEXT: 'tooltip-text',\n TOOLTIP_CONTAINER: 'tooltip-container',\n} as const;\n\nexport const CHAT_CONTAINER_HEADER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatContainerHeaderName, CHAT_CONTAINER_HEADER_SLOTS),\n // legacy values \u2014 preserved for QA/consumer compatibility, breaking change if removed\n HEADER_TITLE: 'chat-header-title',\n HEADER_CHILDREN: 'chat-header-children',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,4BAA4B;AAElC,MAAM,8BAA8B;AAAA,EACzC,MAAM;AAAA,EACN,cAAc;AAAA;AAAA,EACd,iBAAiB;AAAA;AAAA,EACjB,cAAc;AAAA,EACd,mBAAmB;AACrB;AAEO,MAAM,oCAAoC;AAAA,EAC/C,OAAG,0CAAwB,2BAA2B,2BAA2B;AAAA;AAAA,EAEjF,cAAc;AAAA,EACd,iBAAiB;AACnB;",
6
+ "names": []
7
+ }
package/dist/cjs/index.js CHANGED
@@ -28,12 +28,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
+ CHAT_CONTAINER_HEADER_DATA_TESTID: () => import_constants.CHAT_CONTAINER_HEADER_DATA_TESTID,
32
+ CHAT_CONTAINER_HEADER_SLOTS: () => import_constants.CHAT_CONTAINER_HEADER_SLOTS,
31
33
  ChatContainerHeader: () => import_ChatContainerHeader.ChatContainerHeader,
32
- ChatContainerHeaderDataTestIds: () => import_ChatContainerHeaderDataTestIds.ChatContainerHeaderDataTestIds,
33
- ChatContainerHeaderWithSchema: () => import_ChatContainerHeader.ChatContainerHeaderWithSchema
34
+ ChatContainerHeaderDataTestIds: () => import_constants.CHAT_CONTAINER_HEADER_DATA_TESTID,
35
+ ChatContainerHeaderPropTypes: () => import_react_desc_prop_types.propTypes,
36
+ ChatContainerHeaderWithSchema: () => import_ChatContainerHeader.ChatContainerHeaderWithSchema,
37
+ DSChatContainerHeader: () => import_ChatContainerHeader.DSChatContainerHeader,
38
+ DSChatContainerHeaderName: () => import_constants.DSChatContainerHeaderName,
39
+ DSChatContainerHeaderWithSchema: () => import_ChatContainerHeader.DSChatContainerHeaderWithSchema
34
40
  });
35
41
  module.exports = __toCommonJS(index_exports);
36
42
  var React = __toESM(require("react"));
37
43
  var import_ChatContainerHeader = require("./ChatContainerHeader.js");
38
- var import_ChatContainerHeaderDataTestIds = require("./ChatContainerHeaderDataTestIds.js");
44
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
45
+ var import_constants = require("./constants/index.js");
39
46
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ChatContainerHeader, ChatContainerHeaderWithSchema } from './ChatContainerHeader.js';\nexport { ChatContainerHeaderDataTestIds } from './ChatContainerHeaderDataTestIds.js';\nexport type { DSChatContainerHeaderT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAmE;AACnE,4CAA+C;",
4
+ "sourcesContent": ["export {\n ChatContainerHeader,\n ChatContainerHeaderWithSchema,\n DSChatContainerHeader,\n DSChatContainerHeaderWithSchema,\n} from './ChatContainerHeader.js';\nexport { type DSChatContainerHeaderT, propTypes as ChatContainerHeaderPropTypes } from './react-desc-prop-types.js';\nexport {\n CHAT_CONTAINER_HEADER_DATA_TESTID as ChatContainerHeaderDataTestIds, // LEGACY EXPORT\n CHAT_CONTAINER_HEADER_DATA_TESTID,\n CHAT_CONTAINER_HEADER_SLOTS,\n DSChatContainerHeaderName,\n} from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAKO;AACP,mCAAuF;AACvF,uBAKO;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
- "sideEffects": false
3
+ "sideEffects": false,
4
+ "publishConfig": {
5
+ "access": "public"
6
+ }
4
7
  }
@@ -28,15 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
+ defaultProps: () => defaultProps,
31
32
  propTypes: () => propTypes
32
33
  });
33
34
  module.exports = __toCommonJS(react_desc_prop_types_exports);
34
35
  var React = __toESM(require("react"));
35
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
+ var import_constants = require("./constants/index.js");
38
+ const defaultProps = {
39
+ wrapText: false
40
+ };
36
41
  const propTypes = {
42
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSChatContainerHeaderName, import_constants.CHAT_CONTAINER_HEADER_SLOTS),
37
43
  ...import_ds_props_helpers.globalAttributesPropTypes,
38
44
  ...import_ds_props_helpers.xstyledPropTypes,
39
- title: import_ds_props_helpers.PropTypes.string.isRequired.description(`Card's title`),
40
- children: import_ds_props_helpers.PropTypes.node.description("Childrens")
45
+ title: import_ds_props_helpers.PropTypes.string.isRequired.description(`Header title`),
46
+ children: import_ds_props_helpers.PropTypes.node.description("Children rendered in the actions area"),
47
+ wrapText: import_ds_props_helpers.PropTypes.bool.description(
48
+ "When true, the title wraps onto multiple lines and the built-in truncation tooltip is NOT rendered. When false (default) the title is truncated with an ellipsis and a tooltip is shown on hover/focus."
49
+ ).defaultValue(defaultProps.wrapText)
41
50
  };
42
51
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -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 { 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;",
4
+ "sourcesContent": ["import type React from 'react';\nimport {\n type DSPropTypesSchema,\n type GlobalAttributesT,\n type XstyledProps,\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CHAT_CONTAINER_HEADER_SLOTS, DSChatContainerHeaderName } from './constants/index.js';\n\nexport declare namespace DSChatContainerHeaderT {\n // hand-written per-slot function argument map \u2014 one entry per slot in CHAT_CONTAINER_HEADER_SLOTS.\n export type SlotFunctionArguments = {\n dsChatcontainerheaderRoot: () => object;\n dsChatcontainerheaderHeaderTitle: () => object;\n dsChatcontainerheaderHeaderChildren: () => object;\n dsChatcontainerheaderTooltipText: () => object;\n dsChatcontainerheaderTooltipContainer: () => object;\n };\n\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n wrapText: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSChatContainerHeaderName,\n typeof CHAT_CONTAINER_HEADER_SLOTS\n > {\n children?: React.ReactNode;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatContainerHeaderT.DefaultProps = {\n wrapText: false,\n};\n\nexport const propTypes: DSPropTypesSchema<DSChatContainerHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatContainerHeaderName, CHAT_CONTAINER_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.isRequired.description(`Header title`),\n children: PropTypes.node.description('Children rendered in the actions area'),\n wrapText: PropTypes.bool\n .description(\n 'When true, the title wraps onto multiple lines and the built-in truncation tooltip is NOT rendered. ' +\n 'When false (default) the title is truncated with an ellipsis and a tooltip is shown on hover/focus.',\n )\n .defaultValue(defaultProps.wrapText),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAQO;AAEP,uBAAuE;AA2ChE,MAAM,eAAoD;AAAA,EAC/D,UAAU;AACZ;AAEO,MAAM,YAA6D;AAAA,EACxE,OAAG,kDAAyB,4CAA2B,4CAA2B;AAAA,EAClF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,UAAU,kCAAU,KAAK,YAAY,uCAAuC;AAAA,EAC5E,UAAU,kCAAU,KACjB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,aAAa,QAAQ;AACvC;",
6
6
  "names": []
7
7
  }
@@ -36,10 +36,19 @@ module.exports = __toCommonJS(styled_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
38
  var import_ds_grid = require("@elliemae/ds-grid");
39
- const StyledChatContainerContentHeaderActions = (0, import_ds_system.styled)(import_ds_grid.Grid)`
39
+ var import_constants = require("./constants/index.js");
40
+ const StyledChatContainerContentHeaderActions = (0, import_ds_system.styled)(import_ds_grid.Grid, {
41
+ name: import_constants.DSChatContainerHeaderName,
42
+ slot: import_constants.CHAT_CONTAINER_HEADER_SLOTS.HEADER_CHILDREN,
43
+ // legacy data-testid `chat-header-children` is preserved via inline JSX data-testid
44
+ preserveLegacyDataTestId: true
45
+ })`
40
46
  max-width: 80px;
41
47
  `;
42
- const StyledChatContainerContentHeader = (0, import_ds_system.styled)(import_ds_grid.Grid)`
48
+ const StyledChatContainerContentHeader = (0, import_ds_system.styled)(import_ds_grid.Grid, {
49
+ name: import_constants.DSChatContainerHeaderName,
50
+ slot: import_constants.CHAT_CONTAINER_HEADER_SLOTS.ROOT
51
+ })`
43
52
  width: 100%;
44
53
  min-height: 48px;
45
54
  border-bottom: 1px solid ${(props) => props.theme.colors.neutral["200"]};
@@ -50,12 +59,23 @@ const StyledChatContainerContentHeader = (0, import_ds_system.styled)(import_ds_
50
59
  }
51
60
  }
52
61
  `;
53
- const StyledChatContainerContentHeaderLabel = (0, import_ds_system.styled)(import_ds_grid.Grid)`
62
+ const wrapTextLabelCss = import_ds_system.css`
63
+ overflow-wrap: break-word;
64
+ word-break: break-word;
65
+ white-space: normal;
66
+ `;
67
+ const StyledChatContainerContentHeaderLabel = (0, import_ds_system.styled)(import_ds_grid.Grid, {
68
+ name: import_constants.DSChatContainerHeaderName,
69
+ slot: import_constants.CHAT_CONTAINER_HEADER_SLOTS.HEADER_TITLE,
70
+ // legacy data-testid `chat-header-title` is preserved via inline JSX data-testid
71
+ preserveLegacyDataTestId: true
72
+ })`
54
73
  justify-content: center;
55
74
  align-items: center;
56
75
  font-weight: 600;
57
76
  font-size: 18px;
58
77
  color: ${(props) => props.theme.colors.neutral["700"]};
59
78
  line-height: 1.6;
79
+ ${({ $wrapText }) => $wrapText ? wrapTextLabelCss : ""}
60
80
  `;
61
81
  //# sourceMappingURL=styled.js.map
@@ -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, 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} {\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,CAAC;AAAA,gBACzD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IACxD,uCAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpC,MAAM,4CAAwC,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA,WAKrD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { Grid, type DSGridT } from '@elliemae/ds-grid';\nimport { CHAT_CONTAINER_HEADER_SLOTS, DSChatContainerHeaderName } from './constants/index.js';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid, {\n name: DSChatContainerHeaderName,\n slot: CHAT_CONTAINER_HEADER_SLOTS.HEADER_CHILDREN,\n // legacy data-testid `chat-header-children` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n max-width: 80px;\n`;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const StyledChatContainerContentHeader = styled(Grid, {\n name: DSChatContainerHeaderName,\n slot: CHAT_CONTAINER_HEADER_SLOTS.ROOT,\n})<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} {\n & button {\n background: transparent;\n }\n }\n`;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// When wrapText is enabled, the consumer-passed `title` is rendered directly into the label\n// instead of being wrapped by TruncatedTooltipText. We expand the label vertically and break\n// long unbroken words so a long single token cannot overflow horizontally.\nconst wrapTextLabelCss = css`\n overflow-wrap: break-word;\n word-break: break-word;\n white-space: normal;\n`;\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid, {\n name: DSChatContainerHeaderName,\n slot: CHAT_CONTAINER_HEADER_SLOTS.HEADER_TITLE,\n // legacy data-testid `chat-header-title` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})<{ $wrapText?: boolean }>`\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 ${({ $wrapText }) => ($wrapText ? wrapTextLabelCss : '')}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,qBAAmC;AACnC,uBAAuE;AAEhE,MAAM,8CAA0C,yBAAO,qBAAM;AAAA,EAClE,MAAM;AAAA,EACN,MAAM,6CAA4B;AAAA;AAAA,EAElC,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAIM,MAAM,uCAAmC,yBAAO,qBAAM;AAAA,EAC3D,MAAM;AAAA,EACN,MAAM,6CAA4B;AACpC,CAAC;AAAA;AAAA;AAAA,6BAG4B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,gBACzD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IACxD,uCAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAW3C,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAMlB,MAAM,4CAAwC,yBAAO,qBAAM;AAAA,EAChE,MAAM;AAAA,EACN,MAAM,6CAA4B;AAAA;AAAA,EAElC,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,WAKU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,IAEnD,CAAC,EAAE,UAAU,MAAO,YAAY,mBAAmB,EAAG;AAAA;",
6
6
  "names": []
7
7
  }
@@ -5,10 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
8
  var __copyProps = (to, from, except, desc) => {
13
9
  if (from && typeof from === "object" || typeof from === "function") {
14
10
  for (let key of __getOwnPropNames(from))
@@ -25,15 +21,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
22
  mod
27
23
  ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var ChatContainerHeaderDataTestIds_exports = {};
30
- __export(ChatContainerHeaderDataTestIds_exports, {
31
- ChatContainerHeaderDataTestIds: () => ChatContainerHeaderDataTestIds
32
- });
33
- module.exports = __toCommonJS(ChatContainerHeaderDataTestIds_exports);
34
24
  var React = __toESM(require("react"));
35
- const ChatContainerHeaderDataTestIds = {
36
- HEADER_TITLE: "chat-header-title",
37
- HEADER_CHILDREN: "chat-header-children"
25
+ const SlotPropsAsObject = {
26
+ dsChatcontainerheaderRoot: { "aria-label": "just a typescript test" },
27
+ dsChatcontainerheaderHeaderTitle: { "aria-label": "just a typescript test" },
28
+ dsChatcontainerheaderHeaderChildren: { "aria-label": "just a typescript test" },
29
+ dsChatcontainerheaderTooltipText: { "aria-label": "just a typescript test" },
30
+ dsChatcontainerheaderTooltipContainer: { "aria-label": "just a typescript test" }
31
+ };
32
+ const SlotPropsAsFunctions = {
33
+ dsChatcontainerheaderRoot: () => ({ "aria-label": "just a typescript test" }),
34
+ dsChatcontainerheaderHeaderTitle: () => ({ "aria-label": "just a typescript test" }),
35
+ dsChatcontainerheaderHeaderChildren: () => ({ "aria-label": "just a typescript test" }),
36
+ dsChatcontainerheaderTooltipText: () => ({ "aria-label": "just a typescript test" }),
37
+ dsChatcontainerheaderTooltipContainer: () => ({ "aria-label": "just a typescript test" })
38
38
  };
39
- //# sourceMappingURL=ChatContainerHeaderDataTestIds.js.map
39
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
40
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { CHAT_CONTAINER_HEADER_SLOTS, DSChatContainerHeaderName } from '../constants/index.js';\nimport type { DSChatContainerHeaderT } from '../index.js';\n\n// One entry per slot \u2014 object form\nconst SlotPropsAsObject: Partial<DSChatContainerHeaderT.Props> = {\n dsChatcontainerheaderRoot: { 'aria-label': 'just a typescript test' },\n dsChatcontainerheaderHeaderTitle: { 'aria-label': 'just a typescript test' },\n dsChatcontainerheaderHeaderChildren: { 'aria-label': 'just a typescript test' },\n dsChatcontainerheaderTooltipText: { 'aria-label': 'just a typescript test' },\n dsChatcontainerheaderTooltipContainer: { 'aria-label': 'just a typescript test' },\n};\n\n// One entry per slot \u2014 function form\nconst SlotPropsAsFunctions: DSChatContainerHeaderT.SlotFunctionArguments = {\n dsChatcontainerheaderRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatcontainerheaderHeaderTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatcontainerheaderHeaderChildren: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatcontainerheaderTooltipText: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatcontainerheaderTooltipContainer: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if any slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSChatContainerHeaderName, typeof CHAT_CONTAINER_HEADER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,oBAA2D;AAAA,EAC/D,2BAA2B,EAAE,cAAc,yBAAyB;AAAA,EACpE,kCAAkC,EAAE,cAAc,yBAAyB;AAAA,EAC3E,qCAAqC,EAAE,cAAc,yBAAyB;AAAA,EAC9E,kCAAkC,EAAE,cAAc,yBAAyB;AAAA,EAC3E,uCAAuC,EAAE,cAAc,yBAAyB;AAClF;AAGA,MAAM,uBAAqE;AAAA,EACzE,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC3E,kCAAkC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClF,qCAAqC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrF,kCAAkC,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAClF,uCAAuC,OAAO,EAAE,cAAc,yBAAyB;AACzF;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -30,21 +30,36 @@ const testRequiredProps = {
30
30
  const testOptionalProps = {
31
31
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {})
32
32
  };
33
+ const testPartialDefaults = {
34
+ wrapText: false
35
+ };
33
36
  const testProps = {
34
37
  ...testRequiredProps,
35
- ...testOptionalProps
38
+ ...testOptionalProps,
39
+ ...testPartialDefaults
36
40
  };
37
41
  const testPropsAsSyntax = {
38
42
  ...testRequiredProps,
39
- ...testOptionalProps
43
+ ...testOptionalProps,
44
+ ...testPartialDefaults
45
+ };
46
+ const testCompleteDefaults = {
47
+ wrapText: false
48
+ };
49
+ const testInternalProps = {
50
+ ...testRequiredProps,
51
+ ...testOptionalProps,
52
+ ...testCompleteDefaults
40
53
  };
41
54
  const testExplicitDefinition = {
42
55
  title: "",
43
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {})
56
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
57
+ wrapText: true
44
58
  };
45
59
  const testInferedTypeCompatibility = {
46
60
  title: "",
47
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {})
61
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
62
+ wrapText: false
48
63
  };
49
64
  const testDefinitionAsConst = {
50
65
  title: "",
@@ -54,6 +69,8 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
54
69
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { ...testExplicitDefinition }),
55
70
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { ...testInferedTypeCompatibility }),
56
71
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { ...testDefinitionAsConst }),
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { title: "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) })
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { title: "", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { title: "example", wrapText: true }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatContainerHeader, { title: "example", wrapText: false })
58
75
  ] });
59
76
  //# sourceMappingURL=typescript-chat-container-header-valid.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-container-header-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport type { DSChatContainerHeaderT } from '../index.js';\nimport { ChatContainerHeader } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatContainerHeaderT.Props;\ntype ComponentPropsOptionalProps = DSChatContainerHeaderT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChatContainerHeaderT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n title: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n children: <div></div>,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n} as ComponentPropsForApp;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n title: '',\n children: <div></div>,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n title: '',\n children: <div></div>,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n title: '',\n children: <div></div>,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <ChatContainerHeader {...testExplicitDefinition} />\n <ChatContainerHeader {...testInferedTypeCompatibility} />\n <ChatContainerHeader {...testDefinitionAsConst} />\n {/* works with inline values */}\n <ChatContainerHeader title=\"\">\n <div></div>\n </ChatContainerHeader>\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACcX;AAZZ,eAAoC;AAOpC,MAAM,oBAAiD;AAAA,EACrD,OAAO;AACT;AAEA,MAAM,oBAAiD;AAAA,EACrD,UAAU,4CAAC,SAAI;AACjB;AAKA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AACjB;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AACjB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AACjB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,gCAAqB,GAAG,wBAAwB;AAAA,EACjD,4CAAC,gCAAqB,GAAG,8BAA8B;AAAA,EACvD,4CAAC,gCAAqB,GAAG,uBAAuB;AAAA,EAEhD,4CAAC,gCAAoB,OAAM,IACzB,sDAAC,SAAI,GACP;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport type { DSChatContainerHeaderT } from '../index.js';\nimport { ChatContainerHeader } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatContainerHeaderT.Props;\ntype ComponentPropsInternals = DSChatContainerHeaderT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatContainerHeaderT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatContainerHeaderT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChatContainerHeaderT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n title: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n children: <div></div>,\n};\n\n// difference between Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n wrapText: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n wrapText: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n title: '',\n children: <div></div>,\n wrapText: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n title: '',\n children: <div></div>,\n wrapText: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n title: '',\n children: <div></div>,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <ChatContainerHeader {...testExplicitDefinition} />\n <ChatContainerHeader {...testInferedTypeCompatibility} />\n <ChatContainerHeader {...testDefinitionAsConst} />\n {/* works with inline values */}\n <ChatContainerHeader title=\"\">\n <div></div>\n </ChatContainerHeader>\n {/* wrapText accepted as a boolean and is optional */}\n <ChatContainerHeader title=\"example\" wrapText />\n <ChatContainerHeader title=\"example\" wrapText={false} />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACgBX;AAdZ,eAAoC;AASpC,MAAM,oBAAiD;AAAA,EACrD,OAAO;AACT;AAEA,MAAM,oBAAiD;AAAA,EACrD,UAAU,4CAAC,SAAI;AACjB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,UAAU;AACZ;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,UAAU;AACZ;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AAAA,EACf,UAAU;AACZ;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AAAA,EACf,UAAU;AACZ;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,UAAU,4CAAC,SAAI;AACjB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,gCAAqB,GAAG,wBAAwB;AAAA,EACjD,4CAAC,gCAAqB,GAAG,8BAA8B;AAAA,EACvD,4CAAC,gCAAqB,GAAG,uBAAuB;AAAA,EAEhD,4CAAC,gCAAoB,OAAM,IACzB,sDAAC,SAAI,GACP;AAAA,EAEA,4CAAC,gCAAoB,OAAM,WAAU,UAAQ,MAAC;AAAA,EAC9C,4CAAC,gCAAoB,OAAM,WAAU,UAAU,OAAO;AAAA,GACxD;",
6
6
  "names": []
7
7
  }