@elliemae/ds-chat-bubble 3.60.0-next.4 → 3.60.0-next.41

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 (39) hide show
  1. package/dist/cjs/ChatBubble.js +90 -32
  2. package/dist/cjs/ChatBubble.js.map +2 -2
  3. package/dist/cjs/ChatBubbleArrow.js +76 -55
  4. package/dist/cjs/ChatBubbleArrow.js.map +2 -2
  5. package/dist/cjs/{DSChatBubbleDefinitions.js → constants/index.js} +36 -4
  6. package/dist/cjs/constants/index.js.map +7 -0
  7. package/dist/cjs/index.js +7 -5
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/react-desc-prop-types.js +14 -17
  10. package/dist/cjs/react-desc-prop-types.js.map +3 -3
  11. package/dist/cjs/styled.js +35 -37
  12. package/dist/cjs/styled.js.map +2 -2
  13. package/dist/esm/ChatBubble.js +88 -30
  14. package/dist/esm/ChatBubble.js.map +2 -2
  15. package/dist/esm/ChatBubbleArrow.js +76 -55
  16. package/dist/esm/ChatBubbleArrow.js.map +2 -2
  17. package/dist/esm/constants/index.js +38 -0
  18. package/dist/esm/constants/index.js.map +7 -0
  19. package/dist/esm/index.js +12 -4
  20. package/dist/esm/index.js.map +3 -3
  21. package/dist/esm/react-desc-prop-types.js +10 -8
  22. package/dist/esm/react-desc-prop-types.js.map +2 -2
  23. package/dist/esm/styled.js +35 -37
  24. package/dist/esm/styled.js.map +2 -2
  25. package/dist/types/ChatBubbleArrow.d.ts +1 -1
  26. package/dist/types/constants/index.d.ts +30 -0
  27. package/dist/types/index.d.ts +3 -2
  28. package/dist/types/react-desc-prop-types.d.ts +6 -10
  29. package/dist/types/styled.d.ts +2 -3
  30. package/package.json +24 -26
  31. package/dist/cjs/ChatBubbleDataTestIds.js +0 -41
  32. package/dist/cjs/ChatBubbleDataTestIds.js.map +0 -7
  33. package/dist/cjs/DSChatBubbleDefinitions.js.map +0 -7
  34. package/dist/esm/ChatBubbleDataTestIds.js +0 -11
  35. package/dist/esm/ChatBubbleDataTestIds.js.map +0 -7
  36. package/dist/esm/DSChatBubbleDefinitions.js +0 -6
  37. package/dist/esm/DSChatBubbleDefinitions.js.map +0 -7
  38. package/dist/types/ChatBubbleDataTestIds.d.ts +0 -6
  39. package/dist/types/DSChatBubbleDefinitions.d.ts +0 -1
@@ -42,8 +42,7 @@ var import_uid = require("uid");
42
42
  var import_styled = require("./styled.js");
43
43
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
44
44
  var import_ChatBubbleArrow = require("./ChatBubbleArrow.js");
45
- var import_ChatBubbleDataTestIds = require("./ChatBubbleDataTestIds.js");
46
- var import_DSChatBubbleDefinitions = require("./DSChatBubbleDefinitions.js");
45
+ var import_constants = require("./constants/index.js");
47
46
  const ChatBubble = (props) => {
48
47
  const defaultPropsIncludingInstanciatedValues = import_react.default.useMemo(() => {
49
48
  const dsId2 = props.dsId || `ds-chat-bubble-${(0, import_uid.uid)(9)}`;
@@ -53,40 +52,99 @@ const ChatBubble = (props) => {
53
52
  props,
54
53
  defaultPropsIncludingInstanciatedValues
55
54
  );
56
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.BubblePropTypes, import_DSChatBubbleDefinitions.DSChatBubbleName);
55
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.BubblePropTypes, import_constants.DSChatBubbleName);
57
56
  const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;
58
57
  const bodyParts = import_react.default.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
59
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledWrapper, { "data-testid": `${import_ChatBubbleDataTestIds.ChatBubbleDataTestIds.BUBBLE}-${dsId}`, children: [
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledColoredBubble, { type, children: [
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledTitleBubble, { cols: ["1fr", "auto"], gutter: "xs", alignItems: "flex-end", className: "sr-only", children: [
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTitleLeftBubble, { "data-testid": `${import_ChatBubbleDataTestIds.ChatBubbleDataTestIds.BUBBLE_TITLE}-${dsId}`, children: title }),
63
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- import_styled.StyledTitleRightBubble,
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
59
+ import_styled.StyledWrapper,
60
+ {
61
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`,
62
+ getOwnerProps: () => propsWithDefault,
63
+ getOwnerPropsArguments: () => ({}),
64
+ children: [
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
+ import_styled.StyledColoredBubble,
65
67
  {
66
- alignItems: "center",
67
- type,
68
- "data-testid": `${import_ChatBubbleDataTestIds.ChatBubbleDataTestIds.BUBBLE_TIME}-${dsId}`,
69
- children: time
68
+ "data-theming-type": type,
69
+ getOwnerProps: () => propsWithDefault,
70
+ getOwnerPropsArguments: () => ({}),
71
+ children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
73
+ import_styled.StyledTitleBubble,
74
+ {
75
+ cols: ["1fr", "auto"],
76
+ gutter: "xs",
77
+ alignItems: "flex-end",
78
+ getOwnerProps: () => propsWithDefault,
79
+ getOwnerPropsArguments: () => ({}),
80
+ children: [
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
82
+ import_styled.StyledTitleLeftBubble,
83
+ {
84
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`,
85
+ getOwnerProps: () => propsWithDefault,
86
+ getOwnerPropsArguments: () => ({}),
87
+ children: title
88
+ }
89
+ ),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ import_styled.StyledTitleRightBubble,
92
+ {
93
+ alignItems: "center",
94
+ "data-theming-type": type,
95
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`,
96
+ getOwnerProps: () => propsWithDefault,
97
+ getOwnerPropsArguments: () => ({}),
98
+ children: time
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ ),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
+ import_styled.StyleBodyWrapper,
106
+ {
107
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`,
108
+ getOwnerProps: () => propsWithDefault,
109
+ getOwnerPropsArguments: () => ({}),
110
+ children: bodyParts.map((item, index) => (
111
+ // eslint-disable-next-line react/no-array-index-key
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
113
+ item,
114
+ index < bodyParts.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}) : null
115
+ ] }, `body-fragment-${index}-${dsId}`)
116
+ ))
117
+ }
118
+ ),
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChatBubbleArrow.ChatBubbleArrow, { ...propsWithDefault })
120
+ ]
70
121
  }
