@elliemae/ds-chat-bubble 3.60.0-next.9 → 3.70.0-next.1
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 +90 -32
- package/dist/cjs/ChatBubble.js.map +2 -2
- package/dist/cjs/ChatBubbleArrow.js +76 -55
- package/dist/cjs/ChatBubbleArrow.js.map +2 -2
- package/dist/cjs/{DSChatBubbleDefinitions.js → constants/index.js} +36 -4
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +7 -5
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +14 -17
- package/dist/cjs/react-desc-prop-types.js.map +3 -3
- package/dist/cjs/styled.js +35 -37
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/ChatBubble.js +88 -30
- package/dist/esm/ChatBubble.js.map +2 -2
- package/dist/esm/ChatBubbleArrow.js +76 -55
- package/dist/esm/ChatBubbleArrow.js.map +2 -2
- package/dist/esm/constants/index.js +38 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +12 -4
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/react-desc-prop-types.js +10 -8
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +35 -37
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/ChatBubbleArrow.d.ts +1 -1
- package/dist/types/constants/index.d.ts +30 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/react-desc-prop-types.d.ts +6 -10
- package/dist/types/styled.d.ts +2 -3
- package/package.json +24 -26
- package/dist/cjs/ChatBubbleDataTestIds.js +0 -41
- package/dist/cjs/ChatBubbleDataTestIds.js.map +0 -7
- package/dist/cjs/DSChatBubbleDefinitions.js.map +0 -7
- package/dist/esm/ChatBubbleDataTestIds.js +0 -11
- package/dist/esm/ChatBubbleDataTestIds.js.map +0 -7
- package/dist/esm/DSChatBubbleDefinitions.js +0 -6
- package/dist/esm/DSChatBubbleDefinitions.js.map +0 -7
- package/dist/types/ChatBubbleDataTestIds.d.ts +0 -6
- package/dist/types/DSChatBubbleDefinitions.d.ts +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
PropTypes,
|
|
4
|
+
getPropsPerSlotPropTypes,
|
|
5
|
+
globalAttributesPropTypes,
|
|
6
|
+
xstyledPropTypes
|
|
7
|
+
} from "@elliemae/ds-props-helpers";
|
|
8
|
+
import { BUBBLE_TYPES, DSChatBubbleName, CHAT_BUBBLE_SLOTS } from "./constants/index.js";
|
|
9
9
|
const defaultProps = {
|
|
10
10
|
type: BUBBLE_TYPES.SENDER,
|
|
11
11
|
title: "",
|
|
@@ -13,6 +13,9 @@ const defaultProps = {
|
|
|
13
13
|
time: ""
|
|
14
14
|
};
|
|
15
15
|
const BubblePropTypes = {
|
|
16
|
+
...getPropsPerSlotPropTypes(DSChatBubbleName, CHAT_BUBBLE_SLOTS),
|
|
17
|
+
...globalAttributesPropTypes,
|
|
18
|
+
...xstyledPropTypes,
|
|
16
19
|
dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Unique id for bubble").defaultValue("a randomly generated (on mount) uid"),
|
|
17
20
|
type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.description("Define bubble type ").defaultValue(defaultProps.type),
|
|
18
21
|
title: PropTypes.string.description("Title of the bubble"),
|
|
@@ -29,7 +32,6 @@ const propsArrowBubble = {
|
|
|
29
32
|
type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]).isRequired.defaultValue(defaultProps.type)
|
|
30
33
|
};
|
|
31
34
|
export {
|
|
32
|
-
BUBBLE_TYPES,
|
|
33
35
|
BubblePropTypes,
|
|
34
36
|
defaultProps,
|
|
35
37
|
propsArrowBubble
|
|
@@ -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 {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
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;AAGP,SAAS,cAAc,kBAAkB,yBAAyB;AAoC3D,MAAM,eAA2C;AAAA,EACtD,MAAM,aAAa;AAAA,EACnB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,kBAA0D;AAAA,EACrE,GAAG,yBAAyB,kBAAkB,iBAAiB;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC3D,YAAY,sBAAsB,EAClC,aAAa,qCAAqC;AAAA,EACrD,MAAM,UAAU,MAAM,CAAC,aAAa,WAAW,aAAa,MAAM,CAAC,EAChE,WAAW,YAAY,qBAAqB,EAC5C,aAAa,aAAa,IAAI;AAAA,EACjC,OAAO,UAAU,OAAO,YAAY,qBAAqB;AAAA,EACzD,MAAM,UAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAClE,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC,EAAE,WAAW,YAAY,gBAAgB;AAAA,EACxG,cAAc,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IACvE;AAAA,EACF;AAAA,EACA,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IACtE;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB;AAAA,EAC9B,MAAM,UAAU,MAAM,CAAC,aAAa,WAAW,aAAa,MAAM,CAAC,EAAE,WAAW,aAAa,aAAa,IAAI;AAChH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,41 +1,59 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled, css } from "@elliemae/ds-system";
|
|
3
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { BUBBLE_TYPES } from "./
|
|
4
|
+
import { BUBBLE_TYPES, CHAT_BUBBLE_SLOTS, DSChatBubbleName } from "./constants/index.js";
|
|
5
5
|
const wrapRules = css`
|
|
6
6
|
overflow-wrap: break-word;
|
|
7
7
|
white-space: pre-wrap;
|
|
8
8
|
`;
|
|
9
|
-
const StyledWrapper = styled
|
|
9
|
+
const StyledWrapper = styled("div", {
|
|
10
|
+
name: DSChatBubbleName,
|
|
11
|
+
slot: CHAT_BUBBLE_SLOTS.WRAPPER
|
|
12
|
+
})`
|
|
10
13
|
min-width: 224px;
|
|
11
14
|
border-radius: 10px;
|
|
12
15
|
${wrapRules}
|
|
13
16
|
`;
|
|
14
|
-
const StyledTitleBubble = styled(Grid
|
|
17
|
+
const StyledTitleBubble = styled(Grid, {
|
|
18
|
+
name: DSChatBubbleName,
|
|
19
|
+
slot: CHAT_BUBBLE_SLOTS.HEADER
|
|
20
|
+
})`
|
|
15
21
|
padding-top: 6px;
|
|
16
22
|
padding-left: 10px;
|
|
17
23
|
padding-right: 10px;
|
|
18
24
|
padding-bottom: 4px;
|
|
19
25
|
`;
|
|
20
|
-
const StyledTitleLeftBubble = styled("div"
|
|
26
|
+
const StyledTitleLeftBubble = styled("div", {
|
|
27
|
+
name: DSChatBubbleName,
|
|
28
|
+
slot: CHAT_BUBBLE_SLOTS.HEADER_LEFT
|
|
29
|
+
})`
|
|
21
30
|
font-size: 1rem;
|
|
22
31
|
font-weight: 600;
|
|
23
32
|
${wrapRules}
|
|
24
33
|
`;
|
|
25
|
-
const StyledTitleRightBubble = styled(Grid
|
|
34
|
+
const StyledTitleRightBubble = styled(Grid, {
|
|
35
|
+
name: DSChatBubbleName,
|
|
36
|
+
slot: CHAT_BUBBLE_SLOTS.HEADER_RIGHT
|
|
37
|
+
})`
|
|
26
38
|
font-size: 1rem;
|
|
27
39
|
font-weight: 400;
|
|
28
40
|
align-self: flex-start;
|
|
29
|
-
color: ${(props) => props
|
|
41
|
+
color: ${(props) => props["data-theming-type"] === BUBBLE_TYPES.SENDER ? "#FFF" : "#657489"};
|
|
30
42
|
`;
|
|
31
|
-
const StyleBodyWrapper = styled
|
|
43
|
+
const StyleBodyWrapper = styled("div", {
|
|
44
|
+
name: DSChatBubbleName,
|
|
45
|
+
slot: CHAT_BUBBLE_SLOTS.BODY_WRAPPER
|
|
46
|
+
})`
|
|
32
47
|
font-size: 1rem;
|
|
33
48
|
font-weight: 400;
|
|
34
49
|
line-height: 1.15;
|
|
35
50
|
min-height: 18px;
|
|
36
51
|
padding: 0px 10px 8px 10px;
|
|
37
52
|
`;
|
|
38
|
-
const StyleErrorMessage = styled
|
|
53
|
+
const StyleErrorMessage = styled("div", {
|
|
54
|
+
name: DSChatBubbleName,
|
|
55
|
+
slot: CHAT_BUBBLE_SLOTS.ERROR_MESSAGE
|
|
56
|
+
})`
|
|
39
57
|
font-size: 0.923rem;
|
|
40
58
|
font-weight: 400;
|
|
41
59
|
padding-top: ${(props) => props.theme.space.xxxs};
|
|
@@ -55,7 +73,10 @@ const StyleErrorMessage = styled.div`
|
|
|
55
73
|
margin-left: 8px;
|
|
56
74
|
}
|
|
57
75
|
`;
|
|
58
|
-
const StyleHelpMessage = styled(StyleErrorMessage
|
|
76
|
+
const StyleHelpMessage = styled(StyleErrorMessage, {
|
|
77
|
+
name: DSChatBubbleName,
|
|
78
|
+
slot: CHAT_BUBBLE_SLOTS.HELP_MESSAGE
|
|
79
|
+
})`
|
|
59
80
|
font-size: 0.923rem;
|
|
60
81
|
line-height: 1.15;
|
|
61
82
|
color: ${(props) => props.theme.colors.neutral[600]};
|
|
@@ -67,54 +88,31 @@ const StyleHelpMessage = styled(StyleErrorMessage)`
|
|
|
67
88
|
color: ${(props) => props.theme.colors.danger[900]};
|
|
68
89
|
}
|
|
69
90
|
`;
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
bottom: 0.769rem;
|
|
75
|
-
height: 1.15rem;
|
|
76
|
-
`;
|
|
77
|
-
const StyledColoredBubble = styled.div`
|
|
91
|
+
const StyledColoredBubble = styled("div", {
|
|
92
|
+
name: DSChatBubbleName,
|
|
93
|
+
slot: CHAT_BUBBLE_SLOTS.COLORED_BUBBLE
|
|
94
|
+
})`
|
|
78
95
|
min-width: 224px;
|
|
79
96
|
border-radius: 10px;
|
|
80
97
|
position: relative;
|
|
81
98
|
|
|
82
|
-
${(props) => props
|
|
99
|
+
${(props) => props["data-theming-type"] === BUBBLE_TYPES.SENDER ? `
|
|
83
100
|
border: 1px solid ${props.theme.colors.brand["700"]};
|
|
84
101
|
background: ${props.theme.colors.brand[600]};
|
|
85
102
|
color: ${props.theme.colors.neutral["000"]};
|
|
86
|
-
${StyledBubbleArrow}{
|
|
87
|
-
right: -0.692rem;
|
|
88
|
-
bottom: 0.461rem;
|
|
89
|
-
svg{
|
|
90
|
-
fill: ${props.theme.colors.brand[600]};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
103
|
a {
|
|
95
104
|
color: #FFF;
|
|
96
105
|
}
|
|
97
|
-
|
|
98
106
|
` : `
|
|
99
107
|
box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);
|
|
100
108
|
background: ${props.theme.colors.neutral["000"]};
|
|
101
109
|
color: ${props.theme.colors.neutral[700]};
|
|
102
|
-
|
|
103
|
-
${StyledBubbleArrow}{
|
|
104
|
-
left: -0.846rem;
|
|
105
|
-
bottom: 0.461rem;
|
|
106
|
-
svg{
|
|
107
|
-
fill: ${props.theme.colors.neutral["000"]};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
110
|
`}
|
|
112
111
|
`;
|
|
113
112
|
export {
|
|
114
113
|
StyleBodyWrapper,
|
|
115
114
|
StyleErrorMessage,
|
|
116
115
|
StyleHelpMessage,
|
|
117
|
-
StyledBubbleArrow,
|
|
118
116
|
StyledColoredBubble,
|
|
119
117
|
StyledTitleBubble,
|
|
120
118
|
StyledTitleLeftBubble,
|
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 } from './
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AACrB,SAAS,
|
|
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;AAC1B,CAAC;AAAA;AAAA;AAAA,IAGG,SAAS;AAAA;AAIN,MAAM,oBAAoB,OAAO,MAAM;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,wBAAwB,OAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA,IAGG,SAAS;AAAA;AAEN,MAAM,yBAAyB,OAAO,MAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA,WAIU,CAAC,UAAW,MAAM,mBAAmB,MAAM,aAAa,SAAS,SAAS,SAAU;AAAA;AAGxF,MAAM,mBAAmB,OAAO,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQM,MAAM,oBAAoB,OAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA,iBAGgB,CAAC,UAAU,MAAM,MAAM,MAAM,IAAI;AAAA,WACvC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAMxC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,aAIxC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO/C,MAAM,mBAAmB,OAAO,mBAAmB;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,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
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSChatBubbleT } from './react-desc-prop-types.js';
|
|
3
|
-
export declare const ChatBubbleArrow: React.ComponentType<
|
|
3
|
+
export declare const ChatBubbleArrow: React.ComponentType<DSChatBubbleT.InternalProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const DSChatBubbleName = "DSBubble";
|
|
2
|
+
export declare const DSChatBubbleArrowName = "DSBubbleArrow";
|
|
3
|
+
export declare const BUBBLE_TYPES: {
|
|
4
|
+
readonly SENDER: "SENDER";
|
|
5
|
+
readonly RECIPIENT: "RECIPIENT";
|
|
6
|
+
readonly DELIMITER: "DELIMITER";
|
|
7
|
+
readonly SYSTEM: "SYSTEM";
|
|
8
|
+
};
|
|
9
|
+
export declare const CHAT_BUBBLE_SLOTS: {
|
|
10
|
+
readonly WRAPPER: "wrapper";
|
|
11
|
+
readonly HEADER: "header";
|
|
12
|
+
readonly HEADER_LEFT: "header-left";
|
|
13
|
+
readonly HEADER_RIGHT: "header-right";
|
|
14
|
+
readonly BODY_WRAPPER: "body-wrapper";
|
|
15
|
+
readonly ERROR_MESSAGE: "error-message";
|
|
16
|
+
readonly HELP_MESSAGE: "help-message";
|
|
17
|
+
readonly ARROW: "arrow";
|
|
18
|
+
readonly COLORED_BUBBLE: "colored-bubble";
|
|
19
|
+
};
|
|
20
|
+
export declare const CHAT_BUBBLE_DATA_TESTID: {
|
|
21
|
+
WRAPPER: string;
|
|
22
|
+
HEADER_LEFT: string;
|
|
23
|
+
BODY_WRAPPER: string;
|
|
24
|
+
HEADER_RIGHT: string;
|
|
25
|
+
ERROR_MESSAGE: string;
|
|
26
|
+
HELP_MESSAGE: string;
|
|
27
|
+
HEADER: "ds-bubble-header";
|
|
28
|
+
ARROW: "ds-bubble-arrow";
|
|
29
|
+
COLORED_BUBBLE: "ds-bubble-colored-bubble";
|
|
30
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ChatBubble, ChatBubbleWithSchema } from './ChatBubble.js';
|
|
2
|
-
export {
|
|
3
|
-
export { ChatBubbleDataTestIds
|
|
2
|
+
export { type DSChatBubbleT } from './react-desc-prop-types.js';
|
|
3
|
+
export { CHAT_BUBBLE_DATA_TESTID as ChatBubbleDataTestIds, // LEGACY EXPORT
|
|
4
|
+
CHAT_BUBBLE_DATA_TESTID, BUBBLE_TYPES, DSChatBubbleName, CHAT_BUBBLE_SLOTS, } from './constants/index.js';
|
|
4
5
|
export * from './styled.js';
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { WeakValidationMap } from 'react';
|
|
1
|
+
import { type DSPropTypesSchema, type GlobalAttributesT } from '@elliemae/ds-props-helpers';
|
|
3
2
|
import type React from 'react';
|
|
4
|
-
|
|
5
|
-
SENDER: string;
|
|
6
|
-
RECIPIENT: string;
|
|
7
|
-
DELIMITER: string;
|
|
8
|
-
SYSTEM: string;
|
|
9
|
-
};
|
|
3
|
+
import { BUBBLE_TYPES } from './constants/index.js';
|
|
10
4
|
export declare namespace DSChatBubbleT {
|
|
11
5
|
type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;
|
|
12
6
|
type BubbleTypesValues = (typeof BUBBLE_TYPES)[BubbleTypesKeys];
|
|
@@ -29,5 +23,7 @@ export declare namespace DSChatBubbleT {
|
|
|
29
23
|
}
|
|
30
24
|
}
|
|
31
25
|
export declare const defaultProps: DSChatBubbleT.DefaultProps;
|
|
32
|
-
export declare const BubblePropTypes:
|
|
33
|
-
export declare const propsArrowBubble:
|
|
26
|
+
export declare const BubblePropTypes: DSPropTypesSchema<DSChatBubbleT.Props>;
|
|
27
|
+
export declare const propsArrowBubble: {
|
|
28
|
+
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
|
+
};
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -2,12 +2,11 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
|
|
|
2
2
|
export declare const StyledTitleBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
3
3
|
export declare const StyledTitleLeftBubble: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
4
4
|
export declare const StyledTitleRightBubble: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
|
|
5
|
-
type: string;
|
|
5
|
+
'data-theming-type': string;
|
|
6
6
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
7
7
|
export declare const StyleBodyWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
8
8
|
export declare const StyleErrorMessage: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
9
9
|
export declare const StyleHelpMessage: import("styled-components").StyledComponent<import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>>, never>;
|
|
10
|
-
export declare const StyledBubbleArrow: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
11
10
|
export declare const StyledColoredBubble: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
|
|
12
|
-
type: string;
|
|
11
|
+
'data-theming-type': string;
|
|
13
12
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-bubble",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.70.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"files": [
|
|
@@ -31,38 +31,36 @@
|
|
|
31
31
|
"reportFile": "tests.xml",
|
|
32
32
|
"indent": 4
|
|
33
33
|
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
36
|
-
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
37
|
-
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
38
|
-
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
39
|
-
"dts": "node ../../../scripts/dts.mjs",
|
|
40
|
-
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
41
|
-
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
42
|
-
},
|
|
43
34
|
"publishConfig": {
|
|
44
35
|
"access": "public",
|
|
45
36
|
"typeSafety": true
|
|
46
37
|
},
|
|
47
38
|
"dependencies": {
|
|
48
|
-
"
|
|
49
|
-
"@elliemae/ds-
|
|
50
|
-
"@elliemae/ds-
|
|
51
|
-
"@elliemae/ds-
|
|
52
|
-
"
|
|
39
|
+
"uid": "^2.0.2",
|
|
40
|
+
"@elliemae/ds-system": "3.70.0-next.1",
|
|
41
|
+
"@elliemae/ds-icons": "3.70.0-next.1",
|
|
42
|
+
"@elliemae/ds-grid": "3.70.0-next.1",
|
|
43
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.1"
|
|
53
44
|
},
|
|
54
45
|
"devDependencies": {
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"@elliemae/
|
|
58
|
-
"
|
|
59
|
-
"styled-components": "catalog:"
|
|
46
|
+
"jest": "^30.0.0",
|
|
47
|
+
"styled-components": "~5.3.9",
|
|
48
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.1",
|
|
49
|
+
"@elliemae/ds-test-utils": "3.70.0-next.1"
|
|
60
50
|
},
|
|
61
51
|
"peerDependencies": {
|
|
62
|
-
"lodash-es": "
|
|
63
|
-
"react": "
|
|
64
|
-
"react-dom": "
|
|
65
|
-
"styled-components": "
|
|
52
|
+
"lodash-es": "^4.17.21",
|
|
53
|
+
"react": "^18.3.1",
|
|
54
|
+
"react-dom": "^18.3.1",
|
|
55
|
+
"styled-components": "~5.3.9"
|
|
66
56
|
},
|
|
67
|
-
"
|
|
68
|
-
|
|
57
|
+
"scripts": {
|
|
58
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
59
|
+
"test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
60
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
61
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
62
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
63
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
64
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var ChatBubbleDataTestIds_exports = {};
|
|
30
|
-
__export(ChatBubbleDataTestIds_exports, {
|
|
31
|
-
ChatBubbleDataTestIds: () => ChatBubbleDataTestIds
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(ChatBubbleDataTestIds_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
const ChatBubbleDataTestIds = {
|
|
36
|
-
BUBBLE: "ds-chat-bubble",
|
|
37
|
-
BUBBLE_TITLE: "chat-bubble-title",
|
|
38
|
-
BUBBLE_BODY: "chat-bubble-body",
|
|
39
|
-
BUBBLE_TIME: "chat-bubble-time"
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=ChatBubbleDataTestIds.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/ChatBubbleDataTestIds.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const ChatBubbleDataTestIds = {\n BUBBLE: 'ds-chat-bubble',\n BUBBLE_TITLE: 'chat-bubble-title',\n BUBBLE_BODY: 'chat-bubble-body',\n BUBBLE_TIME: 'chat-bubble-time',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,wBAAwB;AAAA,EACnC,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AACf;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSChatBubbleDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const DSChatBubbleName = 'DSBubble';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const ChatBubbleDataTestIds = {
|
|
3
|
-
BUBBLE: "ds-chat-bubble",
|
|
4
|
-
BUBBLE_TITLE: "chat-bubble-title",
|
|
5
|
-
BUBBLE_BODY: "chat-bubble-body",
|
|
6
|
-
BUBBLE_TIME: "chat-bubble-time"
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
ChatBubbleDataTestIds
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=ChatBubbleDataTestIds.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatBubbleDataTestIds.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const ChatBubbleDataTestIds = {\n BUBBLE: 'ds-chat-bubble',\n BUBBLE_TITLE: 'chat-bubble-title',\n BUBBLE_BODY: 'chat-bubble-body',\n BUBBLE_TIME: 'chat-bubble-time',\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,wBAAwB;AAAA,EACnC,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AACf;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSChatBubbleDefinitions.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSChatBubbleName = 'DSBubble';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,mBAAmB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DSChatBubbleName = "DSBubble";
|