@react-stately/utils 3.0.0-nightly.2912 → 3.0.0-nightly.2925
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/dist/number.main.js
CHANGED
|
@@ -25,7 +25,7 @@ $parcel$export(module.exports, "toFixedNumber", () => $ac8e4d4816275668$export$b
|
|
|
25
25
|
function $ac8e4d4816275668$export$e1a7b8e69ef6c52f(value, step) {
|
|
26
26
|
let roundedValue = value;
|
|
27
27
|
let stepString = step.toString();
|
|
28
|
-
let pointIndex = stepString.indexOf(
|
|
28
|
+
let pointIndex = stepString.indexOf('.');
|
|
29
29
|
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
|
|
30
30
|
if (precision > 0) {
|
|
31
31
|
let pow = Math.pow(10, precision);
|
package/dist/number.mjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
|
|
18
18
|
let roundedValue = value;
|
|
19
19
|
let stepString = step.toString();
|
|
20
|
-
let pointIndex = stepString.indexOf(
|
|
20
|
+
let pointIndex = stepString.indexOf('.');
|
|
21
21
|
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
|
|
22
22
|
if (precision > 0) {
|
|
23
23
|
let pow = Math.pow(10, precision);
|
package/dist/number.module.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
|
|
18
18
|
let roundedValue = value;
|
|
19
19
|
let stepString = step.toString();
|
|
20
|
-
let pointIndex = stepString.indexOf(
|
|
20
|
+
let pointIndex = stepString.indexOf('.');
|
|
21
21
|
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
|
|
22
22
|
if (precision > 0) {
|
|
23
23
|
let pow = Math.pow(10, precision);
|
|
@@ -23,7 +23,7 @@ function $8d8fdfab47455712$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
23
23
|
let isControlled = value !== undefined;
|
|
24
24
|
(0, $ecn6s$react.useEffect)(()=>{
|
|
25
25
|
let wasControlled = isControlledRef.current;
|
|
26
|
-
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ?
|
|
26
|
+
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);
|
|
27
27
|
isControlledRef.current = isControlled;
|
|
28
28
|
}, [
|
|
29
29
|
isControlled
|
|
@@ -41,8 +41,8 @@ function $8d8fdfab47455712$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
41
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
42
|
currentValue = value;
|
|
43
43
|
};
|
|
44
|
-
if (typeof value ===
|
|
45
|
-
console.warn(
|
|
44
|
+
if (typeof value === 'function') {
|
|
45
|
+
console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
|
|
46
46
|
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
|
|
47
47
|
// when someone using useControlledState calls setControlledState(myFunc)
|
|
48
48
|
// this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
|
|
@@ -17,7 +17,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
17
17
|
let isControlled = value !== undefined;
|
|
18
18
|
(0, $3whtM$useEffect)(()=>{
|
|
19
19
|
let wasControlled = isControlledRef.current;
|
|
20
|
-
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ?
|
|
20
|
+
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);
|
|
21
21
|
isControlledRef.current = isControlled;
|
|
22
22
|
}, [
|
|
23
23
|
isControlled
|
|
@@ -35,8 +35,8 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
35
35
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
36
|
currentValue = value;
|
|
37
37
|
};
|
|
38
|
-
if (typeof value ===
|
|
39
|
-
console.warn(
|
|
38
|
+
if (typeof value === 'function') {
|
|
39
|
+
console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
|
|
40
40
|
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
|
|
41
41
|
// when someone using useControlledState calls setControlledState(myFunc)
|
|
42
42
|
// this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
|
|
@@ -17,7 +17,7 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
17
17
|
let isControlled = value !== undefined;
|
|
18
18
|
(0, $3whtM$useEffect)(()=>{
|
|
19
19
|
let wasControlled = isControlledRef.current;
|
|
20
|
-
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ?
|
|
20
|
+
if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);
|
|
21
21
|
isControlledRef.current = isControlled;
|
|
22
22
|
}, [
|
|
23
23
|
isControlled
|
|
@@ -35,8 +35,8 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
35
35
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
36
|
currentValue = value;
|
|
37
37
|
};
|
|
38
|
-
if (typeof value ===
|
|
39
|
-
console.warn(
|
|
38
|
+
if (typeof value === 'function') {
|
|
39
|
+
console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
|
|
40
40
|
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
|
|
41
41
|
// when someone using useControlledState calls setControlledState(myFunc)
|
|
42
42
|
// this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/utils",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.2925+c57671e7f",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c57671e7f57c4ffe59640a174f084cf660968913"
|
|
34
34
|
}
|