@brightspace-ui/core 1.241.0 → 1.242.0

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.
@@ -17,6 +17,12 @@ const HINT_TYPES = {
17
17
  INTEGER: 4
18
18
  };
19
19
 
20
+ // US137000 - prevent Lit default converter from converting undefined to 0
21
+ const numberConverter = {
22
+ fromAttribute: (attr) => { return !attr ? undefined : Number(attr); },
23
+ toAttribute: (prop) => { return String(prop); }
24
+ };
25
+
20
26
  function formatValue(value, options, numDecimalDigits) {
21
27
  if (value === undefined) return '';
22
28
  if (numDecimalDigits > 0) {
@@ -161,7 +167,7 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
161
167
  * Value of the input
162
168
  * @type {number}
163
169
  */
164
- value: { type: Number },
170
+ value: { type: Number, converter: numberConverter },
165
171
  /**
166
172
  * @ignore
167
173
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.241.0",
3
+ "version": "1.242.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",