@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 +6 -0
- package/dist/index.cjs +2 -2
- package/dist/modules/chunks/{chunk-YZB2D4AP.js → chunk-T4URSDXR.js} +2 -2
- package/dist/modules/chunks/{chunk-QOYDJQTO.js → chunk-XGKIOBY6.js} +1 -1
- package/dist/modules/components/GradientEditor.js +1 -1
- package/dist/modules/components/NumberInput.js +1 -1
- package/dist/modules/components/RadiusControl.js +2 -2
- package/dist/modules/components/SettingRow.js +1 -1
- package/dist/modules/components/SpacingBox.js +2 -2
- package/dist/modules/components/UnitInput.js +2 -2
- package/package.json +1 -1
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
|
|
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 (!
|
|
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
|
|
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 (!
|
|
53
|
+
if (!wholeNumber || char === decimal) kept += char;
|
|
54
54
|
} else if (/\s/.test(char)) {
|
|
55
55
|
kept += char;
|
|
56
56
|
}
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
firstUnit,
|
|
5
5
|
unitOptions,
|
|
6
6
|
unitRules
|
|
7
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-XGKIOBY6.js";
|
|
8
8
|
import "../chunks/chunk-CVXG3GYS.js";
|
|
9
9
|
import {
|
|
10
10
|
NumberInput
|
|
11
|
-
} from "../chunks/chunk-
|
|
11
|
+
} from "../chunks/chunk-T4URSDXR.js";
|
|
12
12
|
import {
|
|
13
13
|
clampNumber,
|
|
14
14
|
formatCssLength,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
firstUnit,
|
|
5
5
|
unitOptions,
|
|
6
6
|
unitRules
|
|
7
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-XGKIOBY6.js";
|
|
8
8
|
import "../chunks/chunk-CVXG3GYS.js";
|
|
9
|
-
import "../chunks/chunk-
|
|
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-
|
|
10
|
+
} from "../chunks/chunk-XGKIOBY6.js";
|
|
11
11
|
import "../chunks/chunk-CVXG3GYS.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
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.
|
|
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",
|