71
- )
72
- ] }),
73
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleBodyWrapper, { "data-testid": `chat-bubble-body-${dsId}`, children: bodyParts.map((item, index) => (
74
- // eslint-disable-next-line react/no-array-index-key
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
76
- item,
77
- index < bodyParts.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}) : null
78
- ] }, `body-fragment-${index}-${dsId}`)
79
- )) }),
80
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChatBubbleArrow.ChatBubbleArrow, { type, dsId })
81
- ] }),
82
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleErrorMessage, { "data-testid": `chat-bubble-error-message-${dsId}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["1fr", "auto"], children: [
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: errorMessage }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircleFill, {})
85
- ] }) }) : null,
86
- helpMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyleHelpMessage, { "data-testid": `chat-bubble-help-message-${dsId}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: helpMessage }) }) : null
87
- ] });
122
+ ),
123
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
+ import_styled.StyleErrorMessage,
125
+ {
126
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`,
127
+ getOwnerProps: () => propsWithDefault,
128
+ getOwnerPropsArguments: () => ({}),
129
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["1fr", "auto"], children: [
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: errorMessage }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircleFill, {})
132
+ ] })
133
+ }
134
+ ) : null,
135
+ helpMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ import_styled.StyleHelpMessage,
137
+ {
138
+ "data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`,
139
+ getOwnerProps: () => propsWithDefault,
140
+ getOwnerPropsArguments: () => ({}),
141
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: helpMessage })
142
+ }
143
+ ) : null
144
+ ]
145
+ }
146
+ );
88
147
  };
89
- ChatBubble.displayName = import_DSChatBubbleDefinitions.DSChatBubbleName;
148
+ ChatBubble.displayName = import_constants.DSChatBubbleName;
90
149
  const ChatBubbleWithSchema = (0, import_ds_props_helpers.describe)(ChatBubble);
