@fluentui/react-spinbutton 0.0.0-nightly-20230831-0414.1 → 0.0.0-nightly-20230904-0415.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.
Files changed (36) hide show
  1. package/CHANGELOG.json +21 -21
  2. package/CHANGELOG.md +13 -13
  3. package/lib/components/SpinButton/SpinButton.js.map +1 -1
  4. package/lib/components/SpinButton/renderSpinButton.js +8 -2
  5. package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
  6. package/lib/components/SpinButton/useSpinButton.js +3 -2
  7. package/lib/components/SpinButton/useSpinButton.js.map +1 -1
  8. package/lib/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
  9. package/lib/utils/clamp.js.map +1 -1
  10. package/lib/utils/getBound.js.map +1 -1
  11. package/lib/utils/precision.js.map +1 -1
  12. package/lib-commonjs/SpinButton.js +2 -2
  13. package/lib-commonjs/SpinButton.js.map +1 -1
  14. package/lib-commonjs/components/SpinButton/SpinButton.js +9 -7
  15. package/lib-commonjs/components/SpinButton/SpinButton.js.map +1 -1
  16. package/lib-commonjs/components/SpinButton/SpinButton.types.js +2 -2
  17. package/lib-commonjs/components/SpinButton/SpinButton.types.js.map +1 -1
  18. package/lib-commonjs/components/SpinButton/index.js +6 -6
  19. package/lib-commonjs/components/SpinButton/index.js.map +1 -1
  20. package/lib-commonjs/components/SpinButton/renderSpinButton.js +14 -6
  21. package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +1 -1
  22. package/lib-commonjs/components/SpinButton/useSpinButton.js +42 -39
  23. package/lib-commonjs/components/SpinButton/useSpinButton.js.map +1 -1
  24. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js +14 -10
  25. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
  26. package/lib-commonjs/index.js +16 -6
  27. package/lib-commonjs/index.js.map +1 -1
  28. package/lib-commonjs/utils/clamp.js +3 -1
  29. package/lib-commonjs/utils/clamp.js.map +1 -1
  30. package/lib-commonjs/utils/getBound.js +3 -1
  31. package/lib-commonjs/utils/getBound.js.map +1 -1
  32. package/lib-commonjs/utils/index.js +4 -4
  33. package/lib-commonjs/utils/index.js.map +1 -1
  34. package/lib-commonjs/utils/precision.js +6 -2
  35. package/lib-commonjs/utils/precision.js.map +1 -1
  36. package/package.json +15 -15
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "getBound", {
6
6
  enumerable: true,
7
- get: ()=>getBound
7
+ get: function() {
8
+ return getBound;
9
+ }
8
10
  });
