@ni/ok-components 1.12.1 → 1.12.2

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.
@@ -105411,6 +105411,11 @@ focus outline in that case.
105411
105411
  font: ${subtitleFont};
105412
105412
  color: ${subtitleFontColor};
105413
105413
  text-align: center;
105414
+ ${linkFont.cssCustomProperty}: ${subtitleFont};
105415
+ }
105416
+
105417
+ .subtitle.subtitle-empty {
105418
+ display: none;
105414
105419
  }
105415
105420
 
105416
105421
  .message-content {
@@ -105518,9 +105523,9 @@ focus outline in that case.
105518
105523
  ${when(x => x.welcomeTitle, html `
105519
105524
  <div class="title">${x => x.welcomeTitle}</div>
105520
105525
  `)}
105521
- ${when(x => x.subtitle, html `
105522
- <div class="subtitle">${x => x.subtitle}</div>
105523
- `)}
105526
+ <div class="subtitle ${x => (!x.subtitle && x.subtitleIsEmpty ? 'subtitle-empty' : '')}">
105527
+ <slot name="subtitle" ${slotted({ property: 'slottedSubtitleElements' })}>${x => x.subtitle}</slot>
105528
+ </div>
105524
105529
  <section class="message-content">
105525
105530
  <slot></slot>
105526
105531
  </section>
@@ -105531,6 +105536,14 @@ focus outline in that case.
105531
105536
  * A Spright component for displaying a welcome chat message
105532
105537
  */
105533
105538
  class ChatMessageWelcome extends FoundationElement {
105539
+ constructor() {
105540
+ super(...arguments);
105541
+ /** @internal */
105542
+ this.subtitleIsEmpty = true;
105543
+ }
105544
+ slottedSubtitleElementsChanged(_prev, next) {
105545
+ this.subtitleIsEmpty = next === undefined || next.length === 0;
105546
+ }
105534
105547
  }
105535
105548
  __decorate([
105536
105549
  attr({ attribute: 'welcome-title' })
@@ -105538,6 +105551,12 @@ focus outline in that case.
105538
105551
  __decorate([
105539
105552
  attr
105540
105553
  ], ChatMessageWelcome.prototype, "subtitle", void 0);
105554
+ __decorate([
105555
+ observable
105556
+ ], ChatMessageWelcome.prototype, "slottedSubtitleElements", void 0);
105557
+ __decorate([
105558
+ observable
105559
+ ], ChatMessageWelcome.prototype, "subtitleIsEmpty", void 0);
105541
105560
  const sprightChatMessageWelcome = ChatMessageWelcome.compose({
105542
105561
  baseName: 'chat-message-welcome',
105543
105562
  template: template$s,