@ni/spright-components 6.5.0 → 6.6.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.
Files changed (43) hide show
  1. package/dist/all-components-bundle.js +587 -330
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1831 -1670
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +3 -0
  6. package/dist/esm/all-components.js +3 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/chat/message/inbound/index.d.ts +22 -0
  9. package/dist/esm/chat/message/inbound/index.js +33 -0
  10. package/dist/esm/chat/message/inbound/index.js.map +1 -0
  11. package/dist/esm/chat/message/inbound/styles.d.ts +1 -0
  12. package/dist/esm/chat/message/inbound/styles.js +65 -0
  13. package/dist/esm/chat/message/inbound/styles.js.map +1 -0
  14. package/dist/esm/chat/message/inbound/template.d.ts +4 -0
  15. package/dist/esm/chat/message/inbound/template.js +18 -0
  16. package/dist/esm/chat/message/inbound/template.js.map +1 -0
  17. package/dist/esm/chat/message/index.d.ts +1 -0
  18. package/dist/esm/chat/message/index.js +1 -0
  19. package/dist/esm/chat/message/index.js.map +1 -1
  20. package/dist/esm/chat/message/outbound/index.d.ts +12 -0
  21. package/dist/esm/chat/message/outbound/index.js +16 -0
  22. package/dist/esm/chat/message/outbound/index.js.map +1 -0
  23. package/dist/esm/chat/message/outbound/styles.d.ts +1 -0
  24. package/dist/esm/chat/message/outbound/styles.js +37 -0
  25. package/dist/esm/chat/message/outbound/styles.js.map +1 -0
  26. package/dist/esm/chat/message/outbound/template.d.ts +4 -0
  27. package/dist/esm/chat/message/outbound/template.js +9 -0
  28. package/dist/esm/chat/message/outbound/template.js.map +1 -0
  29. package/dist/esm/chat/message/styles.js +2 -2
  30. package/dist/esm/chat/message/styles.js.map +1 -1
  31. package/dist/esm/chat/message/system/index.d.ts +12 -0
  32. package/dist/esm/chat/message/system/index.js +16 -0
  33. package/dist/esm/chat/message/system/index.js.map +1 -0
  34. package/dist/esm/chat/message/system/styles.d.ts +1 -0
  35. package/dist/esm/chat/message/system/styles.js +30 -0
  36. package/dist/esm/chat/message/system/styles.js.map +1 -0
  37. package/dist/esm/chat/message/system/template.d.ts +4 -0
  38. package/dist/esm/chat/message/system/template.js +9 -0
  39. package/dist/esm/chat/message/system/template.js.map +1 -0
  40. package/dist/esm/chat/message/types.d.ts +1 -0
  41. package/dist/esm/chat/message/types.js +1 -0
  42. package/dist/esm/chat/message/types.js.map +1 -1
  43. package/package.json +2 -2
@@ -7,4 +7,7 @@ import '@ni/nimble-components/dist/esm/all-components';
7
7
  import './chat/conversation';
8
8
  import './chat/input';
9
9
  import './chat/message';
10
+ import './chat/message/inbound';
11
+ import './chat/message/outbound';
12
+ import './chat/message/system';
10
13
  import './rectangle';
@@ -7,5 +7,8 @@ import '@ni/nimble-components/dist/esm/all-components';
7
7
  import './chat/conversation';
8
8
  import './chat/input';
9
9
  import './chat/message';
10
+ import './chat/message/inbound';
11
+ import './chat/message/outbound';
12
+ import './chat/message/system';
10
13
  import './rectangle';
11
14
  //# sourceMappingURL=all-components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,+CAA+C,CAAC;AAEvD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC","sourcesContent":["/**\n * Import of all the web components available in Spright AND Nimble.\n * Production applications are encouraged to import only components\n * that are required instead of leveraging this file.\n */\n\nimport '@ni/nimble-components/dist/esm/all-components';\n\nimport './chat/conversation';\nimport './chat/input';\nimport './chat/message';\nimport './rectangle';\n"]}
