@fluid-topics/ft-number-field 1.3.14 → 1.3.16

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.
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, nothing } from "lit";
8
- import { FtLitElement, optionalNumberProperty } from "@fluid-topics/ft-wc-utils";
8
+ import { FtLitElement, numberProperty } from "@fluid-topics/ft-wc-utils";
9
9
  import { styles } from "./ft-number-field.styles";
10
10
  import { property, query, state } from "lit/decorators.js";
11
11
  import { classMap } from "lit/directives/class-map.js";
@@ -80,9 +80,9 @@ class FtNumberField extends FtLitElement {
80
80
  this.setValue(+event.target.value);
81
81
  }
82
82
  setValue(value) {
83
- let oldValue = this.value;
83
+ const oldValue = this.value;
84
84
  this.value = value;
85
- let boundedValue = this.value == undefined ? undefined : this.lowerBound(this.upperBound(this.value));
85
+ const boundedValue = this.value == undefined ? undefined : this.lowerBound(this.upperBound(this.value));
86
86
  setTimeout(() => {
87
87
  this.value = boundedValue;
88
88
  if (oldValue !== boundedValue) {
@@ -110,7 +110,7 @@ __decorate([
110
110
  property()
111
111
  ], FtNumberField.prototype, "label", void 0);
112
112
  __decorate([
113
- optionalNumberProperty()
113
+ numberProperty()
114
114
  ], FtNumberField.prototype, "value", void 0);
115
115
  __decorate([
116
116
  property({ type: String })
@@ -122,10 +122,10 @@ __decorate([
122
122
  property({ type: Boolean })
123
123
  ], FtNumberField.prototype, "disabled", void 0);
124
124
  __decorate([
125
- optionalNumberProperty()
125
+ numberProperty()
126
126
  ], FtNumberField.prototype, "min", void 0);
127
127
  __decorate([
128
- optionalNumberProperty()
128
+ numberProperty()
129
129
  ], FtNumberField.prototype, "max", void 0);
130
130
  __decorate([
131
131
  state()