From edfaa291f863d09b20f8ed7d78812ce3bd0ac434 Mon Sep 17 00:00:00 2001 From: kennylam <909118+kennylam@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:35:44 -0400 Subject: [PATCH] fix(language-selector): remove internal decorator (#11069) ### Related Ticket(s) Closes #10885 ### Description Removes the `@internal` decorator from `language-selector` which was preventing output to the `.d.ts`. Also removes unneeded code from `bx-input`. ### Changelog **New** - {{new thing}} **Changed** - {{changed thing}} **Removed** - `@internal` decorator - unused getter/setter from `bx-input` --- .../src/components/input/input.ts | 32 ++++--------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/packages/carbon-web-components/src/components/input/input.ts b/packages/carbon-web-components/src/components/input/input.ts index 043f4cbdd03..a7d932272ad 100644 --- a/packages/carbon-web-components/src/components/input/input.ts +++ b/packages/carbon-web-components/src/components/input/input.ts @@ -49,6 +49,12 @@ export default class BXInput extends ValidityMixin(FormMixin(LitElement)) { */ protected _value = ''; + /** + * Set initial value of input + */ + @property({ reflect: true }) + value = ''; + /** * Handles `oninput` event on the ``. * @@ -198,32 +204,6 @@ export default class BXInput extends ValidityMixin(FormMixin(LitElement)) { @property({ attribute: 'validity-message' }) validityMessage = ''; - /** - * The value of the input. - */ - @property({ reflect: true }) - get value() { - // FIXME: Figure out how to deal with TS2611 - // once we have the input we can directly query for the value - if (this._input) { - return this._input.value; - } - // but before then _value will work fine - return this._value; - } - - set value(value) { - const oldValue = this._value; - this._value = value; - // make sure that lit-element updates the right properties - this.requestUpdate('value', oldValue); - // we set the value directly on the input (when available) - // so that programatic manipulation updates the UI correctly - if (this._input) { - this._input.value = value; - } - } - createRenderRoot() { return this.attachShadow({ mode: 'open',