@react-stately/utils 3.10.0 → 3.10.1

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.
@@ -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);
@@ -45,4 +45,4 @@ function $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {
45
45
 
46
46
 
47
47
  export {$9446cca9a3875146$export$7d15b64cf5a3a4c4 as clamp, $9446cca9a3875146$export$e1a7b8e69ef6c52f as roundToStepPrecision, $9446cca9a3875146$export$cb6e0bb50bc19463 as snapValueToStep, $9446cca9a3875146$export$b6268554fba451f as toFixedNumber};
48
- //# sourceMappingURL=number.mjs.map
48
+ //# sourceMappingURL=number.module.js.map
@@ -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 ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
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 === "function") {
45
- console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
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 ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
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 === "function") {
39
- console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
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
@@ -66,4 +66,4 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
66
66
 
67
67
 
68
68
  export {$458b0a5536c1a7cf$export$40bfa8c7b0832715 as useControlledState};
69
- //# sourceMappingURL=useControlledState.mjs.map
69
+ //# sourceMappingURL=useControlledState.module.js.map
@@ -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 ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
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 === "function") {
39
- console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
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.10.0",
3
+ "version": "3.10.1",
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": "f645f29edc1322153fd60af4640cbcab1d992dbd"
33
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
34
34
  }