@elliemae/ds-chat-bubble 3.70.0-next.7 → 3.70.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ChatBubble.js +26 -17
- package/dist/cjs/ChatBubble.js.map +2 -2
- package/dist/cjs/ChatBubbleArrow.js +55 -48
- package/dist/cjs/ChatBubbleArrow.js.map +2 -2
- package/dist/cjs/index.js +10 -3
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +18 -6
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/ChatBubble.js +34 -18
- package/dist/esm/ChatBubble.js.map +2 -2
- package/dist/esm/ChatBubbleArrow.js +55 -48
- package/dist/esm/ChatBubbleArrow.js.map +2 -2
- package/dist/esm/index.js +13 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +18 -6
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/ChatBubble.d.ts +3 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/react-desc-prop-types.d.ts +14 -2
- package/dist/types/tests/DSChatBubble.axe.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.data-testId.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.events.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.exports.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.keyboard.test.d.ts +1 -0
- package/dist/types/tests/DSChatBubble.pui-7276.test.d.ts +1 -0
- package/package.json +8 -7
- /package/dist/types/tests/{ChatBubbe.axe.test.d.ts → DSChatBubble.a11y.test.d.ts} +0 -0
- /package/dist/types/tests/{ChatBubble.test.d.ts → DSChatBubble.api.test.d.ts} +0 -0
package/dist/cjs/ChatBubble.js
CHANGED
|
@@ -29,7 +29,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var ChatBubble_exports = {};
|
|
30
30
|
__export(ChatBubble_exports, {
|
|
31
31
|
ChatBubble: () => ChatBubble,
|
|
32
|
-
ChatBubbleWithSchema: () => ChatBubbleWithSchema
|
|
32
|
+
ChatBubbleWithSchema: () => ChatBubbleWithSchema,
|
|
33
|
+
DSChatBubble: () => DSChatBubble,
|
|
34
|
+
DSChatBubbleWithSchema: () => DSChatBubbleWithSchema
|
|
33
35
|
});
|
|
34
36
|
module.exports = __toCommonJS(ChatBubble_exports);
|
|
35
37
|
var React = __toESM(require("react"));
|
|
@@ -53,21 +55,26 @@ const ChatBubble = (props) => {
|
|
|
53
55
|
defaultPropsIncludingInstanciatedValues
|
|
54
56
|
);
|
|
55
57
|
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.BubblePropTypes, import_constants.DSChatBubbleName);
|
|
58
|
+
const globalProps = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
|
|
59
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
60
|
+
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
56
61
|
const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;
|
|
57
62
|
const bodyParts = import_react.default.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
|
|
58
63
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
59
64
|
import_styled.StyledWrapper,
|
|
60
65
|
{
|
|
66
|
+
...globalProps,
|
|
67
|
+
...xstyledProps,
|
|
61
68
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`,
|
|
62
|
-
getOwnerProps
|
|
63
|
-
getOwnerPropsArguments
|
|
69
|
+
getOwnerProps,
|
|
70
|
+
getOwnerPropsArguments,
|
|
64
71
|
children: [
|
|
65
72
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
66
73
|
import_styled.StyledColoredBubble,
|
|
67
74
|
{
|
|
68
75
|
"data-theming-type": type,
|
|
69
|
-
getOwnerProps
|
|
70
|
-
getOwnerPropsArguments
|
|
76
|
+
getOwnerProps,
|
|
77
|
+
getOwnerPropsArguments,
|
|
71
78
|
children: [
|
|
72
79
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
73
80
|
import_styled.StyledTitleBubble,
|
|
@@ -75,15 +82,15 @@ const ChatBubble = (props) => {
|
|
|
75
82
|
cols: ["1fr", "auto"],
|
|
76
83
|
gutter: "xs",
|
|
77
84
|
alignItems: "flex-end",
|
|
78
|
-
getOwnerProps
|
|
79
|
-
getOwnerPropsArguments
|
|
85
|
+
getOwnerProps,
|
|
86
|
+
getOwnerPropsArguments,
|
|
80
87
|
children: [
|
|
81
88
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
89
|
import_styled.StyledTitleLeftBubble,
|
|
83
90
|
{
|
|
84
91
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`,
|
|
85
|
-
getOwnerProps
|
|
86
|
-
getOwnerPropsArguments
|
|
92
|
+
getOwnerProps,
|
|
93
|
+
getOwnerPropsArguments,
|
|
87
94
|
children: title
|
|
88
95
|
}
|
|
89
96
|
),
|
|
@@ -93,8 +100,8 @@ const ChatBubble = (props) => {
|
|
|
93
100
|
alignItems: "center",
|
|
94
101
|
"data-theming-type": type,
|
|
95
102
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`,
|
|
96
|
-
getOwnerProps
|
|
97
|
-
getOwnerPropsArguments
|
|
103
|
+
getOwnerProps,
|
|
104
|
+
getOwnerPropsArguments,
|
|
98
105
|
children: time
|
|
99
106
|
}
|
|
100
107
|
)
|
|
@@ -105,8 +112,8 @@ const ChatBubble = (props) => {
|
|
|
105
112
|
import_styled.StyleBodyWrapper,
|
|
106
113
|
{
|
|
107
114
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`,
|
|
108
|
-
getOwnerProps
|
|
109
|
-
getOwnerPropsArguments
|
|
115
|
+
getOwnerProps,
|
|
116
|
+
getOwnerPropsArguments,
|
|
110
117
|
children: bodyParts.map((item, index) => (
|
|
111
118
|
// eslint-disable-next-line react/no-array-index-key
|
|
112
119
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
|
|
@@ -124,8 +131,8 @@ const ChatBubble = (props) => {
|
|
|
124
131
|
import_styled.StyleErrorMessage,
|
|
125
132
|
{
|
|
126
133
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`,
|
|
127
|
-
getOwnerProps
|
|
128
|
-
getOwnerPropsArguments
|
|
134
|
+
getOwnerProps,
|
|
135
|
+
getOwnerPropsArguments,
|
|
129
136
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["1fr", "auto"], children: [
|
|
130
137
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: errorMessage }),
|
|
131
138
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircleFill, {})
|
|
@@ -136,8 +143,8 @@ const ChatBubble = (props) => {
|
|
|
136
143
|
import_styled.StyleHelpMessage,
|
|
137
144
|
{
|
|
138
145
|
"data-testid": `${import_constants.CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`,
|
|
139
|
-
getOwnerProps
|
|
140
|
-
getOwnerPropsArguments
|
|
146
|
+
getOwnerProps,
|
|
147
|
+
getOwnerPropsArguments,
|
|
141
148
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: helpMessage })
|
|
142
149
|
}
|
|
143
150
|
) : null
|
|
@@ -147,4 +154,6 @@ const ChatBubble = (props) => {
|
|
|
147
154
|
};
|
|
148
155
|
ChatBubble.displayName = import_constants.DSChatBubbleName;
|
|
149
156
|
const ChatBubbleWithSchema = (0, import_ds_props_helpers.describe)(ChatBubble);
|
|
157
|
+
const DSChatBubble = ChatBubble;
|
|
158
|
+
const DSChatBubbleWithSchema = ChatBubbleWithSchema;
|
|
150
159
|
//# 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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} 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 globalProps = useGetGlobalAttributes(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\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 {...globalProps}\n {...xstyledProps}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledColoredBubble\n data-theming-type={type}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTitleBubble\n cols={['1fr', 'auto']}\n gutter=\"xs\"\n alignItems=\"flex-end\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTitleLeftBubble\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n data-theming-type={type}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={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 // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\n\n// DS-prefixed canonical names (modern Dimsum convention) \u2014 ChatBubble kept as alias for backwards compat\nconst DSChatBubble = ChatBubble;\nconst DSChatBubbleWithSchema = ChatBubbleWithSchema;\n\nexport { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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B;",
|
|
6
6
|
"names": ["React", "dsId"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(ChatBubbleArrow_exports);
|
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
38
|
var import_constants = require("./constants/index.js");
|
|
38
39
|
const senderArrowPositionStyles = import_ds_system.css`
|
|
39
40
|
right: -0.692rem;
|
|
@@ -55,57 +56,63 @@ const StyledBubbleArrow = (0, import_ds_system.styled)("div", {
|
|
|
55
56
|
return senderArrowPositionStyles;
|
|
56
57
|
}}
|
|
57
58
|
`;
|
|
58
|
-
const BubbleArrowRecipient = (propsWithDefault) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
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",
|
|
59
|
+
const BubbleArrowRecipient = (propsWithDefault) => {
|
|
60
|
+
const { getOwnerProps } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
StyledBubbleArrow,
|
|
63
|
+
{
|
|
64
|
+
"data-theming-type": import_constants.BUBBLE_TYPES.RECIPIENT,
|
|
65
|
+
getOwnerProps,
|
|
66
|
+
getOwnerPropsArguments: () => ({ isRecipientArrow: true }),
|
|
67
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
69
|
+
"filter",
|
|
91
70
|
{
|
|
92
|
-
id: `
|
|
93
|
-
|
|
71
|
+
id: `filter-${propsWithDefault.dsId}`,
|
|
72
|
+
width: "211.1%",
|
|
73
|
+
height: "225%",
|
|
74
|
+
x: "-55.6%",
|
|
75
|
+
y: "-50%",
|
|
76
|
+
filterUnits: "objectBoundingBox",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { in: "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "1.5" }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
"feColorMatrix",
|
|
82
|
+
{
|
|
83
|
+
in: "shadowBlurOuter1",
|
|
84
|
+
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"
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
]
|
|
94
88
|
}
|
|
95
|
-
)
|
|
89
|
+
) }),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "matrix(-1 0 0 1 15 0)", children: [
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("use", { filter: `url(#filter-${propsWithDefault.dsId})`, href: `#path-${propsWithDefault.dsId}` }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
"path",
|
|
94
|
+
{
|
|
95
|
+
id: `path-${propsWithDefault.dsId}`,
|
|
96
|
+
d: "M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5"
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
96
100
|
] })
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const BubbleArrowSender = (propsWithDefault) =>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
)
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
const BubbleArrowSender = (propsWithDefault) => {
|
|
105
|
+
const { getOwnerProps } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
StyledBubbleArrow,
|
|
108
|
+
{
|
|
109
|
+
"data-theming-type": import_constants.BUBBLE_TYPES.SENDER,
|
|
110
|
+
getOwnerProps,
|
|
111
|
+
getOwnerPropsArguments: () => ({ isRecipientArrow: false }),
|
|
112
|
+
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" }) }) })
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
};
|
|
109
116
|
const ChatBubbleArrow = (propsWithDefault) => {
|
|
110
117
|
const { type } = propsWithDefault;
|
|
111
118
|
if (type === import_constants.BUBBLE_TYPES.RECIPIENT) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BubbleArrowRecipient, { ...propsWithDefault });
|
|
@@ -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 { 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) =>
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\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 const { getOwnerProps } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\n return (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.RECIPIENT}\n getOwnerProps={getOwnerProps}\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};\n\nconst BubbleArrowSender: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => {\n const { getOwnerProps } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\n return (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.SENDER}\n getOwnerProps={getOwnerProps}\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};\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;AAAA;AAAA;ACAA,YAAuB;ADyCb;AAzCV,uBAA4B;AAC5B,8BAA8B;AAE9B,uBAAkE;AAGlE,MAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAKlC,MAAM,+BAA+B;AAAA;AAAA;AAAA;AAKrC,MAAM,wBAAoB,yBAAO,OAAO;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,mCAAkB;AAC1B,CAAC;AAAA;AAAA,UAES,CAAC,UACP,MAAM,mBAAmB,MAAM,8BAAa,YACxC,MAAM,MAAM,OAAO,QAAQ,KAAK,IAChC,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,IACnC,CAAC,UAAU;AACX,MAAI,MAAM,mBAAmB,MAAM,8BAAa,UAAW,QAAO;AAClE,SAAO;AACT,CAAC;AAAA;AAGH,MAAM,uBAAyE,CAAC,qBAAqB;AACnG,QAAM,EAAE,cAAc,QAAI,uCAAmC,gBAAgB;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,qBAAmB,8BAAa;AAAA,MAChC;AAAA,MACA,wBAAwB,OAAO,EAAE,kBAAkB,KAAK;AAAA,MAExD,uDAAC,SAAI,OAAM,WAAU,QAAO,WAAU,SAAQ,aAAY,eAAY,QACpE;AAAA,oDAAC,UACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,UAAU,iBAAiB,IAAI;AAAA,YACnC,OAAM;AAA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,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -30,16 +29,24 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
29
|
var index_exports = {};
|
|
31
30
|
__export(index_exports, {
|
|
32
31
|
BUBBLE_TYPES: () => import_constants.BUBBLE_TYPES,
|
|
32
|
+
BubblePropTypes: () => import_react_desc_prop_types2.BubblePropTypes,
|
|
33
33
|
CHAT_BUBBLE_DATA_TESTID: () => import_constants.CHAT_BUBBLE_DATA_TESTID,
|
|
34
34
|
CHAT_BUBBLE_SLOTS: () => import_constants.CHAT_BUBBLE_SLOTS,
|
|
35
35
|
ChatBubble: () => import_ChatBubble.ChatBubble,
|
|
36
36
|
ChatBubbleDataTestIds: () => import_constants.CHAT_BUBBLE_DATA_TESTID,
|
|
37
37
|
ChatBubbleWithSchema: () => import_ChatBubble.ChatBubbleWithSchema,
|
|
38
|
-
|
|
38
|
+
DSChatBubble: () => import_ChatBubble.DSChatBubble,
|
|
39
|
+
DSChatBubbleArrowName: () => import_constants.DSChatBubbleArrowName,
|
|
40
|
+
DSChatBubbleName: () => import_constants.DSChatBubbleName,
|
|
41
|
+
DSChatBubbleWithSchema: () => import_ChatBubble.DSChatBubbleWithSchema,
|
|
42
|
+
StyleBodyWrapper: () => import_styled.StyleBodyWrapper,
|
|
43
|
+
StyledTitleLeftBubble: () => import_styled.StyledTitleLeftBubble,
|
|
44
|
+
StyledTitleRightBubble: () => import_styled.StyledTitleRightBubble
|
|
39
45
|
});
|
|
40
46
|
module.exports = __toCommonJS(index_exports);
|
|
41
47
|
var React = __toESM(require("react"));
|
|
42
48
|
var import_ChatBubble = require("./ChatBubble.js");
|
|
49
|
+
var import_react_desc_prop_types2 = require("./react-desc-prop-types.js");
|
|
43
50
|
var import_constants = require("./constants/index.js");
|
|
44
|
-
|
|
51
|
+
var import_styled = require("./styled.js");
|
|
45
52
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -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 { 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
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["export { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema } from './ChatBubble.js';\nexport { type DSChatBubbleT } from './react-desc-prop-types.js';\nexport { BubblePropTypes } from './react-desc-prop-types.js';\nexport {\n CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT\n CHAT_BUBBLE_DATA_TESTID,\n CHAT_BUBBLE_SLOTS,\n BUBBLE_TYPES,\n DSChatBubbleName,\n DSChatBubbleArrowName,\n} from './constants/index.js';\nexport { StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper } 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAuF;AAEvF,IAAAA,gCAAgC;AAChC,uBAOO;AACP,oBAAgF;",
|
|
6
|
+
"names": ["import_react_desc_prop_types"]
|
|
7
7
|
}
|
|
@@ -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 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;
|
|
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 TypescriptHelpersT } from '@elliemae/ds-typescript-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 // hand-written per-slot function argument map \u2014 one entry per slot in CHAT_BUBBLE_SLOTS.\n // The slot prefix uses the component `name` (DSBubble) per checkNamingConvention; see KNOWN_INTENTIONAL_DEVIATIONS.md.\n export type SlotFunctionArguments = {\n dsBubbleWrapper: () => object;\n dsBubbleHeader: () => object;\n dsBubbleHeaderLeft: () => object;\n dsBubbleHeaderRight: () => object;\n dsBubbleBodyWrapper: () => object;\n dsBubbleErrorMessage: () => object;\n dsBubbleHelpMessage: () => object;\n dsBubbleArrow: () => object;\n dsBubbleColoredBubble: () => object;\n };\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 extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatBubbleName, typeof CHAT_BUBBLE_SLOTS> {\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;AAIP,uBAAkE;AAmD3D,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
6
|
"names": ["import_ds_props_helpers"]
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -48,7 +48,9 @@ const wrapRules = import_ds_system.css`
|
|
|
48
48
|
`;
|
|
49
49
|
const StyledWrapper = (0, import_ds_system.styled)("div", {
|
|
50
50
|
name: import_constants.DSChatBubbleName,
|
|
51
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.WRAPPER
|
|
51
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.WRAPPER,
|
|
52
|
+
// legacy dynamic data-testid `ds-chat-bubble-${dsId}` is preserved via inline JSX data-testid
|
|
53
|
+
preserveLegacyDataTestId: true
|
|
52
54
|
})`
|
|
53
55
|
min-width: 224px;
|
|
54
56
|
border-radius: 10px;
|
|
@@ -65,7 +67,9 @@ const StyledTitleBubble = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
|
65
67
|
`;
|
|
66
68
|
const StyledTitleLeftBubble = (0, import_ds_system.styled)("div", {
|
|
67
69
|
name: import_constants.DSChatBubbleName,
|
|
68
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_LEFT
|
|
70
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_LEFT,
|
|
71
|
+
// legacy dynamic data-testid `chat-bubble-title-${dsId}` is preserved via inline JSX data-testid
|
|
72
|
+
preserveLegacyDataTestId: true
|
|
69
73
|
})`
|
|
70
74
|
font-size: 1rem;
|
|
71
75
|
font-weight: 600;
|
|
@@ -73,7 +77,9 @@ const StyledTitleLeftBubble = (0, import_ds_system.styled)("div", {
|
|
|
73
77
|
`;
|
|
74
78
|
const StyledTitleRightBubble = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
75
79
|
name: import_constants.DSChatBubbleName,
|
|
76
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_RIGHT
|
|
80
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.HEADER_RIGHT,
|
|
81
|
+
// legacy dynamic data-testid `chat-bubble-time-${dsId}` is preserved via inline JSX data-testid
|
|
82
|
+
preserveLegacyDataTestId: true
|
|
77
83
|
})`
|
|
78
84
|
font-size: 1rem;
|
|
79
85
|
font-weight: 400;
|
|
@@ -82,7 +88,9 @@ const StyledTitleRightBubble = (0, import_ds_system.styled)(import_ds_grid.Grid,
|
|
|
82
88
|
`;
|
|
83
89
|
const StyleBodyWrapper = (0, import_ds_system.styled)("div", {
|
|
84
90
|
name: import_constants.DSChatBubbleName,
|
|
85
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.BODY_WRAPPER
|
|
91
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.BODY_WRAPPER,
|
|
92
|
+
// legacy dynamic data-testid `chat-bubble-body-${dsId}` is preserved via inline JSX data-testid
|
|
93
|
+
preserveLegacyDataTestId: true
|
|
86
94
|
})`
|
|
87
95
|
font-size: 1rem;
|
|
88
96
|
font-weight: 400;
|
|
@@ -92,7 +100,9 @@ const StyleBodyWrapper = (0, import_ds_system.styled)("div", {
|
|
|
92
100
|
`;
|
|
93
101
|
const StyleErrorMessage = (0, import_ds_system.styled)("div", {
|
|
94
102
|
name: import_constants.DSChatBubbleName,
|
|
95
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.ERROR_MESSAGE
|
|
103
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,
|
|
104
|
+
// legacy dynamic data-testid `chat-bubble-error-message-${dsId}` is preserved via inline JSX data-testid
|
|
105
|
+
preserveLegacyDataTestId: true
|
|
96
106
|
})`
|
|
97
107
|
font-size: 0.923rem;
|
|
98
108
|
font-weight: 400;
|
|
@@ -115,7 +125,9 @@ const StyleErrorMessage = (0, import_ds_system.styled)("div", {
|
|
|
115
125
|
`;
|
|
116
126
|
const StyleHelpMessage = (0, import_ds_system.styled)(StyleErrorMessage, {
|
|
117
127
|
name: import_constants.DSChatBubbleName,
|
|
118
|
-
slot: import_constants.CHAT_BUBBLE_SLOTS.HELP_MESSAGE
|
|
128
|
+
slot: import_constants.CHAT_BUBBLE_SLOTS.HELP_MESSAGE,
|
|
129
|
+
// legacy dynamic data-testid `chat-bubble-help-message-${dsId}` is preserved via inline JSX data-testid
|
|
130
|
+
preserveLegacyDataTestId: true
|
|
119
131
|
})`
|
|
120
132
|
font-size: 0.923rem;
|
|
121
133
|
line-height: 1.15;
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.WRAPPER,\n})`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER,\n})`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,\n})`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,\n})<{ 'data-theming-type': string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props['data-theming-type'] === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,\n})`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,\n})`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,\n})`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\nexport const StyledColoredBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE,\n})<{ 'data-theming-type': string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n a {\n color: #FFF;\n }\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA4B;AAC5B,qBAAqB;AACrB,uBAAkE;AAElE,MAAM,YAAY;AAAA;AAAA;AAAA;AAKX,MAAM,oBAAgB,yBAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,mCAAkB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.WRAPPER,\n // legacy dynamic data-testid `ds-chat-bubble-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER,\n})`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,\n // legacy dynamic data-testid `chat-bubble-title-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,\n // legacy dynamic data-testid `chat-bubble-time-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})<{ 'data-theming-type': string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props['data-theming-type'] === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,\n // legacy dynamic data-testid `chat-bubble-body-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,\n // legacy dynamic data-testid `chat-bubble-error-message-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,\n // legacy dynamic data-testid `chat-bubble-help-message-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\nexport const StyledColoredBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE,\n})<{ 'data-theming-type': string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n a {\n color: #FFF;\n }\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA4B;AAC5B,qBAAqB;AACrB,uBAAkE;AAElE,MAAM,YAAY;AAAA;AAAA;AAAA;AAKX,MAAM,oBAAgB,yBAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,mCAAkB;AAAA;AAAA,EAExB,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA,IAGG,SAAS;AAAA;AAIN,MAAM,wBAAoB,yBAAO,qBAAM;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,mCAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,4BAAwB,yBAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,mCAAkB;AAAA;AAAA,EAExB,0BAA0B;AAC5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O,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,mCAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG,CAAC,UACD,MAAM,mBAAmB,MAAM,8BAAa,SACxC;AAAA,4BACoB,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,sBACrC,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,iBAClC,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,QAK1C;AAAA;AAAA,sBAEc,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBACtC,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,KAC3C;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/ChatBubble.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
describe,
|
|
6
|
+
useValidateTypescriptPropTypes,
|
|
7
|
+
useMemoMergePropsWithDefault,
|
|
8
|
+
useOwnerProps,
|
|
9
|
+
useGetGlobalAttributes,
|
|
10
|
+
useGetXstyledProps
|
|
11
|
+
} from "@elliemae/ds-props-helpers";
|
|
5
12
|
import { WarningCircleFill } from "@elliemae/ds-icons";
|
|
6
13
|
import { Grid } from "@elliemae/ds-grid";
|
|
7
14
|
import { uid } from "uid";
|
|
@@ -28,21 +35,26 @@ const ChatBubble = (props) => {
|
|
|
28
35
|
defaultPropsIncludingInstanciatedValues
|
|
29
36
|
);
|
|
30
37
|
useValidateTypescriptPropTypes(propsWithDefault, BubblePropTypes, DSChatBubbleName);
|
|
38
|
+
const globalProps = useGetGlobalAttributes(propsWithDefault);
|
|
39
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
40
|
+
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
|
|
31
41
|
const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;
|
|
32
42
|
const bodyParts = React2.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
|
|
33
43
|
return /* @__PURE__ */ jsxs(
|
|
34
44
|
StyledWrapper,
|
|
35
45
|
{
|
|
46
|
+
...globalProps,
|
|
47
|
+
...xstyledProps,
|
|
36
48
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`,
|
|
37
|
-
getOwnerProps
|
|
38
|
-
getOwnerPropsArguments
|
|
49
|
+
getOwnerProps,
|
|
50
|
+
getOwnerPropsArguments,
|
|
39
51
|
children: [
|
|
40
52
|
/* @__PURE__ */ jsxs(
|
|
41
53
|
StyledColoredBubble,
|
|
42
54
|
{
|
|
43
55
|
"data-theming-type": type,
|
|
44
|
-
getOwnerProps
|
|
45
|
-
getOwnerPropsArguments
|
|
56
|
+
getOwnerProps,
|
|
57
|
+
getOwnerPropsArguments,
|
|
46
58
|
children: [
|
|
47
59
|
/* @__PURE__ */ jsxs(
|
|
48
60
|
StyledTitleBubble,
|
|
@@ -50,15 +62,15 @@ const ChatBubble = (props) => {
|
|
|
50
62
|
cols: ["1fr", "auto"],
|
|
51
63
|
gutter: "xs",
|
|
52
64
|
alignItems: "flex-end",
|
|
53
|
-
getOwnerProps
|
|
54
|
-
getOwnerPropsArguments
|
|
65
|
+
getOwnerProps,
|
|
66
|
+
getOwnerPropsArguments,
|
|
55
67
|
children: [
|
|
56
68
|
/* @__PURE__ */ jsx(
|
|
57
69
|
StyledTitleLeftBubble,
|
|
58
70
|
{
|
|
59
71
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`,
|
|
60
|
-
getOwnerProps
|
|
61
|
-
getOwnerPropsArguments
|
|
72
|
+
getOwnerProps,
|
|
73
|
+
getOwnerPropsArguments,
|
|
62
74
|
children: title
|
|
63
75
|
}
|
|
64
76
|
),
|
|
@@ -68,8 +80,8 @@ const ChatBubble = (props) => {
|
|
|
68
80
|
alignItems: "center",
|
|
69
81
|
"data-theming-type": type,
|
|
70
82
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`,
|
|
71
|
-
getOwnerProps
|
|
72
|
-
getOwnerPropsArguments
|
|
83
|
+
getOwnerProps,
|
|
84
|
+
getOwnerPropsArguments,
|
|
73
85
|
children: time
|
|
74
86
|
}
|
|
75
87
|
)
|
|
@@ -80,8 +92,8 @@ const ChatBubble = (props) => {
|
|
|
80
92
|
StyleBodyWrapper,
|
|
81
93
|
{
|
|
82
94
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`,
|
|
83
|
-
getOwnerProps
|
|
84
|
-
getOwnerPropsArguments
|
|
95
|
+
getOwnerProps,
|
|
96
|
+
getOwnerPropsArguments,
|
|
85
97
|
children: bodyParts.map((item, index) => (
|
|
86
98
|
// eslint-disable-next-line react/no-array-index-key
|
|
87
99
|
/* @__PURE__ */ jsxs(React2.Fragment, { children: [
|
|
@@ -99,8 +111,8 @@ const ChatBubble = (props) => {
|
|
|
99
111
|
StyleErrorMessage,
|
|
100
112
|
{
|
|
101
113
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`,
|
|
102
|
-
getOwnerProps
|
|
103
|
-
getOwnerPropsArguments
|
|
114
|
+
getOwnerProps,
|
|
115
|
+
getOwnerPropsArguments,
|
|
104
116
|
children: /* @__PURE__ */ jsxs(Grid, { cols: ["1fr", "auto"], children: [
|
|
105
117
|
/* @__PURE__ */ jsx("span", { children: errorMessage }),
|
|
106
118
|
/* @__PURE__ */ jsx(WarningCircleFill, {})
|
|
@@ -111,8 +123,8 @@ const ChatBubble = (props) => {
|
|
|
111
123
|
StyleHelpMessage,
|
|
112
124
|
{
|
|
113
125
|
"data-testid": `${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`,
|
|
114
|
-
getOwnerProps
|
|
115
|
-
getOwnerPropsArguments
|
|
126
|
+
getOwnerProps,
|
|
127
|
+
getOwnerPropsArguments,
|
|
116
128
|
children: /* @__PURE__ */ jsx("span", { children: helpMessage })
|
|
117
129
|
}
|
|
118
130
|
) : null
|
|
@@ -122,8 +134,12 @@ const ChatBubble = (props) => {
|
|
|
122
134
|
};
|
|
123
135
|
ChatBubble.displayName = DSChatBubbleName;
|
|
124
136
|
const ChatBubbleWithSchema = describe(ChatBubble);
|
|
137
|
+
const DSChatBubble = ChatBubble;
|
|
138
|
+
const DSChatBubbleWithSchema = ChatBubbleWithSchema;
|
|
125
139
|
export {
|
|
126
140
|
ChatBubble,
|
|
127
|
-
ChatBubbleWithSchema
|
|
141
|
+
ChatBubbleWithSchema,
|
|
142
|
+
DSChatBubble,
|
|
143
|
+
DSChatBubbleWithSchema
|
|
128
144
|
};
|
|
129
145
|
//# sourceMappingURL=ChatBubble.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatBubble.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} 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 globalProps = useGetGlobalAttributes(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\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 {...globalProps}\n {...xstyledProps}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.WRAPPER}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledColoredBubble\n data-theming-type={type}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTitleBubble\n cols={['1fr', 'auto']}\n gutter=\"xs\"\n alignItems=\"flex-end\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTitleLeftBubble\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_LEFT}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble\n alignItems=\"center\"\n data-theming-type={type}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HEADER_RIGHT}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.BODY_WRAPPER}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={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 // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.ERROR_MESSAGE}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid cols={['1fr', 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </Grid>\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`${CHAT_BUBBLE_DATA_TESTID.HELP_MESSAGE}-${dsId}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.displayName = DSChatBubbleName;\nconst ChatBubbleWithSchema = describe(ChatBubble);\n\n// DS-prefixed canonical names (modern Dimsum convention) \u2014 ChatBubble kept as alias for backwards compat\nconst DSChatBubble = ChatBubble;\nconst DSChatBubbleWithSchema = ChatBubbleWithSchema;\n\nexport { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyDf,SAOE,KAPF;AAzDR,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAClC,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAqC,oBAAoB;AAClE,SAAS,uBAAuB;AAChC,SAAS,yBAAyB,wBAAwB;AAE1D,MAAM,aAAuD,CAAC,UAAU;AACtE,QAAM,0CAA0CA,OAAM,QAAQ,MAAM;AAClE,UAAMC,QAAO,MAAM,QAAQ,kBAAkB,IAAI,CAAC,CAAC;AACnD,WAAO,EAAE,GAAG,cAAc,MAAAA,MAAK;AAAA,EACjC,GAAG,CAAC,MAAM,IAAI,CAAC;AACf,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,iCAA+B,kBAAkB,iBAAiB,gBAAgB;AAElF,QAAM,cAAc,uBAAuB,gBAAgB;AAC3D,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAmC,gBAAgB;AAErG,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,YAAY,IAAI;AACrE,QAAM,YAAYD,OAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,IAA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AAAA,YAEA,+BAAC,QAAK,MAAM,CAAC,OAAO,MAAM,GACxB;AAAA,kCAAC,UAAM,wBAAa;AAAA,cACpB,oBAAC,qBAAkB;AAAA,eACrB;AAAA;AAAA,QACF,IACE;AAAA,QACH,cACC;AAAA,UAAC;AAAA;AAAA,YAEC,eAAa,GAAG,wBAAwB,YAAY,IAAI,IAAI;AAAA,YAC5D;AAAA,YACA;AAAA,YAEA,8BAAC,UAAM,uBAAY;AAAA;AAAA,QACrB,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAGhD,MAAM,eAAe;AACrB,MAAM,yBAAyB;",
|
|
6
6
|
"names": ["React", "dsId"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { styled, css } from "@elliemae/ds-system";
|
|
4
|
+
import { useOwnerProps } from "@elliemae/ds-props-helpers";
|
|
4
5
|
import { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from "./constants/index.js";
|
|
5
6
|
const senderArrowPositionStyles = css`
|
|
6
7
|
right: -0.692rem;
|
|
@@ -22,57 +23,63 @@ const StyledBubbleArrow = styled("div", {
|
|
|
22
23
|
return senderArrowPositionStyles;
|
|
23
24
|
}}
|
|
24
25
|
`;
|
|
25
|
-
const BubbleArrowRecipient = (propsWithDefault) =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
width: "211.1%",
|
|
37
|
-
height: "225%",
|
|
38
|
-
x: "-55.6%",
|
|
39
|
-
y: "-50%",
|
|
40
|
-
filterUnits: "objectBoundingBox",
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ jsx("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
|
|
43
|
-
/* @__PURE__ */ jsx("feGaussianBlur", { in: "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "1.5" }),
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
"feColorMatrix",
|
|
46
|
-
{
|
|
47
|
-
in: "shadowBlurOuter1",
|
|
48
|
-
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"
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
) }),
|
|
54
|
-
/* @__PURE__ */ jsxs("g", { transform: "matrix(-1 0 0 1 15 0)", children: [
|
|
55
|
-
/* @__PURE__ */ jsx("use", { filter: `url(#filter-${propsWithDefault.dsId})`, href: `#path-${propsWithDefault.dsId}` }),
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
"path",
|
|
26
|
+
const BubbleArrowRecipient = (propsWithDefault) => {
|
|
27
|
+
const { getOwnerProps } = useOwnerProps(propsWithDefault);
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
StyledBubbleArrow,
|
|
30
|
+
{
|
|
31
|
+
"data-theming-type": BUBBLE_TYPES.RECIPIENT,
|
|
32
|
+
getOwnerProps,
|
|
33
|
+
getOwnerPropsArguments: () => ({ isRecipientArrow: true }),
|
|
34
|
+
children: /* @__PURE__ */ jsxs("svg", { width: "1.15rem", height: "1.07rem", viewBox: "0 0 15 14", "aria-hidden": "true", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
36
|
+
"filter",
|
|
58
37
|
{
|
|
59
|
-
id: `
|
|
60
|
-
|
|
38
|
+
id: `filter-${propsWithDefault.dsId}`,
|
|
39
|
+
width: "211.1%",
|
|
40
|
+
height: "225%",
|
|
41
|
+
x: "-55.6%",
|
|
42
|
+
y: "-50%",
|
|
43
|
+
filterUnits: "objectBoundingBox",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("feOffset", { dx: "2.3", dy: "1.2", in: "SourceAlpha", result: "shadowOffsetOuter1" }),
|
|
46
|
+
/* @__PURE__ */ jsx("feGaussianBlur", { in: "shadowOffsetOuter1", result: "shadowBlurOuter1", stdDeviation: "1.5" }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
"feColorMatrix",
|
|
49
|
+
{
|
|
50
|
+
in: "shadowBlurOuter1",
|
|
51
|
+
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"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
61
55
|
}
|
|
62
|
-
)
|
|
56
|
+
) }),
|
|
57
|
+
/* @__PURE__ */ jsxs("g", { transform: "matrix(-1 0 0 1 15 0)", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("use", { filter: `url(#filter-${propsWithDefault.dsId})`, href: `#path-${propsWithDefault.dsId}` }),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
id: `path-${propsWithDefault.dsId}`,
|
|
63
|
+
d: "M12 8.5c0-.563-.322-1.014-.772-1.304L3 2v8h7.563l.003-.007A1.497 1.497 0 0 0 12 8.5"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
63
67
|
] })
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const BubbleArrowSender = (propsWithDefault) =>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
const BubbleArrowSender = (propsWithDefault) => {
|
|
72
|
+
const { getOwnerProps } = useOwnerProps(propsWithDefault);
|
|
73
|
+
return /* @__PURE__ */ jsx(
|
|
74
|
+
StyledBubbleArrow,
|
|
75
|
+
{
|
|
76
|
+
"data-theming-type": BUBBLE_TYPES.SENDER,
|
|
77
|
+
getOwnerProps,
|
|
78
|
+
getOwnerPropsArguments: () => ({ isRecipientArrow: false }),
|
|
79
|
+
children: /* @__PURE__ */ jsx("svg", { width: "0.692rem", height: "0.615rem", viewBox: "0 0 9 8", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ 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" }) }) })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
76
83
|
const ChatBubbleArrow = (propsWithDefault) => {
|
|
77
84
|
const { type } = propsWithDefault;
|
|
78
85
|
if (type === BUBBLE_TYPES.RECIPIENT) return /* @__PURE__ */ jsx(BubbleArrowRecipient, { ...propsWithDefault });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatBubbleArrow.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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) =>
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css } from '@elliemae/ds-system';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\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 const { getOwnerProps } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\n return (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.RECIPIENT}\n getOwnerProps={getOwnerProps}\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};\n\nconst BubbleArrowSender: React.ComponentType<DSChatBubbleT.InternalProps> = (propsWithDefault) => {\n const { getOwnerProps } = useOwnerProps<DSChatBubbleT.Props>(propsWithDefault);\n return (\n <StyledBubbleArrow\n data-theming-type={BUBBLE_TYPES.SENDER}\n getOwnerProps={getOwnerProps}\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};\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyCb,SAQE,KARF;AAzCV,SAAS,QAAQ,WAAW;AAC5B,SAAS,qBAAqB;AAE9B,SAAS,cAAc,mBAAmB,wBAAwB;AAGlE,MAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAKlC,MAAM,+BAA+B;AAAA;AAAA;AAAA;AAKrC,MAAM,oBAAoB,OAAO,OAAO;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA,UAES,CAAC,UACP,MAAM,mBAAmB,MAAM,aAAa,YACxC,MAAM,MAAM,OAAO,QAAQ,KAAK,IAChC,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,IACnC,CAAC,UAAU;AACX,MAAI,MAAM,mBAAmB,MAAM,aAAa,UAAW,QAAO;AAClE,SAAO;AACT,CAAC;AAAA;AAGH,MAAM,uBAAyE,CAAC,qBAAqB;AACnG,QAAM,EAAE,cAAc,IAAI,cAAmC,gBAAgB;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,qBAAmB,aAAa;AAAA,MAChC;AAAA,MACA,wBAAwB,OAAO,EAAE,kBAAkB,KAAK;AAAA,MAExD,+BAAC,SAAI,OAAM,WAAU,QAAO,WAAU,SAAQ,aAAY,eAAY,QACpE;AAAA,4BAAC,UACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,UAAU,iBAAiB,IAAI;AAAA,YACnC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,GAAE;AAAA,YACF,GAAE;AAAA,YACF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ChatBubbleWithSchema } from "./ChatBubble.js";
|
|
2
|
+
import { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema } from "./ChatBubble.js";
|
|
3
|
+
import { BubblePropTypes } from "./react-desc-prop-types.js";
|
|
3
4
|
import {
|
|
4
5
|
CHAT_BUBBLE_DATA_TESTID,
|
|
5
6
|
CHAT_BUBBLE_DATA_TESTID as CHAT_BUBBLE_DATA_TESTID2,
|
|
7
|
+
CHAT_BUBBLE_SLOTS,
|
|
6
8
|
BUBBLE_TYPES,
|
|
7
9
|
DSChatBubbleName,
|
|
8
|
-
|
|
10
|
+
DSChatBubbleArrowName
|
|
9
11
|
} from "./constants/index.js";
|
|
10
|
-
|
|
12
|
+
import { StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper } from "./styled.js";
|
|
11
13
|
export {
|
|
12
14
|
BUBBLE_TYPES,
|
|
15
|
+
BubblePropTypes,
|
|
13
16
|
CHAT_BUBBLE_DATA_TESTID2 as CHAT_BUBBLE_DATA_TESTID,
|
|
14
17
|
CHAT_BUBBLE_SLOTS,
|
|
15
18
|
ChatBubble,
|
|
16
19
|
CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds,
|
|
17
20
|
ChatBubbleWithSchema,
|
|
18
|
-
|
|
21
|
+
DSChatBubble,
|
|
22
|
+
DSChatBubbleArrowName,
|
|
23
|
+
DSChatBubbleName,
|
|
24
|
+
DSChatBubbleWithSchema,
|
|
25
|
+
StyleBodyWrapper,
|
|
26
|
+
StyledTitleLeftBubble,
|
|
27
|
+
StyledTitleRightBubble
|
|
19
28
|
};
|
|
20
29
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema } from './ChatBubble.js';\nexport { type DSChatBubbleT } from './react-desc-prop-types.js';\nexport { BubblePropTypes } from './react-desc-prop-types.js';\nexport {\n CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT\n CHAT_BUBBLE_DATA_TESTID,\n CHAT_BUBBLE_SLOTS,\n BUBBLE_TYPES,\n DSChatBubbleName,\n DSChatBubbleArrowName,\n} from './constants/index.js';\nexport { StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper } from './styled.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,sBAAsB,cAAc,8BAA8B;AAEvF,SAAS,uBAAuB;AAChC;AAAA,EAC6B;AAAA,EAC3B,2BAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB,wBAAwB,wBAAwB;",
|
|
6
6
|
"names": ["CHAT_BUBBLE_DATA_TESTID"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type 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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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 TypescriptHelpersT } from '@elliemae/ds-typescript-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 // hand-written per-slot function argument map \u2014 one entry per slot in CHAT_BUBBLE_SLOTS.\n // The slot prefix uses the component `name` (DSBubble) per checkNamingConvention; see KNOWN_INTENTIONAL_DEVIATIONS.md.\n export type SlotFunctionArguments = {\n dsBubbleWrapper: () => object;\n dsBubbleHeader: () => object;\n dsBubbleHeaderLeft: () => object;\n dsBubbleHeaderRight: () => object;\n dsBubbleBodyWrapper: () => object;\n dsBubbleErrorMessage: () => object;\n dsBubbleHelpMessage: () => object;\n dsBubbleArrow: () => object;\n dsBubbleColoredBubble: () => object;\n };\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 extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatBubbleName, typeof CHAT_BUBBLE_SLOTS> {\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY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_BUBBLE_SLOTS.WRAPPER
|
|
11
|
+
slot: CHAT_BUBBLE_SLOTS.WRAPPER,
|
|
12
|
+
// legacy dynamic data-testid `ds-chat-bubble-${dsId}` is preserved via inline JSX data-testid
|
|
13
|
+
preserveLegacyDataTestId: true
|
|
12
14
|
})`
|
|
13
15
|
min-width: 224px;
|
|
14
16
|
border-radius: 10px;
|
|
@@ -25,7 +27,9 @@ const StyledTitleBubble = styled(Grid, {
|
|
|
25
27
|
`;
|
|
26
28
|
const StyledTitleLeftBubble = styled("div", {
|
|
27
29
|
name: DSChatBubbleName,
|
|
28
|
-
slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT
|
|
30
|
+
slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,
|
|
31
|
+
// legacy dynamic data-testid `chat-bubble-title-${dsId}` is preserved via inline JSX data-testid
|
|
32
|
+
preserveLegacyDataTestId: true
|
|
29
33
|
})`
|
|
30
34
|
font-size: 1rem;
|
|
31
35
|
font-weight: 600;
|
|
@@ -33,7 +37,9 @@ const StyledTitleLeftBubble = styled("div", {
|
|
|
33
37
|
`;
|
|
34
38
|
const StyledTitleRightBubble = styled(Grid, {
|
|
35
39
|
name: DSChatBubbleName,
|
|
36
|
-
slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT
|
|
40
|
+
slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,
|
|
41
|
+
// legacy dynamic data-testid `chat-bubble-time-${dsId}` is preserved via inline JSX data-testid
|
|
42
|
+
preserveLegacyDataTestId: true
|
|
37
43
|
})`
|
|
38
44
|
font-size: 1rem;
|
|
39
45
|
font-weight: 400;
|
|
@@ -42,7 +48,9 @@ const StyledTitleRightBubble = styled(Grid, {
|
|
|
42
48
|
`;
|
|
43
49
|
const StyleBodyWrapper = styled("div", {
|
|
44
50
|
name: DSChatBubbleName,
|
|
45
|
-
slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER
|
|
51
|
+
slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,
|
|
52
|
+
// legacy dynamic data-testid `chat-bubble-body-${dsId}` is preserved via inline JSX data-testid
|
|
53
|
+
preserveLegacyDataTestId: true
|
|
46
54
|
})`
|
|
47
55
|
font-size: 1rem;
|
|
48
56
|
font-weight: 400;
|
|
@@ -52,7 +60,9 @@ const StyleBodyWrapper = styled("div", {
|
|
|
52
60
|
`;
|
|
53
61
|
const StyleErrorMessage = styled("div", {
|
|
54
62
|
name: DSChatBubbleName,
|
|
55
|
-
slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE
|
|
63
|
+
slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,
|
|
64
|
+
// legacy dynamic data-testid `chat-bubble-error-message-${dsId}` is preserved via inline JSX data-testid
|
|
65
|
+
preserveLegacyDataTestId: true
|
|
56
66
|
})`
|
|
57
67
|
font-size: 0.923rem;
|
|
58
68
|
font-weight: 400;
|
|
@@ -75,7 +85,9 @@ const StyleErrorMessage = styled("div", {
|
|
|
75
85
|
`;
|
|
76
86
|
const StyleHelpMessage = styled(StyleErrorMessage, {
|
|
77
87
|
name: DSChatBubbleName,
|
|
78
|
-
slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE
|
|
88
|
+
slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,
|
|
89
|
+
// legacy dynamic data-testid `chat-bubble-help-message-${dsId}` is preserved via inline JSX data-testid
|
|
90
|
+
preserveLegacyDataTestId: true
|
|
79
91
|
})`
|
|
80
92
|
font-size: 0.923rem;
|
|
81
93
|
line-height: 1.15;
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.WRAPPER,\n})`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER,\n})`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,\n})`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,\n})<{ 'data-theming-type': string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props['data-theming-type'] === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,\n})`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,\n})`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,\n})`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\nexport const StyledColoredBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE,\n})<{ 'data-theming-type': string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n a {\n color: #FFF;\n }\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n `}\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AACrB,SAAS,cAAc,mBAAmB,wBAAwB;AAElE,MAAM,YAAY;AAAA;AAAA;AAAA;AAKX,MAAM,gBAAgB,OAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,kBAAkB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from './constants/index.js';\n\nconst wrapRules = css`\n overflow-wrap: break-word;\n white-space: pre-wrap;\n`;\n// Bubble WRAPPER\nexport const StyledWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.WRAPPER,\n // legacy dynamic data-testid `ds-chat-bubble-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n min-width: 224px;\n border-radius: 10px;\n ${wrapRules}\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER,\n})`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT,\n // legacy dynamic data-testid `chat-bubble-title-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 1rem;\n font-weight: 600;\n ${wrapRules}\n`;\nexport const StyledTitleRightBubble = styled(Grid, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT,\n // legacy dynamic data-testid `chat-bubble-time-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})<{ 'data-theming-type': string }>`\n font-size: 1rem;\n font-weight: 400;\n align-self: flex-start;\n color: ${(props) => (props['data-theming-type'] === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER,\n // legacy dynamic data-testid `chat-bubble-body-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.15;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE,\n // legacy dynamic data-testid `chat-bubble-error-message-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 0.923rem;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 1.15;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 0.923rem;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage, {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE,\n // legacy dynamic data-testid `chat-bubble-help-message-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\n font-size: 0.923rem;\n line-height: 1.15;\n color: ${(props) => props.theme.colors.neutral[600]};\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n`;\n\nexport const StyledColoredBubble = styled('div', {\n name: DSChatBubbleName,\n slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE,\n})<{ 'data-theming-type': string }>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props['data-theming-type'] === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n a {\n color: #FFF;\n }\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n `}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AACrB,SAAS,cAAc,mBAAmB,wBAAwB;AAElE,MAAM,YAAY;AAAA;AAAA;AAAA;AAKX,MAAM,gBAAgB,OAAO,OAAO;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,kBAAkB;A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A;AAAA,EAExB,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA,WAGU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA,YAEzC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAI/C,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKG,CAAC,UACD,MAAM,mBAAmB,MAAM,aAAa,SACxC;AAAA,4BACoB,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA,sBACrC,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,iBAClC,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,QAK1C;AAAA;AAAA,sBAEc,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBACtC,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,KAC3C;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,4 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type DSChatBubbleT } from './react-desc-prop-types.js';
|
|
3
3
|
declare const ChatBubble: React.ComponentType<DSChatBubbleT.Props>;
|
|
4
4
|
declare const ChatBubbleWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChatBubbleT.Props>;
|
|
5
|
-
|
|
5
|
+
declare const DSChatBubble: React.FunctionComponent<DSChatBubbleT.Props>;
|
|
6
|
+
declare const DSChatBubbleWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChatBubbleT.Props>;
|
|
7
|
+
export { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';
|
|
1
|
+
export { ChatBubble, ChatBubbleWithSchema, DSChatBubble, DSChatBubbleWithSchema } from './ChatBubble.js';
|
|
2
2
|
export { type DSChatBubbleT } from './react-desc-prop-types.js';
|
|
3
|
+
export { BubblePropTypes } from './react-desc-prop-types.js';
|
|
3
4
|
export { CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT
|
|
4
|
-
CHAT_BUBBLE_DATA_TESTID, BUBBLE_TYPES, DSChatBubbleName,
|
|
5
|
-
export
|
|
5
|
+
CHAT_BUBBLE_DATA_TESTID, CHAT_BUBBLE_SLOTS, BUBBLE_TYPES, DSChatBubbleName, DSChatBubbleArrowName, } from './constants/index.js';
|
|
6
|
+
export { StyledTitleLeftBubble, StyledTitleRightBubble, StyleBodyWrapper } from './styled.js';
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { type DSPropTypesSchema, type GlobalAttributesT } from '@elliemae/ds-props-helpers';
|
|
2
|
+
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
2
3
|
import type React from 'react';
|
|
3
|
-
import { BUBBLE_TYPES } from './constants/index.js';
|
|
4
|
+
import { BUBBLE_TYPES, DSChatBubbleName, CHAT_BUBBLE_SLOTS } from './constants/index.js';
|
|
4
5
|
export declare namespace DSChatBubbleT {
|
|
5
6
|
type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;
|
|
6
7
|
type BubbleTypesValues = (typeof BUBBLE_TYPES)[BubbleTypesKeys];
|
|
8
|
+
type SlotFunctionArguments = {
|
|
9
|
+
dsBubbleWrapper: () => object;
|
|
10
|
+
dsBubbleHeader: () => object;
|
|
11
|
+
dsBubbleHeaderLeft: () => object;
|
|
12
|
+
dsBubbleHeaderRight: () => object;
|
|
13
|
+
dsBubbleBodyWrapper: () => object;
|
|
14
|
+
dsBubbleErrorMessage: () => object;
|
|
15
|
+
dsBubbleHelpMessage: () => object;
|
|
16
|
+
dsBubbleArrow: () => object;
|
|
17
|
+
dsBubbleColoredBubble: () => object;
|
|
18
|
+
};
|
|
7
19
|
interface DefaultProps {
|
|
8
20
|
type: BubbleTypesValues;
|
|
9
21
|
title: string;
|
|
10
22
|
body: string | React.ReactNode;
|
|
11
23
|
time: string;
|
|
12
24
|
}
|
|
13
|
-
interface OptionalProps {
|
|
25
|
+
interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatBubbleName, typeof CHAT_BUBBLE_SLOTS> {
|
|
14
26
|
errorMessage?: string | React.ReactNode;
|
|
15
27
|
helpMessage?: string | React.ReactNode;
|
|
16
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-bubble",
|
|
3
|
-
"version": "3.70.0-next.
|
|
3
|
+
"version": "3.70.0-next.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"files": [
|
|
@@ -37,16 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"uid": "^2.0.2",
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-icons": "3.70.0-next.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-system": "3.70.0-next.
|
|
40
|
+
"@elliemae/ds-grid": "3.70.0-next.8",
|
|
41
|
+
"@elliemae/ds-icons": "3.70.0-next.8",
|
|
42
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.8",
|
|
43
|
+
"@elliemae/ds-system": "3.70.0-next.8",
|
|
44
|
+
"@elliemae/ds-typescript-helpers": "3.70.0-next.8"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"jest": "^30.0.0",
|
|
47
48
|
"styled-components": "~5.3.9",
|
|
48
|
-
"@elliemae/ds-monorepo-devops": "3.70.0-next.
|
|
49
|
-
"@elliemae/ds-test-utils": "3.70.0-next.
|
|
49
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.8",
|
|
50
|
+
"@elliemae/ds-test-utils": "3.70.0-next.8"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"lodash-es": "^4.17.21",
|
|
File without changes
|
|
File without changes
|