@orbitcommerce/constellation 1.2.1 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to Constellation by Orbit Commerce. Versions follow [semanti
4
4
  a patch fixes, a minor adds, and only a major release removes or renames something you already use. Where a minor
5
5
  changes how existing code behaves, "Behaviour changes to know" in its entry lists the change.
6
6
 
7
+ ## 1.2.2 (2026-11-05)
8
+
9
+ ### Fixes
10
+
11
+ - **NumberInput, `decimals={0}`:** a fraction typed into a whole-number field rounds on commit, half away from zero (`2.5` becomes 3, `1.4` becomes 1), and the field shows the rounded value on blur. The field used to drop the decimal separator together with the group separators while typing, so the digits ran together into a different, larger number (`2.5` committed as 25, `1.5` as 15). Group separators are still dropped (`1,000` is 1000). Only the locale's own decimal separator is kept: in `de-DE`, `2,5` rounds to 3 and `1.000` is 1000.
12
+
7
13
  ## 1.2.1 (2026-10-22)
8
14
 
9
15
  Fixes found as Orbit's dashboards and plugins moved onto 1.2.0, and newer Radix primitives and motion. Nothing is removed
package/dist/index.cjs CHANGED
@@ -10733,7 +10733,7 @@ function normaliseValue(value) {
10733
10733
  var DIGIT = /\p{Nd}/u;
10734
10734
  function sanitise(text, locale, decimals, allowNegative) {
10735
10735
  const { decimal, group } = localeSeparators(locale);
10736
- const dropSeparators = decimals === 0;
10736
+ const wholeNumber = decimals === 0;
10737
10737
  let kept = "";
10738
10738
  for (const char of text) {
10739
10739
  if (DIGIT.test(char)) {
@@ -10741,7 +10741,7 @@ function sanitise(text, locale, decimals, allowNegative) {
10741
10741
  } else if (char === "-" || char === "\u2212") {
10742
10742
  if (allowNegative) kept += char;
10743
10743
  } else if (char === decimal || char === group || char === "," || char === "." || char === "\u066B" || char === "\u066C") {
10744
- if (!dropSeparators) kept += char;
10744
+ if (!wholeNumber || char === decimal) kept += char;
10745
10745
  } else if (/\s/.test(char)) {
10746
10746
  kept += char;
10747
10747
  }
@@ -42,7 +42,7 @@ function normaliseValue(value) {
42
42
  var DIGIT = /\p{Nd}/u;
43
43
  function sanitise(text, locale, decimals, allowNegative) {
44
44
  const { decimal, group } = localeSeparators(locale);
45
- const dropSeparators = decimals === 0;
45
+ const wholeNumber = decimals === 0;
46
46
  let kept = "";
47
47
  for (const char of text) {
48
48
  if (DIGIT.test(char)) {
@@ -50,7 +50,7 @@ function sanitise(text, locale, decimals, allowNegative) {
50
50
  } else if (char === "-" || char === "\u2212") {
51
51
  if (allowNegative) kept += char;
52
52
  } else if (char === decimal || char === group || char === "," || char === "." || char === "\u066B" || char === "\u066C") {
53
- if (!dropSeparators) kept += char;
53
+ if (!wholeNumber || char === decimal) kept += char;
54
54
  } else if (/\s/.test(char)) {
55
55
  kept += char;
56
56
  }
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-CVXG3GYS.js";
9
9
  import {
10
10
  NumberInput
11
- } from "./chunk-YZB2D4AP.js";
11
+ } from "./chunk-T4URSDXR.js";
12
12
  import {
13
13
  clampNumber
14
14
  } from "./chunk-VIFF3FNJ.js";
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import {
3
3
  NumberInput
4
- } from "../chunks/chunk-YZB2D4AP.js";
4
+ } from "../chunks/chunk-T4URSDXR.js";
5
5
  import "../chunks/chunk-VIFF3FNJ.js";
6
6
  import {
7
7
  SegmentedControl
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  NumberInput,
4
4
  numberInputLabels
5
- } from "../chunks/chunk-YZB2D4AP.js";
5
+ } from "../chunks/chunk-T4URSDXR.js";
6
6
  import "../chunks/chunk-VIFF3FNJ.js";
7
7
  import "../chunks/chunk-RFEZFKI2.js";
8
8
  import "../chunks/chunk-WK2WAJLO.js";
@@ -4,11 +4,11 @@ import {
4
4
  firstUnit,
5
5
  unitOptions,
6
6
  unitRules
7
- } from "../chunks/chunk-QOYDJQTO.js";
7
+ } from "../chunks/chunk-XGKIOBY6.js";
8
8
  import "../chunks/chunk-CVXG3GYS.js";
9
9
  import {
10
10
  NumberInput
11
- } from "../chunks/chunk-YZB2D4AP.js";
11
+ } from "../chunks/chunk-T4URSDXR.js";
12
12
  import {
13
13
  clampNumber,
14
14
  formatCssLength,
@@ -9,7 +9,7 @@ import {
9
9
  } from "../chunks/chunk-CVXG3GYS.js";
10
10
  import {
11
11
  NumberInput
12
- } from "../chunks/chunk-YZB2D4AP.js";
12
+ } from "../chunks/chunk-T4URSDXR.js";
13
13
  import "../chunks/chunk-VIFF3FNJ.js";
14
14
  import {
15
15
  Textarea
@@ -4,9 +4,9 @@ import {
4
4
  firstUnit,
5
5
  unitOptions,
6
6
  unitRules
7
- } from "../chunks/chunk-QOYDJQTO.js";
7
+ } from "../chunks/chunk-XGKIOBY6.js";
8
8
  import "../chunks/chunk-CVXG3GYS.js";
9
- import "../chunks/chunk-YZB2D4AP.js";
9
+ import "../chunks/chunk-T4URSDXR.js";
10
10
  import {
11
11
  clampNumber,
12
12
  editableNumber,
@@ -7,9 +7,9 @@ import {
7
7
  unitLabels,
8
8
  unitOptions,
9
9
  unitRules
10
- } from "../chunks/chunk-QOYDJQTO.js";
10
+ } from "../chunks/chunk-XGKIOBY6.js";
11
11
  import "../chunks/chunk-CVXG3GYS.js";
12
- import "../chunks/chunk-YZB2D4AP.js";
12
+ import "../chunks/chunk-T4URSDXR.js";
13
13
  import "../chunks/chunk-VIFF3FNJ.js";
14
14
  import "../chunks/chunk-GC6UJB65.js";
15
15
  import "../chunks/chunk-RFEZFKI2.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbitcommerce/constellation",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Constellation by Orbit Commerce: the design system and React components Orbit Commerce builds its dashboards with, for apps that look at home in Orbit Commerce",
5
5
  "keywords": [
6
6
  "orbit-commerce",