91
- ChatBubbleWithSchema.propTypes = import_react_desc_prop_types.BubblePropTypes;
92
150
  //# sourceMappingURL=ChatBubble.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ChatBubble.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled.js';\nimport { BubblePropTypes, type DSChatBubbleT, defaultProps } from './react-desc-prop-types.js';\nimport { ChatBubbleArrow } from './ChatBubbleArrow.js';\nimport { ChatBubbleDataTestIds } from './ChatBubbleDataTestIds.js';\nimport { DSChatBubbleName } from './DSChatBubbleDefinitions.js';\n\nconst ChatBubble: React.ComponentType<DSChatBubbleT.Props> = (props) => {\n const defaultPropsIncludingInstanciatedValues = React.useMemo(() => {\n const dsId = props.dsId || `ds-chat-bubble-${uid(9)}`;\n return { ...defaultProps, dsId };\n }, [props.dsId]);\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatBubbleT.InternalProps>(\n props,\n defaultPropsIncludingInstanciatedValues,\n );\n useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n return (\n <StyledWrapper data-testid={`${ChatBubbleDataTestIds.BUBBLE}-${dsId}`}>\n <StyledColoredBubble type={type}>\n <StyledTitleBubble cols={['1fr', 'auto']} gutter=\"xs\" alignItems=\"flex-end\" className=\"sr-only\">\n <StyledTitleLeftBubble data-testid={`${ChatBubbleDataTestIds.BUBBLE_TITLE}-${dsId}`}>\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n type={type}\n data-testid={`${ChatBubbleDataTestIds.BUBBLE_TIME}-${dsId}`}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper data-testid={`chat-bubble-body-${dsId}`}>\n {bodyParts.map((item, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <React.Fragment key={`body-fragment-${index}-${dsId}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow type={type} dsId={dsId} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage data-testid={`chat-bubble-error-message-${dsId}`}>\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage data-testid={`chat-bubble-help-message-${dsId}`}>\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = BubblePropTypes;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCf;AApCR,mBAAkB;AAClB,8BAAuF;AACvF,sBAAkC;AAClC,qBAAqB;AACrB,iBAAoB;AACpB,oBASO;AACP,mCAAkE;AAClE,6BAAgC;AAChC,mCAAsC;AACtC,qCAAiC;AAEjC,MAAM,aAAuD,CAAC,UA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IAAI,IAC/D,uDAAC,uBAAK,MAAM,CAAC,OAAO,MAAM,GACxB;AAAA,kDAAC,UAAM,wBAAa;AAAA,MACpB,4CAAC,qCAAkB;AAAA,OACrB,GACF,IACE;AAAA,IACH,cACC,4CAAC,kCAAiB,eAAa,4BAA4B,IAAI,IAC7D,sDAAC,UAAM,uBAAY,GACrB,IACE;AAAA,KACN;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAChD,qBAAqB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport { Grid } from '@elliemae/ds-grid';\nimport { uid } from 'uid';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled.js';\nimport { BubblePropTypes, type DSChatBubbleT, defaultProps } from './react-desc-prop-types.js';\nimport { ChatBubbleArrow } from './ChatBubbleArrow.js';\nimport { CHAT_BUBBLE_DATA_TESTID, DSChatBubbleName } from './constants/index.js';\n\nconst ChatBubble: React.ComponentType<DSChatBubbleT.Props> = (props) => {\n const defaultPropsIncludingInstanciatedValues = React.useMemo(() => {\n const dsId = props.dsId || `ds-chat-bubble-${uid(9)}`;\n return { ...defaultProps, dsId };\n }, [props.dsId]);\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatBubbleT.InternalProps>(\n props,\n defaultPropsIncludingInstanciatedValues,\n );\n useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n return (\n <StyledWrapper\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledColoredBubble\n data-theming-type={type}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledTitleBubble\n cols={['1fr', 'auto']}\n gutter=\"xs\"\n alignItems=\"flex-end\"\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledTitleLeftBubble\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n data-theming-type={type}\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {bodyParts.map((item, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <React.Fragment key={`body-fragment-${index}-${dsId}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow {...propsWithDefault} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\n\nexport { ChatBubble, ChatBubbleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2Cf;AA3CR,mBAAkB;AAClB,8BAAuF;AACvF,sBAAkC;AAClC,qBAAqB;AACrB,iBAAoB;AACpB,oBASO;AACP,mCAAkE;AAClE,6BAAgC;AAChC,uBAA0D;AAE1D,MAAM,aAAuD,CAAC,UAAU;AACtE,QAAM,0CAA0C,aAAAA,QAAM,QAAQ,MAAM;AAClE,UAAMC,QAAO,MAAM,QAAQ,sBAAkB,gBAAI,CAAC,CAAC;AACnD,WAAO,EAAE,GAAG,2CAAc,MAAAA,MAAK;AAAA,EACjC,GAAG,CAAC,MAAM,IAAI,CAAC;AACf,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,kBAAkB,8CAAiB,iCAAgB;AAElF,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,YAAY,IAAI;AACrE,QAAM,YAAY,aAAAD,QAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,GAAI,CAAC,IAAI,CAAC;AACpG,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,GAAG,yCAAwB,OAAO,IAAI,IAAI;AAAA,MACvD,eAAe,MAAM;AAAA,MACrB,wBAAwB,OAAO,CAAC;AAAA,MAEhC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,qBAAmB;AAAA,YACnB,eAAe,MAAM;AAAA,YACrB,wBAAwB,OAA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;AAAA,0DAAC,UAAM,wBAAa;AAAA,cACpB,4CAAC,qCAAkB;AAAA,eACrB;AAAA;AAAA,QACF,IACE;AAAA,QACH,cACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,GAAG,yCAAwB,YAAY,IAAI,IAAI;AAAA,YAC5D,eAAe,MAAM;AAAA,YACrB,wBAAwB,OAAO,CAAC;AAAA,YAEhC,sDAAC,UAAM,uBAAY;AAAA;AAAA,QACrB,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;",
6
6
  "names": ["React", "dsId"]
7
7
  }
