@elliemae/ds-chat-message-delimeter 3.70.0-next.2 → 3.70.0-next.20
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/MessageDelimiter.js +28 -10
- package/dist/cjs/MessageDelimiter.js.map +2 -2
- package/dist/cjs/{DSMessageDelimiterDefinitions.js → constants/index.js} +22 -6
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +9 -6
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +26 -4
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +40 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/MessageDelimiter.js +32 -14
- package/dist/esm/MessageDelimiter.js.map +2 -2
- package/dist/esm/constants/index.js +22 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +15 -7
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +26 -4
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +17 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/constants/index.d.ts +15 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/react-desc-prop-types.d.ts +20 -383
- package/dist/types/styled.d.ts +3 -1
- package/dist/types/tests/DSChatMessageDelimeter.a11y.test.d.ts +1 -0
- package/dist/types/tests/DSChatMessageDelimeter.api.test.d.ts +1 -0
- package/dist/types/tests/DSChatMessageDelimeter.data-testid.test.d.ts +1 -0
- package/dist/types/tests/DSChatMessageDelimeter.events.test.d.ts +0 -0
- package/dist/types/tests/DSChatMessageDelimeter.exports.test.d.ts +1 -0
- package/dist/types/tests/DSChatMessageDelimeter.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSChatMessageDelimeter.keyboard.test.d.ts +0 -0
- package/dist/types/tests/DSChatMessageDelimeter.proptype-schema.test.d.ts +1 -0
- package/dist/types/typescript-testing/slot-props.d.ts +1 -0
- package/package.json +5 -5
- package/dist/cjs/DSMessageDelimiterDefinitions.js.map +0 -7
- package/dist/esm/DSMessageDelimiterDefinitions.js +0 -6
- package/dist/esm/DSMessageDelimiterDefinitions.js.map +0 -7
- package/dist/types/DSMessageDelimiterDefinitions.d.ts +0 -1
|
@@ -37,19 +37,37 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
38
|
var import_styled = require("./styled.js");
|
|
39
39
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
40
|
-
var
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
41
|
const MessageDelimiter = (props) => {
|
|
42
42
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
43
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.
|
|
44
|
-
const
|
|
43
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSChatMessageDelimeterPropTypes, import_constants.DSChatMessageDelimeterName);
|
|
44
|
+
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
45
45
|
const { title, size, verticalMargin } = propsWithDefault;
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Root, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
|
+
import_styled.Wrapper,
|
|
48
|
+
{
|
|
49
|
+
cols: ["1fr", "auto", "1fr"],
|
|
50
|
+
getOwnerProps,
|
|
51
|
+
getOwnerPropsArguments,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.LineStart, { getOwnerProps, getOwnerPropsArguments }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_styled.Text,
|
|
56
|
+
{
|
|
57
|
+
size,
|
|
58
|
+
verticalMargin,
|
|
59
|
+
"data-testid": import_constants.CHAT_MESSAGE_DELIMETER_DATA_TESTID.TITLE,
|
|
60
|
+
getOwnerProps,
|
|
61
|
+
getOwnerPropsArguments,
|
|
62
|
+
children: title
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.LineEnd, { getOwnerProps, getOwnerPropsArguments })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
51
69
|
};
|
|
52
|
-
MessageDelimiter.displayName =
|
|
70
|
+
MessageDelimiter.displayName = import_constants.DSChatMessageDelimeterName;
|
|
53
71
|
const MessageDelimiterWithSchema = (0, import_ds_props_helpers.describe)(MessageDelimiter);
|
|
54
|
-
MessageDelimiterWithSchema.propTypes = import_react_desc_prop_types.
|
|
72
|
+
MessageDelimiterWithSchema.propTypes = import_react_desc_prop_types.DSChatMessageDelimeterPropTypes;
|
|
55
73
|
//# sourceMappingURL=MessageDelimiter.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/MessageDelimiter.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Root, Wrapper, LineStart, LineEnd, Text } from './styled.js';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nimport { defaultProps, DSChatMessageDelimeterPropTypes } from './react-desc-prop-types.js';\nimport { CHAT_MESSAGE_DELIMETER_DATA_TESTID, DSChatMessageDelimeterName } from './constants/index.js';\n\nconst MessageDelimiter: React.ComponentType<DSChatMessageDelimeterT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatMessageDelimeterT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterName);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatMessageDelimeterT.Props>(propsWithDefault);\n\n const { title, size, verticalMargin } = propsWithDefault;\n return (\n <Root getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <Wrapper\n cols={['1fr', 'auto', '1fr']}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LineStart getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n <Text\n size={size}\n verticalMargin={verticalMargin}\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_MESSAGE_DELIMETER_DATA_TESTID.TITLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </Text>\n <LineEnd getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n </Wrapper>\n </Root>\n );\n};\n\nMessageDelimiter.displayName = DSChatMessageDelimeterName;\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = DSChatMessageDelimeterPropTypes as ValidationMap<unknown>;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBjB;AApBN,8BAMO;AACP,oBAAwD;AAExD,mCAA8D;AAC9D,uBAA+E;AAE/E,MAAM,mBAAuE,CAAC,UAAU;AACtF,QAAM,uBAAmB,sDAAoE,OAAO,yCAAY;AAChH,8DAA+B,kBAAkB,8DAAiC,2CAA0B;AAC5G,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAA6C,gBAAgB;AAE/G,QAAM,EAAE,OAAO,MAAM,eAAe,IAAI;AACxC,SACE,4CAAC,sBAAK,eAA8B,wBAClC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,2BAAU,eAA8B,wBAAgD;AAAA,QACzF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YAEA,eAAa,oDAAmC;AAAA,YAChD;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACA,4CAAC,yBAAQ,eAA8B,wBAAgD;AAAA;AAAA;AAAA,EACzF,GACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,11 +26,27 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
CHAT_MESSAGE_DELIMETER_DATA_TESTID: () => CHAT_MESSAGE_DELIMETER_DATA_TESTID,
|
|
32
|
+
CHAT_MESSAGE_DELIMETER_SLOTS: () => CHAT_MESSAGE_DELIMETER_SLOTS,
|
|
33
|
+
DSChatMessageDelimeterName: () => DSChatMessageDelimeterName
|
|
32
34
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(constants_exports);
|
|
34
36
|
var React = __toESM(require("react"));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSChatMessageDelimeterName = "DSChatmessagedelimeter";
|
|
39
|
+
const CHAT_MESSAGE_DELIMETER_SLOTS = {
|
|
40
|
+
ROOT: "root",
|
|
41
|
+
WRAPPER: "wrapper",
|
|
42
|
+
LINE_START: "line-start",
|
|
43
|
+
LINE_END: "line-end",
|
|
44
|
+
TITLE: "title"
|
|
45
|
+
// legacy ones...
|
|
46
|
+
};
|
|
47
|
+
const CHAT_MESSAGE_DELIMETER_DATA_TESTID = {
|
|
48
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),
|
|
49
|
+
TITLE: "chat-message-delimiter-title"
|
|
50
|
+
// legacy value — breaking change if removed
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatMessageDelimeterName = 'DSChatmessagedelimeter';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n// legacy data-testid values predate the slot naming convention; preserved at three layers (slot comment here, manual re-declaration in CHAT_MESSAGE_DELIMETER_DATA_TESTID, inline JSX `data-testid` prop on the slot consumer) \u2014 breaking change if removed.\nexport const CHAT_MESSAGE_DELIMETER_SLOTS = {\n ROOT: 'root',\n WRAPPER: 'wrapper',\n LINE_START: 'line-start',\n LINE_END: 'line-end',\n TITLE: 'title', // legacy ones...\n} as const;\n\nexport const CHAT_MESSAGE_DELIMETER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),\n TITLE: 'chat-message-delimiter-title', // legacy value \u2014 breaking change if removed\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,6BAA6B;AAInC,MAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,OAAO;AAAA;AACT;AAEO,MAAM,qCAAqC;AAAA,EAChD,OAAG,0CAAwB,4BAA4B,4BAA4B;AAAA,EACnF,OAAO;AAAA;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,10 +28,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
|
+
CHAT_MESSAGE_DELIMETER_DATA_TESTID: () => import_constants.CHAT_MESSAGE_DELIMETER_DATA_TESTID,
|
|
32
|
+
CHAT_MESSAGE_DELIMETER_SLOTS: () => import_constants.CHAT_MESSAGE_DELIMETER_SLOTS,
|
|
33
|
+
DSChatMessageDelimeterName: () => import_constants.DSChatMessageDelimeterName,
|
|
34
|
+
DSChatMessageDelimeterPropTypes: () => import_react_desc_prop_types.DSChatMessageDelimeterPropTypes,
|
|
35
|
+
DSChatMessageDelimeterPropTypesSchema: () => import_react_desc_prop_types.DSChatMessageDelimeterPropTypesSchema,
|
|
31
36
|
MessageDelimiter: () => import_MessageDelimiter.MessageDelimiter,
|
|
32
37
|
MessageDelimiterWithSchema: () => import_MessageDelimiter.MessageDelimiterWithSchema
|
|
33
38
|
});
|
|
34
39
|
module.exports = __toCommonJS(index_exports);
|
|
35
40
|
var React = __toESM(require("react"));
|
|
36
41
|
var import_MessageDelimiter = require("./MessageDelimiter.js");
|
|
42
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
43
|
+
var import_constants = require("./constants/index.js");
|
|
37
44
|
//# 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": ["import type {} from '@elliemae/ds-props-helpers';\nexport { MessageDelimiter, MessageDelimiterWithSchema } from './MessageDelimiter.js';\nexport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\n\nexport { MessageDelimiter, MessageDelimiterWithSchema } from './MessageDelimiter.js';\nexport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nexport { DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterPropTypesSchema } from './react-desc-prop-types.js';\nexport {\n DSChatMessageDelimeterName,\n CHAT_MESSAGE_DELIMETER_SLOTS,\n CHAT_MESSAGE_DELIMETER_DATA_TESTID,\n} from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA6D;AAE7D,mCAAuF;AACvF,uBAIO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,22 +28,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var react_desc_prop_types_exports = {};
|
|
30
30
|
__export(react_desc_prop_types_exports, {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
DSChatMessageDelimeterPropTypes: () => DSChatMessageDelimeterPropTypes,
|
|
32
|
+
DSChatMessageDelimeterPropTypesSchema: () => DSChatMessageDelimeterPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
35
36
|
var React = __toESM(require("react"));
|
|
36
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
37
39
|
const defaultProps = {
|
|
38
40
|
size: "s",
|
|
39
41
|
verticalMargin: 0
|
|
40
42
|
};
|
|
41
|
-
const
|
|
43
|
+
const DSChatMessageDelimeterPropTypes = {
|
|
44
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSChatMessageDelimeterName, import_constants.CHAT_MESSAGE_DELIMETER_SLOTS),
|
|
42
45
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
46
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
43
47
|
title: import_ds_props_helpers.PropTypes.string.isRequired.description("Text to display in the delimiter"),
|
|
44
48
|
size: import_ds_props_helpers.PropTypes.oneOf(["s", "l"]).description("size of the delimiter").defaultValue("s"),
|
|
45
|
-
verticalMargin: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description(
|
|
46
|
-
"Configurable css vertical margin property for flexibilty"
|
|
47
|
-
)
|
|
49
|
+
verticalMargin: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("Configurable css vertical margin property for flexibilty").defaultValue(0)
|
|
48
50
|
};
|
|
51
|
+
const DSChatMessageDelimeterPropTypesSchema = DSChatMessageDelimeterPropTypes;
|
|
49
52
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } 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 { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from './constants/index.js';\n\nexport declare namespace DSChatMessageDelimeterT {\n export type SlotFunctionArguments = {\n dsChatmessagedelimeterRoot: () => object;\n dsChatmessagedelimeterWrapper: () => object;\n dsChatmessagedelimeterLineStart: () => object;\n dsChatmessagedelimeterLineEnd: () => object;\n dsChatmessagedelimeterTitle: () => object;\n };\n\n export interface DefaultProps {\n size: 's' | 'l';\n verticalMargin: number | string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSChatMessageDelimeterName,\n typeof CHAT_MESSAGE_DELIMETER_SLOTS\n > {}\n\n export interface RequiredProps {\n title: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatMessageDelimeterT.DefaultProps = {\n size: 's',\n verticalMargin: 0,\n};\n\nexport const DSChatMessageDelimeterPropTypes: DSPropTypesSchema<DSChatMessageDelimeterT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.isRequired.description('Text to display in the delimiter'),\n size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),\n verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Configurable css vertical margin property for flexibilty')\n .defaultValue(0),\n};\n\nexport const DSChatMessageDelimeterPropTypesSchema =\n DSChatMessageDelimeterPropTypes as unknown as ValidationMap<DSChatMessageDelimeterT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAAyE;AAyClE,MAAM,eAAqD;AAAA,EAChE,MAAM;AAAA,EACN,gBAAgB;AAClB;AAEO,MAAM,kCAAoF;AAAA,EAC/F,OAAG,kDAAyB,6CAA4B,6CAA4B;AAAA,EACpF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,WAAW,YAAY,kCAAkC;AAAA,EACjF,MAAM,kCAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EACvF,gBAAgB,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EACrE,YAAY,0DAA0D,EACtE,aAAa,CAAC;AACnB;AAEO,MAAM,wCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -28,7 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var styled_exports = {};
|
|
30
30
|
__export(styled_exports, {
|
|
31
|
-
|
|
31
|
+
LineEnd: () => LineEnd,
|
|
32
|
+
LineStart: () => LineStart,
|
|
33
|
+
Root: () => Root,
|
|
32
34
|
Text: () => Text,
|
|
33
35
|
Wrapper: () => Wrapper
|
|
34
36
|
});
|
|
@@ -36,16 +38,36 @@ module.exports = __toCommonJS(styled_exports);
|
|
|
36
38
|
var React = __toESM(require("react"));
|
|
37
39
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
38
40
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
-
|
|
41
|
+
var import_constants = require("./constants/index.js");
|
|
42
|
+
const Root = (0, import_ds_system.styled)("div", {
|
|
43
|
+
name: import_constants.DSChatMessageDelimeterName,
|
|
44
|
+
slot: import_constants.CHAT_MESSAGE_DELIMETER_SLOTS.ROOT
|
|
45
|
+
})``;
|
|
46
|
+
const Wrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
47
|
+
name: import_constants.DSChatMessageDelimeterName,
|
|
48
|
+
slot: import_constants.CHAT_MESSAGE_DELIMETER_SLOTS.WRAPPER
|
|
49
|
+
})`
|
|
40
50
|
align-items: center;
|
|
41
51
|
justify-content: center;
|
|
42
52
|
width: 100%;
|
|
43
53
|
min-height: 8px;
|
|
44
54
|
`;
|
|
45
|
-
const
|
|
55
|
+
const LineStart = (0, import_ds_system.styled)("span", {
|
|
56
|
+
name: import_constants.DSChatMessageDelimeterName,
|
|
57
|
+
slot: import_constants.CHAT_MESSAGE_DELIMETER_SLOTS.LINE_START
|
|
58
|
+
})`
|
|
46
59
|
border-top: 1px solid ${(props) => props.theme.colors.neutral["400"]};
|
|
47
60
|
`;
|
|
48
|
-
const
|
|
61
|
+
const LineEnd = (0, import_ds_system.styled)("span", {
|
|
62
|
+
name: import_constants.DSChatMessageDelimeterName,
|
|
63
|
+
slot: import_constants.CHAT_MESSAGE_DELIMETER_SLOTS.LINE_END
|
|
64
|
+
})`
|
|
65
|
+
border-top: 1px solid ${(props) => props.theme.colors.neutral["400"]};
|
|
66
|
+
`;
|
|
67
|
+
const Text = (0, import_ds_system.styled)("p", {
|
|
68
|
+
name: import_constants.DSChatMessageDelimeterName,
|
|
69
|
+
slot: import_constants.CHAT_MESSAGE_DELIMETER_SLOTS.TITLE
|
|
70
|
+
})`
|
|
49
71
|
color: ${(props) => props.theme.colors.neutral["600"]};
|
|
50
72
|
font-size: ${(props) => props.size === "s" ? "12px" : "14px"};
|
|
51
73
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
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": ["import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\n\nexport const Wrapper = styled(Grid)`\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 8px;\n`;\n\nexport const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAAuB;
|
|
4
|
+
"sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nimport { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from './constants/index.js';\n\nexport const Root = styled('div', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.ROOT,\n})``;\n\nexport const Wrapper = styled(Grid, {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.WRAPPER,\n})`\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 8px;\n`;\n\nexport const LineStart = styled('span', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_START,\n})`\n border-top: 1px solid ${(props) => props.theme.colors.neutral['400']};\n`;\n\nexport const LineEnd = styled('span', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_END,\n})`\n border-top: 1px solid ${(props) => props.theme.colors.neutral['400']};\n`;\n\nexport const Text = styled('p', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.TITLE,\n})<DSChatMessageDelimeterT.DefaultProps>`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => (props.size === 's' ? '12px' : '14px')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n ${({ verticalMargin }) => `margin: ${verticalMargin}px 8px`};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAAuB;AAEvB,uBAAyE;AAElE,MAAM,WAAO,yBAAO,OAAO;AAAA,EAChC,MAAM;AAAA,EACN,MAAM,8CAA6B;AACrC,CAAC;AAEM,MAAM,cAAU,yBAAO,qBAAM;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,8CAA6B;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,gBAAY,yBAAO,QAAQ;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,8CAA6B;AACrC,CAAC;AAAA,0BACyB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAG/D,MAAM,cAAU,yBAAO,QAAQ;AAAA,EACpC,MAAM;AAAA,EACN,MAAM,8CAA6B;AACrC,CAAC;AAAA,0BACyB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAG/D,MAAM,WAAO,yBAAO,KAAK;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM,8CAA6B;AACrC,CAAC;AAAA,WACU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,eACxC,CAAC,UAAW,MAAM,SAAS,MAAM,SAAS,MAAO;AAAA,iBAC/C,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,IACxD,CAAC,EAAE,eAAe,MAAM,WAAW,cAAc,QAAQ;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const SlotPropsAsObj = {
|
|
26
|
+
dsChatmessagedelimeterRoot: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsChatmessagedelimeterWrapper: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsChatmessagedelimeterLineStart: { "aria-hidden": true },
|
|
29
|
+
dsChatmessagedelimeterLineEnd: { "aria-hidden": true },
|
|
30
|
+
dsChatmessagedelimeterTitle: { "aria-label": "just a typescript test" }
|
|
31
|
+
};
|
|
32
|
+
const SlotPropsAsFunctions = {
|
|
33
|
+
dsChatmessagedelimeterRoot: () => ({ "aria-label": "just a typescript test" }),
|
|
34
|
+
dsChatmessagedelimeterWrapper: () => ({ "aria-label": "just a typescript test" }),
|
|
35
|
+
dsChatmessagedelimeterLineStart: () => ({ "aria-hidden": true }),
|
|
36
|
+
dsChatmessagedelimeterLineEnd: () => ({ "aria-hidden": true }),
|
|
37
|
+
dsChatmessagedelimeterTitle: () => ({ "aria-label": "just a typescript test" })
|
|
38
|
+
};
|
|
39
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
40
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from '../constants/index.js';\nimport type { DSChatMessageDelimeterT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSChatMessageDelimeterT.Props> = {\n dsChatmessagedelimeterRoot: { 'aria-label': 'just a typescript test' },\n dsChatmessagedelimeterWrapper: { 'aria-label': 'just a typescript test' },\n dsChatmessagedelimeterLineStart: { 'aria-hidden': true },\n dsChatmessagedelimeterLineEnd: { 'aria-hidden': true },\n dsChatmessagedelimeterTitle: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSChatMessageDelimeterT.SlotFunctionArguments = {\n dsChatmessagedelimeterRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatmessagedelimeterWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsChatmessagedelimeterLineStart: () => ({ 'aria-hidden': true }),\n dsChatmessagedelimeterLineEnd: () => ({ 'aria-hidden': true }),\n dsChatmessagedelimeterTitle: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSChatMessageDelimeterName, typeof CHAT_MESSAGE_DELIMETER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,iBAAyD;AAAA,EAC7D,4BAA4B,EAAE,cAAc,yBAAyB;AAAA,EACrE,+BAA+B,EAAE,cAAc,yBAAyB;AAAA,EACxE,iCAAiC,EAAE,eAAe,KAAK;AAAA,EACvD,+BAA+B,EAAE,eAAe,KAAK;AAAA,EACrD,6BAA6B,EAAE,cAAc,yBAAyB;AACxE;AAEA,MAAM,uBAAsE;AAAA,EAC1E,4BAA4B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC5E,+BAA+B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/E,iCAAiC,OAAO,EAAE,eAAe,KAAK;AAAA,EAC9D,+BAA+B,OAAO,EAAE,eAAe,KAAK;AAAA,EAC5D,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAC/E;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,27 +2,45 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import {
|
|
4
4
|
describe,
|
|
5
|
-
useGetGlobalAttributes,
|
|
6
5
|
useValidateTypescriptPropTypes,
|
|
7
|
-
useMemoMergePropsWithDefault
|
|
6
|
+
useMemoMergePropsWithDefault,
|
|
7
|
+
useOwnerProps
|
|
8
8
|
} from "@elliemae/ds-props-helpers";
|
|
9
|
-
import { Wrapper,
|
|
10
|
-
import { defaultProps,
|
|
11
|
-
import {
|
|
9
|
+
import { Root, Wrapper, LineStart, LineEnd, Text } from "./styled.js";
|
|
10
|
+
import { defaultProps, DSChatMessageDelimeterPropTypes } from "./react-desc-prop-types.js";
|
|
11
|
+
import { CHAT_MESSAGE_DELIMETER_DATA_TESTID, DSChatMessageDelimeterName } from "./constants/index.js";
|
|
12
12
|
const MessageDelimiter = (props) => {
|
|
13
13
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
14
|
-
useValidateTypescriptPropTypes(propsWithDefault,
|
|
15
|
-
const
|
|
14
|
+
useValidateTypescriptPropTypes(propsWithDefault, DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterName);
|
|
15
|
+
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
|
|
16
16
|
const { title, size, verticalMargin } = propsWithDefault;
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
return /* @__PURE__ */ jsx(Root, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsxs(
|
|
18
|
+
Wrapper,
|
|
19
|
+
{
|
|
20
|
+
cols: ["1fr", "auto", "1fr"],
|
|
21
|
+
getOwnerProps,
|
|
22
|
+
getOwnerPropsArguments,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx(LineStart, { getOwnerProps, getOwnerPropsArguments }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
Text,
|
|
27
|
+
{
|
|
28
|
+
size,
|
|
29
|
+
verticalMargin,
|
|
30
|
+
"data-testid": CHAT_MESSAGE_DELIMETER_DATA_TESTID.TITLE,
|
|
31
|
+
getOwnerProps,
|
|
32
|
+
getOwnerPropsArguments,
|
|
33
|
+
children: title
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx(LineEnd, { getOwnerProps, getOwnerPropsArguments })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
) });
|
|
22
40
|
};
|
|
23
|
-
MessageDelimiter.displayName =
|
|
41
|
+
MessageDelimiter.displayName = DSChatMessageDelimeterName;
|
|
24
42
|
const MessageDelimiterWithSchema = describe(MessageDelimiter);
|
|
25
|
-
MessageDelimiterWithSchema.propTypes =
|
|
43
|
+
MessageDelimiterWithSchema.propTypes = DSChatMessageDelimeterPropTypes;
|
|
26
44
|
export {
|
|
27
45
|
MessageDelimiter,
|
|
28
46
|
MessageDelimiterWithSchema
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/MessageDelimiter.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n type ValidationMap,\n} from '@elliemae/ds-props-helpers';\nimport { Root, Wrapper, LineStart, LineEnd, Text } from './styled.js';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nimport { defaultProps, DSChatMessageDelimeterPropTypes } from './react-desc-prop-types.js';\nimport { CHAT_MESSAGE_DELIMETER_DATA_TESTID, DSChatMessageDelimeterName } from './constants/index.js';\n\nconst MessageDelimiter: React.ComponentType<DSChatMessageDelimeterT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatMessageDelimeterT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterName);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatMessageDelimeterT.Props>(propsWithDefault);\n\n const { title, size, verticalMargin } = propsWithDefault;\n return (\n <Root getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <Wrapper\n cols={['1fr', 'auto', '1fr']}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LineStart getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n <Text\n size={size}\n verticalMargin={verticalMargin}\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={CHAT_MESSAGE_DELIMETER_DATA_TESTID.TITLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </Text>\n <LineEnd getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n </Wrapper>\n </Root>\n );\n};\n\nMessageDelimiter.displayName = DSChatMessageDelimeterName;\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = DSChatMessageDelimeterPropTypes as ValidationMap<unknown>;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqBjB,SAKE,KALF;AApBN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,MAAM,SAAS,WAAW,SAAS,YAAY;AAExD,SAAS,cAAc,uCAAuC;AAC9D,SAAS,oCAAoC,kCAAkC;AAE/E,MAAM,mBAAuE,CAAC,UAAU;AACtF,QAAM,mBAAmB,6BAAoE,OAAO,YAAY;AAChH,iCAA+B,kBAAkB,iCAAiC,0BAA0B;AAC5G,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAA6C,gBAAgB;AAE/G,QAAM,EAAE,OAAO,MAAM,eAAe,IAAI;AACxC,SACE,oBAAC,QAAK,eAA8B,wBAClC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,aAAU,eAA8B,wBAAgD;AAAA,QACzF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YAEA,eAAa,mCAAmC;AAAA,YAChD;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACA,oBAAC,WAAQ,eAA8B,wBAAgD;AAAA;AAAA;AAAA,EACzF,GACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSChatMessageDelimeterName = "DSChatmessagedelimeter";
|
|
4
|
+
const CHAT_MESSAGE_DELIMETER_SLOTS = {
|
|
5
|
+
ROOT: "root",
|
|
6
|
+
WRAPPER: "wrapper",
|
|
7
|
+
LINE_START: "line-start",
|
|
8
|
+
LINE_END: "line-end",
|
|
9
|
+
TITLE: "title"
|
|
10
|
+
// legacy ones...
|
|
11
|
+
};
|
|
12
|
+
const CHAT_MESSAGE_DELIMETER_DATA_TESTID = {
|
|
13
|
+
...slotObjectToDataTestIds(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),
|
|
14
|
+
TITLE: "chat-message-delimiter-title"
|
|
15
|
+
// legacy value — breaking change if removed
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
CHAT_MESSAGE_DELIMETER_DATA_TESTID,
|
|
19
|
+
CHAT_MESSAGE_DELIMETER_SLOTS,
|
|
20
|
+
DSChatMessageDelimeterName
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatMessageDelimeterName = 'DSChatmessagedelimeter';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n// legacy data-testid values predate the slot naming convention; preserved at three layers (slot comment here, manual re-declaration in CHAT_MESSAGE_DELIMETER_DATA_TESTID, inline JSX `data-testid` prop on the slot consumer) \u2014 breaking change if removed.\nexport const CHAT_MESSAGE_DELIMETER_SLOTS = {\n ROOT: 'root',\n WRAPPER: 'wrapper',\n LINE_START: 'line-start',\n LINE_END: 'line-end',\n TITLE: 'title', // legacy ones...\n} as const;\n\nexport const CHAT_MESSAGE_DELIMETER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),\n TITLE: 'chat-message-delimiter-title', // legacy value \u2014 breaking change if removed\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,6BAA6B;AAInC,MAAM,+BAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,OAAO;AAAA;AACT;AAEO,MAAM,qCAAqC;AAAA,EAChD,GAAG,wBAAwB,4BAA4B,4BAA4B;AAAA,EACnF,OAAO;AAAA;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { MessageDelimiter, MessageDelimiterWithSchema } from "./MessageDelimiter.js";
|
|
3
|
+
import { DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterPropTypesSchema } from "./react-desc-prop-types.js";
|
|
4
|
+
import {
|
|
5
|
+
DSChatMessageDelimeterName,
|
|
6
|
+
CHAT_MESSAGE_DELIMETER_SLOTS,
|
|
7
|
+
CHAT_MESSAGE_DELIMETER_DATA_TESTID
|
|
8
|
+
} from "./constants/index.js";
|
|
3
9
|
export {
|
|
10
|
+
CHAT_MESSAGE_DELIMETER_DATA_TESTID,
|
|
11
|
+
CHAT_MESSAGE_DELIMETER_SLOTS,
|
|
12
|
+
DSChatMessageDelimeterName,
|
|
13
|
+
DSChatMessageDelimeterPropTypes,
|
|
14
|
+
DSChatMessageDelimeterPropTypesSchema,
|
|
4
15
|
MessageDelimiter,
|
|
5
16
|
MessageDelimiterWithSchema
|
|
6
17
|
};
|
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", "import type {} from '@elliemae/ds-props-helpers';\nexport { MessageDelimiter, MessageDelimiterWithSchema } from './MessageDelimiter.js';\nexport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-props-helpers';\n\nexport { MessageDelimiter, MessageDelimiterWithSchema } from './MessageDelimiter.js';\nexport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nexport { DSChatMessageDelimeterPropTypes, DSChatMessageDelimeterPropTypesSchema } from './react-desc-prop-types.js';\nexport {\n DSChatMessageDelimeterName,\n CHAT_MESSAGE_DELIMETER_SLOTS,\n CHAT_MESSAGE_DELIMETER_DATA_TESTID,\n} from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,kBAAkB,kCAAkC;AAE7D,SAAS,iCAAiC,6CAA6C;AACvF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PropTypes,
|
|
4
|
+
getPropsPerSlotPropTypes,
|
|
5
|
+
globalAttributesPropTypes,
|
|
6
|
+
xstyledPropTypes
|
|
7
|
+
} from "@elliemae/ds-props-helpers";
|
|
8
|
+
import { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from "./constants/index.js";
|
|
3
9
|
const defaultProps = {
|
|
4
10
|
size: "s",
|
|
5
11
|
verticalMargin: 0
|
|
6
12
|
};
|
|
7
|
-
const
|
|
13
|
+
const DSChatMessageDelimeterPropTypes = {
|
|
14
|
+
...getPropsPerSlotPropTypes(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),
|
|
8
15
|
...globalAttributesPropTypes,
|
|
16
|
+
...xstyledPropTypes,
|
|
9
17
|
title: PropTypes.string.isRequired.description("Text to display in the delimiter"),
|
|
10
18
|
size: PropTypes.oneOf(["s", "l"]).description("size of the delimiter").defaultValue("s"),
|
|
11
|
-
verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(
|
|
12
|
-
"Configurable css vertical margin property for flexibilty"
|
|
13
|
-
)
|
|
19
|
+
verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Configurable css vertical margin property for flexibilty").defaultValue(0)
|
|
14
20
|
};
|
|
21
|
+
const DSChatMessageDelimeterPropTypesSchema = DSChatMessageDelimeterPropTypes;
|
|
15
22
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
DSChatMessageDelimeterPropTypes,
|
|
24
|
+
DSChatMessageDelimeterPropTypesSchema,
|
|
25
|
+
defaultProps
|
|
18
26
|
};
|
|
19
27
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -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", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } 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 { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from './constants/index.js';\n\nexport declare namespace DSChatMessageDelimeterT {\n export type SlotFunctionArguments = {\n dsChatmessagedelimeterRoot: () => object;\n dsChatmessagedelimeterWrapper: () => object;\n dsChatmessagedelimeterLineStart: () => object;\n dsChatmessagedelimeterLineEnd: () => object;\n dsChatmessagedelimeterTitle: () => object;\n };\n\n export interface DefaultProps {\n size: 's' | 'l';\n verticalMargin: number | string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSChatMessageDelimeterName,\n typeof CHAT_MESSAGE_DELIMETER_SLOTS\n > {}\n\n export interface RequiredProps {\n title: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSChatMessageDelimeterT.DefaultProps = {\n size: 's',\n verticalMargin: 0,\n};\n\nexport const DSChatMessageDelimeterPropTypes: DSPropTypesSchema<DSChatMessageDelimeterT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatMessageDelimeterName, CHAT_MESSAGE_DELIMETER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n title: PropTypes.string.isRequired.description('Text to display in the delimiter'),\n size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),\n verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Configurable css vertical margin property for flexibilty')\n .defaultValue(0),\n};\n\nexport const DSChatMessageDelimeterPropTypesSchema =\n DSChatMessageDelimeterPropTypes as unknown as ValidationMap<DSChatMessageDelimeterT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,8BAA8B,kCAAkC;AAyClE,MAAM,eAAqD;AAAA,EAChE,MAAM;AAAA,EACN,gBAAgB;AAClB;AAEO,MAAM,kCAAoF;AAAA,EAC/F,GAAG,yBAAyB,4BAA4B,4BAA4B;AAAA,EACpF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,WAAW,YAAY,kCAAkC;AAAA,EACjF,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EACvF,gBAAgB,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EACrE,YAAY,0DAA0D,EACtE,aAAa,CAAC;AACnB;AAEO,MAAM,wCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,23 +1,45 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Grid } from "@elliemae/ds-grid";
|
|
3
3
|
import { styled } from "@elliemae/ds-system";
|
|
4
|
-
|
|
4
|
+
import { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from "./constants/index.js";
|
|
5
|
+
const Root = styled("div", {
|
|
6
|
+
name: DSChatMessageDelimeterName,
|
|
7
|
+
slot: CHAT_MESSAGE_DELIMETER_SLOTS.ROOT
|
|
8
|
+
})``;
|
|
9
|
+
const Wrapper = styled(Grid, {
|
|
10
|
+
name: DSChatMessageDelimeterName,
|
|
11
|
+
slot: CHAT_MESSAGE_DELIMETER_SLOTS.WRAPPER
|
|
12
|
+
})`
|
|
5
13
|
align-items: center;
|
|
6
14
|
justify-content: center;
|
|
7
15
|
width: 100%;
|
|
8
16
|
min-height: 8px;
|
|
9
17
|
`;
|
|
10
|
-
const
|
|
18
|
+
const LineStart = styled("span", {
|
|
19
|
+
name: DSChatMessageDelimeterName,
|
|
20
|
+
slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_START
|
|
21
|
+
})`
|
|
11
22
|
border-top: 1px solid ${(props) => props.theme.colors.neutral["400"]};
|
|
12
23
|
`;
|
|
13
|
-
const
|
|
24
|
+
const LineEnd = styled("span", {
|
|
25
|
+
name: DSChatMessageDelimeterName,
|
|
26
|
+
slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_END
|
|
27
|
+
})`
|
|
28
|
+
border-top: 1px solid ${(props) => props.theme.colors.neutral["400"]};
|
|
29
|
+
`;
|
|
30
|
+
const Text = styled("p", {
|
|
31
|
+
name: DSChatMessageDelimeterName,
|
|
32
|
+
slot: CHAT_MESSAGE_DELIMETER_SLOTS.TITLE
|
|
33
|
+
})`
|
|
14
34
|
color: ${(props) => props.theme.colors.neutral["600"]};
|
|
15
35
|
font-size: ${(props) => props.size === "s" ? "12px" : "14px"};
|
|
16
36
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
17
37
|
${({ verticalMargin }) => `margin: ${verticalMargin}px 8px`};
|
|
18
38
|
`;
|
|
19
39
|
export {
|
|
20
|
-
|
|
40
|
+
LineEnd,
|
|
41
|
+
LineStart,
|
|
42
|
+
Root,
|
|
21
43
|
Text,
|
|
22
44
|
Wrapper
|
|
23
45
|
};
|
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", "import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\n\nexport const Wrapper = styled(Grid)`\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 8px;\n`;\n\nexport const
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AACrB,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\nimport type { DSChatMessageDelimeterT } from './react-desc-prop-types.js';\nimport { CHAT_MESSAGE_DELIMETER_SLOTS, DSChatMessageDelimeterName } from './constants/index.js';\n\nexport const Root = styled('div', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.ROOT,\n})``;\n\nexport const Wrapper = styled(Grid, {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.WRAPPER,\n})`\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 8px;\n`;\n\nexport const LineStart = styled('span', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_START,\n})`\n border-top: 1px solid ${(props) => props.theme.colors.neutral['400']};\n`;\n\nexport const LineEnd = styled('span', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.LINE_END,\n})`\n border-top: 1px solid ${(props) => props.theme.colors.neutral['400']};\n`;\n\nexport const Text = styled('p', {\n name: DSChatMessageDelimeterName,\n slot: CHAT_MESSAGE_DELIMETER_SLOTS.TITLE,\n})<DSChatMessageDelimeterT.DefaultProps>`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => (props.size === 's' ? '12px' : '14px')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n ${({ verticalMargin }) => `margin: ${verticalMargin}px 8px`};\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AACrB,SAAS,cAAc;AAEvB,SAAS,8BAA8B,kCAAkC;AAElE,MAAM,OAAO,OAAO,OAAO;AAAA,EAChC,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAEM,MAAM,UAAU,OAAO,MAAM;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,YAAY,OAAO,QAAQ;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAAA,0BACyB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAG/D,MAAM,UAAU,OAAO,QAAQ;AAAA,EACpC,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAAA,0BACyB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAG/D,MAAM,OAAO,OAAO,KAAK;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM,6BAA6B;AACrC,CAAC;AAAA,WACU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,eACxC,CAAC,UAAW,MAAM,SAAS,MAAM,SAAS,MAAO;AAAA,iBAC/C,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,IACxD,CAAC,EAAE,eAAe,MAAM,WAAW,cAAc,QAAQ;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|