1
+ {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,+CAA+C,CAAC;AAEvD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,OAAO,wBAAwB,CAAC;AAChC,OAAO,yBAAyB,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,aAAa,CAAC","sourcesContent":["/**\n * Import of all the web components available in Spright AND Nimble.\n * Production applications are encouraged to import only components\n * that are required instead of leveraging this file.\n */\n\nimport '@ni/nimble-components/dist/esm/all-components';\n\nimport './chat/conversation';\nimport './chat/input';\nimport './chat/message';\nimport './chat/message/inbound';\nimport './chat/message/outbound';\nimport './chat/message/system';\nimport './rectangle';\n"]}
@@ -0,0 +1,22 @@
1
+ import { FoundationElement, type FoundationElementDefinition, type StartEndOptions } from '@ni/fast-foundation';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'spright-chat-message-inbound': ChatMessageInbound;
5
+ }
6
+ }
7
+ /**
8
+ * SprightChatMessageInbound configuration options
9
+ * @public
10
+ */
11
+ export type ChatMessageInboundOptions = FoundationElementDefinition & StartEndOptions;
12
+ /**
13
+ * A Spright component for displaying a chat message
14
+ */
15
+ export declare class ChatMessageInbound extends FoundationElement {
16
+ /** @internal */
17
+ footerActionsIsEmpty: boolean;
18
+ /** @internal */
19
+ readonly slottedFooterActionsElements?: HTMLElement[];
20
+ slottedFooterActionsElementsChanged(_prev: HTMLElement[] | undefined, next: HTMLElement[] | undefined): void;
21
+ }
22
+ export declare const chatMessageInboundTag = "spright-chat-message-inbound";
@@ -0,0 +1,33 @@
1
+ import { __decorate } from "tslib";
2
+ import { observable } from '@ni/fast-element';
3
+ import { applyMixins, DesignSystem, FoundationElement, StartEnd } from '@ni/fast-foundation';
4
+ import { styles } from './styles';
5
+ import { template } from './template';
6
+ /**
7
+ * A Spright component for displaying a chat message
8
+ */
9
+ export class ChatMessageInbound extends FoundationElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ /** @internal */
13
+ this.footerActionsIsEmpty = true;
14
+ }
15
+ slottedFooterActionsElementsChanged(_prev, next) {
16
+ this.footerActionsIsEmpty = !next?.length;
17
+ }
18
+ }
19
+ __decorate([
20
+ observable
21
+ ], ChatMessageInbound.prototype, "footerActionsIsEmpty", void 0);
22
+ __decorate([
23
+ observable
24
+ ], ChatMessageInbound.prototype, "slottedFooterActionsElements", void 0);
25
+ applyMixins(ChatMessageInbound, StartEnd);
26
+ const sprightChatMessageInbound = ChatMessageInbound.compose({
27
+ baseName: 'chat-message-inbound',
28
+ template,
29
+ styles
30
+ });
31
+ DesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageInbound());
32
+ export const chatMessageInboundTag = 'spright-chat-message-inbound';
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/chat/message/inbound/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,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;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAAzD;;QACI,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;AAZU;IADN,UAAU;gEACwB;AAInB;IADf,UAAU;wEACkD;AASjE,WAAW,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAE1C,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,OAAO,CAAC;IACzD,QAAQ,EAAE,sBAAsB;IAChC,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAC;AACvF,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC","sourcesContent":["import { 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';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'spright-chat-message-inbound': ChatMessageInbound;\n }\n}\n\n/**\n * SprightChatMessageInbound configuration options\n * @public\n */\nexport type ChatMessageInboundOptions = FoundationElementDefinition & StartEndOptions;\n\n/**\n * A Spright component for displaying a chat message\n */\nexport class ChatMessageInbound extends FoundationElement {\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(ChatMessageInbound, StartEnd);\n\nconst sprightChatMessageInbound = ChatMessageInbound.compose({\n baseName: 'chat-message-inbound',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageInbound());\nexport const chatMessageInboundTag = 'spright-chat-message-inbound';\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("@ni/fast-element").ElementStyles;
@@ -0,0 +1,65 @@
1
+ import { css } from '@ni/fast-element';
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, controlSlimHeight, largePadding, mediumPadding, standardPadding } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
7
+ import { display } from '../../../utilities/style/display';
8
+ export const styles = css `
9
+ ${display('flex')}
10
+
11
+ :host {
12
+ min-width: ${standardPadding};
13
+ min-height: ${standardPadding};
14
+
15
+ flex-direction: row;
16
+ justify-content: flex-start;
17
+ flex-shrink: 0;
18
+ font: ${bodyFont};
19
+ color: ${bodyFontColor};
20
+ }
21
+
22
+ .container {
23
+ display: flex;
24
+ flex-direction: column;
25
+ max-width: calc(90%);
26
+ }
27
+
28
+ [part='start'] {
29
+ display: none;
30
+ }
31
+
32
+ .message-content {
33
+ width: fit-content;
34
+ height: fit-content;
35
+ overflow-x: auto;
36
+ }
37
+
38
+ .footer-actions {
39
+ display: none;
40
+ }
41
+
42
+ :host .footer-actions.has-content {
43
+ display: flex;
44
+ column-gap: ${standardPadding};
45
+ margin-top: ${mediumPadding};
46
+ }
47
+
48
+ .footer-actions ::slotted(${buttonTag}),
49
+ .footer-actions ::slotted(${toggleButtonTag}),
50
+ .footer-actions ::slotted(${anchorButtonTag}),
51
+ .footer-actions ::slotted(${menuButtonTag}) {
52
+ height: ${controlSlimHeight};
53
+ }
54
+
55
+ .end {
56
+ display: none;
57
+ }
58
+
59
+ :host .end {
60
+ display: flex;
61
+ column-gap: ${standardPadding};
62
+ margin-top: ${largePadding};
63
+ }
64
+ `;
65
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/chat/message/inbound/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,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,eAAe,EAClB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;qBAGA,eAAe;sBACd,eAAe;;;;;gBAKrB,QAAQ;iBACP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;sBAyBR,eAAe;sBACf,aAAa;;;gCAGH,SAAS;gCACT,eAAe;gCACf,eAAe;gCACf,aAAa;kBAC3B,iBAAiB;;;;;;;;;sBASb,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 controlSlimHeight,\n largePadding,\n mediumPadding,\n standardPadding\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 min-width: ${standardPadding};\n min-height: ${standardPadding};\n\n flex-direction: row;\n justify-content: flex-start;\n flex-shrink: 0;\n font: ${bodyFont};\n color: ${bodyFontColor};\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 .footer-actions {\n display: none;\n }\n\n :host .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 .end {\n display: flex;\n column-gap: ${standardPadding};\n margin-top: ${largePadding};\n }\n`;\n"]}
@@ -0,0 +1,4 @@
1
+ import { ViewTemplate } from '@ni/fast-element';
2
+ import { type FoundationElementTemplate } from '@ni/fast-foundation';
3
+ import type { ChatMessageInbound, ChatMessageInboundOptions } from '.';
4
+ export declare const template: FoundationElementTemplate<ViewTemplate<ChatMessageInbound>, ChatMessageInboundOptions>;
@@ -0,0 +1,18 @@
1
+ import { html, slotted, ViewTemplate } from '@ni/fast-element';
2
+ import { endSlotTemplate, startSlotTemplate } from '@ni/fast-foundation';
3
+ export const template = (context, definition) => html `
4
+ <div class="container">
5
+ ${startSlotTemplate(context, definition)}
6
+ <section class="message-content">
7
+ <slot></slot>
8
+ </section>
9
+ <section class="footer-actions ${x => (x.footerActionsIsEmpty ? '' : 'has-content')}">
10
+ <slot
11
+ name="footer-actions"
12
+ ${slotted({ property: 'slottedFooterActionsElements' })}
13
+ ></slot>
14
+ </section>
15
+ ${endSlotTemplate(context, definition)}
16
+ </div>
17
+ `;
18
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/chat/message/inbound/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACH,eAAe,EACf,iBAAiB,EAEpB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,CAAC,MAAM,QAAQ,GAEQ,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,CAAoB;;UAEpE,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","sourcesContent":["import { html, slotted, ViewTemplate } from '@ni/fast-element';\nimport {\n endSlotTemplate,\n startSlotTemplate,\n type FoundationElementTemplate\n} from '@ni/fast-foundation';\nimport type { ChatMessageInbound, ChatMessageInboundOptions } from '.';\n\nexport const template: FoundationElementTemplate<\nViewTemplate<ChatMessageInbound>,\nChatMessageInboundOptions> = (context, definition) => html<ChatMessageInbound>`\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"]}
@@ -12,6 +12,7 @@ declare global {
12
12
  export type ChatMessageOptions = FoundationElementDefinition & StartEndOptions;
13
13
  /**
14
14
  * A Spright component for displaying a chat message
15
+ * @deprecated Use specific message component types instead
15
16
  */
16
17
  export declare class ChatMessage extends FoundationElement {
17
18
  /**
@@ -6,6 +6,7 @@ import { template } from './template';
6
6
  import { ChatMessageType } from './types';
7
7
  /**
8
8
  * A Spright component for displaying a chat message
9
+ * @deprecated Use specific message component types instead
9
10
  */
10
11
  export class ChatMessage extends FoundationElement {
11
12
  constructor() {
@@ -1 +1 @@
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;QAEI,gBAAW,GAAoB,eAAe,CAAC,MAAM,CAAC;QAE7D,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;AAhBU;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;gDACyB;AAItD;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 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
+ {"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;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB;IAAlD;;QACI;;;;;WAKG;QAEI,gBAAW,GAAoB,eAAe,CAAC,MAAM,CAAC;QAE7D,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;AAhBU;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;gDACyB;AAItD;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 * @deprecated Use specific message component types instead\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 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"]}
@@ -0,0 +1,12 @@
1
+ import { FoundationElement } from '@ni/fast-foundation';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'spright-chat-message-outbound': ChatMessageOutbound;
5
+ }
6
+ }
7
+ /**
8
+ * A Spright component for displaying an outbound chat message
9
+ */
10
+ export declare class ChatMessageOutbound extends FoundationElement {
11
+ }
12
+ export declare const chatMessageOutboundTag = "spright-chat-message-outbound";
@@ -0,0 +1,16 @@
1
+ import { DesignSystem, FoundationElement, } from '@ni/fast-foundation';
2
+ import { styles } from './styles';
3
+ import { template } from './template';
4
+ /**
5
+ * A Spright component for displaying an outbound chat message
6
+ */
7
+ export class ChatMessageOutbound extends FoundationElement {
8
+ }
9
+ const sprightChatMessageOutbound = ChatMessageOutbound.compose({
10
+ baseName: 'chat-message-outbound',
11
+ template,
12
+ styles
13
+ });
14
+ DesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageOutbound());
15
+ export const chatMessageOutboundTag = 'spright-chat-message-outbound';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/chat/message/outbound/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;CACzD;AAED,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC3D,QAAQ,EAAE,uBAAuB;IACjC,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,0BAA0B,EAAE,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,sBAAsB,GAAG,+BAA+B,CAAC","sourcesContent":["import {\n DesignSystem,\n FoundationElement,\n} from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'spright-chat-message-outbound': ChatMessageOutbound;\n }\n}\n\n/**\n * A Spright component for displaying an outbound chat message\n */\nexport class ChatMessageOutbound extends FoundationElement {\n}\n\nconst sprightChatMessageOutbound = ChatMessageOutbound.compose({\n baseName: 'chat-message-outbound',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageOutbound());\nexport const chatMessageOutboundTag = 'spright-chat-message-outbound';\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("@ni/fast-element").ElementStyles;
@@ -0,0 +1,37 @@
1
+ import { css } from '@ni/fast-element';
2
+ import { bodyFont, bodyFontColor, borderHoverColor, borderWidth, fillSelectedColor, mediumPadding, standardPadding, } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
3
+ import { display } from '../../../utilities/style/display';
4
+ export const styles = css `
5
+ ${display('flex')}
6
+
7
+ :host {
8
+ min-width: ${standardPadding};
9
+ min-height: ${standardPadding};
10
+
11
+ flex-direction: row;
12
+ justify-content: flex-end;
13
+ flex-shrink: 0;
14
+ font: ${bodyFont};
15
+ color: ${bodyFontColor};
16
+ }
17
+
18
+ .container {
19
+ display: flex;
20
+ flex-direction: column;
21
+ max-width: calc(90%);
22
+ }
23
+
24
+ .message-content {
25
+ width: fit-content;
26
+ height: fit-content;
27
+ overflow-x: auto;
28
+ }
29
+
30
+ :host .message-content {
31
+ background: ${fillSelectedColor};
32
+ border: ${borderWidth} solid ${borderHoverColor};
33
+ border-radius: ${mediumPadding} ${mediumPadding} 0px ${mediumPadding};
34
+ padding: ${mediumPadding};
35
+ }
36
+ `;
37
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/chat/message/outbound/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EACH,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,eAAe,GAClB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;qBAGA,eAAe;sBACd,eAAe;;;;;gBAKrB,QAAQ;iBACP,aAAa;;;;;;;;;;;;;;;;sBAgBR,iBAAiB;kBACrB,WAAW,UAAU,gBAAgB;yBAC9B,aAAa,IAAI,aAAa,QAAQ,aAAa;mBACzD,aAAa;;CAE/B,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\n\nimport {\n bodyFont,\n bodyFontColor,\n borderHoverColor,\n borderWidth,\n fillSelectedColor,\n mediumPadding,\n standardPadding,\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 min-width: ${standardPadding};\n min-height: ${standardPadding};\n\n flex-direction: row;\n justify-content: flex-end;\n flex-shrink: 0;\n font: ${bodyFont};\n color: ${bodyFontColor};\n }\n\n .container {\n display: flex;\n flex-direction: column;\n max-width: calc(90%);\n }\n\n .message-content {\n width: fit-content;\n height: fit-content;\n overflow-x: auto;\n }\n\n :host .message-content {\n background: ${fillSelectedColor};\n border: ${borderWidth} solid ${borderHoverColor};\n border-radius: ${mediumPadding} ${mediumPadding} 0px ${mediumPadding};\n padding: ${mediumPadding};\n }\n`;\n"]}
@@ -0,0 +1,4 @@
1
+ import { ViewTemplate } from '@ni/fast-element';
2
+ import type { FoundationElementTemplate } from '@ni/fast-foundation';
3
+ import type { ChatMessageOutbound } from '.';
4
+ export declare const template: FoundationElementTemplate<ViewTemplate<ChatMessageOutbound>>;
@@ -0,0 +1,9 @@
1
+ import { html, ViewTemplate } from '@ni/fast-element';
2
+ export const template = () => html `
3
+ <div class="container">
4
+ <section class="message-content">
5
+ <slot></slot>
6
+ </section>
7
+ </div>
8
+ `;
9
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/chat/message/outbound/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAItD,MAAM,CAAC,MAAM,QAAQ,GAEjB,GAAG,EAAE,CAAC,IAAI,CAAqB;;;;;;CAMlC,CAAC","sourcesContent":["import { html, ViewTemplate } from '@ni/fast-element';\nimport type { FoundationElementTemplate } from '@ni/fast-foundation';\nimport type { ChatMessageOutbound } from '.';\n\nexport const template: FoundationElementTemplate<\nViewTemplate<ChatMessageOutbound>\n> = () => html<ChatMessageOutbound>`\n <div class=\"container\">\n <section class=\"message-content\">\n <slot></slot>\n </section>\n </div>\n`;\n"]}
@@ -10,8 +10,8 @@ export const styles = css `
10
10
  ${display('flex')}
11
11
 
12
12
  :host {
13
- min-width: 16px;
14
- min-height: 16px;
13
+ min-width: ${standardPadding};
14
+ min-height: ${standardPadding};
15
15
 
16
16
  flex-direction: row;
17
17
  justify-content: center;
@@ -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,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
+ {"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;;;qBAGA,eAAe;sBACd,eAAe;;;;;gBAKrB,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: ${standardPadding};\n min-height: ${standardPadding};\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"]}
@@ -0,0 +1,12 @@
1
+ import { FoundationElement } from '@ni/fast-foundation';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'spright-chat-message-system': ChatMessageSystem;
5
+ }
6
+ }
7
+ /**
8
+ * A Spright component for displaying an system chat message
9
+ */
10
+ export declare class ChatMessageSystem extends FoundationElement {
11
+ }
12
+ export declare const chatMessageSystemTag = "spright-chat-message-system";
@@ -0,0 +1,16 @@
1
+ import { DesignSystem, FoundationElement, } from '@ni/fast-foundation';
2
+ import { styles } from './styles';
3
+ import { template } from './template';
4
+ /**
5
+ * A Spright component for displaying an system chat message
6
+ */
7
+ export class ChatMessageSystem extends FoundationElement {
8
+ }
9
+ const sprightChatMessageSystem = ChatMessageSystem.compose({
10
+ baseName: 'chat-message-system',
11
+ template,
12
+ styles
13
+ });
14
+ DesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageSystem());
15
+ export const chatMessageSystemTag = 'spright-chat-message-system';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/chat/message/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,iBAAiB;CACvD;AAED,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,CAAC;IACvD,QAAQ,EAAE,qBAAqB;IAC/B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,wBAAwB,EAAE,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAC","sourcesContent":["import {\n DesignSystem,\n FoundationElement,\n} from '@ni/fast-foundation';\nimport { styles } from './styles';\nimport { template } from './template';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'spright-chat-message-system': ChatMessageSystem;\n }\n}\n\n/**\n * A Spright component for displaying an system chat message\n */\nexport class ChatMessageSystem extends FoundationElement {\n}\n\nconst sprightChatMessageSystem = ChatMessageSystem.compose({\n baseName: 'chat-message-system',\n template,\n styles\n});\n\nDesignSystem.getOrCreate().withPrefix('spright').register(sprightChatMessageSystem());\nexport const chatMessageSystemTag = 'spright-chat-message-system';\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("@ni/fast-element").ElementStyles;
@@ -0,0 +1,30 @@
1
+ import { css } from '@ni/fast-element';
2
+ import { bodyFont, bodyFontColor, standardPadding, } from '@ni/nimble-components/dist/esm/theme-provider/design-tokens';
3
+ import { display } from '../../../utilities/style/display';
4
+ export const styles = css `
5
+ ${display('flex')}
6
+
7
+ :host {
8
+ min-width: ${standardPadding};
9
+ min-height: ${standardPadding};
10
+
11
+ flex-direction: row;
12
+ justify-content: center;
13
+ flex-shrink: 0;
14
+ font: ${bodyFont};
15
+ color: ${bodyFontColor};
16
+ }
17
+
18
+ .container {
19
+ display: flex;
20
+ flex-direction: column;
21
+ max-width: calc(90%);
22
+ }
23
+
24
+ .message-content {
25
+ width: fit-content;
26
+ height: fit-content;
27
+ overflow-x: auto;
28
+ }
29
+ `;
30
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/chat/message/system/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EACH,QAAQ,EACR,aAAa,EACb,eAAe,GAClB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;qBAGA,eAAe;sBACd,eAAe;;;;;gBAKrB,QAAQ;iBACP,aAAa;;;;;;;;;;;;;;CAc7B,CAAC","sourcesContent":["import { css } from '@ni/fast-element';\n\nimport {\n bodyFont,\n bodyFontColor,\n standardPadding,\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 min-width: ${standardPadding};\n min-height: ${standardPadding};\n\n flex-direction: row;\n justify-content: center;\n flex-shrink: 0;\n font: ${bodyFont};\n color: ${bodyFontColor};\n }\n\n .container {\n display: flex;\n flex-direction: column;\n max-width: calc(90%);\n }\n\n .message-content {\n width: fit-content;\n height: fit-content;\n overflow-x: auto;\n }\n`;\n"]}
@@ -0,0 +1,4 @@
1
+ import { ViewTemplate } from '@ni/fast-element';
2
+ import type { FoundationElementTemplate } from '@ni/fast-foundation';
3
+ import type { ChatMessageSystem } from '.';
4
+ export declare const template: FoundationElementTemplate<ViewTemplate<ChatMessageSystem>>;
@@ -0,0 +1,9 @@
1
+ import { html, ViewTemplate } from '@ni/fast-element';
2
+ export const template = () => html `
3
+ <div class="container">
4
+ <section class="message-content">
5
+ <slot></slot>
6
+ </section>
7
+ </div>
8
+ `;
9
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/chat/message/system/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAItD,MAAM,CAAC,MAAM,QAAQ,GAEjB,GAAG,EAAE,CAAC,IAAI,CAAmB;;;;;;CAMhC,CAAC","sourcesContent":["import { html, ViewTemplate } from '@ni/fast-element';\nimport type { FoundationElementTemplate } from '@ni/fast-foundation';\nimport type { ChatMessageSystem } from '.';\n\nexport const template: FoundationElementTemplate<\nViewTemplate<ChatMessageSystem>\n> = () => html<ChatMessageSystem>`\n <div class=\"container\">\n <section class=\"message-content\">\n <slot></slot>\n </section>\n </div>\n`;\n"]}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * A message type in a chat conversation.
3
3
  * @public