@@ -33,61 +33,82 @@ __export(ChatBubbleArrow_exports, {
33
33
  module.exports = __toCommonJS(ChatBubbleArrow_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
- var import_styled = require("./styled.js");
38
- var import_react_desc_prop_types = require("./react-desc-prop-types.js");
39
- const ChatBubbleArrow = ({ type, dsId }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledBubbleArrow, { children: type === import_react_desc_prop_types.BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
40
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", { children: [
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
- "path",
43
- {
44
- id: `arrow-svg-path-${dsId}`,
45
- d: "M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z"
46
- }
47
- ),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
49
- "filter",
50
- {
51
- id: `arrow-svg-filter-${dsId}`,
52
- x: "-55.6%",
53
- y: "-50.0%",
54
- width: "211.1%",
55
- height: "225.0%",
56
- filterUnits: "objectBoundingBox",
57
- children: [
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "1.5", in: "shadowOffsetOuter1", result: "shadowBlurOuter1" }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
- "feColorMatrix",
62
- {
63
- values: "0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0",
64
- type: "matrix",
65
- in: "shadowBlurOuter1"
66
- }
67
- )
68
- ]
69
- }
70
- )
71
- ] }),
72
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) ", children: [
73
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
- "use",
75
- {
76
- fill: "black",
77
- fillOpacity: "1",
78
- filter: `url(#arrow-svg-filter-${dsId})`,
79
- xlinkHref: `#arrow-svg-path-${dsId}`
80
- }
81
- ),
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("use", { fill: "#FFFFFF", fillRule: "evenodd", xlinkHref: `#arrow-svg-path-${dsId}` })
83
- ] }) })
84
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "0.692rem", height: "0.615rem", viewBox: "0 0 9 8", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
- "path",
36
+ var import_ds_system = require("@elliemae/ds-system");
37
+ var import_constants = require("./constants/index.js");
38
+ const senderArrowPositionStyles = import_ds_system.css`
39
+ right: -0.692rem;
40
+ height: 1.15rem;
41
+ bottom: 0.461rem;
42
+ `;
43
+ const recipientArrowPositionStyles = import_ds_system.css`
44
+ left: -0.846rem;
45
+ bottom: 0.461rem;
46
+ `;
47
+ const StyledBubbleArrow = (0, import_ds_system.styled)("div", {
48
+ name: import_constants.DSChatBubbleName,
49
+ slot: import_constants.CHAT_BUBBLE_SLOTS.ARROW
50
+ })`
51
+ position: absolute;
52
+ fill: ${(props) => props["data-theming-type"] === import_constants.BUBBLE_TYPES.RECIPIENT ? props.theme.colors.neutral["000"] : props.theme.colors.brand["600"]};
53
+ ${(props) => {
54
+ if (props["data-theming-type"] === import_constants.BUBBLE_TYPES.RECIPIENT) return recipientArrowPositionStyles;
55
+ return senderArrowPositionStyles;
56
+ }}
57
+ `;
58
+ const BubbleArrowRecipient = (propsWithDefault) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ StyledBubbleArrow,
86
60
  {
87
- d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z",
88
- fill: "#1E79C2"
61
+ "data-theming-type": import_constants.BUBBLE_TYPES.RECIPIENT,
62
+ getOwnerProps: () => propsWithDefault,
63
+ getOwnerPropsArguments: () => ({ isRecipientArrow: true }),
64
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
+ "filter",
67
+ {
68
+ id: `filter-${propsWithDefault.dsId}`,
69
+ width: "211.1%",
70
+ height: "225%",
71
+ x: "-55.6%",
72
+ y: "-50%",
73
+ filterUnits: "objectBoundingBox",
74
+ children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { in: "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "1.5" }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
+ "feColorMatrix",
79
+ {
80
+ in: "shadowBlurOuter1",
81
+ values: "0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0"
82
+ }
83
+ )
84
+ ]
85
+ }
86
+ ) }),
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "matrix(-1 0 0 1 15 0)", children: [
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("use", { filter: `url(#filter-${propsWithDefault.dsId})`, href: `#path-${propsWithDefault.dsId}` }),
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ "path",
91
+ {
92
+ id: `path-${propsWithDefault.dsId}`,
93
+ d: "M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5"
94
+ }
95
+ )
96
+ ] })
97
+ ] })
89
98
  }
90
- ) }) }) });
91
- const ChatBubbleArrowWithSchema = (0, import_ds_props_helpers.describe)(ChatBubbleArrow);
92
- ChatBubbleArrowWithSchema.propTypes = import_react_desc_prop_types.propsArrowBubble;
99
+ );
100
+ const BubbleArrowSender = (propsWithDefault) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
101
+ StyledBubbleArrow,
102
+ {
103
+ "data-theming-type": import_constants.BUBBLE_TYPES.SENDER,
104
+ getOwnerProps: () => propsWithDefault,
105
+ getOwnerPropsArguments: () => ({ isRecipientArrow: false }),
106
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "0.692rem", height: "0.615rem", viewBox: "0 0 9 8", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z" }) }) })
107
+ }
108
+ );
109
+ const ChatBubbleArrow = (propsWithDefault) => {
110
+ const { type } = propsWithDefault;
111
+ if (type === import_constants.BUBBLE_TYPES.RECIPIENT) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BubbleArrowRecipient, { ...propsWithDefault });
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BubbleArrowSender, { ...propsWithDefault });
113
+ };
93
114
  //# sourceMappingURL=ChatBubbleArrow.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ChatBubbleArrow.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledBubbleArrow } from './styled.js';\nimport { BUBBLE_TYPES, type DSChatBubbleT, propsArrowBubble } from './react-desc-prop-types.js';\n\nexport const ChatBubbleArrow: React.ComponentType<Pick<DSChatBubbleT.Props, 'type' | 'dsId'>> = ({ type, dsId }) => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"1.15rem\" height=\"1.07rem\" viewBox=\"0 0 15 14\" aria-hidden=\"true\">\n <defs>\n <path\n id={`arrow-svg-path-${dsId}`}\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n ></path>\n <filter\n id={`arrow-svg-filter-${dsId}`}\n x=\"-55.6%\"\n y=\"-50.0%\"\n width=\"211.1%\"\n height=\"225.0%\"\n filterUnits=\"objectBoundingBox\"\n >\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use\n fill=\"black\"\n fillOpacity=\"1\"\n filter={`url(#arrow-svg-filter-${dsId})`}\n xlinkHref={`#arrow-svg-path-${dsId}`}\n ></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref={`#arrow-svg-path-${dsId}`}></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"0.692rem\" height=\"0.615rem\" viewBox=\"0 0 9 8\" aria-hidden=\"true\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nconst ChatBubbleArrowWithSchema = describe(ChatBubbleArrow);\nChatBubbleArrowWithSchema.propTypes = propsArrowBubble;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mapp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AAC,OAAE,QAAO,QAAO,aAAY,KAAI,MAAK,QAAO,UAAS,WACpD;AAAA,EAAC;AAAA;AAAA,IACC,GAAE;AAAA,IACF,MAAK;AAAA;AACN,GACH,GACF,GAEJ;AAGF,MAAM,gCAA4B,kCAAS,eAAe;AAC1D,0BAA0B,YAAY;",
