@ni/ok-components 1.12.0 → 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.
@@ -27017,7 +27017,7 @@ so this becomes the fallback color for the slot */ ''}
27017
27017
  ${display$2('none')}
27018
27018
  `;
27019
27019
 
27020
- const supportedLabels$1 = {
27020
+ const supportedLabels$2 = {
27021
27021
  popupDismiss: popupDismissLabel,
27022
27022
  numericDecrement: numericDecrementLabel,
27023
27023
  numericIncrement: numericIncrementLabel,
@@ -27039,7 +27039,7 @@ so this becomes the fallback color for the slot */ ''}
27039
27039
  class LabelProviderCore extends LabelProviderBase {
27040
27040
  constructor() {
27041
27041
  super(...arguments);
27042
- this.supportedLabels = supportedLabels$1;
27042
+ this.supportedLabels = supportedLabels$2;
27043
27043
  }
27044
27044
  }
27045
27045
  __decorate([
@@ -27176,7 +27176,7 @@ so this becomes the fallback color for the slot */ ''}
27176
27176
  cssCustomPropertyName: null
27177
27177
  }).withDefault(tableLabelDefaults.tableGroupRowPlaceholderEmptyLabel);
27178
27178
 
27179
- const supportedLabels = {
27179
+ const supportedLabels$1 = {
27180
27180
  groupCollapse: tableGroupCollapseLabel,
27181
27181
  groupExpand: tableGroupExpandLabel,
27182
27182
  rowCollapse: tableRowCollapseLabel,
@@ -27200,7 +27200,7 @@ so this becomes the fallback color for the slot */ ''}
27200
27200
  class LabelProviderTable extends LabelProviderBase {
27201
27201
  constructor() {
27202
27202
  super(...arguments);
27203
- this.supportedLabels = supportedLabels;
27203
+ this.supportedLabels = supportedLabels$1;
27204
27204
  }
27205
27205
  }
27206
27206
  __decorate([
@@ -104733,6 +104733,20 @@ focus outline in that case.
104733
104733
  }
104734
104734
  `;
104735
104735
 
104736
+ const chatLabelDefaults = {
104737
+ chatSendLabel: 'Send',
104738
+ chatStopLabel: 'Stop'
104739
+ };
104740
+
104741
+ const chatSendLabel = DesignToken.create({
104742
+ name: 'chat-send-label',
104743
+ cssCustomPropertyName: null
104744
+ }).withDefault(chatLabelDefaults.chatSendLabel);
104745
+ const chatStopLabel = DesignToken.create({
104746
+ name: 'chat-stop-label',
104747
+ cssCustomPropertyName: null
104748
+ }).withDefault(chatLabelDefaults.chatStopLabel);
104749
+
104736
104750
  const template$y = html `
104737
104751
  <div class="container">
104738
104752
  <section class="attachments ${x => (x.attachmentsIsEmpty ? '' : 'has-content')}">
@@ -104764,10 +104778,10 @@ focus outline in that case.
104764
104778
  ?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}
104765
104779
  @click=${x => (x.processing ? x.stopButtonClickHandler() : x.sendButtonClickHandler())}
104766
104780
  tabindex="${x => x.tabIndex}"
104767
- title=${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
104781
+ title=${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
104768
104782
  content-hidden
104769
104783
  >
104770
- ${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
104784
+ ${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
104771
104785
  ${when(x => x.processing, html `<${iconStopSquareTag} slot="start"></${iconStopSquareTag}>`, html `<${iconPaperPlaneTag} slot="start"></${iconPaperPlaneTag}>`)}
104772
104786
  </${buttonTag}>
104773
104787
  </section>
@@ -104941,12 +104955,6 @@ focus outline in that case.
104941
104955
  __decorate([
104942
104956
  attr
104943
104957
  ], ChatInput.prototype, "placeholder", void 0);
104944
- __decorate([
104945
- attr({ attribute: 'send-button-label' })
104946
- ], ChatInput.prototype, "sendButtonLabel", void 0);
104947
- __decorate([
104948
- attr({ attribute: 'stop-button-label' })
104949
- ], ChatInput.prototype, "stopButtonLabel", void 0);
104950
104958
  __decorate([
104951
104959
  attr
104952
104960
  ], ChatInput.prototype, "value", void 0);
@@ -105403,6 +105411,11 @@ focus outline in that case.
105403
105411
  font: ${subtitleFont};
105404
105412
  color: ${subtitleFontColor};
105405
105413
  text-align: center;
105414
+ ${linkFont.cssCustomProperty}: ${subtitleFont};
105415
+ }
105416
+
105417
+ .subtitle.subtitle-empty {
105418
+ display: none;
105406
105419
  }
105407
105420
 
105408
105421
  .message-content {
@@ -105510,9 +105523,9 @@ focus outline in that case.
105510
105523
  ${when(x => x.welcomeTitle, html `
105511
105524
  <div class="title">${x => x.welcomeTitle}</div>
105512
105525
  `)}
105513
- ${when(x => x.subtitle, html `
105514
- <div class="subtitle">${x => x.subtitle}</div>
105515
- `)}
105526
+ <div class="subtitle ${x => (!x.subtitle && x.subtitleIsEmpty ? 'subtitle-empty' : '')}">
105527
+ <slot name="subtitle" ${slotted({ property: 'slottedSubtitleElements' })}>${x => x.subtitle}</slot>
105528
+ </div>
105516
105529
  <section class="message-content">
105517
105530
  <slot></slot>
105518
105531
  </section>
@@ -105523,6 +105536,14 @@ focus outline in that case.
105523
105536
  * A Spright component for displaying a welcome chat message
105524
105537
  */
105525
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
+ }
105526
105547
  }
105527
105548
  __decorate([
105528
105549
  attr({ attribute: 'welcome-title' })
@@ -105530,6 +105551,12 @@ focus outline in that case.
105530
105551
  __decorate([
105531
105552
  attr
105532
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);
105533
105560
  const sprightChatMessageWelcome = ChatMessageWelcome.compose({
105534
105561
  baseName: 'chat-message-welcome',
105535
105562
  template: template$s,
@@ -105933,6 +105960,33 @@ focus outline in that case.
105933
105960
  .withPrefix('spright')
105934
105961
  .register(sprightIconWorkItemWrenchHammer());
105935
105962
 
105963
+ const supportedLabels = {
105964
+ send: chatSendLabel,
105965
+ stop: chatStopLabel
105966
+ };
105967
+ /**
105968
+ * Label provider for Spright chat components
105969
+ */
105970
+ class LabelProviderChat extends LabelProviderBase {
105971
+ constructor() {
105972
+ super(...arguments);
105973
+ this.supportedLabels = supportedLabels;
105974
+ }
105975
+ }
105976
+ __decorate([
105977
+ attr
105978
+ ], LabelProviderChat.prototype, "send", void 0);
105979
+ __decorate([
105980
+ attr
105981
+ ], LabelProviderChat.prototype, "stop", void 0);
105982
+ const sprightLabelProviderChat = LabelProviderChat.compose({
105983
+ baseName: 'label-provider-chat',
105984
+ styles: styles$1e
105985
+ });
105986
+ DesignSystem.getOrCreate()
105987
+ .withPrefix('spright')
105988
+ .register(sprightLabelProviderChat());
105989
+
105936
105990
  const styles$j = css `
105937
105991
  ${display$1('inline-block')}
105938
105992