@fluid-topics/ft-text-field 0.1.15 → 0.1.18

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ A text field input component.
3
3
  ## Install
4
4
 
5
5
  ```shell
6
- npm install @fluid-topics/ft-switch
6
+ npm install @fluid-topics/ft-text-field
7
7
  yarn add @fluid-topics/ft-text-field
8
8
  ```
9
9
 
@@ -11,14 +11,15 @@ yarn add @fluid-topics/ft-text-field
11
11
 
12
12
  ```typescript
13
13
  import {html} from "lit"
14
- import "@fluid-topics/ft-switch"
15
- import {FtSwitchChange} from "@fluid-topics/ft-switch";
14
+ import "@fluid-topics/ft-text-field"
16
15
 
17
16
  function render() {
18
17
  return html`
19
- <ft-switch @change=${(e: FtSwitchChange) => console.log("Value changed:", e.detail)}>
20
- <ft-switch-option value="1">1</ft-switch-option>
21
- <ft-switch-option value="2">2</ft-switch-option>
22
- </ft-switch> `
18
+ <ft-text-field label="Label"
19
+ value="Value"
20
+ @change=${(e: CustomEvent) => console.log("Value changed:", e.detail)}
21
+ @live-change=${(e: CustomEvent) => console.log("Value live changed:", e.detail)}>
22
+ </ft-text-field>
23
+ `
23
24
  }
24
25
  ```
@@ -21,7 +21,7 @@ export declare const FtTextFieldCssVariables: {
21
21
  };
22
22
  export declare class FtTextField extends FtLitElement implements FtTextFieldProperties {
23
23
  static elementDefinitions: ElementDefinitionsMap;
24
- protected getStyles(): import("lit").CSSResult[];
24
+ static styles: import("lit").CSSResult[];
25
25
  label: string;
26
26
  value: string;
27
27
  helper: string;
@@ -30,7 +30,7 @@ export declare class FtTextField extends FtLitElement implements FtTextFieldProp
30
30
  private input?;
31
31
  dataList: string[];
32
32
  private focused;
33
- protected getTemplate(): import("lit-html").TemplateResult<1>;
33
+ protected render(): import("lit-html").TemplateResult<1>;
34
34
  protected updated(props: PropertyValues): void;
35
35
  private updateValueFromInputField;
36
36
  private liveUpdateValueFromInputField;