4
+ "sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport React from 'react';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\nimport { type DSChatBubbleT } from './react-desc-prop-types.js';\n\nconst senderArrowPositionStyles = css`\n right: -0.692rem;\n height: 1.15rem;\n bottom: 0.461rem;\n`;\nconst recipientArrowPositionStyles = css`\n left: -0.846rem;\n bottom: 0.461rem;\n`;\n\nconst StyledBubbleArrow = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ARROW,\n})<{ 'data-theming-type': typeof BUBBLE_TYPES.RECIPIENT | typeof BUBBLE_TYPES.SENDER }>`\n position: absolute;\n fill: ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.RECIPIENT\n ? props.theme.colors.neutral['000']\n : props.theme.colors.brand['600']};\n ${(props) => {\n if (props['data-theming-type'] === BUBBLE_TYPES.RECIPIENT) return recipientArrowPositionStyles;\n return senderArrowPositionStyles;\n }}\n`;\n\nconst BubbleArrowRecipient: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.RECIPIENT}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({ isRecipientArrow: true })}\n >\n <svg width=\"1.15rem\" height=\"1.07rem\" viewBox=\"0 0 15 14\" aria-hidden=\"true\">\n <defs>\n <filter\n id={`filter-${propsWithDefault.dsId}`}\n width=\"211.1%\"\n height=\"225%\"\n x=\"-55.6%\"\n y=\"-50%\"\n filterUnits=\"objectBoundingBox\"\n >\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n <feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\"1.5\" />\n <feColorMatrix\n in=\"shadowBlurOuter1\"\n values=\"0 0 0 0 0.207843137 0 0 0 0 0.235294118 0 0 0 0 0.274509804 0 0 0 0.8 0\"\n />\n </filter>\n </defs>\n <g transform=\"matrix(-1 0 0 1 15 0)\">\n <use filter={`url(#filter-${propsWithDefault.dsId})`} href={`#path-${propsWithDefault.dsId}`} />\n <path\n id={`path-${propsWithDefault.dsId}`}\n d=\"M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5\"\n />\n </g>\n </svg>\n </StyledBubbleArrow>\n);\n\nconst BubbleArrowSender: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.SENDER}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({ isRecipientArrow: false })}\n >\n <svg width=\"0.692rem\" height=\"0.615rem\" viewBox=\"0 0 9 8\" aria-hidden=\"true\">\n <g stroke=\"none\" strokeWidth=\"1\" fillRule=\"evenodd\">\n <path d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"></path>\n </g>\n </svg>\n </StyledBubbleArrow>\n);\n\nexport const ChatBubbleArrow: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => {\n const { type } = propsWithDefault;\n if (type === BUBBLE_TYPES.RECIPIENT) return <BubbleArrowRecipient {...propsWithDefault} />;\n return <BubbleArrowSender {...propsWithDefault} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAA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AI,IAAI;AAAA,QAC9F;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,QAAQ,iBAAiB,IAAI;AAAA,YACjC,GAAE;AAAA;AAAA,QACJ;AAAA,SACF;AAAA,OACF;AAAA;AACF;AAGF,MAAM,oBAAsE,CAAC,qBAC3E;AAAA,EAAC;AAAA;AAAA,IACC,qBAAmB,8BAAa;AAAA,IAChC,eAAe,MAAM;AAAA,IACrB,wBAAwB,OAAO,EAAE,kBAAkB,MAAM;AAAA,IAEzD,sDAAC,SAAI,OAAM,YAAW,QAAO,YAAW,SAAQ,WAAU,eAAY,QACpE,sDAAC,OAAE,QAAO,QAAO,aAAY,KAAI,UAAS,WACxC,sDAAC,UAAK,GAAE,2KAA0K,GACpL,GACF;AAAA;AACF;AAGK,MAAM,kBAAoE,CAAC,qBAAqB;AACrG,QAAM,EAAE,KAAK,IAAI;AACjB,MAAI,SAAS,8BAAa,UAAW,QAAO,4CAAC,wBAAsB,GAAG,kBAAkB;AACxF,SAAO,4CAAC,qBAAmB,GAAG,kBAAkB;AAClD;",
6
6
  "names": []
7
7
  }