4
+ * @deprecated Use specific message component types instead
4
5
  */
5
6
  export declare const ChatMessageType: {
6
7
  readonly system: undefined;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * A message type in a chat conversation.
3
3
  * @public
4
+ * @deprecated Use specific message component types instead
4
5
  */
5
6
  export const ChatMessageType = {
6
7
  system: undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/chat/message/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACZ,CAAC","sourcesContent":["/**\n * A message type in a chat conversation.\n * @public\n */\nexport const ChatMessageType = {\n system: undefined,\n outbound: 'outbound',\n inbound: 'inbound'\n} as const;\n\nexport type ChatMessageType = (typeof ChatMessageType)[keyof typeof ChatMessageType];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/chat/message/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACZ,CAAC","sourcesContent":["/**\n * A message type in a chat conversation.\n * @public\n * @deprecated Use specific message component types instead\n */\nexport const ChatMessageType = {\n system: undefined,\n outbound: 'outbound',\n inbound: 'inbound'\n} as const;\n\nexport type ChatMessageType = (typeof ChatMessageType)[keyof typeof ChatMessageType];\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/spright-components",
3
- "version": "6.5.0",
3
+ "version": "6.6.1",
4
4
  "description": "NI Spright Components",
5
5
  "scripts": {
6
6
  "build": "tsc -p ./tsconfig.json",
@@ -37,7 +37,7 @@
37
37
  "@ni/fast-element": "^10.0.0",
38
38
  "@ni/fast-foundation": "^10.1.2",
39
39
  "@ni/fast-web-utilities": "^10.0.0",
40
- "@ni/nimble-components": "^35.1.0",
40
+ "@ni/nimble-components": "^35.1.1",
41
41
  "tslib": "^2.2.0"
42
42
  },
43
43
  "devDependencies": {