@fluid-topics/ft-text-area 1.0.58 → 1.0.60

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.
@@ -4,11 +4,11 @@ import { FtTypographyBody1CssVariables } from "@fluid-topics/ft-typography/build
4
4
  import { FtInputLabelCssVariables } from "@fluid-topics/ft-input-label/build/ft-input-label.css";
5
5
  import { FtRippleCssVariables } from "@fluid-topics/ft-ripple/build/ft-ripple.css";
6
6
  export const FtTextAreaCssVariables = {
7
- fontSize: FtCssVariableFactory.create("--ft-text-area-font-size", "SIZE", "14px"),
8
- labelSize: FtCssVariableFactory.create("--ft-text-area-label-size", "SIZE", "11px"),
9
- verticalSpacing: FtCssVariableFactory.create("--ft-text-area-vertical-spacing", "SIZE", "4px"),
10
- horizontalSpacing: FtCssVariableFactory.create("--ft-text-area-horizontal-spacing", "SIZE", "16px"),
11
- helperColor: FtCssVariableFactory.extend("--ft-text-area-helper-color", designSystemVariables.colorOnSurfaceMedium),
7
+ fontSize: FtCssVariableFactory.create("--ft-text-area-font-size", "", "SIZE", "14px"),
8
+ labelSize: FtCssVariableFactory.create("--ft-text-area-label-size", "", "SIZE", "11px"),
9
+ verticalSpacing: FtCssVariableFactory.create("--ft-text-area-vertical-spacing", "", "SIZE", "4px"),
10
+ horizontalSpacing: FtCssVariableFactory.create("--ft-text-area-horizontal-spacing", "", "SIZE", "16px"),
11
+ helperColor: FtCssVariableFactory.extend("--ft-text-area-helper-color", "", designSystemVariables.colorOnSurfaceMedium),
12
12
  colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
13
13
  colorOnSurface: FtCssVariableFactory.external(designSystemVariables.colorOnSurface, "Design system"),
14
14
  colorOnSurfaceDisabled: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceDisabled, "Design system"),
@@ -1,7 +1,8 @@
1
1
  import { PropertyValues } from "lit";
2
2
  import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
3
3
  import { FtTextAreaProperties } from "./ft-text-area.properties";
4
- export declare class FtTextArea extends FtLitElement implements FtTextAreaProperties {
4
+ declare const FtTextArea_base: import("@fluid-topics/ft-wc-utils").FtFormComponentType<typeof FtLitElement>;
5
+ export declare class FtTextArea extends FtTextArea_base implements FtTextAreaProperties {
5
6
  static elementDefinitions: ElementDefinitionsMap;
6
7
  static styles: import("lit").CSSResult[];
7
8
  label: string;
@@ -21,3 +22,4 @@ export declare class FtTextArea extends FtLitElement implements FtTextAreaProper
21
22
  private liveUpdateValueFromInputField;
22
23
  private onResize;
23
24
  }
25
+ export {};
@@ -7,13 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html } from "lit";
8
8
  import { property, query, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
- import { FtLitElement } from "@fluid-topics/ft-wc-utils";
10
+ import { FtLitElement, toFtFormComponent } from "@fluid-topics/ft-wc-utils";
11
11
  import { FtTypography, FtTypographyBody1 } from "@fluid-topics/ft-typography";
12
12
  import { FtResizer } from "@fluid-topics/ft-resizer";
13
13
  import { FtInputLabel } from "@fluid-topics/ft-input-label";
14
14
  import { FtRipple } from "@fluid-topics/ft-ripple";
15
15
  import { FtTextAreaCssVariables, styles } from "./ft-text-area.css";
16
- class FtTextArea extends FtLitElement {
16
+ class FtTextArea extends toFtFormComponent(FtLitElement, "textbox") {
17
17
  constructor() {
18
18
  super(...arguments);
19
19
  this.label = "";
@@ -81,6 +81,7 @@ class FtTextArea extends FtLitElement {
81
81
  }
82
82
  setValue(value, sendEvents = false) {
83
83
  this.value = value;
84
+ this.setFormValue(value);
84
85
  if (sendEvents) {
85
86
  this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
86
87
  this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
@@ -101,6 +102,7 @@ class FtTextArea extends FtLitElement {
101
102
  liveUpdateValueFromInputField() {
102
103
  var _a;
103
104
  this.value = ((_a = this.textarea) === null || _a === void 0 ? void 0 : _a.value) || "";
105
+ this.setFormValue(this.value);
104
106
  this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
105
107
  }
106
108
  onResize(event) {