@@ -26,11 +26,43 @@ 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 DSChatBubbleDefinitions_exports = {};
30
- __export(DSChatBubbleDefinitions_exports, {
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ BUBBLE_TYPES: () => BUBBLE_TYPES,
32
+ CHAT_BUBBLE_DATA_TESTID: () => CHAT_BUBBLE_DATA_TESTID,
33
+ CHAT_BUBBLE_SLOTS: () => CHAT_BUBBLE_SLOTS,
34
+ DSChatBubbleArrowName: () => DSChatBubbleArrowName,
31
35
  DSChatBubbleName: () => DSChatBubbleName
32
36
  });
33
- module.exports = __toCommonJS(DSChatBubbleDefinitions_exports);
37
+ module.exports = __toCommonJS(constants_exports);
34
38
  var React = __toESM(require("react"));
39
+ var import_ds_system = require("@elliemae/ds-system");
35
40
  const DSChatBubbleName = "DSBubble";
36
- //# sourceMappingURL=DSChatBubbleDefinitions.js.map
41
+ const DSChatBubbleArrowName = "DSBubbleArrow";
42
+ const BUBBLE_TYPES = {
43
+ SENDER: "SENDER",
44
+ RECIPIENT: "RECIPIENT",
45
+ DELIMITER: "DELIMITER",
46
+ SYSTEM: "SYSTEM"
47
+ };
48
+ const CHAT_BUBBLE_SLOTS = {
49
+ WRAPPER: "wrapper",
50
+ HEADER: "header",
51
+ HEADER_LEFT: "header-left",
52
+ HEADER_RIGHT: "header-right",
53
+ BODY_WRAPPER: "body-wrapper",
54
+ ERROR_MESSAGE: "error-message",
55
+ HELP_MESSAGE: "help-message",
56
+ ARROW: "arrow",
57
+ COLORED_BUBBLE: "colored-bubble"
58
+ };
59
+ const CHAT_BUBBLE_DATA_TESTID = {
60
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSChatBubbleName, CHAT_BUBBLE_SLOTS),
61
+ WRAPPER: "ds-chat-bubble",
62
+ HEADER_LEFT: "chat-bubble-title",
63
+ BODY_WRAPPER: "chat-bubble-body",
64
+ HEADER_RIGHT: "chat-bubble-time",
65
+ ERROR_MESSAGE: "chat-bubble-error-message",
66
+ HELP_MESSAGE: "chat-bubble-help-message"
67
+ };
68
+ //# 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 DSChatBubbleName = 'DSBubble';\nexport const DSChatBubbleArrowName = 'DSBubbleArrow';\n\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n} as const;\n\nexport const CHAT_BUBBLE_SLOTS = {\n WRAPPER: 'wrapper',\n HEADER: 'header',\n HEADER_LEFT: 'header-left',\n HEADER_RIGHT: 'header-right',\n BODY_WRAPPER: 'body-wrapper',\n ERROR_MESSAGE: 'error-message',\n HELP_MESSAGE: 'help-message',\n ARROW: 'arrow',\n COLORED_BUBBLE: 'colored-bubble',\n} as const;\n\nexport const CHAT_BUBBLE_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatBubbleName, CHAT_BUBBLE_SLOTS),\n WRAPPER: 'ds-chat-bubble',\n HEADER_LEFT: 'chat-bubble-title',\n BODY_WRAPPER: 'chat-bubble-body',\n HEADER_RIGHT: 'chat-bubble-time',\n ERROR_MESSAGE: 'chat-bubble-error-message',\n HELP_MESSAGE: 'chat-bubble-help-message',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,mBAAmB;AACzB,MAAM,wBAAwB;AAE9B,MAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AACV;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAAA,EACd,OAAO;AAAA,EACP,gBAAgB;AAClB;AAEO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,kBAAkB,iBAAiB;AAAA,EAC9D,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAChB;",
6
+ "names": []
7
+ }
package/dist/cjs/index.js CHANGED
@@ -29,15 +29,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
- BUBBLE_TYPES: () => import_react_desc_prop_types.BUBBLE_TYPES,
32
+ BUBBLE_TYPES: () => import_constants.BUBBLE_TYPES,
33
+ CHAT_BUBBLE_DATA_TESTID: () => import_constants.CHAT_BUBBLE_DATA_TESTID,
34
+ CHAT_BUBBLE_SLOTS: () => import_constants.CHAT_BUBBLE_SLOTS,
33
35
  ChatBubble: () => import_ChatBubble.ChatBubble,
34
- ChatBubbleDataTestIds: () => import_ChatBubbleDataTestIds.ChatBubbleDataTestIds,
35
- ChatBubbleWithSchema: () => import_ChatBubble.ChatBubbleWithSchema
36
+ ChatBubbleDataTestIds: () => import_constants.CHAT_BUBBLE_DATA_TESTID,
37
+ ChatBubbleWithSchema: () => import_ChatBubble.ChatBubbleWithSchema,
38
+ DSChatBubbleName: () => import_constants.DSChatBubbleName
36
39
  });
37
40
  module.exports = __toCommonJS(index_exports);
38
41
  var React = __toESM(require("react"));
39
42
  var import_ChatBubble = require("./ChatBubble.js");
