@ni/spright-components 5.1.1 → 5.2.0
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/all-components-bundle.js +80 -18
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3721 -3674
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/chat/conversation/styles.js +2 -2
- package/dist/esm/chat/conversation/styles.js.map +1 -1
- package/dist/esm/chat/message/index.d.ts +11 -1
- package/dist/esm/chat/message/index.js +14 -2
- package/dist/esm/chat/message/index.js.map +1 -1
- package/dist/esm/chat/message/styles.js +48 -10
- package/dist/esm/chat/message/styles.js.map +1 -1
- package/dist/esm/chat/message/template.d.ts +4 -2
- package/dist/esm/chat/message/template.js +17 -2
- package/dist/esm/chat/message/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@ni/fast-element';
|
|
2
|
-
import { applicationBackgroundColor, mediumPadding
|
|
2
|
+
import { applicationBackgroundColor, mediumPadding } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
|
|
3
3
|
import { display } from '../../utilities/style/display';
|
|
4
4
|
export const styles = css `
|
|
5
5
|
${display('flex')}
|
|
@@ -7,7 +7,7 @@ export const styles = css `
|
|
|
7
7
|
:host {
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
justify-content: flex-start;
|
|
10
|
-
row-gap:
|
|
10
|
+
row-gap: 32px;
|
|
11
11
|
padding: ${mediumPadding};
|
|
12
12
|
background: ${applicationBackgroundColor};
|
|
13
13
|
overflow-y: auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/chat/conversation/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EACH,0BAA0B,EAC1B,aAAa,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/chat/conversation/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EACH,0BAA0B,EAC1B,aAAa,EAChB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;;;;mBAMF,aAAa;sBACV,0BAA0B;;;CAG/C,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport {\n applicationBackgroundColor,\n mediumPadding\n} from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';\nimport { display } from '../../utilities/style/display';\n\nexport const styles = css`\n ${display('flex')}\n\n :host {\n flex-direction: column;\n justify-content: flex-start;\n row-gap: 32px;\n padding: ${mediumPadding};\n background: ${applicationBackgroundColor};\n overflow-y: auto;\n }\n`;\n"]}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { FoundationElement } from '@ni/fast-foundation';
|
|
1
|
+
import { FoundationElement, type FoundationElementDefinition, type StartEndOptions } from '@ni/fast-foundation';
|
|
2
2
|
import { ChatMessageType } from './types';
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLElementTagNameMap {
|
|
5
5
|
'spright-chat-message': ChatMessage;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* SprightChatMessage configuration options
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type ChatMessageOptions = FoundationElementDefinition & StartEndOptions;
|
|
8
13
|
/**
|
|
9
14
|
* A Spright component for displaying a chat message
|
|
10
15
|
*/
|
|
@@ -16,5 +21,10 @@ export declare class ChatMessage extends FoundationElement {
|
|
|
16
21
|
* HTML Attribute: message-type
|
|
17
22
|
*/
|
|
18
23
|
readonly messageType: ChatMessageType;
|
|
24
|
+
/** @internal */
|
|
25
|
+
footerActionsIsEmpty: boolean;
|
|
26
|
+
/** @internal */
|
|
27
|
+
readonly slottedFooterActionsElements?: HTMLElement[];
|
|
28
|
+
slottedFooterActionsElementsChanged(_prev: HTMLElement[] | undefined, next: HTMLElement[] | undefined): void;
|
|
19
29
|
}
|
|
20
30
|
export declare const chatMessageTag = "spright-chat-message";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr } from '@ni/fast-element';
|
|
3
|
-
import { DesignSystem, FoundationElement } from '@ni/fast-foundation';
|
|
2
|
+
import { attr, observable } from '@ni/fast-element';
|
|
3
|
+
import { applyMixins, DesignSystem, FoundationElement, StartEnd } from '@ni/fast-foundation';
|
|
4
4
|
import { styles } from './styles';
|
|
5
5
|
import { template } from './template';
|
|
6
6
|
import { ChatMessageType } from './types';
|
|
@@ -17,11 +17,23 @@ export class ChatMessage extends FoundationElement {
|
|
|
17
17
|
* HTML Attribute: message-type
|
|
18
18
|
*/
|
|
19
19
|
this.messageType = ChatMessageType.system;
|
|
20
|
+
/** @internal */
|
|
21
|
+
this.footerActionsIsEmpty = true;
|
|
22
|
+
}
|
|
23
|
+
slottedFooterActionsElementsChanged(_prev, next) {
|
|
24
|
+
this.footerActionsIsEmpty = !next?.length;
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
__decorate([
|
|
23
28
|
attr({ attribute: 'message-type' })
|
|
24
29
|
], ChatMessage.prototype, "messageType", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
observable
|
|
32
|
+
], ChatMessage.prototype, "footerActionsIsEmpty", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
observable
|
|
35
|
+
], ChatMessage.prototype, "slottedFooterActionsElements", void 0);
|
|
36
|
+
applyMixins(ChatMessage, StartEnd);
|
|
25
37
|
const sprightChatMessage = ChatMessage.compose({
|
|
26
38
|
baseName: 'chat-message',
|
|
27
39
|
template,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chat/message/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/chat/message/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACH,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EAGX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAc1C;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAAlD;;QACI;;;;;WAKG;QAEa,gBAAW,GAAoB,eAAe,CAAC,MAAM,CAAC;QAEtE,gBAAgB;QAET,yBAAoB,GAAG,IAAI,CAAC;IAYvC,CAAC;IANU,mCAAmC,CACtC,KAAgC,EAChC,IAA+B;QAE/B,IAAI,CAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;IAC9C,CAAC;CACJ;AAhBmB;IADf,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;gDACkC;AAI/D;IADN,UAAU;yDACwB;AAInB;IADf,UAAU;iEACkD;AASjE,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEnC,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAC;IAC3C,QAAQ,EAAE,cAAc;IACxB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC","sourcesContent":["import { attr, observable } from '@ni/fast-element';\nimport {\n applyMixins,\n DesignSystem,\n FoundationElement,\n StartEnd,\n type FoundationElementDefinition,\n type StartEndOptions\n} from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\nimport { ChatMessageType } from './types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'spright-chat-message': ChatMessage;\n }\n}\n\n/**\n * SprightChatMessage configuration options\n * @public\n */\nexport type ChatMessageOptions = FoundationElementDefinition & StartEndOptions;\n\n/**\n * A Spright component for displaying a chat message\n */\nexport class ChatMessage extends FoundationElement {\n /**\n * @public\n * The message type of this message in the chat conversation\n * @remarks\n * HTML Attribute: message-type\n */\n @attr({ attribute: 'message-type' })\n public readonly messageType: ChatMessageType = ChatMessageType.system;\n\n /** @internal */\n @observable\n public footerActionsIsEmpty = true;\n\n /** @internal */\n @observable\n public readonly slottedFooterActionsElements?: HTMLElement[];\n\n public slottedFooterActionsElementsChanged(\n _prev: HTMLElement[] | undefined,\n next: HTMLElement[] | undefined\n ): void {\n this.footerActionsIsEmpty = !next?.length;\n }\n}\napplyMixins(ChatMessage, StartEnd);\n\nconst sprightChatMessage = ChatMessage.compose({\n baseName: 'chat-message',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessage());\nexport const chatMessageTag = 'spright-chat-message';\n"]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { css } from '@ni/fast-element';
|
|
2
|
-
import {
|
|
2
|
+
import { anchorButtonTag } from '@ni/nimble-components/dist/esm/anchor-button';
|
|
3
|
+
import { buttonTag } from '@ni/nimble-components/dist/esm/button';
|
|
4
|
+
import { menuButtonTag } from '@ni/nimble-components/dist/esm/menu-button';
|
|
5
|
+
import { toggleButtonTag } from '@ni/nimble-components/dist/esm/toggle-button';
|
|
6
|
+
import { bodyFont, bodyFontColor, borderHoverColor, borderWidth, controlSlimHeight, fillSelectedColor, largePadding, mediumPadding, standardPadding } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
|
|
3
7
|
import { display } from '../../utilities/style/display';
|
|
8
|
+
import { ChatMessageType } from './types';
|
|
4
9
|
export const styles = css `
|
|
5
10
|
${display('flex')}
|
|
6
11
|
|
|
@@ -15,30 +20,63 @@ export const styles = css `
|
|
|
15
20
|
color: ${bodyFontColor};
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
:host([message-type='outbound']) {
|
|
23
|
+
:host([message-type='${ChatMessageType.outbound}']) {
|
|
19
24
|
justify-content: flex-end;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
:host([message-type='inbound']) {
|
|
27
|
+
:host([message-type='${ChatMessageType.inbound}']) {
|
|
23
28
|
justify-content: flex-start;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
.container {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
max-width: calc(90%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[part='start'] {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.message-content {
|
|
28
42
|
width: fit-content;
|
|
29
43
|
height: fit-content;
|
|
30
|
-
padding: ${mediumPadding};
|
|
31
44
|
overflow-x: auto;
|
|
32
45
|
}
|
|
33
46
|
|
|
34
|
-
:host([message-type='outbound'])
|
|
47
|
+
:host([message-type='${ChatMessageType.outbound}']) .message-content {
|
|
35
48
|
background: ${fillSelectedColor};
|
|
36
49
|
border: ${borderWidth} solid ${borderHoverColor};
|
|
37
|
-
border-radius:
|
|
50
|
+
border-radius: ${mediumPadding} ${mediumPadding} 0px ${mediumPadding};
|
|
51
|
+
padding: ${mediumPadding};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.footer-actions {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([message-type='${ChatMessageType.inbound}'])
|
|
59
|
+
.footer-actions.has-content {
|
|
60
|
+
display: flex;
|
|
61
|
+
column-gap: ${standardPadding};
|
|
62
|
+
margin-top: ${mediumPadding};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.footer-actions ::slotted(${buttonTag}),
|
|
66
|
+
.footer-actions ::slotted(${toggleButtonTag}),
|
|
67
|
+
.footer-actions ::slotted(${anchorButtonTag}),
|
|
68
|
+
.footer-actions ::slotted(${menuButtonTag}) {
|
|
69
|
+
height: ${controlSlimHeight};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.end {
|
|
73
|
+
display: none;
|
|
38
74
|
}
|
|
39
75
|
|
|
40
|
-
:host([message-type='inbound'])
|
|
41
|
-
|
|
76
|
+
:host([message-type='${ChatMessageType.inbound}']) .end {
|
|
77
|
+
display: flex;
|
|
78
|
+
column-gap: ${standardPadding};
|
|
79
|
+
margin-top: ${largePadding};
|
|
42
80
|
}
|
|
43
81
|
`;
|
|
44
82
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/chat/message/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EACH,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,aAAa,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/chat/message/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAE/E,OAAO,EACH,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,eAAe,EAClB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;;;;;;;gBASL,QAAQ;iBACP,aAAa;;;2BAGH,eAAe,CAAC,QAAQ;;;;2BAIxB,eAAe,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;2BAoBvB,eAAe,CAAC,QAAQ;sBAC7B,iBAAiB;kBACrB,WAAW,UAAU,gBAAgB;yBAC9B,aAAa,IAAI,aAAa,QAAQ,aAAa;mBACzD,aAAa;;;;;;;2BAOL,eAAe,CAAC,OAAO;;;sBAG5B,eAAe;sBACf,aAAa;;;gCAGH,SAAS;gCACT,eAAe;gCACf,eAAe;gCACf,aAAa;kBAC3B,iBAAiB;;;;;;;2BAOR,eAAe,CAAC,OAAO;;sBAE5B,eAAe;sBACf,YAAY;;CAEjC,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\nimport { anchorButtonTag } from '@ni/nimble-components/dist/esm/anchor-button';\nimport { buttonTag } from '@ni/nimble-components/dist/esm/button';\nimport { menuButtonTag } from '@ni/nimble-components/dist/esm/menu-button';\nimport { toggleButtonTag } from '@ni/nimble-components/dist/esm/toggle-button';\n\nimport {\n bodyFont,\n bodyFontColor,\n borderHoverColor,\n borderWidth,\n controlSlimHeight,\n fillSelectedColor,\n largePadding,\n mediumPadding,\n standardPadding\n} from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';\nimport { display } from '../../utilities/style/display';\nimport { ChatMessageType } from './types';\n\nexport const styles = css`\n ${display('flex')}\n\n :host {\n min-width: 16px;\n min-height: 16px;\n\n flex-direction: row;\n justify-content: center;\n flex-shrink: 0;\n font: ${bodyFont};\n color: ${bodyFontColor};\n }\n\n :host([message-type='${ChatMessageType.outbound}']) {\n justify-content: flex-end;\n }\n\n :host([message-type='${ChatMessageType.inbound}']) {\n justify-content: flex-start;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n max-width: calc(90%);\n }\n\n [part='start'] {\n display: none;\n }\n\n .message-content {\n width: fit-content;\n height: fit-content;\n overflow-x: auto;\n }\n\n :host([message-type='${ChatMessageType.outbound}']) .message-content {\n background: ${fillSelectedColor};\n border: ${borderWidth} solid ${borderHoverColor};\n border-radius: ${mediumPadding} ${mediumPadding} 0px ${mediumPadding};\n padding: ${mediumPadding};\n }\n\n .footer-actions {\n display: none;\n }\n\n :host([message-type='${ChatMessageType.inbound}'])\n .footer-actions.has-content {\n display: flex;\n column-gap: ${standardPadding};\n margin-top: ${mediumPadding};\n }\n\n .footer-actions ::slotted(${buttonTag}),\n .footer-actions ::slotted(${toggleButtonTag}),\n .footer-actions ::slotted(${anchorButtonTag}),\n .footer-actions ::slotted(${menuButtonTag}) {\n height: ${controlSlimHeight};\n }\n\n .end {\n display: none;\n }\n\n :host([message-type='${ChatMessageType.inbound}']) .end {\n display: flex;\n column-gap: ${standardPadding};\n margin-top: ${largePadding};\n }\n`;\n"]}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ViewTemplate } from '@ni/fast-element';
|
|
2
|
+
import { type FoundationElementTemplate } from '@ni/fast-foundation';
|
|
3
|
+
import type { ChatMessage, ChatMessageOptions } from '.';
|
|
4
|
+
export declare const template: FoundationElementTemplate<ViewTemplate<ChatMessage>, ChatMessageOptions>;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { html } from '@ni/fast-element';
|
|
1
|
+
import { html, slotted, ViewTemplate } from '@ni/fast-element';
|
|
2
|
+
import { startSlotTemplate, endSlotTemplate } from '@ni/fast-foundation';
|
|
2
3
|
/* eslint-disable @typescript-eslint/indent */
|
|
3
4
|
// prettier-ignore
|
|
4
|
-
export const template = html
|
|
5
|
+
export const template = (context, definition) => html `
|
|
6
|
+
<div class="container">
|
|
7
|
+
${startSlotTemplate(context, definition)}
|
|
8
|
+
<section class="message-content">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</section>
|
|
11
|
+
<section class="footer-actions ${x => (x.footerActionsIsEmpty ? '' : 'has-content')}">
|
|
12
|
+
<slot
|
|
13
|
+
name="footer-actions"
|
|
14
|
+
${slotted({ property: 'slottedFooterActionsElements' })}
|
|
15
|
+
></slot>
|
|
16
|
+
</section>
|
|
17
|
+
${endSlotTemplate(context, definition)}
|
|
18
|
+
</div>
|
|
19
|
+
`;
|
|
5
20
|
/* eslint-enable @typescript-eslint/indent */
|
|
6
21
|
//# sourceMappingURL=template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/chat/message/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/chat/message/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACH,iBAAiB,EACjB,eAAe,EAElB,MAAM,qBAAqB,CAAC;AAG7B,8CAA8C;AAC9C,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAGjB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,CAAa;;UAEpC,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC;;;;yCAIP,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;;;kBAGzE,OAAO,CAAC,EAAE,QAAQ,EAAE,8BAA8B,EAAE,CAAC;;;UAG7D,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC;;CAE7C,CAAC;AACF,6CAA6C","sourcesContent":["import { html, slotted, ViewTemplate } from '@ni/fast-element';\nimport {\n startSlotTemplate,\n endSlotTemplate,\n type FoundationElementTemplate\n} from '@ni/fast-foundation';\nimport type { ChatMessage, ChatMessageOptions } from '.';\n\n/* eslint-disable @typescript-eslint/indent */\n// prettier-ignore\nexport const template: FoundationElementTemplate<\nViewTemplate<ChatMessage>,\nChatMessageOptions\n> = (context, definition) => html<ChatMessage>`\n <div class=\"container\">\n ${startSlotTemplate(context, definition)}\n <section class=\"message-content\">\n <slot></slot>\n </section>\n <section class=\"footer-actions ${x => (x.footerActionsIsEmpty ? '' : 'has-content')}\">\n <slot \n name=\"footer-actions\"\n ${slotted({ property: 'slottedFooterActionsElements' })}\n ></slot>\n </section>\n ${endSlotTemplate(context, definition)}\n </div>\n`;\n/* eslint-enable @typescript-eslint/indent */\n"]}
|