@ni/spright-components 7.0.0 → 7.1.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.
@@ -105399,6 +105399,11 @@ focus outline in that case.
105399
105399
  font: ${subtitleFont};
105400
105400
  color: ${subtitleFontColor};
105401
105401
  text-align: center;
105402
+ ${linkFont.cssCustomProperty}: ${subtitleFont};
105403
+ }
105404
+
105405
+ .subtitle.subtitle-empty {
105406
+ display: none;
105402
105407
  }
105403
105408
 
105404
105409
  .message-content {
@@ -105506,9 +105511,9 @@ focus outline in that case.
105506
105511
  ${when(x => x.welcomeTitle, html `
105507
105512
  <div class="title">${x => x.welcomeTitle}</div>
105508
105513
  `)}
105509
- ${when(x => x.subtitle, html `
105510
- <div class="subtitle">${x => x.subtitle}</div>
105511
- `)}
105514
+ <div class="subtitle ${x => (!x.subtitle && x.subtitleIsEmpty ? 'subtitle-empty' : '')}">
105515
+ <slot name="subtitle" ${slotted({ property: 'slottedSubtitleElements' })}>${x => x.subtitle}</slot>
105516
+ </div>
105512
105517
  <section class="message-content">
105513
105518
  <slot></slot>
105514
105519
  </section>
@@ -105519,6 +105524,14 @@ focus outline in that case.
105519
105524
  * A Spright component for displaying a welcome chat message
105520
105525
  */
105521
105526
  class ChatMessageWelcome extends FoundationElement {
105527
+ constructor() {
105528
+ super(...arguments);
105529
+ /** @internal */
105530
+ this.subtitleIsEmpty = true;
105531
+ }
105532
+ slottedSubtitleElementsChanged(_prev, next) {
105533
+ this.subtitleIsEmpty = next === undefined || next.length === 0;
105534
+ }
105522
105535
  }
105523
105536
  __decorate([
105524
105537
  attr({ attribute: 'welcome-title' })
@@ -105526,6 +105539,12 @@ focus outline in that case.
105526
105539
  __decorate([
105527
105540
  attr
105528
105541
  ], ChatMessageWelcome.prototype, "subtitle", void 0);
105542
+ __decorate([
105543
+ observable
105544
+ ], ChatMessageWelcome.prototype, "slottedSubtitleElements", void 0);
105545
+ __decorate([
105546
+ observable
105547
+ ], ChatMessageWelcome.prototype, "subtitleIsEmpty", void 0);
105529
105548
  const sprightChatMessageWelcome = ChatMessageWelcome.compose({
105530
105549
  baseName: 'chat-message-welcome',
105531
105550
  template: template$8,