@ni/ok-components 0.2.18 → 0.2.19

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.
@@ -97961,7 +97961,7 @@ focus outline in that case.
97961
97961
  class="action-button"
97962
97962
  appearance="block"
97963
97963
  appearance-variant="${x => (x.processing ? 'primary' : 'accent')}"
97964
- ?disabled=${x => (x.processing ? false : x.disableSendButton)}
97964
+ ?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}
97965
97965
  @click=${x => (x.processing ? x.stopButtonClickHandler() : x.sendButtonClickHandler())}
97966
97966
  tabindex="${x => x.tabIndex}"
97967
97967
  title=${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
@@ -97987,10 +97987,12 @@ focus outline in that case.
97987
97987
  this.value = '';
97988
97988
  this.maxLength = -1;
97989
97989
  this.processing = false;
97990
+ this.sendDisabled = false;
97990
97991
  /**
97992
+ * Tracks whether the send button should be disabled based on input value
97991
97993
  * @internal
97992
97994
  */
97993
- this.disableSendButton = true;
97995
+ this.isInputEmpty = true;
97994
97996
  /**
97995
97997
  * The width of the vertical scrollbar, if displayed.
97996
97998
  * @internal
@@ -98016,7 +98018,7 @@ focus outline in that case.
98016
98018
  */
98017
98019
  textAreaInputHandler() {
98018
98020
  this.value = this.textArea.value;
98019
- this.disableSendButton = this.shouldDisableSendButton();
98021
+ this.isInputEmpty = this.shouldDisableSendButton();
98020
98022
  this.queueUpdateScrollbarWidth();
98021
98023
  }
98022
98024
  // If a property can affect whether a scrollbar is visible, we need to
@@ -98037,7 +98039,7 @@ focus outline in that case.
98037
98039
  valueChanged() {
98038
98040
  if (this.textArea) {
98039
98041
  this.textArea.value = this.value;
98040
- this.disableSendButton = this.shouldDisableSendButton();
98042
+ this.isInputEmpty = this.shouldDisableSendButton();
98041
98043
  this.queueUpdateScrollbarWidth();
98042
98044
  }
98043
98045
  }
@@ -98047,7 +98049,7 @@ focus outline in that case.
98047
98049
  connectedCallback() {
98048
98050
  super.connectedCallback();
98049
98051
  this.textArea.value = this.value;
98050
- this.disableSendButton = this.shouldDisableSendButton();
98052
+ this.isInputEmpty = this.shouldDisableSendButton();
98051
98053
  this.resizeObserver = new ResizeObserver(() => this.onResize());
98052
98054
  this.resizeObserver.observe(this);
98053
98055
  }
@@ -98086,7 +98088,7 @@ focus outline in that case.
98086
98088
  }
98087
98089
  resetInput() {
98088
98090
  this.value = '';
98089
- this.disableSendButton = true;
98091
+ this.isInputEmpty = true;
98090
98092
  if (this.textArea) {
98091
98093
  this.textArea.value = '';
98092
98094
  this.textArea.focus();
@@ -98130,12 +98132,15 @@ focus outline in that case.
98130
98132
  __decorate([
98131
98133
  attr({ attribute: 'processing', mode: 'boolean' })
98132
98134
  ], ChatInput.prototype, "processing", void 0);
98135
+ __decorate([
98136
+ attr({ attribute: 'send-disabled', mode: 'boolean' })
98137
+ ], ChatInput.prototype, "sendDisabled", void 0);
98133
98138
  __decorate([
98134
98139
  observable
98135
98140
  ], ChatInput.prototype, "textArea", void 0);
98136
98141
  __decorate([
98137
98142
  observable
98138
- ], ChatInput.prototype, "disableSendButton", void 0);
98143
+ ], ChatInput.prototype, "isInputEmpty", void 0);
98139
98144
  __decorate([
98140
98145
  observable
98141
98146
  ], ChatInput.prototype, "scrollbarWidth", void 0);