40
- var import_react_desc_prop_types = require("./react-desc-prop-types.js");
41
- var import_ChatBubbleDataTestIds = require("./ChatBubbleDataTestIds.js");
43
+ var import_constants = require("./constants/index.js");
42
44
  __reExport(index_exports, require("./styled.js"), module.exports);
43
45
  //# 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 { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';\nexport { BUBBLE_TYPES, type DSChatBubbleT } from './react-desc-prop-types.js';\nexport { ChatBubbleDataTestIds } from './ChatBubbleDataTestIds.js';\nexport * from './styled.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiD;AACjD,mCAAiD;AACjD,mCAAsC;AACtC,0BAAc,wBAHd;",
4
+ "sourcesContent": ["export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';\nexport { type DSChatBubbleT } from './react-desc-prop-types.js';\nexport {\n CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT\n CHAT_BUBBLE_DATA_TESTID,\n BUBBLE_TYPES,\n DSChatBubbleName,\n CHAT_BUBBLE_SLOTS,\n} from './constants/index.js';\nexport * from './styled.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiD;AAEjD,uBAMO;AACP,0BAAc,wBATd;",
6
6
  "names": []
7
7
  }
@@ -28,40 +28,37 @@ 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
- BUBBLE_TYPES: () => BUBBLE_TYPES,
32
31
  BubblePropTypes: () => BubblePropTypes,
33
32
  defaultProps: () => defaultProps,
34
33
  propsArrowBubble: () => propsArrowBubble
35
34
  });
36
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
37
36
  var React = __toESM(require("react"));
38
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
- const BUBBLE_TYPES = {
40
- SENDER: "SENDER",
41
- RECIPIENT: "RECIPIENT",
42
- DELIMITER: "DELIMITER",
43
- SYSTEM: "SYSTEM"
44
- };
37
+ var import_ds_props_helpers2 = require("@elliemae/ds-props-helpers");
38
+ var import_constants = require("./constants/index.js");
45
39
  const defaultProps = {
46
- type: BUBBLE_TYPES.SENDER,
40
+ type: import_constants.BUBBLE_TYPES.SENDER,
47
41
  title: "",
48
42
  body: "",
49
43
  time: ""
50
44
  };
51
45
  const BubblePropTypes = {
52
- dsId: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("Unique id for bubble").defaultValue("a randomly generated (on mount) uid"),
53
- type: import_ds_props_helpers.PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description("Define bubble type ").defaultValue(defaultProps.type),
54
- title: import_ds_props_helpers.PropTypes.string.description("Title of the bubble"),
55
- time: import_ds_props_helpers.PropTypes.string.isRequired.description("Time of the bubble"),
56
- body: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).isRequired.description("Bubble content"),
57
- errorMessage: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
46
+ ...(0, import_ds_props_helpers2.getPropsPerSlotPropTypes)(import_constants.DSChatBubbleName, import_constants.CHAT_BUBBLE_SLOTS),
47
+ ...import_ds_props_helpers2.globalAttributesPropTypes,
48
+ ...import_ds_props_helpers2.xstyledPropTypes,
49
+ dsId: import_ds_props_helpers2.PropTypes.oneOfType([import_ds_props_helpers2.PropTypes.string, import_ds_props_helpers2.PropTypes.number]).description("Unique id for bubble").defaultValue("a randomly generated (on mount) uid"),
50
+ type: import_ds_props_helpers2.PropTypes.oneOf([import_constants.BUBBLE_TYPES.RECIPIENT, import_constants.BUBBLE_TYPES.SENDER]).isRequired.description("Define bubble type ").defaultValue(defaultProps.type),
51
+ title: import_ds_props_helpers2.PropTypes.string.description("Title of the bubble"),
52
+ time: import_ds_props_helpers2.PropTypes.string.isRequired.description("Time of the bubble"),
53
+ body: import_ds_props_helpers2.PropTypes.oneOfType([import_ds_props_helpers2.PropTypes.string, import_ds_props_helpers2.PropTypes.element]).isRequired.description("Bubble content"),
54
+ errorMessage: import_ds_props_helpers2.PropTypes.oneOfType([import_ds_props_helpers2.PropTypes.string, import_ds_props_helpers2.PropTypes.element]).description(
58
55
  "Error message to display at bottom of the bubble"
59
56
  ),
60
- helpMessage: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
57
+ helpMessage: import_ds_props_helpers2.PropTypes.oneOfType([import_ds_props_helpers2.PropTypes.string, import_ds_props_helpers2.PropTypes.element]).description(
61
58
  "Help message to display at bottom of the bubble"
62
59
  )
63
60
  };
64
61
  const propsArrowBubble = {
65
- type: import_ds_props_helpers.PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.defaultValue(defaultProps.type)
62
+ type: import_ds_props_helpers2.PropTypes.oneOf([import_constants.BUBBLE_TYPES.RECIPIENT, import_constants.BUBBLE_TYPES.SENDER]).isRequired.defaultValue(defaultProps.type)
66
63
  };