9
11
  const getBound = (value, min, max)=>{
10
12
  if (min !== undefined && value === min) {
@@ -1 +1 @@
1
- {"version":3,"sources":["getBound.js"],"sourcesContent":["export const getBound = (value, min, max)=>{\n if (min !== undefined && value === min) {\n if (max === min) {\n return 'both';\n }\n return 'min';\n } else if (max !== undefined && value === max) {\n return 'max';\n }\n return 'none';\n};\n"],"names":["getBound","value","min","max","undefined"],"mappings":";;;;+BAAaA;;aAAAA;;AAAN,MAAMA,WAAW,CAACC,OAAOC,KAAKC,MAAM;IACvC,IAAID,QAAQE,aAAaH,UAAUC,KAAK;QACpC,IAAIC,QAAQD,KAAK;YACb,OAAO;QACX,CAAC;QACD,OAAO;IACX,OAAO,IAAIC,QAAQC,aAAaH,UAAUE,KAAK;QAC3C,OAAO;IACX,CAAC;IACD,OAAO;AACX"}
1
+ {"version":3,"sources":["getBound.js"],"sourcesContent":["export const getBound = (value, min, max)=>{\n if (min !== undefined && value === min) {\n if (max === min) {\n return 'both';\n }\n return 'min';\n } else if (max !== undefined && value === max) {\n return 'max';\n }\n return 'none';\n};\n"],"names":["getBound","value","min","max","undefined"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,WAAW,CAACC,OAAOC,KAAKC;IACjC,IAAID,QAAQE,aAAaH,UAAUC,KAAK;QACpC,IAAIC,QAAQD,KAAK;YACb,OAAO;QACX;QACA,OAAO;IACX,OAAO,IAAIC,QAAQC,aAAaH,UAAUE,KAAK;QAC3C,OAAO;IACX;IACA,OAAO;AACX"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./clamp"), exports);
7
- _exportStar(require("./getBound"), exports);
8
- _exportStar(require("./precision"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./clamp"), exports);
7
+ _export_star._(require("./getBound"), exports);
8
+ _export_star._(require("./precision"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getBound';\nexport * from './precision';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './clamp';\nexport * from './getBound';\nexport * from './precision';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA"}
@@ -15,8 +15,12 @@ function _export(target, all) {
15
15
  });
16
16
  }
17
17
  _export(exports, {
18
- calculatePrecision: ()=>calculatePrecision,
19
- precisionRound: ()=>precisionRound
18
+ calculatePrecision: function() {
19
+ return calculatePrecision;
20
+ },
21
+ precisionRound: function() {
22
+ return precisionRound;
23
+ }
20
24
  });
21
25
  function calculatePrecision(value) {
22
26
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["precision.js"],"sourcesContent":["/**\n * Calculates a number's precision based on the number of trailing\n * zeros if the number does not have a decimal indicated by a negative\n * precision. Otherwise, it calculates the number of digits after\n * the decimal point indicated by a positive precision.\n * @param value - the value to determine the precision of\n */ export function calculatePrecision(value) {\n /**\n * Group 1:\n * [1-9]([0]+$) matches trailing zeros\n * Group 2:\n * \\.([0-9]*) matches all digits after a decimal point.\n */ const groups = /[1-9]([0]+$)|\\.([0-9]*)/.exec(String(value));\n if (!groups) {\n return 0;\n }\n if (groups[1]) {\n return -groups[1].length;\n }\n if (groups[2]) {\n return groups[2].length;\n }\n return 0;\n}\n/**\n * Rounds a number to a certain level of precision. Accepts negative precision.\n * @param value - The value that is being rounded.\n * @param precision - The number of decimal places to round the number to\n */ export function precisionRound(value, precision, base = 10) {\n const exp = Math.pow(base, precision);\n return Math.round(value * exp) / exp;\n}\n"],"names":["calculatePrecision","precisionRound","value","groups","exec","String","length","precision","base","exp","Math","pow","round"],"mappings":"AAAA;;;;;;CAMC;;;;;;;;;;;IAAmBA,kBAAkB,MAAlBA;IAsBAC,cAAc,MAAdA;;AAtBT,SAASD,mBAAmBE,KAAK,EAAE;IAC1C;;;;;GAKD,GAAG,MAAMC,SAAS,0BAA0BC,IAAI,CAACC,OAAOH;IACvD,IAAI,CAACC,QAAQ;QACT,OAAO;IACX,CAAC;IACD,IAAIA,MAAM,CAAC,EAAE,EAAE;QACX,OAAO,CAACA,MAAM,CAAC,EAAE,CAACG,MAAM;IAC5B,CAAC;IACD,IAAIH,MAAM,CAAC,EAAE,EAAE;QACX,OAAOA,MAAM,CAAC,EAAE,CAACG,MAAM;IAC3B,CAAC;IACD,OAAO;AACX;AAKW,SAASL,eAAeC,KAAK,EAAEK,SAAS,EAAEC,OAAO,EAAE,EAAE;IAC5D,MAAMC,MAAMC,KAAKC,GAAG,CAACH,MAAMD;IAC3B,OAAOG,KAAKE,KAAK,CAACV,QAAQO,OAAOA;AACrC"}
1
+ {"version":3,"sources":["precision.js"],"sourcesContent":["/**\n * Calculates a number's precision based on the number of trailing\n * zeros if the number does not have a decimal indicated by a negative\n * precision. Otherwise, it calculates the number of digits after\n * the decimal point indicated by a positive precision.\n * @param value - the value to determine the precision of\n */ export function calculatePrecision(value) {\n /**\n * Group 1:\n * [1-9]([0]+$) matches trailing zeros\n * Group 2:\n * \\.([0-9]*) matches all digits after a decimal point.\n */ const groups = /[1-9]([0]+$)|\\.([0-9]*)/.exec(String(value));\n if (!groups) {\n return 0;\n }\n if (groups[1]) {\n return -groups[1].length;\n }\n if (groups[2]) {\n return groups[2].length;\n }\n return 0;\n}\n/**\n * Rounds a number to a certain level of precision. Accepts negative precision.\n * @param value - The value that is being rounded.\n * @param precision - The number of decimal places to round the number to\n */ export function precisionRound(value, precision, base = 10) {\n const exp = Math.pow(base, precision);\n return Math.round(value * exp) / exp;\n}\n"],"names":["calculatePrecision","precisionRound","value","groups","exec","String","length","precision","base","exp","Math","pow","round"],"mappings":"AAAA;;;;;;CAMC;;;;;;;;;;;IAAmBA,kBAAkB;eAAlBA;;IAsBAC,cAAc;eAAdA;;;AAtBT,SAASD,mBAAmBE,KAAK;IACxC;;;;;GAKD,GAAG,MAAMC,SAAS,0BAA0BC,IAAI,CAACC,OAAOH;IACvD,IAAI,CAACC,QAAQ;QACT,OAAO;IACX;IACA,IAAIA,MAAM,CAAC,EAAE,EAAE;QACX,OAAO,CAACA,MAAM,CAAC,EAAE,CAACG,MAAM;IAC5B;IACA,IAAIH,MAAM,CAAC,EAAE,EAAE;QACX,OAAOA,MAAM,CAAC,EAAE,CAACG,MAAM;IAC3B;IACA,OAAO;AACX;AAKW,SAASL,eAAeC,KAAK,EAAEK,SAAS,EAAEC,OAAO,EAAE;IAC1D,MAAMC,MAAMC,KAAKC,GAAG,CAACH,MAAMD;IAC3B,OAAOG,KAAKE,KAAK,CAACV,QAAQO,OAAOA;AACrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-spinbutton",
3
- "version": "0.0.0-nightly-20230831-0414.1",
3
+ "version": "0.0.0-nightly-20230904-0415.1",
4
4
  "description": "Fluent UI React SpinButton component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,28 +27,28 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20230831-0414.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230831-0414.1",
32
- "@fluentui/react-label": "0.0.0-nightly-20230831-0414.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230904-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230904-0415.1",
32
+ "@fluentui/react-label": "0.0.0-nightly-20230904-0415.1",
33
33
  "@fluentui/scripts-api-extractor": "*",
34
34
  "@fluentui/scripts-tasks": "*"
35
35
  },
36
36
  "dependencies": {
37
- "@fluentui/keyboard-keys": "0.0.0-nightly-20230831-0414.1",
38
- "@fluentui/react-field": "0.0.0-nightly-20230831-0414.1",
37
+ "@fluentui/keyboard-keys": "0.0.0-nightly-20230904-0415.1",
38
+ "@fluentui/react-field": "0.0.0-nightly-20230904-0415.1",
39
39
  "@fluentui/react-icons": "^2.0.207",
40
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230831-0414.1",
41
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230831-0414.1",
42
- "@fluentui/react-theme": "0.0.0-nightly-20230831-0414.1",
43
- "@fluentui/react-utilities": "0.0.0-nightly-20230831-0414.1",
40
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230904-0415.1",
41
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230904-0415.1",
42
+ "@fluentui/react-theme": "0.0.0-nightly-20230904-0415.1",
43
+ "@fluentui/react-utilities": "0.0.0-nightly-20230904-0415.1",
44
44
  "@griffel/react": "^1.5.14",
45
- "@swc/helpers": "^0.4.14"
45
+ "@swc/helpers": "^0.5.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@types/react": ">=16.8.0 <19.0.0",
49
- "@types/react-dom": ">=16.8.0 <19.0.0",
50
- "react": ">=16.8.0 <19.0.0",
51
- "react-dom": ">=16.8.0 <19.0.0"
48
+ "@types/react": ">=16.14.0 <19.0.0",
49
+ "@types/react-dom": ">=16.14.0 <19.0.0",
50
+ "react": ">=16.14.0 <19.0.0",
51
+ "react-dom": ">=16.14.0 <19.0.0"
52
52
  },
53
53
  "beachball": {},
54
54
  "exports": {