67
64
  //# 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 { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\n\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport declare namespace DSChatBubbleT {\n export type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\n\n export type BubbleTypesValues = (typeof BUBBLE_TYPES)[BubbleTypesKeys];\n\n export interface DefaultProps {\n type: BubbleTypesValues;\n title: string;\n body: string | React.ReactNode;\n time: string;\n }\n\n export interface OptionalProps {\n errorMessage?: string | React.ReactNode;\n helpMessage?: string | React.ReactNode;\n }\n\n export interface RequiredProps {\n dsId: string | number;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatBubbleT.DefaultProps = {\n type: BUBBLE_TYPES.SENDER,\n title: '',\n body: '',\n time: '',\n};\n\nexport const BubblePropTypes = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue('a randomly generated (on mount) uid'),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultProps.type),\n title: PropTypes.string.description('Title of the bubble'),\n time: PropTypes.string.isRequired.description('Time of the bubble'),\n body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description('Bubble content'),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Error message to display at bottom of the bubble',\n ),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Help message to display at bottom of the bubble',\n ),\n} as WeakValidationMap<unknown>;\n\nexport const propsArrowBubble = {\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.defaultValue(defaultProps.type),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAKnB,MAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AACV;AAoCO,MAAM,eAA2C;AAAA,EACtD,MAAM,aAAa;AAAA,EACnB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,kBAAkB;AAAA,EAC7B,MAAM,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAC3D,YAAY,sBAAsB,EAClC,aAAa,qCAAqC;AAAA,EACrD,MAAM,kCAAU,MAAM,CAAC,aAAa,WAAW,aAAa,MAAM,CAAC,EAChE,WAAW,YAAY,qBAAqB,EAC5C,aAAa,aAAa,IAAI;AAAA,EACjC,OAAO,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EACzD,MAAM,kCAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAClE,MAAM,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE,WAAW,YAAY,gBAAgB;AAAA,EACxG,cAAc,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE;AAAA,IACvE;AAAA,EACF;AAAA,EACA,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE;AAAA,IACtE;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB;AAAA,EAC9B,MAAM,kCAAU,MAAM,CAAC,aAAa,WAAW,aAAa,MAAM,CAAC,EAAE,WAAW,aAAa,aAAa,IAAI;AAChH;",
6
- "names": []
4
+ "sourcesContent": ["import { type DSPropTypesSchema, type GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type React from 'react';\n\nimport { BUBBLE_TYPES, DSChatBubbleName, CHAT_BUBBLE_SLOTS } from './constants/index.js';\n\nexport declare namespace DSChatBubbleT {\n export type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\n\n export type BubbleTypesValues = (typeof BUBBLE_TYPES)[BubbleTypesKeys];\n\n export interface DefaultProps {\n type: BubbleTypesValues;\n title: string;\n body: string | React.ReactNode;\n time: string;\n }\n\n export interface OptionalProps {\n errorMessage?: string | React.ReactNode;\n helpMessage?: string | React.ReactNode;\n }\n\n export interface RequiredProps {\n dsId: string | number;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatBubbleT.DefaultProps = {\n type: BUBBLE_TYPES.SENDER,\n title: '',\n body: '',\n time: '',\n};\n\nexport const BubblePropTypes: DSPropTypesSchema<DSChatBubbleT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatBubbleName, CHAT_BUBBLE_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue('a randomly generated (on mount) uid'),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultProps.type),\n title: PropTypes.string.description('Title of the bubble'),\n time: PropTypes.string.isRequired.description('Time of the bubble'),\n body: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired.description('Bubble content'),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Error message to display at bottom of the bubble',\n ),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Help message to display at bottom of the bubble',\n ),\n};\n\nexport const propsArrowBubble = {\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.defaultValue(defaultProps.type),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,IAAAA,2BAKO;AAGP,uBAAkE;AAoC3D,MAAM,eAA2C;AAAA,EACtD,MAAM,8BAAa;AAAA,EACnB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,kBAA0D;AAAA,EACrE,OAAG,mDAAyB,mCAAkB,kCAAiB;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,mCAAU,UAAU,CAAC,mCAAU,QAAQ,mCAAU,MAAM,CAAC,EAC3D,YAAY,sBAAsB,EAClC,aAAa,qCAAqC;AAAA,EACrD,MAAM,mCAAU,MAAM,CAAC,8BAAa,WAAW,8BAAa,MAAM,CAAC,EAChE,WAAW,YAAY,qBAAqB,EAC5C,aAAa,aAAa,IAAI;AAAA,EACjC,OAAO,mCAAU,OAAO,YAAY,qBAAqB;AAAA,EACzD,MAAM,mCAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAClE,MAAM,mCAAU,UAAU,CAAC,mCAAU,QAAQ,mCAAU,OAAO,CAAC,EAAE,WAAW,YAAY,gBAAgB;AAAA,EACxG,cAAc,mCAAU,UAAU,CAAC,mCAAU,QAAQ,mCAAU,OAAO,CAAC,EAAE;AAAA,IACvE;AAAA,EACF;AAAA,EACA,aAAa,mCAAU,UAAU,CAAC,mCAAU,QAAQ,mCAAU,OAAO,CAAC,EAAE;AAAA,IACtE;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB;AAAA,EAC9B,MAAM,mCAAU,MAAM,CAAC,8BAAa,WAAW,8BAAa,MAAM,CAAC,EAAE,WAAW,aAAa,aAAa,IAAI;AAChH;",
6
+ "names": ["import_ds_props_helpers"]
7
7
  }